/* Réplique — site de démonstration (linerec.com)
   Les couleurs et les polices sont celles de l'appli (lib/theme.ts et
   app/_layout.tsx, relevées le 20/10). La page est une brochure de
   comédien : tes répliques surlignées en bleu, ou cachées. */

:root {
  --papier: #f8fbfb;          /* background */
  --carte: #fcfdfd;           /* surface */
  --carte-choisie: #eaf2f4;   /* surfaceSelected */
  --encre: #14202b;           /* ink */
  --crayon: #5f6f79;          /* inkSecondary, à peine foncé pour la lecture */
  --petrole: #176c8a;         /* accent, la signature */
  --petrole-texte: #115167;   /* accentTexte, action */
  --petrole-appuye: #0d4054;
  --aplat: #dcecf1;           /* accentSoft */
  --filet: #2f91ad;           /* borderAccent, mark */
  --surligneur: #b2d3e2;
  --orange: #c15f3c;          /* warm : l'état, jamais l'action */
  --orange-petit: #a44f2f;    /* le même, foncé pour les petits signes */
  --nom: #8a6414;             /* les noms de personnages d'en face */

  --nuit: #001217;
  --nuit-carte: #15232c;
  --nuit-encre: #f2f6f7;
  --nuit-crayon: #91a8b2;
  --nuit-petrole: #79b7c9;

  --titre: "Fraunces", Georgia, serif;
  --texte: "Inter", system-ui, sans-serif;
  --joue: "EB Garamond", Garamond, serif;      /* le texte joué */
  --tapuscrit: "Courier Prime", "Courier New", monospace;
  --etiquette: "IBM Plex Mono", ui-monospace, monospace;

  --gouttiere: 16px;
  --colonne: 68rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--papier);
  background-image: radial-gradient(rgba(20, 32, 43, .045) .6px, transparent .7px);
  background-size: 4px 4px;
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.55;
}

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

a { color: var(--petrole-texte); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--filet); outline-offset: 3px; border-radius: 4px; }

.saut { position: absolute; left: -999px; }
.saut:focus { left: var(--gouttiere); top: var(--gouttiere); background: var(--surligneur); padding: .5rem 1rem; z-index: 10; }

.colonne { max-width: var(--colonne); margin: 0 auto; padding: 0 var(--gouttiere); }
@media (min-width: 48rem) { :root { --gouttiere: 32px; } }

/* ---------- En-tête ---------- */

.entete .colonne { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; min-height: 4.25rem; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }

.marque {
  font-family: var(--titre);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--petrole-texte);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: .55rem;
}
.marque img { width: 2.1rem; height: 2.1rem; border-radius: 7px; }

.menu { display: flex; gap: .25rem 1.25rem; flex-wrap: wrap; font-size: .95rem; }
.menu a { color: var(--encre); text-decoration: none; padding: .5rem 0; }
.menu a:hover { color: var(--petrole-texte); }
.menu a[aria-current="page"] { color: var(--petrole-texte); font-weight: 600; box-shadow: inset 0 -2px 0 var(--orange); }

/* ---------- Titres : grand Fraunces, la suite en italique orange (comme l'appli) ---------- */

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 900;
  color: var(--petrole-texte);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 10vw, 5.4rem); }
h2 { font-size: clamp(2rem, 6vw, 3.4rem); }
h3 { font-size: 1.4rem; line-height: 1.15; letter-spacing: 0; }
.suite { font-style: italic; color: var(--orange); }

p { margin: 0 0 1rem; max-width: 36em; }
.chapeau { font-size: 1.2rem; color: var(--crayon); max-width: 30em; }

/* La phrase sur ruban, comme l'accueil de l'appli */
.ruban {
  font-family: var(--tapuscrit);
  font-weight: 700;
  font-size: clamp(1.25rem, 4.6vw, 1.7rem);
  line-height: 1.95;
  margin: 0 0 1.5rem;
  max-width: 22em;
}
.ruban span {
  background: var(--surligneur);
  padding: .1em .45em;
  border-radius: 6px 10px 4px 12px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  box-shadow: 2px 3px 6px rgba(20, 32, 43, .08);
}

/* ---------- Sections ---------- */

.bloc { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.bloc--aplat { background: var(--carte-choisie); }
.bloc--nuit { background: var(--nuit); color: var(--nuit-encre); }
.bloc--nuit h2, .bloc--nuit h3 { color: var(--nuit-encre); }
.bloc--nuit .suite { color: #f1774b; }
.bloc--nuit .chapeau, .bloc--nuit .fonction p { color: var(--nuit-crayon); }
.bloc--nuit a { color: var(--nuit-petrole); }
.bloc--nuit :focus-visible { outline-color: var(--nuit-petrole); }

.deux { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) { .deux { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- La brochure (l'écran « Texte complet » de l'appli) ---------- */

.brochure { margin: 0; max-width: 32rem; font-family: var(--joue); font-size: 1.3rem; line-height: 1.4; }
.brochure__titre { font-family: var(--texte); color: var(--crayon); font-size: .95rem; margin: 0 0 1.25rem; }
.brochure__ligne { margin: 0 0 1rem; max-width: none; }
.brochure__qui {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 1.05rem;
  color: var(--nom);
  margin-bottom: .15rem;
}
.brochure__dit { display: block; color: var(--crayon); }

/* Ta réplique : dans une carte, surlignée en bleu */
.brochure__ligne--toi {
  background: var(--carte);
  border: 1px solid #e3ecef;
  border-radius: 12px;
  padding: .9rem 1rem 1rem;
  box-shadow: 0 1px 3px rgba(20, 32, 43, .06);
}
.brochure__ligne--toi .brochure__qui { color: var(--petrole-texte); }
.brochure__ligne--toi .brochure__qui::after { content: " ←"; color: var(--orange-petit); letter-spacing: 0; }
.brochure__ligne--toi .brochure__dit { color: var(--encre); }
.surligne {
  background: var(--surligneur);
  border-radius: 3px 8px 4px 9px;
  padding: .05em .2em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Cachée : l'italienne */
.cache .surligne { color: transparent; user-select: none; }
.revele .surligne { animation: devoiler .45s ease-out both; }
@keyframes devoiler { from { color: transparent; } to { color: var(--encre); } }

.brochure__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; font-family: var(--texte); font-size: 1rem; }

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem;
  padding: .75rem 1.35rem;
  border: 1.5px solid var(--petrole-texte);
  background: var(--petrole-texte);
  color: #fff;
  font: inherit; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
}
.bouton:hover { background: var(--petrole-appuye); border-color: var(--petrole-appuye); }
.bouton--clair {
  background: var(--carte); color: var(--petrole-texte);
  font-family: var(--etiquette); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 999px;
}
.bouton--clair:hover { background: var(--aplat); border-color: var(--petrole-texte); }
.bouton[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Les deux portes ---------- */

.portes { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 40rem) { .portes { grid-template-columns: 1fr 1fr; } }
.porte {
  display: block;
  text-decoration: none;
  color: var(--encre);
  padding: 1.4rem 1.25rem 1.25rem;
  border: 1px solid var(--filet);
  border-radius: 12px;
  background: var(--carte);
  box-shadow: 0 2px 8px rgba(20, 32, 43, .06);
}
.porte:hover { background: var(--carte-choisie); }
.porte__titre { font-family: var(--titre); font-weight: 900; color: var(--petrole-texte); font-size: clamp(1.55rem, 5vw, 2rem); line-height: 1.08; display: block; margin-bottom: .5rem; }
.porte__pour { color: var(--crayon); display: block; }
.porte__titre::before { content: "→ "; color: var(--orange-petit); font-family: var(--texte); font-weight: 400; }

/* ---------- Le cadre de téléphone (pour ses vraies prises) ---------- */

.telephone {
  width: min(17rem, 78vw);
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
  border: 9px solid var(--encre);
  border-radius: 2.4rem;
  background: var(--papier);
  overflow: hidden;
  position: relative;
}
.telephone video, .telephone img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Les places réservées (à remplir avec lui) ---------- */

.afaire {
  border: 2px dashed var(--orange);
  border-radius: 12px;
  background: #fbf3ee;
  color: var(--encre);
  padding: 1rem 1.1rem;
  font-family: var(--tapuscrit);
  font-size: .98rem;
  line-height: 1.45;
}
.afaire strong { font-family: var(--texte); display: block; margin-bottom: .25rem; color: #9a4a2c; }
.telephone .afaire { border: 0; border-radius: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.bloc--nuit .afaire { background: var(--nuit-carte); color: var(--nuit-encre); border-color: #f1774b; }
.bloc--nuit .afaire strong { color: #f1a07f; }

/* ---------- Avant / après (la table de mixage) ---------- */

.bascule { display: inline-flex; border: 1.5px solid var(--nuit-petrole); border-radius: 999px; padding: 3px; margin: 1.25rem 0 1rem; }
.bascule button {
  font-family: var(--etiquette); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--nuit-encre); background: transparent; border: 0;
  min-height: 2.75rem; padding: .5rem 1.4rem; border-radius: 999px; cursor: pointer;
}
.bascule button[aria-pressed="true"] { background: var(--nuit-petrole); color: var(--nuit); font-weight: 600; }

/* ---------- Les étapes (une vraie suite : 1, 2, 3) ---------- */

.etapes { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 2rem; counter-reset: etape; }
@media (min-width: 52rem) { .etapes { grid-template-columns: repeat(3, 1fr); } }
.etapes li { counter-increment: etape; border-top: 1px solid var(--filet); padding-top: 1rem; }
.etapes li::before {
  content: counter(etape);
  font-family: var(--titre); font-weight: 900; font-style: italic; color: var(--orange);
  font-size: 3.2rem; line-height: 1; display: block; margin-bottom: .5rem;
}
.etapes p { color: var(--crayon); }

/* ---------- Les fonctions ---------- */

.fonctions { display: grid; gap: 3rem 4rem; margin-top: 3rem; }
@media (min-width: 52rem) { .fonctions { grid-template-columns: 1fr 1fr; } }
.fonction p { color: var(--crayon); }
.fonction .telephone { width: min(13rem, 62vw); margin: 0 0 1.25rem; border-width: 7px; border-radius: 1.9rem; }

/* ---------- Écouter des voix ---------- */

.voix { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .75rem; max-width: 40rem; }
.voix li { display: flex; gap: 1rem; align-items: center; background: var(--carte); border: 1px solid #e3ecef; border-radius: 12px; padding: .8rem 1rem; font-family: var(--joue); font-size: 1.2rem; }
.voix .ecouter { flex: none; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 0; background: var(--petrole-texte); cursor: pointer; }
.voix .ecouter::before { content: ""; display: block; width: 0; margin-inline: auto; transform: translateX(2px); border: .45rem solid transparent; border-left: .7rem solid #fff; border-right: 0; }
.voix .qui { display: block; font-family: var(--etiquette); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--crayon); }

/* ---------- Foire aux questions ---------- */

.questions { margin-top: 2rem; max-width: 46rem; }
.questions details { border-top: 1px solid #cfe0e6; }
.questions details:last-child { border-bottom: 1px solid #cfe0e6; }
.questions summary {
  cursor: pointer; list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 600; font-size: 1.1rem;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.6rem; font-weight: 400; color: var(--orange-petit); transition: transform .2s; }
.questions details[open] summary::after { transform: rotate(45deg); }
.questions details p { color: var(--crayon); }

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

.pied { padding: 3rem 0 4rem; font-size: .95rem; color: var(--crayon); border-top: 1px solid #cfe0e6; }
.pied .colonne { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .pied .colonne { grid-template-columns: 2fr 1fr 1fr; } }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pied p { margin: 0; }

/* ---------- Mentions légales ---------- */

.legal h2 { font-size: 1.8rem; margin-top: 2.5rem; }
.legal p, .legal address { font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.bascule--clair { border-color: var(--filet); margin-top: 0; }
.bascule--clair button { color: var(--petrole-texte); }
.bascule--clair button[aria-pressed="true"] { background: var(--petrole-texte); color: #fff; }
.bloc--nuit .telephone { border-color: #2b3d48; background: var(--nuit-carte); }

/* La self-tape se tourne en paysage : le téléphone couché */
.telephone--paysage { width: min(34rem, 100%); aspect-ratio: 19.5 / 9; }
.fonction .telephone--paysage { width: min(26rem, 100%); border-radius: 1.6rem; }

/* Le téléphone qui se couche : debout pour préparer, couché pour tourner.
   Le cadre garde sa place debout, pour que la page ne saute pas. */
.cadre-bascule { display: grid; place-items: center; }
.fonction .cadre-bascule { justify-items: center; }
.telephone--bascule {
  transition: transform .8s cubic-bezier(.3, .7, .2, 1);
  transform-origin: center;
}
.telephone--bascule.couche { transform: rotate(-90deg) scale(var(--echelle, 1)); }
.afaire__texte { display: block; max-width: 14rem; transition: transform .8s cubic-bezier(.3, .7, .2, 1); }
.couche .afaire__texte { transform: rotate(90deg); }
.fonction .cadre-bascule .telephone { margin: 0 0 1.25rem; }
.fonction .telephone--bascule.couche { transform-origin: center; }
main { overflow-x: clip; } /* le téléphone qui tourne ne doit jamais faire défiler la page de côté */

/* La vraie prise : la barre du haut est dessinée (9:41, batterie pleine),
   la sienne est coupée au montage. */
.telephone--video { display: flex; flex-direction: column; background: #fafcfc; }
.telephone--video video { flex: 1; min-height: 0; }
.barre-etat {
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem 1rem .35rem 1.35rem;
  font-family: var(--texte); font-weight: 600; font-size: .8rem; color: var(--encre);
}
.barre-etat svg { width: 3.4rem; height: auto; fill: currentColor; }
.barre-etat__ilot { width: 30%; height: 1.15rem; border-radius: 999px; background: #000; }
/* Elle ne part qu'avec le son : le bouton au milieu de l'écran la lance. */
.prise { display: flex; justify-content: center; }
.son {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  white-space: nowrap;
  font-family: var(--etiquette); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--petrole-texte); border: 0; border-radius: 999px;
  min-height: 3rem; padding: .6rem 1.3rem .6rem 1.1rem; cursor: pointer;
  box-shadow: 0 6px 20px rgb(0 0 0 / .3);
}
.son::before { content: "▶\00a0\00a0"; }
.son[hidden] { display: none; }
.telephone--video video { cursor: pointer; }
.fonction .prise { justify-content: flex-start; }
.fonction .barre-etat { padding: .4rem .8rem .25rem 1.05rem; font-size: .68rem; }
.fonction .barre-etat svg { width: 2.8rem; }

/* ---------- La liste courte (refonte du 02/11) ---------- */

.liste { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1.1rem 4rem; }
@media (min-width: 52rem) { .liste { grid-template-columns: 1fr 1fr; } }
.liste li { border-top: 1px solid var(--filet); padding-top: .9rem; color: var(--crayon); }
.liste strong { display: block; color: var(--encre); font-weight: 600; margin-bottom: .2rem; }
.bloc--nuit .liste li { color: var(--nuit-crayon); border-top-color: #2b4652; }
.bloc--nuit .liste strong { color: var(--nuit-encre); }
.public h3 { margin-bottom: .2rem; }
.public .liste { grid-template-columns: 1fr; margin-top: 1.25rem; }
