/*
 * La feuille de style, écrite à la main et servie telle quelle.
 *
 * POURQUOI PAS DE CADRE. Ces pages sont des documents : un titre, du texte,
 * quelques tableaux. Un cadre utilitaire ajouterait une étape de construction,
 * une dépendance et un fichier de configuration pour produire les vingt règles
 * qui suivent. Le jour où le site aura des écrans interactifs, ils pourront
 * avoir leur propre outillage sans toucher à ceci.
 *
 * LA PALETTE EST CELLE DE SES RÉVISION. Les deux sites sont frères : un élève
 * qui passe de l'un à l'autre doit reconnaître la maison. Papier chaud, encre
 * presque noire, un ocre pour ce qui attire l'oeil, un vert sobre pour les
 * liens de marque.
 */

:root {
  --papier: #f8f4ee;
  --papier-carte: #fdfbf7;
  --encre: #1c160e;
  --encre-douce: #6b6153;
  --trait: #e5ddd0;
  --ocre: #b4761f;
  --ocre-pale: #fdf6e7;
  --vert: #1f6b45;
  --largeur: 44rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

/* Le lien d'évitement : invisible tant qu'on ne tabule pas dessus. */
.saut {
  position: absolute;
  left: -9999px;
}
.saut:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--encre);
  color: var(--papier);
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

/* ── Le bandeau ─────────────────────────────────────────────────────────── */

.bandeau {
  background: var(--papier);
  border-bottom: 1px solid var(--trait);
  position: sticky;
  top: 0;
  z-index: 10;
}

.bandeau-interieur {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.marque {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--encre);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.marque span { color: var(--vert); }

.bandeau nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.bandeau nav a {
  color: var(--encre-douce);
  text-decoration: none;
  font-size: 0.95rem;
}
.bandeau nav a:hover { color: var(--encre); }

/* ── Le corps ───────────────────────────────────────────────────────────── */

main {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
}

.fil-ariane ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--encre-douce);
}
.fil-ariane li + li::before { content: "›"; margin-right: 0.4rem; }
.fil-ariane a { color: var(--encre-douce); }

h1 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.chapeau {
  font-size: 1.1rem;
  color: var(--encre-douce);
  margin: 0 0 2rem;
}

h2 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2.75rem 0 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--trait);
  scroll-margin-top: 5rem;
}

p { margin: 0 0 1.1rem; }

a { color: var(--encre); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--trait); }
a:hover { text-decoration-color: var(--encre); }

ul, ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }

strong { font-weight: 600; }

/* ── Le sommaire ────────────────────────────────────────────────────────── */

.sommaire {
  background: var(--papier-carte);
  border: 1px solid var(--trait);
  border-radius: 8px;
  padding: 1rem 1.25rem 0.6rem;
  margin: 0 0 2rem;
}
.sommaire-titre {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--encre-douce);
  margin: 0 0 0.6rem;
}
.sommaire ol { margin: 0; padding-left: 1.1rem; font-size: 0.95rem; }

/* ── Les encadrés, tableaux, citations ──────────────────────────────────── */

.encadre {
  background: var(--ocre-pale);
  border: 1px solid #f0e2c4;
  border-radius: 8px;
  padding: 1rem 1.25rem 0.4rem;
  margin: 0 0 1.4rem;
}
.encadre-titre {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocre);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.encadre p:last-child { margin-bottom: 0.9rem; }

.table-defilante { overflow-x: auto; margin: 0 0 1.4rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--trait);
  vertical-align: top;
}
th { font-weight: 600; background: var(--papier-carte); white-space: nowrap; }

blockquote {
  margin: 0 0 1.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--ocre);
  color: var(--encre-douce);
}
blockquote cite { font-style: normal; font-size: 0.85rem; }

/* ── Questions fréquentes ───────────────────────────────────────────────── */

.questions details {
  border-bottom: 1px solid var(--trait);
  padding: 0.85rem 0;
}
.questions summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::before { content: "+ "; color: var(--ocre); font-weight: 700; }
.questions details[open] summary::before { content: "− "; }
.questions details p { margin: 0.7rem 0 0; color: var(--encre-douce); }

/* ── Pour aller plus loin ───────────────────────────────────────────────── */

.aller-plus-loin ul { list-style: none; padding: 0; }
.aller-plus-loin li { margin-bottom: 0.7rem; }
.aller-plus-loin .detail { color: var(--encre-douce); font-size: 0.9rem; }

/* ── Les cartes de la page d'accueil et des sommaires ───────────────────── */

.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.9rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.carte {
  display: block;
  background: var(--papier-carte);
  border: 1px solid var(--trait);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--encre);
  height: 100%;
}
.carte:hover { border-color: var(--encre); }
.carte-titre { font-weight: 600; display: block; margin-bottom: 0.3rem; }
.carte-detail { color: var(--encre-douce); font-size: 0.92rem; display: block; }
.carte-bientot { opacity: 0.65; }

/* ── Le pied ────────────────────────────────────────────────────────────── */

.pied {
  border-top: 1px solid var(--trait);
  background: var(--papier-carte);
}
.pied-interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  font-size: 0.9rem;
  color: var(--encre-douce);
}
.pied-mentions { margin-bottom: 0; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding: 1.25rem 1rem 4rem; }
  .bandeau-interieur { padding: 0.6rem 1rem; }
}
