/* ══════════════════════════════════════════════════════════════════════════
   VisualCall — charte « Épure » (direction D, novembre 2026)
   Feuille partagée des pages refondues. Écrite « mobile d'abord » : les règles
   de base valent pour un téléphone de 320 px, les @media élargissent ensuite.

   Accessibilité — à préserver en modifiant ce fichier :
   - chaque couple texte/fond est à 6,6:1 au minimum (seuil AA : 4,5:1) ;
   - les bordures de champs et de boutons contournés sont à 3:1 au minimum ;
   - aucune zone cliquable sous 44 px ; aucun texte sous 15 px ;
   - les tailles sont en rem : le zoom texte du navigateur est respecté.
   ══════════════════════════════════════════════════════════════════════════ */

/* Manrope, hébergée chez nous (licence OFL : fonts/LICENSE-Manrope.txt).
   Aucun appel à un tiers. Le japonais et le chinois retombent sur la police
   système : Manrope ne contient pas ces écritures. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* Fonds */
  --bg: #f0f1f4;        /* page */
  --sf: #ffffff;        /* cartes */
  --sf2: #f5f6f8;       /* champs, survols */
  --line: #d6d9e1;      /* filets décoratifs */
  --bd: #7d8498;        /* bordures de contrôles (3,3:1 au minimum) */
  /* Textes */
  --tx: #1c2030;        /* 16,2:1 sur carte */
  --tx2: #4d5468;       /* 7,5:1 sur carte, 6,7:1 sur page */
  /* Bleu VisualCom adouci (indigo désaturé) */
  --pr: #3d4a80;        /* 8,4:1 avec du texte blanc */
  --pr-hover: #323d6b;
  --tint: #e8eaf3;      /* pastilles : texte --pr dessus à 7:1 */
  --ac: #8fd6dc;        /* turquoise éclairci : décor et aplats sur --pr seulement */
  /* Mesures */
  --r-lg: 1.5rem;
  --r-md: 1.25rem;
  --gap: 0.75rem;
  --pad: 1rem;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;   /* la barre du haut est collante */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Focus clavier : anneau bicolore, visible sur fond clair comme sur fond bleu */
:focus-visible {
  outline: 3px solid var(--tx);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px var(--sf);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Lien d'évitement : premier élément atteint au clavier */
.skip {
  position: absolute; left: -999rem; top: 0.5rem; z-index: 100;
  background: var(--tx); color: #fff; font-weight: 700;
  padding: 0.75rem 1.25rem; border-radius: 999px;
}
.skip:focus { left: 0.5rem; }

/* ── Conteneur ─────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 77.5rem;
  margin-inline: auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

/* ── Boutons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.625rem 1.5rem;
  border: 2px solid transparent; border-radius: 999px;
  font-size: 1rem; font-weight: 800; line-height: 1.25; text-align: center;
  text-decoration: none; cursor: pointer;
}
.btn-lg { min-height: 3.5rem; padding: 0.875rem 1.25rem; font-size: 1.0625rem; }
.btn-primary { background: var(--pr); color: #fff; }
.btn-primary:hover { background: var(--pr-hover); }
.btn-ghost { border-color: var(--bd); color: var(--tx); font-weight: 700; }
.btn-ghost:hover { background: var(--sf2); border-color: var(--tx); }
.btn-invert { background: #fff; color: var(--pr); }
.btn-invert:hover { background: var(--tint); }
.btn-block { display: flex; width: 100%; }

.link { color: var(--pr); font-weight: 700; text-underline-offset: 0.25em; }
.link:hover { color: var(--pr-hover); }

/* Pastille d'information */
.tag {
  display: inline-block; background: var(--tint); color: var(--pr);
  font-size: 0.9375rem; font-weight: 700; line-height: 1.3;
  padding: 0.4375rem 0.875rem;
  border-radius: 1.125rem;   /* pilule sur une ligne ; reste propre si le libellé passe sur deux lignes */
}
.tag-invert { background: #fff; color: var(--pr); }

/* Carte */
.card { background: var(--sf); border-radius: var(--r-lg); padding: 1.5rem; }
.card-pn { background: var(--pr); color: #fff; }

/* ── Barre du haut ─────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.top-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; min-height: 2.75rem; flex-shrink: 0; }
.brand img { display: block; height: 1.625rem; width: auto; }

.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-right: -0.5rem;
  background: var(--sf); border: 0; border-radius: 50%; cursor: pointer;
}
.burger .ico-close { display: none; }
.burger[aria-expanded="true"] .ico-open { display: none; }
.burger[aria-expanded="true"] .ico-close { display: block; }

/* Sur téléphone et tablette : panneau déroulant sous la barre */
.nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow-y: auto;
  flex-direction: column; gap: 0.75rem;
  background: var(--sf); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.75rem;
}
.nav.open { display: flex; }
.nav-links { display: flex; flex-direction: column; }
.nav-links a {
  display: flex; align-items: center; min-height: 3rem; padding: 0 0.75rem;
  border-radius: 0.75rem; font-size: 1.0625rem; font-weight: 700; text-decoration: none;
}
.nav-links a:hover { background: var(--sf2); }
.nav-side { display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.nav-login { display: flex; align-items: center; justify-content: center; min-height: 3rem; font-weight: 700; text-decoration: none; border-radius: 999px; }
.nav-login:hover { background: var(--sf2); }

/* Sélecteur de langue (balisage produit par js/i18n.js) */
#langSelector { position: relative; }
.lang-flag { display: none; }   /* drapeaux en émoji : rendu inégal selon l'appareil */
.lang-trigger {
  display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 3rem; padding: 0 1rem;
  background: var(--sf2); border: 0; border-radius: 999px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
}
.lang-trigger:hover { background: var(--tint); }
.lang-trigger-arrow { font-size: 0.75rem; }
.lang-menu { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem; margin-top: 0.5rem; }
#langSelector.open .lang-menu { display: grid; }
.lang-option {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 0.75rem;
  background: none; border: 0; border-radius: 0.75rem;
  font-size: 1rem; font-weight: 600; text-align: left; cursor: pointer;
}
.lang-option:hover { background: var(--sf2); }
.lang-option.active { background: var(--tint); color: var(--pr); font-weight: 800; }
.lang-option-code { font-size: 0.875rem; font-weight: 700; color: var(--tx2); }

/* À partir de 1152 px : navigation complète sur une ligne */
@media (min-width: 72rem) {
  .burger { display: none; }
  .nav {
    display: flex; position: static; flex: 1; flex-direction: row; align-items: center;
    max-height: none; overflow: visible; gap: 1rem;
    background: none; border: 0; border-radius: 0; padding: 0;
  }
  .nav-links { flex-direction: row; margin-inline: auto; background: var(--sf); border-radius: 999px; padding: 0.3125rem; }
  .nav-links a { min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; font-size: 1rem; }
  .nav-side { flex-direction: row; align-items: center; gap: 0.75rem; border: 0; padding: 0; }
  .nav-login { padding: 0 0.75rem; white-space: nowrap; }
  .nav-side .btn { white-space: nowrap; }
  .lang-trigger { background: var(--sf); min-height: 2.75rem; }
  .lang-menu {
    position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 60;
    grid-template-columns: 1fr; min-width: 12rem; margin: 0;
    background: var(--sf); border: 1px solid var(--line); border-radius: 1rem; padding: 0.375rem;
  }
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.sec { margin-top: 3.5rem; }
.sec-head { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }
.sec-head p { color: var(--tx2); font-size: 1.0625rem; max-width: 34em; }

/* max-width + anywhere : un titre placé dans une colonne flex prend sinon la largeur de son
   mot le plus long et pousse la page hors écran (vécu : « Audionachrichten » à 320 px).
   La coupure en plein mot reste un dernier recours, jamais utilisée si le mot tient. */
h1, h2, h3 { text-wrap: balance; max-width: 100%; overflow-wrap: anywhere; }
/* Césure propre des mots longs (l'allemand surtout : « Durchsage-sprachen ») plutôt
   qu'une coupure sèche au milieu du mot. Repose sur l'attribut lang posé par i18n.js. */
h1, h2, h3, .tag, .stat-l, .plan-list li, .btn { hyphens: auto; }
/* Japonais : couper aux frontières de groupes de mots, jamais au milieu d'un mot */
:lang(ja) { word-break: auto-phrase; }
.h1 { font-size: clamp(2.125rem, 1rem + 4.2vw, 4rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; }
.h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; }
.h3 { font-size: 1.25rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }

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

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { display: grid; gap: var(--gap); margin-top: 0.5rem; }
.hero-main { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.hero-lead { color: var(--tx2); font-size: 1.0625rem; max-width: 33em; }
.hero-cta { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; margin-top: 0.5rem; }
.hero-side { display: grid; gap: var(--gap); }
.demo-card { display: flex; flex-direction: column; gap: 1rem; }
.demo-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; font-size: 0.9375rem; font-weight: 600; }
.demo-time { font-size: clamp(3.5rem, 2.4rem + 5.5vw, 5.25rem); font-weight: 700; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.demo-quote { font-size: 1.125rem; font-weight: 500; line-height: 1.45; }
.demo-voice { font-size: 1rem; font-weight: 600; margin-top: auto; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.stat { padding: 1.25rem; border-radius: var(--r-md); }
.stat-n { display: block; font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.stat-l { display: block; margin-top: 0.25rem; color: var(--tx2); font-size: 1rem; font-weight: 600; line-height: 1.3; }

/* ── Usages ────────────────────────────────────────────────────────────── */
.use { display: flex; flex-direction: column; gap: 0.625rem; border-radius: var(--r-md); }
.use p { color: var(--tx2); line-height: 1.55; }
.use .play { align-self: flex-end; margin-top: auto; }
.use.is-playing { box-shadow: inset 0 0 0 2px var(--pr); }

/* ── Écouter ───────────────────────────────────────────────────────────── */
.listen { display: grid; gap: 1.5rem; }
.listen-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.listen-intro p { color: var(--tx2); font-size: 1.0625rem; }
.listen-intro .btn { margin-top: 0.5rem; }
.tracks { background: var(--sf); border-radius: var(--r-lg); padding: 0.5rem; }
.track { display: flex; align-items: center; gap: 0.875rem; padding: 0.625rem; border-radius: 1rem; }
.track + .track { margin-top: 0.125rem; }
.track.is-playing { background: var(--sf2); }
.track-body { min-width: 0; flex: 1; }
.track-title { display: block; font-size: 1.0625rem; font-weight: 800; line-height: 1.3; }
.track-sub { display: block; color: var(--tx2); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.track-desc { display: block; color: var(--tx2); font-size: 0.9375rem; line-height: 1.4; }
.play {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: var(--pr); color: #fff; cursor: pointer;
}
.play:hover { background: var(--pr-hover); }
.play .ico-pause { display: none; }
.is-playing .play .ico-play { display: none; }
.is-playing .play .ico-pause { display: block; }

/* ── Fonctionnement ────────────────────────────────────────────────────── */
.steps { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.step { display: flex; flex-direction: column; gap: 0.5rem; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; margin-bottom: 0.25rem;
  background: var(--tint); color: var(--pr); font-weight: 800;
}
.step p { color: var(--tx2); }

/* ── Sortant / entrant ─────────────────────────────────────────────────── */
.vs-card { display: flex; flex-direction: column; gap: 0.5rem; border-radius: var(--r-md); border: 2px solid transparent; }
.vs-us { border-color: var(--pr); }
.vs-them { background: transparent; border-color: var(--bd); }
.vs-card p { color: var(--tx2); }
.vs-more { margin-top: 1rem; }
.vs-more .link { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ── Tarifs ────────────────────────────────────────────────────────────── */
.plan { display: flex; flex-direction: column; gap: 1.125rem; border-radius: var(--r-md); }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; }
.plan-name { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.plan-flag { font-size: 0.9375rem; font-weight: 700; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.625rem; font-variant-numeric: tabular-nums; }
.plan-amount { font-size: 3.5rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.045em; white-space: nowrap; }
.plan-per { color: var(--tx2); }
.plan-year { color: var(--tx2); font-size: 1rem; margin-top: -0.75rem; }
.plan-list { display: grid; gap: 0.625rem; line-height: 1.45; }
.plan-list li { padding-left: 1.375rem; position: relative; }
.plan-list li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--pr); }
.plan .btn { margin-top: auto; }
.plan.card-pn .plan-per, .plan.card-pn .plan-year { color: #fff; }
.plan.card-pn .plan-list li::before { background: var(--ac); }

.ent { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin-top: var(--gap); border-radius: var(--r-md); }
.ent p { font-size: 1.0625rem; }
.ent span { color: var(--tx2); }
.ent .link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.legend { margin-top: 1rem; color: var(--tx2); font-size: 0.9375rem; max-width: 60em; }

/* ── Pied de page ──────────────────────────────────────────────────────── */
.foot { margin-top: 4rem; padding-top: 1.5rem; padding-bottom: max(2rem, env(safe-area-inset-bottom)); display: grid; gap: 1rem; color: var(--tx2); font-size: 0.9375rem; }
.foot img { display: block; height: 1.375rem; width: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.foot-nav a, .foot a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--pr); font-weight: 600; text-underline-offset: 0.25em; }
.foot-legal { display: grid; gap: 0.125rem; }
.foot-legal a { display: inline; min-height: 0; }

/* ── En-tête de page intérieure ────────────────────────────────────────── */
.page-head { display: grid; gap: 1rem; justify-items: start; margin-top: 1rem; max-width: 46rem; }
.page-head p { color: var(--tx2); font-size: 1.0625rem; }
.h1-sm { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); }

/* ── Formulaires ───────────────────────────────────────────────────────── */
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.5rem; min-width: 0; }
.field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.label { font-size: 1rem; font-weight: 700; }
.input {
  width: 100%; padding: 0.875rem 1rem;
  border: 1.5px solid var(--bd); border-radius: 0.875rem;
  background: var(--sf2); color: var(--tx);
  font: inherit; font-size: 1rem; line-height: 1.5;   /* 16 px : pas de zoom forcé sur iPhone */
}
.input:hover { border-color: var(--tx); }
.input::placeholder { color: var(--tx2); opacity: 1; }
textarea.input { min-height: 8.5rem; resize: vertical; }

/* Puces à choix unique (tonalité) : l'état actif porte une coche, pas seulement une couleur */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 2.75rem; padding: 0 1rem;
  border: 0; border-radius: 999px; background: var(--bg);
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
.chip:hover { background: var(--tint); }
.chip svg { display: none; flex-shrink: 0; }
.chip.selected { background: var(--pr); color: #fff; font-weight: 800; padding-left: 0.75rem; }
.chip.selected svg { display: block; }

/* Cartes à choix unique (voix) */
/* Sur téléphone : une voix par ligne (nom à gauche, style à droite). Deux colonnes
   étroites coupaient « Professionnelle » au milieu du mot. La grille n'arrive qu'à 480 px. */
.choices { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.choice {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 3rem; padding: 0.5rem 2.75rem 0.5rem 0.875rem;
  border: 2px solid transparent; border-radius: 1rem; background: var(--bg);
  text-align: left; cursor: pointer; min-width: 0;
}
.choice:hover { background: var(--tint); }
.choice > span { max-width: 100%; overflow-wrap: break-word; }
.choice-name { font-weight: 800; line-height: 1.3; }
.choice-sub { color: var(--tx2); font-size: 0.9375rem; line-height: 1.3; hyphens: auto; }
.choice svg { display: none; position: absolute; top: 50%; right: 0.875rem; transform: translateY(-50%); color: var(--pr); }
.choice.selected { background: var(--tint); border-color: var(--pr); }
.choice.selected svg { display: block; }

.range-row { display: flex; align-items: center; gap: 1rem; }
.range-row input[type="range"] { flex: 1; min-width: 0; min-height: 2.75rem; margin: 0; accent-color: var(--pr); }
.range-val { min-width: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }

/* Messages d'état : icône + texte, jamais la couleur seule */
.msg { display: flex; gap: 0.625rem; align-items: flex-start; border-radius: 1rem; padding: 1rem; font-weight: 600; line-height: 1.45; }
.msg svg { flex-shrink: 0; margin-top: 0.15em; }
.msg-body { flex: 1; min-width: 0; }
.msg-info { background: var(--tint); }
.msg-ok { background: #e3f1e8; color: #14532d; }     /* 8,4:1 */
.msg-err { background: #fbe9e7; color: #8a1c12; }    /* 8,0:1 */
.msg-hint { display: block; margin-top: 0.5rem; color: var(--tx2); font-weight: 500; }
.progress { height: 0.5rem; margin-top: 0.75rem; border-radius: 999px; background: #fff; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--pr); }

/* ── Page de démonstration ─────────────────────────────────────────────── */
.demo-layout { display: grid; gap: var(--gap); margin-top: 2rem; }
.demo-aside { display: grid; gap: 1rem; align-content: start; margin-top: 2rem; }
.demo-aside p { color: var(--tx2); }
.captcha { min-height: 4.0625rem; max-width: 100%; overflow: hidden; }
.gen-history { display: grid; gap: 0.75rem; }
.gen-history:empty { display: none; }
.gen-item { display: grid; gap: 0.75rem; background: var(--bg); border-radius: 1rem; padding: 1rem; }
.gen-item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; }
.gen-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-weight: 800; }
.gen-time { color: var(--tx2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.gen-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.gen-speed { display: flex; align-items: center; gap: 0.625rem; flex: 1 1 12rem; min-width: 0; font-size: 0.9375rem; font-weight: 600; }
.gen-speed input[type="range"] { flex: 1; min-width: 0; min-height: 2.75rem; margin: 0; accent-color: var(--pr); }
.gen-cta { color: var(--tx2); font-size: 0.9375rem; }
.gen-cta a { color: var(--pr); font-weight: 700; text-underline-offset: 0.25em; }

/* Fenêtre « créez un compte » */
.gate-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(28, 32, 48, 0.62); overflow-y: auto;
}
.gate-box { display: grid; gap: 0.75rem; width: 100%; max-width: 26rem; background: var(--sf); border-radius: var(--r-lg); padding: 1.5rem; }
.gate-box p { color: var(--tx2); margin-bottom: 0.5rem; }

/* ── Pages d'authentification (connexion, inscription) ─────────────────── */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.auth-top .link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.auth-main { flex: 1; display: grid; align-content: start; justify-items: center; padding-top: 1rem; padding-bottom: 3rem; }
.auth-card { width: 100%; max-width: 28rem; display: grid; gap: 1.5rem; }
.auth-card-wide { max-width: 34rem; }
.auth-head { display: grid; gap: 0.625rem; justify-items: start; }
.auth-head p { color: var(--tx2); }
.auth-alt { color: var(--tx2); text-align: center; }
.auth-alt .link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.auth-foot { padding-top: 1rem; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); color: var(--tx2); font-size: 0.9375rem; text-align: center; }
[hidden] { display: none !important; }

.field-row { display: grid; gap: 1.5rem; }
.hint { color: var(--tx2); font-size: 0.9375rem; line-height: 1.45; }
.input.error { border-color: #8a1c12; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Champ mot de passe avec bouton « afficher » */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 3.5rem; }
.pw-toggle {
  position: absolute; top: 50%; right: 0.25rem; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 0.75rem; background: none;
  color: var(--tx2); cursor: pointer;
}
.pw-toggle:hover { background: var(--tint); color: var(--tx); }

/* Solidité du mot de passe : nombre de barres + libellé écrit (jamais la couleur seule) */
.strength { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.375rem; }
.strength span { height: 0.375rem; border-radius: 999px; background: var(--line); }
.strength span.on { background: var(--pr); }

/* Code à 6 chiffres : UN seul champ (collage, remplissage automatique et lecteurs
   d'écran fonctionnent ; six cases séparées faisaient 33 px de large sur téléphone) */
.otp-input {
  width: 100%; max-width: 16rem; padding: 0.75rem 0.5rem;
  border: 1.5px solid var(--bd); border-radius: 0.875rem; background: var(--sf2); color: var(--tx);
  font: inherit; font-size: 1.75rem; font-weight: 800; letter-spacing: 0.3em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.otp-input.error { border-color: #8a1c12; background: #fbe9e7; }

.check-row { display: flex; align-items: flex-start; gap: 0.75rem; line-height: 1.5; cursor: pointer; }
.check-row input { flex-shrink: 0; width: 1.375rem; height: 1.375rem; margin: 0.1rem 0 0; accent-color: var(--pr); }

.back-link {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 2.75rem; padding: 0 0.5rem 0 0; border: 0; background: none;
  color: var(--pr); font-weight: 700; cursor: pointer;
}

/* ══ À partir de 480 px ═════════════════════════════════════════════════ */
@media (min-width: 30rem) {
  .hero-cta { flex-direction: row; flex-wrap: wrap; width: auto; }
  .btn-lg { padding-inline: 2rem; }
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  /* Voix : grille de cartes (nom au-dessus du style) */
  .choices { grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr)); }
  .choice { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0.125rem; min-height: 3.75rem; padding: 0.625rem 0.75rem; }
  .choice svg { top: 0.625rem; right: 0.625rem; transform: none; }
  .choice.selected .choice-name { padding-right: 1.25rem; }
}

/* ══ À partir de 640 px ═════════════════════════════════════════════════ */
@media (min-width: 40rem) {
  :root { --pad: 1.5rem; }
  .card { padding: 2rem; }
  .use, .vs-card, .plan, .ent, .stat { padding: 1.625rem; }
  .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .hero-lead { font-size: 1.1875rem; }
  .demo-quote { font-size: 1.25rem; }
  .ent { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; }
  /* Tablette : le panneau du menu s'aligne à droite au lieu de barrer toute la largeur */
  .nav { left: auto; right: max(var(--pad), env(safe-area-inset-right)); width: 22rem; }
}

/* ══ À partir de 960 px ═════════════════════════════════════════════════ */
@media (min-width: 60rem) {
  .sec { margin-top: 5rem; }
  .sec-head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; gap: 3rem; margin-bottom: 2rem; }
  .sec-head-solo { grid-template-columns: 1fr; }
  .hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .hero-main { padding: 3rem; gap: 1.75rem; }
  .hero-cta { margin-top: auto; padding-top: 0.5rem; }
  .hero-side { grid-template-rows: 1fr auto; }
  .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listen { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 3rem; align-items: start; }
  .how { padding: 2.75rem 3rem 3rem; }
  .stat-n { font-size: 3.25rem; }
  .foot { grid-template-columns: auto 1fr; align-items: center; column-gap: 2.5rem; }
  .foot-legal { grid-column: 1 / -1; }
  .demo-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .demo-aside { margin-top: 0.5rem; }
}
