/* Charte MAJ44, version sobre (celle de Classimus) : Open Sans servie en local, encre #414146, fond #f7f5f8, violet #86286e,
   filets fins, rayon 8 px, sans ombres. Aucun style en ligne (CSP) : tout passe par ces fichiers. */
@font-face { font-family: "Open Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/open-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f7f5f8; --card: #ffffff; --ink: #414146; --muted: #62626b; --line: #e6e1ea; --tint: #f5e9ef;
  --accent: #86286e; --accent-hover: #6d1f58; --on-accent: #ffffff;
  --ok: #17663a; --ok-bg: #e3f3ea; --ok-solid: #17663a;
  --warn: #7a5000; --warn-bg: #fdf0d2; --warn-line: #e8c36a; --warn-solid: #8a5300;
  --err: #a3261f; --err-bg: #fbe5e3; --err-line: #e7a29d; --err-solid: #a3261f;
  --neutral-solid: #5b5b64;
  --radius: 8px;
  --touch: 2.75rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151317; --card: #1e1b21; --ink: #ededed; --muted: #a9a4b0; --line: #3a3540; --tint: #2a2030;
    --accent: #e58bb3; --accent-hover: #f0a5c6; --on-accent: #151317;
    --ok: #6fd39b; --ok-bg: #16301f; --ok-solid: #2f8f5b;
    --warn: #f0c36b; --warn-bg: #33270e; --warn-line: #6b5420; --warn-solid: #b36b00;
    --err: #ff9d96; --err-bg: #3a1a18; --err-line: #7a3b37; --err-solid: #c9473f;
    --neutral-solid: #6d6876;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; }
h1 { margin: 0 0 .75rem; font-size: 1.45rem; font-weight: 300; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* page d'entrée et notice (écrites par le serveur) : une carte sobre, plein écran sur téléphone */
.card { max-width: 34rem; margin: 8vh auto; padding: 1.75rem 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); border-top: 4px solid var(--accent); }
@media (max-width: 36rem) { .card { margin: 0; border-radius: 0; border-width: 4px 0 0; min-height: 100vh; padding: 1.5rem 1rem; } }
.brand { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

label { display: grid; gap: .3rem; margin: .75rem 0; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--muted); border-radius: var(--radius); }
input, select { min-height: var(--touch); padding: .55rem .75rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }

button { font: inherit; }
button.primary { min-height: var(--touch); padding: .6rem 1.25rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer; }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button:disabled { opacity: .5; cursor: default; }
.msg { color: var(--muted); }
.msg.err { color: var(--err); font-weight: 600; }

.foot { margin: 1.4rem 0 0; font-size: .85rem; }
.foot a { color: var(--muted); }
.card.notice { max-width: 46rem; }
.card.notice h1 { margin-top: 0; }
.card.notice h2 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 .3rem; }
.card.notice ul { padding-left: 1.2rem; }
.card.notice hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

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