/* OrthoSuivi – piste « Carnet » : polices, couleurs et composants communs au site et aux écrans du logiciel. */
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/static/fonts/AtkinsonHyperlegibleNext-400.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/static/fonts/AtkinsonHyperlegibleNext-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/static/fonts/Nunito-700.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --encre: #2D4F9E;        /* couleur principale : liens, boutons, focus */
  --encre-fonce: #23407F;  /* survol */
  --texte: #1E2A44;
  --texte-2: #56627A;      /* texte secondaire (6,1:1 sur blanc) */
  --fond: #F7F8FA;
  --surface: #FFFFFF;
  --doux: #E8EDF8;         /* fonds d'accent légers, menu actif */
  --trait: #DCE1EA;
  --surligneur: #F6B8C9;   /* rappels, éléments à retenir */
  --surligneur-texte: #7A2440;
  --alerte: #B3412F;
  --alerte-fond: #FBEAE6;
  --succes: #2F7A4F;
  --succes-fond: #E5F3EA;
  --sur-encre: #FFFFFF;
  --ombre: 0 18px 40px -24px rgb(20 30 60 / .45);
  --titre: "Nunito", system-ui, sans-serif;
  --corps: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --r: 12px;
  color-scheme: light;
}
/* Mode sombre : piloté par le système, ou forcé avec data-theme (bouton des maquettes du logiciel). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --encre: #8FA9E8; --encre-fonce: #A9BEF0; --texte: #E6EAF3; --texte-2: #A3ADC2; --fond: #12182A; --surface: #1B2338; --doux: #243052; --trait: #2E3A57; --surligneur-texte: #12182A; --alerte: #F0937F; --alerte-fond: #3A2024; --succes: #7FD1A2; --succes-fond: #1D3328; --sur-encre: #12182A; --ombre: 0 18px 40px -24px rgb(0 0 0 / .8); color-scheme: dark; }
}
:root[data-theme="dark"] { --encre: #8FA9E8; --encre-fonce: #A9BEF0; --texte: #E6EAF3; --texte-2: #A3ADC2; --fond: #12182A; --surface: #1B2338; --doux: #243052; --trait: #2E3A57; --surligneur-texte: #12182A; --alerte: #F0937F; --alerte-fond: #3A2024; --succes: #7FD1A2; --succes-fond: #1D3328; --sur-encre: #12182A; --ombre: 0 18px 40px -24px rgb(0 0 0 / .8); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 17px/1.6 var(--corps); }
img, svg { display: block; max-width: 100%; }
a { color: var(--encre); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .6rem; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--texte-2); }
.small { font-size: .9rem; }

/* Boutons : un seul niveau de rondeur, plein = action principale, contour = action secondaire. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.25rem; border-radius: 999px; font: 700 1rem/1.2 var(--corps); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-principal { background: var(--encre); color: var(--sur-encre); }
.btn-principal:hover { background: var(--encre-fonce); }
.btn-second { background: var(--surface); color: var(--texte); border-color: var(--trait); }
.btn-second:hover { border-color: var(--encre); }
.btn-danger { background: var(--surface); color: var(--alerte); border-color: currentColor; }
.btn-petit { padding: .4rem .85rem; font-size: .9rem; }

/* Champs */
label { display: block; font-weight: 700; margin: 0 0 .3rem; }
.champ { margin-bottom: 1rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--trait); border-radius: 10px; padding: .65rem .8rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--encre) 25%, transparent); }
.aide { font-size: .88rem; color: var(--texte-2); margin-top: .3rem; }

/* Encadrés */
.rappel { background: color-mix(in srgb, var(--surligneur) 38%, var(--surface)); color: var(--surligneur-texte); border-radius: 10px; padding: .7rem .9rem; }
:root[data-theme="dark"] .rappel { background: var(--surligneur); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rappel { background: var(--surligneur); } }
.alerte { background: var(--alerte-fond); color: var(--alerte); border-radius: 10px; padding: .7rem .9rem; }
.succes { background: var(--succes-fond); color: var(--succes); border-radius: 10px; padding: .7rem .9rem; }
.pastille { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.pastille.alerte, .pastille.succes { padding: .1rem .55rem; }
.pastille.neutre { background: var(--doux); color: var(--encre); }

/* Logo */
.marque { display: inline-flex; align-items: center; gap: .5rem; font: 800 1.25rem/1 var(--titre); color: var(--texte); text-decoration: none; }
.marque svg { flex: none; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
