:root {
  color-scheme: dark;
  --ink: #171716;
  --ink-soft: #252421;
  --cream: #f1e9dc;
  --cream-soft: #c9c0b3;
  --red: #c8452e;
  --red-bright: #ed5a3c;
  --yellow: #d8a735;
  --line: rgba(241, 233, 220, .19);
  --content: min(1180px, calc(100vw - 48px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 12%, rgba(200, 69, 46, .12), transparent 31rem),
    var(--ink);
  color: var(--cream);
  min-width: 320px;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input, textarea { font: inherit; }
.skip-link { position: fixed; left: 12px; top: -60px; background: var(--cream); color: var(--ink); padding: 12px; z-index: 100; }
.skip-link:focus { top: 12px; }
.mini-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.mini-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: white; font-size: .72rem; transform: rotate(-8deg); }
.eyebrow, .section-number { color: var(--yellow); font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 28px; height: 2px; background: currentColor; }
h1, h2 { margin: 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: -.025em; line-height: .88; }
h1 { font-size: clamp(4.3rem, 8vw, 8.2rem); margin-top: 28px; }
h1 em { font-style: normal; color: var(--red-bright); display: inline-block; transform: translateX(9%); }

.photo-hero { min-height: 100vh; min-height: 100svh; padding: 24px 0; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.gallery-stage { position: relative; width: calc(100vw - 16px); max-width: 1460px; width: min(1460px, calc(100vw - 16px)); height: 56.25vw; min-height: 520px; max-height: 820px; height: clamp(520px, 56.25vw, 820px); isolation: isolate; overflow: hidden; }
.gallery-grid { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; }
.photo-tile { position: absolute; margin: 0; overflow: hidden; background: #302e2a; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.photo-tile::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: linear-gradient(145deg, transparent 45%, rgba(0,0,0,.42)); pointer-events: none; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.75) contrast(1.08); transition: transform .6s ease, filter .6s ease; }
.photo-tile button { padding: 0; border: 0; background: none; width: 100%; height: 100%; cursor: zoom-in; }
.photo-tile button:hover img, .photo-tile button:focus-visible img { transform: scale(1.045); filter: saturate(1) contrast(1.04); }
.photo-tile figcaption { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; opacity: 0; transition: opacity .25s; text-shadow: 0 1px 4px rgba(0,0,0,.85); }
.photo-tile:hover figcaption, .photo-tile:focus-within figcaption { opacity: 1; }
/* Sans survol (tactile), la légende resterait invisible : on l’affiche en permanence.
   Les photos se chevauchent : on limite à une ligne pour ne pas empiéter sur les voisines. */
@media (hover: none) {
  .photo-tile figcaption { opacity: 1; font-size: .6rem; letter-spacing: .06em; line-height: 1.35; }
  /* Bandeau sombre : sans lui, la légende se lit par-dessus la photo voisine. */
  .photo-tile::after { background: linear-gradient(to top, rgba(0,0,0,.78) 0, rgba(0,0,0,.35) 22%, transparent 42%); }
}
.main-logo { position: absolute; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-3deg); width: 250px; display: grid; place-items: center; pointer-events: none; }
/* Voile sombre : le logo clair passe au-dessus de photos parfois très lumineuses. */
.main-logo::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 190%; height: 190%; background: radial-gradient(closest-side, rgba(23,23,22,.72), rgba(23,23,22,.45) 55%, transparent 78%); }
.main-logo img { display: block; width: 100%; height: auto; }
.gallery-status { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: grid; place-items: center; color: var(--cream-soft); }
.gallery-status[hidden] { display: none; }

.association-intro { width: calc(100vw - 48px); max-width: 1180px; width: var(--content); margin: 0 auto; padding: 72px 0 58px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(32px, 7vw, 110px); align-items: end; border-bottom: 1px solid var(--line); }
.association-kicker { margin: 0; color: var(--yellow); font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.association-intro h1 { margin: 14px 0 0; font-size: clamp(3.3rem, 7vw, 7rem); line-height: .86; }
.association-more { max-width: 48ch; margin: 18px 0 0 !important; font-size: 1rem !important; color: var(--cream-soft); line-height: 1.6; }
.association-intro-copy > p { max-width: 38ch; margin: 0; color: var(--cream-soft); font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.5; }
.association-details { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 28px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.association-details a { color: var(--cream); text-decoration: none; border-bottom: 1px solid currentColor; }

.news-section { width: calc(100vw - 48px); max-width: 1180px; width: var(--content); margin: 0 auto; padding: 64px 0 100px; }
.news-section > h2 { font-size: clamp(2.4rem, 5vw, 4.5rem); margin-bottom: 34px; }
.news-feed { border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 160px 1fr 42px; gap: 34px; padding: 36px 0 40px; border-bottom: 1px solid var(--line); }
.news-date { color: var(--yellow); text-transform: uppercase; letter-spacing: .12em; font-size: .67rem; font-weight: 800; padding-top: 7px; }
.news-item h3 { margin: 0 0 16px; font-size: clamp(1.45rem, 3vw, 2.35rem); letter-spacing: -.025em; }
.news-image { display: block; width: 100%; max-width: 760px; max-height: 520px; object-fit: cover; margin: 4px 0 22px; border: 1px solid var(--line); }
.news-item p { color: var(--cream-soft); margin: 0; line-height: 1.7; max-width: 75ch; white-space: pre-line; }
.news-more { display: block; width: 100%; margin: 0; padding: 26px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--cream-soft); font: inherit; font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; cursor: pointer; transition: color .2s; }
.news-more:hover, .news-more:focus-visible { color: var(--cream); }
.news-bolt { color: var(--red-bright); font-size: 1.7rem; }
.loading-message, .empty-message { padding: 40px 0; color: var(--cream-soft); }

footer { padding: 34px max(24px, calc((100vw - min(1180px, calc(100vw - 48px))) / 2)); background: #121211; color: var(--cream-soft); border-top: 1px solid var(--line); }
.footer-mail { font-size: .9rem; font-weight: 650; text-decoration: none; }
.footer-mail:hover { color: var(--cream); text-decoration: underline; }
.footer-meta { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; font-size: .59rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }

.lightbox { border: 0; padding: 0; background: transparent; color: white; width: 92vw; max-width: 1000px; width: min(1000px, 92vw); overflow: visible; }
/* Repli pour les navigateurs sans <dialog> : l’attribut open est posé à la main. */
.lightbox:not([open]) { display: none; }
.lightbox[open] { display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 30; margin: 0; }
.lightbox::backdrop { background: rgba(10,10,9,.92); backdrop-filter: blur(6px); }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; margin: auto; object-fit: contain; }
.error-detail { display: block; margin-top: 10px; font-size: .7rem; opacity: .6; }
.lightbox p { text-align: center; color: var(--cream-soft); }
.lightbox-close { position: absolute; top: -48px; right: 0; border: 0; color: white; background: none; font-size: 2.2rem; cursor: pointer; }

@media (max-width: 900px) {
  .gallery-stage { min-height: 520px; }
}

@media (max-width: 620px) {
  :root { --content: calc(100vw - 32px); }
  h1 { font-size: clamp(3.8rem, 18vw, 5.3rem); }
  h1 em { transform: none; }
  .photo-hero { min-height: 680px; padding: 12px 0; }
  .gallery-stage { width: calc(100vw - 32px); max-width: none; width: var(--content); height: 656px; min-height: 656px; max-height: none; }
  .main-logo { width: 185px; }
  .association-intro { grid-template-columns: 1fr; gap: 28px; padding: 52px 0; }
  .association-intro h1 { font-size: clamp(3rem, 16vw, 4.6rem); }
  .association-details { flex-direction: column; align-items: flex-start; }
  .news-section { padding: 60px 0 72px; }
  .news-item { grid-template-columns: 1fr 24px; gap: 12px; }
  .news-date { grid-column: 1 / -1; }
  .footer-meta { flex-direction: column; }
}

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