/* Test CHARLES : page d’attente et pages annexes.
   Mise en page « copie d’examen » : le nom en tête de copie, l’énoncé calé à gauche, la date dans une
   fiche sur petits carreaux ; l’encre bleue réservée aux actions et aux initiales du sigle. */

/* polices:debut */
@font-face {
  font-family: "Source Serif 4";
  src: url("polices/source-serif-4-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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 Sans 3";
  src: url("polices/source-sans-3-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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;
}
/* polices:fin */

:root {
  --papier: #FFFFFF;
  --encre: #15161A;
  --graphite: #4E525B;
  --filet: #D9DCE3;
  --carreau: #E6E9F1;
  --bleu: #2742A5;
  --bleu-fonce: #1C3184;
  --sur-bleu: #FFFFFF;
  --tete-fond: #15161A;
  --tete-texte: #FFFFFF;
  --bandeau: #15161A;
  --sur-bandeau: #E4E6EB;
  --bandeau-discret: #A9ADB7;
  /* Le symbole reste noir sur blanc : inversé, la barbe blanchit et le portrait vieillit. */
  --symbole-encre: #15161A;
  --symbole-fond: transparent;

  --f-titre: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-texte: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --large: 1180px;
  --gouttiere: 20px;
  color-scheme: light;
}
@media (min-width: 760px) { :root { --gouttiere: 40px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #111216;
    --encre: #E8E9ED;
    --graphite: #A6AAB4;
    --filet: #2C2F38;
    --carreau: #1C1F27;
    --bleu: #93A8F2;
    --bleu-fonce: #B4C3F7;
    --sur-bleu: #0D1022;
    --tete-fond: #272A33;
    --tete-texte: #E8E9ED;
    --bandeau: #1E2028;
    --sur-bandeau: #D9DBE1;
    --bandeau-discret: #8E929C;
    --symbole-encre: #111216;
    --symbole-fond: #E8E9ED;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --papier: #111216;
  --encre: #E8E9ED;
  --graphite: #A6AAB4;
  --filet: #2C2F38;
  --carreau: #1C1F27;
  --bleu: #93A8F2;
  --bleu-fonce: #B4C3F7;
  --sur-bleu: #0D1022;
  --tete-fond: #272A33;
  --tete-texte: #E8E9ED;
  --bandeau: #1E2028;
  --sur-bandeau: #D9DBE1;
  --bandeau-discret: #8E929C;
  --symbole-encre: #111216;
  --symbole-fond: #E8E9ED;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
h1, h2 { font-family: var(--f-titre); font-weight: 600; margin: 0; text-wrap: balance; }
p, ul, dl, dd { margin: 0; }
p, li, dd { text-wrap: pretty; }
a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--bleu-fonce); }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.cadre {
  max-width: var(--large);
  margin-inline: auto;
  padding-left: max(var(--gouttiere), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gouttiere), env(safe-area-inset-right, 0px));
}

/* Bandeau « site en construction » */
.chantier { background: var(--bandeau); color: var(--sur-bandeau); font-size: 0.875rem; line-height: 1.45; }
.chantier .cadre { padding-block: 10px; }
.chantier-marque {
  font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  margin-right: 0.8em; white-space: nowrap;
}
.chantier-marque::before {
  content: ""; display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.55em; vertical-align: -0.12em;
  background: repeating-linear-gradient(-45deg, currentColor 0 2px, transparent 2px 5px);
}

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1.25 var(--f-texte);
  padding: 0.85em 1.3em;
  border: 1.5px solid transparent;
  border-radius: 2px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.bouton-plein { background: var(--bleu); color: var(--sur-bleu); }
.bouton-plein:hover { background: var(--bleu-fonce); color: var(--sur-bleu); }
.bouton-trait { border-color: var(--encre); color: var(--encre); background: transparent; }
.bouton-trait:hover { background: var(--encre); color: var(--papier); }

/* Accueil : en-tête de copie */
.copie { padding-block: clamp(44px, 6vw, 88px) clamp(64px, 8vw, 112px); }
.tete {
  padding-bottom: clamp(32px, 4vw, 48px);
  margin-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--filet);
}
.signature {
  display: flex; align-items: center; gap: 0.3em;
  font-size: clamp(2.6rem, 1.3rem + 5.2vw, 5.5rem);
  line-height: 1;
}
.signature-symbole {
  width: 1.25em; height: 1.25em; flex: none;
  padding: 0.06em; border-radius: 3px;
  color: var(--symbole-encre); background: var(--symbole-fond);
}
.signature-mot { letter-spacing: 0.14em; margin-right: -0.14em; }
.sigle {
  margin-top: 22px; max-width: 46rem;
  font-family: var(--f-titre);
  font-size: clamp(1.125rem, 0.98rem + 0.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--graphite);
  text-wrap: balance;
}
.sigle b { color: var(--bleu); font-weight: 650; }

/* Accueil : énoncé, fiche de session, actions */
.corps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "texte" "session" "actions" "pilotes";
  row-gap: 36px;
}
.texte { grid-area: texte; display: grid; gap: 16px; max-width: 62ch; }
.chapeau {
  font-family: var(--f-titre); font-weight: 500;
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.55rem);
  line-height: 1.35; letter-spacing: -0.005em;
}

.session {
  grid-area: session;
  width: 100%; max-width: 360px;
  border: 1px solid var(--encre);
  background-color: var(--papier);
  background-image:
    linear-gradient(var(--carreau) 1px, transparent 1px),
    linear-gradient(90deg, var(--carreau) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
}
.session dt {
  background: var(--tete-fond); color: var(--tete-texte);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 18px;
}
.session dd { padding: 22px 18px 20px; display: grid; gap: 12px; }
.session-date {
  font-family: var(--f-titre); font-weight: 600;
  font-size: clamp(2.25rem, 1.7rem + 1.8vw, 3rem);
  line-height: 1; letter-spacing: -0.01em;
}
.session-note { font-size: 0.9375rem; line-height: 1.45; color: var(--graphite); }

.actions { grid-area: actions; display: grid; gap: 14px; justify-items: start; }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.ecrire { font-size: 0.97rem; color: var(--graphite); }
.pilotes {
  grid-area: pilotes;
  max-width: 46ch;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--bleu);
  font-size: 0.95rem; line-height: 1.5; color: var(--graphite);
}
.pilotes strong { color: var(--encre); font-weight: 600; }

@media (min-width: 960px) {
  .corps {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    grid-template-areas: "texte session" "actions pilotes";
    column-gap: clamp(56px, 7vw, 112px);
    row-gap: 40px;
    align-items: start;
  }
}
@media (max-width: 520px) {
  .actions { justify-items: stretch; }
  .boutons { flex-direction: column; }
}

/* Pages annexes : en-tête, document */
.entete { border-bottom: 1px solid var(--filet); }
.entete-ligne { display: flex; align-items: center; min-height: 68px; }
.marque { display: inline-flex; align-items: center; gap: 11px; color: var(--encre); text-decoration: none; }
.marque:hover { color: var(--encre); }
.marque-symbole {
  width: 38px; height: 38px; flex: none;
  padding: 2px; border-radius: 2px;
  color: var(--symbole-encre); background: var(--symbole-fond);
}
.marque-mot { font-family: var(--f-titre); font-weight: 600; font-size: 1.22rem; letter-spacing: 0.14em; }

.document { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 104px); }
.document .cadre > * { max-width: 68ch; }
.document h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 18px; }
.document h2 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 10px; }
.document .intro { color: var(--graphite); }
.document section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--filet); }
.document section > * + * { margin-top: 10px; }
.document ul { padding-left: 1.2em; display: grid; gap: 8px; }
.document .retour-accueil { margin-top: 28px; }

/* Pied de page */
.pied { background: var(--bandeau); color: var(--sur-bandeau); font-size: 0.93rem; }
.pied .cadre { padding-block: 52px 44px; }
.pied-grille { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 32px 56px; }
@media (max-width: 860px) { .pied-grille { grid-template-columns: minmax(0, 1fr); } }
.pied-marque { font-family: var(--f-titre); font-weight: 600; font-size: 1.22rem; letter-spacing: 0.14em; margin-bottom: 10px; }
.pied-titre { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bandeau-discret); margin-bottom: 8px; }
.pied p + p { margin-top: 10px; }
.pied .discret { color: var(--bandeau-discret); }
.pied a { color: var(--sur-bandeau); }
.pied a:hover { color: var(--sur-bandeau); text-decoration-thickness: 2px; }

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