:root {
  --police: Inter, "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  --fond: #edf1f7;
  --surface: #ffffff;
  --segment: #dfe5f0;
  --dimanche: #f1f4fa;
  --survol: #e8edf6;
  --trait: #dde3ee;
  --commande-off: #7c8699;
  --encre: #141b2b;
  --encre-2: #3a4458;
  --gris: #5e6878;
  --discret: #6b7585;
  --accent: #2346a0;
  --accent-plein: #2346a0;
  --sur-accent: #ffffff;
  --accent-doux: #e2e9f8;
  --corail: #b63c33;
  --corail-doux: #fce9e6;
  --zone-a: #b5474f;
  --zone-b: #b37b1c;
  --zone-c: #3d8a5e;
  --ombre: 0 1px 2px rgb(20 27 43 / .05), 0 12px 28px -16px rgb(20 27 43 / .22);
  --ombre-legere: 0 1px 2px rgb(20 27 43 / .06), 0 2px 6px -2px rgb(20 27 43 / .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fond: #0d121c;
    --surface: #151c29;
    --segment: #1c2433;
    --dimanche: #1a2232;
    --survol: #222c3f;
    --trait: #273145;
    --commande-off: #5f6a7e;
    --encre: #e6ebf3;
    --encre-2: #c3cbd8;
    --gris: #9aa5b7;
    --discret: #8994a7;
    --accent: #8eaaf4;
    --accent-plein: #7596ef;
    --sur-accent: #0d121c;
    --accent-doux: #1e2a45;
    --corail: #f0948a;
    --corail-doux: #3a2126;
    --zone-a: #e07a82;
    --zone-b: #dda94e;
    --zone-c: #62bc88;
    --ombre: 0 0 0 1px rgb(255 255 255 / .04), 0 16px 32px -20px rgb(0 0 0 / .7);
    --ombre-legere: 0 0 0 1px rgb(255 255 255 / .05);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fond: #0d121c;
  --surface: #151c29;
  --segment: #1c2433;
  --dimanche: #1a2232;
  --survol: #222c3f;
  --trait: #273145;
  --commande-off: #5f6a7e;
  --encre: #e6ebf3;
  --encre-2: #c3cbd8;
  --gris: #9aa5b7;
  --discret: #8994a7;
  --accent: #8eaaf4;
  --accent-plein: #7596ef;
  --sur-accent: #0d121c;
  --accent-doux: #1e2a45;
  --corail: #f0948a;
  --corail-doux: #3a2126;
  --zone-a: #e07a82;
  --zone-b: #dda94e;
  --zone-c: #62bc88;
  --ombre: 0 0 0 1px rgb(255 255 255 / .04), 0 16px 32px -20px rgb(0 0 0 / .7);
  --ombre-legere: 0 0 0 1px rgb(255 255 255 / .05);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 14px/1.45 var(--police);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.evitement {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 10px;
  background: var(--accent-plein); color: var(--sur-accent); font-weight: 600; text-decoration: none;
}
.evitement:focus { top: 12px; }
.icone { display: block; flex: none; }

.page { max-width: 1480px; margin: 0 auto; padding: 28px 32px 36px; }

/* En-tête */
.entete {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 18px 24px; margin-bottom: 22px;
}
.titre { display: flex; flex-direction: column; gap: 4px; margin: 0; line-height: 1; }
.titre-marque { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--gris); }
.titre-marque .icone { color: var(--accent); }
.titre-annee { font-size: 52px; font-weight: 750; letter-spacing: -.045em; }
.commandes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px;
  background: var(--surface); color: var(--encre); box-shadow: var(--ombre-legere);
  font: inherit; font-size: 13.5px; font-weight: 550; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.bouton:hover { background: var(--survol); }
.bouton[aria-disabled="true"] { opacity: .45; cursor: default; }
.bouton[aria-disabled="true"]:hover { background: var(--surface); }
.bouton-precedent { padding-left: 8px; }
.bouton-suivant { padding-right: 8px; }
.bouton-carre { width: 38px; padding: 0; }
.segmente { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--segment); }
.segmente a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 0 12px; border-radius: 9px;
  color: var(--encre-2); font-size: 13.5px; font-weight: 550; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.segmente a:hover { color: var(--encre); }
.segmente a[aria-current="page"] { background: var(--surface); color: var(--encre); box-shadow: var(--ombre-legere); }
/* Bouton de thème : l'icône montre la préférence (auto, clair, sombre), posée par assets/theme.js. */
.bouton-theme .icone { display: none; }
:root[data-theme-pref="auto"] .bouton-theme .icone-auto,
:root[data-theme-pref="light"] .bouton-theme .icone-soleil,
:root[data-theme-pref="dark"] .bouton-theme .icone-lune { display: block; }

/* Alertes */
.alertes { display: grid; gap: 8px; margin: 0 0 16px; }
.alerte {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 14px;
  border-radius: 12px; background: var(--corail-doux); font-size: 13.5px; max-width: 90ch;
}
.alerte .icone { margin-top: 1px; color: var(--corail); }

/* Prochains événements */
.prochains { margin: 0 0 18px; }
.prochains-liste {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin: 0; padding: 0; list-style: none;
  border-radius: 14px; overflow: hidden; background: var(--trait); box-shadow: var(--ombre-legere);
}
.evt {
  display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px;
  padding: 14px 16px; background: var(--surface);
}
.evt-rail { grid-column: 1; grid-row: 1 / 4; width: 4px; border-radius: 2px; background: var(--c); }
.evt-type { grid-column: 2; grid-row: 1; font-size: 12.5px; font-weight: 500; color: var(--gris); }
.evt-delai {
  grid-column: 3; grid-row: 1; align-self: start;
  padding: 1px 8px; border-radius: 999px; background: var(--accent-doux); color: var(--accent);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.evt-nom { grid-column: 2 / 4; font-size: 14.5px; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.evt-date { grid-column: 2 / 4; font-size: 13px; color: var(--gris); }
.evt-ferie { --c: var(--corail); }
.evt-a { --c: var(--zone-a); }
.evt-b { --c: var(--zone-b); }
.evt-c { --c: var(--zone-c); }

/* Filtres */
.filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 16px; }
.bascule, .puce { position: relative; display: inline-flex; cursor: pointer; }
.bascule input, .puce input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.bascule-corps { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; font-size: 13.5px; font-weight: 550; }
.bascule-piste {
  position: relative; width: 34px; height: 20px; border-radius: 999px;
  background: var(--commande-off); transition: background-color .15s ease;
}
.bascule-piste::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s ease;
}
.bascule input:checked + .bascule-corps .bascule-piste { background: var(--accent-plein); }
.bascule input:checked + .bascule-corps .bascule-piste::after { transform: translateX(14px); }
.bascule input:focus-visible + .bascule-corps .bascule-piste { outline: 2px solid var(--accent); outline-offset: 2px; }
.zones-filtre { display: inline-flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; transition: opacity .15s ease; }
.puce-corps {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 12px;
  border-radius: 999px; background: var(--surface); box-shadow: var(--ombre-legere);
  font-size: 13px; font-weight: 550; transition: background-color .15s ease, color .15s ease;
}
.puce:hover .puce-corps { background: var(--survol); }
.puce-trait { width: 4px; height: 16px; border-radius: 2px; background: var(--z); }
.puce .icone { width: 15px; height: 15px; color: var(--encre-2); }
.puce input:not(:checked) + .puce-corps { background: transparent; box-shadow: inset 0 0 0 1px var(--commande-off); color: var(--gris); }
.puce input:not(:checked) + .puce-corps .puce-trait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--z); }
.puce input:not(:checked) + .puce-corps .icone { visibility: hidden; }
.puce input:focus-visible + .puce-corps { outline: 2px solid var(--accent); outline-offset: 2px; }
.puce-a { --z: var(--zone-a); }
.puce-b { --z: var(--zone-b); }
.puce-c { --z: var(--zone-c); }
:root:has(#filtre-vacances:not(:checked)) .zones-filtre { opacity: .45; }
.masque-vacances .zones-filtre { opacity: .45; }

/* Calendrier */
.semestre { display: none; }
.semestre.est-actif { display: block; animation: apparition .2s ease-out; }
@keyframes apparition { from { opacity: 0; transform: translateY(4px); } }
.cle-impression { display: none; }
.mois-grille { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mois { min-width: 0; padding: 14px 8px 8px; border-radius: 16px; background: var(--surface); box-shadow: var(--ombre); }
.mois-titre { margin: 0 0 8px; padding: 0 8px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.jours { margin: 0; padding: 0; list-style: none; }
.jour {
  display: grid; grid-template-columns: 24px 12px minmax(0, 1fr) auto 21px; align-items: center; column-gap: 6px;
  height: 26px; padding-left: 2px; border-radius: 8px; transition: background-color .12s ease;
}
.jour:hover, .jour.est-dimanche:hover { background: var(--survol); }
.j-num {
  grid-column: 1; justify-self: center; display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; font-size: 12.5px; font-weight: 600;
}
.j-ini { grid-column: 2; font-size: 11px; font-weight: 500; color: var(--gris); text-align: center; }
.j-nom { grid-column: 3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--gris); }
.j-sem { grid-column: 4; font-size: 10px; font-weight: 500; color: var(--discret); text-decoration: none; }
.vbarres { grid-column: 5; align-self: stretch; display: grid; grid-template-columns: repeat(3, 7px); }
.vb { position: relative; grid-row: 1; }
.vb::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 3px; background: var(--z); }
.vb-debut::before { top: 4px; border-radius: 2px 2px 0 0; }
.vb-fin::before { bottom: 4px; border-radius: 0 0 2px 2px; }
.vb-debut.vb-fin::before { border-radius: 2px; }
.vb-a { grid-column: 1; --z: var(--zone-a); }
.vb-b { grid-column: 2; --z: var(--zone-b); }
.vb-c { grid-column: 3; --z: var(--zone-c); }
:root:has(#filtre-vacances:not(:checked)) .vbarres { visibility: hidden; }
:root:has(#filtre-a:not(:checked)) .vb-a { visibility: hidden; }
:root:has(#filtre-b:not(:checked)) .vb-b { visibility: hidden; }
:root:has(#filtre-c:not(:checked)) .vb-c { visibility: hidden; }
.masque-vacances .vbarres { visibility: hidden; }
.masque-a .vb-a { visibility: hidden; }
.masque-b .vb-b { visibility: hidden; }
.masque-c .vb-c { visibility: hidden; }
.est-dimanche { background: var(--dimanche); }
.est-dimanche .j-ini { color: var(--encre); font-weight: 700; }
.est-ferie .j-num { background: var(--corail-doux); color: var(--corail); }
.est-ferie .j-nom { color: var(--corail); font-weight: 600; }
.est-aujourdhui .j-num { background: var(--accent-plein); color: var(--sur-accent); }
.est-aujourdhui .j-nom { color: var(--encre); font-weight: 600; }

/* Légende */
.legende { display: grid; gap: 14px; margin-top: 26px; }
.legende-titre { margin: 0; font-size: 15px; font-weight: 700; }
.legende-cle { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--encre-2); }
.legende-cle li { display: inline-flex; align-items: center; gap: 8px; }
.ex-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.ex-auj { background: var(--accent-plein); color: var(--sur-accent); }
.ex-ferie { background: var(--corail-doux); color: var(--corail); }
.ex-dimanche { width: 26px; height: 18px; border-radius: 6px; background: var(--dimanche); box-shadow: inset 0 0 0 1px var(--trait); }
.ex-sem { font-size: 11px; font-weight: 500; color: var(--discret); }
.legende-zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.legende-zone { position: relative; padding: 14px 16px 14px 26px; border-radius: 14px; background: var(--surface); box-shadow: var(--ombre-legere); }
.legende-zone::before { content: ""; position: absolute; top: 15px; bottom: 15px; left: 12px; width: 4px; border-radius: 2px; background: var(--z); }
.legende-zone h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.legende-zone p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--gris); }
.legende-a { --z: var(--zone-a); }
.legende-b { --z: var(--zone-b); }
.legende-c { --z: var(--zone-c); }

/* Pied de page */
.pied {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--trait);
  font-size: 12.5px; color: var(--gris);
}
.pied p { max-width: 80ch; margin: 0; }
.pied a { color: var(--encre-2); text-underline-offset: 2px; }
kbd {
  padding: 1px 6px; border-radius: 5px; background: var(--surface); box-shadow: 0 0 0 1px var(--trait);
  font: inherit; font-size: 11.5px; font-weight: 600; color: var(--encre-2);
}

/* Tablette : trois mois par ligne */
@media (max-width: 1199px) {
  .page { padding: 24px 24px 32px; }
  .mois-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prochains-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile : un mois par écran, défilement horizontal */
@media (max-width: 699px) {
  .page { padding: 18px 16px 28px; }
  .entete { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .titre-annee { font-size: 42px; }
  .segmente { order: 5; flex: 1 1 100%; }
  .segmente a { flex: 1 1 0; }
  .commandes .bouton-aujourdhui { flex: 1 1 auto; }
  .mois-grille {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc(100% - 28px);
    margin: 0 -16px; padding: 2px 16px 14px; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-padding-inline: 16px; overscroll-behavior-x: contain;
  }
  .mois { scroll-snap-align: start; }
  .jour { height: 30px; }
  .j-nom { font-size: 13px; }
  .legende-zones { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 459px) {
  .prochains-liste { grid-template-columns: minmax(0, 1fr); }
}

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

/* Impression : une année sur deux pages A4 paysage */
@page { size: A4 landscape; margin: 9mm; }
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    color-scheme: light;
    --fond: #fff; --surface: #fff; --dimanche: #f1f4fa; --trait: #d5dbe6;
    --encre: #141b2b; --encre-2: #3a4458; --gris: #4f5968; --discret: #5e6878;
    --accent: #2346a0; --accent-plein: #2346a0; --sur-accent: #fff;
    --corail: #b63c33; --corail-doux: #fce9e6;
    --zone-a: #b5474f; --zone-b: #b37b1c; --zone-c: #3d8a5e;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 8pt; }
  .page { max-width: none; padding: 0; }
  .evitement, .entete, .alertes, .prochains, .filtres, .legende, .pied, #annonce { display: none !important; }
  .semestre, .semestre.est-actif { display: block !important; animation: none; break-after: page; }
  .semestre:last-of-type { break-after: auto; }
  .entete-impression { display: flex; align-items: baseline; justify-content: space-between; gap: 6mm; margin: 0 0 3mm; }
  .semestre-titre {
    position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal;
    font-size: 13pt; font-weight: 700;
  }
  .cle-impression { display: flex; gap: 4mm; margin: 0; font-size: 7.5pt; color: var(--encre-2); }
  .cle-impression span { display: inline-flex; align-items: center; gap: 1.2mm; }
  .cle-impression i { display: inline-block; width: .9mm; height: 3mm; border-radius: .4mm; background: var(--z); }
  .mois-grille { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2.5mm; margin: 0; padding: 0; overflow: visible; }
  .mois { padding: 2mm 1.5mm 1.5mm; border-radius: 3mm; box-shadow: none; border: .3mm solid var(--trait); break-inside: avoid; }
  .mois-titre { margin: 0 0 1mm; padding: 0 1mm; font-size: 9.5pt; }
  .jour { grid-template-columns: 5mm 2.4mm minmax(0, 1fr) auto 4.5mm; column-gap: 1mm; height: 5.5mm; padding-left: .5mm; border-radius: 1.2mm; transition: none; }
  .j-num { width: 4.6mm; height: 4.6mm; font-size: 7.5pt; }
  .j-ini { font-size: 6.5pt; }
  .j-nom { font-size: 7pt; }
  .j-sem { font-size: 6pt; }
  .vbarres { grid-template-columns: repeat(3, 1.5mm); }
  .vb::before { left: .35mm; width: .8mm; }
  .vb-debut::before { top: .7mm; }
  .vb-fin::before { bottom: .7mm; }
  .est-aujourdhui .j-num { background: transparent; color: var(--encre); }
  .est-aujourdhui .j-nom { color: var(--gris); font-weight: 400; }
  .est-aujourdhui.est-ferie .j-num { background: var(--corail-doux); color: var(--corail); }
  .est-aujourdhui.est-ferie .j-nom { color: var(--corail); font-weight: 600; }
}

/* Semestres sans JavaScript : ancres #s1 / #s2 */
:root:not(.js) .semestres:has(.semestre:target) .semestre:not(:target) { display: none; }
:root:not(.js) .semestres .semestre:target { display: block; }

/* Barre du site et fil d'Ariane */
.barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; margin-bottom: 14px; }
.marque { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; color: var(--encre); text-decoration: none; }
.marque .icone { color: var(--accent); }
.fil { margin: 0 0 18px; font-size: 13px; color: var(--gris); }
.fil ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.fil li + li::before { content: "/"; margin: 0 8px; color: var(--discret); }
.fil a { color: var(--encre-2); text-underline-offset: 2px; }
.fil [aria-current="page"] { color: var(--gris); }

/* Pages de texte */
.entete-page { margin-bottom: 22px; }
.entete-page h1 { margin: 0; font-size: 34px; font-weight: 750; line-height: 1.15; letter-spacing: -.03em; max-width: 30ch; }
.chapo { margin: 12px 0 0; max-width: 75ch; font-size: 15.5px; line-height: 1.6; color: var(--encre-2); }
.texte { max-width: 75ch; font-size: 15px; line-height: 1.6; }
.texte p { margin: 0 0 12px; }
.bloc { margin: 0 0 28px; }
.bloc > h2 { margin: 0 0 12px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.bloc h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 650; }
.bloc a, .texte a { color: var(--accent); text-underline-offset: 2px; }
.defilement { overflow-x: auto; border-radius: 14px; background: var(--surface); box-shadow: var(--ombre-legere); }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau caption { padding: 14px 16px 4px; text-align: left; font-size: 13px; font-weight: 600; color: var(--gris); }
.tableau th, .tableau td { padding: 10px 16px; text-align: left; vertical-align: top; }
.tableau thead th { font-size: 12.5px; font-weight: 600; color: var(--gris); white-space: nowrap; }
.tableau tbody tr + tr > * { border-top: 1px solid var(--trait); }
.tableau tbody th { font-weight: 600; }
.tableau td { font-variant-numeric: tabular-nums; }
.tableau .nowrap { white-space: nowrap; }
.pastille-zone {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 4px; padding: 0 5px;
  border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; background: var(--z);
}
.pastille-zone.zone-a { --z: var(--zone-a); }
.pastille-zone.zone-b { --z: var(--zone-b); }
.pastille-zone.zone-c { --z: var(--zone-c); }
:root[data-theme="dark"] .pastille-zone { color: var(--fond); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pastille-zone { color: var(--fond); } }
.connexes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.connexes a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--ombre-legere); color: var(--encre); font-size: 13.5px; font-weight: 550; text-decoration: none;
}
.connexes a:hover { background: var(--survol); }
.connexes a[aria-current="page"] { background: var(--accent-doux); color: var(--accent); box-shadow: none; }
.liste-inline { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.resume { margin-top: 26px; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.pied-bloc { display: grid; gap: 10px; width: 100%; }

@media (max-width: 699px) {
  .entete-page h1 { font-size: 27px; }
  .tableau th, .tableau td { padding: 9px 12px; }
}
@media print {
  .barre, .fil, .resume, .connexes { display: none !important; }
  .semestres .semestre { display: block !important; }
}

/* Accueil : encart « Aujourd'hui » en tête de la ligne d'événements (5 encarts) */
.evt-aujourdhui { --c: var(--accent-plein); }
.evt-date a { color: var(--accent); text-underline-offset: 2px; }
@media (min-width: 1200px) {
  .prochains-liste.prochains-cinq { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .prochains-liste.prochains-cinq .evt-aujourdhui { grid-column: 1 / -1; }
}

/* Fêtes du jour */
.fetes-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0 0 28px; }
.fetes-mois { scroll-margin-top: 16px; }
.fetes-mois h2 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.tableau-fetes th, .tableau-fetes td { padding: 6px 14px; }
.tableau-fetes tbody th { font-weight: 500; color: var(--gris); white-space: nowrap; }
.tableau tr.est-du-jour > * { background: var(--accent-doux); color: var(--encre); }
.badge-jour { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-plein); color: var(--sur-accent); font-size: 11.5px; font-weight: 600; }

/* Version à imprimer (écran) */
.actions-impression { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 16px 0 0; }
.bouton-principal { background: var(--accent-plein); color: var(--sur-accent); }
.bouton-principal:hover { background: var(--accent-plein); opacity: .9; }
.texte-aide { font-size: 13px; color: var(--gris); }
.semestres-impression .semestre + .semestre { margin-top: 28px; }
.semestres-impression .semestre-titre { margin: 0 0 10px; font-size: 17px; font-weight: 700; }

@media (max-width: 1199px) {
  .fetes-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .fetes-grille { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .ecran-seulement, .evitement { display: none !important; }
  .semestres-impression .semestre + .semestre { margin-top: 0; }
}

/* Version à imprimer : lien de retour (écran seulement) */
.retour { margin: 0 0 16px; }

/*
 * Écran de 1024 px de large ou plus : les lignes de jour se réduisent quand la fenêtre est basse,
 * pour qu'un semestre (31 lignes + titre du mois, soit environ 33 lignes) tienne sans défiler.
 * Sur un grand écran, le plafond (26 px) conserve le rendu habituel. Mobile, tablette étroite et
 * impression ne sont pas concernés.
 */
@media screen and (min-width: 1024px) {
  @supports (height: 100dvh) {
    :root { --hauteur-entete: 72px; }
    .mois-grille .jour {
      --h-jour: clamp(18px, calc((100dvh - var(--hauteur-entete)) / 33), 26px);
      height: var(--h-jour);
    }
    .mois-grille .j-num { width: min(22px, var(--h-jour)); height: min(22px, var(--h-jour)); font-size: 13px; }
    .mois-grille .j-nom { font-size: 12px; }
  }
}
