/* =========================================================================
   app.css — Composants de la vitrine.
   Ordre : bandeau · en-tete · menu · recherche · grille · fiche produit ·
           checkout · remerciement · pied de page · modales · toasts.
   ========================================================================= */

/* ------------------------- Bandeau d'annonces (top) ---------------------- */

.announce {
  position: relative;
  height: var(--banner-h);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.announce__track {
  display: flex;
  gap: var(--sp-9);
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee 26s linear infinite;
  will-change: transform;
}
.announce:hover .announce__track { animation-play-state: paused; }
.announce__item {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}
.announce__item::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
@keyframes marquee { to { transform: translateX(-100%); } }

/* -------------------------------- En-tete -------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.header.is-stuck { border-bottom-color: var(--ink-12); box-shadow: var(--shadow-sm); }

/* Trois zones egales : le logo reste optiquement centre quel que soit le contenu. */
.header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.header__left  { display: flex; justify-content: flex-start; gap: 2px; }
.header__right { display: flex; justify-content: flex-end; gap: 2px; }

.logo {
  font-size: clamp(15px, 2.4vw, 18px);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-indent: 0.26em;   /* compense le letter-spacing pour un vrai centrage */
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background var(--fast), transform var(--fast);
}
.icon-btn:hover { background: var(--ink-06); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.icon-btn__count {
  position: absolute;
  top: 3px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
  transform: scale(0);
  transition: transform 220ms var(--ease);
}
.icon-btn__count.is-on { transform: scale(1); }

/* Pastille discrete signalant une session client active. */
.icon-btn__dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--white);
}

/* ------------------------ Panneaux lateraux (menu / panier) -------------- */

.scrim {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(17, 17, 17, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--slow);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.panel {
  position: fixed;
  top: 0; bottom: 0;
  z-index: 100;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--white);
  transition: transform var(--slow);
}
.panel--left  { left: 0;  transform: translateX(-102%); }
.panel--right { right: 0; transform: translateX(102%); }
.panel.is-open { transform: none; box-shadow: var(--shadow-lg); }

.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: var(--line);
  min-height: var(--header-h);
}
.panel__body { flex: 1; overflow-y: auto; padding: var(--sp-5); }
.panel__foot { border-top: var(--line); padding: var(--sp-5); background: var(--paper); }

.nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: var(--line);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color var(--fast), padding-left var(--fast);
}
.nav-list svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; opacity: 0.4; }
.nav-list a:hover { color: var(--accent); padding-left: 6px; }

/* --------------------------- Panier (contenu) ---------------------------- */

.cart-line { display: grid; grid-template-columns: 78px 1fr auto; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: var(--line); }
.cart-line__img { width: 78px; height: 78px; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }
.cart-line__title { font-weight: 600; font-size: 14px; }
.cart-line__meta { font-size: 12.5px; color: var(--ink-50); }
.cart-line__price { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }

.qty { display: inline-flex; align-items: center; border: var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 30px; height: 30px; display: grid; place-items: center; font-size: 15px; transition: background var(--fast); }
.qty button:hover { background: var(--ink-06); }
.qty span { min-width: 26px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }

.totals { display: grid; gap: 8px; font-size: 14px; }
.totals__row { display: flex; justify-content: space-between; }
.totals__row--grand { font-size: 18px; font-weight: 700; padding-top: 10px; border-top: var(--line); }
.totals__row--free { color: var(--success); }
.money { font-variant-numeric: tabular-nums; }

/* Barre de progression vers la livraison offerte : levier de panier moyen. */
.shipping-bar { margin-bottom: var(--sp-4); }
.shipping-bar__track { height: 3px; background: var(--ink-12); border-radius: 999px; overflow: hidden; }
.shipping-bar__fill { height: 100%; background: var(--accent); width: 0; transition: width var(--slow); }
.shipping-bar__text { margin-top: 7px; font-size: 12px; color: var(--ink-70); }

/* ------------------------------- Recherche ------------------------------- */

.search { position: relative; }
.search__input { padding-left: 42px; border-radius: 999px; }
.search__icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: var(--ink-50); fill: none; stroke-width: 1.7; pointer-events: none; }
.search__results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  z-index: 20;
  max-height: 60vh; overflow-y: auto;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
}
.search__results.is-open { display: block; }
.search__hit { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--sp-3); align-items: center; padding: 10px 14px; transition: background var(--fast); }
.search__hit:hover, .search__hit.is-active { background: var(--paper); }
.search__hit img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }
/* `min-width: 0` libere la colonne centrale : sans lui, un nom long pousse le
   prix hors du cadre au lieu d'etre tronque. */
.search__hit__text { min-width: 0; }
.search__hit__name {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------- Heros ---------------------------------- */

/* Hero editorial : pas de visuel, la promesse en toutes lettres, puis on
   enchaine directement sur le catalogue. */
.hero { padding-block: clamp(44px, 8vw, 96px) clamp(32px, 5vw, 64px); }
.hero__editorial { max-width: 68ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }

/* --------------------------- Barre de filtres ---------------------------- */

/**
 * La barre de recherche et de tri DEFILE avec la page.
 *
 * Elle etait collee sous l'en-tete, sur un fond translucide. Deux defauts :
 * le catalogue passait en transparence dessous — visuellement salissant — et
 * sur un telephone, deux barres fixes empilees mangeaient un tiers de l'ecran
 * utile, celui qui doit montrer des chaussures.
 *
 * La recherche reste accessible en permanence : elle a son bouton dans
 * l'en-tete, lui bien fixe. On ne perd donc rien.
 */
.toolbar {
  padding-block: var(--sp-3);
  background: var(--paper);
  border-bottom: var(--line);
}
.toolbar__row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
/* Sur mobile la recherche occupe toute la largeur : partagee avec le bouton
   « Filtres », elle devenait trop etroite pour lire les suggestions. */
.toolbar__row .search { flex: 1 1 100%; min-width: 0; order: -1; }
@media (min-width: 620px) { .toolbar__row .search { flex: 1 1 auto; order: 0; } }
.toolbar__count { font-size: 12.5px; color: var(--ink-50); white-space: nowrap; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: var(--sp-3) 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  white-space: nowrap;
  transition: all var(--fast);
}
.chip:hover { border-color: var(--ink-30); }
.chip.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip--reset { color: var(--accent); border-color: var(--accent-soft); }
/* Une collection est un rayon commercial : on la distingue d'une categorie
   par une pastille orange, sans alourdir la barre de filtres. */
.chip--collection::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.chip--collection.is-active::before { background: var(--white); }

.filters { display: grid; gap: var(--sp-5); }
.filters__group { display: grid; gap: var(--sp-3); }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }

/* ------------------------------ Grille produits -------------------------- */

/* Regle d'ergonomie : 2 colonnes des 360 px de large pour que les visuels
   restent lisibles, 1 seule colonne sur les tres petits ecrans. */
.grid {
  display: grid;
  gap: clamp(14px, 2.4vw, 28px);
  grid-template-columns: 1fr;
}
@media (min-width: 360px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { display: flex; flex-direction: column; }
.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease), opacity var(--fast);
}
.card:hover .card__media img { transform: scale(1.035); }
/* Seconde image revelee au survol : reflexe e-commerce premium. */
.card__media img + img { position: absolute; inset: 0; opacity: 0; }
.card:hover .card__media img + img { opacity: 1; }

.card__flags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.card__quick {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--fast), transform var(--fast);
}
@media (hover: hover) {
  .card:hover .card__quick { opacity: 1; transform: none; }
}
@media (hover: none) { .card__quick { display: none; } }

.card__body { padding-top: var(--sp-3); display: grid; gap: 3px; }
.card__brand { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-50); }
.card__title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.card__price { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.card__price b { font-size: 15px; font-weight: 700; }
.card__price s { font-size: 12.5px; color: var(--ink-30); }
.card__sizes { font-size: 11.5px; color: var(--ink-50); }

.empty { padding: var(--sp-8) 0; text-align: center; color: var(--ink-50); }

/* ------------------------------ Fiche produit ---------------------------- */

.pdp { display: grid; gap: clamp(24px, 4vw, 56px); padding-block: var(--sp-6) var(--sp-8); }
@media (min-width: 940px) { .pdp { grid-template-columns: 1.15fr 1fr; align-items: start; } }

.gallery { display: grid; gap: var(--sp-3); }
.gallery__main { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb {
  flex: 0 0 72px; width: 72px; height: 72px;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent;
  background: var(--paper-2);
  transition: border-color var(--fast);
}
.gallery__thumb.is-active { border-color: var(--ink); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 940px) {
  /* La colonne d'achat suit le defilement : le CTA reste toujours accessible. */
  .buybox { position: sticky; top: calc(var(--header-h) + 24px); }
}
.buybox__price { display: flex; align-items: baseline; gap: 12px; margin-top: var(--sp-3); }
.buybox__price b { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.buybox__price s { color: var(--ink-30); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink-12);
  position: relative;
  transition: transform var(--fast);
}
.swatch:hover { transform: scale(1.06); }
.swatch.is-active::after {
  content: "";
  position: absolute; inset: -5px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.size {
  height: 46px;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: all var(--fast);
}
.size:hover:not(:disabled) { border-color: var(--ink); }
.size.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.size:disabled {
  color: var(--ink-30);
  cursor: not-allowed;
  background:
    linear-gradient(to top left, transparent calc(50% - 1px), var(--ink-12) 50%, transparent calc(50% + 1px));
}

.stock-note { font-size: 12.5px; }
.stock-note--low { color: var(--accent); font-weight: 600; }
.stock-note--out { color: var(--danger); }

.accordion { border-top: var(--line); }
.accordion__item { border-bottom: var(--line); }
.accordion__head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-weight: 600; font-size: 14px; text-align: left; }
.accordion__head svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; transition: transform var(--fast); }
.accordion__item.is-open .accordion__head svg { transform: rotate(45deg); }
.accordion__panel { display: none; padding-bottom: 18px; color: var(--ink-70); font-size: 14px; line-height: 1.7; }
.accordion__item.is-open .accordion__panel { display: block; }

.trust { display: grid; gap: 12px; padding: var(--sp-4); background: var(--paper); border-radius: var(--radius); }
.trust li { display: flex; gap: 10px; font-size: 13px; color: var(--ink-70); align-items: flex-start; }
.trust svg { flex: 0 0 16px; width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 1.8; margin-top: 2px; }
/* L'expedition du jour est encore possible : c'est la seule ligne qu'on appuie. */
.trust li.trust--now { color: var(--ink); font-weight: 600; }

/* Moyens de reglement acceptes, sous les boutons d'achat. */
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  background: var(--white);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pay-method svg { width: 17px; height: 17px; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.pay-method img { width: auto; height: 16px; object-fit: contain; }

/* Recommandations (cross-sell) : en bas de page, jamais dans le bloc d'achat. */
.reco { padding-block: var(--sp-7); border-top: var(--line); }
.reco__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }

/* ====================== Checkout guide, etape par etape ==================== */

/* Fil de progression : le client sait toujours ou il en est, et peut revenir. */
.flow-progress {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 24px 0 4px;
  scrollbar-width: none;
}
.flow-progress::-webkit-scrollbar { display: none; }
.flow-progress__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-50);
  white-space: nowrap;
  transition: background var(--fast), color var(--fast);
}
.flow-progress__item:not([disabled]):hover { background: var(--ink-06); }
.flow-progress__item[disabled] { opacity: 0.4; cursor: default; }
.flow-progress__item.is-active { background: var(--ink); color: var(--white); font-weight: 600; }
.flow-progress__item.is-done { color: var(--success); }
.flow-progress__dot {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink-06);
  font-size: 11px;
  font-weight: 700;
}
.flow-progress__item.is-active .flow-progress__dot { background: var(--accent); color: var(--white); }
.flow-progress__item.is-done .flow-progress__dot { background: rgba(15, 122, 74, 0.14); }

/* Panier accessible en permanence, replie par defaut. */
.flow-cart {
  margin-top: 14px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.flow-cart__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 14px var(--sp-4);
  text-align: left;
  font-size: 14px;
}
.flow-cart__right { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.flow-cart__right svg { width: 18px; height: 18px; stroke: var(--ink-50); fill: none; stroke-width: 1.8; transition: transform var(--fast); }
.flow-cart__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.flow-cart__body { padding: 0 var(--sp-4) var(--sp-4); border-top: var(--line); }
.flow-cart__body.is-collapsed { display: none; }

/* L'etape courante. Une question, une reponse. */
.flow-step { padding-block: clamp(28px, 5vw, 44px); animation: flow-in 300ms var(--ease) both; }
@keyframes flow-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.flow-title { font-size: clamp(23px, 4vw, 32px); letter-spacing: -0.028em; line-height: 1.15; }
.flow-sub { margin-top: 10px; font-size: 14.5px; color: var(--ink-70); max-width: 52ch; }

.flow-cards { display: grid; gap: 10px; margin-top: var(--sp-5); }

/* Grande cible tactile : on repond en appuyant, pas en tapant. */
.flow-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
  transition: border-color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.flow-card:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.flow-card:active { transform: translateY(0); }
.flow-card.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* Option indisponible aujourd'hui : visible mais clairement hors service. */
.flow-card.is-off { opacity: .5; cursor: not-allowed; }
.flow-card.is-off:hover { transform: none; box-shadow: none; border-color: var(--ink-12); }
.flow-card--google { cursor: default; }
.flow-card--google:hover { transform: none; box-shadow: none; border-color: var(--ink-12); }

.flow-card__icon { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); }
.flow-card__icon svg { width: 19px; height: 19px; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.flow-card__emoji { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); font-size: 19px; }
.flow-card__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.flow-card__body b { font-size: 15.5px; }
.flow-card__body span { font-size: 13px; color: var(--ink-50); }
.flow-card__price { font-size: 15px; white-space: nowrap; }
.flow-card__go { flex: 0 0 auto; }
.flow-card__go svg { width: 17px; height: 17px; stroke: var(--ink-30); fill: none; stroke-width: 1.8; }

.flow-inline { margin-top: var(--sp-5); padding: var(--sp-5); border: var(--line); border-radius: var(--radius); background: var(--paper); }

/* Partage de position : l'action la plus importante de l'etape « urgent ». */
.flow-locate {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-5);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  text-align: left;
  transition: background var(--fast);
}
.flow-locate:hover { background: rgba(255, 102, 0, 0.16); }
.flow-locate.is-done { border-style: solid; border-color: var(--success); background: rgba(15, 122, 74, 0.08); }
.flow-locate__icon { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--white); }
.flow-locate__icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.7; }
.flow-locate.is-done .flow-locate__icon svg { stroke: var(--success); }
.flow-locate span { display: grid; gap: 2px; }
.flow-locate b { font-size: 15px; }
.flow-locate span span { font-size: 13px; color: var(--ink-70); }

/* Devis : les creneaux et leur prix, comparables d'un coup d'oeil. */
.quote { border: var(--line); border-radius: var(--radius); background: var(--white); padding: var(--sp-4); }
.quote__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: 10px; }
.quote__slot { font-size: 11.5px; color: var(--accent-deep); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.quote__opt {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--fast);
}
.quote__opt:hover { background: var(--paper); }
.quote__opt.is-active { background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.quote__opt input { accent-color: var(--accent); }
.quote__opt > span { flex: 1; display: grid; gap: 1px; }
.quote__opt b { font-size: 14px; }
.quote__opt .muted { font-size: 12.5px; }
.quote-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-70); line-height: 1.5; }
.quote-note--warn { color: var(--accent-deep); font-weight: 500; }

/* Avant que la destination soit connue : on annonce que le prix arrive,
   sans rien devoiler du calcul. */
.quote-waiting {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px dashed var(--ink-12);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 12.5px;
  color: var(--ink-70);
  line-height: 1.5;
}
.quote-waiting svg { flex: 0 0 17px; width: 17px; height: 17px; stroke: var(--ink-30); fill: none; stroke-width: 1.7; margin-top: 1px; }

/* Resume : chaque ligne reste modifiable. */
.review { border: var(--line); border-radius: var(--radius); background: var(--white); }
.review__row { display: flex; align-items: center; gap: var(--sp-3); padding: 13px var(--sp-4); }
.review__row + .review__row { border-top: 1px solid var(--ink-06); }
.review__label { flex: 0 0 78px; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-50); }
.review__value { flex: 1; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.review__edit { font-size: 12.5px; color: var(--accent); text-decoration: underline; white-space: nowrap; }

.flow-nav { padding-bottom: var(--sp-8); }

/* -------------------------------- Checkout -------------------------------- */

.checkout { display: grid; gap: clamp(24px, 4vw, 48px); padding-block: var(--sp-6) var(--sp-8); }
@media (min-width: 940px) { .checkout { grid-template-columns: 1.25fr 1fr; align-items: start; } }

.form-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 620px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

.summary {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
}

/* --- Mobile : le recapitulatif passe AVANT le formulaire, et reste replie ---
   Le client voit immediatement ce qu'il commande et son total, sans avoir a
   faire defiler toute une liste pour atteindre les champs a remplir. */
@media (max-width: 939px) {
  .summary { order: -1; padding: var(--sp-4); }
  .summary__title { display: none; }
  .summary__body.is-collapsed { display: none; }
  .summary__body { padding-top: var(--sp-4); margin-top: var(--sp-4); border-top: var(--line); }
}

.summary__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  text-align: left;
}
.summary__toggle-left { display: grid; gap: 2px; }
.summary__toggle-left b { font-size: 14px; }
.summary__toggle-right { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.summary__toggle-right svg { width: 18px; height: 18px; stroke: var(--ink-50); fill: none; stroke-width: 1.8; transition: transform var(--fast); }
.summary__toggle[aria-expanded="true"] .summary__toggle-right svg { transform: rotate(180deg); }

/* --- Desktop : colonne classique, toujours depliee et collante ------------- */
@media (min-width: 940px) {
  .summary { position: sticky; top: calc(var(--header-h) + 24px); }
  .summary__toggle { display: none; }
  .summary__title { margin-bottom: 12px; }
}

.promo { display: flex; gap: 8px; }
.promo .input { min-height: 44px; }

.payment {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}
.payment svg { flex: 0 0 22px; width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.6; }
/* Hors zone de paiement a la livraison : la mention doit se remarquer sans
   dramatiser — le client doit lire la condition avant de valider. */
.payment--warn {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ------------------------- Choix du mode de livraison ---------------------- */

.ship {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast);
}
.ship + .ship { margin-top: 10px; }
.ship:hover { border-color: var(--ink-30); }
.ship.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ship.is-disabled { opacity: 0.55; cursor: not-allowed; background: var(--paper); }
.ship input { margin-top: 3px; accent-color: var(--accent); flex: 0 0 auto; }

.ship__body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ship__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); font-size: 14.5px; }
.ship__meta { font-size: 12.5px; color: var(--ink-50); }
.ship__note { font-size: 12.5px; color: var(--ink-70); }
.ship__note--off { color: var(--danger); }
.ship__detail { font-size: 12px; color: var(--ink-50); font-variant-numeric: tabular-nums; }

/* Groupe express : les niveaux d'urgence se lisent comme une echelle. */
.ship-group {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 102, 0, 0.045), transparent);
}
.ship-group__head { margin-bottom: 10px; }
.ship-group__head p { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.ship-group .ship { background: var(--white); }

/* Precision d'adresse : le coursier express part immediatement, il ne peut pas
   se permettre de chercher. */
.ship-precision {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.55;
}
.ship-precision p + p { margin-top: 4px; }
.ship-precision .muted { font-size: 12.5px; }

/* Suggestion de dernier moment dans le recapitulatif (cross-sell doux). */
.addon { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--sp-3); align-items: center; padding: 12px 0; border-top: var(--line); }
.addon img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }

/* ------------------------------ Espace client ----------------------------- */

.auth {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--line); }
.auth__tab {
  padding: 16px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-50);
  border-bottom: 2px solid transparent;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.auth__tab:hover { background: var(--paper); color: var(--ink); }
.auth__tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.auth__panel { padding: clamp(20px, 4vw, 32px); }

/* Rappel discret de la session dans le tunnel de commande. */
.account-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: var(--line);
  font-size: 13px;
}

/* Invitation a creer un compte, sur la page de remerciement. */
.account-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 102, 0, 0.05), transparent);
}

.panel-soft {
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius-sm);
}

/* ------------------- Fidelite, paliers, parrainage, bons ------------------ */

.reward-card {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: var(--sp-5);
}
.reward-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.reward-card__points {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.reward-card__points span { font-size: 15px; font-weight: 500; color: var(--ink-50); letter-spacing: 0; }

.tier {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  white-space: nowrap;
}
.tier--bronze { background: #7a5230; }
.tier--argent { background: #7d8489; }
.tier--or { background: var(--accent); }

.reward-progress { margin-top: var(--sp-4); }
.reward-progress__track { height: 4px; background: var(--ink-12); border-radius: 999px; overflow: hidden; }
.reward-progress__fill { height: 100%; background: var(--accent); transition: width var(--slow); }

.referral-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: 12px 16px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.referral-code span {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
  user-select: all;
}

.coupon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 12px 0;
}
.coupon + .coupon { border-top: 1px solid var(--ink-06); }

/* Historique des commandes. */
.order-card {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.order-card + .order-card { margin-top: var(--sp-3); }
.order-card__head,
.order-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: 14px var(--sp-4);
}
.order-card__head { border-bottom: var(--line); }
.order-card__foot { border-top: var(--line); background: var(--paper); }
.order-card__items { padding: 4px var(--sp-4); }

.order-line {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 12px 0;
  transition: opacity var(--fast);
}
.order-line + .order-line { border-top: 1px solid var(--ink-06); }
.order-line:hover { opacity: 0.72; }
.order-line img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }

/* Pastilles de statut, partagees avec le back-office. */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--ink-06); color: var(--ink-70);
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--nouvelle  { background: var(--accent-soft); color: var(--accent-deep); }
.status--expediee  { background: rgba(15, 122, 74, 0.1); color: var(--success); }
.status--livree    { background: var(--success); color: #fff; }
.status--annulee   { background: rgba(192, 57, 43, 0.1); color: var(--danger); }

/* Cartes de statistiques du compte (memes jetons que le back-office). */
.kpis { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { background: var(--white); border: var(--line); border-radius: var(--radius); padding: var(--sp-4); }
.kpi__label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-50); }
/* La valeur s'adapte a la largeur : « 207 000 XOF » ne doit pas passer a la
   ligne et deformer la hauteur des cartes sur un petit ecran. */
.kpi__value {
  font-size: clamp(17px, 4.4vw, 24px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
  letter-spacing: -0.02em;
}

/* ---------------------------- Page de remerciement ----------------------- */

.thanks { max-width: 720px; margin-inline: auto; padding-block: var(--sp-7) var(--sp-9); }
.thanks__mark {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: var(--sp-5);
  animation: pop 520ms var(--ease) both;
}
.thanks__mark svg { width: 28px; height: 28px; stroke: var(--white); fill: none; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.steps { counter-reset: step; display: grid; gap: var(--sp-4); }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: var(--sp-3); align-items: start; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--ink-12);
  font-size: 12px; font-weight: 600;
}
.steps b { display: block; font-size: 14px; }
.steps span { font-size: 13.5px; color: var(--ink-70); }

/* ------------------------------- Pied de page ----------------------------- */

.footer { background: var(--ink); color: rgba(255, 255, 255, 0.72); padding-block: var(--sp-8) var(--sp-5); margin-top: var(--sp-8); }
.footer a { transition: color var(--fast); }
.footer a:hover { color: var(--accent); }
.footer__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer h4 { color: var(--white); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.footer li + li { margin-top: 9px; }
.footer__logo { color: var(--white); font-size: 17px; font-weight: 700; letter-spacing: 0.26em; }
.footer__social { display: flex; gap: 10px; margin-top: var(--sp-4); }
.footer__social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transition: all var(--fast);
}
.footer__social a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.footer__social svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.footer__legal { margin-top: var(--sp-7); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,0.12); font-size: 12px; display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; }

/* --------------------------------- Modale -------------------------------- */

.modal {
  position: fixed; inset: 0;
  z-index: 120;
  display: grid; place-items: center;
  padding: var(--sp-4);
  background: rgba(17, 17, 17, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity var(--slow);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__box {
  width: min(460px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.985);
  transition: transform var(--slow);
  text-align: center;
}
.modal.is-open .modal__box { transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; }
/* Down-sell glisse au bas de la fenetre de retention : une seule ligne. */
.exit-suggestion {
  display: block;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: var(--line);
  font-size: 13.5px;
  transition: color var(--fast);
}
.exit-suggestion .eyebrow { display: block; margin-bottom: 4px; }
.exit-suggestion:hover { color: var(--accent); }

.code-pill {
  display: inline-flex; align-items: center; gap: 10px;
  margin: var(--sp-4) 0;
  padding: 12px 18px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 17px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent-deep);
}

/* --------------------------------- Toasts -------------------------------- */

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 140; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 280ms var(--ease) both;
}
.toast--error { background: var(--danger); }
.toast--success { background: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Barre d'achat mobile : le CTA ne disparait jamais du champ de vision. */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 10px clamp(16px, 4vw, 40px) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: var(--line);
  transform: translateY(102%);
  transition: transform var(--slow);
}
.sticky-buy.is-on { transform: none; }
@media (min-width: 940px) { .sticky-buy { display: none; } }
