/* =====================================================================
   2CV Club Varois — feuille de style principale
   Palette : Ivoire / Vert Embrun + accents Arlequin (rouge, jaune, bleu)
   Typos   : Anton (titres affiche) · Archivo (titres & texte)
   ===================================================================== */

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Tokens ---------- */
:root {
  --ivoire: #FBF7EE;
  --ivoire-2: #F3ECDC;
  --vert: #1C5240;
  --vert-fonce: #123A2C;
  --encre: #2A2723;
  --rouge: #C63F2E;
  --jaune: #EBB43C;
  --bleu: #3C7EA0;
  --ligne: #E2DAC8;
  --sourdine: #6E675A;

  --max: 1180px;
  --r: 16px;
  --r-s: 10px;
  --shadow: 0 18px 40px -24px rgba(42,39,35,.5);

  --ff-display: "Anton", "Archivo", system-ui, sans-serif;
  --ff-text: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
body {
  font-family: var(--ff-text);
  color: var(--encre);
  background: var(--ivoire);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.08; font-weight: 700; }
p { max-width: 68ch; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }

/* ---------- Bande Arlequin (motif récurrent) ---------- */
.harlequin-bar { height: 6px; display: flex; }
.harlequin-bar > span { flex: 1; }
.harlequin-bar > span:nth-child(1) { background: var(--rouge); }
.harlequin-bar > span:nth-child(2) { background: var(--jaune); }
.harlequin-bar > span:nth-child(3) { background: var(--vert); }
.harlequin-bar > span:nth-child(4) { background: var(--bleu); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,247,238,.9);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--ligne);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand svg, .brand img { width: 74px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--ff-display); font-size: 1.35rem; letter-spacing: .02em; color: var(--vert); }
.brand-sub { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sourdine); margin-top: 3px; }

.nav-list { list-style: none; display: flex; align-items: center; gap: .3rem; padding: 0; }
.nav-list a {
  text-decoration: none; font-weight: 600; font-size: .96rem;
  padding: .55rem .8rem; border-radius: 999px; color: var(--encre);
  transition: background-color .18s ease, color .18s ease;
}
.nav-list a:hover { background: var(--ivoire-2); }
.nav-list a[aria-current="page"] { color: #fff; background: var(--vert); }

.nav-cta { margin-left: .5rem; }

.nav-toggle {
  display: none; border: 1.5px solid var(--encre); background: transparent;
  border-radius: 10px; padding: .5rem .7rem; align-items: center; gap: .5rem; font-weight: 600;
}
.nav-toggle .bars { display: inline-block; width: 20px; height: 2px; background: var(--encre); position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--encre); }
.nav-toggle .bars::before { top: -6px; } .nav-toggle .bars::after { top: 6px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-weight: 700; font-size: .98rem; padding: .8rem 1.35rem; border-radius: 999px;
  border: 2px solid transparent; transition: transform .12s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--vert); color: #fff; }
.btn--primary:hover { background: var(--vert-fonce); }
.btn--ghost { background: transparent; color: var(--vert); border-color: var(--vert); }
.btn--ghost:hover { background: var(--vert); color: #fff; }
.btn--jaune { background: var(--jaune); color: var(--encre); }
.btn--jaune:hover { background: #e0a521; }

/* ---------- Hero (accueil) ---------- */
.hero { background: var(--ivoire); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--vert);
  background: #fff; border: 1px solid var(--ligne); padding: .35rem .85rem; border-radius: 999px; font-size: .85rem; }
.hero-kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rouge); }
.hero h1 {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(2.7rem, 7.5vw, 5.4rem); letter-spacing: .01em;
  margin-top: 1rem; color: var(--encre);
}
.hero h1 .vert { color: var(--vert); }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--sourdine); margin-top: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-art { position: relative; }
.hero-art .road { position: absolute; left: -6%; right: -6%; bottom: 8%; height: 3px;
  background: repeating-linear-gradient(90deg, var(--ligne) 0 22px, transparent 22px 40px); }
.hero-art svg, .hero-art img { position: relative; width: 100%; }

.hero-strip { display: flex; gap: 0; }

/* ---------- Page-hero (pages intérieures) ---------- */
.page-hero { background: var(--vert); color: #fff; }
.page-hero .container { padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero .crumb { font-size: .85rem; color: #cfe3da; letter-spacing: .06em; }
.page-hero .crumb a { color: #cfe3da; text-decoration: none; }
.page-hero .crumb a:hover { text-decoration: underline; }
.page-hero h1 { font-family: var(--ff-display); font-weight: 400; font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin-top: .5rem; letter-spacing: .01em; }
.page-hero p { color: #dbe9e2; margin-top: .7rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.6rem, 6vw, 4.6rem); }
.section--alt { background: var(--ivoire-2); }
.section--vert { background: var(--vert); color: #fff; }
.section--vert .section-title { color: #fff; }
.section--vert p { color: #dbe9e2; }

.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-title { font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.7rem); letter-spacing: .01em; color: var(--encre); }
.section-title .tick { color: var(--rouge); }
.section-lead { color: var(--sourdine); margin-top: .6rem; }

/* ---------- Grilles de cartes ---------- */
.grid { display: grid; gap: 1.3rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--r);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem;
}
.card h3 { font-size: 1.2rem; }
.card p { color: var(--sourdine); font-size: .98rem; }
.card .card-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: .3rem; }
.card .card-ico svg { width: 24px; height: 24px; }
.ico-rouge { background: #f7e0dc; color: var(--rouge); }
.ico-jaune { background: #f8eccd; color: #b07d10; }
.ico-bleu  { background: #dce8ef; color: var(--bleu); }
.ico-vert  { background: #d8e6df; color: var(--vert); }
.card .card-link { margin-top: auto; font-weight: 700; color: var(--vert); text-decoration: none; padding-top: .4rem; }
.card .card-link:hover { text-decoration: underline; }

/* ---------- Événements ---------- */
.event {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center;
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--r); padding: 1.2rem 1.4rem;
}
.event-date {
  background: var(--vert); color: #fff; border-radius: 12px; text-align: center;
  padding: .5rem .8rem; min-width: 74px;
}
.event-date .m { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.event-date .d { display: block; font-family: var(--ff-display); font-size: 2rem; line-height: 1; }
.event h3 { font-size: 1.2rem; }
.event .when { color: var(--sourdine); font-size: .95rem; }

/* ---------- Liste de documents ---------- */
.doclist { list-style: none; padding: 0; display: grid; gap: .7rem; }
.doclist a {
  display: flex; align-items: center; gap: .9rem; text-decoration: none;
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--r-s); padding: .95rem 1.1rem;
  font-weight: 600; transition: border-color .18s ease, background-color .18s ease;
}
.doclist a:hover { border-color: var(--vert); background: var(--ivoire-2); }
.doclist .pdf { flex: none; width: 34px; height: 34px; border-radius: 8px; background: #f7e0dc; color: var(--rouge); display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.doclist .chev { margin-left: auto; color: var(--vert); }

/* ---------- Étapes numérotées (adhésion) ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 1.1rem; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--r); padding: 1.3rem 1.4rem;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  font-family: var(--ff-display); font-size: 1.5rem; color: #fff; background: var(--vert);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
}
.steps h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.steps p { color: var(--sourdine); font-size: .98rem; }

/* ---------- Encadré infos ---------- */
.callout {
  background: #fff; border: 1px solid var(--ligne); border-left: 6px solid var(--jaune);
  border-radius: var(--r); padding: 1.4rem 1.5rem;
}
.callout h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.callout .iban { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--ivoire-2); padding: .5rem .7rem; border-radius: 8px; display: inline-block; letter-spacing: .04em; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery figure { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--ligne); background: var(--ivoire-2); aspect-ratio: 4 / 3; margin: 0; }
.gallery figure svg { width: 100%; height: 100%; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem .9rem;
  background: linear-gradient(180deg, transparent, rgba(18,58,44,.85)); color: #fff; font-weight: 600; font-size: .95rem;
}

/* ---------- Bloc contact / infos club ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.info-line { display: flex; gap: .8rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px dashed var(--ligne); }
.info-line:last-child { border-bottom: 0; }
.info-line .k { font-weight: 700; min-width: 108px; color: var(--vert); }
.info-line a { color: var(--encre); }

/* ---------- Formulaire ---------- */
.form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--ligne); border-radius: var(--r); padding: clamp(1.3rem, 3vw, 2rem); }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field .req { color: var(--rouge); }
.field input, .field textarea {
  font: inherit; padding: .8rem .9rem; border: 1.5px solid var(--ligne); border-radius: var(--r-s);
  background: var(--ivoire); color: var(--encre); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(28,82,64,.15); }
.field textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form-note { font-size: .88rem; color: var(--sourdine); }
.form-status { border-radius: var(--r-s); padding: .8rem 1rem; font-weight: 600; display: none; }
.form-status.ok { display: block; background: #d8e6df; color: var(--vert-fonce); }
.form-status.err { display: block; background: #f7e0dc; color: #8f2114; }

/* ---------- CTA bande ---------- */
.cta-band { background: var(--vert); color: #fff; border-radius: var(--r); padding: clamp(1.6rem, 4vw, 2.6rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.cta-band h2 { font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.cta-band p { color: #dbe9e2; margin-top: .3rem; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--vert-fonce); color: #cfe0d8; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 3rem; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #cfe0d8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: #a9c1b7; margin-top: .8rem; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; font-size: .85rem; color: #9fb8ae; }

/* ---------- Utilitaires ---------- */
.stack-lg > * + * { margin-top: 1.1rem; }
.muted { color: var(--sourdine); }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mt-1 { margin-top: 1rem; } .mt-3 { margin-top: 3rem; }
.prose p + p { margin-top: 1rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; padding: .25rem .6rem; border-radius: 999px; background: var(--ivoire-2); color: var(--vert); border: 1px solid var(--ligne); }

/* ---------- Reveal (une seule animation d'entrée) ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

/* ---------- Accessibilité ---------- */
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; background: var(--vert); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { position: fixed; inset: 74px 0 auto 0; background: var(--ivoire);
    border-bottom: 1px solid var(--ligne); box-shadow: var(--shadow);
    transform: translateY(-140%); transition: transform .28s ease; }
  .nav.open { transform: translateY(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: .2rem; padding: 1rem clamp(1.1rem,4vw,2.5rem) 1.4rem; }
  .nav-list a { padding: .85rem .9rem; border-radius: 12px; font-size: 1.05rem; }
  .nav-cta { margin: .4rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .brand svg, .brand img { width: 60px; }
  .brand-name { font-size: 1.15rem; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
  .event { grid-template-columns: 1fr; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
