/* Marge — application, univers « Bleu d'encre » (comme la page de présentation) : blanc,
   bleu d'encre, teinte bleue pâle pour les surfaces de travail, corail réservé à la coquille.
   Besley nomme, Familjen Grotesk sert, Spline Sans Mono annote, Source Serif 4 cite le livre. */

@font-face { font-family: "Besley"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/besley-600.woff2") format("woff2"); }
@font-face { font-family: "Besley"; font-style: normal; font-weight: 800; font-display: swap; src: url("polices/besley-800.woff2") format("woff2"); }
@font-face { font-family: "Besley"; font-style: italic; font-weight: 600; font-display: swap; src: url("polices/besley-600-italique.woff2") format("woff2"); }
@font-face { font-family: "Besley"; font-style: italic; font-weight: 800; font-display: swap; src: url("polices/besley-800-italique.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 400; font-display: swap; src: url("polices/familjen-grotesk-400.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 500; font-display: swap; src: url("polices/familjen-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 600; font-display: swap; src: url("polices/familjen-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Spline Sans Mono"; font-weight: 400; font-display: swap; src: url("polices/spline-sans-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Spline Sans Mono"; font-weight: 500; font-display: swap; src: url("polices/spline-sans-mono-500.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("polices/source-serif-4-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: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("polices/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+2113, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("polices/source-serif-4-italique-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }

:root {
  --blanc: #ffffff;
  --bleu: #1d2b6b;             /* bleu d'encre : marque, boutons, ce qui est en cours */
  --bleu-fonce: #141f52;
  --teinte: #eef1fa;           /* surfaces de travail */
  --teinte-2: #e4e8f6;
  --trait: #d5dbf0;            /* filets et bords */
  --bord-champ: #c9cfe6;
  --texte: #12172e;
  --texte-2: #4a5070;          /* 8,1:1 sur blanc */
  --texte-3: #5f6482;          /* 5,8:1 sur blanc, 5,1:1 sur la teinte */
  --sur-bleu: #c9d0ee;
  --corail: #ff6b4a;           /* la coquille : trait, surlignage, point du logo */
  --corail-texte: #b23a1e;
  --corail-pale: #ffe7e1;
  --titre: "Besley", Georgia, serif;
  --sans: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --livre: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --glisse: cubic-bezier(.16, 1, .3, 1);
  --elev-1: 0 1px 2px rgb(18 23 46 / .06), 0 2px 8px rgb(18 23 46 / .05);
  --elev-2: 0 2px 6px rgb(18 23 46 / .06), 0 18px 40px -12px rgb(18 23 46 / .22);
  --tete: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
/* un élément caché le reste, quelle que soit sa mise en page (grille, flex) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--blanc); color: var(--texte); font: 400 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: #ffd9cf; color: var(--texte); }
input, textarea, select, button { font: inherit; color: inherit; caret-color: var(--bleu); }
a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bleu-fonce); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--trait) transparent; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* les pictogrammes de base.html.j2 : définis une fois, hors du flux de la page */
.pictos { position: absolute; }
svg.icone { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* les voix : un libellé (petit, gris bleu) et une annotation (mono) */
.libelle { font: 600 13px/1.3 var(--sans); color: var(--texte-3); }
.mono { font-family: var(--mono); font-weight: 400; }

/* ---- Logo et en-tête des pages simples ------------------------------------------------- */
.sigle { font: italic 800 26px/1 var(--titre); letter-spacing: -.02em; color: var(--bleu); text-decoration: none; white-space: nowrap; }
.sigle:hover { color: var(--bleu); text-decoration: none; }
.sigle .sigle-point { font-style: normal; color: var(--corail); }
.tete-site { height: var(--tete); display: flex; align-items: center; gap: 18px; padding: 0 32px; border-bottom: 1px solid var(--trait); background: var(--blanc); }
.tete-site .sep { width: 1px; height: 24px; background: var(--trait); flex: none; }
.tete-site .livre { min-width: 0; font: italic 600 19px/1.2 var(--titre); color: var(--texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tete-site .meta { font: 400 12.5px var(--mono); color: var(--texte-3); white-space: nowrap; }
.tete-site .droite { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.tete-site .droite a:not(.bouton) { color: var(--texte-2); font-weight: 500; text-decoration: none; }
.tete-site .droite a:not(.bouton):hover { color: var(--bleu); }
.tete-site .courriel { color: var(--texte-3); }
.tete-site form { margin: 0; }
button.lien { background: none; border: 0; padding: 0; color: var(--texte-2); cursor: pointer; font-size: 14px; font-weight: 500; }
button.lien:hover { color: var(--bleu); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Contrôles ------------------------------------------------------------------------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 0 18px; border: 1.5px solid var(--bleu); border-radius: 999px; background: var(--bleu); color: var(--blanc);
  font: 600 14.5px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms var(--ease), transform 100ms var(--ease); }
.bouton:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); color: var(--blanc); text-decoration: none; }
.bouton:active { transform: scale(.98); }
.bouton.contour { background: var(--blanc); color: var(--bleu); }
.bouton.contour:hover { background: var(--teinte); color: var(--bleu); border-color: var(--bleu); }
.bouton.petit { min-height: 36px; padding: 0 14px; font-size: 14px; }
.bouton:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.touche { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px;
  border: 1px solid currentColor; font: 500 12px/1 var(--mono); opacity: .75; }
.champ { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--bord-champ); border-radius: 12px;
  background: var(--blanc); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.champ:focus, .champ:focus-visible { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgb(29 43 107 / .18); }
.champ::placeholder { color: var(--texte-3); }
select.champ { appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d2b6b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
/* cases à cocher en pastilles : pleines en bleu quand elles sont cochées */
.case { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--teinte); color: var(--texte-2); font: 500 13.5px var(--sans); cursor: pointer; user-select: none;
  transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.case:hover { background: var(--teinte-2); }
.case input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.case:has(input:checked) { background: var(--bleu); color: var(--blanc); }
.case:has(input:focus-visible) { outline: 2px solid var(--bleu); outline-offset: 2px; }
.case .nombre { font: 400 11.5px var(--mono); opacity: .8; }
.message { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--teinte); color: var(--texte); }
/* une erreur : sur fond corail pâle, comme sur le formulaire de la présentation */
.message.erreur { background: var(--corail-pale); color: var(--corail-texte); }
.message.erreur strong { font-weight: 600; }

/* certitude : une pastille de texte, jamais la couleur seule */
.certitude { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font: 500 12px/1.25 var(--mono); white-space: nowrap; background: var(--teinte-2); color: var(--texte-2); }
.certitude::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.certitude .traits { display: none; }
.certitude .cert-lib { display: inline-block; }
.certitude .cert-lib::first-letter { text-transform: uppercase; }
.certitude[data-niveau="certain"] { background: var(--bleu); color: var(--blanc); }
.certitude[data-niveau="probable"] { background: var(--corail-pale); color: var(--corail-texte); }

/* ---- Pages simples (connexion, accueil, suivi, liste, pages légales) --------------------- */
.feuille { max-width: 1120px; margin: 0 auto; padding: 56px 32px 72px; }
.titre { margin: 0 0 12px; font: 800 clamp(36px, 4vw, 52px)/1.06 var(--titre); letter-spacing: -.02em; color: var(--bleu); text-wrap: balance; }
.chapo { font-size: 18px; line-height: 1.55; color: var(--texte-2); max-width: 60ch; margin: 0 0 32px; }
.pied { max-width: 1120px; margin: 0 auto; padding: 24px 32px 40px; border-top: 1px solid var(--trait);
  color: var(--texte-3); font-size: 13.5px; display: flex; gap: 12px 28px; flex-wrap: wrap; }
.pied .liens-legaux { display: flex; gap: 18px; flex-wrap: wrap; }
.pied .liens-legaux a { color: var(--texte-2); }

/* ---- Formulaires des pages simples (connexion, inscription, mot de passe, paiement) ------ */
body:not(.encre) .formulaire label { display: block; font-weight: 600; font-size: 14.5px; margin: 22px 0 8px; }
body:not(.encre) .formulaire .bouton { margin-top: 30px; width: 100%; min-height: 48px; font-size: 15.5px; }
.formulaire.etroit { max-width: 420px; }
body:not(.encre) .formulaire .message { margin-bottom: 8px; }
body:not(.encre) .formulaire .aide-champ { margin: 6px 0 0; color: var(--texte-3); font-size: 13.5px; }
body:not(.encre) .formulaire .aide-erreur { margin: 6px 0 0; color: var(--corail-texte); font-size: 13.5px; font-weight: 600; }
body:not(.encre) .formulaire .champ[aria-invalid="true"] { border-color: var(--corail-texte); }
/* une case à cocher qui engage (conditions, renonciation) : visible, jamais en pastille */
body:not(.encre) .formulaire label.accord { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start;
  margin: 24px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--teinte); font-weight: 400; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
body:not(.encre) .formulaire label.accord input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--bleu); cursor: pointer; }
body:not(.encre) .formulaire label.accord[data-erreur] { box-shadow: inset 0 0 0 1.5px var(--corail-texte); }
body:not(.encre) .formulaire .piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.aide { color: var(--texte-3); font-size: 14.5px; margin: 20px 0 0; }
.aide + .aide { margin-top: 8px; }
.message.avis { background: var(--teinte); color: var(--bleu); font-weight: 600; margin-bottom: 8px; }
/* une étape d'un parcours : grand numéro en serif, comme sur la présentation */
/* étapes de l'inscription ; « .etapes » est pris par la page de présentation */
.etapes-compte { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: etape; }
.etapes-compte li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; counter-increment: etape; }
.etapes-compte li::before { content: counter(etape); grid-row: span 2; font: 800 36px/1 var(--titre); color: var(--bleu); }
.etapes-compte strong { font: 600 17px/1.3 var(--titre); color: var(--texte); }
.etapes-compte span { color: var(--texte-2); font-size: 15px; }
.prix { font: 800 44px/1 var(--titre); letter-spacing: -.02em; color: var(--bleu); }
.prix small { font: 400 13px var(--mono); letter-spacing: 0; color: var(--texte-3); margin-left: 6px; }

/* ---- Pages légales (mentions, confidentialité, conditions) ------------------------------ */
.texte-legal { max-width: 74ch; font-size: 16px; line-height: 1.6; }
.texte-legal h2 { margin: 44px 0 12px; font: 800 24px/1.2 var(--titre); letter-spacing: -.01em; color: var(--bleu); }
.texte-legal h3 { margin: 24px 0 6px; font: 600 18px/1.3 var(--titre); color: var(--texte); }
.texte-legal p, .texte-legal ul { margin: 0 0 12px; }
.texte-legal ul { padding-left: 20px; }
.texte-legal li { margin-bottom: 6px; }
.texte-legal li::marker { color: var(--corail); }
.texte-legal ol { margin: 0 0 12px; padding-left: 22px; }
.texte-legal .encadre { margin: 0 0 16px; padding: 16px 20px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--bleu); }
.texte-legal .encadre p:last-child { margin-bottom: 0; }
.texte-legal dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 24px; margin: 0 0 12px;
  padding: 18px 20px; border-radius: 16px; background: var(--teinte); }
.texte-legal dt { font: 600 14px/1.6 var(--sans); color: var(--texte-2); }
.texte-legal dd { margin: 0; }
.texte-legal .version { color: var(--texte-3); font: 400 13px var(--mono); margin-top: 44px; }
/* champ que l'éditeur du site doit encore remplir (editeur.toml) : visible */
.a-completer { background: var(--corail-pale); color: var(--corail-texte); border-radius: 4px; padding: 0 4px; font-weight: 600; }

@media (max-width: 720px) {
  .texte-legal dl { grid-template-columns: 1fr; gap: 2px; }
  .texte-legal dd { margin-bottom: 10px; }
  .feuille { padding: 36px 16px 48px; }
  .pied { padding: 20px 16px 32px; }
  .tete-site { gap: 12px; padding: 0 16px; }
  .tete-site .meta, .tete-site .sep, .tete-site .courriel { display: none; }
  .sigle { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }
@media print { .tete-site, .pied, .sans-impression { display: none !important; } }
