.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.price-card-featured {
  border: 2px solid var(--green);
  background: linear-gradient(180deg, #f8fff9 0%, var(--card) 70%);
}

.price-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.price-card p {
  margin: 0;
  color: var(--ink-soft);
}

.price-tag {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--green);
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price {
  color: var(--green) !important;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.price-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.2rem 0 0.8rem;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.price-list li::before {
  content: "✓";
  color: var(--green-2);
  font-weight: 800;
  margin-right: 0.5rem;
}

.price-card .btn {
  margin-top: auto;
  text-align: center;
}

.price-card .price-empty {
  flex: 1;
}

.pricing-support {
  margin: 1.5rem auto 0;
  max-width: 52rem;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
  text-transform: uppercase;
}

.pricing-support a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cloud-offers-section {
  padding-top: 1rem;
}

.cloud-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.cloud-detail-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
}

.cloud-detail-card ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cloud-detail-card li {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.cloud-detail-card li b {
  color: var(--ink);
  white-space: nowrap;
}

.cloud-detail-card .btn {
  margin-top: auto;
  text-align: center;
}

.cloud-duration {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
}

.subscribe-dialog {
  width: min(36rem, calc(100% - 2rem));
}

.subscribe-unavailable {
  padding: 1.1rem;
  color: var(--ink);
}

.subscribe-unavailable h3 {
  margin: 0 0 0.5rem;
}

.subscribe-unavailable p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.subscribe-summary {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  padding: 0.65rem 0.8rem;
  color: var(--ink);
  font-weight: 700;
}

.rdv-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
}

.subscribe-result {
  padding: 1.1rem;
  color: var(--ink);
}

.subscribe-result h3 {
  margin: 0 0 0.5rem;
}

.subscribe-result > p {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.subscribe-code {
  border-radius: var(--r-md);
  background: var(--green);
  color: #fff;
  padding: 0.8rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.subscribe-result dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 0.8rem;
  margin: 1rem 0;
  font-size: 0.86rem;
}

.subscribe-result dt {
  color: var(--ink-soft);
}

.subscribe-result dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.subscribe-instructions {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  font-size: 0.86rem;
}

.subscribe-instructions strong {
  display: block;
  margin-bottom: 0.35rem;
}

.subscribe-instructions p {
  margin: 0;
  color: var(--ink-soft);
  white-space: pre-line;
}

.cloud-offers {
  display: grid;
  gap: 0.7rem;
}

.cloud-offer {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.85rem;
  background: #fff;
}

.cloud-offer-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.6rem;
}

.cloud-offer-head strong {
  color: var(--green);
  font-size: 1rem;
}

.cloud-offer-head span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.cloud-offer ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cloud-offer li {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.cloud-offer li b {
  color: var(--ink);
  white-space: nowrap;
}

.price-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 0.8rem;
  font-size: 0.9rem;
}

.rdv-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 90px rgb(6 61 46 / 0.35);
}

.rdv-dialog::backdrop {
  background: rgb(6 35 27 / 0.55);
  backdrop-filter: blur(2px);
}

.rdv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--green);
  color: #fff;
}

.rdv-head strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
}

.rdv-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9e6da;
}

.rdv-status i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #64d49d;
}

.rdv-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.rdv-form[hidden],
.subscribe-result[hidden] {
  display: none;
}

.rdv-form {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem;
  overflow: auto;
}

.rdv-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.rdv-field {
  display: grid;
  gap: 0.35rem;
}

.rdv-bubble {
  width: fit-content;
  max-width: 95%;
  border-radius: 0 0.8rem 0.8rem 0.8rem;
  background: var(--bg-soft);
  padding: 0.5rem 0.7rem;
  color: var(--ink);
  font-size: 0.86rem;
}

.rdv-field input,
.rdv-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
}

.rdv-error {
  margin: 0;
  color: #a43124;
  font-size: 0.85rem;
}

.rdv-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.duration-switch {
  display: flex;
  gap: 0.3rem;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 1rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
}

.duration-tab {
  flex: none;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.45rem 0.75rem;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.duration-tab:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.duration-tab.is-active {
  background: var(--green);
  color: #fff;
}

.cloud-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cloud-includes span {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--green);
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.cloud-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: auto;
}

.cloud-price strong {
  color: var(--green);
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.cloud-price span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.cloud-duration[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .duration-switch {
    width: 100%;
  }
}

.cloud-detail-card .cloud-benefits li {
  display: list-item;
  text-align: left;
  justify-content: initial;
}

.market-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.market-switch-label {
  margin-right: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.market-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.market-button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.market-notice {
  display: none;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  padding: 0.9rem 1rem;
  color: var(--ink);
}

.market-notice strong {
  display: block;
  margin-bottom: 0.25rem;
}

.market-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.market-notice a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body[data-market="MG"] [data-madagascar-only] {
  display: block;
}

body[data-market="INTL"] [data-madagascar-only] {
  display: none;
}

body[data-market="INTL"] [data-cloud-only] {
  display: none !important;
}

body[data-market="INTL"] [data-international-only] {
  display: block;
}

.cloud-carousel {
  position: relative;
}

.cloud-detail-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.2rem 0.15rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.cloud-detail-card {
  flex: 0 0 23rem;
  width: 23rem;
  max-width: calc(100vw - 2rem);
  scroll-snap-align: start;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(10, 20, 16, 0.12);
  transform: translateY(-50%);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.carousel-button:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.carousel-button:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.carousel-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.carousel-prev { left: -0.75rem; }
.carousel-next { right: -0.75rem; }

@media (max-width: 560px) {
  .cloud-detail-grid {
    margin-inline: -0.15rem;
  }

  .carousel-prev { left: 0.1rem; }
  .carousel-next { right: 0.1rem; }
  .carousel-button { width: 2.15rem; height: 2.15rem; }
}

@media (min-width: 901px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 368px));
    justify-content: center;
  }
}

.pricing-carousel {
  position: relative;
}

.pricing-grid {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.2rem 0.15rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.pricing-grid .price-card {
  flex: 0 0 368px;
  width: 368px;
  max-width: calc(100vw - 2rem);
  scroll-snap-align: start;
}

@media (max-width: 560px) {
  .pricing-grid {
    margin-inline: -0.15rem;
  }
}

:root[data-theme="dark"] .price-card-featured {
  background: var(--card);
  border-color: var(--green);
}

:root[data-theme="dark"] .price-card-featured .price-tag {
  color: var(--green-2);
}

/* Carrousels alignés sur le design des démos */
.pricing-carousel,
.cloud-carousel {
  padding: 0 2.8rem;
}

.pricing-grid,
.cloud-detail-grid {
  padding: 0.2rem 0.15rem 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pricing-grid::-webkit-scrollbar,
.cloud-detail-grid::-webkit-scrollbar {
  display: none;
}

.pricing-carousel .carousel-button,
.cloud-carousel .carousel-button {
  left: 0;
  right: auto;
}

.pricing-carousel .carousel-prev,
.cloud-carousel .carousel-prev {
  left: 0;
}

.pricing-carousel .carousel-next,
.cloud-carousel .carousel-next {
  right: 0;
  left: auto;
}

.pricing-carousel .carousel-button:hover:not(:disabled),
.cloud-carousel .carousel-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

@media (max-width: 640px) {
  .pricing-carousel,
  .cloud-carousel {
    padding: 0 2.2rem;
  }

  .pricing-carousel .carousel-button,
  .cloud-carousel .carousel-button {
    width: 2.15rem;
    height: 2.15rem;
  }
}

@media (min-width: 901px) {
  .pricing-grid .price-card,
  .cloud-detail-grid .cloud-detail-card {
    flex-basis: calc((100% - 2rem) / 3);
    width: auto;
    max-width: none;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .pricing-grid .price-card,
  .cloud-detail-grid .cloud-detail-card {
    flex-basis: calc((100% - 1rem) / 2);
    width: auto;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .pricing-grid .price-card,
  .cloud-detail-grid .cloud-detail-card {
    flex-basis: 100%;
    width: auto;
    max-width: none;
  }
}

/* Mode nuit — accents lisibles sur surfaces graphite */
:root[data-theme="dark"] .price {
  color: var(--green-2) !important;
}

:root[data-theme="dark"] .price-tag {
  background: #2f281e;
  color: #e4bb8b;
}

:root[data-theme="dark"] .price-card-featured .price-tag {
  color: #e4bb8b;
}

:root[data-theme="dark"] .cloud-offer-head strong,
:root[data-theme="dark"] .cloud-price strong {
  color: var(--green-2);
}

:root[data-theme="dark"] .cloud-includes span {
  background: #2f281e;
  color: #e4bb8b;
}

:root[data-theme="dark"] .market-notice a {
  color: var(--green-2);
}

/* Mode clair — offres sobres et bordures fines */
:root:not([data-theme="dark"]) .price-card-featured {
  background: var(--card);
  border: 1px solid #cfded7;
}

:root:not([data-theme="dark"]) .price-empty {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fbfbf9;
}

:root:not([data-theme="dark"]) .price-card .price-empty {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

:root:not([data-theme="dark"]) .carousel-button {
  border-color: var(--line);
  background: rgb(255 255 255 / 0.94);
  box-shadow: 0 4px 16px rgb(20 24 28 / 0.08);
}

/* Mode nuit — champs des modales demande d'offre / rendez-vous */
:root[data-theme="dark"] .rdv-field input,
:root[data-theme="dark"] .rdv-field textarea,
:root[data-theme="dark"] .rdv-field select,
:root[data-theme="dark"] .cloud-duration {
  border-color: var(--line);
  background: #171a1d;
  color: var(--ink);
  caret-color: var(--green-2);
}

:root[data-theme="dark"] .rdv-field input::placeholder,
:root[data-theme="dark"] .rdv-field textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.85;
}

:root[data-theme="dark"] .rdv-field input:focus,
:root[data-theme="dark"] .rdv-field textarea:focus,
:root[data-theme="dark"] .rdv-field select:focus {
  border-color: var(--green-2);
  outline: 2px solid rgb(157 191 174 / 0.22);
  outline-offset: 1px;
}

.subscribe-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
}

.subscribe-terms input {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.subscribe-terms a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.subscribe-terms-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.subscribe-terms-status[hidden] {
  display: none;
}
