/* =========================================================
   Festival International Dozo Goni 2027 – feuille de style
   Version téléphone : moins de 768 px de large
   Version tablette / ordinateur : 768 px et plus
   ========================================================= */

:root {
  --nuit: #0d0905;
  --brun: #1b130a;
  --brun-2: #261a0c;
  --trait: #4a3515;
  --or: #f5a623;
  --or-clair: #ffd27a;
  --creme: #f6ecdc;
  --sable: #c9b99f;
  --vert-wa: #25d366;
  --titre: "Anton", Impact, "Haettenschweiler", "Avenir Next Condensed", "Arial Narrow", "Arial Black", sans-serif;
  --texte: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gouttiere: max(16px, env(safe-area-inset-left, 0px));
  --gouttiere-d: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; overflow-anchor: none; }
body {
  margin: 0; background: var(--nuit); color: var(--creme);
  font: 16px/1.6 var(--texte); overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--or-clair); }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; letter-spacing: .02em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

/* ---------- Langues ---------- */
html.en .fr { display: none !important; }
html:not(.en) .en { display: none !important; }

/* ---------- Mise en page ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--gouttiere); padding-right: var(--gouttiere-d); }
.section { padding-block: 64px; }
.section.alt { background: var(--brun); }
.eyebrow { font: 700 12px/1.3 var(--texte); letter-spacing: .16em; text-transform: uppercase; color: var(--or); margin: 0 0 10px; }
h2 { font-size: clamp(30px, 5vw, 52px); color: var(--creme); margin-bottom: 18px; }
h2 em { font-style: normal; color: var(--or); }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--creme); max-width: 62ch; }
.mut { color: var(--sable); }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--or); color: #1a1000; border: 2px solid var(--or);
  font: 800 14px/1 var(--texte); letter-spacing: .06em; text-transform: uppercase;
  padding: 15px 24px; border-radius: 999px; text-decoration: none; cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--or); }
.btn-line:hover { background: var(--or); color: #1a1000; }
.btn-wa { background: var(--vert-wa); border-color: var(--vert-wa); color: #062b12; }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--or-clair); outline-offset: 3px; }

/* ---------- Intro vidéo ---------- */
#intro {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; align-items: center; justify-content: center;
  animation: introSecours .5s linear 14s forwards;
}
#intro video, #intro .intro-img { width: 100%; height: 100%; object-fit: cover; }
#intro .intro-img { position: absolute; inset: 0; }
#intro .skip {
  position: absolute; z-index: 3;
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,.55); color: var(--creme); border: 1px solid rgba(255,255,255,.45);
  font: 700 13px/1 var(--texte); letter-spacing: .06em; padding: 11px 16px; border-radius: 999px; cursor: pointer;
}
#intro .flash { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
#intro.flashing .flash { animation: flash .75s ease-out forwards; }
#intro.done { animation: introFin .6s ease forwards; }
html.intro-on, html.intro-on body { overflow: hidden; }
@keyframes flash { 0% { opacity: 0 } 25% { opacity: 1 } 100% { opacity: 1 } }
@keyframes introFin { to { opacity: 0; visibility: hidden; pointer-events: none } }
@keyframes introSecours { to { opacity: 0; visibility: hidden; pointer-events: none } }
.reveal-flash { animation: revealFlash .9s ease-out; }
@keyframes revealFlash { from { filter: brightness(2.4) saturate(.6); } to { filter: none; } }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,9,5,.94); border-bottom: 1px solid #2c1f0d;
  padding-top: env(safe-area-inset-top, 0px);
}
.top-in { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand b { font: 400 22px/1 var(--titre); color: var(--or); letter-spacing: .03em; white-space: nowrap; }
.brand span { font: 800 13px/1 var(--texte); color: var(--creme); }
.nav { display: none; }
.lang {
  background: none; border: 1px solid var(--or); color: var(--or); border-radius: 999px;
  font: 800 12px/1 var(--texte); letter-spacing: .08em; padding: 9px 12px; cursor: pointer; white-space: nowrap;
}
.menu-btn {
  background: var(--or); color: #1a1000; border: 0; border-radius: 999px; cursor: pointer;
  font: 800 12px/1 var(--texte); letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px;
}
.drawer {
  display: none; flex-direction: column; padding: 8px var(--gouttiere-d) 18px var(--gouttiere);
  border-top: 1px solid #2c1f0d; max-height: calc(100vh - 62px); overflow-y: auto;
}
.drawer.open { display: flex; }
.drawer a { color: var(--creme); text-decoration: none; font: 700 17px/1 var(--texte); padding: 14px 0; border-bottom: 1px solid #2c1f0d; }
.drawer a:last-child { border-bottom: 0; }

/* ---------- Couverture ---------- */
.cover { position: relative; background: #000; }
.cover img { width: 100%; height: auto; }
.cover .cover-cta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px var(--gouttiere-d) 22px var(--gouttiere);
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}

/* ---------- Bandeau dates ---------- */
.dates { background: linear-gradient(180deg, #120c06, var(--nuit)); padding-block: 44px; text-align: center; }
.dates h1 { font-size: clamp(32px, 6vw, 60px); color: var(--or); }
.dates .place { color: var(--sable); margin: 10px 0 24px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; }
.countdown div { background: var(--brun); border: 1px solid var(--trait); border-radius: 12px; padding: 12px 4px; }
.countdown b { display: block; font: 400 30px/1 var(--titre); color: var(--or); font-variant-numeric: tabular-nums; }
.countdown span { font: 700 10px/1.2 var(--texte); letter-spacing: .1em; text-transform: uppercase; color: var(--sable); }
.dates .actions { justify-content: center; }

/* ---------- Le festival ---------- */
.split { display: grid; gap: 28px; align-items: center; }
.split > * { min-width: 0; }
.photo { border-radius: 14px; border: 1px solid var(--trait); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 34px; }
.stats div { background: var(--brun); border-left: 3px solid var(--or); padding: 16px 14px; border-radius: 4px; }
.section.alt .stats div { background: var(--brun-2); }
.stats b { display: block; font: 400 30px/1 var(--titre); color: var(--or); }
.stats span { font-size: 14px; color: var(--sable); }

/* ---------- Programme ---------- */
.days { display: grid; gap: 18px; margin-top: 28px; }
.day-card {
  display: flex; flex-direction: column; background: var(--brun-2); border: 1px solid var(--trait);
  border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--creme);
  transition: transform .25s, border-color .25s;
}
.day-card:hover { transform: translateY(-4px); border-color: var(--or); }
.day-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.day-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.day-date { font: 800 12px/1 var(--texte); letter-spacing: .14em; text-transform: uppercase; color: var(--or); }
.day-card h3 { font-size: 26px; }
.day-card ul { margin: 4px 0 8px; padding-left: 18px; color: var(--sable); }
.day-card ul li { margin: 3px 0; }
.day-card .more { margin-top: auto; font: 800 13px/1 var(--texte); letter-spacing: .08em; text-transform: uppercase; color: var(--or); }
.tbc { display: inline-block; margin-top: 22px; font-size: 14px; color: var(--sable); border: 1px dashed var(--trait); border-radius: 8px; padding: 10px 14px; }

/* ---------- Vidéo ---------- */
.video-box { border-radius: 16px; overflow: hidden; border: 1px solid var(--trait); background: #000; margin-top: 24px; }
.video-box video { width: 100%; aspect-ratio: 16/9; background: #000; }
.caption { color: var(--sable); text-align: center; font-size: 14px; margin-top: 12px; }

/* ---------- Galerie ---------- */
.tabs { display: flex; gap: 8px; margin: 24px 0 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; background: transparent; color: var(--creme); border: 1px solid var(--trait);
  font: 700 14px/1 var(--texte); padding: 12px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--or); border-color: var(--or); color: #1a1000; }
.tab .n { opacity: .7; font-weight: 500; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gallery button { padding: 0; border: 0; background: #000; border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery button:hover img { transform: scale(1.06); }
.gallery-more { margin-top: 22px; }

.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.95);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 12px calc(76px + env(safe-area-inset-bottom, 0px));
}
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; }
.lightbox p { color: var(--sable); font-size: 14px; margin: 10px 0 0; }
.lightbox button { position: absolute; background: rgba(0,0,0,.4); color: #fff; border: 0; cursor: pointer; font-size: 34px; line-height: 1; width: 52px; height: 52px; border-radius: 50%; }
.lb-close { top: calc(8px + env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.lb-next { right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Documents ---------- */
.docs { display: grid; gap: 16px; margin-top: 26px; }
.doc {
  display: flex; gap: 16px; align-items: flex-start; background: var(--brun-2); border: 1px solid var(--trait);
  border-radius: 16px; padding: 22px; text-decoration: none; color: var(--creme); transition: border-color .2s;
}
.doc:hover { border-color: var(--or); }
.doc .ico { flex: none; width: 52px; height: 64px; border-radius: 6px; background: var(--or); color: #1a1000; display: grid; place-items: center; font: 800 13px/1 var(--texte); position: relative; }
.doc .ico::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 14px 14px 0; border-color: transparent var(--brun-2) #b37511 transparent; }
.doc h3 { font-size: 22px; margin-bottom: 6px; }
.doc p { color: var(--sable); margin: 0 0 10px; font-size: 15px; }
.doc .dl { font: 800 13px/1 var(--texte); letter-spacing: .08em; text-transform: uppercase; color: var(--or); }

/* ---------- Partenaires ---------- */
.logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.logos figure { margin: 0; text-align: center; }
.logos img { width: 100%; height: 100px; object-fit: contain; background: #fff; border-radius: 12px; padding: 10px; }
.logos figcaption { font-size: 13px; color: var(--sable); margin-top: 8px; }

/* ---------- Lieu ---------- */
.place-band { position: relative; background: url(../images/galerie/galerie-004.jpg) center/cover no-repeat; }
.place-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(13,9,5,.86), rgba(13,9,5,.93)); }
.place-band .wrap { position: relative; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { padding-left: 28px; position: relative; margin: 10px 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 3px solid var(--or); border-bottom: 3px solid var(--or); transform: rotate(-45deg); }

/* ---------- Contact ---------- */
.wa-card {
  background: linear-gradient(135deg, #0f3b20, #0a2414); border: 1px solid #1f6b3b; border-radius: 18px;
  padding: 26px 22px; display: grid; gap: 16px; margin-top: 26px;
}
.wa-card .num { font: 400 clamp(28px, 6vw, 40px)/1.1 var(--titre); color: #fff; letter-spacing: .02em; }
.contacts { display: grid; gap: 14px; margin-top: 18px; }
.person { background: var(--brun); border: 1px solid var(--trait); border-radius: 14px; padding: 18px; }
.person .role { font: 800 11px/1.3 var(--texte); letter-spacing: .12em; text-transform: uppercase; color: var(--or); margin-bottom: 6px; }
.person h3 { font-size: 22px; margin-bottom: 8px; }
.person p { margin: 0; color: var(--sable); }
.person a { color: var(--creme); text-decoration: none; }

/* ---------- Pied de page ---------- */
.foot { border-top: 1px solid #2c1f0d; padding-block: 34px calc(90px + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--sable); font-size: 14px; }
.foot .presented { font: 400 22px/1.2 var(--titre); color: var(--or); letter-spacing: .03em; margin-bottom: 8px; }
.foot p { margin: 4px 0; }

/* ---------- Boutons flottants ---------- */
.float-wa, .music-btn {
  position: fixed; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 6px 20px rgba(0,0,0,.5); cursor: pointer;
}
.float-wa { right: max(16px, env(safe-area-inset-right, 0px)); background: var(--vert-wa); }
.float-wa svg { width: 30px; height: 30px; fill: #fff; }
.music-btn { left: max(16px, env(safe-area-inset-left, 0px)); background: rgba(27,19,10,.94); border: 2px solid var(--or); color: var(--or); padding: 0; }
.music-btn svg { width: 26px; height: 26px; fill: currentColor; }
.music-btn .on { display: none; }
.music-btn.playing { background: var(--or); color: #1a1000; }
.music-btn.playing .on { display: inline; }
.music-btn.playing .off { display: none; }

/* ---------- Pages du programme ---------- */
.page-hero { position: relative; background: #000; }
.page-hero img { width: 100%; aspect-ratio: 16/9; max-height: 74vh; object-fit: cover; opacity: .82; }
.page-hero .ill { position: absolute; right: var(--gouttiere-d); top: 12px; font-size: 11px; color: rgba(255,255,255,.75); background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 4px; }
.page-head { padding-block: 34px 10px; }
.page-head h1 { font-size: clamp(36px, 7vw, 68px); color: var(--creme); }
.page-head .day-date { font-size: 14px; margin-bottom: 12px; display: block; }
.back { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font: 700 14px/1 var(--texte); color: var(--or); margin-bottom: 18px; }
.agenda { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.agenda li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; background: var(--brun); border: 1px solid var(--trait); border-radius: 14px; padding: 18px 16px; }
.agenda .time { font: 400 22px/1.1 var(--titre); color: var(--or); }
.agenda h3 { font-size: 22px; margin-bottom: 6px; }
.agenda p { margin: 0; color: var(--sable); }
.page-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.page-photos figure { margin: 0; }
.page-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.page-photos figcaption { font-size: 12px; color: var(--sable); margin-top: 6px; }
.page-photos .wide { grid-column: 1 / -1; }
.page-photos .wide img { aspect-ratio: 16/9; }
.prize { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.prize div { background: var(--brun-2); border: 1px solid var(--or); border-radius: 14px; padding: 18px; text-align: center; }
.prize b { display: block; font: 400 26px/1.1 var(--titre); color: var(--or); }
.day-nav { display: grid; gap: 10px; margin-top: 40px; }
.day-nav a { display: block; text-decoration: none; background: var(--brun); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; color: var(--creme); }
.day-nav a small { display: block; color: var(--or); font: 800 11px/1.2 var(--texte); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.day-nav a:hover { border-color: var(--or); }

/* =========================================================
   VERSION TABLETTE / ORDINATEUR (768 px et plus)
   ========================================================= */
@media (min-width: 768px) {
  body { font-size: 17px; }
  .section { padding-block: 96px; }
  .top-in { height: 72px; }
  .brand b { font-size: 26px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .stats b { font-size: 38px; }
  .countdown { gap: 14px; max-width: 620px; }
  .countdown div { padding: 18px 8px; }
  .countdown b { font-size: 46px; }
  .countdown span { font-size: 12px; }
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .doc { padding: 28px; }
  .logos { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .logos img { height: 120px; }
  .wa-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 34px; }
  .contacts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agenda li { grid-template-columns: 120px minmax(0, 1fr); padding: 24px; }
  .agenda .time { font-size: 28px; }
  .page-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .page-photos .wide img { aspect-ratio: 21/9; }
  .day-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-nav a.next { text-align: right; }
  .cover .cover-cta { justify-content: flex-start; padding-left: max(5vw, 24px); padding-bottom: 36px; }
}

/* Menu complet affiché sur grand écran */
@media (min-width: 1100px) {
  .menu-btn, .drawer, .drawer.open { display: none; }
  .nav { display: flex; gap: 22px; margin-right: 8px; }
  .nav a { color: var(--creme); text-decoration: none; font: 700 13px/1 var(--texte); letter-spacing: .05em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .nav a:hover { color: var(--or); border-bottom-color: var(--or); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  #intro.flashing .flash { animation-duration: .01s; }
}

html.no-intro #intro { display: none; }
#intro picture { position: absolute; inset: 0; }
#intro picture img { width: 100%; height: 100%; object-fit: cover; }
#intro video { position: relative; z-index: 2; }


/* =========================================================
   Version 2 : organisateurs, galerie en panneau, transitions 3D
   ========================================================= */

/* Le festival : photo en paysage complète, texte au-dessus (téléphone) */
.festival-photo { margin: 0; }
.festival-photo img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--trait); cursor: zoom-in; }
.festival-photo figcaption { font-size: 13px; color: var(--sable); margin-top: 8px; }

/* Vidéo : fond avec l'affiche officielle */
.video-section { position: relative; background: #000 url(../images/couverture/couverture-telephone.jpg) center / cover no-repeat; }
.video-section::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(13,9,5,.78), rgba(13,9,5,.88)); }
.video-section .wrap { position: relative; }
.video-section .video-box { box-shadow: 0 30px 80px rgba(0,0,0,.6); }

/* Lieu : photo de la soirée */
.place-band { background-image: url(../images/site/lieu-soiree.jpg); }
.place-band::before { background: linear-gradient(90deg, rgba(13,9,5,.92), rgba(13,9,5,.72)); }

/* Contact : cartes compactes WhatsApp + e-mail */
.contact-cards { display: grid; gap: 12px; margin-top: 24px; }
.c-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; text-decoration: none; color: #fff; min-width: 0; transition: transform .2s; }
.c-card:hover { transform: translateY(-2px); }
.c-card span:last-child { min-width: 0; }
.c-card small { display: block; font: 700 11px/1.3 var(--texte); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.c-card b { display: block; font: 700 17px/1.3 var(--texte); overflow-wrap: anywhere; }
.c-ico { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.c-ico svg { width: 22px; height: 22px; fill: #fff; }
.c-wa { background: linear-gradient(135deg, #128c4a, #0b5d31); }
.c-mail { background: var(--brun-2); border: 1px solid var(--trait); }
.c-mail .c-ico { background: var(--or); } .c-mail .c-ico svg { fill: #1a1000; }

/* Pied de page : toutes les rubriques */
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid #2c1f0d; }
.foot-nav a { color: var(--creme); text-decoration: none; font: 700 13px/1.4 var(--texte); letter-spacing: .05em; text-transform: uppercase; }
.foot-nav a:hover { color: var(--or); }
.foot a { color: var(--or-clair); }

/* Panneaux (Organisateurs, Galerie photos) : visibles seulement depuis le menu */
.panel { position: fixed; inset: 0; z-index: 80; background: var(--nuit); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; perspective: 1600px; }
.panel-bar { position: sticky; top: 0; z-index: 2; background: rgba(13,9,5,.96); border-bottom: 1px solid #2c1f0d; padding-top: env(safe-area-inset-top, 0px); }
.panel-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.panel-bar b { font: 400 22px/1 var(--titre); color: var(--or); letter-spacing: .03em; }
.panel-close { background: var(--or); color: #1a1000; border: 0; border-radius: 999px; font: 800 12px/1 var(--texte); letter-spacing: .08em; text-transform: uppercase; padding: 11px 16px; cursor: pointer; }
.panel-body { padding-block: 36px calc(60px + env(safe-area-inset-bottom, 0px)); }
.panel.opening .panel-body, .panel.opening .panel-bar { animation: panelIn .75s cubic-bezier(.2,.85,.25,1) both; transform-origin: 50% 0; }
.panel.closing .panel-body, .panel.closing .panel-bar { animation: panelOut .42s cubic-bezier(.55,0,.75,.2) both; transform-origin: 50% 0; }
.panel.opening { animation: fadeIn .4s ease both; }
.panel.closing { animation: fadeOut .42s ease both; }
@keyframes panelIn { from { transform: rotateX(-22deg) translateY(70px) translateZ(-260px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes panelOut { to { transform: rotateX(16deg) translateY(-40px) translateZ(-260px); opacity: 0; } }
@keyframes fadeIn { from { background-color: rgba(13,9,5,0); } }
@keyframes fadeOut { to { background-color: rgba(13,9,5,0); } }
html.panel-on, html.panel-on body { overflow: hidden; }

.orgs { display: grid; gap: 22px; margin-top: 28px; }
.org { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--brun); border: 1px solid var(--trait); border-radius: 18px; padding: 16px; }
.org img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: top; border-radius: 12px; }
.org .role { font: 800 11px/1.3 var(--texte); letter-spacing: .12em; text-transform: uppercase; color: var(--or); margin-bottom: 6px; }
.org h3 { font-size: 26px; margin-bottom: 8px; }
.org a { color: var(--creme); }

.tombola { display: grid; gap: 18px; margin-top: 18px; align-items: center; }
.tombola img { width: 100%; max-width: 460px; border-radius: 12px; cursor: zoom-in; }

/* Transitions 3D entre les rubriques */
main { transform-origin: 50% 40vh; }
main.turn-out { animation: turnOut .4s cubic-bezier(.55,0,.75,.2) forwards; }
main.turn-in { animation: turnIn .8s cubic-bezier(.2,.85,.25,1) both; }
@keyframes turnOut { to { transform: perspective(1400px) rotateX(9deg) translateY(-30px) translateZ(-300px); opacity: 0; filter: blur(3px); } }
@keyframes turnIn { from { transform: perspective(1400px) rotateX(-12deg) translateY(90px) translateZ(-260px); opacity: 0; filter: blur(3px); } to { transform: none; opacity: 1; filter: none; } }
body.leaving main, body.leaving .page-hero { animation: turnOut .4s cubic-bezier(.55,0,.75,.2) forwards; }
body.page-enter main { animation: turnIn .85s cubic-bezier(.2,.85,.25,1) both; }

/* Apparition 3D des blocs au défilement */
html.js .rv { opacity: 0; transform: perspective(1000px) rotateX(16deg) translateY(46px); transform-origin: 50% 100%; transition: opacity .8s ease, transform .9s cubic-bezier(.2,.85,.25,1); transition-delay: var(--d, 0ms); }
html.js .rv.in { opacity: 1; transform: none; }

@media (min-width: 768px) {
  .festival-split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .festival-split .festival-photo { order: -1; }
  .video-section { background-image: url(../images/couverture/couverture-ordinateur.jpg); background-attachment: scroll; }
  .video-section .video-box { width: 50%; margin-left: auto; margin-right: auto; }
  .video-section .wrap { text-align: center; }
  .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
  .orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org { grid-template-columns: 180px minmax(0, 1fr); padding: 22px; }
  .panel-bar-in { height: 72px; }
  .tombola { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1100px) { .nav { gap: 16px; } .nav a { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) {
  main.turn-out, main.turn-in, body.leaving main, body.page-enter main, .panel.opening *, .panel.closing * { animation: none !important; }
  html.js .rv { opacity: 1; transform: none; }
}

/* Volet 3D entre les rubriques */
#flip { position: fixed; inset: 0; z-index: 75; pointer-events: none; perspective: 1500px; visibility: hidden; }
#flip.show { visibility: visible; pointer-events: auto; }
#flip .flip-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(ellipse at 50% 40%, #3a2508, #0d0905 70%); border-left: 6px solid var(--or);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-origin: 0 50%;
  box-shadow: 0 0 120px rgba(0,0,0,.8);
}
#flip .flip-k { font: 800 12px/1 var(--texte); letter-spacing: .3em; color: var(--sable); }
#flip .flip-t { font: 400 clamp(40px, 9vw, 96px)/1 var(--titre); color: var(--or); text-transform: uppercase; letter-spacing: .02em; text-align: center; padding: 0 16px; }
#flip.in .flip-face { animation: flipIn .43s cubic-bezier(.55,0,.6,.35) both; }
#flip.out .flip-face { animation: flipOut .6s cubic-bezier(.25,.75,.3,1) both; transform-origin: 100% 50%; }
@keyframes flipIn { from { transform: rotateY(-95deg); opacity: .4; } to { transform: rotateY(0); opacity: 1; } }
@keyframes flipOut { from { transform: rotateY(0); opacity: 1; } to { transform: rotateY(95deg); opacity: .4; } }
