/* =========================================================
   Thème Lumière — Clochu
   Couleurs et polices viennent des options du thème (variables CSS).
   ========================================================= */
:root {
  --primary: #1B2F7A;
  --accent: #E4572E;
  --dark: #141A33;
  --light: #EEF3FB;
  --paper: #FFFFFF;
  --ink: #1D2233;
  --muted: #5B6275;
  --line: #DCE2EE;
  --sun: #F2C230;
  --leaf: #2E8B57;
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--font-body);
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; color: var(--dark); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.pre { white-space: pre-line; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--dark); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Bande signature tap-tap ---------- */
.stripe { height: 10px; background: var(--accent); }
.stripes-taptap .stripe {
  height: 12px;
  background: linear-gradient(90deg,
    var(--primary) 0 22%, #fff 22% 23%,
    var(--accent) 23% 41%, #fff 41% 42%,
    var(--sun) 42% 56%, #fff 56% 57%,
    var(--leaf) 57% 68%, #fff 68% 69%,
    var(--accent) 69% 80%, #fff 80% 81%,
    var(--primary) 81% 100%);
}

/* ---------- Bandeau démo ---------- */
.demo-bar { background: var(--sun); color: #2a2200; text-align: center; font-size: .9rem; padding: 6px 16px; }

/* ---------- En-tête ---------- */
.site-header { background: var(--paper); position: relative; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--dark); min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.15; }
.brand-text span { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang a { padding: 5px 11px; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.lang a[aria-current] { background: var(--primary); color: #fff; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--dark); color: #fff;
  font: 600 .95rem var(--font-body); padding: 9px 14px; border-radius: 999px; cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -5px; } .menu-toggle span::after { top: 5px; }
.main-nav { display: none; border-top: 1px solid var(--line); }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0 auto; padding-top: 8px; padding-bottom: 12px; }
.main-nav a { display: block; padding: 10px 0; font-weight: 600; text-decoration: none; color: var(--dark); border-bottom: 1px solid var(--line); }
.main-nav a[aria-current="page"] { color: var(--accent); }
@media (min-width: 1000px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; }
  .main-nav ul { display: flex; flex-wrap: wrap; gap: 2px 22px; padding-top: 4px; padding-bottom: 10px; }
  .main-nav a { border: 0; padding: 6px 0; font-size: .97rem; position: relative; }
  .main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); border-radius: 2px; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font: 600 1rem var(--font-body);
  text-decoration: none; border: 2px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: #fff; color: var(--dark); border-color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--dark); }
.btn-light:hover { background: transparent; color: #fff; }
.btn-wa { background: #1F9D55; border-color: #1F9D55; color: #fff; }
.btn-wa:hover { background: #157443; border-color: #157443; color: #fff; }

/* ---------- Accueil : hero ---------- */
.hero { color: #fff; background: var(--primary); position: relative; overflow: hidden; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .tagline { font-style: italic; opacity: .92; max-width: 52ch; margin-bottom: 1.2em; }
.hero-lede { font-size: 1.15rem; max-width: 54ch; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.hero-inner { padding-top: clamp(48px, 9vw, 110px); padding-bottom: clamp(48px, 9vw, 110px); position: relative; }
.hero-photo { position: relative; }
.hero-photo { background-image: var(--hero); background-size: cover; background-position: center; }
.hero-photo .hero-inner { min-height: min(78vh, 680px); display: flex; align-items: flex-end; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,14,30,.15) 0%, rgba(10,14,30,.55) 55%, rgba(10,14,30,.85) 100%);
}
.hero-simple::after {
  /* grand cercle « soleil » derrière le titre */
  content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -160px; border-radius: 50%;
  background: var(--accent); opacity: .9;
}
.hero-simple .hero-inner { z-index: 1; }
.hero-split .hero-inner { display: grid; gap: 32px; align-items: center; }
.hero-pic img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: 14px 14px 0 var(--accent); }
@media (min-width: 900px) { .hero-split .hero-inner { grid-template-columns: 1.1fr 1fr; } }

/* ---------- Chiffres ---------- */
.stats-band { background: var(--dark); color: #fff; }
.stats { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; padding-top: 26px; padding-bottom: 26px; }
.stats li { padding: 10px 18px 10px 0; display: flex; flex-direction: column; }
.stats strong { font-family: var(--font-head); font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); line-height: 1; color: var(--sun); }
.stats span { opacity: .88; font-size: .97rem; margin-top: 6px; }

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 7vw, 84px) 0; }
.section-tint { background: var(--light); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; white-space: nowrap; }
.two-col { display: grid; gap: 40px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; } }

/* Programmes : liste avec trait de couleur, pas de cartes identiques */
.program-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--dark); }
@media (min-width: 760px) { .program-list { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.program a { display: block; padding: 22px 0 20px 22px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; }
.program a::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 26px; width: 6px; border-radius: 3px; background: var(--primary); }
.program-parrainage a::before { background: var(--accent); }
.program-jeunes a::before { background: var(--sun); }
.program-civ a::before { background: var(--leaf); }
.program h3 { margin-bottom: .3em; }
.program a:hover h3 { color: var(--accent); }
.program p { margin: 0; color: var(--muted); }

/* Événements */
.event-list { list-style: none; margin: 0; padding: 0; }
.event a { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.event a:hover strong { color: var(--accent); }
.datebox { flex: 0 0 64px; height: 70px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.datebox b { font: 800 1.7rem var(--font-head); }
.datebox span { font-size: .85rem; margin-top: 4px; }
.past .datebox { background: var(--muted); }
.event-body { display: flex; flex-direction: column; gap: 2px; }
.event-body strong { font-size: 1.1rem; }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent); }
.meta { color: var(--muted); font-size: .95rem; }
.event-when { display: flex; gap: 16px; align-items: center; font-weight: 600; }

/* Mot du directeur */
.word { background: var(--paper); border-radius: var(--radius); padding: 26px; border-left: 6px solid var(--accent); align-self: start; }
.word blockquote { margin: 0 0 12px; font-family: var(--font-head); font-size: 1.2rem; line-height: 1.4; color: var(--dark); }
.signature { font-weight: 700; }

/* Actualités */
.post-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card a { text-decoration: none; color: var(--ink); display: block; }
.post-card img, .post-card .noimg { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); margin-bottom: 12px; }
.post-card .noimg { display: block; background: linear-gradient(135deg, var(--light), var(--line)); }
.post-card h3 { margin: 4px 0 6px; }
.post-card a:hover h3 { color: var(--accent); }
.post-card p { color: var(--muted); margin: 0; }

/* Partenaires */
.partners-band h2 { font-size: 1.1rem; color: var(--muted); font-family: var(--font-body); }
.logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
.logos img { max-height: 56px; width: auto; filter: grayscale(1); opacity: .8; }
.logos span { font-weight: 700; color: var(--muted); }

/* Appel à l'action */
.cta-band { background: var(--primary); color: #fff; padding: clamp(40px, 6vw, 70px) 0; }
.cta-band h2 { color: #fff; }
.cta-inner { display: grid; gap: 22px; align-items: center; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 860px) { .cta-inner { grid-template-columns: 1.5fr 1fr; } .cta-actions { justify-content: flex-end; } }

/* ---------- Pages intérieures ---------- */
.page-head { background: var(--light); padding: clamp(36px, 6vw, 70px) 0 clamp(26px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); margin-bottom: .25em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.lede p:last-child { margin-bottom: 0; }
.page-body { padding-top: 36px; padding-bottom: 64px; }
.page-body.narrow { max-width: 780px; }
.block { margin-bottom: 44px; max-width: 760px; }
.note { background: var(--light); border-radius: var(--radius); padding: 22px 24px; }
.prose { max-width: 68ch; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.feature { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.mv { display: grid; gap: 28px; max-width: none; }
@media (min-width: 800px) { .mv { grid-template-columns: 1fr 1fr; } }
.person-word { display: grid; gap: 22px; align-items: start; max-width: 860px; }
.person-word img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
@media (min-width: 640px) { .person-word { grid-template-columns: 140px 1fr; } }

.program-row { display: grid; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.program-row img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (min-width: 760px) { .program-row { grid-template-columns: 300px 1fr; } .program-row:not(:has(img)) { grid-template-columns: 1fr; } }
.program-row h2 a { color: var(--dark); text-decoration: none; }

/* Groupes d'âge : une échelle (la progression est réelle) */
.domains { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.domains li { padding: 6px 14px; border-radius: 999px; background: var(--light); font-weight: 600; font-size: .95rem; }
.age-ladder { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.age-ladder li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.age { font: 800 1.15rem/1.2 var(--font-head); color: var(--primary); padding-top: 4px; }
.age-ladder li:nth-child(2n) .age { color: var(--accent); }
@media (max-width: 520px) { .age-ladder li { grid-template-columns: 1fr; gap: 4px; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filters a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink); }
.filters a[aria-current] { background: var(--dark); color: #fff; border-color: var(--dark); }
.page-body > h2 { margin-top: 10px; }
.event-list.past { opacity: .85; }

/* Équipe */
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.people li { display: flex; flex-direction: column; gap: 2px; }
.people img, .avatar { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 10px; }
.avatar { display: flex; align-items: center; justify-content: center; background: var(--light); color: var(--primary); font: 800 3rem var(--font-head); }
.role { color: var(--accent); font-weight: 600; }
.people p { color: var(--muted); font-size: .95rem; margin-top: 4px; }

/* Carrières */
.job-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--dark); }
.job-list a { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.job-list strong { font: 700 1.25rem var(--font-head); color: var(--dark); }
.job-list a:hover strong { color: var(--accent); }
.deadline { font-weight: 600; color: var(--accent); }
.job-layout, .contact-layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .job-layout { grid-template-columns: 1.4fr 1fr; } .contact-layout { grid-template-columns: 1fr 1.3fr; } }
.apply, .contact-form { background: var(--light); border-radius: var(--radius); padding: 24px; }
.empty-state { background: var(--light); border-radius: var(--radius); padding: 30px; max-width: 640px; }

/* Partenaires */
.partner-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 24px; }
.partner-list li { display: grid; grid-template-columns: 90px 1fr; gap: 20px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.partner-list li:not(:has(img)) { grid-template-columns: 1fr; }
.partner-list img { width: 90px; height: 90px; object-fit: contain; }
.become { max-width: 760px; }

/* Vidéos */
.video-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 30px; }
.video { margin: 0; }
.video-load, .video iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); background: var(--dark); position: relative; cursor: pointer; padding: 0; overflow: hidden; }
.video-load img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: var(--accent); }
.play::after { content: ""; position: absolute; left: 27px; top: 21px; border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.video figcaption { margin-top: 8px; font-weight: 600; }

/* Galerie */
.gallery { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 14px; }
.gallery li { break-inside: avoid; margin-bottom: 14px; }
.gallery img { border-radius: 8px; width: 100%; }
.gallery span { display: block; font-size: .9rem; color: var(--muted); margin-top: 4px; }

/* Formulaires publics */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: .95rem; }
.form input, .form textarea, .form select {
  font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #C5CCDB; border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus { border-color: var(--primary); outline: 2px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.row2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; }
.alert.success { background: #E3F4EA; color: #145232; }
.alert.error { background: #FCE6E2; color: #8A2414; }
.contact-info h2 { font-size: 1.05rem; font-family: var(--font-body); color: var(--muted); margin: 18px 0 4px; }

.pager { display: flex; gap: 20px; justify-content: center; margin-top: 30px; font-weight: 600; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--dark); color: #D9DDEA; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-name { font: 800 1.3rem var(--font-head); color: #fff; }
.footer-title { font-weight: 700; color: #fff; }
.socials, .footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* Bouton WhatsApp flottant */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%;
  background: #1F9D55; color: #fff; display: flex; align-items: center; justify-content: center; z-index: 20;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.wa-float:hover { color: #fff; background: #157443; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header, .site-footer, .wa-float, .demo-bar { display: none; } }

/* ---------- Blocs libres de l'accueil (v2) ---------- */
.free-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .free-grid { grid-template-columns: 1.2fr 1fr; } }
.free-block img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.style-teinte { background: var(--light); }
.style-couleur { background: var(--primary); color: #fff; }
.style-sombre { background: var(--dark); color: #E6E9F2; }
.style-couleur h2, .style-sombre h2, .style-couleur a:not(.btn), .style-sombre a:not(.btn) { color: #fff; }
.cal-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-links .btn { padding: 8px 14px; font-size: .92rem; }

/* Taille par défaut des icônes (extensions, blocs) — spécificité nulle, chaque thème peut la changer */
:where(.ic, .mi, .bi, .ti, .fi, .ei, .pi) { display: inline-block; vertical-align: -0.16em; flex-shrink: 0; width: 1.15em; height: 1.15em; }
:where(.mi) { width: 1em; height: 1em; }
