/* Charte PERCEVAL G · Plan : papier dominant, un seul aplat sombre (sarcelle nuit + grille de plan),
   pourpre pour les liens, or pour les filets et l'état actif, Jost + DM Mono, angles de 2 px. */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/jost-latin.woff2") format("woff2"); 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: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/jost-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 300; font-display: swap; src: url("/static/fonts/dm-mono-300-latin.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/dm-mono-400-latin.woff2") format("woff2"); }

:root {
  --papier: #efeeec;
  --blanc: #f8f8f6;
  --encre: #121014;
  --encre-doux: rgba(18, 16, 20, .94);
  --sarcelle: #16302e;
  --pourpre: #a2457f;
  --or: #e2bd3c;
  --gris: #9a9a9a;
  --gris-clair: #bdbdbd;
  --jost: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", Menlo, Consolas, monospace;
  --angle: 2px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1.0625rem/1.65 var(--jost);
}
a { color: var(--pourpre); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; border-radius: var(--angle); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 0; background: var(--encre); color: var(--papier); padding: .5rem 1rem; z-index: 10; }
.evitement:focus { left: 1rem; }

.cadre { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }

/* L'aplat sombre unique : sarcelle nuit et grille de plan */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--sarcelle);
  color: var(--papier);
  padding: 1.25rem 0 1.75rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M0 32H64M32 0V64' stroke='%23EFEEEC' stroke-opacity='.05'/%3E%3Cpath d='M32 27v10M27 32h10' stroke='%23EFEEEC' stroke-opacity='.32'/%3E%3C/svg%3E") center top / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 80% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 80% 30%, #000 20%, transparent 75%);
}
.marque { font: 500 1rem/1.2 var(--jost); color: var(--papier); text-decoration: none; letter-spacing: .01em; }
.marque:hover { text-decoration: underline; }
h1 {
  font: 500 clamp(2.1rem, 6vw, 3.6rem)/1.05 var(--jost);
  letter-spacing: -.025em;
  margin: 1.75rem 0 0;
  max-width: 20ch;
}
.periode { margin: .6rem 0 0; font-size: 1.0625rem; }
.periode .nb { font-family: var(--mono); font-weight: 300; }

/* Ruban des 14 prochains jours : barre or = nombre d'événements */
.ruban { margin: 1.5rem -1rem 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(239, 238, 236, .3) transparent; }
.ruban ol { list-style: none; margin: 0; padding: 0 1rem; display: flex; gap: .4rem; min-width: max-content; }
.ruban li { scroll-snap-align: start; }
.jour {
  display: grid;
  grid-template-rows: auto auto 3rem auto;
  justify-items: center;
  width: 3.5rem;
  padding: .5rem 0 .45rem;
  border: 1px solid rgba(239, 238, 236, .22);
  border-radius: var(--angle);
  color: var(--papier);
  text-decoration: none;
}
.jour.we { border-color: rgba(239, 238, 236, .5); }
.jour:hover { border-color: var(--or); }
.jour.actif { background: var(--papier); border-color: var(--papier); color: var(--encre); }
.jsem { font-size: .85rem; }
.jnum { font: 400 1.6rem/1.1 var(--mono); }
.jbarre { align-self: end; width: 7px; height: var(--h); min-height: 1px; background: var(--or); }
.jn { font: 300 .8rem/1.6 var(--mono); border-top: 1px solid currentColor; width: 1.8rem; text-align: center; }
.jour.zero { color: rgba(239, 238, 236, .5); }
.jour.zero .jbarre { visibility: hidden; }

/* Capsules : contour 1 px, angles 2 px, une seule pleine */
.raccourcis { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.raccourcis a {
  padding: .25rem .75rem;
  border: 1px solid rgba(239, 238, 236, .5);
  border-radius: var(--angle);
  color: var(--papier);
  text-decoration: none;
  font: 500 .9375rem/1.5 var(--jost);
}
.raccourcis a:hover { border-color: var(--or); }
.raccourcis a[aria-current] { background: var(--papier); color: var(--encre); border-color: var(--papier); }

main { padding-bottom: 3rem; }

.filtres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .75rem;
  align-items: end;
  margin: 1.5rem 0 .5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--encre);
}
.filtres > * { min-width: 0; }
.filtres label { display: grid; gap: .2rem; font: 500 .9375rem/1.4 var(--jost); }
.filtres select, .filtres input {
  font: 400 1rem var(--jost);
  color: var(--encre);
  background: var(--blanc);
  border: 1px solid var(--encre);
  border-radius: var(--angle);
  padding: .45rem .6rem;
  min-height: 2.6rem;
  width: 100%;
}
.filtres input[type="date"] { font-family: var(--mono); font-weight: 300; }
.filtres button {
  font: 500 1rem var(--jost);
  background: var(--encre);
  color: var(--papier);
  border: 1px solid var(--encre);
  border-radius: var(--angle);
  min-height: 2.6rem;
  padding: 0 1.2rem;
  cursor: pointer;
}
.filtres button:hover { background: var(--sarcelle); }
.effacer { align-self: center; font-weight: 500; }

.vide { padding: 2rem 0; font-size: 1.125rem; }
.vide p { margin: 0 0 .5rem; }

/* Journées : registre de lignes, filet or sous le titre */
.journee, .encours { margin-top: 2.5rem; }
.journee h2, .encours h2 {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  margin: 0;
  font: 400 1.875rem/1.2 var(--jost);
  letter-spacing: -.02em;
  position: sticky;
  top: 0;
  background: var(--papier);
  padding: .5rem 0 .45rem;
  border-bottom: 1px solid var(--or);
  z-index: 1;
}
.jj { font: 300 1.75rem/1 var(--mono); letter-spacing: 0; }
.jl::first-letter { text-transform: uppercase; }
.sous { margin: .5rem 0 0; }

.liste { list-style: none; margin: 0; padding: 0; }
.ev {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--gris-clair);
}
.heure { font: 300 1rem/1.6 var(--mono); padding-top: .1rem; }
.jusqu { display: block; font: 400 .8125rem/1.3 var(--jost); }
.corps { min-width: 0; }
.titre { font: 500 1.25rem/1.3 var(--jost); color: var(--encre); text-decoration: none; }
.titre:hover { text-decoration: underline; text-decoration-color: var(--or); }
.meta { margin: .3rem 0 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .9375rem; }
.type { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; color: var(--encre); text-decoration: none; }
.type::before { content: ""; width: 9px; height: 9px; flex: none; background: url("/static/perceval-croix-or.svg") center / contain no-repeat; }
a.type:hover { text-decoration: underline; }
.ville { font-weight: 500; }
.lieu { overflow-wrap: anywhere; color: var(--encre-doux); }

/* Fiche */
.fiche { max-width: 46rem; }
.fiche h1 { max-width: none; font-size: clamp(2rem, 5vw, 3.2rem); }
.fil { margin: 0; font-size: .9375rem; }
.fil a { color: var(--papier); }
.infos { margin: 1.75rem 0 1.5rem; border-top: 1px solid var(--encre); }
.infos div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--gris-clair); }
.infos dt { font-weight: 500; }
.infos dd { margin: 0; }
.chiffre { font-family: var(--mono); font-weight: 300; }
.texte { max-width: 68ch; }
.texte p { margin: 0 0 .9rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin: 1.5rem 0 0; }
.bouton {
  display: inline-block;
  font: 500 1rem var(--jost);
  background: var(--encre);
  color: var(--papier);
  text-decoration: none;
  padding: .6rem 1.1rem;
  border-radius: var(--angle);
}
.bouton:hover { background: var(--sarcelle); text-decoration: none; }

/* Pied : logo en bas à gauche */
.pied { border-top: 1px solid var(--encre); margin-top: 2rem; }
.pied .cadre { padding-top: 2rem; padding-bottom: 2.5rem; display: grid; gap: 1.25rem; }
.pied p { margin: 0; max-width: 70ch; font-size: .9375rem; }
.logo img { display: block; width: 150px; height: auto; }

@media (max-width: 34rem) {
  .ev { grid-template-columns: 3.7rem 1fr; gap: .6rem; }
  .filtres { grid-template-columns: 1fr 1fr; }
  .filtres .large, .filtres button { grid-column: 1 / -1; }
  .journee h2, .encours h2 { font-size: 1.5rem; }
  .jj { font-size: 1.5rem; }
}
.hero a.fil-ville { color: var(--papier); font-weight: 500; }
.hero .fiche h1 { margin-top: 1.5rem; }
