/* kalenda — « Almanach belge » : papier ivoire, encre profonde, serif éditoriale, photo de saison. */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-italic.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d7;
  --card: #fbf8f2;
  --ink: #17201c;
  --ink-2: #5a605b;
  --line: #d9cfbd;
  --hair: rgb(23 32 28 / 0.12);
  --gold: #e0ad1f;          /* Vlaanderen (jaune du drapeau) : toujours avec texte encre */
  --gold-ink: #17201c;
  --wine: #b3172a;          /* Wallonie-Bruxelles (rouge du drapeau) : texte blanc */
  --flag-black: #111111;
  --logo-panel: var(--paper);
  --wine-ink: #ffffff;
  --focus: #b8892b;
  --on-photo: #fffaf0;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --step-2: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
  --step-3: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem);
  --step-hero: clamp(5rem, 2.6rem + 10vw, 10rem);

  --space-m: 1.25rem;
  --space-l: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  --space-xl: clamp(3.5rem, 2.4rem + 5vw, 7rem);
  --radius: 4px;
  --shadow: 0 1px 0 var(--hair), 0 24px 48px -32px rgb(23 32 28 / 0.45);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 220ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121614;
    --paper-2: #1b211e;
    --card: #1d2420;
    --ink: #efe9dd;
    --ink-2: #b3ab9c;
    --line: #36403a;
    --hair: rgb(239 233 221 / 0.12);
    --shadow: 0 1px 0 var(--hair), 0 24px 48px -32px rgb(0 0 0 / 0.9);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--sans);
}
/* grain de papier très léger */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(74rem, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: 0.5rem 1rem; z-index: 50; }

/* En-tête ------------------------------------------------------------------ */
.top { position: relative; z-index: 10; border-bottom: 1px solid var(--hair); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; }
.logo { height: 2.6rem; width: auto; display: block; }
.brand:hover .logo { transform: translateY(-1px); transition: transform var(--duration) var(--ease); }
.nav { display: flex; gap: 0.25rem 1.4rem; flex-wrap: wrap; align-items: center; font-size: 0.92rem; }
.nav a { color: inherit; text-decoration: none; padding: 0.7rem 0.1rem; position: relative; }
.nav a:not(.lang)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.45rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--duration) var(--ease); }
.nav a:not(.lang):hover::after { transform: scaleX(1); }
.nav .lang { border: 1px solid currentColor; border-radius: 999px; padding: 0.5rem 1rem; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 40rem) { .nav .hide-s { display: none; } .logo { height: 2.1rem; } }

.has-hero .top { position: absolute; inset: 0 0 auto; color: var(--on-photo); border-bottom-color: rgb(255 250 240 / 0.18); --logo-panel: #17201c; }
/* liseré tricolore en haut de page */
body::after { content: ""; position: fixed; inset: 0 0 auto; height: 4px; z-index: 60; background: linear-gradient(90deg, var(--flag-black) 0 33.33%, var(--gold) 0 66.66%, var(--wine) 0); }

/* Hero photo ---------------------------------------------------------------- */
.head { padding: var(--space-l) 0 var(--space-m); }
.hero { position: relative; isolation: isolate; min-height: min(86svh, 54rem); display: flex; align-items: flex-end; padding: 8rem 0 calc(var(--space-xl) + 3rem); color: var(--on-photo); overflow: hidden; }
.hero .head-inner { width: min(74rem, 100% - 2rem); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform-origin: 60% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(12 16 14 / 0.78) 0%, rgb(12 16 14 / 0.45) 45%, rgb(12 16 14 / 0.05) 80%),
    linear-gradient(0deg, rgb(12 16 14 / 0.65) 0%, rgb(12 16 14 / 0) 45%),
    linear-gradient(180deg, rgb(12 16 14 / 0.5) 0%, rgb(12 16 14 / 0) 22%); }
.hero-credit { position: absolute; right: 1rem; bottom: 0.8rem; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.hero .kicker { color: rgb(255 250 240 / 0.85); }
.hero .kicker::before { background: linear-gradient(90deg, #f4efe6 0 33.33%, var(--gold) 0 66.66%, var(--wine) 0); }
.hero .lead { color: rgb(255 250 240 / 0.9); }
.hero .lead strong { color: var(--on-photo); }
.hero h1 { text-shadow: 0 2px 30px rgb(0 0 0 / 0.25); }

.kicker { display: flex; align-items: center; gap: 0.8rem; font: 600 0.74rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 1.2rem; }
.kicker::before { content: ""; width: 2.4rem; height: 2px; flex: none; background: linear-gradient(90deg, var(--flag-black) 0 33.33%, var(--gold) 0 66.66%, var(--wine) 0); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; margin: 0; }
h1 { font-size: var(--step-3); max-width: 16ch; text-wrap: balance; font-weight: 350; }
h2 { font-size: var(--step-2); margin-top: var(--space-xl); margin-bottom: var(--space-m); text-wrap: balance; }
h3 { font-size: var(--step-1); font-weight: 500; }
.lead { font-size: var(--step-1); color: var(--ink-2); max-width: 44ch; margin: 1.4rem 0 0; line-height: 1.5; }
.lead strong { color: var(--ink); font-weight: 600; }

/* Fil d'Ariane --------------------------------------------------------------- */
.crumbs { font-size: 0.8rem; color: var(--ink-2); padding-top: var(--space-m); }
.crumbs a { color: var(--ink-2); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }

/* Tickets : cartes datées qui chevauchent la photo ----------------------------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-m); margin-top: var(--space-l); }
.hero + section .tickets { margin-top: calc(-1 * (var(--space-xl) + 2rem)); position: relative; z-index: 3; }
.hero .crumbs { width: auto; padding: 0; margin: 0 0 1.6rem; color: rgb(255 250 240 / 0.75); }
.hero .crumbs a { color: rgb(255 250 240 / 0.85); text-decoration-color: rgb(201 162 39 / 0.7); }
.ticket { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; border-top: 3px solid var(--line); }
.ticket[hidden] { display: none; }
.ticket.vl { border-top-color: var(--gold); }
.ticket.fwb { border-top-color: var(--wine); }
.tickets > .ticket:nth-child(2), .next-set:nth-child(2) > .ticket { transform: translateY(1.5rem); }
@media (max-width: 40rem) { .tickets > .ticket:nth-child(2), .next-set:nth-child(2) > .ticket { transform: none; } }
.ticket-band { padding: 1rem 1.3rem 0; display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; font: 600 0.72rem/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.ticket-band span:last-child { font: italic 400 1.05rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); text-align: right; }
.ticket.vl .ticket-band span:first-child::before, .ticket.fwb .ticket-band span:first-child::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.5rem; vertical-align: 0.05em; }
.ticket.vl .ticket-band span:first-child::before { background: var(--gold); }
.ticket.fwb .ticket-band span:first-child::before { background: var(--wine); }
.ticket-body { padding: 0.6rem 1.3rem 1.3rem; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1.1rem; align-items: end; }
.big-day { font: 300 var(--step-hero)/0.8 var(--serif); letter-spacing: -0.05em; font-variant-numeric: lining-nums; }
.big-month { font: italic 400 var(--step-1)/1.05 var(--serif); }
.big-month small { display: block; font: 500 0.75rem/1.6 var(--sans); color: var(--ink-2); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.35rem; }
.ticket-range { grid-column: 1 / -1; margin: 1rem 0 0; font-size: 0.98rem; color: var(--ink-2); }
.ticket-foot { border-top: 1px dashed var(--line); padding: 0.85rem 1.3rem; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--ink-2); }
.count { font: 500 1rem/1 var(--serif); color: var(--ink); background: var(--paper-2); padding: 0.5rem 0.85rem; border-radius: 999px; white-space: nowrap; }
.count[data-state="bezig"] { background: var(--ink); color: var(--paper); }
.count:empty { display: none; }
.ticket.pending .big-day { color: var(--line); }

/* Tableaux ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 1rem 1.2rem 0.25rem; font-weight: 600; }
th, td { text-align: left; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
thead th { font: 600 0.7rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-2); background: var(--paper-2); }
tbody th { font: 500 1.05rem/1.4 var(--serif); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr { transition: background-color var(--duration) ease-out; }
tbody tr:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); }
tr.past td, tr.past th { color: var(--ink-2); opacity: 0.7; }
.pill { display: inline-block; font: 600 0.66rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.35rem 0.6rem; border-radius: 999px; white-space: nowrap; vertical-align: 0.1em; }
.pill.vl { background: var(--gold); color: var(--gold-ink); }
.pill.fwb { background: var(--wine); color: var(--wine-ink); }
.pill.soft { background: var(--paper-2); color: var(--ink); }
.dual { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); gap: var(--space-l) var(--space-m); }
.comm-title { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.7rem; font-size: 1.5rem; }
.comm-title::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 50%; flex: none; }
.comm-title.vl::before { background: var(--gold); }
.comm-title.fwb::before { background: var(--wine); }

/* Texte --------------------------------------------------------------------- */
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1rem; }
.note { border-left: 2px solid var(--gold); padding: 0.4rem 0 0.4rem 1.2rem; max-width: 66ch; color: var(--ink-2); font-size: 0.92rem; margin-top: var(--space-l); }
.note a { color: var(--ink-2); }
.faq details { border-top: 1px solid var(--hair); max-width: 54rem; }
.faq details:last-of-type { border-bottom: 1px solid var(--hair); }
.faq summary { cursor: pointer; padding: 1.15rem 0; font: 400 1.2rem/1.35 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 1.6rem/1 var(--serif); color: var(--wine); transition: transform var(--duration) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 1.2rem; color: var(--ink-2); max-width: 64ch; }

/* Actions ------------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--space-l); align-items: center; }
.actions.flush { margin-top: 0; margin-bottom: var(--space-m); }
.actions.gap-b { margin-bottom: var(--space-m); }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 46px; padding: 0.65rem 1.25rem; border-radius: 999px; font: 500 0.92rem/1 var(--sans); text-decoration: none; border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--wine); border-color: var(--wine); color: #fff; }

/* Grille de liens ----------------------------------------------------------- */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); column-gap: var(--space-m); padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--hair); }
.links li { border-bottom: 1px solid var(--hair); }
.links a { display: block; padding: 1rem 1.6rem 1rem 0; color: var(--ink); text-decoration: none; font: 400 1.12rem/1.3 var(--serif); position: relative; transition: color var(--duration) var(--ease); }
.links a::after { content: "→"; position: absolute; right: 0.4rem; top: 1rem; font-family: var(--sans); color: var(--wine); opacity: 0; transform: translateX(-6px); transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease); }
.links a:hover { color: var(--wine); }
.links a:hover::after { opacity: 1; transform: none; }
.links a span { display: block; font: 400 0.8rem/1.5 var(--sans); color: var(--ink-2); margin-top: 0.2rem; }
.links + .links { margin-top: var(--space-m); }

/* Calendrier annuel ---------------------------------------------------------- */
.year { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: var(--space-m); }
.month { background: var(--card); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); break-inside: avoid; }
.month h3 { font: italic 400 1.25rem/1 var(--serif); margin-bottom: 0.7rem; text-transform: capitalize; }
.month table { font-size: 0.8rem; }
.month th, .month td { padding: 0.25rem 0; text-align: center; border: 0; width: 14.28%; background: none; letter-spacing: 0; font: inherit; }
.month thead th { font-size: 0.65rem; color: var(--ink-2); }
.month td.f { background: var(--ink); color: var(--paper); border-radius: 50%; font-weight: 700; }
.month td.v-vl { box-shadow: inset 0 -3px 0 var(--gold); }
.month td.v-fwb { box-shadow: inset 0 3px 0 var(--wine); }
.month td.v-vl.v-fwb { box-shadow: inset 0 -3px 0 var(--gold), inset 0 3px 0 var(--wine); }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.88rem; margin: 0 0 var(--space-m); padding: 0; list-style: none; color: var(--ink-2); }
.legend i { display: inline-block; width: 1.1rem; height: 0.6rem; margin-right: 0.45rem; vertical-align: middle; border-radius: 2px; }
.legend i.sw-f { background: var(--ink); border-radius: 50%; width: 0.75rem; height: 0.75rem; }
.legend i.sw-vl { background: var(--gold); }
.legend i.sw-fwb { background: var(--wine); }
.print-only { display: none; }
.next-set { display: contents; }

/* Pied de page : rue de façades belges ---------------------------------------- */
.foot { margin-top: var(--space-xl); color: rgb(244 239 230 / 0.72); font-size: 0.9rem; --logo-panel: #17201c; }
.foot-body { background: #17201c; padding: var(--space-l) 0; margin-top: -1px; }
.skyline { display: block; width: 100%; height: clamp(70px, 9vw, 120px); color: #17201c; }
.skyline-win { fill: var(--gold); opacity: 0.55; }
.foot .wrap { display: grid; gap: var(--space-l) var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.foot-logo { display: inline-block; color: #f4efe6; margin-bottom: 1rem; }
.foot-logo .logo { height: 3rem; }
.foot a { color: rgb(244 239 230 / 0.88); text-decoration-color: rgb(224 173 31 / 0.6); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.made { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.tricolore { width: 1.6rem; height: 1rem; border-radius: 2px; background: linear-gradient(90deg, #111 0 33.33%, var(--gold) 0 66.66%, var(--wine) 0); box-shadow: 0 0 0 1px rgb(244 239 230 / 0.25); }

/* Mouvement : entrée douce, parallaxe de la photo (seulement si autorisé) ----------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: settle 1.8s var(--ease) both; }
  .hero .head-inner > * { animation: rise 1s var(--ease) both; }
  .hero .head-inner > :nth-child(2) { animation-delay: 0.12s; }
  .hero .head-inner > :nth-child(3) { animation-delay: 0.24s; }
  .hero + section .ticket { animation: rise 0.9s var(--ease) 0.35s both; }
  @supports (animation-timeline: scroll()) {
    .hero-media img { animation: settle 1.8s var(--ease) both, drift linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 100vh; }
  }
}
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes drift { to { transform: translateY(12%) scale(1.04); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; } }

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

@media print {
  body::after, .top, .foot, .crumbs, .actions, .faq, .no-print, .hero-media, .hero-credit, body::before { display: none !important; }
  .hero { min-height: 0; padding: 0; color: #000; }
  .hero::before { display: none; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .wrap { width: 100%; }
  .head { padding: 0 0 2mm; }
  .head .kicker, .head .lead { display: none; }
  h1 { font-size: 16pt; max-width: none; }
  .legend { margin: 0 0 2mm; font-size: 8pt; }
  .year { grid-template-columns: repeat(4, 1fr); gap: 2.5mm; }
  .month { box-shadow: none; border: 0.5pt solid #bbb; border-radius: 6px; padding: 1.5mm 2mm; }
  .month h3 { font-size: 9pt; margin-bottom: 1mm; }
  .month table { font-size: 9pt; }
  .month th, .month td { padding: 0.9mm 0; line-height: 1.35; }
  .month th { font-size: 6.5pt; }
  .print-only { display: block !important; margin-top: 3mm; font-size: 8pt; color: #555; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* Petits écrans --------------------------------------------------------------- */
@media (max-width: 40rem) {
  .top .wrap { min-height: 4rem; }
  .nav { flex-wrap: nowrap; gap: 0.9rem; font-size: 0.85rem; }
  .nav .lang { padding: 0.4rem 0.8rem; }
  th, td { padding: 0.75rem 0.7rem; font-size: 0.92rem; }
  thead th { font-size: 0.62rem; letter-spacing: 0.1em; }
  tbody th { font-size: 0.98rem; }
  .table-wrap + .prose, .table-wrap + p { margin-top: 1rem; }
  .hero { padding-top: 6.5rem; }
}
@media (max-width: 23rem) { .nav a:not(.lang) { display: none; } }
.table-wrap + .prose { margin-top: 1rem; }
.logo-panel { fill: var(--logo-panel); }
