/* =============================================================
   PROJET : APPSTORE — Boutique en ligne (Front-end uniquement)
   Style  : "catalogue technique" — fond gris-bleu froid, encre
            navy, une seule couleur vive (bleu cobalt), bordures
            fines (hairlines) valant ombres, typographie Archivo +
            IBM Plex Sans.
   AUTEUR : GOHOUROU NANONDRE ARTHUR OTHNIEL (Front-end, L2 Info)
   NOTES  : Mobile-first · Accessibilité WCAG AA · Échelle base-8
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Palette froide : navy pour l'encre, cobalt pour l'action */
  --clr-primary: #0b57d0; /* bleu cobalt : boutons / actions */
  --clr-primary-dark: #0842a0;
  --clr-accent: #8ab4f8; /* bleu clair : détails sur fonds navy */
  --clr-ink: #0b1b33; /* texte principal (navy profond) */
  --clr-ink-soft: #344b66;
  --clr-muted: #64748e;
  --clr-canvas: #f3f5f9; /* fond général (gris-bleu froid) */
  --clr-card: #ffffff;
  --clr-line: #d9e0ea; /* hairlines froides */
  --clr-success: #0e8345;
  --clr-success-soft: #e8f5ee;
  --clr-danger: #c22026;
  --clr-danger-soft: #fce9ea;
  --clr-info: #1b6ef3;

  /* Pastilles de fond des cartes produits (teintes froides) */
  --chip-paper: #e3ebfa;
  --chip-lilac: #ebe9fa;
  --chip-mint: #e0f3ec;

  /* Typographie : Archivo (titres, serrée) + IBM Plex Sans (texte) */
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;

  /* Échelle base-8 */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;

  /* Rayons : 10px contrôles, 14px cartes, 22px grands visuels */
  --r-ctrl: 10px;
  --r-card: 14px;
  --r-blob: 22px;

  /* Ombres : discretes, teinte froid — la structure vient des bordures */
  --sh-ctrl: 0 1px 2px rgba(11, 27, 51, 0.06);
  --sh-card: 0 2px 4px rgba(11, 27, 51, 0.05);
  --sh-pop: 0 12px 24px rgba(11, 27, 51, 0.14);

  /* Courbes d'easing : décélération nette (UI) + façon iOS (drawers) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);

  --h-header: 64px;
}

/* L'en-tête passe à 72px sur grand écran — défini sur :root pour que
   la sous-barre admin (sticky top = --h-header) suive exactement. */
@media (min-width: 48em) {
  :root {
    --h-header: 72px;
  }
}

/* ---------- 2. Reset léger ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-canvas);
  color: var(--clr-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Sélection de texte à la couleur de la marque */
::selection {
  background: var(--clr-primary);
  color: #fff;
}

/* Les liens héritent de la couleur du texte : pas de bleu souligné
   par défaut du navigateur. L'apparence (hover, soulignement) reste
   définie composant par composant en dessous. */
a {
  color: inherit;
  text-decoration: none;
}

main {
  flex: 1;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Focus visible systématique (jamais outline:none sans remplacement) */
:focus-visible {
  outline: 3px solid var(--clr-info);
  outline-offset: 2px;
}

/* Skip-link : accès direct au contenu principal */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--clr-ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 0 0 var(--r-ctrl) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- 3. Utilitaires ---------- */
.container {
  width: min(1120px, 100% - 2 * var(--sp-4));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* L'attribut hidden doit toujours gagner sur les styles d'affichage */
[hidden] {
  display: none !important;
}

/* ---------- 4. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px; /* cible tactile ≥ 44px */
  padding: var(--sp-2) var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-ctrl);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease-out), background-color 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--clr-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--clr-primary-dark);
}

.btn--outline {
  background: #fff;
  border-color: var(--clr-line);
  color: var(--clr-ink);
}
.btn--outline:hover {
  background: var(--clr-ink);
  border-color: var(--clr-ink);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--clr-ink-soft);
}
.btn--ghost:hover {
  background: rgba(11, 27, 51, 0.06);
}

.btn--danger {
  background: var(--clr-danger-soft);
  color: var(--clr-danger);
}
.btn--danger:hover {
  background: var(--clr-danger);
  color: #fff;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- 5. En-tête ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--clr-line);
}

.header__inner {
  height: var(--h-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--clr-ink);
  text-decoration: none;
  letter-spacing: -0.04em;
}
.logo span {
  color: var(--clr-primary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--clr-ink);
  transition: background-color 0.15s ease, transform 0.15s var(--ease-out);
  touch-action: manipulation;
}
.icon-btn:hover {
  background: rgba(11, 27, 51, 0.06);
}

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--clr-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Navigation : cachée sur mobile, hamburger obligatoire */
.nav {
  display: none;
}

.nav__list {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
  padding: 0;
}

.nav a {
  color: var(--clr-ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: var(--sp-2) 0;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--clr-primary);
}

/* Menu mobile (drawer gauche) */
.drawer-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
}
.drawer-nav[data-open="true"] {
  visibility: visible;
}

.drawer-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 51, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 0;
  width: 100%;
  cursor: pointer;
}
.drawer-nav[data-open="true"] .drawer-nav__backdrop {
  opacity: 1;
}

.drawer-nav__panel {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: min(300px, 84vw);
  background: #fff;
  padding: var(--sp-5) var(--sp-4);
  /* sortie plus rapide que l'entrée (les sorties sont discrètes) */
  transform: translateX(-100%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overscroll-behavior: contain;
  overflow-y: auto;
}
.drawer-nav[data-open="true"] .drawer-nav__panel {
  transform: translateX(0);
  transition: transform 0.3s var(--ease-ios);
}

.drawer-nav__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--sp-1);
}
.drawer-nav__list a {
  display: block;
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--r-ctrl);
  color: var(--clr-ink);
  font-weight: 600;
  text-decoration: none;
}
.drawer-nav__list a:hover {
  background: rgba(11, 87, 208, 0.08);
  color: var(--clr-primary);
}

/* ---------- 6. Héro (accueil) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-7);
}

.hero__grid {
  display: grid;
  gap: var(--sp-6);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--clr-primary);
}

.hero__text {
  color: var(--clr-ink-soft);
  max-width: 42ch;
  margin-top: var(--sp-4);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.hero__visual {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center; /* la vignette carrée reste centrée (mobile inclus) */
}

/* Grand visuel de la vedette : panneau bleu pâle arrondi, maille
   technique de points en arrière-plan (identité "catalogue pro") */
.hero__rays {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.hero__rays::before,
.hero__rays::after {
  content: "";
  grid-area: 1 / 1;
  width: min(88%, 400px);
  aspect-ratio: 1;
  border-radius: var(--r-blob);
  background-color: var(--chip-paper);
  background-image: radial-gradient(
    var(--clr-line) 1.2px,
    transparent 1.2px
  );
  background-size: 18px 18px;
  background-position: 4px 4px;
}
.hero__rays::after {
  width: min(100%, 460px);
  border-radius: var(--r-blob);
  background: transparent;
  border: 1px solid var(--clr-line);
  background-image: none;
  z-index: -1;
}

/* Carte info flottante à droite du héro (façon maquette) */
.hero__aside {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-2);
  justify-items: start;
  width: min(100%, 300px);
  margin: var(--sp-4) var(--sp-3) 0;
  padding: var(--sp-4);
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}

@media (min-width: 64em) {
  .hero__aside {
    position: absolute;
    right: 0;
    bottom: var(--sp-4);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    padding: var(--sp-4);
    border-radius: var(--r-card);
    box-shadow: var(--sh-card);
  }
}

.hero__price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.swatches {
  display: flex;
  gap: var(--sp-2);
}
.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: var(--sh-ctrl);
}

.hero__rating {
  display: grid;
  gap: var(--sp-1);
  font-size: 0.9rem;
  color: var(--clr-ink-soft);
}
.hero__rating strong {
  font-size: 1.15rem;
  color: var(--clr-ink);
}

/* Bandeau réassurance sous le héro */
.strip {
  display: grid;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-block: 1px solid var(--clr-line);
  margin-block: var(--sp-5) var(--sp-6);
}
.strip__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.92rem;
  color: var(--clr-ink-soft);
}
.strip__item svg {
  flex: none;
  color: var(--clr-primary);
}
.strip__item strong {
  display: block;
  color: var(--clr-ink);
  font-size: 0.98rem;
}

/* ---------- 7. Catalogue ---------- */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-head a {
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.section-head a:hover {
  text-decoration: underline;
}

/* Barre filtres : recherche + chips catégories */
.toolbar {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.search {
  position: relative;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  color: var(--clr-muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  font-size: 16px; /* évite l'auto-zoom iOS */
  min-height: 48px;
  padding: 0 var(--sp-4) 0 44px;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-ctrl);
  background: #fff;
}
.search input:focus {
  border-color: var(--clr-primary);
}

.chips {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-1);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  min-height: 40px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--clr-line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--clr-ink-soft);
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, color 0.15s ease,
    background-color 0.15s ease;
  touch-action: manipulation;
}
.chip:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}
.chip[aria-pressed="true"] {
  background: var(--clr-ink);
  border-color: var(--clr-ink);
  color: #fff;
}

/* Grille produits */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* mobile-first : 2 colonnes */
  gap: var(--sp-4);
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--clr-card);
  border-radius: var(--r-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--clr-ink);
  border: 1px solid var(--clr-line);
  transition: transform 0.18s var(--ease-out), border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: #b3cbf1;
  box-shadow: var(--sh-card);
}
.product-card:focus-visible {
  outline: 3px solid var(--clr-info);
  outline-offset: 2px;
}

/* Zone image : carrée, hauteur uniforme pour toute la grille.
    - photo réelle (balise img) : plein cadre, léger zoom au survol
    - icône SVG de secours : centrée sur la pastille, comme la maquette */
.product-card__thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: var(--sp-5) var(--sp-3) var(--sp-2);
  background: var(--thumb-bg, var(--chip-paper));
}
.product-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease-out);
}
.product-card:hover .product-card__thumb img {
  transform: scale(1.035);
}

/* Icônes SVG monochromes (repli élégant, sans émoji) */
.icone-produit {
  display: block;
  color: var(--clr-ink-soft);
  aspect-ratio: 1;
  height: auto;
}
.icone-produit--card {
  width: 58%;
  max-width: 92px;
  filter: drop-shadow(0 10px 12px rgba(11, 27, 51, 0.16));
}
.icone-produit--mini {
  width: 44%;
  max-width: 52px;
}
.icone-produit--pdp {
  width: min(52%, 280px);
  filter: drop-shadow(0 20px 26px rgba(11, 27, 51, 0.18));
}
.icone-produit--hero {
  width: min(58%, 260px);
  color: var(--clr-ink);
  filter: drop-shadow(0 24px 32px rgba(11, 27, 51, 0.22));
}

.product-card__body {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  display: grid;
  gap: var(--sp-1);
}
.product-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-muted);
}
.product-card__name {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* hauteur fixe 2 lignes : les prix de la grille restent alignés */
  min-height: 2.6em;
}
.product-card__price {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: var(--sp-1);
}

/* bouton "+" circulaire à droite du prix (comme la maquette) */
.product-card__add {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: var(--sh-card);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--clr-ink);
  transition: background-color 0.15s ease, color 0.15s ease,
    transform 0.15s var(--ease-out);
  touch-action: manipulation;
}
.product-card__add:hover {
  background: var(--clr-primary);
  color: #fff;
}
.product-card__add:active {
  transform: scale(0.94);
}

.product-card__stock {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--clr-success-soft);
  color: var(--clr-success);
}
.product-card__stock--out {
  background: var(--clr-danger-soft);
  color: var(--clr-danger);
}

/* Favoris : bouton cœur en haut à droite de la vignette */
.icon-btn[data-lien-favoris] svg {
  width: 20px;
  height: 20px;
}

.fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(11, 27, 51, 0.14);
  display: grid;
  place-items: center;
  color: var(--clr-ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, color 0.15s ease;
}
.fav-btn svg {
  width: 17px;
  height: 17px;
  transition: fill 0.15s ease;
}
.fav-btn:hover {
  transform: scale(1.1);
  color: #e11d48;
}
.fav-btn[aria-pressed="true"],
.fav-btn--actif {
  color: #e11d48;
}
.fav-btn[aria-pressed="true"] svg,
.fav-btn--actif svg {
  fill: currentColor;
}

/* Fiche produit : bouton « Ajouter aux favoris » (cœur + libellé) */
.fav-fiche {
  color: #e11d48;
  border-color: #fac7d1;
}
.fav-fiche:hover:not(:disabled) {
  background: #fff1f4;
  border-color: #e11d48;
  color: #e11d48;
}
.fav-fiche svg {
  fill: none;
  width: 17px;
  height: 17px;
  flex: none;
}
.fav-fiche.fav-btn--actif svg {
  fill: currentColor;
}

.product-card--out .product-card__thumb img,
.product-card--out .product-card__thumb .icone-produit {
  opacity: 0.4;
  filter: grayscale(1);
}

/* Mini-cartes du héro (3 produits en vedette, façon maquette) */
.product-grid--mini {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  max-width: 430px;
  margin-top: var(--sp-6);
}
.product-card--mini .product-card__cat,
.product-card--mini .product-card__name {
  display: none;
}
/* les mini-cartes du héro restent sobres : pas de chip stock ni cœur */
.product-card--mini .product-card__stock,
.product-card--mini .fav-btn {
  display: none;
}
.product-card--mini .product-card__body {
  /* 2.75rem en bas : laisse la place au bouton « + » sans toucher le prix */
  padding: 0 var(--sp-3) 2.75rem;
}
.product-card--mini .product-card__thumb {
  padding: var(--sp-4) var(--sp-2) var(--sp-2);
}
/* mini-vignettes du héro : photo plein cadre (zoom inutile) ou icône réduite */
.product-card--mini .product-card__thumb img {
  transition: none;
}
.product-card--mini .product-card__thumb .icone-produit {
  width: 44%;
  max-width: 52px;
}
.product-card--mini .product-card__price {
  margin-top: 0;
  text-align: center;
  font-size: 0.85rem;
}
.product-card--mini .product-card__add {
  width: 32px;
  height: 32px;
  right: 10px;
  bottom: 10px;
}

/* État vide du catalogue */
.empty {
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
  color: var(--clr-muted);
  background: #fff;
  border: 1px dashed var(--clr-line);
  border-radius: var(--r-card);
}
.empty strong {
  display: block;
  color: var(--clr-ink);
  font-size: 1.05rem;
  margin-bottom: var(--sp-1);
}

/* ---------- 8. Fiche produit ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: 0.85rem;
  color: var(--clr-muted);
  padding-block: var(--sp-4);
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--clr-primary);
}
.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: var(--sp-2);
}

.pdp {
  display: grid;
  gap: var(--sp-5);
  padding-bottom: var(--sp-6);
}

.pdp__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--thumb-bg, var(--chip-lilac));
  border-radius: var(--r-card);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: var(--sp-6);
}
.pdp__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* photo réelle : remplit le carré sans déformation */
  object-position: 68% 50%; /* centre le sujet (photo paysagère) */
}

/* Visuel du héro vedette : photo réelle (statique, nette) */
#hero-produit {
  position: relative;
  z-index: 1;
  margin: auto;
  width: min(80%, 380px);
  aspect-ratio: 1;
  border-radius: var(--r-blob);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(11, 27, 51, 0.18);
  display: grid;
  place-items: center;
  background: var(--chip-paper);
}
#hero-produit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* photo réelle : remplit le panneau carré */
  object-position: 68% 50%; /* centre le sujet (photo paysagère) */
}

.pdp__info {
  display: grid;
  gap: var(--sp-4);
  align-content: start;
}

.pdp__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.pdp__price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.pdp__badge {
  justify-self: start;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--clr-success-soft);
  color: var(--clr-success);
}
.pdp__badge--out {
  background: var(--clr-danger-soft);
  color: var(--clr-danger);
}

.pdp__desc {
  color: var(--clr-ink-soft);
}

.pdp__specs {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
  border-top: 1px solid var(--clr-line);
  padding-top: var(--sp-4);
}
.pdp__specs li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 0.92rem;
}
.pdp__specs dt {
  color: var(--clr-muted);
}
.pdp__specs dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-ctrl);
  background: #fff;
  overflow: hidden;
}
.qty__btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  touch-action: manipulation;
}
.qty__btn:hover {
  background: rgba(11, 27, 51, 0.06);
}
.qty__val {
  width: 44px;
  text-align: center;
  font-weight: 700;
}

.qty-suffix {
  margin-left: var(--sp-3);
  color: var(--clr-muted);
  font-size: 0.88rem;
}

/* Variante compacte du sélecteur de quantité (tiroir latéral) */
.cart-line .qty {
  margin-top: var(--sp-2);
  width: max-content;
}
.qty--compact .qty__btn {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
}
.qty--compact .qty__val {
  width: 30px;
  font-size: 0.9rem;
}
.qty__btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.qty__btn:disabled:hover {
  background: transparent;
}

/* ---------- 9. Panier / drawer & page dédiée ---------- */
/* Drawer latéral (mini-panier) */
.drawer-cart {
  position: fixed;
  inset: 0;
  z-index: 70;
  visibility: hidden;
}
.drawer-cart[data-open="true"] {
  visibility: visible;
}

.drawer-cart__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 51, 0.45);
  border: 0;
  width: 100%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.drawer-cart[data-open="true"] .drawer-cart__backdrop {
  opacity: 1;
}

.drawer-cart__panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(400px, 92vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  overscroll-behavior: contain;
}
.drawer-cart[data-open="true"] .drawer-cart__panel {
  transform: translateX(0);
  transition: transform 0.3s var(--ease-ios);
}

.drawer-cart__head,
.drawer-cart__foot {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--clr-line);
}
.drawer-cart__foot {
  border-bottom: 0;
  border-top: 1px solid var(--clr-line);
  display: grid;
  gap: var(--sp-3);
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
}

.drawer-cart__list {
  flex: 1;
  list-style: none;
  padding: var(--sp-4);
  margin: 0;
  overflow-y: auto;
  display: grid;
  gap: var(--sp-4);
  align-content: start;
}

/* Ligne de panier (drawer + page) */
.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
}
.cart-line__thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--r-ctrl);
  background: var(--thumb-bg, var(--chip-paper));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cart-line__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* photo réelle : occupe toute la vignette */
}
.cart-line__thumb .icone-produit {
  width: 36px;
}
.cart-line__name {
  font-weight: 600;
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-line__price {
  font-size: 0.85rem;
  color: var(--clr-ink-soft);
}
.cart-line__right {
  display: grid;
  gap: var(--sp-2);
  justify-items: end;
}
.cart-line__total {
  font-weight: 700;
  font-size: 0.95rem;
}

.line-remove {
  border: 0;
  background: transparent;
  color: var(--clr-danger);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-ctrl);
  transition: background-color 0.15s ease;
  touch-action: manipulation;
}
.line-remove:hover {
  background: var(--clr-danger-soft);
}

/* Page panier */
.cart-summary {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-3);
  align-self: start;
  position: sticky;
  top: calc(var(--h-header) + var(--sp-4));
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 0.94rem;
  color: var(--clr-ink-soft);
}
.summary-row--total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-ink);
  border-top: 1px solid var(--clr-line);
  padding-top: var(--sp-3);
  margin-top: var(--sp-1);
}

.cart-layout {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-5) var(--sp-6);
}
.cart-list {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  padding: var(--sp-4);
  display: grid;
  gap: var(--sp-4);
}

/* ---------- 10. Formulaire de commande ---------- */
.checkout {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-5) var(--sp-7);
}

.stepper {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  list-style: none;
  padding: var(--sp-3) 0 0;
  margin: 0;
  overflow-x: auto;
}
.stepper li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  color: var(--clr-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.stepper li[aria-current="step"] {
  color: var(--clr-primary);
}
.stepper li[aria-current="step"] .stepper__dot {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}
.stepper__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--clr-line);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: #fff;
}
.stepper li::after {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--clr-line);
  margin-inline: var(--sp-1);
}
.stepper li:last-child::after {
  display: none;
}

.form-card {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-4);
}
.form-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.field {
  display: grid;
  gap: 6px;
}
.field > label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-size: 0.8rem;
  color: var(--clr-muted);
}

.field input,
.field select,
.field textarea {
  min-height: 48px;
  font-size: 16px; /* anti auto-zoom iOS */
  padding: 0 var(--sp-4);
  border: 1px solid var(--clr-line);
  border-radius: var(--r-ctrl);
  background: #fff;
  width: 100%;
}
.field textarea {
  padding: var(--sp-3) var(--sp-4);
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--clr-primary);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--clr-danger);
}

.error-msg {
  color: var(--clr-danger);
  font-size: 0.8rem;
  font-weight: 600;
  display: none;
}
.error-msg[data-show="true"] {
  display: block;
}

.form-row {
  display: grid;
  gap: var(--sp-4);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: flex-start;
}

.pay-note {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-ctrl);
  background: var(--clr-success-soft);
  color: var(--clr-success);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Récapitulatif */
.recap {
  display: grid;
  gap: var(--sp-3);
}
.recap__lines {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}
.recap__line {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 0.94rem;
}
.recap__line span:last-child {
  font-weight: 700;
  white-space: nowrap;
}

/* Confirmation */
.confirm-hero {
  text-align: center;
  padding: var(--sp-7) var(--sp-4);
  display: grid;
  justify-items: center;
  gap: var(--sp-4);
}
.confirm-hero__icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--clr-success-soft);
  color: var(--clr-success);
  display: grid;
  place-items: center;
}
.confirm-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  letter-spacing: -0.02em;
}
.confirm-hero p {
  color: var(--clr-ink-soft);
  max-width: 46ch;
}
.order-ref {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  background: #fff;
  border: 1px dashed var(--clr-line);
  border-radius: var(--r-ctrl);
  padding: var(--sp-3) var(--sp-5);
}

/* ---------- 11. Toasts & dialogs ---------- */
.toast-zone {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 90;
  display: grid;
  gap: var(--sp-2);
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: var(--clr-ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-ctrl);
  box-shadow: var(--sh-pop);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  animation: toast-in 0.25s ease;
  transition: opacity 0.2s ease;
}
.toast--success svg {
  color: #46d08b;
}
.toast--error svg {
  color: #f97066;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirm-dialog {
  border: 0;
  border-radius: var(--r-card);
  padding: var(--sp-5);
  max-width: 400px;
  width: calc(100vw - 32px);
  box-shadow: var(--sh-pop);
}
.confirm-dialog[open] {
  animation: dialog-in 0.2s var(--ease-out);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.confirm-dialog::backdrop {
  background: rgba(11, 27, 51, 0.5);
}
.confirm-dialog h2 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-2);
}
.confirm-dialog p {
  color: var(--clr-ink-soft);
  font-size: 0.92rem;
}
.confirm-dialog__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  margin-top: var(--sp-4);
}

/* ---------- 12. Pied de page ---------- */
.footer {
  background: var(--clr-ink);
  color: #b7b2c2;
  padding-block: var(--sp-6) max(var(--sp-6), env(safe-area-inset-bottom));
  margin-top: var(--sp-7);
}
.footer__grid {
  display: grid;
  gap: var(--sp-5);
}
.footer h2,
.footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: var(--sp-3);
}
.footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}
.footer a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer a:hover {
  color: var(--clr-accent);
}
.footer__brand p {
  font-size: 0.9rem;
  max-width: 34ch;
}
.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  font-size: 0.8rem;
  text-align: center;
}

/* =============================================================
   RESPONSIVE — Mobile-first, écrans plus grands ensuite
   ============================================================= */
@media (min-width: 48em) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  /* Header : les liens (desktop) */
  .header {
    --h-header: 72px;
  }
}

@media (min-width: 64em) {
  .nav {
    display: block;
  }

  #menu-btn {
    display: none;
  }

  .hero__grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  .hero {
    padding-block: var(--sp-7) var(--sp-7);
  }
  .hero__visual {
    min-height: 420px;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .toolbar {
    grid-template-columns: minmax(260px, 1fr) minmax(0, auto);
    align-items: center;
  }

  .pdp {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-7);
    align-items: start;
  }

  .cart-layout {
    grid-template-columns: 1fr 360px;
  }

  .checkout {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
  .checkout__recap {
    position: sticky;
    top: calc(var(--h-header) + var(--sp-4));
  }
  .checkout--full {
    grid-template-columns: minmax(0, 640px);
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================================
   ESPACES SPÉCIFIQUES : administration, livreur, client
   ============================================================= */

/* Sous-barre de rôle (admin / livreur) */
.admin-bar {
  background: var(--clr-ink);
  color: #fff;
  position: sticky;
  top: var(--h-header);
  z-index: 45;
}
.admin-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-bar__inner::-webkit-scrollbar {
  display: none;
}
.admin-bar__titre {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.admin-bar__titre svg {
  color: var(--clr-accent);
  flex: none;
}
.admin-bar__nav {
  display: flex;
  gap: var(--sp-2);
  margin-left: auto;
}
.admin-bar__nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}
.admin-bar__nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.admin-bar__nav a[aria-current="page"] {
  background: var(--clr-primary);
  color: #fff;
}

/* Titre de page commun */
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-block: var(--sp-5) var(--sp-5);
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-head p {
  color: var(--clr-muted);
  font-size: 0.9rem;
}

/* Puces de statut (cycle de vie d'une commande) */
.statut-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.statut-chip__point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.statut--attente {
  background: #fdf3df;
  color: #8a5a0b;
}
.statut--cours {
  background: var(--chip-paper);
  color: var(--clr-primary);
}
.statut--livree {
  background: var(--clr-success-soft);
  color: var(--clr-success);
}
.statut--annulee {
  background: var(--clr-danger-soft);
  color: var(--clr-danger);
}

/* Tableaux (scroll horizontal sur mobile, cartes côté back) */
.table-wrap {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.table th,
.table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--clr-line);
  vertical-align: middle;
}
.table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-muted);
  background: var(--clr-canvas);
  white-space: nowrap;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: rgba(11, 87, 208, 0.04);
}
.table .num {
  white-space: nowrap;
}
.table-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.row-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--r-ctrl);
  background: var(--thumb-bg, var(--chip-paper));
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}
.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* photo réelle : occupe toute la vignette */
}
.row-thumb .icone-produit {
  width: 24px;
}

/* Cartes KPI du tableau de bord */
.kpi-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(2, 1fr);
}
.kpi {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  padding: var(--sp-4);
  display: grid;
  gap: var(--sp-1);
  align-content: start;
}
.kpi svg {
  color: var(--clr-primary);
}
.kpi__valeur {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}
.kpi__libelle {
  color: var(--clr-muted);
  font-size: 0.82rem;
}

/* Timeline de suivi de commande */
.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}
.timeline li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--sp-3);
  padding-bottom: var(--sp-5);
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: 2px;
  width: 2px;
  background: var(--clr-line);
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li:last-child::before {
  display: none;
}
.timeline__point {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--clr-line);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clr-muted);
  position: relative;
  z-index: 1;
}
.timeline__titre {
  font-weight: 600;
  font-size: 0.95rem;
}
.timeline__desc {
  color: var(--clr-muted);
  font-size: 0.85rem;
}
.timeline__etape--fait .timeline__point {
  background: var(--clr-success);
  border-color: var(--clr-success);
  color: #fff;
}
.timeline__etape--actuel .timeline__point {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}
.timeline__etape--fait::before {
  background: var(--clr-success);
}

/* Onglets (connexion / inscription) */
.tabs {
  display: flex;
  gap: var(--sp-2);
  background: var(--clr-canvas);
  padding: var(--sp-1);
  border-radius: var(--r-ctrl);
  margin-bottom: var(--sp-5);
}
.tabs [role="tab"] {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: var(--r-ctrl);
  font-weight: 600;
  cursor: pointer;
  color: var(--clr-muted);
  transition: background-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
  touch-action: manipulation;
}
.tabs [role="tab"][aria-selected="true"] {
  background: #fff;
  color: var(--clr-ink);
  box-shadow: var(--sh-ctrl);
}

/* Grille de détail (suivi commande / livraison) */
.detail-grid {
  display: grid;
  gap: var(--sp-5);
  align-items: start;
}
@media (min-width: 64em) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr 380px;
  }
}

/* Bandeau d'information interne */
.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-ctrl);
  font-size: 0.9rem;
}
.notice--info {
  background: #e9f1fc;
  color: var(--clr-info);
}
.notice--warning {
  background: #fdf3df;
  color: #8a5a0b;
}
.notice svg {
  flex: none;
  margin-top: 2px;
}

/* Entrée fichier : sélection de la photo CNI (formulaire livreur) */
.form-card input[type="file"]::file-selector-button {
  padding: 10px 18px;
  margin-inline-end: 12px;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-ctrl);
  background: #eef2f9;
  color: var(--clr-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.form-card input[type="file"]::file-selector-button:hover {
  border-color: var(--clr-primary);
}
.form-card input[type="file"]::file-selector-button:focus-visible {
  outline: 3px solid var(--clr-info);
  outline-offset: 2px;
}
/* =============================================================
   Landing page (index.html) — sections de promotion.
   ============================================================= */
.hero__note {
  font-size: 0.9rem;
  color: var(--clr-muted);
}
.hero__note a {
  color: var(--clr-primary);
  font-weight: 600;
}

.section-foot {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-5);
}

/* ----- Univers ----- */
.univers {
  padding-block: var(--sp-7);
}
.univers__grid {
  display: grid;
  gap: var(--sp-4);
}
@media (min-width: 40em) {
  .univers__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 64em) {
  .univers__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.univers__card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: var(--sp-5) var(--sp-4);
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--r-card);
  color: var(--clr-ink);
  text-decoration: none;
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out);
}
.univers__card:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 87, 208, 0.4);
  box-shadow: 0 14px 30px rgba(11, 27, 51, 0.12);
}
.univers__icone {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-blob);
  background: #e9f1fd;
  color: var(--clr-primary);
}
.univers__nom {
  margin-top: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.univers__compte {
  font-size: 0.85rem;
  color: var(--clr-muted);
}
.univers__fleche {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clr-canvas);
  color: var(--clr-primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.univers__card:hover .univers__fleche {
  opacity: 1;
  transform: translateX(0);
}

/* ----- Vidéo de promotion ----- */
.promo {
  padding-block: var(--sp-6);
}
.promo-video {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-blob);
  overflow: hidden;
  background: var(--clr-ink);
  border: 1px solid rgba(11, 27, 51, 0.08);
  box-shadow: 0 30px 70px rgba(11, 27, 51, 0.18);
}
.promo-video video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--clr-ink);
}
/* Affiche + bouton de lecture : aucun octet vidéo avant le clic. */
.promo-video__lancer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 0;
  background:
    radial-gradient(ellipse 66% 70% at 50% 48%, rgba(11, 27, 51, 0.68) 0%, rgba(11, 27, 51, 0.4) 52%, rgba(11, 27, 51, 0.04) 100%);
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}
.promo-video__lancer:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}
.promo-video__play {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.22), 0 18px 40px rgba(11, 27, 51, 0.35);
  transition: transform 0.25s var(--ease-out), background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.promo-video__play svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}
.promo-video__lancer:hover .promo-video__play {
  transform: scale(1.06);
  background: #fff;
  color: var(--clr-primary);
}
.promo-video__legende {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(11, 27, 51, 0.75), 0 4px 18px rgba(11, 27, 51, 0.55);
}
.promo-video__meta {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 27, 51, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}
/* Pendant le chargement, le bouton pulse doucement. */
.promo-video--chargement .promo-video__play {
  animation: promo-attente 1s ease-in-out infinite;
}
@keyframes promo-attente {
  50% {
    transform: scale(0.94);
    opacity: 0.65;
  }
}
/* Lecture lancée : l'affiche s'efface, les contrôles natifs prennent le relais. */
.promo-video--lecture .promo-video__lancer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* Autoplay silencieux : bouton pour rétablir le son. */
.promo-video__son {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(11, 27, 51, 0.82);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(11, 27, 51, 0.28);
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.promo-video__son[hidden] {
  display: none;
}
.promo-video__son:hover {
  background: var(--clr-primary);
  transform: translateY(-1px);
}
.promo-video__son:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.promo-video__son svg {
  width: 17px;
  height: 17px;
  flex: none;
}
@media (max-width: 640px) {
  .promo-video__lancer {
    gap: var(--sp-2);
    padding: var(--sp-4);
  }
  .promo-video__son {
    top: 8px;
    right: 8px;
    padding: 7px 11px;
    font-size: 0.72rem;
  }
  .promo-video__son svg {
    width: 15px;
    height: 15px;
  }
  .promo-video__play {
    width: 62px;
    height: 62px;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.2), 0 14px 30px rgba(11, 27, 51, 0.32);
  }
  .promo-video__play svg {
    width: 25px;
    height: 25px;
  }
  .promo-video__legende {
    font-size: 1rem;
  }
  .promo-video__meta {
    font-size: 0.72rem;
  }
}

/* ----- Bandeau d'appel à l'inscription ----- */
.cta-band {
  display: grid;
  gap: var(--sp-5);
  padding: clamp(1.75rem, 4.5vw, 3.25rem);
  border-radius: var(--r-blob);
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(140deg, var(--clr-primary-dark), var(--clr-primary));
  color: #fff;
  box-shadow: 0 26px 60px rgba(8, 66, 160, 0.35);
  margin-block: var(--sp-6);
}
@media (min-width: 56em) {
  .cta-band {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
  }
  .cta-band__actions {
    justify-content: flex-end;
  }
}
.cta-band__titre {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  max-width: 30ch;
}
.cta-band__texte p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 56ch;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
/* Boutons inversés sur fond bleu */
.btn.btn--blanc {
  background: #fff;
  color: var(--clr-primary);
  border: 1px solid #fff;
}
.btn.btn--blanc:hover {
  background: #f3f7ff;
}
.btn.btn--contour-blanc {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.btn.btn--contour-blanc:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* =============================================================
   Pages d'authentification — style « vitrine scindée » :
   panneau illustré à gauche, formulaire épuré à droite.
   ============================================================= */
.auth-main {
  min-height: calc(100vh - var(--h-header));
  padding-block: var(--sp-6) var(--sp-7);
}

.auth-sheet {
  display: grid;
  max-width: 1100px;
  margin: var(--sp-2) auto 0;
  background: #fff;
  border: 1px solid rgba(11, 27, 51, 0.06);
  border-radius: var(--r-blob);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(11, 27, 51, 0.14), 0 8px 24px rgba(11, 27, 51, 0.07);
}
@media (min-width: 56em) {
  .auth-sheet {
    grid-template-columns: 47% 53%;
    min-height: 650px;
  }
}

/* ----- Panneau vitrine (gauche) ----- */
.auth-visual {
  position: relative;
  display: none;
  gap: var(--sp-5);
  align-content: center;
  padding: clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(rgba(11, 87, 208, 0.06) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(160deg, #eff3fb, #e2e9f6);
}
@media (min-width: 56em) {
  .auth-visual {
    display: grid;
  }
}

.auth-scene {
  position: relative;
  padding: 30px 34px 40px 46px;
}
.auth-mock {
  position: relative;
  background: #fff;
  border: 1px solid rgba(11, 27, 51, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(11, 27, 51, 0.15);
}
.auth-mock__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf0f6;
}
.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mock-dot--r { background: #f6c1ba; }
.mock-dot--o { background: #f3deae; }
.mock-dot--g { background: #b3dfc0; }
.mock-url {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #eff2f8;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--clr-muted);
  letter-spacing: 0.02em;
}
.auth-mock__body {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 14px;
}
.auth-mock__side {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px 8px;
  background: #f6f8fc;
  border-radius: 10px;
}
.mock-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
}
.mock-bar {
  height: 8px;
  border-radius: 4px;
  background: #dfe5f0;
}
.mock-bar--court { width: 62%; }
.auth-mock__content {
  display: grid;
  gap: 12px;
  align-content: start;
}
.mock-search {
  height: 10px;
  border-radius: 999px;
  background: #eef1f7;
  border: 1px solid #e2e7f1;
}
.mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mock-tile {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid #eceff6;
  border-radius: 10px;
  box-shadow: var(--sh-card);
}
.mock-tile__img {
  height: 46px;
  border-radius: 8px;
}
.mock-tile__img--1 { background: linear-gradient(135deg, #cfe0fb, #8ab4f8); }
.mock-tile__img--2 { background: linear-gradient(135deg, #17223a, #0b57d0); }
.mock-tile__img--3 { background: linear-gradient(135deg, #e4e9f5, #c3d2ef); }
.mock-tile__img--4 { background: linear-gradient(135deg, #b7c9ee, #7fa3e8); }
.mock-tile__bar {
  width: 70%;
  height: 7px;
  border-radius: 4px;
  background: #e4e9f2;
}

/* Éléments flottants décoratifs */
.auth-float {
  position: absolute;
  display: grid;
  place-items: center;
}
.auth-float--check {
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 26px rgba(20, 120, 60, 0.18), 0 0 0 10px rgba(52, 199, 89, 0.08);
}
.auth-float--colis {
  top: 52%;
  left: -14px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(11, 87, 208, 0.18);
}
.auth-float--ring {
  bottom: 6px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 5px solid #c3d2ef;
  background: transparent;
}
.auth-float--sq {
  top: 18px;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--clr-primary);
}
.auth-float--sq2 {
  bottom: 30px;
  right: -18px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 2.5px solid var(--clr-accent);
}
.auth-visual__titre {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
}
.auth-visual__texte {
  color: var(--clr-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 34ch;
}

/* ----- Panneau formulaire (droite) ----- */
.auth-panel {
  display: grid;
  gap: var(--sp-4);
  align-content: center;
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.25rem, 4.5vw, 4rem);
}
.auth-logo {
  justify-self: center;
  color: var(--clr-ink);
  font-size: 1.5rem;
}
.tabs--auth {
  margin: 0 auto;
  background: #eff2f8;
  padding: 4px;
  border-radius: 12px;
  min-width: min(100%, 300px);
}
.tabs--auth [role="tab"] {
  min-height: 40px;
  padding: 0 var(--sp-4);
}
.form-card--auth {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  grid-auto-rows: min-content;
}
.auth-panel form > .field > label {
  font-size: 0.85rem;
}
.auth-panel form > .field > input {
  min-height: 46px;
}

.btn--google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  border: 1px solid #b9cdf6;
  border-radius: var(--r-ctrl);
  background: #f7faff;
  color: var(--clr-ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.btn--google:hover {
  border-color: var(--clr-primary);
  box-shadow: 0 2px 10px rgba(11, 87, 208, 0.12);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--clr-muted);
  font-size: 0.78rem;
  font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--clr-line);
}

.auth-consent {
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 10px;
}

.form-card--auth .line-remove {
  align-self: start;
  font-size: 0.85rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--clr-primary);
  font-weight: 600;
  transition: color 0.15s var(--ease-out);
}
.form-card--auth .line-remove:hover {
  color: var(--clr-primary-dark);
  text-decoration: underline;
}

.auth-notice {
  font-size: 0.78rem;
  padding: 10px 12px;
}

.auth-switch {
  text-align: center;
  font-size: 0.88rem;
  color: var(--clr-muted);
}
.auth-switch button {
  margin-left: 4px;
  color: var(--clr-primary);
  font-weight: 700;
  font-size: 0.88rem;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s var(--ease-out);
}
.auth-switch button:hover {
  color: var(--clr-primary-dark);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
