/* ==========================================================
   Boutique digitale — feuille de style unique
   Couleur d'accent : changer --accent pour tout le site.
   ========================================================== */
:root {
  --accent: #E4FF3A;
  --ink: #111111;
  --ink-hover: #444444;
  --muted: #5C5C58;
  --muted-2: #6B6B66;
  /* Texte courant long (Conditions, étapes Attente) — arbitrage D3 */
  --body: #3D3D3A;
  /* Sur fond ink : lien « Conditions » / survol du footer, texte secondaire */
  --dim-on-ink: #BDBDB8;
  --muted-on-ink: #D6D6D1;
  --line: #EAEAE6;
  --line-2: #DADAD5;
  --soft: #F4F4F1;
  --ground: #F6F6F3;
  --white: #FFFFFF;
  --pending: #F2A900;
  /* Bordure des contrôles de formulaire (champs, groupe tél., anneau radio inactif) : 3,5:1 sur blanc (WCAG 1.4.11) — D1 */
  --line-strong: #8A8A84;
  /* Rouge unique : erreurs, champ invalide, pastille du toast d'erreur — 6,5:1 sur blanc — D2 */
  --danger: #B3261E;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Échelle d'espacement (px) : à réutiliser dans les sections de page */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-7: 32px; --space-8: 48px; --space-9: 72px; --space-10: 96px;
  /* Rayons */
  --radius-sm: 12px; --radius-md: 16px; --radius-lg: 24px; --radius-pill: 999px;
  /* Cible tactile minimale */
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}
body.ground { background: var(--ground); }
/* width:100% : sinon margin:auto (.wrap, .center-col) fait prendre au <main> la largeur de son contenu et un mot long déborde */
body > main { flex: 1; width: 100%; }
/* anywhere (et non break-word) : un mot très long se coupe aussi dans un parent flex centré, sinon le titre déborde à 320 px */
h1, h2, h3 { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
/* Cible d'un lien d'évitement (main tabindex=-1) : pas d'anneau autour de toute la page */
main[tabindex="-1"]:focus { outline: none; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-hover); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
/* 16 px minimum : évite le zoom automatique d'iOS au focus.
   :where() = spécificité nulle, pour que .input-code (24/26 px) et les tailles de page s'appliquent. */
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-family: inherit; font-size: max(16px, 1em); }
[hidden] { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ico { flex: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-md { max-width: 1000px; }
.wrap-sm { max-width: 760px; }

/* ---------- En-tête ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: relative; z-index: 10; }
.site-header .wrap { padding-top: 20px; padding-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.brand-mark::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-link { font-size: 15px; font-weight: 500; padding: 12px 14px; min-height: var(--tap); display: inline-flex; align-items: center; gap: 8px; }
.nav-pill { font-weight: 600; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--ink); }
.header-note { font-size: 14px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.header-right { display: flex; align-items: center; gap: 8px; }

.header-mobile { display: none; gap: 4px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 12px; }
/* top +1px : le filet du header reste visible au-dessus du menu ouvert */
.mobile-menu { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 16px 20px; flex-direction: column; box-shadow: 0 16px 32px rgba(0,0,0,0.08); }
.mobile-menu a { font-size: 20px; font-weight: 600; padding: 14px 0; border-bottom: 1px solid #F0F0EC; }
.mobile-menu a.btn { margin-top: 16px; border-bottom: 0; font-size: 16px; padding: 16px; }
.mobile-menu.open { display: flex; }

/* Header tunnel (paiement, connexion) : flèche retour + titre en mobile (D5), masqués en desktop */
.header-back, .tunnel-title { display: none; }
/* Desktop : le logo garde sa zone tactile de 44 px sans gonfler le header (69 px comme la maquette tunnel) */
@media (min-width: 721px) {
  .site-header .brand { margin-block: -8px; }
}

/* ---------- Boutons ---------- */
.btn { background: var(--ink); color: var(--white); font-size: 16px; font-weight: 600; padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 48px; }
.btn:hover { color: var(--white); background: var(--ink-hover); }
.btn-lg { font-size: 17px; padding: 20px 28px; }
/* CTA des panneaux du tunnel (attente, confirmation, connexion) : 18 px comme les maquettes */
.panel .btn-lg { padding-top: 18px; padding-bottom: 18px; }
.btn-block { display: flex; width: 100%; }
/* Trait intérieur (et non bordure) : même hauteur que le bouton primaire */
.btn-outline { background: var(--white); color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-outline:hover { background: var(--soft); color: var(--ink); }
@media (forced-colors: active) { .btn-outline { border: 1px solid ButtonText; } }
.link-btn { background: none; border: 0; font-size: 15px; font-weight: 500; color: var(--ink); padding: 12px; min-height: var(--tap); cursor: pointer; text-align: center; }

/* ---------- Accueil ---------- */
.hero { padding-top: 88px; padding-bottom: 72px; }
.hero h1 { margin: 0; font-size: clamp(44px, 7vw, 88px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700; max-width: 900px; }
.hl { background: var(--accent); padding: 0 12px; border-radius: 12px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trust-item { display: flex; align-items: center; gap: 12px; padding: 22px 0; font-size: 15px; font-weight: 500; }

.products { padding-top: 72px; padding-bottom: 96px; scroll-margin-top: 16px; }
.products-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.products-head h2 { margin: 0; font-size: 36px; letter-spacing: -0.03em; font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 14px; font-weight: 600; padding: 12px 18px; min-height: 44px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: var(--white); color: var(--ink); flex: none; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-media { display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; position: relative; background: #F1F0EA; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 14px; left: 14px; max-width: calc(100% - 28px); background: var(--white); color: var(--ink); font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 13px; font-weight: 500; }
.card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.card-price { font-size: 17px; font-weight: 600; white-space: nowrap; }
.card .btn { font-size: 15px; padding: 14px 20px; }
.empty { color: var(--muted); padding: 24px 0; }

.site-footer { background: var(--ink); color: var(--white); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer .brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: center; min-height: var(--tap); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.footer-links a { color: var(--white); padding: 12px 0; min-height: var(--tap); display: inline-flex; align-items: center; }
.footer-links a.dim { color: var(--dim-on-ink); }
.footer-links a:hover { color: var(--dim-on-ink); }
.footer-links a.dim:hover { color: var(--white); }

/* ---------- Produit ---------- */
.product { padding-top: 48px; padding-bottom: 96px; }
.product-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.product-media { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.media-box { aspect-ratio: 16 / 10; border-radius: 24px; background: #F1F0EA; display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 14px; font-weight: 500; overflow: hidden; }
.media-box img { width: 100%; height: 100%; object-fit: cover; }
.video-box { aspect-ratio: 16 / 9; border-radius: 24px; background: var(--ink); color: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; border: 0; width: 100%; cursor: pointer; font-family: inherit; }
.video-box iframe { width: 100%; height: 100%; border: 0; }
.play { width: 72px; height: 72px; border-radius: 999px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.video-label { font-size: 15px; font-weight: 500; color: var(--muted-on-ink); }
.product-aside { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 24px; }
.tag { align-self: flex-start; background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.product-aside h1 { margin: 0; font-size: 44px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.price-lg { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.checklist { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.pay-logos { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-logos span { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; background: var(--soft); }

/* ---------- Cartes centrées (paiement, attente, confirmation, connexion) ---------- */
.page-pad { padding-top: 48px; padding-bottom: 96px; }
.center-col { max-width: 520px; margin: 0 auto; padding: 64px 24px 96px; }
.center-col.narrow { max-width: 460px; padding-top: 72px; }
.panel { background: var(--white); border-radius: 28px; padding: 48px 32px; display: flex; flex-direction: column; gap: 20px; }
.panel.centered { align-items: center; text-align: center; }
.panel.centered .btn { align-self: stretch; }
.panel h1 { margin: 0; font-size: 32px; letter-spacing: -0.03em; font-weight: 700; line-height: 1.1; }
.lead { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.5; }
.status-icon { width: 80px; height: 80px; border-radius: 999px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.status-icon.square { border-radius: 24px; background: var(--ink); color: var(--accent); }

.summary { margin: 0; align-self: stretch; border: 1px solid var(--line); border-radius: 18px; text-align: left; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; font-size: 15px; border-bottom: 1px solid var(--line); }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); }
.summary dt { flex: none; }
.summary dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.summary dd.strong { font-weight: 700; }
.pending { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
.pending::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--pending); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.order-line { align-self: stretch; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--ground); text-align: left; }
.order-thumb { width: 56px; height: 56px; border-radius: 12px; background: #F1F0EA; border: 1px solid #E4E3DC; flex: none; }
.order-line .name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 600; }
.order-line .ref { font-size: 13px; color: var(--muted); }

/* ---------- Formulaires ---------- */
.checkout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.form-card { flex: 999 1 520px; min-width: 0; background: var(--white); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.form-card h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .legend { font-size: 14px; font-weight: 600; }
.input { font-family: inherit; font-size: 16px; line-height: 20px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); min-height: 48px; width: 100%; max-width: 100%; background: var(--white); color: var(--ink); }
.input:hover { border-color: var(--ink); }
.input::placeholder { color: var(--muted-2); opacity: 1; }
.input:disabled, .input[readonly] { background: var(--soft); color: var(--muted); cursor: not-allowed; }
/* État invalide : bordure 2 px (pas seulement la couleur), padding réduit d'1 px pour ne rien décaler, focus rouge */
.input[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; padding: 13px 15px; }
.input[aria-invalid="true"]:focus { outline-color: var(--danger); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
select.input { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
input[type="checkbox"][aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }
.input-code { font-size: 24px; letter-spacing: 0.4em; text-align: center; min-height: 60px; }
.error { margin: 0; font-size: 13px; color: var(--danger); }
/* Région aria-live vide : reste rendue mais n'ajoute pas le gap de 8 px du .field */
.field > .error:empty { margin-top: -8px; }

/* Groupe téléphone partagé (paiement + connexion) : pastille d'indicatif dans le champ */
.tel-group { position: relative; display: flex; align-items: center; }
.tel-prefix { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); padding: 7px 10px; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; pointer-events: none; }
/* 6 px + 4,375rem = 76 px par défaut ; suit la pastille quand seul le texte est agrandi (WCAG 1.4.4) */
.tel-group .input { padding-left: calc(6px + 4.375rem); letter-spacing: 0.02em; }
.tel-group .input[aria-invalid="true"] { padding-left: calc(5px + 4.375rem); }
.tel-group .input.tel-intl, .tel-group .tel-prefix[hidden] + .input { padding-left: 16px; }
.tel-group .input.tel-intl[aria-invalid="true"], .tel-group .tel-prefix[hidden] + .input[aria-invalid="true"] { padding-left: 15px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0; margin-bottom: 10px; }
/* Verrou S1 : <fieldset disabled> qui enveloppe tous les contrôles d'un formulaire JS, activé par la
   page. Transparent pour la mise en page (display: contents) : ses enfants restent des éléments du
   flex de leur formulaire (espacement, CTA poussé en bas). Sans légende : aucun nom de groupe. */
.form-lock { display: contents; }
/* Message <noscript> : JavaScript requis (formulaires traités en JS seulement). */
.noscript-note { margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); font-size: 14px; line-height: 1.5; }
.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.method { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 56px; border-radius: 16px; cursor: pointer; background: var(--white); border: 2px solid var(--line); font-size: 15px; font-weight: 600; }
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method .ring { width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--line-strong); flex: none; }
.method:has(input:checked) { background: var(--ground); border-color: var(--ink); }
.method:has(input:checked) .ring { border: 5px solid var(--ink); }
.method:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.order-card { flex: 1 1 300px; min-width: 0; background: var(--white); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.order-card .media-box { aspect-ratio: 4 / 3; border-radius: 16px; font-size: 13px; }
.order-card .name { font-size: 17px; font-weight: 600; }
.total { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 700; }

/* ---------- Mes achats ---------- */
.library { padding-top: 40px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.purchases { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.purchases h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; font-weight: 700; }
.purchase { color: var(--ink); display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 64px; border-radius: 16px; cursor: pointer; border: 2px solid transparent; background: transparent; text-align: left; width: 100%; }
.purchase[aria-current="true"] { border-color: var(--ink); background: var(--white); }
.purchase .thumb { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.purchase .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.purchase .meta b { font-size: 15px; font-weight: 600; }
.purchase .meta span { font-size: 13px; color: var(--muted); }
.viewer { flex: 999 1 640px; min-width: 0; background: var(--white); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.viewer .video-box { border-radius: 18px; }
.viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.viewer-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; font-weight: 700; }
.progress { font-size: 14px; font-weight: 600; background: var(--ground); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.viewer-body { display: flex; flex-wrap: wrap; gap: 24px; }
.lessons { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.files { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.viewer h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lesson { color: var(--ink); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 48px; border-radius: 12px; cursor: pointer; border: 0; background: transparent; width: 100%; }
.lesson[aria-current="true"] { font-weight: 700; background: var(--ground); }
.lesson .num { font-size: 13px; font-weight: 600; width: 28px; color: var(--muted); text-align: left; }
.lesson .title { flex: 1; min-width: 0; overflow-wrap: anywhere; text-align: left; }
.lesson .dur { font-size: 13px; color: var(--muted); }
.file { display: flex; align-items: center; gap: 12px; padding: 14px; min-height: var(--tap); border-radius: 14px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.file:hover { background: var(--ground); }

/* ---------- Contact ---------- */
.contact { padding-top: 72px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.contact-cards { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-cards h1 { margin: 0 0 16px; font-size: 56px; line-height: 1; letter-spacing: -0.045em; font-weight: 700; }
.contact-card { border: 1px solid var(--line-2); border-radius: 24px; padding: 28px; display: flex; align-items: center; gap: 16px; }
.contact-card.dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.contact-card.dark:hover { color: var(--white); background: var(--ink-hover); }
.contact-card .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--soft); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.contact-card.dark .ic { background: var(--accent); }
.contact-card .t { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.contact-card .t b { font-size: 20px; font-weight: 700; }
.contact-card .t span { font-size: 15px; color: var(--muted); }
.contact-card.dark .t span { color: var(--muted-on-ink); }
.faq { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.faq h2 { margin: 0 0 16px; font-size: 28px; letter-spacing: -0.03em; font-weight: 700; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; background: none; border: 0; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 17px; font-weight: 600; cursor: pointer; text-align: left; }
.faq-q .sign { font-size: 24px; font-weight: 400; line-height: 1; }
.faq-a { margin: 0 0 22px; font-size: 16px; color: var(--muted); line-height: 1.5; }

/* ---------- Conditions ---------- */
.legal { padding-top: 72px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 40px; }
.legal-head { display: flex; flex-direction: column; gap: 12px; }
.legal-head h1 { margin: 0; font-size: 48px; line-height: 1; letter-spacing: -0.04em; font-weight: 700; }
.legal-head span { font-size: 14px; color: var(--muted); }
.legal section { display: flex; flex-direction: column; gap: 10px; padding-top: 32px; border-top: 1px solid var(--line); }
.legal h2 { margin: 0; font-size: 20px; font-weight: 700; }
.legal p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }

/* ---------- 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 96px 24px; text-align: center; }
.big404 { font-size: clamp(120px, 22vw, 240px); line-height: 0.85; letter-spacing: -0.06em; font-weight: 700; }
.big404 span { background: var(--accent); border-radius: 32px; padding: 0 12px; }
.notfound h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; font-weight: 700; }

/* ==========================================================
   Mobile (maquettes 390 px)
   ========================================================== */
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-header .wrap { padding-top: 12px; padding-bottom: 12px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark::after { width: 9px; height: 9px; }
  .site-header .nav.collapsible { display: none; }
  .header-mobile { display: flex; }

  /* Header tunnel .has-back (paiement, connexion) : retour · titre · cadenas, logo masqué (D5) */
  .site-header.has-back .wrap { padding: 12px 8px; }
  .site-header.has-back .brand, .site-header.has-back .nav-link { display: none; }
  .header-back { display: inline-flex; }
  .tunnel-title { display: block; font-size: 16px; font-weight: 700; }
  .site-header.has-back .header-note { width: 44px; height: 44px; justify-content: center; }
  .site-header.has-back .header-note svg { width: 20px; height: 20px; }
  .site-header.has-back .header-note-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .hero { padding-top: 40px; padding-bottom: 32px; }
  .hero h1 { font-size: clamp(36px, 12vw, 46px); line-height: 1; }
  .hl { padding: 0 8px; border-radius: 10px; }
  .hero .actions { margin-top: 28px; }
  .hero .actions .btn { width: 100%; padding: 16px 24px; }

  .trust { border: 0; }
  .trust .wrap { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .trust-item { flex: none; font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 999px; background: var(--soft); gap: 8px; }
  .trust-item svg { width: 16px; height: 16px; }

  .products { padding-top: 40px; padding-bottom: 48px; }
  .products-head { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 20px; }
  .products-head h2 { font-size: 28px; }
  /* 4 px en haut et en bas : l'anneau de focus des chips (2 px + décalage 2 px) n'est pas rogné par le défilement */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: -4px -16px; padding: 4px 16px; scrollbar-width: none; }
  .chip { padding: 10px 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .card { gap: 8px; }
  .card-media { aspect-ratio: 1 / 1; border-radius: 16px; }
  .badge { top: 8px; left: 8px; font-size: 11px; padding: 4px 8px; }
  .card .placeholder { display: none; }
  .card { position: relative; }
  .card-row { flex-direction: column; gap: 8px; }
  .card-name { font-size: 14px; letter-spacing: 0; }
  .card-price { font-size: 15px; font-weight: 700; }
  .card-resume { display: none; }
  .card .btn { display: none; }
  /* Mobile : toute la carte est un lien (lien étiré sur le nom) ; en desktop le bouton « Acheter » reste cliquable */
  .card a.card-name::after { content: ""; position: absolute; inset: 0; z-index: 2; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 32px; padding-bottom: 40px; }
  .site-footer .brand-name { font-size: 18px; letter-spacing: 0; }
  .footer-links { flex-direction: column; gap: 0; font-size: 15px; }

  .product { padding-top: 16px; }
  .product-layout { gap: 20px; }
  .product-aside { position: static; gap: 20px; }
  .product-aside h1 { font-size: 34px; }
  .price-lg { font-size: 26px; }
  .media-box, .video-box { border-radius: 20px; }

  .page-pad { padding-top: 24px; }
  .form-card { padding: 24px 20px; }
  .center-col, .center-col.narrow { padding-top: 32px; }
  .panel { padding: 36px 20px; }
  .panel h1 { font-size: 28px; }

  /* Écrans de statut mobiles (attente, confirmation, connexion) : plein écran blanc, sans carte */
  body[data-page="attente"], body[data-page="confirmation"], body[data-page="connexion"] { background: var(--white); }
  body[data-page="attente"] .center-col, body[data-page="confirmation"] .center-col, body[data-page="connexion"] main.center-col { padding: 24px 16px 28px; }
  body[data-page="attente"] .panel, body[data-page="confirmation"] .panel, body[data-page="connexion"] .panel { padding: 0; border-radius: 0; background: transparent; gap: 18px; }
  body[data-page="attente"] .site-footer, body[data-page="confirmation"] .site-footer { display: none; }

  .contact { padding-top: 24px; padding-bottom: 40px; gap: 28px; }
  .contact-cards { gap: 12px; }
  .contact-cards h1 { font-size: 40px; margin-bottom: 12px; }
  .contact-card { padding: 20px; }

  .legal { padding-top: 24px; padding-bottom: 48px; gap: 28px; }
  .legal-head h1 { font-size: 36px; }

  .library { padding-top: 24px; }
  .purchases h1 { font-size: 28px; }
  .viewer { padding: 16px; }
}
/* Sous 390 px, la bande de garanties passe sur deux rangées : défilée sans barre visible, sa dernière pastille restait presque entièrement hors écran (WCAG 1.4.10) */
@media (max-width: 389px) {
  .trust .wrap { flex-wrap: wrap; overflow-x: visible; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pending::before { animation: none; }
}

/* ==========================================================
   Composants partagés (toast, chargement, focus, état vide)
   ========================================================== */
/* Anneau de focus global : visible au clavier, accent sur fond sombre */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn:focus-visible, .contact-card.dark:focus-visible { box-shadow: 0 0 0 4px var(--accent); }
.btn-outline:focus-visible { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 4px var(--accent); }
.site-footer :focus-visible { outline-color: var(--accent); }

/* Toasts : région live unique créée par App.toast() */
.toast-region { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
/* Ombre unique du DS (D9) ; contour ink-hover pour rester lisible au-dessus du footer noir ; pastille de statut à gauche */
.toast { pointer-events: auto; max-width: 480px; width: 100%; background: var(--ink); color: var(--white); font-size: 15px; font-weight: 500; line-height: 1.4; padding: 14px 18px; border-radius: 16px; box-shadow: 0 16px 32px rgba(0,0,0,0.08); outline: 1px solid var(--ink-hover); display: flex; align-items: center; gap: 10px; animation: toast-in 0.2s ease-out; transition: opacity 0.3s, transform 0.3s; }
.toast::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--white); }
.toast-succes::before { background: var(--accent); }
.toast-erreur::before { background: var(--danger); }
.toast-out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Bouton occupé : App.setBusy() — le libellé reste, un spinner s'ajoute */
.btn:disabled { cursor: not-allowed; opacity: 0.7; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.btn[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border-radius: 999px; border: 2px solid currentColor; border-right-color: transparent; flex: none; animation: spin 0.7s linear infinite; }
.btn-outline[aria-busy="true"]::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Squelette de chargement : pulsation d'opacité, sans dégradé (DS) */
.skeleton { background: var(--soft); animation: skeleton-pulse 1.4s ease-in-out infinite; border-radius: 12px; color: transparent; }
.skeleton-text { height: 1em; margin: 4px 0; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* État vide (ex. App.produitIntrouvable) */
.empty-state { max-width: 520px; margin: 0 auto; padding: 72px 0; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.empty-state h1, .empty-state h2 { margin: 0; font-size: 32px; letter-spacing: -0.03em; font-weight: 700; line-height: 1.1; }
/* Titre focalisé par le script (ex. « Service indisponible ») : pas d'anneau autour du texte */
.empty-state [tabindex="-1"]:focus { outline: none; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (max-width: 720px) { .empty-state { padding: 40px 0; } .empty-state h1, .empty-state h2 { font-size: 28px; } }

/* Mouvement réduit : neutralise animations et transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn[aria-busy="true"]::after { animation: spin 1.5s linear infinite !important; }
  .skeleton { animation: none !important; }
}

/* Bandeau de l'aperçu local (inséré par apercu/serve.py, jamais dans les pages publiées).
   Collant en haut, au-dessus du header (10) et du menu mobile, sous le lien d'évitement (100). */
.demo-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; }
.demo-banner::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }

/* ==========================================================
   Sections réservées aux agents (une par fichier/page)
   ========================================================== */
/* === page: accueil === */
/* Hero : pas de césure (« digi- / taux. »), et le surlignage passe sous les jambages de la ligne 1 */
.hero h1 { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; isolation: isolate; }
.hero .hl { position: relative; z-index: -1; }

/* ---------- Hero « conversion d'abord » : promesse + parcours en 3 étapes ----------
   Écarts DS assumés (à arbitrer) : h1 sans la limite 900 px (2 lignes à 1440), texte d'accroche 18 px. */
.hp-hero { padding-top: 72px; padding-bottom: 72px; }
.hp-hero h1 { max-width: none; }
.hp-eyebrows { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hp-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600; line-height: 1.3; }
.hp-eyebrow::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--ink); }
/* Catalogue vide : « Ouverture prochaine » (lancement, pas une boutique en panne) */
.hp-eyebrow-launch { background: var(--ink); color: var(--white); }
.hp-eyebrow-launch::before { border-radius: 999px; background: var(--accent); }
.hp-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 40px; }
.hp-lead { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.hp-lead b { color: var(--ink); font-weight: 600; }
.hp-hero .actions { margin-top: 32px; }
/* Squelettes des boutons du hero : même gabarit qu'un .btn-lg, texte transparent (largeur), non cliquables */
.hp-btn-skel { border-radius: 999px; color: transparent; pointer-events: none; user-select: none; }
.hp-pay { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 28px; }
.hp-pay-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.hp-pay .pay-logos { list-style: none; margin: 0; padding: 0; }
.hp-pay .pay-logos li { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; background: var(--soft); }
/* Wave pas encore ouvert (paiement.html, moyens du serveur) : muted sur soft = 6,3:1 */
.hp-pay .pay-logos .is-soon { color: var(--muted); }

/* Carte « Votre achat en 3 étapes » (fond ink, comme la boîte vidéo) */
.hp-flow { background: var(--ink); color: var(--white); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; }
.hp-flow-title { margin: 0 0 16px; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--muted-on-ink); }
.hp-flow ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hp-flow li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; position: relative; padding-bottom: 22px; }
.hp-flow li:last-child { padding-bottom: 0; }
/* filet vertical qui relie les tuiles (ink-hover : filet sur fond ink) */
.hp-flow li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; border-left: 2px solid var(--ink-hover); }
.hp-flow .tile { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.hp-flow li b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; padding-top: 2px; }
.hp-flow li div span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--muted-on-ink); }
.hp-flow-foot { margin: 22px 0 0; padding-top: 10px; border-top: 1px solid var(--ink-hover); display: flex; align-items: center; justify-content: space-between; gap: 0 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted-on-ink); }
.hp-flow-foot a { color: var(--white); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); }
.hp-flow-foot a:hover { color: var(--dim-on-ink); }
.hp-flow :focus-visible { outline-color: var(--accent); }

/* ---------- Bande d'engagements : 4 promesses vérifiables (écart DS : 4 items avec sous-ligne) ---------- */
.hp-trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hp-trust ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.hp-trust-item { display: flex; align-items: flex-start; gap: 14px; padding: 24px 0; min-width: 0; }
.hp-trust-item .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hp-trust-item b { display: block; font-size: 15px; font-weight: 600; }
.hp-trust-item div span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--muted); }

/* ---------- Catalogue ---------- */
.hp-head-txt { min-width: 0; }
/* hauteur d'une ligne réservée : le texte dépend de l'état du catalogue (CLS) */
.hp-sub { margin: 8px 0 0; min-height: 1.5em; font-size: 15px; line-height: 1.5; color: var(--muted); }
/* Indicateur d'attente du DS : point 10 px pending + 14 px muted */
.hp-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.hp-status::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--pending); flex: none; }
/* Écart DS : 3 colonnes en desktop (6 produits = 2 rangées pleines, cartes plus grandes) */
@media (min-width: 1081px) { .hp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Recherche + tri */
.catalogue-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: -12px 0 12px; }
.catalogue-tools .input { height: 48px; padding-top: 13px; padding-bottom: 13px; }
.catalogue-search { position: relative; flex: 1 1 280px; min-width: 0; }
.catalogue-search .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.catalogue-search .input { padding-left: 46px; border-radius: 999px; -webkit-appearance: none; appearance: none; }
.catalogue-sort { display: flex; align-items: center; gap: 10px; flex: none; }
.catalogue-sort label { font-size: 14px; font-weight: 600; color: var(--muted); }
.catalogue-sort .input { width: auto; border-radius: 999px; padding-right: 40px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.catalogue-search .input:focus, .catalogue-sort .input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.result-count { margin: 0 0 20px; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.catalogue-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 0; }
.catalogue-empty p { margin: 0; }

/* Cartes : résumé (desktop uniquement), bouton aligné en bas */
.card-resume { margin: -6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .btn { margin-top: auto; }
/* Titre de carte (h3 autour du lien) : neutre, le lien .card-name garde sa typographie ; pas de césure du h3 global */
.card-title { margin: 0; font: inherit; min-width: 0; -webkit-hyphens: manual; hyphens: manual; }
.card-title .card-name { display: block; }

/* Chargement (CLS) : hauteur des chips réservée avant le catalogue ; cartes squelettes du HTML à la forme des cartes */
.filters { min-height: var(--tap); }
.card-media.skeleton { border-radius: 20px; }
.card-skel .card-name { width: 60%; }
.card-skel .card-price { width: 25%; }

/* Catalogue vide : 3 catégories annoncées (visuels génériques sur les teintes DS) + carte d'inscription WhatsApp */
.hp-soon { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.hp-cat { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hp-cat-txt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hp-cat h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; -webkit-hyphens: manual; hyphens: manual; }
.hp-cat p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
/* « Bientôt » du titre : mobile seulement (en desktop il est sur le visuel) ; lu une fois par les lecteurs d'écran */
.hp-cat h3 .soon { display: none; margin-left: 6px; vertical-align: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0; padding: 3px 8px; border-radius: 999px; background: var(--soft); }
.hp-notify { background: var(--ink); color: var(--white); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.hp-notify .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.hp-notify h3 { margin: 6px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; -webkit-hyphens: manual; hyphens: manual; }
.hp-notify p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted-on-ink); }
.hp-notify .btn { margin-top: auto; width: 100%; background: var(--white); color: var(--ink); font-size: 15px; padding: 14px 20px; }
.hp-notify .btn:hover { background: var(--soft); color: var(--ink); }

/* ---------- Paiement et accès, en détail (#comment-ca-marche) ---------- */
.hp-detail { padding-top: 72px; padding-bottom: 72px; position: relative; scroll-margin-top: 16px; }
.hp-detail::before, .hp-help::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; border-top: 1px solid var(--line); }
.hp-h2 { margin: 0 0 8px; font-size: 36px; letter-spacing: -0.03em; font-weight: 700; line-height: 1.1; }
.hp-intro { margin: 0 0 32px; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 560px; }
.hp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp-card { background: var(--ground); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hp-card-head { display: flex; align-items: center; gap: 14px; }
.hp-card-head .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--ink); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hp-card h3 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.hp-card .checklist { border-top-color: var(--line-2); }
.hp-card .checklist li { align-items: flex-start; line-height: 1.45; }
.hp-card .checklist svg { flex: none; margin-top: 1px; }
.hp-card .checklist small { display: block; font-size: 14px; color: var(--muted); }

/* ---------- Avant d'acheter : FAQ courte + cartes contact (composants de Contact) ----------
   FAQ d'abord dans le DOM (titre de section en tête de lecture), cartes à droite en desktop. */
.hp-help { padding-top: 72px; padding-bottom: 72px; position: relative; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.hp-help .faq { flex: 999 1 520px; }
.hp-help .faq h2 { font-size: 36px; margin-bottom: 8px; line-height: 1.1; }
.hp-help .contact-cards { flex: 1 1 340px; }
.hp-help details > summary { list-style: none; }
.hp-help details > summary::-webkit-details-marker { display: none; }
.hp-help details[open] .sign-plus, .hp-help details:not([open]) .sign-minus { display: none; }
.hp-help .faq-q { -webkit-hyphens: manual; hyphens: manual; }
.hp-more { align-self: flex-start; margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); font-size: 15px; font-weight: 600; }

/* ---------- Appel final ---------- */
.hp-final { padding-top: 24px; padding-bottom: 96px; }
.hp-final-box { background: var(--ground); border-radius: 28px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hp-final h2 { margin: 0; font-size: 44px; line-height: 1.1; letter-spacing: -0.035em; font-weight: 700; max-width: 640px; -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }
.hp-final .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hp-h2 { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }

/* Avis clients (réels uniquement, section masquée tant que window.AVIS est vide) */
.testimonials { padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--line); }
.testimonials[hidden] { display: none; }
.testimonials h2 { margin: 0 0 32px; font-size: 36px; letter-spacing: -0.03em; font-weight: 700; }
.testimonials-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.testimonial { margin: 0; border: 1px solid var(--line-2); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }
.testimonial blockquote p::before { content: "\201C"; }
.testimonial blockquote p::after { content: "\201D"; }
.testimonial figcaption { display: flex; flex-direction: column; gap: 2px; }
.testimonial-name { font-weight: 700; font-size: 15px; }
.testimonial-product { font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* Desktop : les filets de section s'alignent sur le contenu (1152 px), pas sur le padding du .wrap */
@media (min-width: 721px) {
  .testimonials { position: relative; border-top: 0; }
  .testimonials::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; border-top: 1px solid var(--line); }
}

@media (max-width: 1080px) {
  .hp-soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
}
@media (max-width: 960px) {
  .hp-row { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 720px) {
  /* h1 sur 4 lignes à 390 (« Payez en Mobile / Money. / Accédez tout de / suite. ») */
  .hero h1 { font-size: clamp(34px, 11.4vw, 46px); }
  .hp-hero { padding-top: 28px; padding-bottom: 32px; }
  .hp-eyebrows { margin-bottom: 18px; }
  .hp-eyebrow { font-size: 12px; padding: 7px 12px; }
  /* une seule pastille sur la ligne : en lancement, « Ouverture prochaine » remplace les catégories (montrées plus bas) */
  main[data-catalogue="vide"] .hp-eyebrow-cats { display: none; }
  .hp-row { margin-top: 20px; gap: 28px; }
  .hp-lead { font-size: 16px; }
  .hp-hero .actions { margin-top: 24px; flex-direction: column; gap: 10px; }
  .hp-hero .actions .btn { width: 100%; padding: 16px 24px; }
  .hp-pay { margin-top: 20px; gap: 8px; }
  .hp-pay-label { width: 100%; font-size: 13px; }
  .hp-flow { padding: 22px; }
  .hp-flow li { padding-bottom: 18px; }
  .hp-flow li b { font-size: 16px; }

  /* Engagements : pastilles soft qui passent à la ligne (aucune cachée hors écran) */
  .hp-trust { border: 0; }
  .hp-trust ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .hp-trust-item { padding: 10px 14px; border-radius: 999px; background: var(--soft); align-items: center; gap: 8px; }
  .hp-trust-item .ic { width: auto; height: auto; background: none; border-radius: 0; }
  .hp-trust-item .ic svg { width: 16px; height: 16px; }
  .hp-trust-item b { font-size: 13px; }
  .hp-trust-item div span { display: none; }

  .hp-sub { font-size: 14px; }
  /* carte mobile = visuel + nom + prix (maquette) : le display:-webkit-box ci-dessus passerait après le masquage base */
  .card-resume { display: none; }
  /* pas de retour à la ligne dans la colonne : sinon les chips élargissent la page (scrollWidth 395) */
  .products-head { flex-wrap: nowrap; }
  .hp-products .products-head { gap: 12px; }
  /* chips 44 px + 4 px de marge d'anneau en haut et en bas (padding de .filters, border-box) */
  .filters { min-height: calc(var(--tap) + 8px); }
  .card-media.skeleton { border-radius: 16px; }
  .card-skel .card-name { width: 80%; }
  .card-skel .card-price { width: 45%; }
  /* recherche et tri sur une ligne ; « Trier » reste lu par les lecteurs d'écran */
  .catalogue-tools { flex-wrap: nowrap; margin: -4px 0 20px; gap: 8px; }
  .catalogue-search { flex: 1 1 0; }
  .catalogue-sort { flex: none; }
  .catalogue-sort label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .catalogue-sort .input { padding-left: 14px; padding-right: 36px; background-position: right 14px center; }
  /* compteur : visuellement masqué en mobile (maquette), toujours annoncé (role=status) */
  .result-count { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; min-height: 0; }

  /* Catalogue vide : liste compacte (vignette 88 px + texte) puis carte WhatsApp pleine largeur */
  .hp-soon { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hp-cat { flex-direction: row; align-items: center; gap: 14px; }
  .hp-cat .card-media { flex: none; width: 88px; aspect-ratio: 1 / 1; border-radius: 16px; }
  .hp-cat .card-media .badge { display: none; }
  .hp-cat-txt { gap: 4px; }
  .hp-cat h3 { font-size: 16px; }
  .hp-cat h3 .soon { display: inline-flex; }
  .hp-notify { padding: 22px; margin-top: 8px; }

  .hp-detail, .hp-help { padding-top: 48px; padding-bottom: 48px; }
  .hp-detail::before, .hp-help::before { left: 16px; right: 16px; }
  .hp-h2, .hp-help .faq h2 { font-size: 28px; }
  .hp-intro { margin-bottom: 20px; font-size: 15px; }
  .hp-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hp-card { padding: 22px; gap: 14px; }
  .hp-card h3 { font-size: 20px; }
  .hp-card-head .ic { width: 44px; height: 44px; border-radius: 12px; }
  .hp-help { gap: 28px; }
  .hp-help .contact-cards { gap: 12px; }
  .hp-help .contact-card { padding: 20px; }

  .hp-final { padding-top: 8px; padding-bottom: 48px; }
  .hp-final-box { padding: 28px 22px; border-radius: 24px; gap: 20px; }
  .hp-final h2 { font-size: 30px; }
  .hp-final .actions { width: 100%; flex-direction: column; gap: 10px; }
  .hp-final .actions .btn { width: 100%; padding: 16px 24px; }

  .testimonials { padding-top: 48px; padding-bottom: 48px; }
  .testimonials h2 { font-size: 28px; margin-bottom: 20px; }
  .testimonial { padding: 22px; }
}
/* Très petits écrans : la recherche reprend toute la largeur, le tri passe dessous */
@media (max-width: 374px) {
  .catalogue-tools { flex-wrap: wrap; }
  .catalogue-search, .catalogue-sort { flex: 1 1 100%; }
  .catalogue-sort .input { width: 100%; }
}
/* === fin accueil === */
/* === page: produit === */
.p-back { display: none; }
.p-head { display: flex; flex-direction: column; gap: 24px; }
.p-resume { line-height: 1.5; }
.p-contenu { border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.p-contenu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.p-contenu h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; font-weight: 700; }
.p-contenu-total { font-size: 14px; color: var(--muted); font-weight: 500; }
.p-modules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.p-modules li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.p-modules li:first-child { border-top: 0; padding-top: 0; }
.p-mod-num { font-size: 13px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; min-width: 22px; }
.p-mod-titre { flex: 1 1 auto; min-width: 0; font-weight: 500; color: var(--ink); }
.p-mod-duree { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-mod-lock { display: inline-flex; color: var(--muted-2); }
.p-contenu-note { margin: 0; font-size: 13px; color: var(--muted); }
#p-wa { font-size: 15px; padding: 16px 20px; }
.p-related { margin-top: 96px; padding-top: 48px; border-top: 1px solid var(--line); }
.p-related h2 { margin: 0 0 28px; font-size: 36px; letter-spacing: -0.03em; font-weight: 700; }
.p-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.p-buybar { display: none; }
/* Squelettes du résumé (2 lignes de 24 px, comme .lead) et de la liste « inclus » (pastille à la taille de l'icône) */
.p-resume .skeleton-text { display: inline-block; vertical-align: top; width: 100%; }
.p-resume .skeleton-text + .skeleton-text { width: 60%; }
.p-skel-ico { width: 18px; height: 18px; flex: none; }
/* Deux colonnes dès 1016 px. Le DOM suit l'ordre d'une colonne (visuel, achat, vidéo, contenu) ; la grille met l'achat
   à droite sur toute la hauteur, avec la largeur de l'ancien flex (360 px, réduite comme flex-shrink sous 1096 px).
   La dernière rangée en 1fr absorbe la hauteur de la colonne d'achat : pas d'espace ajouté sous le visuel ou la vidéo. */
@media (min-width: 1016px) {
  .product-layout { display: grid; grid-template-columns: minmax(0, 1fr) min(360px, calc((100% - 48px) * 9 / 23)); grid-template-rows: auto auto 1fr; gap: 0 48px; align-items: start; }
  #p-media { grid-area: 1 / 1; }
  .product-aside { grid-area: 1 / 2 / 4 / 3; }
  #p-video { grid-area: 2 / 1; margin-top: 16px; }
  .p-contenu { grid-area: 3 / 1; margin-top: 16px; }
  /* Le pied de page reste sous la ligne de flottaison pendant le chargement : vidéo, contenu et suggestions,
     affichés après le bootstrap, ne le font plus sortir de l'écran (CLS). Pas sur les états vides (main vidé). */
  main.product:has(> .product-layout) { min-height: 100vh; }
}
/* Une colonne (≤ 1015 px) : visuel → titre et prix → vidéo → contenu dans l'ordre du DOM, et barre d'achat collante
   à la place de #p-buy. scroll-padding : l'élément qui reçoit le focus n'est jamais amené sous la barre (WCAG 2.4.11). */
@media (max-width: 1015px) {
  html:has(body[data-page="produit"]) { scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  main.product { padding-bottom: 0; }
  .product-layout { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; }
  .product-layout > * { flex: none; }
  .product-aside { position: static; }
  #p-buy { display: none; }
  .p-buybar { display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; z-index: 5; margin: 24px -24px 0; padding: 12px 24px calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--white); border-top: 1px solid var(--line); }
  .p-buybar-info { display: flex; flex-direction: column; min-width: 0; }
  .p-buybar-name { font-size: 12px; color: var(--muted); }
  .p-buybar-price { font-size: 17px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
  .p-buybar .btn { flex: 1; padding: 16px; font-size: 16px; }
}
/* Tablette (721-1015 px) : visuel plus bas (2:1) pour garder le titre près de la ligne de flottaison. */
@media (min-width: 721px) and (max-width: 1015px) {
  .product .media-box { aspect-ratio: 2 / 1; }
}
@media (max-width: 720px) {
  .p-back { display: flex; width: fit-content; align-items: center; gap: 8px; margin: -12px 0 4px -12px; }
  .p-head { gap: 12px; }
  .product-aside h1 { font-size: 32px; letter-spacing: -0.03em; }
  .product-aside .tag { font-size: 12px; padding: 5px 10px; }
  .product .media-box { aspect-ratio: 1 / 1; font-size: 13px; }
  .product .video-box { gap: 10px; }
  .product .video-box .play { width: 60px; height: 60px; }
  .product .video-box .play svg { width: 22px; height: 22px; }
  .product .video-label { font-size: 14px; }
  .product .checklist { padding-top: 0; border-top: 0; }
  .product .pay-logos { gap: 6px; }
  .product .pay-logos span { font-size: 12px; padding: 7px 10px; }
  #p-wa { padding: 14px; }
  .p-contenu { padding: 20px; border-radius: 20px; }
  .p-contenu h2 { font-size: 20px; }
  .p-related { margin-top: 56px; padding-top: 32px; }
  .p-related h2 { font-size: 28px; margin-bottom: 20px; }
  .p-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .p-buybar { margin: 24px -16px 0; padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
}
/* Petites hauteurs (zoom 400 %, 320 × 256) : la barre collante occuperait un tiers de l'écran ; elle reprend sa place en fin de page. */
@media (max-width: 720px) and (max-height: 500px) {
  .p-buybar { position: static; }
  html:has(body[data-page="produit"]) { scroll-padding-bottom: 0; }
}
/* === fin produit === */
/* === page: paiement === */
/* Groupe téléphone : composant partagé de la base (pastille interne). Ici le numéro de session est
   en lecture seule (fond soft) : la pastille passe en blanc pour rester visible. */
[data-page="paiement"] .tel-group:has(.input[readonly]) .tel-prefix { background: var(--white); color: var(--muted); }
/* Note de session : pleine largeur sous la rangée WhatsApp / Email (posée par paiement.js) */
.tel-session { margin: -16px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
/* Lien en ligne : zone tactile 44 px (18 + 2 × 13) par le padding, sans agrandir la ligne */
.tel-session .link-btn { display: inline; min-height: 0; font-size: inherit; padding: 13px 0; margin: -13px 0; text-decoration: underline; text-underline-offset: 2px; }
/* 3 moyens (AfribaPay : Orange, Moov, Wave) : une rangée de 3 si la carte est assez large, sinon 2 */
[data-page="paiement"] .methods { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Moyen fermé (Wave, « bientôt disponible ») ou formulaire verrouillé : non cliquable, texte atténué
   mais lisible (muted sur soft ≈ 6:1), anneau en pointillés pour ne pas reposer sur la couleur seule. */
[data-page="paiement"] .method:has(input:disabled) { cursor: not-allowed; background: var(--soft); color: var(--muted); }
[data-page="paiement"] .method:has(input:disabled:not(:checked)) .ring { border-style: dashed; }
[data-page="paiement"] .method:has(input:disabled:checked) { border-color: var(--line-strong); }
[data-page="paiement"] .method:has(input:disabled:checked) .ring { border-color: var(--muted); }
.method-name { min-width: 0; }
.method-soon { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; }
/* Mention posée par paiement.js d'après les métadonnées (vide : moyen ouvert ou non encore connu) */
.method-soon:empty { display: none; }
.method-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.method-help { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); padding-left: 12px; border-left: 3px solid var(--accent); }
/* Aucune aide tant que les moyens ne sont pas connus (ou aucun moyen ouvert) : ni barre ni écart */
.method-help:empty { display: none; }
/* Code de paiement (otp_code) : visible seulement si les métadonnées du moyen disent available && otp_required */
.otp-field .field-help { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
/* Code USSD reçu du serveur (ussd_code), en texte : jamais de code par défaut */
.otp-field .otp-ussd { font-family: inherit; font-weight: 700; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1px 6px; overflow-wrap: anywhere; }
.otp-input { max-width: 240px; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.otp-input::placeholder { letter-spacing: normal; }
/* .field .consent (0,2,0) : sinon « .field label » (14/600) l'emporte.
   Zone tactile ≥ 44 px par le padding, compensé par la marge (l'écart du formulaire reste le même). */
.field .consent { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; font-weight: 500; cursor: pointer; padding: 12px 0; margin: -12px 0; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); cursor: pointer; }
/* Lien en ligne : zone tactile 44 px (18 + 2 × 13) par le padding, sans agrandir la ligne (C5) ;
   un appui juste au-dessus ou au-dessous ouvre les conditions au lieu de cocher la case. */
.consent a { text-decoration: underline; text-underline-offset: 2px; padding: 13px 0; margin: -13px 0; }
/* S1 : champs groupés dans un fieldset désactivé dans le HTML, ouvert par paiement.js.
   Même écart que la carte formulaire (le fieldset de base est à 10 px). */
[data-page="paiement"] .pay-fields { gap: 24px; min-width: 0; }
.pay-noscript { font-size: 14px; line-height: 1.5; }
/* Erreur persistante (S2), juste avant le bouton Payer.
   Vide : rendue (région live existante) mais sans hauteur ni écart, comme .field > .error:empty. */
.form-card > .pay-note { margin: 0; font-size: 14px; line-height: 1.5; }
.form-card > .pay-note:empty { margin-top: -24px; padding: 0; }
/* Verrou par produit (paiement.js) : panneau en tête du formulaire, champs désactivés dessous.
   Vide : rendu (région live) sans hauteur ni écart. Point « en cours » (pending), accent si payé. */
.form-card > .pay-lock:empty { margin-top: -24px; padding: 0; }
.pay-lock:not(:empty) { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--soft); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.pay-lock p { margin: 0; font-size: 15px; line-height: 1.5; }
.pay-lock .pay-lock-title { font-weight: 600; }
.pay-lock-title::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: var(--space-2); border-radius: var(--radius-pill); background: var(--pending); vertical-align: 0; animation: pulse 1.4s ease-in-out infinite; }
.pay-lock-ok .pay-lock-title::before { background: var(--accent); box-shadow: inset 0 0 0 1px var(--ink); animation: none; }
/* Paiements indisponibles (moyens fermés ou non vérifiés) : point fixe atténué, rien « en cours » */
.pay-lock-ferme .pay-lock-title::before { background: var(--muted); animation: none; }
.pay-lock .pay-lock-text { color: var(--body); overflow-wrap: anywhere; }
.pay-lock-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-1); }
.pay-lock-actions .btn { flex: 1 1 auto; }
/* Défilement vers le panneau (paiement.js) : marge au-dessus du titre. */
#pay-lock { scroll-margin-top: var(--space-8); }
#pay-lock:focus { outline: none; }
#pay-lock:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (forced-colors: active) { .pay-lock:not(:empty) { border: 1px solid CanvasText; } }
#pay-err:focus { outline: none; }
#pay-err:focus-visible { outline: 2px solid var(--danger); outline-offset: 4px; border-radius: 3px; }
/* Liens des messages : soulignés, zone tactile ≥ 44 px par le padding (comme .consent a) */
.pay-link { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; padding: 13px 0; margin: -13px 0; }
/* Prix court (« 25 000 F ») : seulement dans le récapitulatif compact mobile */
.order-card .price-short { display: none; }
/* Focus clavier (Tab) au bas de la fenêtre : l'anneau du bouton Payer reste entier (la barre mobile redéfinit cette marge). */
html:has(body[data-page="paiement"]) { scroll-padding-bottom: var(--space-6); }

@media (max-width: 720px) {
  [data-page="paiement"] main.page-pad { padding-top: 16px; padding-bottom: 16px; }
  [data-page="paiement"] .checkout { gap: 12px; }

  /* Récapitulatif compact au-dessus du formulaire (Mobile-Paiement) */
  [data-page="paiement"] .order-card { order: -1; flex-direction: row; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; }
  [data-page="paiement"] .order-card .media-box { width: 56px; height: 56px; aspect-ratio: auto; flex: none; border-radius: 12px; font-size: 0; }
  /* Vignette 56 px : visuel SVG entier en recadrage 1:1 (zone sûre x 100-700 des SVG), sans zoom
     pour ne pas couper les pastilles des bords. */
  [data-page="paiement"] .order-card .name { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
  [data-page="paiement"] .order-card .total { padding: 0; border: 0; font-size: 15px; white-space: nowrap; }
  [data-page="paiement"] .order-card .total span:first-child,
  [data-page="paiement"] .order-card [data-p-price] { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-page="paiement"] .order-card .price-short { display: inline; }

  /* Carte formulaire : le titre n'est visible que dans le header tunnel */
  [data-page="paiement"] .form-card { border-radius: 20px; padding: 20px 16px; gap: 18px; }
  [data-page="paiement"] .pay-fields { gap: 18px; }
  .form-card > .pay-note:empty, .form-card > .pay-lock:empty { margin-top: -18px; }
  .pay-lock:not(:empty) { padding: var(--space-4); }
  .pay-lock-actions .btn { flex-basis: 100%; }
  [data-page="paiement"] .form-card h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* Champs 52 px, padding 14 (le groupe tél. garde la place de sa pastille) */
  [data-page="paiement"] .input { padding: 14px; min-height: 52px; }
  [data-page="paiement"] .input[aria-invalid="true"] { padding: 13px; }
  /* 6 px + 4,375rem = 76 px par défaut : suit la pastille si seul le texte est agrandi (WCAG 1.4.4, comme la base) */
  [data-page="paiement"] .tel-group .input { padding-left: calc(6px + 4.375rem); }
  [data-page="paiement"] .tel-group .input[aria-invalid="true"] { padding-left: calc(5px + 4.375rem); }
  [data-page="paiement"] .tel-group .tel-prefix[hidden] + .input { padding-left: 14px; }
  [data-page="paiement"] .tel-group .tel-prefix[hidden] + .input[aria-invalid="true"] { padding-left: 13px; }
  .otp-input { max-width: none; }
  .tel-session { margin-top: -10px; }

  /* Moyens de paiement : une colonne */
  [data-page="paiement"] fieldset { gap: 8px; }
  [data-page="paiement"] legend { margin-bottom: 8px; }
  [data-page="paiement"] .methods { grid-template-columns: 1fr; gap: 8px; }
  [data-page="paiement"] .method { padding: 14px; min-height: 54px; border-radius: 14px; }

  /* Bouton Payer en barre collante, bord à bord (16 carte + 16 gouttière) */
  .pay-bar { position: sticky; bottom: 0; z-index: 5; background: var(--white); border-top: 1px solid var(--line); padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); margin: 0 -32px -20px; }
  [data-page="paiement"] #pay-btn { padding: 18px; }
  /* « Vérification de vos paiements en cours… » (paiement.js, data-verif) : une ligne dès 360 px ;
     interligne de 22 px (celui du libellé 17 px) : la barre garde sa hauteur pendant la vérification. */
  [data-page="paiement"] #pay-btn[data-verif] { font-size: 15px; line-height: 22px; padding-left: 12px; padding-right: 12px; }
  [data-page="paiement"] .toast-region { bottom: 104px; }
  /* Barre collante (91 px) : le focus clavier et scrollIntoView s'arrêtent au-dessus (WCAG 2.4.11).
     120 px = barre + débord du libellé sous le radio (19) + anneau (4) + marge. */
  html:has(body[data-page="paiement"]) { scroll-padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}
/* Faible hauteur (paysage, zoom 400 %) : la barre occuperait plus du tiers de l'écran, elle reste dans le flux */
@media (max-width: 720px) and (max-height: 500px) {
  .pay-bar { position: static; }
  html:has(body[data-page="paiement"]) { scroll-padding-bottom: 0; }
}
/* === fin paiement === */
/* === page: attente === */
body[data-page="attente"] .panel h1 { font-size: 30px; }
#attente-titre:focus { outline: none; }
/* Ligne d'attente : point pulsé + minuteur sur la même ligne (« … · 0:12 ») */
.attente-suivi { align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; }
.attente-timer { margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Statut incertain ou suspendu (429) : texte plus long, le point ne doit pas s'écraser */
#attente-statut { text-align: center; }
#attente-statut::before { flex: none; }
/* Consignes « Comment valider » : repliées sous la ligne d'attente, CTA au-dessus du pli */
.attente-etapes { align-self: stretch; text-align: left; background: var(--soft); border-radius: 18px; }
.attente-etapes summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 14px 18px; font-size: 16px; font-weight: 600; cursor: pointer; border-radius: 18px; }
.attente-etapes summary::-webkit-details-marker { display: none; }
.attente-etapes summary:hover { color: var(--ink-hover); }
.attente-chevron { flex: none; transition: transform 0.2s; }
.attente-etapes[open] .attente-chevron { transform: rotate(180deg); }
.attente-etapes ol { margin: 0; padding: 2px 18px 20px; list-style: none; counter-reset: etape; display: flex; flex-direction: column; gap: 12px; }
.attente-etapes li { counter-increment: etape; display: flex; gap: 12px; font-size: 15px; line-height: 1.45; color: var(--body); }
.attente-etapes li::before { content: counter(etape); flex: none; width: 24px; height: 24px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
/* Un seul <span> par étape : le texte s'enroule normalement (plus de colonnes flex) */
.attente-etapes li > span { flex: 1; min-width: 0; }
.attente-etapes strong { color: var(--ink); white-space: nowrap; }
.attente-etapes code { font-family: inherit; font-weight: 700; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1px 6px; white-space: nowrap; }
.attente-etapes a.ussd { color: var(--ink); text-decoration: none; }
.attente-etapes a.ussd:hover code { background: var(--accent); }
.attente-probleme { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.attente-probleme h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.attente-probleme p { margin: 0; font-size: 15px; color: var(--body); }
.attente-probleme .btn { align-self: stretch; }
/* CTA : « J'ai validé » + « Contacter le support » (jamais d'autre moyen de paiement en attente) */
.attente-cta { align-self: stretch; display: flex; flex-direction: column; gap: 20px; }
/* Plus aucun lien visible (échec, erreur) : pas d'espace résiduel en bas du panneau */
.attente-cta:not(:has(> :not([hidden]))) { display: none; }
#validated { padding: 18px 28px; }
@media (prefers-reduced-motion: reduce) { .attente-chevron { transition: none; } }
@media (max-width: 720px) {
  /* Plein écran : contenu centré, CTA en bas (collant si le contenu dépasse) */
  body[data-page="attente"] main.center-col { display: flex; flex-direction: column; padding-bottom: 12px; }
  body[data-page="attente"] .attente-panel { flex: 1 0 auto; }
  body[data-page="attente"] .attente-panel > :first-child { margin-top: auto; }
  body[data-page="attente"] .status-icon { width: 84px; height: 84px; border-radius: 26px; }
  body[data-page="attente"] .status-icon svg { width: 36px; height: 36px; }
  body[data-page="attente"] .summary { margin-top: 8px; }
  body[data-page="attente"] .summary > div { padding: 15px 16px; }
  .attente-cta { margin-top: auto; position: sticky; bottom: 0; z-index: 1; background: var(--white); gap: 4px; padding: 12px 0 16px; }
  /* Barre collante (~137 px) : le focus clavier et scrollIntoView s'arrêtent au-dessus (WCAG 2.4.11) */
  html:has(body[data-page="attente"] #validated:not([hidden])) { scroll-padding-bottom: 150px; }
  /* Délai / échec : la barre ne porte plus le CTA principal, elle ne masque pas « Réessayer » / « Support » */
  .attente-cta:has(> #validated[hidden]) { position: static; padding-top: 0; }
  #validated { padding: 18px; }
  #attente-support { padding: 14px; }
  /* CTA vide : reste dans le flux (marge auto) pour garder le contenu centré, sans hauteur */
  .attente-cta:not(:has(> :not([hidden]))) { display: flex; position: static; padding: 0; }
}
/* === fin attente === */
/* === page: confirmation === */
/* Bloc statut (icône → récap) puis bloc actions ; en mobile les actions se calent en bas comme Mobile-Confirmation */
.conf-status { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.conf-panel h1 { font-size: 34px; text-wrap: balance; }
.conf-panel h1:focus { outline: none; }
.conf-panel h1:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.conf-panel .lead { text-wrap: pretty; }
.conf-panel .order-line .ref { flex: 0 1 auto; min-width: 0; max-width: 45%; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.conf-panel .order-line .ref:empty { display: none; }
.conf-summary > div { align-items: center; }
.conf-ref { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.conf-ref span { font-variant-numeric: tabular-nums; }
.conf-copy { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; min-height: var(--tap); cursor: pointer; }
.conf-copy:hover { background: var(--line); }
.conf-copy:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.conf-actions { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.conf-actions .btn { align-self: stretch; }
/* Deux boutons pilule visibles l'un sous l'autre (erreur : réessayer + support) : 12px comme .conf-empty */
.conf-actions > .btn:not([hidden]) ~ .btn:not([hidden]) { margin-top: 8px; }
.conf-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--muted); padding: 12px; min-height: var(--tap); text-decoration: none; }
.conf-share:hover { color: var(--ink); }
.conf-empty { align-self: stretch; display: flex; flex-direction: column; gap: 12px; }
.conf-empty .btn { align-self: stretch; }
@media (max-width: 720px) {
  body[data-page="confirmation"] main.center-col { display: flex; flex-direction: column; }
  .conf-panel { flex: 1; }
  .conf-status { flex: 1; justify-content: center; gap: 18px; }
  .conf-panel h1 { font-size: 34px; }
  .conf-panel .status-icon { width: 88px; height: 88px; }
  .conf-panel .status-icon svg { width: 38px; height: 38px; }
  .conf-panel .order-line { margin-top: 8px; gap: 12px; padding: 12px; }
  .conf-panel .order-thumb { width: 52px; height: 52px; }
  .conf-panel .btn-lg { padding: 18px; }
  #conf-home { padding: 14px; }
}
@media (max-width: 360px) {
  .conf-summary > div { flex-direction: column; align-items: flex-start; gap: 6px; }
  .conf-summary dd, .conf-ref { text-align: left; justify-content: flex-start; }
}
/* === fin confirmation === */
/* === page: connexion === */
/* Le groupe téléphone (.tel-group / .tel-prefix) est partagé : base §1.5. */
.login-panel { padding: 40px 32px; }
.login-panel h1 { font-size: 30px; }
.login-panel h1:focus { outline: none; }
.login-mark { display: none; }
.login-tel { color: var(--ink); font-weight: 600; white-space: nowrap; }
.login-panel .tel-group .input { min-height: 52px; }
.login-hint { font-size: 14px; color: var(--muted); line-height: 1.5; }
.login-demo { margin: 0; text-align: center; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.login-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.login-actions .link-btn { padding: 12px 8px; }
.login-panel .link-btn:disabled { color: var(--muted-2); cursor: not-allowed; font-variant-numeric: tabular-nums; }
.login-panel .link-btn[aria-busy="true"] { cursor: progress; }
.login-panel .link-btn:hover:not(:disabled) { text-decoration: underline; }
.input-code[aria-busy="true"] { background: var(--soft); }
/* Mobile : écran plein blanc sans carte (base §1.7), tuile logo, CTA en bas de l'écran (Mobile-Connexion) */
@media (max-width: 720px) {
  body[data-page="connexion"] .site-header { border-bottom: 0; }
  /* 68 px = header .has-back (12 + 44 + 12), sans filet */
  body[data-page="connexion"] main.center-col { min-height: calc(100vh - 68px); min-height: calc(100svh - 68px); display: flex; flex-direction: column; }
  body[data-page="connexion"] .login-panel { flex: 1; gap: 24px; }
  .login-panel > .stack { flex: 1; gap: 18px; }
  /* Contrôles dans le verrou S1 (fieldset.form-lock, display: contents) : le CTA reste un élément du flex du formulaire */
  .login-panel > .stack > .btn, .login-panel > .stack > .form-lock > .btn { margin-top: auto; }
  .login-mark { display: inline-flex; align-self: flex-start; width: 56px; height: 56px; border-radius: 16px; background: var(--ink); align-items: center; justify-content: center; }
  .login-mark::after { content: ""; width: 18px; height: 18px; border-radius: 5px; background: var(--accent); }
  .login-panel h1 { font-size: 36px; letter-spacing: -0.04em; }
  .login-panel .tel-group .input { font-size: 18px; min-height: 56px; }
  .login-panel .input-code { font-size: 26px; min-height: 64px; }
  /* Toast au-dessus du CTA bas d'écran à toutes les étapes : en étape code/session, le CTA remonte de ~60 px (rangée de liens dessous) */
  body[data-page="connexion"] .toast-region { bottom: 160px; }
}
/* === fin connexion === */
/* === page: achats === */
.library [hidden] { display: none !important; }
/* Lignes empilées à l'écart fixe de main, même si la page est plus courte que la fenêtre */
.library { align-content: flex-start; }
/* Le h1 est hors de la nav (titre conservé dans les états vide / erreur) */
.purchases-nav { min-width: 0; }
.purchases-list { display: flex; flex-direction: column; gap: 8px; }
.purchase .thumb { overflow: hidden; }
.purchase .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Vignettes : zoom modéré, le motif n'est plus rogné (surcharge la section visuels, 1.7) */
.purchases-list .purchase .thumb img[src$=".svg"] { transform: scale(1.25); }
.purchase .meta { flex: 1; min-width: 0; }
.purchase .meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purchase .meta .pct { font-size: 12px; font-weight: 600; color: var(--muted); }
.purchase-bar { display: block; height: 4px; margin-top: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.purchase-bar span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; transition: width .3s ease; }
.purchase:hover { background: var(--white); }
.purchase:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.purchase-skeleton { cursor: default; }
.purchase-skeleton .meta { gap: 6px; }

/* Header : numéro en poids normal (maquette) ; l'icône de déconnexion n'apparaît qu'en mobile */
body[data-page="achats"] .header-note { font-weight: 400; }
#logout svg { display: none; }

/* Boîte vidéo toujours présente ; sans vidéo : inerte, libellé muted-on-ink */
.video-box.is-empty { cursor: default; }
.video-box.is-empty .video-label { font-size: 14px; }

.viewer-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.viewer-product { font-size: 13px; font-weight: 600; color: var(--muted); }
.viewer-head h2:focus { outline: none; }
.viewer-head h2:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.course-progress { display: flex; align-items: center; gap: 12px; }
.course-progress .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.course-progress .bar span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; transition: width .3s ease; }
.course-text { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lesson-actions .btn { padding: 12px 20px; font-size: 15px; }
/* Ordre du DOM = ordre visuel (Terminé, Précédent, Suivant) : Précédent et Suivant groupés à droite */
#lesson-prev { margin-left: auto; }
/* .btn-outline trace son contour en box-shadow (base) : l'état terminé l'enlève */
#lesson-done.is-done { background: var(--accent); color: var(--ink); box-shadow: none; }
#lesson-done.is-done:focus-visible { box-shadow: 0 0 0 4px var(--accent); }
/* Squelettes (pas de saut au chargement) : 3 leçons de 48 px (40 + 2 × 4), ligne de progression */
.lesson-skeleton { display: block; height: 40px; margin: 4px 0; }
.course-skeleton { display: inline-block; width: 120px; margin: 0; vertical-align: middle; }
/* Squelettes du produit et du titre : sans marge, la ligne garde la hauteur du texte chargé */
.viewer-titles .skeleton-text { margin: 0; vertical-align: middle; }
.lesson:hover { background: var(--soft); }
.lesson.is-done .num { color: var(--ink); }
.lesson .num .ico { display: block; }
.lesson.is-done .title { color: var(--muted); }
.files-list { display: flex; flex-direction: column; gap: 8px; }
/* Nom sur une ligne ; la note « bientôt disponible » passe dessous (alignée sur le nom : icône 18 + gap 12) */
.file { flex-wrap: wrap; row-gap: 2px; }
.file-name { flex: 1; min-width: 0; }
.file.is-disabled { color: var(--muted); cursor: not-allowed; border-style: solid; }
.file.is-disabled:hover { background: transparent; }
.file-note { flex-basis: 100%; margin-left: 30px; font-size: 12px; font-weight: 500; }
/* Pleine ligne sous le titre (sinon le max-width 520 de .empty-state la ramène à côté du h1) ; contenu centré à 520 */
.library-empty { flex: 1 1 100%; max-width: none; }
.library-empty > * { max-width: 520px; }
/* .empty-actions : base (composants partagés), aussi utilisé par l'état « Service indisponible ». */

/* Mes commandes (GET /orders) : carte blanche pleine largeur sous le lecteur, comme .viewer */
.orders { flex: 1 1 100%; min-width: 0; background: var(--white); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.orders-head { display: flex; flex-direction: column; gap: 4px; }
.orders-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; font-weight: 700; }
.orders-head h2:focus { outline: none; }
.orders-head h2:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.orders-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.orders-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.order { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.order:first-child { border-top: 0; padding-top: 0; }
.order:focus { outline: none; }
.order:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 12px; }
.order-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.order-name { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.order-meta { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.order-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.order-amount { font-size: 15px; font-weight: 600; white-space: nowrap; }
/* Statut : toujours un libellé texte ; la couleur n'est qu'un renfort (payé : accent ; en cours : point pending ; autres : contour) */
.order-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); white-space: nowrap; }
.order-status-paid { background: var(--accent); }
.order-status-pending::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--pending); animation: pulse 1.4s ease-in-out infinite; }
.order-status-failed, .order-status-cancelled, .order-status-refunded { background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); }
.order-follow { padding: 12px 20px; font-size: 15px; }
.orders-empty { margin: 0; font-size: 15px; color: var(--muted); }
.orders-error { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px; border-radius: 16px; background: var(--soft); }
.orders-error p { margin: 0; flex: 1 1 240px; font-size: 15px; font-weight: 500; }
.orders-more-err { margin: 0; font-size: 13px; color: var(--danger); }
.orders-more { align-self: flex-start; padding: 12px 20px; font-size: 15px; }
.order-skeleton .order-main { gap: 6px; }
.order-skeleton .skeleton-text { margin: 0; max-width: 100%; }
.order-sk-name { width: 180px; height: 15px; }
.order-sk-meta { width: 260px; height: 13px; }

@media (max-width: 720px) {
  /* Fond blanc, lecteur posé sur la page (Mobile-Acces) */
  body[data-page="achats"] { background: var(--white); }
  body[data-page="achats"] .site-header .wrap { padding-right: 8px; }
  body[data-page="achats"] .header-note { display: none; }
  body[data-page="achats"] #logout { width: 44px; height: 44px; padding: 0; justify-content: center; }
  #logout svg { display: block; }
  .logout-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .library { padding-top: 20px; padding-bottom: 32px; gap: 12px; }
  .purchases { flex-basis: 100%; }
  .purchases h1 { letter-spacing: -0.03em; margin-bottom: 2px; } /* 2 + gap 8 + padding 4 = 14 px (Mobile-Acces) */
  /* Chips de produits : défilement horizontal, gouttière de 16 px conservée par le snap */
  .purchases-list { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; gap: 8px; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; }
  /* 4 px en haut : l'anneau de focus (2 px + décalage 2 px) n'est pas rogné par le défilement */
  .purchases-list::-webkit-scrollbar { display: none; }
  .purchase { position: relative; flex: none; width: auto; max-width: none; min-height: 48px; padding: 6px 14px 6px 6px; gap: 10px; border-radius: 14px; border-color: var(--line); background: var(--white); font-size: 14px; font-weight: 600; scroll-snap-align: start; }
  .purchase[aria-current="true"] { border-color: var(--ink); }
  .purchase .thumb { width: 32px; height: 32px; border-radius: 8px; }
  .purchase .meta { flex: none; gap: 0; }
  .purchase .meta b, .purchase .purchase-bar, .purchase .meta .pct { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .purchase .meta .purchase-cat { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
  /* Squelette calé sur la chip réelle (48 px, une ligne) : pas de saut au chargement */
  .purchase-skeleton { height: 48px; }
  .purchase-skeleton .meta { gap: 0; }
  .purchase-skeleton .meta .skeleton-text { max-width: 72px; margin: 0; }
  .purchase-skeleton .meta .skeleton-text + .skeleton-text { display: none; }

  .viewer { background: transparent; padding: 0; border-radius: 0; gap: 18px; }
  .viewer .video-box { border-radius: 16px; }
  .viewer .play { width: 56px; height: 56px; }
  .viewer .play svg { width: 20px; height: 20px; }
  .viewer .video-box.is-empty { gap: 10px; }
  .viewer .video-box.is-empty .video-label { font-size: 13px; }
  .viewer-head { flex-wrap: nowrap; align-items: flex-end; }
  .viewer-head h2 { font-size: 20px; }
  .progress { font-size: 13px; padding: 6px 10px; }
  .viewer-body { gap: 18px; }
  .lessons { gap: 4px; }
  .viewer h3 { font-size: 13px; }
  .lesson { padding: 12px; }
  .lesson .num { width: 26px; }
  .lesson-actions .btn { flex: 1 1 auto; }
  /* Terminé seul en première ligne, déjà premier dans le DOM : pas de zigzag au Tab */
  #lesson-done { flex-basis: 100%; }
  #lesson-prev { margin-left: 0; }
  .course-text { white-space: normal; }
  /* Commandes : posées sur la page comme le lecteur, séparées par un filet */
  .orders { background: transparent; padding: 20px 0 0; border-radius: 0; border-top: 1px solid var(--line); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .purchase-bar span, .course-progress .bar span { transition: none; }
}
/* === fin achats === */
/* === page: contact === */
/* Colonne droite : FAQ puis formulaire (la colonne gauche garde h1, cartes et horaires). */
.contact-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.contact-main .faq { flex: none; }
.contact-card.dark { border: 0; }
.contact-hours { margin: 0; display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--muted); line-height: 1.45; }
.contact-hours .ico { flex: none; margin-top: 2px; color: var(--ink); }
.contact-hours b { color: var(--ink); font-weight: 600; }
.contact-form { border: 1px solid var(--line-2); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 18px; background: var(--white); }
.contact-form h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; font-weight: 700; }
.contact-form-intro { margin: -10px 0 0; font-size: 15px; color: var(--muted); }
.contact-form .field-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.contact-form .error:empty { display: none; }
.contact-form select.input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.contact-form textarea.input { resize: vertical; min-height: 128px; line-height: 1.5; }
.contact-form .input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.contact-form .optional { font-weight: 400; color: var(--muted-2); }
.contact-form-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.contact-count { flex: none; white-space: nowrap; margin-left: auto; font-size: 13px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.contact-alt { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.contact-alt a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; vertical-align: middle; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.faq-search { margin-bottom: 4px; }
.faq-search .input { padding-left: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235C5C58' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 16px center; }
.faq-count { margin: 4px 0 0; font-size: 13px; color: var(--muted-2); min-height: 18px; }
.faq-count:empty { min-height: 0; margin: 0; }
.faq-q mark { background: var(--accent); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.faq-empty { margin: 16px 0 0; padding: 20px; border-radius: 16px; background: var(--soft); font-size: 15px; color: var(--muted); }
.faq-empty a { display: inline-block; position: relative; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* Zone tactile de 44px (C5) portée par un pseudo-élément, surtout vers le bas (padding de la
   boîte) : l'anneau de focus reste serré sur le lien et la zone ne recouvre pas la ligne
   « Aucune réponse trouvée. » quand le lien passe à la ligne (320-390px). */
.faq-empty a::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -19px; }
/* Titre neutre autour de chaque question (APG Accordion) : aucun changement visuel, le bouton garde son style. */
.faq-h { margin: 0; font: inherit; overflow-wrap: inherit; -webkit-hyphens: manual; hyphens: manual; }
/* Lignes squelettes du HTML (même boîte que .faq-q / .faq-a) : réservent la place de la FAQ avant le rendu JS. */
.faq-skel .faq-q { cursor: default; }
.faq-skel .sign { visibility: hidden; }
@media (max-width: 720px) {
  .contact-main { gap: 28px; }
  .contact-card { border-radius: 20px; gap: 14px; }
  .contact-card .ic { width: 48px; height: 48px; border-radius: 14px; }
  .contact-card.dark .ic svg { width: 22px; height: 22px; }
  .contact-card:not(.dark) .ic svg { width: 20px; height: 20px; }
  .contact-card .t { gap: 2px; }
  .contact-card .t b { font-size: 18px; }
  .contact-card .t span { font-size: 14px; }
  .faq h2 { font-size: 24px; margin-bottom: 12px; }
  .faq-q { font-size: 16px; padding: 18px 0; gap: 12px; }
  .faq-q .sign { font-size: 22px; }
  .faq-a { font-size: 15px; margin-bottom: 18px; }
  .contact-form { padding: 20px; border-radius: 20px; }
}
/* === fin contact === */
/* === page: conditions === */
.legal h2, .legal h1 { scroll-margin-top: 24px; }
.legal h2:focus, .legal h1:focus { outline: none; }
.legal h2:focus-visible, .legal h1:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.legal-toc { background: var(--soft); border-radius: var(--radius-lg); padding: 24px 28px; }
.legal-toc-titre { margin: 0 0 12px; font-weight: 600; }
/* Ne pas supprimer : « .legal p » (0,1,1) l'emporterait sur « .legal-toc-titre ». */
.legal p.legal-toc-titre { font-size: 14px; line-height: 1.4; color: var(--ink); }
/* Bouton de repli : mobile uniquement. */
.legal-toc-toggle { display: none; }
.legal-toc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.legal-toc-list a { display: flex; align-items: center; min-height: var(--tap); padding: 10px 12px; margin: 0 -12px; border-radius: 10px; font-size: 15px; line-height: 1.4; color: var(--body); transition: background 0.15s, color 0.15s; }
.legal-toc-list a:hover { background: var(--white); color: var(--ink); }
.legal-toc-list a[aria-current="true"] { background: var(--white); color: var(--ink); font-weight: 600; }
.legal p.legal-top { margin: 0; padding-top: 32px; border-top: 1px solid var(--line); font-size: 15px; }
.legal-top-link { font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); text-decoration: none; }
@media (max-width: 720px) {
  .legal-head { gap: 10px; }
  /* Même sélecteur que la base pour couvrir aussi le span [data-maj] imbriqué. */
  .legal-head span { font-size: 13px; }
  .legal section { gap: 8px; padding-top: 24px; }
  .legal h2 { font-size: 18px; }
  .legal section p { font-size: 15px; }
  .legal p.legal-top { padding-top: 24px; }
  .legal-toc { padding: 6px 20px; border-radius: 16px; }
  /* Sommaire replié : le titre visible devient le bouton (le <p> reste le nom accessible du nav). */
  .legal p.legal-toc-titre { display: none; }
  .legal-toc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% + 24px); min-height: var(--tap); margin: 0 -12px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; text-align: left; cursor: pointer; }
  .legal-toc-toggle .ico { transition: transform 0.15s; }
  .legal-toc-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
  .legal-toc-toggle[aria-expanded="false"] + .legal-toc-list { display: none; }
  .legal-toc-toggle[aria-expanded="true"] + .legal-toc-list { padding-bottom: 12px; }
}
@media print {
  body[data-page="conditions"] { display: block; min-height: 0; background: #fff; color: #000; }
  body[data-page="conditions"] .site-header .nav-link,
  body[data-page="conditions"] .site-header nav,
  body[data-page="conditions"] .site-header button,
  body[data-page="conditions"] .site-footer,
  body[data-page="conditions"] .toast-region,
  body[data-page="conditions"] .legal-toc,
  body[data-page="conditions"] .legal-top { display: none !important; }
  body[data-page="conditions"] .site-header { border-bottom: 1px solid #999; }
  body[data-page="conditions"] .site-header .wrap { padding: 0 0 8pt; }
  body[data-page="conditions"] .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  body[data-page="conditions"] .legal { padding: 16pt 0 0; gap: 14pt; }
  .legal-head h1 { font-size: 22pt; color: #000; }
  .legal-head span { font-size: 10pt; color: #333; }
  .legal section { padding-top: 10pt; gap: 4pt; border-top-color: #bbb; break-inside: avoid; page-break-inside: avoid; }
  .legal h2 { font-size: 13pt; color: #000; break-after: avoid; page-break-after: avoid; }
  .legal p { font-size: 11pt; line-height: 1.5; color: #000; orphans: 3; widows: 3; }
  .legal a { color: #000; text-decoration: none; }
  @page { margin: 18mm 16mm; }
}
/* === fin conditions === */
/* === page: erreur404 === */
/* Espacements desktop : la règle de base .notfound (padding 96px 24px, gap 24px) s'applique (maquette Erreur404). */
.notfound .nf-lead { max-width: 440px; text-wrap: pretty; }
/* Mot composé insécable : évite « ci- » / « dessous. » sur deux lignes à 320px */
.nf-nobr { white-space: nowrap; }
/* Liens rapides : style des chips du DS (14px 600, 12px 18px, bordure line-2) */
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nf-links a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 12px 18px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--white); }
.nf-links a:hover { border-color: var(--ink); color: var(--ink); }
.nf-suggest { width: 100%; max-width: 480px; margin-top: 16px; text-align: left; }
.nf-suggest h2 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.nf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nf-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.nf-item:hover { border-color: var(--ink); color: var(--ink); }
/* Miniature : couverture sur sa teinte, bord thumb-border #E4E3DC, rayon 12 (comme .order-thumb) */
.nf-dot { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid #E4E3DC; overflow: hidden; background: var(--soft); }
.nf-dot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nf-dot img[src$=".svg"] { transform: scale(2); } /* même zoom que .order-thumb (section visuels) */
/* Ligne de repli (catalogue vide ou indisponible) : icône centrée dans la miniature */
.nf-dot-ico { display: grid; place-items: center; color: var(--muted); }
.nf-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nf-cat { font-size: 12px; color: var(--muted); }
/* Nom sur plusieurs lignes si besoin (1.4.12 espacement du texte, noms longs) : pas de troncature, l'item grandit en hauteur */
.nf-nom { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.nf-prix { flex: none; font-size: 14px; font-weight: 600; }
/* Lignes squelettes du HTML (même structure qu'un .nf-item, donc même hauteur) : barres sans texte, invisibles en couleurs forcées */
.nf-skel-bar { display: inline-block; width: 6em; max-width: 100%; height: 1em; vertical-align: middle; }
.nf-nom .nf-skel-bar { width: 11em; }
.nf-skel .nf-item:hover { border-color: var(--line); }
@media (prefers-reduced-motion: reduce) { .nf-item { transition: none; } }
/* Sans JavaScript, erreur.js ne remplace jamais les squelettes : on masque la section (pas de style inline) */
@media (scripting: none) { .nf-suggest { display: none; } }
@media (max-width: 720px) {
  /* 64px en haut : le bloc accent du 0 dépasse la ligne et ne doit pas toucher le header (gardé, D5) */
  .notfound { padding: 64px 16px; gap: 20px; }
  .big404 { font-size: clamp(96px, 31vw, 120px); }
  .big404 span { border-radius: 20px; padding: 0 8px; }
  .notfound h1 { font-size: 26px; }
  .notfound > .btn { align-self: stretch; font-size: 17px; padding: 18px; }
  .nf-links a { padding: 10px 16px; }
}
/* === fin erreur404 === */
/* === page: chrome === */
/* Lien d'évitement : invisible jusqu'au focus clavier */
.skip-link { position: absolute; left: 16px; top: 8px; z-index: 100; transform: translateY(-200%); background: var(--ink); color: var(--white); font-size: 15px; font-weight: 600; padding: 12px 18px; min-height: var(--tap); display: inline-flex; align-items: center; border-radius: 999px; transition: transform 0.15s; }
.skip-link:focus, .skip-link:focus-visible { transform: none; color: var(--white); outline: 2px solid var(--accent); outline-offset: 2px; }
main[tabindex="-1"]:focus { outline: none; }

/* Lien actif (aria-current="page") */
.nav-link[aria-current="page"] { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-pill[aria-current="page"] { background: var(--ink); color: var(--white); text-decoration: none; }
/* Filet ink (18,9:1) et soulignement comme la nav desktop : le filet accent ne faisait que 1,13:1 sur blanc (WCAG 1.4.11) */
.mobile-menu a[aria-current="page"]:not(.btn) { box-shadow: inset 4px 0 0 var(--ink); padding-left: 14px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.footer-links a[aria-current="page"] { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-links a.dim[aria-current="page"] { color: var(--dim-on-ink); }

/* Pied de page complet (pages vitrine, D7) */
.footer-brand { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.site-footer a.brand-name { color: var(--white); }
.site-footer a.brand-name:hover { color: var(--dim-on-ink); }
.footer-tagline { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted-on-ink); }
.footer-copy { flex-basis: 100%; margin: 0; padding-top: 24px; border-top: 1px solid var(--ink-hover); font-size: 13px; color: var(--muted-on-ink); }

/* Pied de page minimal (tunnel et compte : paiement, attente, confirmation, connexion, mes achats — D7) */
.site-footer.footer-min { background: transparent; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer.footer-min .wrap { padding-top: 20px; padding-bottom: 28px; }
.footer-min .footer-links { gap: 20px; }
.footer-min .footer-links a { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.footer-min .footer-links a.dim { color: var(--muted); }
.footer-min .footer-links a:hover { color: var(--ink-hover); }
.footer-min .footer-links a[aria-current="page"] { color: var(--ink); }
.footer-min .footer-copy { flex-basis: auto; padding-top: 0; border-top: 0; color: var(--muted); }
.site-footer.footer-min :focus-visible { outline-color: var(--ink); }

@media (max-width: 720px) {
  /* align-self: stretch : le filet du copyright couvre toute la largeur (colonne alignée à gauche) */
  .footer-copy { padding-top: 20px; align-self: stretch; }
  .site-footer.footer-min .wrap { flex-direction: row; flex-wrap: wrap-reverse; align-items: center; gap: 4px 20px; padding-top: 12px; padding-bottom: 24px; }
  .footer-min .footer-links { flex-direction: row; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
@media print { .skip-link { display: none; } }
/* Contraste forcé : les états actifs ne tenaient qu'à un fond ou une couleur de bordure, que le mode
   remplace. Placé après les sections de page pour l'emporter à spécificité égale (bloc mobile de la section achats). */
@media (forced-colors: active) {
  .chip[aria-pressed="true"], .nav-pill[aria-current="page"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .purchase { border-color: Canvas; }
  .purchase[aria-current="true"] { border-color: Highlight; }
  .btn { border: 1px solid ButtonText; }
  .course-progress .bar, .purchase-bar { outline: 1px solid CanvasText; }
  .course-progress .bar span, .purchase-bar span { forced-color-adjust: none; background: CanvasText; }
}
/* === fin chrome === */
/* === page: visuels === */
/* Visuels produits (assets/img/*.svg) : fond transparent, la teinte du produit
   (style.background posé par le JS) passe derrière. Composition centrée, donc
   le recadrage object-fit: cover reste lisible en 4:3, 16:10, 1:1 et en vignette. */
.card-media img,
.media-box img,
.purchase .thumb img,
.order-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card-media img { position: absolute; inset: 0; transition: transform .4s ease; }
.card-media .badge { z-index: 1; }
.card:hover .card-media img { transform: scale(1.03); }
.media-box { position: relative; }
.order-thumb { overflow: hidden; }
/* Vignettes (40-56 px) : zoom sur le motif central pour qu'il reste reconnaissable.
   2 et non 1.7 : à 1.7, les pastilles décoratives des visuels (x >= 560 ou <= 252
   sur 800) entraient à moitié dans le cadre et laissaient un fragment coupé dans un coin. */
.purchase .thumb img[src$=".svg"],
.order-thumb img[src$=".svg"] { transform: scale(2); }
@media (prefers-reduced-motion: reduce) {
  .card-media img { transition: none; }
  .card:hover .card-media img { transform: none; }
}
/* === fin visuels === */
