/* Souvenirs : minimalisme éditorial (skill minimalist-ui), choix de Noé du 10/10/2026.
   Monochrome chaud, couleur rare (pastels réservés aux petites pastilles), boutons noirs.
   Polices : Geist (texte, boutons), Newsreader (grands titres, textes d'histoires), Geist Mono (petits libellés).
   Formes : boutons 6 px, blocs 12 px, pastilles entièrement arrondies. Filets de 1 px, ombres presque invisibles. */
/* Polices hébergées ici, déclarées directement (latin et latin étendu) : plus de cascade de fichiers à attendre. */
@font-face { font-family: 'Geist Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/vendor/geist/files/geist-latin-ext-wght-normal.woff2) format('woff2-variations'); 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: 'Geist Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/vendor/geist/files/geist-latin-wght-normal.woff2) format('woff2-variations'); 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; }
@font-face { font-family: 'Geist Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/vendor/geist-mono/files/geist-mono-latin-ext-wght-normal.woff2) format('woff2-variations'); 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: 'Geist Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/vendor/geist-mono/files/geist-mono-latin-wght-normal.woff2) format('woff2-variations'); 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; }
@font-face { font-family: 'Newsreader Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/vendor/newsreader/files/newsreader-latin-ext-opsz-normal.woff2) format('woff2-variations'); 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: 'Newsreader Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/vendor/newsreader/files/newsreader-latin-opsz-normal.woff2) format('woff2-variations'); 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; }
/* Icônes : dessins de public/assets/icones.css (chargé sans bloquer l'affichage), place réservée ici. */
.ph, .ph-fill { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.125em; font-style: normal; background-color: currentColor; -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; }

:root {
  --canvas: #ffffff;
  --page: #fbfbfa;
  --surface-soft: #f7f6f3;
  --surface-strong: #efede8;
  --ink: #111111;
  --body: #2f3437;
  --muted: #6b6a66;           /* gris lisible (contraste 4,5 sur tous les fonds clairs) */
  --hairline: #eaeaea;
  --hairline-soft: #efeeec;

  --accent: #111111;          /* boutons principaux */
  --accent-active: #333333;
  --on-accent: #ffffff;
  --accent-text: #111111;     /* mise en avant d'un texte : l'encre, pas une couleur */
  --accent-soft: #f7f6f3;
  --tag-bg: #fbf3db;          /* pastille pastel (initiales, petites icônes) */
  --tag-text: #956400;
  --success: #346538;
  --success-soft: #edf3ec;
  --danger: #9f2f2d;
  --danger-soft: #fdebec;
  --info: #1f6c9f;
  --info-soft: #e1f3fe;

  --r-sm: 4px;
  --r-btn: 6px;
  --r-card: 12px;
  --r-full: 9999px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.03), 0 4px 12px rgba(17, 17, 17, 0.03);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --sans: "Geist Variable", "Helvetica Neue", system-ui, sans-serif;
  --read: "Newsreader Variable", Georgia, serif;
  --mono: "Geist Mono Variable", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light; /* thème clair partout, même si le téléphone est réglé en sombre (décision du 10/10) */
}


* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h3 { letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

/* Lien d'accès direct au contenu, visible seulement au clavier */
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: var(--canvas); padding: 10px 14px; border-radius: var(--r-btn); font-weight: 600; }
.skip:focus { top: 12px; }

/* Monogramme : carré aux coins arrondis */
.mono { width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--tag-bg); color: var(--tag-text); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Halo chaud derrière le haut de page */
.ambient { background: radial-gradient(70% 45% at 15% 0%, rgba(149, 100, 0, 0.035) 0%, transparent 70%), var(--page); background-repeat: no-repeat; }

/* Mention de confidentialité en bas de page */
.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hairline-soft); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.foot .ph { font-size: 18px; flex: none; }
a { color: inherit; }
.ph, .ph-fill { line-height: 1; }

/* Barre du haut */
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--hairline-soft); background: var(--canvas); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.logo .ph-fill { font-size: 28px; }

.container { width: 100%; max-width: 720px; margin: 0 auto; padding: 32px 16px 80px; }
.muted { color: var(--muted); }

/* Boutons */
.btn {
  font: inherit; font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-btn);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--accent); color: var(--on-accent);
  transition: background-color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn { box-shadow: none; }
.btn:hover { background: var(--accent-active); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn .ph, .btn .ph-fill { font-size: 1.25em; }
.btn-secondary { background: var(--canvas); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--surface-soft); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.btn-ghost:hover { background: var(--surface-soft); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-btn); }
.btn-lg { min-height: 64px; padding: 0 28px; font-size: 20px; border-radius: var(--r-btn); }
.btn-danger { background: var(--danger); color: var(--canvas); }
.btn-danger:hover { background: var(--danger); filter: brightness(0.92); }
.btn-block { width: 100%; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }

.icon-btn { width: 40px; height: 40px; border-radius: var(--r-full); border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; transition: background-color 0.2s var(--ease), transform 0.1s ease; }
.icon-btn:hover { background: var(--surface-soft); }
.icon-btn:active { transform: scale(0.96); }

/* Cartes */
.card { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 28px; }
.card.raised { box-shadow: var(--shadow); border-color: transparent; }

/* Champs : libellé au-dessus */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field label { font-size: 15px; font-weight: 600; color: var(--body); }
.input, .select, .textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--canvas);
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1px solid var(--hairline); border-radius: var(--r-btn);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border: 2px solid var(--ink); padding: 11px 13px; }
::placeholder { color: var(--muted); opacity: 1; }

/* Pastilles d'état */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; background: var(--surface-strong); color: var(--body); white-space: nowrap; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.wait { background: var(--tag-bg); color: var(--tag-text); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.err { background: var(--danger-soft); color: var(--danger); }

/* Encadrés */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface-soft); border: 1px solid var(--hairline); font-size: 15px; color: var(--body); }
.notice .ph { font-size: 20px; flex: none; margin-top: 1px; }
.notice.warn { background: var(--tag-bg); border-color: transparent; color: var(--ink); }
.notice.warn .ph { color: var(--tag-text); }
.notice.err { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

/* Sélecteur à plusieurs choix (onglets en pastilles) */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--surface-strong); }
.segmented button { font: inherit; font-size: 15px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: var(--r-full); cursor: pointer; transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.1s ease; }
.segmented button:hover { color: var(--ink); }
.segmented button:active { transform: scale(0.97); }
.segmented button[aria-selected="true"] { background: var(--canvas); color: var(--ink); box-shadow: var(--shadow); }

/* Message bref en bas d'écran */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--canvas); padding: 12px 18px; border-radius: var(--r-btn); font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.show.error { pointer-events: auto; cursor: pointer; }

/* Chargement */
.skeleton { background: linear-gradient(90deg, var(--surface-strong) 0%, var(--surface-soft) 50%, var(--surface-strong) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-btn); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Lecteur audio */
.player { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: var(--r-full); background: var(--surface-soft); }
.player .play { width: 48px; height: 48px; flex: none; border-radius: var(--r-full); border: 0; background: var(--accent); color: var(--on-accent); font-size: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.player .play:hover { background: var(--accent-active); }
.player .bar { flex: 1; height: 6px; border-radius: var(--r-full); background: var(--hairline); position: relative; cursor: pointer; }
.player .bar span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--accent); }
.player .time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }

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

/* Au doigt : réaction immédiate (pas d'attente du double appui) et cibles d'au moins 44 px,
   importantes pour les grands-parents. À la souris, les petits boutons gardent leur taille. */
a, button, summary, label, [role="slider"] { touch-action: manipulation; }
@media (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .icon-btn, .icon-btn.sm { width: 44px; height: 44px; }
  .speed { height: 44px; }
  .segmented button { min-height: 44px; }
}

/* Grands titres : serif d'édition. Petits libellés : chasse fixe. */
.page-title, h1 { font-family: var(--read); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
.badge { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-radius: var(--r-full); }
.logo .ph-fill { color: var(--ink); }

/* Tout petits téléphones (320 px) : logo seul dans l'application, bouton d'achat dans la barre du bas sur le site */
@media (max-width: 340px) { .topbar { padding: 0 14px; } .topbar .logo-text { display: none; } }
/* Tout petits téléphones : sur le site, le bouton d'achat reste seulement dans la barre du bas */
@media (max-width: 340px) { .site-actions > .btn-sm { display: none; } }

/* Vitesse de lecture (1×, 1,25×, 1,5×, 2×) */
.speed { flex: none; min-width: 52px; height: 32px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: var(--r-full); background: var(--canvas); color: var(--ink); font-family: var(--mono, monospace); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color 0.15s ease; }
.speed:hover { border-color: var(--muted); }
.speed:active { transform: scale(0.96); }
.speed:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.video-speed { display: flex; justify-content: flex-end; margin-top: 8px; }
