/* Le Racontoir — la vitrine (leracontoir.fr). Charte A « Sauge et papier » (04/10).
   Texte toujours ≥ 7:1 ; « trait » ne sert qu'aux bordures des contrôles (≥ 3:1). */

@font-face { font-family: 'Literata'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('polices/literata-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('polices/literata-latin-opsz-italic.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('polices/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: italic; font-weight: 200 800; font-display: swap; src: url('polices/atkinson-hyperlegible-next-latin-wght-italic.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --papier: #FBF8F1;
  --carte: #FFFDF8;
  --sauge-pale: #E9EFE2;
  --encre: #23282D;
  --encre-douce: #444B52;
  --sauge: #3D5230;
  --brique: #7D3627;
  --trait: #8A8373;
  --rose: #E9C2B3;
  --ombre-feuille: 0 1px 2px rgba(35, 40, 45, .08), 0 10px 30px rgba(35, 40, 45, .10);
  --interface: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --livre: 'Literata', Georgia, serif;
  --colonne: 42rem;
  --large: 72rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--interface);
  font-size: 1.1875rem; /* 19 px */
  line-height: 1.6;
  overflow-wrap: break-word;
}
@media (min-width: 48rem) { body { font-size: 1.25rem; } } /* 20 px */

img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--livre); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.85rem); margin-bottom: .6em; }
h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem); margin-bottom: .5em; }
strong { font-weight: 700; }

a { color: var(--sauge); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--encre); }
:focus-visible { outline: 3px solid var(--brique); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.visuellement-cache { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--sauge); color: #fff; padding: .75rem 1rem; border-radius: 8px; font-weight: 700; }
.evitement:focus { top: 1rem; color: #fff; }

.conteneur { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 var(--gouttiere); }
.colonne { max-width: var(--colonne); }
.centre { margin-left: auto; margin-right: auto; text-align: center; }

/* Étiquette : 16 px gras, jamais en capitales espacées (décision du 27/09). */
.etiquette { font-family: var(--interface); font-size: 1rem; font-weight: 700; color: var(--brique); margin: 0 0 .6rem; letter-spacing: 0; }
.chapeau { font-size: 1.2em; color: var(--encre-douce); line-height: 1.55; }
.doux { color: var(--encre-douce); }

/* ── Boutons : un seul plein par écran, les autres bordés (jamais de simples liens) ── */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.5rem; padding: .7rem 1.5rem;
  font: 700 1.0625rem/1.25 var(--interface);
  border-radius: 12px; border: 2px solid var(--trait);
  background: var(--carte); color: var(--sauge);
  text-decoration: none; cursor: pointer; text-align: center;
}
@media (min-width: 48rem) { .bouton { font-size: 1.125rem; } }
.bouton:hover { background: var(--sauge-pale); color: var(--sauge); border-color: var(--sauge); }
.bouton.plein { background: var(--sauge); border-color: var(--sauge); color: #fff; }
.bouton.plein:hover { background: #2F4025; border-color: #2F4025; color: #fff; }
.bouton svg { width: 1.4em; height: 1.4em; flex: none; }
.boutons { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
@media (max-width: 30rem) { .boutons .bouton { width: 100%; } }

/* ── En-tête ── */
.entete { padding: 1.1rem 0; }
.entete .conteneur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--sauge); min-height: 3rem; }
.logo svg { width: 44px; height: 44px; flex: none; }
.logo-nom { font-family: var(--livre); font-weight: 600; font-size: 1.6rem; letter-spacing: -.01em; color: var(--sauge); }
.navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 .25rem; }
.navigation a { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 .7rem; color: var(--encre-douce); font-size: 1.0625rem; text-decoration: none; border-radius: 8px; }
.navigation a:hover { color: var(--sauge); text-decoration: underline; }
/* « Offrir Le Racontoir » (04/10) : un bouton bordé, à droite de la navigation. */
.entete .bouton-offrir { min-height: 3rem; padding: .5rem 1.1rem; }
.carte-public .boutons { margin-top: 1.25rem; }
@media (max-width: 47.99rem) {
  .navigation { width: 100%; }
  .navigation ul { margin-left: -.7rem; }
  .navigation a { font-size: 1rem; padding: 0 .7rem; }
}

/* ── Accroche ── */
.accroche { padding: clamp(2rem, 6vw, 5rem) 0 clamp(3.5rem, 8vw, 6.5rem); }
.accroche .conteneur { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 60rem) { .accroche .conteneur { grid-template-columns: 1.15fr .85fr; } }
.accroche h1 { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.4rem); line-height: 1.06; margin-bottom: .55em; color: var(--encre); }
.accroche h1 span { display: block; color: var(--sauge); }
.accroche .chapeau { max-width: 34rem; margin-bottom: 2rem; }
.accroche .gratuit { margin: 1.4rem 0 0; font-size: 1rem; color: var(--encre-douce); }
.accroche-livre { position: relative; max-width: 30rem; width: 100%; margin: 0 auto; aspect-ratio: 1 / 1.02; }
.accroche-livre picture { position: absolute; width: 64%; }
.accroche-livre img { border-radius: 3px; box-shadow: var(--ombre-feuille); background: #fff; }
.accroche-livre .derriere { right: 0; top: 0; transform: rotate(2.5deg); }
.accroche-livre .devant { left: 0; bottom: 0; transform: rotate(-2deg); }
@media (prefers-reduced-motion: no-preference) { .accroche-livre picture { transition: transform .4s ease; } .accroche-livre:hover .derriere { transform: rotate(3.5deg) translateY(-4px); } }

/* ── Sections ── */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid rgba(138, 131, 115, .35); }
.section-tete { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-tete .chapeau { margin-bottom: 0; }

/* ── Comment ça marche ── */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; counter-reset: etape; }
@media (min-width: 52rem) { .etapes { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.etapes li { counter-increment: etape; }
.etape-icone { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--sauge-pale); display: grid; place-items: center; margin-bottom: 1.25rem; }
.etape-icone svg { width: 2.6rem; height: 2.6rem; }
.etapes h3 { font-size: 1.55rem; margin-bottom: .55rem; }
.etapes h3::before { content: counter(etape) ". "; color: var(--brique); }
.etapes p { color: var(--encre-douce); margin: 0; }
.etapes .exemple { display: block; margin-top: .6rem; font-family: var(--livre); font-style: italic; color: var(--encre); }

/* ── La démo ── */
.demo { background: var(--sauge-pale); border-top: 0 !important; }
.demo + .section { border-top: 0; }
.demo .section-tete { text-align: center; margin-left: auto; margin-right: auto; max-width: 46rem; }
.fiction { font-size: 1.0625rem; color: var(--encre-douce); max-width: 40rem; margin: 1rem auto 0; }

.scene { max-width: 52rem; margin: 0 auto; }
.scene-bloc { background: var(--carte); border-radius: 18px; padding: clamp(1.4rem, 4vw, 2.75rem); box-shadow: 0 1px 2px rgba(35, 40, 45, .06); }
.scene-bloc + .scene-bloc { margin-top: 1.5rem; }
.scene-bloc h3 { outline-offset: 6px; }
.scene-bloc { scroll-margin-top: 1rem; }
@media (max-width: 30rem) {
  .scene-bloc { padding: 1.4rem 1rem; border-radius: 14px; }
  .feuille { padding: 1.5rem 1.1rem; }
}

.question { font-family: var(--livre); font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.2rem); line-height: 1.3; margin: 0 0 1.75rem; color: var(--encre); }
.mention-voix { display: block; margin-top: .9rem; font-size: 1rem; color: var(--encre-douce); }

.parole { font-size: 1.15em; line-height: 1.7; margin: 0 0 1.25rem; min-height: 3em; }
.parole .mot { transition: opacity .25s ease; }
.parole.en-cours .mot.a-venir { display: none; }
.parole.en-cours .mot.dernier { color: var(--sauge); }
@media (prefers-reduced-motion: reduce) { .parole .mot { transition: none; } }
.temps { font-variant-numeric: tabular-nums; color: var(--encre-douce); font-size: 1rem; margin: 0 0 1rem; }
.note { font-size: 1rem; color: var(--encre-douce); margin: 1.25rem 0 0; }

/* Les plumes : des onglets */
.onglets { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 1.5rem; }
.onglet {
  min-height: 3.25rem; padding: .55rem 1.2rem; border-radius: 999px;
  border: 2px solid var(--trait); background: var(--carte); color: var(--encre);
  font: 700 1.0625rem/1.2 var(--interface); cursor: pointer;
}
.onglet:hover { border-color: var(--sauge); color: var(--sauge); }
.onglet[aria-selected="true"] { background: var(--sauge); border-color: var(--sauge); color: #fff; }
@media (max-width: 30rem) { .onglets { display: grid; grid-template-columns: 1fr; } .onglet { width: 100%; } }
.plume-explication { margin: 0 0 1.25rem; color: var(--encre-douce); }
.plume-explication strong { color: var(--encre); }

.feuille {
  background: #fff; border-radius: 4px; box-shadow: var(--ombre-feuille);
  padding: clamp(1.5rem, 5vw, 3.25rem) clamp(1.25rem, 6vw, 3.75rem);
  font-family: var(--livre); font-size: 1.12em; line-height: 1.7; color: var(--encre);
  max-width: 40rem; margin: 0 auto;
}
.feuille-titre { font-style: italic; font-weight: 500; color: var(--sauge); text-align: center; font-size: 1.3em; line-height: 1.25; margin: 0 0 1.3em; }
.feuille p { margin: 0 0 .9em; hyphens: manual; }
.feuille p:last-child { margin-bottom: 0; }
mark.doute { background: var(--sauge-pale); color: inherit; padding: .05em .2em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.regle { margin: 2rem auto 0; max-width: 40rem; padding: 1.4rem 1.6rem; border-radius: 14px; background: var(--papier); border: 2px solid var(--sauge-pale); }
.regle p:last-child { margin-bottom: 0; }
.regle .etiquette { color: var(--sauge); }

/* Le livre de Madeleine */
.choix-livre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.6rem, 2.5vw, 1.75rem); margin: 1.5rem 0 2rem; }
.choix-livre button {
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  background: transparent; border: 3px solid transparent; border-radius: 12px; padding: clamp(.35rem, 1.5vw, .75rem);
  font: 700 1.0625rem/1.2 var(--interface); color: var(--encre); cursor: pointer; min-height: 3rem;
}
.choix-livre button img { box-shadow: var(--ombre-feuille); border-radius: 2px; }
.choix-livre button:hover { border-color: var(--trait); }
.choix-livre button[aria-pressed="true"] { border-color: var(--sauge); background: var(--papier); }
.choix-livre button[aria-pressed="true"] span::before { content: ''; display: inline-block; width: .55em; height: .55em; margin-right: .4em; border-radius: 50%; background: var(--sauge); vertical-align: .08em; }

.double-page { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 46rem; margin: 0 auto; box-shadow: var(--ombre-feuille); background: #fff; position: relative; }
.double-page::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2.5rem; transform: translateX(-50%); background: linear-gradient(90deg, rgba(35,40,45,0) 0%, rgba(35,40,45,.07) 48%, rgba(35,40,45,.11) 50%, rgba(35,40,45,.07) 52%, rgba(35,40,45,0) 100%); pointer-events: none; }
.double-page figure { margin: 0; }
.double-page a { display: block; }
.legende-livre { text-align: center; font-size: 1rem; color: var(--encre-douce); max-width: 40rem; margin: 1.25rem auto 0; }
@media (max-width: 40rem) {
  .double-page { grid-template-columns: 1fr; box-shadow: none; background: transparent; gap: 1rem; }
  .double-page::after { display: none; }
  .double-page figure { box-shadow: var(--ombre-feuille); background: #fff; }
}
.fin-demo { margin-top: 2.25rem; display: flex; justify-content: center; }

/* ── Proches ── */
.deux-colonnes { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 56rem) { .deux-colonnes { grid-template-columns: 1.1fr .9fr; } }
.ecran-appli { margin: 0; }
.ecran-appli .telephone {
  background: var(--papier); border: 2px solid var(--trait); border-radius: 28px;
  padding: 1.5rem 1.25rem 1.6rem; max-width: 22rem; margin: 0 auto; box-shadow: var(--ombre-feuille);
}
.telephone .tel-titre { font-family: var(--livre); font-size: 1.45rem; line-height: 1.25; margin: 0 0 .5rem; color: var(--encre); }
.telephone .tel-texte { font-size: 1.0625rem; color: var(--encre-douce); margin: 0 0 1.1rem; }
.telephone .tel-bouton { display: block; text-align: center; padding: .8rem 1rem; border-radius: 12px; font-weight: 700; font-size: 1.0625rem; margin-top: .6rem; border: 2px solid var(--trait); color: var(--sauge); background: var(--carte); }
.telephone .tel-bouton.plein { background: var(--sauge); border-color: var(--sauge); color: #fff; }
.telephone .tel-ecouter { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--brique); margin-bottom: 1rem; font-size: 1.0625rem; }
.telephone .tel-ecouter svg { width: 1.6rem; height: 1.6rem; }
.ecran-appli figcaption { text-align: center; font-size: 1rem; color: var(--encre-douce); margin-top: 1rem; }
.liste { margin: 0 0 1em; padding-left: 1.2em; }
.liste li { margin-bottom: .55em; padding-left: .2em; }
.liste li::marker { color: var(--sauge); }

/* ── Le livre ── */
.fiche-livre { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 52rem) { .fiche-livre { grid-template-columns: 1fr 1fr; } }
.encadre { background: var(--carte); border: 1px solid rgba(138, 131, 115, .45); border-radius: 18px; padding: clamp(1.4rem, 3.5vw, 2.25rem); }
.encadre h3 { font-size: 1.5rem; }
.caracteristiques { margin: 0; }
.caracteristiques div { display: grid; grid-template-columns: minmax(7.5rem, 36%) 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid rgba(138, 131, 115, .35); }
.caracteristiques div:first-child { border-top: 0; padding-top: 0; }
.caracteristiques dt { font-weight: 700; color: var(--encre); }
.caracteristiques dd { margin: 0; color: var(--encre-douce); }
@media (max-width: 26rem) { .caracteristiques div { grid-template-columns: 1fr; gap: .1rem; } }
.prix { margin-top: clamp(1.5rem, 3vw, 2.5rem); background: var(--sauge-pale); border-radius: 18px; padding: clamp(1.4rem, 3.5vw, 2.25rem); text-align: center; }
.prix p { margin: 0; }
.prix .prix-titre { font-family: var(--livre); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); color: var(--encre); margin-bottom: .4rem; }

/* ── Pour qui ── */
.cartes { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .cartes { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.carte-public { background: var(--carte); border: 1px solid rgba(138, 131, 115, .45); border-radius: 18px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.carte-public h3 { color: var(--sauge); }
.carte-public .liste { margin-bottom: 0; }

/* ── Vos données ── */
.donnees-liste { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 52rem) { .donnees-liste { grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem; } }
.donnees-liste li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 1rem; align-items: start; }
.donnees-liste svg { width: 2.75rem; height: 2.75rem; }
.donnees-liste p { margin: 0; color: var(--encre-douce); }
.donnees-liste strong { display: block; color: var(--encre); font-size: 1.05em; margin-bottom: .2rem; }

/* ── Pied de page ── */
.pied { background: var(--carte); border-top: 1px solid rgba(138, 131, 115, .45); padding: 3rem 0 3.5rem; font-size: 1.0625rem; color: var(--encre-douce); }
.pied .logo { margin-bottom: 1.25rem; }
.pied p { max-width: 46rem; }
.pied-liens { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.pied-liens a { display: inline-flex; align-items: center; min-height: 3rem; }

/* ── Page « Mentions légales » ── */
.page-texte { padding: clamp(2rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem); }
.page-texte h1 { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3rem); margin-bottom: 1.2em; }
.page-texte h2 { font-size: 1.6rem; margin: 2em 0 .6em; }
.page-texte address { font-style: normal; }
.suite-page { margin-top: 2rem; }
.plume + .plume { margin-top: 2rem; }
.demo-active .plume + .plume { margin-top: 0; }

/* Un titre qui reçoit le focus par programme (étape suivante de la démo) n'a pas besoin d'un cadre. */
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

/* La phrase qui rassure, sous le titre de la démo : vos mots d'origine restent. */
.chapeau.rassurance { font-size: 1.05rem; color: var(--sauge, #3D5230); font-weight: 600; }
