/*
 * Contenu éditorial — en-tête de page et texte de l'éditeur.
 *
 * Sert aux pages sans sections, et au contenu WYSIWYG des layouts. La maquette ne
 * couvre pas les pages internes : ce fichier reste donc sobre, bâti uniquement sur
 * les tokens, pour que les pages soient lisibles en attendant d'être maquettées.
 *
 * Les mesures suivent les proportions de la maquette : conteneur de 1280 px,
 * colonne de texte limitée à 72 caractères, échelle typographique des tokens.
 */

/* ==========================================================================
   En-tête des pages internes — template-parts/page-header.php
   ==========================================================================

   La maquette ne dessine pas les pages internes. Cet en-tête est déduit de ce
   qu'elle établit : le haut de l'accueil est sombre (la photo du hero), le bleu
   marine est la couleur des grands aplats (barre utilitaire, associations), et
   l'icône dans un disque terra est celle des accès rapides.

   Contrastes mesurés sur --navy : titre blanc 12.6:1, chapô à 85 % 9.5:1, fil
   d'Ariane à 75 % 7.7:1. Le liseré de focus terra n'y atteint que 2.4:1 : il
   passe au blanc dans cet en-tête. */

.page-hero {
  background: var(--navy);
  color: #fff;
  padding: 36px 0 64px;
}

.page-hero a:focus-visible { outline-color: #fff; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
}

/* Casse normale, 14 px : en capitales espacées de 11 px, le fil d'Ariane était
   le texte le moins lisible de la page pour une vue basse. */
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

/* Séparateur dessiné : un caractère serait lu entre chaque niveau. */
.breadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 14px 0 10px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* 24 px de haut au minimum : cible tactile d'un lien en ligne (WCAG 2.5.8). */
.breadcrumb a {
  display: inline-block;
  padding: 5px 0;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}

.breadcrumb a:hover { color: #fff; text-decoration-color: currentColor; }
.breadcrumb [aria-current] { color: #fff; }

/* Variante fond clair — fiches d'actualité et d'événement. --ink-3 sur --bg :
   5.1:1. */
.breadcrumb--light { margin-bottom: 22px; }
.breadcrumb--light li { color: var(--ink-3); }
.breadcrumb--light a:hover { color: var(--ink); }
.breadcrumb--light [aria-current] { color: var(--ink-2); }

/* Pastille de catégorie cliquable, sur une fiche d'actualité. */
.news-tag--link { transition: filter .2s; }
.news-tag--link:hover { filter: brightness(1.15); }

.page-hero-main {
  margin-top: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gutter);
}

.page-hero-text { min-width: 0; }

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  overflow-wrap: break-word;
}

.page-hero-lead {
  margin-top: 20px;
  max-width: 62ch;
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

/* Même disque que les accès rapides, à l'échelle de l'en-tête. */
.page-hero-icon {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--terra);
  display: grid;
  place-items: center;
}

.page-hero-icon svg {
  width: 44px;
  height: 44px;
  color: #fff;
}

@media (max-width: 980px) {
  .page-hero { padding: 28px 0 44px; }
  .page-hero-main { margin-top: 28px; }
  .page-hero h1 { font-size: 2.25rem; }
  .page-hero-lead { font-size: 1.03125rem; margin-top: 14px; }
  .page-hero-icon { width: 64px; height: 64px; }
  .page-hero-icon svg { width: 30px; height: 30px; }
}

@media (max-width: 620px) {
  /* Sur un écran étroit, l'icône prendrait la place du titre. */
  .page-hero-icon { display: none; }
}

/* --------------------------------------------------------------------------
   Variante photo — le bandeau
   --------------------------------------------------------------------------

   Le hero de l'accueil en plus bas : photo pleine largeur, voile sombre à
   gauche, texte posé en bas.

   Contraste garanti quelle que soit la photo. Le calcul retient le pire cas, un
   pixel blanc pur sous le texte : il faut alors un voile d'au moins 0.68 de
   --ink pour que le blanc atteigne 6.3:1, et le blanc à 90 % du chapô et du fil
   d'Ariane 5.4:1. Le texte est borné à 560 px, soit 47 % de la largeur à
   1280 px comme à 1920 px : le voile tient 0.68 jusqu'à 48 %, puis s'efface
   pour laisser voir la photo. Sous 980 px, le texte occupe toute la largeur : le
   voile devient uniforme, 0.66 au plus clair.

   Pourquoi pas une ombre portée sur le texte : elle ne compte pas dans le calcul
   du contraste, et ne protège rien sur un ciel clair. */

.page-hero--photo {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 440px;
  padding: 32px 0 60px;
  background: var(--ink);
}

.page-hero-media,
.page-hero-media picture,
.page-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.page-hero-media img {
  object-fit: cover;
  object-position: center 55%;
}

.page-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 22, 40, 0.86) 0%, rgba(15, 22, 40, 0.68) 48%, rgba(15, 22, 40, 0.18) 76%, rgba(15, 22, 40, 0.06) 100%),
    linear-gradient(180deg, rgba(15, 22, 40, 0.3) 0%, rgba(15, 22, 40, 0) 28%);
}

.page-hero--photo > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/*
 * Pages de détail (une rubrique sous sa page parente, l'agenda, une catégorie) :
 * un bandeau plus bas. Le contenu qu'on y vient chercher — un procès-verbal, un
 * nom — remonte de 120 px ; les pages d'entrée gardent l'ampleur.
 */
.page-hero--photo.page-hero--compact { min-height: 320px; }

/* Le titre descend en bas du bandeau ; le fil d'Ariane reste en haut. */
.page-hero--photo .page-hero-main { margin-top: auto; padding-top: 56px; }
.page-hero--compact .page-hero-main { padding-top: 40px; }
.page-hero--photo .page-hero-text { max-width: 560px; }

.page-hero--photo h1 { text-wrap: balance; }
.page-hero--photo .page-hero-lead { color: rgba(255, 255, 255, 0.92); }
.page-hero--photo .breadcrumb li { color: rgba(255, 255, 255, 0.9); }

/* Second ton du titre, comme les titres de section. Titre ≥ 36 px : 3:1 suffit. */
.page-hero h1 .ton2 {
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

/*
 * Entre 981 et 1279 px, le conteneur n'a pas encore sa largeur maximale : le
 * texte, borné à 560 px, s'étend jusqu'à 58 % de l'écran (à 1024 px). Le palier
 * à 0.68 suit jusque-là.
 */
@media (min-width: 981px) and (max-width: 1279px) {
  .page-hero-media::after {
    background:
      linear-gradient(90deg, rgba(15, 22, 40, 0.86) 0%, rgba(15, 22, 40, 0.68) 60%, rgba(15, 22, 40, 0.2) 86%, rgba(15, 22, 40, 0.08) 100%),
      linear-gradient(180deg, rgba(15, 22, 40, 0.3) 0%, rgba(15, 22, 40, 0) 28%);
  }
}

@media (max-width: 980px) {
  .page-hero--photo { min-height: 360px; padding: 24px 0 40px; }
  .page-hero--photo.page-hero--compact { min-height: 280px; }

  .page-hero-media::after {
    background: linear-gradient(180deg, rgba(15, 22, 40, 0.66) 0%, rgba(15, 22, 40, 0.72) 45%, rgba(15, 22, 40, 0.86) 100%);
  }

  .page-hero--photo .page-hero-text { max-width: none; }
}

/* ==========================================================================
   En-tête des autres gabarits — archives, recherche, fiches
   ========================================================================== */

.page-body { padding: 56px 0 var(--section-y); }

.page-head {
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-family: var(--serif);
  font-size: var(--fs-h2-section);
  font-weight: 700;
  line-height: var(--lh-h2-section);
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* ==========================================================================
   Contenu de l'éditeur
   ========================================================================== */

/*
 * La largeur de lecture est bornée à 72ch : au-delà, l'œil perd sa ligne en
 * revenant à la marge gauche. C'est la même contrainte que les paragraphes de la
 * maquette, qui ne dépassent jamais 640 px.
 */
/* 64ch ≈ 75 caractères réels en Public Sans : le « ch » mesure le zéro, plus
   large qu'un caractère moyen. 72ch en donnait ~95. */
.page-content {
  max-width: 64ch;
  color: var(--ink-2);
}

.page-content > * + * { margin-top: 1.1em; }

.page-content h2,
.page-content h3,
.page-content h4 {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 2em;
}

.page-content h2 { font-size: 1.875rem; font-weight: 700; }
.page-content h3 { font-size: var(--fs-h3-card); font-weight: 700; }
.page-content h4 { font-size: 1.125rem; font-weight: 600; }

.page-content p { line-height: var(--lh-body); }

.page-content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-content a:hover { color: var(--terra); }

.page-content strong { color: var(--ink); font-weight: 600; }

.page-content ul,
.page-content ol {
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* base.css retire les puces pour les listes de navigation : on les rend au
   contenu éditorial, où elles portent du sens. */
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li::marker { color: var(--ink-3); }

.page-content blockquote {
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--terra); /* impeccable-disable-line side-tab -- filet de citation, pas une carte */
  color: var(--ink);
  font-size: 1.125rem;
}

.page-content img,
.page-content figure { border-radius: var(--r-card-sm); overflow: hidden; }

.page-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.page-content th,
.page-content td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.page-content th { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Liste d'actualités hors section — accueil en mode « derniers articles »
   ========================================================================== */

/*
 * Double classe volontaire : sections/actualites.css est chargé APRÈS ce fichier
 * et y déclare « .news { padding: 32px 0 96px } ». À spécificité égale, la
 * dernière règle gagnerait. « .news.news--archive » vaut 0,0,2 et passe devant.
 */
.news.news--archive { padding-top: 56px; }

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 980px) {
  .news-list { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding-top: 40px; }
}

@media (max-width: 620px) {
  .news-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Fiches — actualité et événement
   ========================================================================== */

.entry .page-head { border-bottom: none; padding-bottom: 16px; }

.entry-head .news-meta,
.entry-head .agenda-tag { margin-bottom: 16px; }

.entry-head h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.entry-lead {
  max-width: 60ch;
  margin-top: 18px;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Affiche d'un événement ou d'une actualité
   --------------------------------------------------------------------------
 * L'image d'une fiche est le plus souvent une affiche, et la commune en reçoit
 * de tous les formats : A4 en hauteur, carré de réseau social, flyer en
 * largeur. Le bandeau (1920 x 660, recadré) tranchait le haut et le bas d'une
 * affiche, là où sont d'ordinaire le titre et la date. Elle garde donc ses
 * proportions, et se range à droite des informations et du texte, dans la place
 * que laisse la ligne de 64ch. Une actualité n'a pas d'informations pratiques :
 * la première rangée de la grille reste vide, sans hauteur.
 *
 * Hauteur plafonnée pour qu'une affiche tienne entière à l'écran ; « Voir en
 * grand » mène à la version 1536 px, lisible en détail. Les plafonds (500 px de
 * large, 720 de haut) sont repris dans schwob_entry_poster() (inc/helpers.php).
 */

.entry-layout--affiche {
  --affiche-w: clamp(280px, 32%, 400px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--affiche-w);
  /* Seconde rangée flexible : la hauteur de l'affiche s'y reporte, et le texte
     reste collé aux informations au lieu de s'en écarter. */
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "facts affiche"
    "texte affiche";
  column-gap: 56px;
  align-items: start;
  margin-top: 32px;
}

/* En largeur, une colonne de 400 px ramènerait l'image à 225 px de haut. */
.entry-layout--paysage { --affiche-w: clamp(320px, 40%, 500px); }

.entry-layout--affiche .entry-facts { grid-area: facts; margin: 0 0 32px; }
.entry-layout--affiche .entry-texte { grid-area: texte; }
.entry-layout--affiche .entry-texte > :first-child { margin-top: 0; }

.entry-affiche { grid-area: affiche; margin: 0; }

/* width et height auto : les deux plafonds réduisent l'image sans la déformer,
   et une petite image n'est jamais agrandie. */
.entry-affiche img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(720px, 85vh);
  border: 1px solid var(--line);
  border-radius: var(--r-card-sm);
  background: var(--paper);
  transition: border-color .2s;
}

.entry-affiche-lien {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  border-radius: var(--r-card-sm);
  color: var(--navy);
}

.entry-affiche-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}

.entry-affiche-zoom svg { width: 20px; height: 20px; }

.entry-affiche-lien:hover img { border-color: var(--navy); }
.entry-affiche-lien:hover .entry-affiche-zoom { text-decoration-color: currentColor; }

/* Une colonne : l'affiche passe entre les informations et le texte. Sur
   tablette, une affiche en hauteur ou carrée occuperait toute la largeur. */
@media (max-width: 980px) {
  .entry-layout--affiche { display: block; }
  .entry-affiche { max-width: 480px; margin-bottom: 32px; }
  .entry-layout--paysage .entry-affiche { max-width: none; }
}

/*
 * Bandeau d'un événement passé : l'information est portée par le texte, l'icône
 * et l'aplat ne font que la renforcer (RGAA 3.1). Plus de liseré latéral : posé
 * sur un bloc arrondi, il faisait de la note une carte d'alerte générique.
 */
.entry-past {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-radius: var(--r-field);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.entry-past svg { width: 18px; height: 18px; margin-top: 1px; color: var(--ink-3); }

.entry-past a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------------------------------------------------
   Informations pratiques d'un événement
   -------------------------------------------------------------------------- */

.entry-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card-sm);
}

.entry-facts dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.entry-facts dt svg { width: 14px; height: 14px; color: var(--terra); --icon-boost: 6px; }

.entry-facts dd {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
}

.entry-back { margin-top: 40px; }

/* --------------------------------------------------------------------------
   Navigation entre actualités
   -------------------------------------------------------------------------- */

.entry-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.entry-nav .nav-previous { grid-column: 1; }
.entry-nav .nav-next { grid-column: 2; text-align: right; }

.entry-nav a { display: block; }

.entry-nav .nav-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.entry-nav .nav-title {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.entry-nav a:hover .nav-title { color: var(--terra); }

/* ==========================================================================
   Archives et recherche
   ========================================================================== */

/* .search-page et non .search-results : WordPress pose « search-results » sur
   <body> quand la recherche trouve quelque chose, et le corps recevait ce
   rembourrage — une bande vide au-dessus de la barre utilitaire. */
.search-page,
.error-404 { padding: 56px 0 var(--section-y); }

.archive-description { max-width: 64ch; margin-top: 16px; color: var(--ink-2); }

.archive-empty,
.agenda-empty {
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card-sm);
  color: var(--ink-2);
}

/* Formulaire de recherche des pages de résultats et de la 404. */
.search-form {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-pill);
  padding: 6px 6px 6px 20px;
  max-width: 560px;
}

/* Le champ efface son contour : c'est le formulaire entier qui montre le focus
   (sans cela, aucun indicateur au clavier — RGAA 10.7). */
.search-form:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.search-form .search-ico { width: 18px; height: 18px; color: var(--ink-3); }

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  height: var(--touch);
  border: none;
  outline: none;
  background: none;
  font-size: 0.9375rem;
  color: var(--ink);
}

.search-form button[type="submit"] {
  flex-shrink: 0;
  height: var(--touch);
  padding: 0 22px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background .2s;
}

.search-form button[type="submit"]:hover { background: var(--terra); }

.search-count { margin-top: 16px; color: var(--ink-3); font-size: 0.875rem; }

.search-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  list-style: none;
}

.search-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

.search-item:last-child { border-bottom: none; }

.search-type {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg-alt);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}

.search-item h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.search-item h2 a { color: var(--ink); }
.search-item h2 a:hover { color: var(--terra); }

.search-item p {
  margin-top: 8px;
  max-width: 68ch;
  font-size: 0.90625rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/*
 * Mise en évidence des termes trouvés, produite par Relevanssi. Le gold porte du
 * texte --ink : 6.34:1, le même couple que l'étiquette d'alerte.
 */
.search-item mark,
.search-item .relevanssi-query-term {
  background: var(--gold);
  color: var(--ink);
  padding: 0 3px;
  border-radius: 3px;
}

.search-empty {
  margin-top: 32px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-empty a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 14px;
  border: 1px solid var(--ink-3);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s;
}

.pagination .page-numbers:hover { border-color: var(--ink); color: var(--ink); }

.pagination .page-numbers.current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}

.pagination .page-numbers.dots { border-color: transparent; }

/*
 * Pagination en liste (paginate_links, type « list », RGAA 9.3). WordPress donne
 * aussi la classe page-numbers à la <ul> : elle ne reçoit pas l'habillage des
 * pastilles, et reprend la rangée de .nav-links.
 */
.pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  list-style: none;
}

.pagination ul.page-numbers > li { display: flex; }

/* ==========================================================================
   Agenda — archive
   ========================================================================== */

.agenda--archive { padding-top: 56px; }

.agenda-upcoming-title { margin-top: 0; }

.agenda-past-title {
  margin-top: 56px;
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Une ligne passée s'efface sans disparaître : elle reste lisible, et son
   contraste demeure au-dessus du seuil. */
.agenda-row--past .agenda-day,
.agenda-row--past .agenda-title { color: var(--ink-2); }
.agenda-row--past .agenda-arrow { opacity: 0.5; }

/* ==========================================================================
   404
   ========================================================================== */

.error-404 h1 {
  font-family: var(--serif);
  font-size: var(--fs-h2-section);
  font-weight: 700;
  line-height: var(--lh-h2-section);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.error-404 h1 .ton2 { font-style: normal; color: var(--ink); opacity: 0.55; }

.error-lead {
  margin-top: 16px;
  max-width: 60ch;
  font-size: 1.0625rem;
  color: var(--ink-2);
}

.error-nav { margin-top: 48px; }

.error-nav h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.error-nav ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.error-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  min-height: var(--touch);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card-sm);
  font-weight: 500;
  color: var(--ink);
  transition: border-color .2s, transform .2s;
}

.error-nav a:hover { border-color: var(--navy); transform: translateY(-2px); }
.error-nav svg { width: 20px; height: 20px; color: var(--navy); }

.error-contact { margin-top: 40px; color: var(--ink-2); }
.error-contact a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Sous 620 px
   ========================================================================== */

@media (max-width: 620px) {
  .entry-nav { grid-template-columns: 1fr; }
  .entry-nav .nav-next { grid-column: 1; text-align: left; }
  .entry-facts { padding: 20px; }

  /* Sur deux lignes, une pilule devient un ovale : rayon de carte. */
  .search-form { flex-wrap: wrap; padding: 6px 6px 6px 16px; border-radius: var(--r-card-sm); }
  .search-form button[type="submit"] { width: 100%; }
}

/* ==========================================================================
   Plan du site — page-plan-du-site.php
   ========================================================================== */

.sitemap-intro { margin-bottom: 40px; }

.sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 36px 48px;
}

.sitemap-group h2 {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.sitemap-group h2 a { color: inherit; }
.sitemap-group h2 a:hover { color: var(--terra); }

.sitemap-group ul { display: flex; flex-direction: column; gap: 2px; }

.sitemap-group li a {
  display: inline-block;
  padding: 5px 0;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}

.sitemap-group li a:hover { color: var(--ink); text-decoration-color: currentColor; }
