/* ==========================================================================
   Les Petits Minots — feuille de style
   Charte : Vert #9DAC93 · Terracotta #E67261 · Orange #FFA400 · Bleu #518AAA
   Police titres : Krungthep (repli : polices arrondies système)
   ========================================================================== */

:root {
  --green: #9DAC93;
  --green-600: #7C8D71;
  --green-800: #4A5942;
  --green-100: #E4EADF;
  --green-50: #F2F5EF;
  --terra: #E67261;
  --terra-700: #B3473A;
  --terra-50: #FCEEEB;
  --orange: #FFA400;
  --orange-800: #7F5200;
  --orange-50: #FFF5E0;
  --blue: #518AAA;
  --blue-700: #386783;
  --blue-50: #EAF2F7;
  --wa: #128C4A;

  --ink: #2B3528;
  --ink-2: #566151;
  --ink-3: #7A8475;
  --line: #E6E1D6;
  --bg: #FBF8F2;
  --card: #FFFFFF;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(43, 53, 40, .06), 0 8px 24px rgba(43, 53, 40, .07);
  --shadow-lg: 0 2px 4px rgba(43, 53, 40, .06), 0 18px 40px rgba(43, 53, 40, .12);
  --font-display: "Krungthep", "Arial Rounded MT Bold", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
main { flex: 1; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-underline-offset: 3px; }
a:hover { color: var(--terra-700); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; color: var(--green-800); letter-spacing: .01em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; color: #fff; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 242, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--green-100); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; color: var(--green-800); font-size: 1.12rem; letter-spacing: .02em; }
.brand-sub { font-size: .78rem; color: var(--ink-3); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.site-nav a:hover { background: var(--green-50); color: var(--green-800); }
.site-nav a[aria-current="page"] { background: var(--green-100); color: var(--green-800); }
.site-nav a.nav-cta { background: var(--wa); color: #fff; }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta[aria-current="page"] { background: #0D7239; color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 919px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none; padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 13px 14px; border-radius: 12px; font-size: 1.02rem; }
  .site-nav a.nav-cta { text-align: center; margin-top: 6px; }
}

/* ---------- Boutons ---------- */
.btn {
  --b: var(--terra-700); --c: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--b);
  background: var(--b); color: var(--c); font: 700 1rem/1.2 var(--font-body); text-decoration: none;
  cursor: pointer; transition: transform .12s, background-color .15s, box-shadow .15s; text-align: center;
}
.btn:hover { color: var(--c); filter: brightness(.95); box-shadow: 0 4px 14px rgba(43,53,40,.15); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-green { --b: var(--green-800); }
.btn-blue { --b: var(--blue-700); }
.btn-wa { --b: var(--wa); }
.btn-ghost { background: transparent; color: var(--green-800); border-color: var(--green-600); }
.btn-ghost:hover { background: var(--green-50); color: var(--green-800); }
.btn-light { --b: #fff; --c: var(--green-800); }
.btn-danger-ghost { background: transparent; color: var(--terra-700); border-color: #E8B4AB; }
.btn-danger-ghost:hover { background: var(--terra-50); color: var(--terra-700); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-700); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Sections génériques ---------- */
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }
.section-alt { background: var(--green-50); }
.section-head { margin-bottom: 28px; max-width: 720px; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--terra-700); margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 0; border-top: 3px dotted currentColor; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }

.page-hero { padding: 48px 0 28px; position: relative; overflow: hidden; }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { max-width: 60ch; }
.page-hero::after {
  content: ""; position: absolute; right: -120px; top: -140px; width: 360px; height: 360px; border-radius: 50%;
  border: 3px dashed var(--green-100); pointer-events: none;
}

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-dashed { border: 2px dashed var(--green-100); box-shadow: none; background: #fff; }
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: var(--green-100); color: var(--green-800); white-space: nowrap;
}
.badge-terra { background: var(--terra-50); color: var(--terra-700); }
.badge-orange { background: var(--orange-50); color: var(--orange-800); }
.badge-blue { background: var(--blue-50); color: var(--blue-700); }
.badge-grey { background: #EEECE7; color: var(--ink-2); }

.icon-bubble {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--green-100); color: var(--green-800);
}
.icon-bubble svg { width: 26px; height: 26px; }
.icon-bubble.terra { background: var(--terra-50); color: var(--terra-700); }
.icon-bubble.orange { background: var(--orange-50); color: var(--orange-800); }
.icon-bubble.blue { background: var(--blue-50); color: var(--blue-700); }

/* ---------- Accueil ---------- */
.hero { padding: 40px 0 56px; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.2fr .8fr; } .hero { padding: 64px 0 80px; } }
.hero h1 { max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--terra-700); }
.hero-visual { position: relative; justify-self: center; width: min(360px, 78vw); aspect-ratio: 1; }
.hero-visual .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px dashed var(--green); animation: spin 90s linear infinite; }
.hero-visual .disc { position: absolute; inset: 7%; border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.hero-visual .disc img { width: 88%; }
.hero-visual .dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; }
.hero-visual .d1 { background: var(--terra); top: 6%; right: 8%; }
.hero-visual .d2 { background: var(--orange); bottom: 12%; left: 0; width: 26px; height: 26px; }
.hero-visual .d3 { background: var(--blue); bottom: 2%; right: 18%; width: 12px; height: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 880px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); border-top: 5px solid var(--green); }
.stat:nth-child(2) { border-color: var(--terra); } .stat:nth-child(3) { border-color: var(--orange); } .stat:nth-child(4) { border-color: var(--blue); }
.stat-value { font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); color: var(--ink); font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--ink-2); font-size: .92rem; margin-top: 4px; }

.upcoming-list { display: grid; gap: 16px; }
@media (min-width: 880px) { .upcoming-list { grid-template-columns: repeat(3, 1fr); } }
.mini-event { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.mini-event:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.mini-event h3 { margin: 0; }
.mini-event-top { display: flex; gap: 14px; align-items: center; }

.news-list { display: grid; gap: 16px; }
@media (min-width: 880px) { .news-list { grid-template-columns: repeat(2, 1fr); } }
.news-item time { font-size: .85rem; color: var(--terra-700); font-weight: 700; }
.news-item h3 { margin: 4px 0 8px; }
.news-body { color: var(--ink-2); white-space: pre-line; }
.news-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.cta-band {
  background: var(--green-800); color: #fff; border-radius: 28px; padding: 32px 24px;
  display: grid; gap: 20px; align-items: center; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #E4EADF; }
.cta-band::after { content: ""; position: absolute; width: 240px; height: 240px; right: -70px; bottom: -110px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.3); }
@media (min-width: 880px) { .cta-band { grid-template-columns: 1fr auto; padding: 40px 48px; } }

/* ---------- Date badge & jauges ---------- */
.date-badge {
  flex: none; width: 62px; border-radius: 14px; overflow: hidden; text-align: center; background: #fff;
  box-shadow: 0 0 0 2px var(--green-100); line-height: 1.1;
}
.date-badge .m { display: block; background: var(--terra); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; }
.date-badge .d { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); padding: 4px 0 0; font-weight: 700; }
.date-badge .w { display: block; font-size: .7rem; color: var(--ink-3); padding-bottom: 5px; text-transform: capitalize; }

.gauge { height: 10px; border-radius: 999px; background: #EEEAE1; overflow: hidden; }
.gauge > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width .4s ease; }
.gauge.is-mid > span { background: var(--orange); }
.gauge.is-low > span { background: var(--terra); }
.gauge.is-full > span { background: var(--green-800); }
.gauge-sm { height: 6px; }
.gauge-legend { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--ink-2); margin-top: 6px; flex-wrap: wrap; }
.gauge-legend strong { color: var(--ink); }

/* ---------- Calendrier ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; align-items: center; }
.chip-filter {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: 600 .92rem var(--font-body);
  color: var(--ink-2); cursor: pointer; min-height: 40px;
}
.chip-filter[aria-pressed="true"] { border-color: var(--green-800); background: var(--green-800); color: #fff; }
.how-strip { display: grid; gap: 10px; margin-bottom: 24px; counter-reset: how; }
@media (min-width: 720px) { .how-strip { grid-template-columns: repeat(3, 1fr); } }
.how-strip li {
  list-style: none; display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 12px 14px;
  border: 1px solid var(--line); font-size: .95rem; color: var(--ink-2);
}
.how-strip li::before {
  counter-increment: how; content: counter(how); flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--orange); color: var(--ink); font-weight: 800; display: grid; place-items: center;
}
.how-strip { padding: 0; }

.event-list { display: grid; gap: 22px; }
.event-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.event-card.is-highlight { box-shadow: 0 0 0 3px var(--orange), var(--shadow-lg); }
.event-header {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px; width: 100%; text-align: left;
  background: none; border: 0; font: inherit; color: inherit; cursor: pointer;
}
.event-header:hover .event-title { color: var(--terra-700); }
.event-main { flex: 1; min-width: 0; }
.event-title { font-size: 1.25rem; margin: 0 0 4px; transition: color .15s; }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: .92rem; }
.event-meta span { display: inline-flex; align-items: center; gap: 5px; }
.event-meta svg { width: 16px; height: 16px; flex: none; color: var(--green-600); }
.event-progress { margin-top: 12px; max-width: 420px; }
.event-chevron { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green-800); transition: transform .2s; margin-top: 4px; }
.event-chevron svg { width: 20px; height: 20px; }
.event-card.is-open .event-chevron { transform: rotate(180deg); }
.event-body { padding: 0 20px 22px; border-top: 1px dashed var(--line); }
.event-desc { color: var(--ink-2); white-space: pre-line; margin: 16px 0 0; }

.mine-banner {
  margin-top: 16px; background: var(--blue-50); border: 1px solid #CFE0EA; border-radius: 14px; padding: 12px 14px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
}
.mine-banner p { margin: 0; color: var(--blue-700); font-weight: 600; }
.mine-banner .btn-row { gap: 8px; }
.edit-banner {
  margin-top: 16px; background: var(--orange-50); border: 2px solid var(--orange); border-radius: 14px; padding: 12px 14px;
  font-weight: 600; color: var(--orange-800);
}

.need { margin-top: 24px; }
.need-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; }
.need-head h4 { font-family: var(--font-display); font-size: 1.08rem; margin: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.need-head h4 .kind-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--blue); flex: none; }
.need.item .need-head h4 .kind-dot { background: var(--orange); border-radius: 50%; }
.need-sub { font-size: .88rem; color: var(--ink-3); }
.need-desc { font-size: .92rem; color: var(--ink-2); margin: -4px 0 12px; white-space: pre-line; }

.slot-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .slot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .slot-grid { grid-template-columns: repeat(3, 1fr); } }
.slot {
  position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%;
  background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px 12px; cursor: pointer;
  font: inherit; color: inherit; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.slot:hover:not([disabled]) { border-color: var(--green); box-shadow: 0 4px 14px rgba(43,53,40,.08); }
.slot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slot-time { font-weight: 800; font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.slot-count { font-size: .82rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.slot-names { display: flex; flex-wrap: wrap; gap: 5px; min-height: 26px; }
.slot-cta {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--terra-700);
}
.slot-cta .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid currentColor; display: grid; place-items: center; flex: none; }
.slot-cta .box svg { width: 14px; height: 14px; opacity: 0; }
.slot.is-selected { border-color: var(--terra-700); background: var(--terra-50); }
.slot.is-selected .slot-cta .box { background: var(--terra-700); border-color: var(--terra-700); color: #fff; }
.slot.is-selected .slot-cta .box svg { opacity: 1; }
.slot.is-selected .slot-cta { color: var(--terra-700); }
.slot.is-full { background: #F6F4EF; cursor: default; }
.slot.is-full .slot-cta { color: var(--green-800); }
.slot.is-mine:not(.is-editing) { border-color: var(--blue); background: var(--blue-50); }
.name-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--green-50);
  color: var(--green-800); font-size: .82rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.name-chip.is-me { background: var(--blue); color: #fff; }
.name-chip.empty { background: transparent; color: var(--ink-3); font-weight: 500; padding-left: 0; font-style: italic; }
.name-chip.placeholder { border: 1.5px dashed var(--line); background: transparent; color: var(--ink-3); }

.item-card { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 12px; }
.item-card.is-selected { border-color: var(--terra-700); background: var(--terra-50); }
.item-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.item-givers { display: flex; flex-wrap: wrap; gap: 5px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.stepper button {
  width: 44px; height: 42px; border: 0; background: transparent; font-size: 1.4rem; font-weight: 700; color: var(--green-800); cursor: pointer;
}
.stepper button:hover:not([disabled]) { background: var(--green-50); }
.stepper button[disabled] { color: #C9C5BB; cursor: not-allowed; }
.stepper output { min-width: 42px; text-align: center; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.item-label-pick { font-weight: 700; color: var(--ink-2); font-size: .92rem; }

.flex-card { margin-top: 24px; border: 2px dashed var(--blue); background: var(--blue-50); border-radius: 16px; padding: 14px 16px; }
.flex-card.is-selected { border-style: solid; }
.flex-card h4 { font-family: var(--font-display); font-size: 1.05rem; color: var(--blue-700); margin: 0 0 4px; }
.flex-card p { margin: 0 0 10px; font-size: .92rem; color: var(--ink-2); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; color: var(--ink); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: #CFCBC1; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--blue-700); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--orange); outline-offset: 2px; }
.flex-note { margin-top: 10px; }
.flex-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.flex-people .name-chip { background: #fff; color: var(--blue-700); }

.empty-state { text-align: center; padding: 48px 20px; }
.empty-state img { width: 120px; margin: 0 auto 16px; opacity: .8; }

/* Barre de sélection collante */
.selection-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--ink); color: #fff; box-shadow: 0 -8px 30px rgba(0,0,0,.18); transform: translateY(110%); transition: transform .25s ease, visibility .25s;
}
.selection-bar.is-visible { transform: none; }
.selection-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.selection-text { margin: 0; font-weight: 600; }
.selection-text small { display: block; color: #C9D2C3; font-weight: 400; }
.selection-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.selection-bar .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
body.has-selection main { padding-bottom: 110px; }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-weight: 700; font-size: .95rem; color: var(--ink); }
.field .hint { font-size: .84rem; color: var(--ink-3); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
  font: 400 1rem/1.4 var(--font-body); color: var(--ink); transition: border-color .15s;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--green-800); box-shadow: 0 0 0 3px var(--green-100); }
.input[aria-invalid="true"] { border-color: var(--terra-700); }
.field-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(2, 1fr); } .field-row-3 { grid-template-columns: repeat(3, 1fr); } .field-row-4 { grid-template-columns: repeat(4, 1fr); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: var(--terra-50); color: var(--terra-700); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green-800); flex: none; }

/* ---------- Boîtes de dialogue ---------- */
dialog {
  border: 0; padding: 0; border-radius: 24px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  box-shadow: var(--shadow-lg); color: var(--ink); background: #fff;
}
dialog::backdrop { background: rgba(34, 42, 31, .55); }
.dialog-body { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.dialog-head h2 { font-size: 1.4rem; margin: 0; }
.dialog-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--green-50); cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--ink); flex: none; }
.recap { background: var(--green-50); border-radius: 14px; padding: 12px 14px; margin: 12px 0 16px; font-size: .94rem; }
.recap ul { margin: 6px 0 0; padding-left: 1.1em; }
.recap-title { font-weight: 800; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; margin-bottom: 12px; }
.success-icon svg { width: 34px; height: 34px; }
.copy-box { display: flex; gap: 8px; margin: 10px 0; }
.copy-box input { flex: 1; min-width: 0; font-size: .85rem; }

/* ---------- Notifications ---------- */
.toast-zone { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + 10px); display: grid; gap: 8px; width: min(460px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; animation: toast-in .25s ease; }
.toast.error { background: var(--terra-700); }
.toast.success { background: var(--green-800); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Association : graphiques ---------- */
.flow { display: grid; gap: 14px; counter-reset: flow; }
@media (min-width: 880px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow-step { position: relative; background: #fff; border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow); }
.flow-step .num { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--green); font-weight: 700; }
.flow-step h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.flow-step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
@media (min-width: 880px) {
  .flow-step:not(:last-child)::after {
    content: ""; position: absolute; right: -14px; top: 50%; width: 14px; border-top: 3px dotted var(--green); z-index: 1;
  }
}
.chart-card h3 { margin-bottom: 4px; }
.chart-card .sub { color: var(--ink-3); font-size: .9rem; margin-bottom: 18px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px; align-items: center; font-size: .92rem; }
.hbar-label { color: var(--ink); font-weight: 600; }
.hbar-track { position: relative; height: 28px; background: #F2EFE8; border-radius: 8px; }
.hbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--green); min-width: 4px; }
.hbar-val { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: .85rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-fill.c-terra { background: var(--terra); } .hbar-fill.c-orange { background: var(--orange); } .hbar-fill.c-blue { background: var(--blue); }
.hbar-fill.c-green2 { background: var(--green-100); }
.hbar-fill { width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.vchart .b-tre { fill: var(--green); } .vchart .b-env { fill: var(--terra); } .vchart .b-vote { fill: var(--orange); }

.vchart { width: 100%; }
.vchart text { font-family: var(--font-body); }
.vchart .lbl { font-size: 12px; fill: var(--ink-2); }
.vchart .val { font-size: 12px; font-weight: 800; fill: var(--ink); }
.vchart .grid-line { stroke: #ECE8DF; stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .88rem; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-green { background: var(--green); } .lg-terra { background: var(--terra); } .lg-orange { background: var(--orange); } .lg-blue { background: var(--blue); } .lg-dark { background: var(--green-800); }

.stack-bar { display: flex; height: 54px; border-radius: 14px; overflow: hidden; margin: 8px 0 12px; }
.stack-bar > div { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; color: var(--ink); padding: 0 6px; text-align: center; line-height: 1.1; }
.sb-classes { flex: 6600; background: var(--green); }
.sb-cm2 { flex: 1400; background: var(--orange); }
.sb-mat { flex: 1000; background: var(--blue); }

.governance { display: grid; gap: 12px; justify-items: center; text-align: center; }
.gov-box { background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); width: min(100%, 560px); }
.gov-box h3 { margin: 0 0 4px; font-size: 1.1rem; }
.gov-box p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.gov-arrow { width: 0; height: 26px; border-left: 3px dotted var(--green-600); }
.gov-box.b1 { border-top: 5px solid var(--orange); } .gov-box.b2 { border-top: 5px solid var(--blue); } .gov-box.b3 { border-top: 5px solid var(--terra); }
.people { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.person { background: var(--green-50); border-radius: 12px; padding: 6px 12px; font-size: .9rem; }
.person strong { display: block; color: var(--green-800); }

.project-card { border-left: 5px solid var(--green); }
.project-card .amount { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--terra-700); }
.project-card h3 { margin: 6px 0; font-size: 1.05rem; }
.project-card p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.project-card.mat { border-color: var(--orange); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--green-50); font-weight: 800; color: var(--green-800); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.table tr.is-off td { color: var(--ink-3); }

/* ---------- Tuto ---------- */
.steps-timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: st; }
.steps-timeline li { position: relative; padding: 0 0 26px 64px; }
.steps-timeline li::before {
  counter-increment: st; content: counter(st); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; background: var(--green); color: #fff;
}
.steps-timeline li:nth-child(4n+2)::before { background: var(--terra); }
.steps-timeline li:nth-child(4n+3)::before { background: var(--orange); color: var(--ink); }
.steps-timeline li:nth-child(4n+4)::before { background: var(--blue); }
.steps-timeline li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; border-left: 3px dotted var(--green-100); }
.steps-timeline h3 { margin: 8px 0 6px; font-size: 1.12rem; }
.steps-timeline p, .steps-timeline ul { color: var(--ink-2); margin: 0 0 6px; }
.when { display: inline-block; font-size: .78rem; font-weight: 800; color: var(--terra-700); background: var(--terra-50); padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; font-family: var(--font-body); }

details.fiche { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
details.fiche summary {
  list-style: none; cursor: pointer; padding: 18px 20px; display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 1.05rem;
}
details.fiche summary::-webkit-details-marker { display: none; }
details.fiche summary .icon-bubble { margin: 0; width: 44px; height: 44px; border-radius: 12px; flex: none; }
details.fiche summary .icon-bubble svg { width: 22px; height: 22px; }
details.fiche summary .sum-text { flex: 1; }
details.fiche summary .sum-text small { display: block; font-weight: 500; color: var(--ink-3); font-size: .88rem; }
details.fiche summary::after { content: "+"; font-size: 1.6rem; color: var(--green-800); font-weight: 400; width: 28px; text-align: center; }
details.fiche[open] summary::after { content: "–"; }
.fiche-body { padding: 0 20px 20px; border-top: 1px dashed var(--line); }
.fiche-body h4 { font-family: var(--font-body); font-weight: 800; color: var(--ink); font-size: .98rem; margin: 16px 0 6px; }
.fiche-body ul { margin: 0; color: var(--ink-2); }
.fiche-body li { margin-bottom: 4px; }
.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--green-600); }

.gear-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .gear-grid { grid-template-columns: repeat(4, 1fr); } }
.gear { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow); text-align: center; }
.gear .icon-bubble { margin: 0 auto 10px; }
.gear strong { display: block; font-size: .96rem; }
.gear span { font-size: .84rem; color: var(--ink-3); }

.rules { display: grid; gap: 12px; }
@media (min-width: 720px) { .rules { grid-template-columns: repeat(2, 1fr); } }
.rule { display: flex; gap: 14px; background: #fff; border-radius: 16px; padding: 16px; border: 1px solid var(--line); }
.rule .icon-bubble { margin: 0; flex: none; }
.rule h3 { font-size: 1rem; margin: 2px 0 4px; font-family: var(--font-body); font-weight: 800; color: var(--ink); }
.rule p { margin: 0; font-size: .93rem; color: var(--ink-2); }

.phone-mock { background: #fff; border-radius: 26px; border: 8px solid var(--ink); padding: 14px; max-width: 280px; margin: 0 auto; box-shadow: var(--shadow-lg); }
.phone-mock .pm-slot { border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; font-size: .82rem; }
.phone-mock .pm-slot.sel { border-color: var(--terra-700); background: var(--terra-50); }
.phone-mock .pm-bar { background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 10px; font-size: .8rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.phone-mock .pm-bar span:last-child { background: var(--terra-700); padding: 4px 8px; border-radius: 999px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.qr-card { background: #fff; border-radius: 28px; padding: 28px; box-shadow: var(--shadow-lg); text-align: center; max-width: 420px; margin: 0 auto; position: relative; }
.qr-card::before { content: ""; position: absolute; inset: 10px; border: 2px dashed var(--green-100); border-radius: 22px; pointer-events: none; }
.qr-card .qr-logo { width: 84px; height: 84px; border-radius: 50%; margin: -70px auto 10px; background: #fff; box-shadow: var(--shadow); padding: 6px; }
.qr-card h2 { font-size: 1.5rem; margin-bottom: 2px; }
.qr-card .qr-sub { color: var(--ink-3); margin-bottom: 18px; }
.qr-card .qr-img { width: min(260px, 100%); margin: 0 auto 18px; image-rendering: pixelated; }
.wa-steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; counter-reset: wa; }
.wa-steps li { display: flex; gap: 14px; align-items: flex-start; }
.wa-steps li::before { counter-increment: wa; content: counter(wa); flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--wa); color: #fff; font-weight: 800; display: grid; place-items: center; }
.why-list { display: grid; gap: 12px; margin-top: 12px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-800); color: #E4EADF; margin-top: 40px; padding: 40px 0 28px; }
.footer-inner { display: grid; gap: 24px; }
@media (min-width: 880px) { .footer-inner { grid-template-columns: 1fr auto; align-items: start; } .footer-note { grid-column: 1 / -1; } }
.footer-brand { display: flex; gap: 16px; align-items: center; }
.footer-brand p { margin: 0; font-size: .92rem; }
.footer-title { font-family: var(--font-display); font-size: 1.2rem; color: #fff; font-weight: 700; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a, .site-footer a { color: #fff; }
.footer-note { font-size: .82rem; color: #C3CEBC; border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; margin: 0; }

/* ---------- Divers ---------- */
.skeleton { background: linear-gradient(90deg, #EEEAE1 0%, #F7F4EE 50%, #EEEAE1 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 22px; height: 140px; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { background: var(--orange-50); border-left: 5px solid var(--orange); border-radius: 12px; padding: 14px 16px; color: var(--ink); }
.notice p:last-child { margin: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } }
.error-page { text-align: center; padding: 80px 0; }
.error-page img { width: 160px; margin: 0 auto 20px; }

/* ==========================================================================
   Espace administrateur
   ========================================================================== */
.admin-body { background: #F4F2EC; }
.admin-login { max-width: 420px; margin: 60px auto; }
.admin-login img { width: 96px; margin: 0 auto 12px; }
.admin-shell { padding: 24px 0 60px; }
.admin-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-top h1 { font-size: 1.7rem; margin: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 4px; }
.tab {
  border: 0; background: transparent; padding: 10px 16px; border-radius: 999px; font: 700 .95rem var(--font-body); color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--green-800); color: #fff; }
.tab:hover:not([aria-selected="true"]) { background: #fff; }
.admin-list { display: grid; gap: 12px; }
.admin-event {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px;
  grid-template-columns: auto 1fr; align-items: center;
}
.admin-event.is-past { opacity: .7; }
.admin-event-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .admin-event { grid-template-columns: auto 1fr auto; } .admin-event-actions { grid-column: auto; justify-content: flex-end; } }
.admin-event h3 { margin: 0 0 4px; font-size: 1.1rem; }
.admin-event .kpis { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; color: var(--ink-2); margin-top: 6px; }
.admin-panel { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.admin-panel h2 { font-size: 1.25rem; }
.need-editor { border: 2px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; background: #FDFCF9; position: relative; }
.need-editor.shift { border-left: 6px solid var(--blue); }
.need-editor.item { border-left: 6px solid var(--orange); }
.need-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.need-editor-head strong { font-size: .95rem; }
.need-preview { font-size: .86rem; color: var(--blue-700); font-weight: 600; background: var(--blue-50); border-radius: 10px; padding: 6px 10px; }
.need-editor.item .need-preview { color: var(--orange-800); background: var(--orange-50); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { color: var(--terra-700); border-color: var(--terra); }
.icon-btn svg { width: 18px; height: 18px; }
.form-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 16px; }
.part-table td .name-chip { margin: 1px 2px 1px 0; }
.slot-summary { display: grid; gap: 8px; }
.slot-summary-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: .9rem; }
@media (max-width: 560px) { .slot-summary-row { grid-template-columns: 90px 1fr 50px; } }
#err-actions{justify-content:center}

@media print {
  .site-header, .site-footer, .tabs, .admin-top .btn-row, .admin-event-actions, .icon-btn, .selection-bar, .toast-zone { display: none !important; }
  body, .admin-body { background: #fff; }
  .admin-panel, .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* Ajustements */
.name-chip.empty { white-space: normal; }
.selection-bar { visibility: hidden; }
.selection-bar.is-visible { visibility: visible; }
@media (max-width: 559px) {
  .selection-inner { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .selection-bar .btn-row { flex-wrap: nowrap; }
  .selection-bar .btn-row .btn:last-child { flex: 1; }
}

/* ==========================================================================
   V2 — Agenda en tuiles, tutos en tuiles, lien admin
   ========================================================================== */
.site-nav a.nav-admin { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); border: 1.5px solid var(--line); }
.site-nav a.nav-admin svg { width: 16px; height: 16px; }
.site-nav a.nav-admin:hover, .site-nav a.nav-admin[aria-current="page"] { border-color: var(--green-600); color: var(--green-800); }
@media (max-width: 919px) { .site-nav a.nav-admin { justify-content: center; margin-top: 6px; } }

.tile-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.event-tile {
  display: flex; flex-direction: column; gap: 16px; background: #fff; border-radius: 22px; padding: 20px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; border-top: 6px solid var(--green); transition: transform .15s, box-shadow .15s;
}
.event-tile:nth-child(3n+2) { border-top-color: var(--terra); }
.event-tile:nth-child(3n+3) { border-top-color: var(--blue); }
.event-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: inherit; }
.tile-top { display: flex; gap: 14px; align-items: flex-start; }
.tile-head { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.tile-title { font-size: 1.2rem; margin: 0; }
.tile-meta { margin: 0; color: var(--ink-2); font-size: .92rem; }
.tile-gauges, .detail-gauges { display: grid; gap: 12px; }
.detail-gauges { margin-top: 16px; }
@media (min-width: 640px) { .detail-gauges { grid-template-columns: 1fr 1fr; max-width: 640px; } }
.mini-gauge-label { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ink-2); margin-bottom: 5px; }
.mini-gauge-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-reserve { margin: 0; font-size: .86rem; color: var(--blue-700); font-weight: 600; }
.tile-cta { margin-top: auto; font-weight: 800; color: var(--terra-700); }

.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; margin-bottom: 14px; min-height: 40px; }
.back-link svg { width: 20px; height: 20px; }
.detail-head { margin-bottom: 8px; }
.detail-title { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin: 0 0 6px; }
.section-title { font-size: 1.35rem; margin: 30px 0 12px; }
.task-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; border-left: 6px solid var(--blue); }
.task-card.item { border-left-color: var(--orange); }
.task-card.reserve { border-left-color: var(--green); background: var(--green-50); box-shadow: none; border: 2px dashed var(--green); margin-top: 24px; }
.task-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.task-head h3 { margin: 0; font-size: 1.12rem; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.task-head .kind-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--blue); flex: none; }
.task-card.item .kind-dot { background: var(--orange); border-radius: 50%; }
.slot-list { display: grid; gap: 12px; }
@media (min-width: 760px) { .slot-list { grid-template-columns: repeat(2, 1fr); } }
.slot-row { border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.slot-row.is-full { background: #F6F4EF; }
.slot-row-head { display: flex; justify-content: space-between; align-items: center; }
.slot-btn { align-self: flex-start; }
.slot-free { font-weight: 500; opacity: .85; }
.slot-full { margin: 0; font-weight: 700; color: var(--green-800); font-size: .92rem; }
.person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task-card.item .person-list, .task-card.reserve .person-list { margin-top: 12px; }
.person-row { display: flex; align-items: center; gap: 10px; background: var(--green-50); border-radius: 12px; padding: 7px 8px 7px 12px; }
.task-card.reserve .person-row { background: #fff; }
.person-main { flex: 1; min-width: 0; display: grid; }
.person-name { font-weight: 700; font-size: .95rem; }
.person-kids { font-size: .84rem; color: var(--ink-2); }
.person-row .icon-btn { width: 40px; height: 40px; flex: none; }

.dialog-context { margin: 4px 0 0; color: var(--terra-700); font-weight: 700; font-size: .95rem; }
fieldset.kids { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.kids legend { font-weight: 700; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.kid-row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.kid-row .icon-btn { width: 40px; height: 46px; }
@media (max-width: 400px) { .kid-row { grid-template-columns: 1fr 104px 36px; } }
.cal-buttons { display: grid; gap: 8px; margin-top: 8px; }
@media (min-width: 460px) { .cal-buttons { grid-template-columns: 1fr 1fr; } }

/* Tutos */
.tuto-tile {
  display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; background: #fff; border: 0; border-radius: 22px;
  box-shadow: var(--shadow); padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s;
}
.tuto-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tuto-band { height: 10px; background: var(--green); }
.tuto-tile.c-terra .tuto-band { background: var(--terra); } .tuto-tile.c-orange .tuto-band { background: var(--orange); } .tuto-tile.c-blue .tuto-band { background: var(--blue); }
.tuto-thumb { aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; position: relative; }
.tuto-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tuto-thumb::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 56px; height: 40px; border-radius: 12px; background: rgba(200,0,0,.85); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.tuto-inner { padding: 6px 20px 20px; display: grid; gap: 8px; }
.tuto-inner h2 { font-size: 1.15rem; margin: 0; }
.tuto-inner p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.tuto-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
dialog.dlg-wide { width: min(760px, calc(100vw - 24px)); }
.rich h3 { font-family: var(--font-body); font-weight: 800; color: var(--ink); font-size: 1.02rem; margin: 18px 0 6px; }
.rich p { color: var(--ink-2); }
.rich ul { color: var(--ink-2); margin: 0 0 12px; }
.rich li { margin-bottom: 4px; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin: 12px 0; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.attach-list { display: grid; gap: 8px; margin-top: 16px; }
.attach {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 700;
}
.attach:hover { border-color: var(--green); color: var(--ink); background: var(--green-50); }
.attach .icon-bubble { width: 40px; height: 40px; margin: 0; border-radius: 10px; flex: none; }
.attach .icon-bubble svg { width: 20px; height: 20px; }
.attach small { display: block; font-weight: 500; color: var(--ink-3); }

/* Admin V2 */
.admin-banner { background: var(--orange-50); border: 2px solid var(--orange); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 0 14px; min-height: 42px; font: 700 .92rem var(--font-body); color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 2px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--green-800); color: #fff; }
.link-editor { display: grid; grid-template-columns: 150px 1fr 1fr 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 760px) { .link-editor { grid-template-columns: 1fr 40px; } .link-editor > :nth-child(2), .link-editor > :nth-child(3) { grid-column: 1 / -1; } .link-editor > :nth-child(4) { grid-row: 1; grid-column: 2; } }
.template-list { display: flex; flex-wrap: wrap; gap: 8px; }
.template-chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; font-weight: 700; font-size: .9rem; }
.template-chip button { border: 0; background: none; cursor: pointer; font: inherit; color: var(--blue-700); padding: 4px 8px; border-radius: 999px; }
.template-chip button:hover { background: var(--green-50); }
.template-chip .del { color: var(--terra-700); }
.log-list { font-size: .86rem; color: var(--ink-2); max-height: 260px; overflow: auto; margin: 0; padding-left: 1.1em; }
details.admin-panel > summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; color: var(--green-800); }
.tuto-tile { text-decoration: none; } .tuto-tile h3 { margin: 0; font-size: 1.1rem; }
@media (min-width: 900px) { .admin-event { grid-template-columns: auto 1fr; } .admin-event-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.field .seg { justify-self: start; }
.link-editor { grid-template-columns: 180px 1fr 1fr 40px; }

/* ==========================================================================
   THÈME « CHIC & JOYEUX » (octobre 2026)
   Base pastel élégante + touches vives (rose fluo, citron, menthe).
   Pour revenir à l'ancien look : supprimer ce bloc jusqu'à la fin du fichier.
   ========================================================================== */
:root {
  --bg: #FFFCF7;
  --line: #F1E6DB;
  --ink: #2E3530;
  --green-800: #3F5238;
  --pop: #FF4F9A;          /* rose fluo (décors, lueurs) */
  --pop-strong: #D81B6A;   /* rose vif lisible (textes, boutons) */
  --lime: #E4FF5C;         /* citron fluo */
  --mint: #3EE0C0;         /* menthe vive */
  --peach: #FFE3D9;
  --butter: #FFF1C6;
  --sky: #DCEEF8;
  --lilac: #ECE3FA;
  --sage: #E3EEDB;
  --shadow: 0 1px 2px rgba(70, 40, 70, .05), 0 10px 30px rgba(120, 80, 120, .09);
  --shadow-lg: 0 2px 4px rgba(70, 40, 70, .06), 0 20px 44px rgba(120, 80, 120, .16);
}
::selection { background: var(--lime); color: #1d2a12; }

body {
  background:
    radial-gradient(900px 520px at 105% -8%, rgba(255, 79, 154, .10), transparent 60%),
    radial-gradient(760px 520px at -12% 8%, rgba(255, 196, 64, .14), transparent 60%),
    radial-gradient(900px 600px at 50% 105%, rgba(81, 138, 170, .10), transparent 60%),
    var(--bg);
}

/* En-tête : liseré multicolore et menu plus vivant */
.site-header { background: rgba(255, 252, 247, .9); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #9DAC93, #FFA400, var(--pop), #E67261, #518AAA);
}
.site-nav a:hover { background: var(--butter); color: var(--ink); }
.site-nav a[aria-current="page"] { background: #FFE2EF; color: #A3134F; }
.site-nav a.nav-cta { background: #25D366; color: #06371C; }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta[aria-current="page"] { background: #1EBE5B; color: #06371C; }

/* Boutons */
.btn:not(.btn-ghost):not(.btn-light):not(.btn-wa):not(.btn-danger-ghost):not(.btn-green):not(.btn-blue):not([disabled]) {
  background: linear-gradient(135deg, var(--pop-strong), #E8483F);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(255, 79, 154, .32);
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: #F5C4DA; color: #8A1F55; }
.btn-ghost:hover { background: #FFF0F7; color: #8A1F55; }

/* Titres et sur-titres */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--lime); color: #2F3A05;
  padding: 4px 12px; border-radius: 999px; font-weight: 700;
}
.eyebrow::before { border-top-color: var(--pop-strong); width: 14px; }
.hero h1 em, .page-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #E2533F, var(--pop-strong) 55%, #F08A00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Bandeaux de page et sections alternées en pastel */
.page-hero { background: linear-gradient(135deg, var(--peach) 0%, var(--butter) 45%, var(--sky) 100%); }
.section-alt { background: linear-gradient(180deg, var(--lilac) 0%, #F7F2FE 55%, var(--sky) 100%); }

/* Cartes */
.card { border: 1px solid var(--line); box-shadow: var(--shadow); }
.grid .card, .tile-grid > * { transition: transform .18s ease, box-shadow .18s ease; }
.grid .card:hover, .tile-grid > *:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Chiffres clés : une couleur pastel par carte */
.stat { background: var(--peach); border: 0; box-shadow: none; }
.stat:nth-child(2) { background: var(--butter); }
.stat:nth-child(3) { background: var(--sky); }
.stat:nth-child(4) { background: var(--lilac); }
.stat .stat-value { color: #C2185B; }
.stat:nth-child(2) .stat-value { color: #9A5200; }
.stat:nth-child(3) .stat-value { color: #1B6690; }
.stat:nth-child(4) .stat-value { color: #6A3DB0; }
.stat-label { color: var(--ink); }

/* Pastilles d'icônes et badges */
.icon-bubble.terra { background: var(--peach); color: #C93C2C; }
.icon-bubble.orange { background: var(--butter); color: #A86200; }
.icon-bubble.blue { background: var(--sky); color: #1B6690; }
.badge { background: var(--sage); color: #3F5238; }
.badge-blue { background: var(--sky); color: #1B5F85; }
.badge-orange { background: var(--butter); color: #8A5300; }
.badge-terra { background: var(--peach); color: #B3473A; }
.badge-pop { background: var(--pop-strong); color: #fff; }

/* Accueil : pastilles décoratives fluo */
.hero-visual .d1 { background: var(--pop); }
.hero-visual .d2 { background: var(--lime); }
.hero-visual .d3 { background: var(--mint); }

/* Étapes numérotées */
.flow-step .num { background: linear-gradient(135deg, var(--pop-strong), #F08A00); color: #fff; }

/* Bandeau d'appel à l'action */
.cta-band { background: linear-gradient(120deg, #3F5238 0%, #6C4A8C 55%, var(--pop-strong) 100%); color: #fff; }
.cta-band h2, .cta-band p { color: #fff; }

/* Bureau de l'association */
.person-sub { display: block; font-size: .85rem; color: var(--ink-3); font-weight: 400; }

/* Contact : groupes WhatsApp et règles */
.wa-groups { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 10px; }
.wa-groups li {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green);
  border-radius: 14px; padding: 12px 14px; color: var(--ink-2);
}
.wa-groups li:nth-child(1) { border-left-color: var(--pop); background: #FFF4F9; }
.wa-groups li:nth-child(2) { border-left-color: #FFA400; }
.wa-groups li:nth-child(3) { border-left-color: #518AAA; }
.wa-groups strong { display: block; font-family: var(--font-display); color: var(--ink); margin-bottom: 2px; }
.wa-groups .badge { margin-top: 6px; }
.wa-rules { background: var(--sage); border-radius: 14px; padding: 14px 18px; }
.wa-rules h3 { margin-bottom: .4em; }
.wa-rules ul { margin: 0; }

/* Pied de page */
.site-footer { background: linear-gradient(160deg, #2F3D2A 0%, #3B2D49 100%); position: relative; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #518AAA, #E67261, var(--pop), #FFA400, #9DAC93);
}

