/* ==========================================================================
   Comité des fêtes de Mailhoc — feuille de style
   Palette "Bleu, Blanc, Jaune" inspirée de l'identité Ricard
   ========================================================================== */

:root {
  --parchment: #F4F9FF;
  --parchment-dark: #E2EEFC;
  --ink: #0B1F3A;
  --ink-soft: #35507A;
  --wine: #0B3C74;
  --wine-dark: #071F42;
  --gold: #FFC72C;
  --gold-dark: #E0A800;
  --pine: #1663A6;
  --pine-dark: #0E3E68;
  --sky: #2E8BC9;
  --white: #FFFFFF;
  --shadow: 0 6px 18px rgba(11, 31, 58, 0.16);
  --shadow-soft: 0 2px 8px rgba(11, 31, 58, 0.10);
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-script: "Caveat", cursive;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--wine-dark);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Bunting / banderole (signature element) ---------- */
.bunting {
  display: block;
  width: 100%;
  height: 24px;
  background-color: var(--wine-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cline x1='0' y1='2' x2='120' y2='2' stroke='%23FFC72C' stroke-width='2'/%3E%3Cpolygon points='10,4 26,4 18,22' fill='%23FFFFFF'/%3E%3Cpolygon points='50,4 66,4 58,22' fill='%23FFC72C'/%3E%3Cpolygon points='90,4 106,4 98,22' fill='%231663A6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--wine);
  box-shadow: var(--shadow);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .02em;
}
.brand:hover { text-decoration: none; opacity: .92; }
.brand__flag { color: var(--gold); font-size: 1.4rem; }
.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--parchment-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--parchment-dark);
  border-radius: 8px;
  color: var(--white);
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--white);
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s ease;
}
.site-nav a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.site-nav a[aria-current="page"] {
  background: var(--gold);
  color: var(--ink);
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 6px 20px 16px; }
  .site-nav a { display: block; padding: 10px 12px; }
}

/* ---------- Hero (page principale) ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--wine) 0%, var(--wine-dark) 60%, var(--pine-dark) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 20px 56px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; padding: 32px 20px 40px; }
}

.hero__eyebrow {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}
.hero h1 { color: var(--white); margin-bottom: .3em; }
.hero p.lede { color: var(--parchment-dark); font-size: 1.05rem; max-width: 46ch; }

.date-ticket {
  background: var(--parchment);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  position: relative;
  border: 2px dashed var(--gold-dark);
}
.date-ticket__label {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--wine);
  font-weight: 700;
}
.date-ticket__dates {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--wine-dark);
  margin: 4px 0 10px;
}
.date-ticket__days { display: flex; flex-direction: column; gap: 6px; }
.day-chip {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: .92rem;
}
.day-chip strong { color: var(--pine-dark); min-width: 5.5em; }

.hero__actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Page hero (sous-pages) ---------- */
.page-hero {
  background: var(--pine-dark);
  color: var(--white);
  padding: 30px 20px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin: 0; }
.page-hero__img {
  max-width: 320px;
  margin: 14px auto 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 4px solid var(--white);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .92rem;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { box-shadow: var(--shadow-soft); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline--dark { color: var(--wine-dark); border-color: var(--wine-dark); }
.btn-outline--dark:hover { background: rgba(154,47,42,.08); }

/* ---------- Layout: main content ---------- */
main { display: block; }
.section { padding: 40px 0; }
.section--tight { padding: 24px 0; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--pine);
  margin-bottom: 6px;
}
.section-label::before { content: "◆"; color: var(--gold-dark); }

/* ---------- Cards / tickets ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 24px;
  margin-bottom: 20px;
  border-left: 5px solid var(--gold);
}
.card--wine { border-left-color: var(--wine); }
.card--pine { border-left-color: var(--pine); }
.card--sky { border-left-color: var(--sky); }
.card--gold { border-left-color: var(--gold-dark); }
.card h2, .card h3 { margin-top: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.nav-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
  border-top: 4px solid var(--pine);
}
.nav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.nav-card__icon { font-size: 1.6rem; }
.nav-card h3 { color: var(--wine-dark); margin: 8px 0 4px; }
.nav-card p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* ---------- Programme (jours) ---------- */
.programme { display: flex; flex-direction: column; gap: 14px; }
.programme__day {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
@media (max-width: 600px) {
  .programme__day { grid-template-columns: 1fr; }
}
.programme__day-label {
  background: var(--wine);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 1rem;
}
.programme__day-content { padding: 16px 18px; }
.programme__day-content ul { margin: 0; padding-left: 18px; }
.programme__day-content li { margin-bottom: 6px; }

/* ---------- Trophy / highlight ---------- */
.trophy-box {
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
  margin: 20px 0;
}
.trophy-box h2 { color: var(--wine-dark); }

/* ---------- Archives list ---------- */
.archive-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.archive-list a {
  background: var(--parchment-dark);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}
.archive-list a:hover { background: var(--gold); text-decoration: none; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.gallery-grid a {
  display: block;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.gallery-grid a:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 40, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Photo report (comptes-rendus de fête) ---------- */
.report-figure {
  margin: 0 0 22px;
  text-align: center;
}
.report-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin: 0 auto;
}
.report-figure figcaption {
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--wine-dark);
  margin-top: 8px;
}
.report-figure.two-up {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.report-figure.two-up img { flex: 1 1 260px; }

/* ---------- Links page ---------- */
.link-list { display: flex; flex-direction: column; gap: 16px; }
.link-list a { font-size: 1.05rem; font-weight: 600; }

/* ---------- Video embed ---------- */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 75%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin: 12px 0;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine-dark);
  color: var(--parchment-dark);
  margin-top: 40px;
}
.site-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
}
.site-footer a { color: var(--white); font-weight: 600; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
