/* Pupitre — feuille de style du site.
   Sobre, lisible, responsive. Aucune ressource externe : pas de police web,
   pas de CDN, pas d'image distante, pas de JavaScript. */

:root {
  --fond: #fbfaf7;
  --fond-doux: #f1eee7;
  --texte: #1c2230;
  --texte-doux: #4a5365;
  --lien: #1d4ed8;
  --lien-survol: #1e3a8a;
  --trait: #d9d4c7;
  --entete: #14203a;
  --entete-texte: #f4f1ea;
  --encart-fond: #eaf1ff;
  --encart-trait: #9db7f2;
  --verif-fond: #fff3bf;
  --verif-texte: #5c4400;
  --verif-trait: #e0b100;
  --focus: #b45309;
  --largeur: 48rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #10141d;
    --fond-doux: #181e2b;
    --texte: #e8ebf2;
    --texte-doux: #b3bccd;
    --lien: #8fb0ff;
    --lien-survol: #c3d4ff;
    --trait: #2d3649;
    --entete: #0b1120;
    --entete-texte: #f4f1ea;
    --encart-fond: #172340;
    --encart-trait: #3b5aa8;
    --verif-fond: #4a3d00;
    --verif-texte: #ffe9a3;
    --verif-trait: #b38f00;
    --focus: #fbbf24;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Accessibilité : lien d'évitement et focus visible */
.saut {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--fond);
  color: var(--texte);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.saut:focus {
  left: 0.5rem;
  top: 0.5rem;
  outline: 3px solid var(--focus);
}

a {
  color: var(--lien);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--lien-survol);
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* En-tête */
.entete {
  background: var(--entete);
  color: var(--entete-texte);
}

.entete-interieur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.9rem;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--entete-texte);
  text-decoration: none;
}

.marque:hover {
  color: var(--entete-texte);
  text-decoration: underline;
}

.marque img {
  border-radius: 8px;
  display: block;
}

.entete nav ul,
.pied nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.entete nav a {
  color: var(--entete-texte);
  font-size: 0.95rem;
  text-decoration: none;
  padding-block: 0.2rem;
  border-bottom: 2px solid transparent;
}

.entete nav a:hover,
.entete nav a[aria-current="page"] {
  color: var(--entete-texte);
  border-bottom-color: var(--entete-texte);
}

.entete a:focus-visible {
  outline-color: #fbbf24;
}

/* Contenu */
main {
  flex: 1 0 auto;
  padding-block: 2rem 3rem;
}

h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2.4rem 0 0.6rem;
  padding-top: 0.4rem;
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.6rem 0 0.4rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}

.chapeau {
  font-size: 1.15rem;
  color: var(--texte-doux);
  margin-bottom: 1.5rem;
}

.maj {
  color: var(--texte-doux);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.petit {
  font-size: 0.9rem;
  color: var(--texte-doux);
}

/* Encarts */
.encart {
  background: var(--encart-fond);
  border: 1px solid var(--encart-trait);
  border-left-width: 6px;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.encart > :first-child {
  margin-top: 0;
}

.encart > :last-child {
  margin-bottom: 0;
}

.encart h2,
.encart h3 {
  margin-top: 0;
  padding-top: 0;
}

/* Sommaire */
.sommaire {
  background: var(--fond-doux);
  border: 1px solid var(--trait);
  border-radius: 6px;
  padding: 0.9rem 1.25rem;
  margin: 1.5rem 0 2rem;
}

.sommaire p {
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.sommaire ol {
  margin: 0;
  columns: 2 14rem;
  column-gap: 2rem;
}

/* Étapes numérotées */
.etapes {
  counter-reset: etape;
  list-style: none;
  padding-left: 0;
}

.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.9rem;
}

.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--entete);
  color: var(--entete-texte);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tableaux */
.tableau {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--trait);
  border-radius: 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.97rem;
}

caption {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  background: var(--fond-doux);
  border-bottom: 1px solid var(--trait);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--trait);
}

thead th {
  background: var(--fond-doux);
  font-weight: 700;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody th {
  font-weight: 600;
}

/* Définitions (mentions légales) */
dl.fiche dt {
  font-weight: 700;
  margin-top: 0.8rem;
}

dl.fiche dd {
  margin: 0.1rem 0 0;
}

/* Adresses techniques (autorisations Google) : retour à la ligne si l'écran est étroit */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--fond-doux);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

/* Points à vérifier : visibles en aperçu, à résoudre avant la mise en ligne */
mark.verif {
  background: var(--verif-fond);
  color: var(--verif-texte);
  border-bottom: 2px solid var(--verif-trait);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}

/* Pied de page */
.pied {
  border-top: 1px solid var(--trait);
  background: var(--fond-doux);
  padding-block: 1.5rem;
  font-size: 0.95rem;
}

.pied p {
  margin: 0.8rem 0 0;
}

.pied nav a {
  font-weight: 600;
}

/* Écrans étroits */
@media (max-width: 36rem) {
  body {
    font-size: 1rem;
  }
  .entete-interieur {
    flex-direction: column;
    align-items: flex-start;
  }
  h2 {
    font-size: 1.25rem;
  }
}

/* Impression */
@media print {
  .entete,
  .saut,
  .sommaire {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  a {
    color: #000;
  }
  mark.verif {
    background: none;
    border-bottom: 1px dotted #000;
  }
}
