/* ============================================================
   SWAN-ID — design system
   Valeurs : docs/DESIGN.md. Rendu : docs/prototype/swan-id-prototype.html.
   Ordre des sections : docs/ARCHITECTURE.md §8.
   1. Tokens  2. Base  3. Layout  4. Composants  5. Pages  6. Impression
   ============================================================ */

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
  /* Couleurs */
  --color-black: #000000;
  --color-gray: #767676;
  --color-light-gray: #e5e5e5;
  --color-white: #ffffff;
  --color-border: #000000;
  --color-error: #b00020;
  --color-success: #1a6b3a;

  /* Typographie */
  --font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Échelle de taille */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 36px;
  --text-hero: 44px;

  /* Interlettrage. `--tracking-hero` est réservé au titre hero ; un titre de
     section prend `--tracking-section`, un h3 `--tracking-tight` (DESIGN §2). */
  --tracking-tight: -0.3px;
  --tracking-section: -0.03em;
  --tracking-hero: -2px;

  /* Espacement */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 60px;
  --space-9: 80px;

  /* Layout */
  --container-max: 1280px;
  --container-pad: 20px;
  --header-height: 53px;

  /* Bordures */
  --border: 1px solid var(--color-border);
  --radius: 0;

  /* Mouvement */
  --transition: opacity 0.2s;
}

@media (min-width: 768px) {
  :root {
    --text-lg: 20px;
    --text-xl: 56px;
    --text-hero: 64px;
    --tracking-hero: -3px;
    --space-8: 80px;
    --space-9: 120px;
    --container-pad: 40px;
  }
}

@media (min-width: 1024px) {
  :root {
    --text-hero: 80px;
    --tracking-hero: -4px;
    --container-pad: 80px;
  }
}

/* ============================================================
   2. Base
   ============================================================ */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.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;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin-ext.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;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-white);
  letter-spacing: var(--tracking-tight);
  /* Le lissage du prototype : sans lui, la graisse 500 paraît plus lourde sur
     macOS que ce que le dessin prévoit (DESIGN §2). */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Les chiffres s'alignent d'une ligne à l'autre partout où ils comptent : prix,
   durées, dates, tableaux, compteurs de l'administration (DESIGN §2). */
.table,
.plans__price,
.plans__value--mono,
.num,
.kpi__value,
.dates,
.meta-line,
.pricing__list,
.net-card__list,
time,
td,
th {
  font-variant-numeric: tabular-nums;
}

/* Une sélection à la grammaire du site : noir et blanc, sans teinte système. */
::selection {
  background: var(--color-black);
  color: var(--color-white);
}

/* Un soulignement ne touche pas la lettre : trois pixels dessous (DESIGN §2). */
a[href],
u,
ins {
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* Un titre se répartit sur ses lignes plutôt que de laisser un mot seul. */
h1,
h2,
h3,
.hero__title,
.page-title,
.section__title,
.net-title,
.net-section__title {
  text-wrap: balance;
}

h1,
h2,
h3 {
  font-weight: var(--font-weight-medium);
  line-height: 1.1;
}

p {
  max-width: 64ch;
}

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

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Le pot de miel : hors de l'écran, sans intitulé, et pas dans le flux — un champ
   fait pour les robots ne doit rien coûter à qui lit la page. */
.honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   3. Layout
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: var(--border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
}

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
  }
}

.nav__link {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  transition: var(--transition);
}

.nav__link:hover {
  opacity: 0.6;
}

.nav__link--current {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav__menu {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
}

@media (min-width: 768px) {
  .nav__menu {
    display: none;
  }
}

/* Nav dépliée par app.js sous 768 px */
.nav--open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  padding: var(--space-4) var(--container-pad);
  background: var(--color-white);
  border-bottom: var(--border);
}

.hero {
  padding: calc(var(--space-9) - 20px) 0 var(--space-9);
}

.hero__title {
  font-size: var(--text-hero);
  letter-spacing: var(--tracking-hero);
  line-height: 1.02;
  max-width: 900px;
}

.hero__text {
  font-size: var(--text-lg);
  color: var(--color-gray);
  margin-top: var(--space-4);
  max-width: 600px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
  align-items: center;
}

.section {
  padding: var(--space-8) 0;
  border-top: var(--border);
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.section__title {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-section);
}

.section__lead {
  color: var(--color-gray);
  margin-bottom: var(--space-4);
}

.footer {
  border-top: var(--border);
  padding: var(--space-7) 0;
}

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

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer__brand {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
}

.footer__address {
  margin-top: var(--space-2);
}

.footer p,
.footer li {
  font-size: var(--text-sm);
  color: var(--color-gray);
  line-height: 1.7;
}

.footer ul {
  list-style: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer__newsletter {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-light-gray);
}

.footer__bottom {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-light-gray);
  font-size: var(--text-sm);
  color: var(--color-gray);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}

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

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

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

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   4. Composants
   ============================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-4);
  font-size: var(--text-md);
  font-weight: var(--font-weight-medium);
  border: var(--border);
  background: var(--color-black);
  color: var(--color-white);
  transition: var(--transition);
}

.button:hover {
  opacity: 0.8;
}

.button--secondary {
  background: var(--color-white);
  color: var(--color-black);
}

.button--link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-black);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.button--link:hover {
  opacity: 0.6;
}

.button--block {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  transition: var(--transition);
}

.link-arrow:hover {
  opacity: 0.6;
}

.link-arrow::after {
  content: '→';
}

/* Les « cartes » du site sont des lignes filetées, pas des boîtes. */
.rows {
  border-top: var(--border);
}

.row {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: var(--border);
  transition: var(--transition);
}

a.row:hover {
  opacity: 0.7;
}

@media (min-width: 768px) {
  .row {
    grid-template-columns: 200px 1fr auto;
    gap: var(--space-5);
    align-items: baseline;
  }
}

.row__meta {
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.row__title {
  display: block;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--font-weight-medium);
}

.row__text {
  display: block;
  color: var(--color-gray);
  margin-top: var(--space-1);
}

.row__aside {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.block__title {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
}

.block__text {
  color: var(--color-gray);
}

.block__list {
  list-style: none;
  margin-top: var(--space-3);
}

.block__list li {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-light-gray);
  font-size: var(--text-base);
}

.player {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: var(--border);
  border-bottom: var(--border);
}

@media (min-width: 768px) {
  .player {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-5);
  }
}

.player__button {
  width: 48px;
  height: 48px;
  border: var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
}

.player__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-tight);
}

.player__track {
  height: 2px;
  margin-top: var(--space-3);
  background: var(--color-light-gray);
  position: relative;
}

.player__track::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--color-black);
}

/* La part écoutée, dont la largeur est posée par audio-player.js. */
.player__progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--color-black);
}

/* Encadré d'un corps d'article : l'avertissement ou le point d'attention que
   l'éditeur met à part. Un filet à gauche suffit — le site n'a pas d'aplat. */
.prose .callout {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  border-left: 2px solid var(--color-black);
}

.prose .callout p:last-child {
  margin-bottom: 0;
}

.prose blockquote {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-light-gray);
  color: var(--color-gray);
}

.prose .table-wrap {
  margin-bottom: var(--space-4);
}

/* ------------------------------------------------------------------
   Transcription d'épisode — un paragraphe par segment, ouvert par son
   horodatage. Repliée par défaut ; `<details>` s'ouvre sans JavaScript.
   ------------------------------------------------------------------ */
.transcript {
  margin-top: var(--space-6);
  border-top: var(--border);
  border-bottom: var(--border);
}

.transcript summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
}

.transcript summary::-webkit-details-marker {
  display: none;
}

.transcript summary::after {
  content: '+';
  font-weight: var(--font-weight-regular);
}

.transcript[open] summary::after {
  content: '–';
}

.transcript__body {
  padding-bottom: var(--space-4);
}

.transcript__body p {
  margin-bottom: var(--space-3);
}

/* L'horodatage ouvre le paragraphe : discret, gris, à chiffres tabulaires, et
   d'une largeur fixe pour que les textes s'alignent d'un segment à l'autre. */
.transcript .stamp {
  display: inline-block;
  min-width: 46px;
  margin-right: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-gray);
  font-variant-numeric: tabular-nums;
}

/* La liste des épisodes : chacun porte son lecteur, et le filet du lecteur
   sépare les épisodes — pas besoin d'un second. */
.episodes {
  border-top: var(--border);
}

.episode {
  padding-top: var(--space-4);
}

.episode .row__title {
  margin-bottom: var(--space-1);
}

.episode .player {
  border-top: 0;
}

/* ------------------------------------------------------------------
   Lecteur du site — dessiné par audio-player.js par-dessus la balise
   native, qui reste le repli exact sans JavaScript.
   ------------------------------------------------------------------ */

/* Dès que le module a la main, la balise native s'efface : deux jeux de commandes
   pour un seul son se contrediraient à l'écran. */
.player--enhanced .player__audio,
.player--enhanced > .player__time {
  display: none;
}

@media (min-width: 768px) {
  .player--enhanced {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

.player__controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .player__controls {
    grid-template-columns: auto 1fr auto auto auto;
    gap: var(--space-4);
  }
}

/* Dans le panneau, la piste porte sa propre hauteur de frappe : deux pixels de
   filet se cliquent mal, douze se cliquent bien. */
.player__controls .player__track {
  margin-top: 0;
  cursor: pointer;
  padding: 5px 0;
  height: 2px;
  box-sizing: content-box;
  background-clip: content-box;
}

.player__controls .player__track:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 4px;
}

.player__rate {
  border: var(--border);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
}

.player__volume {
  width: 88px;
  accent-color: var(--color-black);
}

/* Le temps et la vitesse tiennent mal sur une ligne étroite : ils passent dessous. */
@media (max-width: 767px) {
  .player__controls .player__time,
  .player__rate,
  .player__volume {
    grid-column: 2 / -1;
  }
}

.player__time {
  font-size: var(--text-sm);
  color: var(--color-gray);
  font-variant-numeric: tabular-nums;
}

.player__audio {
  width: 100%;
  margin-top: var(--space-3);
}

/* Barre flottante — elle n'accueille pas un second lecteur : audio-player.js y
   déplace le panneau de commandes du lecteur de tête. Absente sans JavaScript. */
.player--floating {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  background: var(--color-white);
  border-top: var(--border);
  border-bottom: 0;
  padding: var(--space-2) var(--container-pad);
  display: none;
}

.player--floating.is-visible {
  display: block;
}

.player--floating .player__button {
  width: 40px;
  height: 40px;
}

@media (min-width: 1024px) {
  .player--floating {
    left: auto;
    right: var(--space-5);
    bottom: var(--space-5);
    width: 420px;
    border: var(--border);
    padding: var(--space-2) var(--space-3);
  }
}

.field {
  display: grid;
  gap: var(--space-2);
  /* Ancre du bouton et du panneau du sélecteur de mois. */
  position: relative;
}

.field__label {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
}

/* Sélecteur de mois : un bouton à côté du champ texte, un panneau au-dessous.
   Le champ reste utilisable seul ; ceci ne fait que devancer la saisie. */
.month-picker__open {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-base);
  line-height: 1;
  padding: 4px;
}

.month-picker {
  position: absolute;
  z-index: 20;
  margin-top: var(--space-1);
  padding: var(--space-3);
  background: var(--color-white);
  border: var(--border);
  min-width: 260px;
}

.month-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.month-picker__year {
  font-weight: var(--font-weight-medium);
}

.month-picker__step {
  padding: 2px 10px;
  border: 1px solid var(--color-light-gray);
}

.month-picker__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
}

.month-picker__month {
  padding: 6px 4px;
  border: 1px solid var(--color-light-gray);
  font-size: var(--text-sm);
}

.month-picker__month:hover,
.month-picker__step:hover {
  border-color: var(--color-black);
}

.field__hint {
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-3);
  font: inherit;
  letter-spacing: inherit;
  border: var(--border);
  background: var(--color-white);
  color: var(--color-black);
}

textarea.field__input {
  min-height: 140px;
  padding: var(--space-3);
  resize: vertical;
  line-height: 1.5;
}

.field__input:focus {
  outline: 0;
  border-width: 2px;
  padding-left: 15px;
}

textarea.field__input:focus {
  padding: 15px;
}

.field--error .field__input {
  border-color: var(--color-error);
}

.field__error {
  font-size: var(--text-sm);
  color: var(--color-error);
}

.fieldset {
  border: 0;
  display: grid;
  gap: var(--space-4);
}

/* Chaque groupe de champs garde la même respiration au-dessus, le premier compris :
   la marge du premier fusionne avec celle du texte d'introduction. */
.fieldset,
.repeat__entry + .repeat__entry {
  margin-top: var(--space-7);
}

.repeat__action {
  margin-top: var(--space-3);
}

.fieldset__legend {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-3);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: var(--border);
}

.form-note {
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.inline-form {
  display: grid;
  gap: var(--space-3);
  max-width: 520px;
}

.radio-group {
  display: grid;
  gap: var(--space-2);
}

.radio-group label {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-base);
}

.field-consent {
  display: grid;
  gap: var(--space-1);
}

.check {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: var(--text-base);
}

.check input {
  margin-top: 5px;
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.progress__segment {
  height: 2px;
  background: var(--color-light-gray);
}

.progress__segment--done {
  background: var(--color-black);
}

.progress__label {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-bottom: var(--space-6);
}

.notice {
  padding: var(--space-3) var(--space-4);
  border: var(--border);
  font-size: var(--text-base);
}

.notice--success {
  border-color: var(--color-success);
  color: var(--color-success);
}

.notice--error {
  border-color: var(--color-error);
  color: var(--color-error);
}

.summary {
  list-style: none;
  border-top: var(--border);
}

.summary li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-light-gray);
  font-size: var(--text-base);
}

.summary dt,
.summary .summary__key {
  color: var(--color-gray);
}

.summary li:last-child {
  border-bottom: var(--border);
}

.summary__total {
  font-weight: var(--font-weight-medium);
}

.steps {
  list-style: none;
  counter-reset: step;
  border-top: var(--border);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: var(--border);
}

.steps li::before {
  content: counter(step);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
}

.steps h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.steps p {
  color: var(--color-gray);
  font-size: var(--text-base);
}

.faq {
  border-top: var(--border);
}

.faq details {
  border-bottom: var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-weight: var(--font-weight-regular);
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  padding: 0 0 var(--space-4);
  color: var(--color-gray);
}

.sheet {
  background: var(--color-white);
  border: var(--border);
  padding: var(--space-5);
  max-width: 520px;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.sheet__name {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--font-weight-medium);
}

.sheet__headline {
  color: var(--color-gray);
  margin-top: 2px;
}

.sheet__section {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: var(--border);
  font-weight: var(--font-weight-medium);
}

.sheet__item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.sheet__item span:first-child {
  color: var(--color-gray);
}

.sheet__caption {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-top: var(--space-3);
}

.status {
  list-style: none;
  border-top: var(--border);
  margin-top: var(--space-5);
}

.status li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: var(--border);
  font-size: var(--text-md);
}

.status__dot {
  width: 12px;
  height: 12px;
  border: var(--border);
  border-radius: 50%;
  justify-self: center;
}

.status__dot--done {
  background: var(--color-black);
}

.status__dot--active {
  background: var(--color-white);
  box-shadow: inset 0 0 0 3px var(--color-white), inset 0 0 0 12px var(--color-black);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.status__dot--error {
  background: var(--color-error);
  border-color: var(--color-error);
}

.status__meta {
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.chip {
  padding: var(--space-2) 14px;
  border: 1px solid var(--color-light-gray);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
}

.chip.is-active {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

/* Fil d'Ariane : sous l'en-tête, avant le titre. Petit, gris, sans ornement — il
   situe la page, il ne la présente pas. Le chevron est posé ici et non dans le
   markup : c'est une aide de lecture, pas un mot de la page. */
.breadcrumb {
  padding: var(--space-5) 0 0;
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb__item {
  display: flex;
  gap: var(--space-2);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "\203A";
  color: var(--color-gray);
}

.breadcrumb a {
  color: var(--color-gray);
}

.breadcrumb a:hover {
  color: var(--color-black);
  text-decoration: underline;
}

/* Le dernier échelon est la page : il ne se clique pas, et se lit en noir. */
.breadcrumb [aria-current="page"] {
  color: var(--color-black);
}

/* Le fil occupe déjà le haut de la page : l'en-tête n'a plus besoin de tout son
   dégagement. Sélecteur en `~` et non en `+` : les données structurées, invisibles,
   s'intercalent entre les deux. */
.breadcrumb ~ .page-head {
  padding-top: var(--space-4);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.dates {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-gray);
}

/* Colonne de lecture d'un article : le texte ne court pas sur toute la largeur. */
.article {
  max-width: 720px;
}

/* Le formulaire d'abonnement qui ferme un article, séparé du corps par un filet. */
.article__newsletter {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--border);
}

/* Les liens de page du blog : le prototype a des liens, pas une barre de numéros. */
.pager {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* La signature, sous la ligne de dates : même discrétion, même graisse. */
.author {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-gray);
}

.author a {
  color: var(--color-black);
}

.toc {
  font-size: var(--text-base);
}

@media (min-width: 1024px) {
  /* Colonne de lecture d'un article : le texte ne court pas sur toute la largeur. */
.article {
  max-width: 720px;
}

/* Le formulaire d'abonnement qui ferme un article, séparé du corps par un filet. */
.article__newsletter {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--border);
}

/* Les liens de page du blog : le prototype a des liens, pas une barre de numéros. */
.pager {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.toc {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: start;
  }
}

.toc ol {
  list-style: none;
  border-top: var(--border);
}

.toc li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-light-gray);
}

.toc a:hover {
  text-decoration: underline;
}

.prose {
  font-size: var(--text-lg);
  line-height: 1.6;
}

.prose h2 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-section);
  margin: var(--space-6) 0 var(--space-3);
}

.prose p {
  margin-bottom: var(--space-4);
  max-width: 64ch;
}

.prose ul {
  margin: 0 0 var(--space-4) 20px;
}

.prose li {
  margin-bottom: var(--space-1);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aside-tool {
  border: var(--border);
  padding: var(--space-4);
  margin: var(--space-6) 0;
}

.aside-tool h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.aside-tool p {
  color: var(--color-gray);
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.result {
  list-style: none;
  border-top: var(--border);
}

.result li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-light-gray);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-base);
}

.result li span:last-child {
  font-weight: var(--font-weight-medium);
}

.result li.result__total {
  border-bottom: var(--border);
  font-size: var(--text-lg);
  padding: var(--space-3) 0;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.compare th,
.compare td {
  text-align: left;
  padding: 10px var(--space-1);
  border-bottom: 1px solid var(--color-light-gray);
  vertical-align: top;
}

.compare th {
  font-weight: var(--font-weight-medium);
  border-bottom: var(--border);
}

.compare tr.compare__stage td {
  background: var(--color-light-gray);
  font-weight: var(--font-weight-medium);
}

.offer {
  border: var(--border);
  padding: var(--space-4);
  margin-top: var(--space-6);
}

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

@media (min-width: 768px) {
  .offer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.offer h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.offer p {
  font-size: var(--text-base);
  color: var(--color-gray);
}

.offer__mark {
  display: inline-block;
  padding: 2px var(--space-2);
  border: var(--border);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-3);
}

.photo {
  aspect-ratio: 4 / 5;
  max-width: 360px;
  background: var(--color-light-gray);
  border: var(--border);
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-gray);
}

/* Bandeau de consentement — affiché par consent.js, absent sans JavaScript */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--color-white);
  border-top: var(--border);
  padding: var(--space-3) var(--container-pad);
}

.consent__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
}

.consent__text {
  font-size: var(--text-base);
  color: var(--color-gray);
  max-width: 64ch;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* Densité de l'admin */
.admin {
  font-size: var(--text-sm);
}

.admin__topbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: var(--border);
}

.admin__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.admin__nav a {
  font-weight: var(--font-weight-medium);
}

.admin__nav a.is-current {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.admin__title {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-section);
  margin: var(--space-5) 0 var(--space-3);
}

/* Titre de section d'un écran qui en porte plusieurs, comme le référentiel scolaire. */
.admin__section {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  margin: var(--space-5) 0 var(--space-2);
}

/* Les modèles CSV : un lien par ligne, ses colonnes attendues en dessous. */
.templates {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}

.templates li {
  margin-bottom: var(--space-2);
}

.templates .form-note {
  display: block;
}

/* Enregistrer et supprimer, côte à côte au bout d'une ligne éditable. */
.row-actions {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}

/* Une ligne éditable tient plus de champs si chacun reste à sa largeur utile. */
.table .field__input {
  width: auto;
  padding: 4px 6px;
  font-size: var(--text-sm);
}

.admin__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* Le prototype dessine des boutons ; un filtre qui change l'URL est un lien. */
.admin__filters button,
.admin__filters a {
  border: 1px solid var(--color-light-gray);
  padding: 6px 10px;
  font-size: var(--text-sm);
  text-decoration: none;
  color: inherit;
}

.admin__filters button.is-active,
.admin__filters a.is-active {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

/* Pagination : des liens filetés comme les filtres, et des flèches en texte — la
   vue livrée par le framework posait des SVG deux fois plus hauts que la ligne. */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}

.pagination__pages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
}

.pagination__step,
.pagination__page {
  border: 1px solid var(--color-light-gray);
  padding: 6px 10px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.pagination__page.is-current {
  border-color: var(--color-black);
  background: var(--color-black);
  color: var(--color-white);
}

.pagination__step.is-off {
  color: var(--color-gray);
  border-color: var(--color-light-gray);
}

.pagination__gap {
  padding: 6px 0;
  color: var(--color-gray);
}

/* Le compte part à droite : c'est un repère, pas une commande. */
.pagination__count {
  margin-left: auto;
  color: var(--color-gray);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: var(--border);
  border-left: var(--border);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .kpis {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi {
  padding: var(--space-3);
  border-right: var(--border);
  border-bottom: var(--border);
}

.kpi__value {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-section);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
}

.kpi__label {
  color: var(--color-gray);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px var(--space-1);
  border-bottom: 1px solid var(--color-light-gray);
  white-space: nowrap;
}

.table th {
  font-weight: var(--font-weight-medium);
  border-bottom: var(--border);
}

/* La mention de traduction : discrète, au-dessus de la ligne de pied. */
.footer__note {
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
  color: var(--color-gray);
}

/* Le sélecteur de langue : trois liens, le courant en noir, les autres en gris.
   Pas un menu déroulant — trois langues tiennent sur une ligne. */
.nav__locales {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.nav__locale {
  color: var(--color-gray);
}

.nav__locale--current {
  color: var(--color-black);
  font-weight: var(--font-weight-medium);
}

/* Le portrait de la page À propos : il accompagne l'entrée en matière, il ne la
   surplombe pas. Pleine largeur de sa colonne, jamais arrondi. */
.portrait {
  display: block;
  width: 100%;
  height: auto;
  max-width: 320px;
}

/* Les deux cartes de prix : encadrées comme l'offre d'analyse, jamais arrondies.
   Le détail se replie dessous — on vient chercher un prix, pas un tableau. */
.pricing {
  border: var(--border);
  padding: var(--space-4);
}

.pricing__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.pricing__list {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.pricing__list li + li {
  margin-top: var(--space-2);
}

.pricing__details {
  margin: var(--space-4) 0;
  border-top: var(--border);
  border-bottom: var(--border);
  padding: var(--space-3) 0;
}

.pricing__details > summary {
  cursor: pointer;
  font-weight: var(--font-weight-medium);
}

.pricing__details .table-wrap {
  margin-top: var(--space-4);
}

/* Un tableau de la page publique porte son titre dans son `caption` : il est lu
   comme un titre par un lecteur d'écran, et il ne se détache pas du tableau quand
   celui-ci défile. */
.table caption {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  text-align: left;
}

/* La première colonne nomme la ligne : même graisse que l'en-tête, sans son filet. */
.table tbody th {
  font-weight: var(--font-weight-medium);
  border-bottom: 1px solid var(--color-light-gray);
}

/* En-tête triable : le libellé reste un libellé, le lien ne se souligne qu'au
   survol. La flèche ne paraît que sur la colonne triée — deux flèches grises sur
   dix colonnes ne diraient plus rien. */
.table th .sort {
  display: inline-flex;
  gap: var(--space-1);
  align-items: baseline;
  color: inherit;
}

.table th .sort:hover {
  text-decoration: underline;
}

.table th .sort__arrow {
  font-size: var(--text-xs);
}

.table td.num {
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
}

.badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border: 1px solid var(--color-black);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
}

.badge--inverse {
  background: var(--color-black);
  color: var(--color-white);
}

.badge--muted {
  border-color: var(--color-gray);
  color: var(--color-gray);
}

.badge--error {
  border-color: var(--color-error);
  color: var(--color-error);
}

/* ============================================================
   5. Pages
   ============================================================ */
.page-head {
  padding: var(--space-8) 0 var(--space-6);
}

.page-title {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-section);
  line-height: 1.05;
  max-width: 800px;
}

.page-intro {
  font-size: var(--text-lg);
  color: var(--color-gray);
  margin-top: var(--space-4);
  max-width: 600px;
}

.cta {
  padding: var(--space-9) 0;
  border-top: var(--border);
}

.cta__title {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-section);
  max-width: 800px;
}

.cta__text {
  font-size: var(--text-lg);
  color: var(--color-gray);
  margin-top: var(--space-3);
}

.cta__link {
  display: inline-block;
  margin-top: var(--space-5);
  font-size: var(--text-md);
  font-weight: var(--font-weight-medium);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta__link:hover {
  opacity: 0.6;
}

.page-article {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .page-article {
    grid-template-columns: 220px minmax(0, 680px);
    gap: var(--space-9);
  }
}

.page-confirmation main {
  max-width: 720px;
  padding: var(--space-8) 0;
}

.page-legal {
  max-width: 720px;
}

.page-legal h2 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-section);
  margin: var(--space-6) 0 var(--space-2);
}

.page-legal p,
.page-legal li {
  margin-bottom: var(--space-2);
}

.page-legal ul {
  margin-left: 20px;
}

.page-sales .hero {
  padding-bottom: var(--space-8);
}

.price {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 768px) {
  .price {
    grid-template-columns: 1fr 1fr;
  }
}

.price__amount {
  font-size: var(--text-hero);
  letter-spacing: var(--tracking-hero);
  line-height: 1;
}

.price__amount small {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  color: var(--color-gray);
  margin-left: var(--space-2);
}

/* Le funnel se lit en colonne étroite : une seule décision par écran. */
.page-funnel__main {
  max-width: 720px;
  padding-block: var(--space-8);
}

/* ============================================================
   6. Impression
   ============================================================ */
@media print {
  .header,
  .footer,
  .consent,
  .player--floating,
  .nav__menu {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .section {
    padding: var(--space-4) 0;
  }
}
