/* =====================================================================
   Miss & Mister Neuchâtel — Fête des Vendanges
   Design system : éditorial, sobre & class
   Palette moodboard 2025 : alabaster / powder blue / persimmon / lion
   ===================================================================== */

:root {
  /* --- Couleurs de marque (moodboard) --- */
  --alabaster: #ebebdf;
  --powder-blue: #aac4e7;
  --persimmon: #e9631a;
  --lion: #c19570;

  /* --- Tokens dérivés --- */
  --paper: #f6f5ee;          /* fond principal, alabaster éclairci */
  --paper-2: var(--alabaster); /* sections alternées */
  --ink: #1c1b19;            /* texte / quasi-noir chaud */
  --ink-soft: #57544e;       /* texte secondaire */
  --rule: rgba(28, 27, 25, 0.14); /* filets fins */
  --accent: var(--persimmon);
  --accent-soft: rgba(233, 99, 26, 0.10);

  /* --- Typographie --- */
  --font-display: "Bodoni Moda", "Didot", Georgia, serif;
  --font-sans: "Jost", "Century Gothic", system-ui, sans-serif;
  --font-script: "Parisienne", "Brush Script MT", cursive;

  --maxw: 1200px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
}

/* =====================================================================
   Reset léger
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; }

/* =====================================================================
   Utilitaires
   ===================================================================== */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--accent);
}
.section--ink .eyebrow { color: var(--lion); }
.section--ink .eyebrow::before { background: var(--lion); }

.section-title {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.9rem);
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.lead {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 58ch;
  font-weight: 300;
}
.section--ink .lead { color: rgba(246, 245, 238, 0.78); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1rem 1.8rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .35s ease, color .35s ease, border-color .35s ease, transform .35s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: #cf520f; border-color: #cf520f; color: #fff; }
.btn--ghost-light { border-color: rgba(246,245,238,.4); color: var(--paper); }
.btn--ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* =====================================================================
   Logo (recréé en typographie — variantes)
   ===================================================================== */
.logo { display: inline-flex; align-items: baseline; gap: .45rem; line-height: 1; color: inherit; }
.logo .l-script { font-family: var(--font-script); font-size: 1.9em; line-height: 0; transform: translateY(.08em); }
.logo .l-amp { font-family: var(--font-display); font-size: 1.05em; font-weight: 400; }
.logo .l-mister { font-family: var(--font-sans); font-weight: 300; letter-spacing: .12em; text-transform: uppercase; font-size: 1em; }

/* Logo officiel (SVG extrait du PDF) */
.brand-logo { height: 34px; width: auto; display: block; transition: height .4s ease; }
.site-header.scrolled .brand-logo { height: 28px; }
.hero-logo { width: min(560px, 84vw); height: auto; margin-inline: auto; display: block; }
.footer-logo { width: 220px; max-width: 62%; height: auto; display: block; margin-bottom: 1.2rem; filter: invert(1); }

/* Lockup vertical (hero) */
.lockup { text-align: center; color: var(--ink); }
.lockup .lk-top { display: flex; align-items: center; justify-content: center; gap: .25em; }
.lockup .lk-miss { font-family: var(--font-script); font-size: clamp(4rem, 3rem + 11vw, 11rem); line-height: .8; }
.lockup .lk-amp { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 4vw, 4.5rem); font-weight: 400; transform: translateY(.12em); }
.lockup .lk-mister { font-family: var(--font-sans); font-weight: 200; text-transform: uppercase; letter-spacing: .14em; font-size: clamp(2.1rem, 1.4rem + 5.5vw, 6rem); line-height: 1; margin-top: -.15em; }
.lockup .lk-place { font-family: var(--font-sans); font-weight: 300; text-transform: uppercase; letter-spacing: .42em; font-size: clamp(.8rem, .6rem + 1.4vw, 1.5rem); margin-top: 1rem; padding-left: .42em; color: var(--ink-soft); }

/* =====================================================================
   Header / navigation
   ===================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
.site-header.scrolled {
  background: rgba(246, 245, 238, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--rule);
  padding-block: .75rem;
}
.brand { font-size: 1.05rem; letter-spacing: .02em; }
.brand .l-script { font-size: 1.7em; }
.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a {
  font-size: .78rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  position: relative; padding-block: .3rem; color: var(--ink);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--accent); transition: width .3s ease;
}
.nav a:hover::after { width: 100%; }
.nav .btn { padding: .65rem 1.3rem; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .3s, opacity .3s; }

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 7rem var(--gutter) 4rem;
  position: relative;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(170,196,231,.28), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(193,149,112,.22), transparent 50%),
    var(--paper);
  overflow: hidden;
}
.hero__tag {
  font-size: .76rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 2.4rem; display: flex; gap: 1rem; align-items: center;
}
.hero__tag b { color: var(--accent); font-weight: 500; }
.hero__sub {
  margin-top: 2.4rem; max-width: 46ch; color: var(--ink-soft);
  font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); font-weight: 300;
}
.hero__date {
  margin-top: 1.8rem; font-size: clamp(.95rem, .9rem + .3vw, 1.1rem); color: var(--ink);
  letter-spacing: .02em; line-height: 1.6;
}
.hero__date strong { font-weight: 500; }
.hero__date .cue { color: var(--accent); font-style: italic; font-family: var(--font-display); }
.hero__cta { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.scroll-cue::after { content: ""; width: 1px; height: 38px; background: var(--ink-soft); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(.4); opacity:.4 } 50% { transform: scaleY(1); opacity:1 } }

/* =====================================================================
   Concours — texte + valeurs
   ===================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.values { display: grid; gap: 1.4rem; margin-top: 2.2rem; }
.value {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start;
  padding-bottom: 1.4rem; border-bottom: 1px solid var(--rule);
}
.value:last-child { border-bottom: 0; }
.value .num { font-family: var(--font-display); font-size: 1.2rem; color: var(--accent); }
.value h4 { font-family: var(--font-sans); font-weight: 500; letter-spacing: .04em; font-size: 1.05rem; margin-bottom: .3rem; }
.value p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* Stats / chiffres clés */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 4rem; }
.stat { text-align: center; }
.stat .n { font-family: var(--font-display); font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); line-height: 1; }
.stat .l { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-top: .6rem; }
.section--ink .stat .l { color: rgba(246,245,238,.6); }

/* =====================================================================
   Candidat·e·s — grilles
   ===================================================================== */
.cast-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.cast-sub { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); margin-bottom: 1.5rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); }
.grid-cast {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem);
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease;
  display: flex; flex-direction: column;
}
.section--tint .card { background: #fff; }
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(28,27,25,.4); }
.card__photo {
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--alabaster), var(--lion));
}
.card--blue .card__photo { background: linear-gradient(150deg, var(--alabaster), var(--powder-blue)); }
.card__photo .initial { font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 6rem); color: rgba(255,255,255,.85); }
.card__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__crown {
  position: absolute; top: 1rem; left: 1rem;
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
  background: var(--ink); color: var(--paper); padding: .4rem .8rem; border-radius: 999px;
}
.card--winner .card__crown { background: var(--accent); color: #fff; }
.card__body { padding: 1.4rem 1.5rem 1.7rem; }
.card__name { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .25rem; }
.card__role { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.card__bio { margin: .9rem 0 0; font-size: .92rem; line-height: 1.6; color: var(--ink-soft); }

/* Sponsors principaux */
.sponsor-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem;
  margin: 3rem auto 0; max-width: 1000px;
}
.sponsor {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 120px; padding: 1.5rem 1rem; background: #fff;
  border: 1px solid var(--rule); border-radius: 4px;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-soft);
  transition: transform .3s, box-shadow .3s;
}
.sponsor:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -22px rgba(28,27,25,.45); }
.sponsor img { max-height: 60px; max-width: 85%; width: auto; object-fit: contain; }
@media (max-width: 760px) { .sponsor-grid { grid-template-columns: repeat(2, 1fr); } }

/* Page partenaires — liste complète */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; margin: 2.5rem 0 0; }
.plist .p {
  background: #fff; border: 1px solid var(--rule); border-radius: 6px;
  padding: 1rem 1.2rem; font-size: 1rem; color: var(--ink);
  display: flex; align-items: center; min-height: 64px;
}
.page-head { padding-top: clamp(6rem, 12vh, 9rem); }

/* =====================================================================
   Palmarès
   ===================================================================== */
.podium { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 1rem; }
.podium h3 { font-size: 1rem; font-family: var(--font-sans); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--lion); margin-bottom: 1.5rem; }
.winner-line { display: flex; align-items: baseline; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(246,245,238,.16); }
.winner-line .rank { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(246,245,238,.55); min-width: 9.5rem; }
.winner-line .who { font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); }
.winner-line.is-top .who { color: var(--lion); }

/* =====================================================================
   Programme / timeline
   ===================================================================== */
.timeline { display: grid; gap: 0; margin-top: 1rem; }
.tl-item {
  display: grid; grid-template-columns: 10rem 1fr; gap: 2rem;
  padding: 1.8rem 0; border-top: 1px solid var(--rule); align-items: baseline;
}
.tl-item:last-child { border-bottom: 1px solid var(--rule); }
.tl-date { font-family: var(--font-display); font-size: 1.15rem; color: var(--accent); }
.tl-body h4 { font-family: var(--font-sans); font-weight: 500; font-size: 1.1rem; letter-spacing: .02em; margin-bottom: .3rem; }
.tl-body p { margin: 0; color: var(--ink-soft); }

/* =====================================================================
   Partenaires
   ===================================================================== */
.partners { display: flex; flex-wrap: wrap; gap: 1rem 3rem; align-items: center; justify-content: center; margin-top: 3rem; }
.partners span {
  font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem);
  color: var(--ink-soft); opacity: .7; transition: opacity .3s, color .3s;
}
.partners span:hover { opacity: 1; color: var(--ink); }

/* =====================================================================
   CTA bandeau
   ===================================================================== */
.cta-band { text-align: center; }
.cta-band .lk-place { color: rgba(246,245,238,.6); }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--ink); color: rgba(246,245,238,.75); padding-block: clamp(3rem, 6vw, 5rem); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; }
.site-footer .brand { color: var(--paper); margin-bottom: 1.2rem; }
.site-footer h5 { font-family: var(--font-sans); font-weight: 500; letter-spacing: .18em; text-transform: uppercase; font-size: .74rem; color: var(--lion); margin: 0 0 1.2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.site-footer a:hover { color: var(--paper); }
.footer-bottom {
  margin-top: 3.5rem; padding-top: 1.8rem; border-top: 1px solid rgba(246,245,238,.14);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: rgba(246,245,238,.5);
}

/* =====================================================================
   Animations au scroll
   ===================================================================== */
/* Le contenu reste visible si le JS ne tourne pas (ex. ouverture en file://).
   L'effet ne s'active que lorsque <html> reçoit la classe .js (voir <head>). */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .grid-cast { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .podium { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .winner-line .rank { min-width: 7rem; }

  .nav {
    position: fixed; inset: 0 0 0 auto; height: 100dvh; width: min(78vw, 320px);
    background: var(--paper); flex-direction: column; align-items: flex-start;
    justify-content: center; gap: 1.8rem; padding: 2rem 2.4rem;
    transform: translateX(100%); transition: transform .4s ease;
    box-shadow: -10px 0 40px -20px rgba(0,0,0,.4);
    z-index: 55;
  }
  .nav.open { transform: none; }
  /* Quand le menu est ouvert : retirer le backdrop-filter de l'en-tête,
     sinon il confine le menu fixe (panneau transparent / tronqué). */
  .site-header.menu-open { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .nav-toggle { display: block; z-index: 60; }
  .site-header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 700px) {
  .scroll-cue { display: none; }
  .hero { min-height: auto; padding-bottom: 3rem; }
}
/* Écrans peu hauts (petits portables) : le repère décoratif chevaucherait les boutons */
@media (max-height: 860px) {
  .scroll-cue { display: none; }
}
@media (max-width: 540px) {
  .grid-cast { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: .4rem; }
  .hero__tag { flex-direction: column; gap: .5rem; }
}
