/* ==========================================================
   Mini Club Île-de-France — feuille de style
   ========================================================== */

@font-face { font-family: "MINI Sans"; src: url("../fonts/MINI-Sans-Serif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MINI Sans"; src: url("../fonts/MINI-Sans-Serif-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MINI Serif"; src: url("../fonts/MINI-Serif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MINI Serif"; src: url("../fonts/MINI-Serif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "MINI Serif"; src: url("../fonts/MINI-Serif-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #141414;
  --black-2: #1d1d1d;
  --red: #c8262f;
  --red-dark: #a91e26;
  --cream: #f3f1ec;
  --white: #ffffff;
  --grey: #e2e0db;
  --grey-2: #f2f2f2;
  --text: #141414;
  --muted: #5d5b57;
  --line: #d9d6cf;

  --sans: "MINI Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "MINI Serif", Georgia, "Times New Roman", serif;

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 64px);
  --radius-pill: 999px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Typo utilitaires ---------- */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow-light { color: rgba(255,255,255,.85); }
.eyebrow-red { color: var(--red); }
.h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.h3 { font-size: 22px; font-weight: 700; }
.link-red { color: var(--red); font-weight: 700; font-size: 14px; }
.link-red:hover { text-decoration: underline; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 0 20px; font-size: 14px; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #000; }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--black); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Emplacements photo (placeholder si l'image manque) ---------- */
.ph { position: relative; overflow: hidden; background: var(--grey); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.is-empty::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px; color: var(--muted);
}
.ph-post { background: var(--grey-2); border: 1px dashed #c9c6c0; }

/* ==========================================================
   En-tête
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--black); color: var(--white);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-emblem { width: 40px; height: auto; }
.brand-name { font-family: var(--serif); font-size: 16px; }

.main-nav { display: flex; align-items: center; gap: 40px; }
.main-nav ul { display: flex; gap: 32px; }
.main-nav ul a { font-weight: 700; font-size: 15px; position: relative; }
.main-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.main-nav ul a:hover::after, .main-nav ul a.is-active::after { transform: scaleX(1); }

.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--white); margin: 6px 0; transition: transform .25s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative; color: var(--white);
  min-height: min(82vh, 760px);
  display: flex; align-items: center;
  background: var(--black);
}
.hero-media { position: absolute; inset: 0; background: #2a2a2a; }
.hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.1) 100%),
              linear-gradient(0deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 40%);
}
.hero-media.is-empty::after { color: rgba(255,255,255,.4); z-index: 2; }
.hero-content { position: relative; z-index: 2; padding-top: 80px; padding-bottom: 80px; }
.hero-title {
  margin-top: 18px;
  font-size: clamp(48px, 7.4vw, 104px);
  line-height: 1; font-weight: 700; letter-spacing: -.02em;
}
.hero-title em { font-size: .92em; letter-spacing: 0; }
.hero-lead { margin-top: 28px; max-width: 580px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px; }

/* ==========================================================
   Sections
   ========================================================== */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-cream { background: var(--cream); }
.section-white { background: var(--white); }
.section-dark { background: var(--black); color: var(--white); }

/* ---------- Événements ---------- */
.events-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 56px); align-items: start; }

.next-event { background: var(--white); }
.next-event-media { aspect-ratio: 16 / 9; }
.next-event-body { display: flex; gap: 22px; padding: 28px 28px 32px; }
.date-block {
  flex: none; width: 76px; height: 94px;
  background: var(--red); color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-transform: uppercase; font-weight: 700; line-height: 1;
}
.date-day, .date-month { font-size: 12px; letter-spacing: .08em; }
.date-num { font-size: 36px; margin: 6px 0; }
.next-event-title { margin-top: 8px; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.15; font-weight: 700; }
.next-event-meta { margin-top: 10px; font-size: 14px; color: var(--muted); }
.next-event .btn { margin-top: 22px; min-height: 46px; }

.agenda-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.agenda-item {
  display: grid; grid-template-columns: 100px 1fr auto; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.agenda-date { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; line-height: 1.3; }
.agenda-date .d { color: var(--red); }
.agenda-date .m { text-transform: uppercase; }
.agenda-info { display: flex; flex-direction: column; }
.agenda-info strong { font-size: 18px; }
.agenda-info span { font-size: 14px; color: var(--muted); }
.agenda-cta { font-weight: 700; font-size: 14px; white-space: nowrap; }
.agenda-cta:hover { color: var(--red); }

.btn.is-soon, .agenda-cta.is-soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; transform: none; }
.agenda-cta.is-soon { border: 0; font-weight: 400; }
.next-course { margin-top: 32px; }
.next-course[hidden], .courses-all[hidden] { display: none; }
.courses-note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.courses-all { border-top: 1px solid var(--line); padding: 0 28px 8px; }
.courses-all summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 14px; }
.courses-all summary:hover { color: var(--red); }
.courses-all .agenda-item:last-child { border-bottom: 0; }
@media (max-width: 720px) { .courses-all { padding: 0 20px 8px; } }
.agenda-empty { padding: 22px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.is-empty-event .next-event-title { font-size: 22px; }

/* ---------- Le club ---------- */
.club-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.club-title { margin-top: 14px; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.12; font-weight: 700; }
.club-text { font-size: 17px; line-height: 1.75; color: rgba(255,255,255,.88); }

/* ---------- Communauté ---------- */
.members-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.member-photo { aspect-ratio: 4 / 3; }
.member figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.member figcaption strong { color: var(--text); }
.member figcaption a { color: var(--red); text-decoration: none; }
.member figcaption a:hover { text-decoration: underline; }

.insta-head { margin-top: 72px; display: flex; align-items: baseline; justify-content: space-between; }
.insta-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.insta-post { aspect-ratio: 4 / 5; display: block; }  /* format portrait Instagram */
.insta-post img { object-fit: contain; }              /* image entière, jamais rognée */
.insta-post img { transition: transform .4s; }
.insta-post:hover img { transform: scale(1.05); }

/* ---------- Articles ---------- */
.articles-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.article-img { aspect-ratio: 3 / 2; margin-bottom: 18px; }
.article-img img { transition: transform .4s; }
.article-card:hover .article-img img { transform: scale(1.04); }
.article-title { margin-top: 8px; font-size: 20px; line-height: 1.25; font-weight: 700; }
.article-card:hover .article-title { color: var(--red); }

/* ---------- Partenaires ---------- */
.partners { padding: 56px 0; }
.partners-inner { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 32px; }
.partners-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.partner {
  height: 64px; background: var(--grey-2);
  display: grid; place-items: center;
  font-size: 13px; color: var(--muted);
}

/* ==========================================================
   Pied de page
   ========================================================== */
.site-footer { background: var(--black); color: var(--white); padding: 64px 0 120px; }
.site-footer:has(> .donate) { padding-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.1fr 1fr; gap: 40px; align-items: start; }
.footer-brand img { width: 160px; height: auto; }
.footer-mail { display: inline-block; margin-top: 10px; font-size: clamp(20px, 2vw, 26px); font-weight: 700; }
.footer-mail:hover { color: var(--red); }
.footer-social { display: flex; flex-direction: column; gap: 10px; font-weight: 700; }
.footer-social a:hover { color: var(--red); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Bandeau de dons ---------- */
.donate { background: var(--red); color: var(--white); padding: clamp(28px, 4vw, 48px) 0; margin-bottom: 64px; }
.donate-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.donate-title { font-size: clamp(26px, 3.4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.donate-title em { font-size: 1.05em; letter-spacing: 0; }
.donate .btn { background: var(--white); color: var(--red); flex: none; gap: 10px; }
.donate .btn:hover { background: var(--black); color: var(--white); }

/* ---------- Barre flottante ---------- */
.sticky-event {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: flex; align-items: center; gap: 32px;
  padding: 12px 12px 12px 24px;
  background: var(--red); color: var(--white);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  transform: translateY(140%); opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.sticky-event.is-visible { transform: none; opacity: 1; }
.sticky-event-text { display: flex; flex-direction: column; line-height: 1.25; }
.sticky-event-date { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.sticky-event-name { font-weight: 700; font-size: 15px; }
.sticky-event-btn {
  background: var(--white); color: var(--red);
  font-weight: 700; font-size: 14px;
  padding: 11px 22px; border-radius: var(--radius-pill);
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .insta-grid { grid-template-columns: repeat(3, 1fr); }
  .partners-inner { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--black);
    flex-direction: column; align-items: stretch; gap: 32px;
    padding: 32px var(--gutter);
    transform: translateX(100%); transition: transform .3s ease;
    visibility: hidden;
  }
  .main-nav.is-open { transform: none; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: 18px 0; font-size: 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .main-nav ul a::after { display: none; }
  .main-nav .btn { min-height: 52px; font-size: 16px; }

  .events-grid, .club-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; gap: 18px; }
  .article-card { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto 1fr; column-gap: 16px; align-items: start; }
  .article-img { grid-row: span 2; aspect-ratio: 4 / 3; margin-bottom: 0; }
  .article-card .eyebrow { align-self: end; }
  .article-title { margin-top: 4px; font-size: 17px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-social { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }
}

@media (max-width: 600px) {
  .brand-emblem { width: 32px; }
  .brand-name { font-size: 14px; }
  .hero { min-height: 92vh; align-items: flex-end; }
  .hero-media::before { background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.1) 100%); }
  .hero-content { padding-bottom: 40px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .next-event-body { padding: 20px; gap: 16px; }
  .date-block { width: 62px; height: 80px; }
  .date-num { font-size: 28px; }
  .next-event .btn { width: 100%; }
  .donate { margin-bottom: 40px; }
  .donate-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .donate .btn { width: 100%; }
  .agenda-item { grid-template-columns: 64px 1fr; }
  .agenda-cta { grid-column: 2; margin-top: 6px; }
  .members-grid { gap: 10px; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sticky-event { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
}

/* ---------- Lien « sorties passées » sous l'agenda ---------- */
.past-link { display: inline-block; margin: 22px 0; font-weight: 700; font-size: 14px; }
.past-link:hover { color: var(--red); }

/* ---------- Instagram : vignette vidéo ---------- */
.insta-post.is-video::before {
  content: ""; position: absolute; z-index: 1; top: 10px; right: 10px;
  border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--white);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

/* ==========================================================
   Page « Sorties passées »
   ========================================================== */
.page-head { padding: clamp(56px, 7vw, 96px) 0; }
.page-title { margin-top: 16px; font-size: clamp(40px, 6vw, 80px); line-height: 1.02; font-weight: 700; letter-spacing: -.02em; }
.page-title em { font-size: .92em; letter-spacing: 0; }
.page-lead { margin-top: 22px; max-width: 560px; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255,255,255,.85); }

.past-status { color: var(--muted); font-size: 17px; }
.past-year {
  font-size: clamp(28px, 3.2vw, 38px); font-weight: 700; line-height: 1;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.past-year:not(:first-of-type) { margin-top: clamp(56px, 7vw, 88px); }
.past-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 32px); }

.past-card { background: var(--white); display: flex; flex-direction: column; }
.past-media { aspect-ratio: 16 / 9; }
.past-body { padding: 24px 26px 28px; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.past-title { margin-top: 8px; font-size: clamp(20px, 2vw, 26px); line-height: 1.2; font-weight: 700; }
.past-meta { margin-top: 6px; font-size: 14px; color: var(--muted); }
.past-soon { margin-top: auto; padding-top: 18px; }

.past-thumbs { margin-top: 20px; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.past-thumb { aspect-ratio: 1; display: block; padding: 0; border: 0; cursor: zoom-in; font: inherit; }
span.past-thumb { cursor: default; animation: past-pulse 1.4s ease-in-out infinite; }
.past-thumb img { transition: transform .35s; }
.past-thumb:hover img { transform: scale(1.06); }
.past-more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(20,20,20,.58); color: var(--white); font-weight: 700; font-size: 18px;
}
.past-album { margin-top: 20px; }
@keyframes past-pulse { 50% { opacity: .55; } }

/* ---------- Visionneuse ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,.94);
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.lb-figure figcaption { color: rgba(255,255,255,.75); font-size: 14px; text-align: center; padding: 0 12px; }
.lb-btn {
  background: none; border: 0; color: var(--white); cursor: pointer;
  font-size: 44px; line-height: 1; width: 56px; height: 56px; border-radius: 50%;
  justify-self: center;
}
.lb-btn:hover { background: rgba(255,255,255,.12); }
.lb-btn[hidden] { visibility: hidden; display: block; }
.lb-close { position: absolute; top: 14px; right: 14px; font-size: 36px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-figure { grid-column: 2; grid-row: 1; }

@media (max-width: 900px) {
  .past-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .past-body { padding: 20px; }
  .lightbox { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { position: absolute; bottom: 18px; grid-column: auto; }
  .lb-prev { left: 18px; } .lb-next { right: 18px; }
  .lb-figure img { max-height: calc(100vh - 170px); }
}

/* ==========================================================
   Page « Mentions légales »
   ========================================================== */
.legal > * { max-width: 760px; }
.legal h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 1.2; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p, .legal ul { margin-top: 14px; font-size: 16px; line-height: 1.7; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.legal-updated { margin-top: 48px !important; font-size: 14px !important; color: var(--muted); }

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

/* masque temporaire */
#articles[hidden], .partners[hidden] { display: none !important; }

/* Agenda en cours de chargement */
.next-event.is-loading .next-event-title { color: var(--muted); }
