/* ==============================================================================
   LES ÉCOLES DE CÉLONY · design du site (pensé d'abord pour le téléphone)
   Couleurs tirées du logo : ciel, soleil, sac à dos, ruban turquoise
   ============================================================================== */
:root {
  --font-title: 'Baloo 2', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --navy: #0f2a6b;
  --blue: #1e4fd8;
  --sky: #38bdf8;
  --sky-soft: #e3f3ff;
  --sun: #ffc935;
  --orange: #ff8a00;
  --coral: #ff5a3c;
  --teal: #14b8a6;
  --green: #22a45d;
  --pink: #f0538a;
  --violet: #7c5cff;

  --cream: #fff8ec;
  --paper: #ffffff;
  --ink: #1d2b4f;
  --ink-soft: #5b6582;
  --line: rgba(29, 43, 79, 0.1);

  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 14px 34px -18px rgba(15, 42, 107, 0.4);
  --shadow-lg: 0 26px 50px -22px rgba(15, 42, 107, 0.5);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 74px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
strong { font-weight: 800; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.1rem; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 248, 236, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.topbar.scrolled { border-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 0.75rem; height: 62px; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; }
.brand b { font-family: var(--font-title); font-weight: 800; font-size: 1.12rem; line-height: 1; white-space: nowrap; }
.brand small { display: block; font-size: 0.68rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.04em; white-space: nowrap; }
.topnav { display: none; margin-left: auto; gap: 0.2rem; }
.topnav a {
  text-decoration: none; font-weight: 700; font-size: 0.93rem;
  padding: 0.5rem 0.85rem; border-radius: 999px; color: var(--ink-soft);
}
.topnav a:hover { color: var(--ink); background: rgba(29, 43, 79, 0.06); }
.topnav a[aria-current="page"] { color: var(--blue); background: var(--sky-soft); }
.me-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 0.88rem;
  padding: 0.55rem 0.95rem; border-radius: 999px;
  white-space: nowrap;
}
.me-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }

/* ---------- Barre de navigation du bas (téléphone) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.12rem;
  text-decoration: none; font-size: 0.68rem; font-weight: 800; color: var(--ink-soft);
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
}
.tabbar .ico { font-size: 1.35rem; line-height: 1; transition: transform 0.3s var(--ease); }
.tabbar a[aria-current="page"] { color: var(--blue); background: var(--sky-soft); }
.tabbar a[aria-current="page"] .ico { transform: translateY(-2px) scale(1.12); }

/* ---------- Vues ---------- */
.view { animation: viewIn 0.5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.view-head { padding: 1.6rem 0 1rem; }
.view-head h1 { font-family: var(--font-title); font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.02; }
.view-head p { color: var(--ink-soft); margin-top: 0.35rem; }

/* ---------- Héros « ciel d'aventure » ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff; text-align: center;
  padding: 1.8rem 0 6.2rem;
  background:
    radial-gradient(90% 60% at 80% 0%, rgba(255, 201, 53, 0.45) 0%, transparent 60%),
    linear-gradient(175deg, #1846c9 0%, #2f7bf0 45%, #6cc7ff 100%);
}
.hero::after { /* colline */
  content: ''; position: absolute; z-index: -1;
  left: -15%; right: -15%; bottom: -2px; height: 90px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.sky-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cloud {
  position: absolute; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.85);
  filter: blur(0.3px);
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 34px; height: 34px; left: 14px; top: -16px; }
.cloud::after { width: 24px; height: 24px; right: 14px; top: -10px; }
.c1 { width: 92px; top: 6%; left: -120px; animation-duration: 38s; opacity: 0.55; }
.c2 { width: 70px; top: 30%; left: -100px; animation-duration: 52s; animation-delay: -20s; opacity: 0.25; }
.c3 { width: 110px; top: 2%; left: -140px; animation-duration: 64s; animation-delay: -40s; opacity: 0.3; }
@keyframes drift { to { transform: translateX(calc(100vw + 280px)); } }

.balloon { position: absolute; width: 46px; animation: float 7s ease-in-out infinite; }
.balloon.b1 { top: 13%; left: 6%; }
.balloon.b2 { top: 24%; right: 7%; width: 34px; animation-delay: -3s; animation-duration: 9s; }
@keyframes float { 50% { transform: translateY(-14px) rotate(3deg); } }
.plane { position: absolute; top: 9%; left: -60px; width: 46px; animation: fly 16s linear infinite; animation-delay: -4s; }
@keyframes fly {
  0% { transform: translate(0, 30px) rotate(-8deg); }
  50% { transform: translate(55vw, -10px) rotate(4deg); }
  100% { transform: translate(110vw, 20px) rotate(-6deg); }
}
.sparkle { position: absolute; color: #fff6c9; font-size: 0.9rem; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: 0.2; transform: scale(0.7); } }

.hero-logo {
  width: 150px; height: 150px; margin: 0.6rem auto 0.6rem;
  filter: drop-shadow(0 18px 26px rgba(10, 30, 90, 0.45));
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-7px) rotate(-2deg); } }
.year-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem; border-radius: 999px;
  font-weight: 800; font-size: 0.8rem;
}
.hero .wrap { position: relative; }
.hero h1 {
  font-family: var(--font-title); font-weight: 800;
  font-size: clamp(2.3rem, 10.5vw, 4rem); line-height: 0.98;
  margin: 0.8rem auto 0.7rem; max-width: 14ch;
  text-shadow: 0 6px 26px rgba(10, 30, 90, 0.35);
}
.hero h1 em { font-style: normal; color: var(--sun); }
.hero-lead { max-width: 34rem; margin: 0 auto 1.35rem; font-size: 1.04rem; color: rgba(255, 255, 255, 0.92); }
.hero-ctas { display: flex; flex-direction: column; gap: 0.6rem; max-width: 360px; margin: 0 auto; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; margin-top: 1.3rem; }
.facts span {
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.32rem 0.75rem; border-radius: 999px; font-weight: 700; font-size: 0.8rem;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: none; border-radius: 16px;
  padding: 0.95rem 1.2rem;
  font-weight: 800; font-size: 1rem; line-height: 1.1;
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-sun { background: var(--sun); color: var(--navy); box-shadow: 0 12px 24px -12px rgba(255, 170, 0, 0.9); }
.btn-glass { background: rgba(255, 255, 255, 0.18); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 12px 24px -12px rgba(30, 79, 216, 0.8); }
.btn-light { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--blue); padding: 0.6rem 0.4rem; }
.btn-wa { background: #25d366; color: #063b1c; }
.btn-danger { background: #ffe3e3; color: #c92a2a; }
.btn-sm { padding: 0.6rem 0.85rem; font-size: 0.88rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------- Sections ---------- */
.section { padding: 1.4rem 0 2.2rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.kicker { font-weight: 800; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.section h2 { font-family: var(--font-title); font-weight: 800; font-size: clamp(1.75rem, 7vw, 2.4rem); line-height: 1.02; }
.section-head .more { font-weight: 800; color: var(--blue); text-decoration: none; white-space: nowrap; font-size: 0.92rem; }
.lead { color: var(--ink-soft); }

/* ---------- Alerte ---------- */
.alert {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: #fff1e6; border: 2px solid #ffb37a; color: #7a2e00;
  border-radius: var(--radius-sm); padding: 0.9rem 1rem; margin: 1rem 0 0;
}
.alert b { display: block; font-size: 1rem; color: #b33f00; }

/* ---------- À la une (carrousel) ---------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%;
  gap: 0.9rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.3rem 1.1rem 1.2rem; margin: 0 -1.1rem;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: center; }

.feature {
  position: relative; overflow: hidden; border-radius: 28px;
  min-height: 330px; padding: 1.3rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; color: #fff;
  box-shadow: var(--shadow-lg);
}
.feature .tag {
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(255, 255, 255, 0.95); color: var(--ink);
  font-weight: 800; font-size: 0.75rem; padding: 0.3rem 0.7rem; border-radius: 999px;
}
.feature h3 { font-family: var(--font-title); font-size: 1.7rem; line-height: 1.02; }
.feature p { font-size: 0.95rem; opacity: 0.95; margin-top: 0.25rem; }
.feature .go { margin-top: 0.8rem; font-weight: 800; display: inline-flex; gap: 0.35rem; align-items: center; }
.feature-tombola { background: linear-gradient(160deg, #e03131 0%, #c92a2a 55%, #2b8a3e 140%); }
.feature-tombola img {
  position: absolute; top: 1rem; right: 0.9rem; width: 34%; max-width: 150px; height: auto;
  background: #fff; border-radius: 20px; padding: 0.5rem;
  transform: rotate(6deg); box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.5);
}
.countdown-chip {
  display: inline-flex; gap: 0.35rem; align-items: center; margin-top: 0.6rem;
  background: rgba(0, 0, 0, 0.22); padding: 0.35rem 0.7rem; border-radius: 999px;
  font-weight: 800; font-size: 0.85rem; width: fit-content;
}
.feature-news { background: linear-gradient(160deg, #1e4fd8 0%, #0f2a6b 100%); }
.feature-news.has-img { background-size: cover; background-position: center; }
.feature-news.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(10, 20, 50, 0.85)); }
.feature-news > * { position: relative; }
.feature-classes { background: linear-gradient(160deg, #14b8a6 0%, #0e7c86 100%); }
.feature-classes .emojis { position: absolute; top: 1.1rem; right: 1rem; font-size: 2.3rem; line-height: 1.15; text-align: right; }

/* ---------- Agenda ---------- */
.events { display: grid; gap: 0.75rem; }
.event {
  display: grid; grid-template-columns: 64px 1fr; gap: 0.9rem; align-items: center;
  background: var(--paper); border-radius: var(--radius-sm); padding: 0.85rem; box-shadow: var(--shadow);
}
.event-date {
  border-radius: 14px; text-align: center; padding: 0.45rem 0 0.4rem;
  background: var(--c, var(--blue)); color: #fff;
}
.event-date b { display: block; font-family: var(--font-title); font-size: 1.75rem; line-height: 1; }
.event-date span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.event-date.is-month { background: repeating-linear-gradient(135deg, var(--c, var(--blue)) 0 8px, color-mix(in srgb, var(--c, var(--blue)) 82%, #fff) 8px 16px); }
.event-date.is-month b { font-size: 1.15rem; text-transform: capitalize; padding-top: 0.2rem; }
.event h3 { font-size: 1.02rem; line-height: 1.2; }
.event .meta { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.15rem; }
.event .desc { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.35rem; }
.event .actions { margin-top: 0.45rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.cat-festif { --c: var(--coral); }
.cat-vente { --c: var(--orange); }
.cat-reunion { --c: var(--blue); }
.cat-vacances { --c: var(--teal); }
.cat-scolaire { --c: var(--violet); }
.month { font-family: var(--font-title); font-size: 1.3rem; margin: 1.2rem 0 0.5rem; text-transform: capitalize; }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; border: none; cursor: pointer;
  background: var(--paper); box-shadow: var(--shadow);
  padding: 0.5rem 0.9rem; border-radius: 999px; font-weight: 800; font-size: 0.85rem;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- États vides ---------- */
.empty {
  text-align: center; background: var(--paper); border-radius: var(--radius); padding: 1.8rem 1.2rem;
  box-shadow: var(--shadow); color: var(--ink-soft);
}
.empty .big { font-size: 2.6rem; display: block; margin-bottom: 0.4rem; }
.empty b { color: var(--ink); display: block; font-size: 1.05rem; margin-bottom: 0.2rem; }

/* ---------- Classes ---------- */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem;
  background: rgba(29, 43, 79, 0.07); padding: 0.3rem; border-radius: 18px; margin-bottom: 1rem;
}
.seg button {
  border: none; background: transparent; cursor: pointer;
  padding: 0.7rem; border-radius: 14px; font-weight: 800; font-size: 0.95rem; color: var(--ink-soft);
}
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.classes { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
.klass {
  position: relative; overflow: hidden;
  background: var(--paper); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow);
  border-top: 6px solid var(--k, var(--blue));
}
.klass-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.klass-emoji {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; background: var(--kt, var(--sky-soft));
}
.klass-label { font-family: var(--font-title); font-weight: 800; font-size: 1.45rem; line-height: 1; color: var(--k); }
.klass-name { font-size: 0.85rem; color: var(--ink-soft); }
.klass-teacher { font-weight: 700; margin-bottom: 0.8rem; }
.klass .status { display: block; text-align: center; padding: 0.8rem; border-radius: 14px; font-weight: 800; font-size: 0.9rem; background: var(--kt); color: var(--ink); }
.klass .status.new { background: #f4f1ea; color: var(--ink-soft); border: 2px dashed #e2dccf; }
.k-pink { --k: #e64980; --kt: #ffe3ec; }
.k-orange { --k: #f76707; --kt: #ffe8d6; }
.k-yellow { --k: #d99a00; --kt: #fff3bf; }
.k-green { --k: #2f9e44; --kt: #d3f9d8; }
.k-teal { --k: #0ca678; --kt: #c3fae8; }
.k-sky { --k: #1c9bd8; --kt: #d0f0ff; }
.k-blue { --k: #3b5bdb; --kt: #dbe4ff; }
.k-violet { --k: #7048e8; --kt: #e5dbff; }
.k-purple { --k: #ae3ec9; --kt: #f3d9fa; }
.k-rose { --k: #e03131; --kt: #ffdede; }

.class-strip { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.class-strip a {
  text-decoration: none; font-weight: 800; font-size: 0.92rem;
  padding: 0.55rem 0.85rem; border-radius: 14px; background: var(--kt); color: var(--k);
  display: inline-flex; gap: 0.35rem; align-items: center;
}

/* Délégués */
.delegates { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.delegate { display: flex; gap: 0.6rem; align-items: center; background: var(--paper); border-radius: var(--radius-sm); padding: 0.7rem; box-shadow: var(--shadow); }
.avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--a, var(--blue)); font-size: 0.95rem;
}
.delegate b { display: block; font-size: 0.92rem; line-height: 1.15; }
.delegate span { font-size: 0.75rem; color: var(--ink-soft); }
.delegate.soon { border: 2px dashed #e2dccf; box-shadow: none; background: transparent; color: var(--ink-soft); }

/* ---------- Bloc « parents » ---------- */
.promo {
  position: relative; overflow: hidden; border-radius: 30px; padding: 1.6rem 1.3rem;
  background: linear-gradient(160deg, var(--navy) 0%, #1e4fd8 100%); color: #fff; box-shadow: var(--shadow-lg);
}
.promo h2 { font-family: var(--font-title); font-size: 2rem; line-height: 1; margin-bottom: 0.5rem; }
.promo p { opacity: 0.9; margin-bottom: 1.1rem; }
.promo ul { list-style: none; display: grid; gap: 0.45rem; margin-bottom: 1.2rem; }
.promo li { display: flex; gap: 0.55rem; align-items: center; font-weight: 600; }
.promo li span { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); flex-shrink: 0; }
.promo h2 { max-width: 12ch; }
.promo .mini-card {
  position: absolute; right: -44px; top: -18px; width: 130px; height: 84px; border-radius: 14px;
  background: linear-gradient(135deg, #ffc935, #ff8a00 60%, #ff5a3c); transform: rotate(14deg); opacity: 0.9;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5);
}

/* ---------- Projets ---------- */
.projects { display: grid; gap: 0.8rem; }
.project { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.project img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.project .body { padding: 1rem 1.1rem 1.1rem; }
.project h3 { font-size: 1.08rem; line-height: 1.2; }
.project p { font-size: 0.9rem; color: var(--ink-soft); margin: 0.3rem 0 0.8rem; }
.bar { height: 12px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sun), var(--orange)); width: 0; transition: width 1.2s var(--ease); }
.project .nums { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 800; margin-top: 0.4rem; }
.badge-ok { display: inline-block; background: #d3f9d8; color: #2b8a3e; font-weight: 800; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 999px; }

/* ---------- Actualités ---------- */
.news-list { display: grid; gap: 0.8rem; }
.news {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  text-align: left; border: none; cursor: pointer; width: 100%;
}
.news img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news .body { padding: 1rem 1.1rem; }
.news .badge { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); }
.news h3 { font-size: 1.1rem; line-height: 1.2; margin: 0.15rem 0 0.3rem; }
.news p { font-size: 0.92rem; color: var(--ink-soft); }
.news time { font-size: 0.8rem; color: var(--ink-soft); display: block; margin-top: 0.4rem; }
.article-body { white-space: pre-line; color: var(--ink); }

/* ---------- Partenaires ---------- */
.partners { display: grid; gap: 0.7rem; }
.partner { background: var(--paper); border-radius: var(--radius-sm); padding: 1rem; box-shadow: var(--shadow); }
.partner .remise { display: inline-block; margin-top: 0.4rem; background: #fff3bf; color: #7a5300; font-weight: 800; font-size: 0.85rem; padding: 0.25rem 0.6rem; border-radius: 10px; }

/* ---------- Espace parents ---------- */
.panel { background: var(--paper); border-radius: var(--radius); padding: 1.4rem 1.2rem; box-shadow: var(--shadow); }
.panel h2 { font-family: var(--font-title); font-size: 1.6rem; line-height: 1.05; margin-bottom: 0.4rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-weight: 800; font-size: 0.88rem; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid #e6e2d8; background: #fffdf8; border-radius: 14px;
  padding: 0.85rem 0.95rem; font-size: 1rem; transition: border-color 0.2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.field .hint { font-size: 0.8rem; color: var(--ink-soft); }
.check { display: flex; gap: 0.55rem; align-items: center; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.9rem; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; margin: 0.4rem 0 1rem; }
.code-inputs input {
  text-align: center; font-family: var(--font-title); font-size: 1.7rem; font-weight: 800;
  border: 2px solid #e6e2d8; border-radius: 14px; padding: 0.55rem 0; background: #fffdf8; width: 100%;
}
.code-inputs input:focus { outline: none; border-color: var(--blue); }
.form-msg { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.8rem; }
.form-msg.err { color: #c92a2a; }
.form-msg.ok { color: #2b8a3e; }

.member-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 1.2rem; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 201, 53, 0.55) 0%, transparent 55%),
    linear-gradient(150deg, #1846c9 0%, #0f2a6b 100%);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1.586; max-width: 440px; margin: 0 auto;
  display: grid; grid-template-rows: auto 1fr auto;
}
.member-card::before { /* reflet */
  content: ''; position: absolute; inset: -40%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-30%); } 100% { transform: translateX(30%); } }
.mc-top { display: flex; align-items: center; gap: 0.6rem; position: relative; }
.mc-top img { width: 44px; height: 44px; }
.mc-top b { display: block; font-family: var(--font-title); font-size: 1.1rem; line-height: 1; }
.mc-top small { font-size: 0.7rem; opacity: 0.85; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.mc-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.8rem; position: relative; }
.mc-name { font-family: var(--font-title); font-size: 1.5rem; line-height: 1.05; }
.mc-kids { font-size: 0.85rem; opacity: 0.9; }
.mc-qr { background: #fff; border-radius: 12px; padding: 6px; flex-shrink: 0; }
.mc-qr canvas { display: block; width: 84px; height: 84px; }
.mc-bottom { display: flex; justify-content: space-between; align-items: center; position: relative; font-size: 0.78rem; font-weight: 800; }
.status-pill { padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.st-actif { background: #d3f9d8; color: #1b6b32; }
.st-inactif { background: rgba(255, 255, 255, 0.2); color: #fff; }
.st-en_attente { background: #fff3bf; color: #7a5300; }

/* ---------- Bureau ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.stat { background: var(--paper); border-radius: var(--radius-sm); padding: 0.9rem; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-title); font-size: 1.8rem; line-height: 1; }
.stat span { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.admin-list { display: grid; gap: 0.55rem; }
.admin-item {
  display: flex; gap: 0.7rem; align-items: center; justify-content: space-between;
  background: var(--paper); border-radius: var(--radius-sm); padding: 0.8rem 0.9rem; box-shadow: var(--shadow);
}
.admin-item .t { min-width: 0; }
.admin-item b { display: block; font-size: 0.95rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-item span { font-size: 0.8rem; color: var(--ink-soft); }
.admin-item .acts { display: flex; gap: 0.35rem; flex-shrink: 0; }
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.toolbar input { flex: 1; min-width: 160px; border: 2px solid #e6e2d8; border-radius: 12px; padding: 0.6rem 0.8rem; background: #fff; }

/* ---------- Feuille (modale du bas) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 25, 55, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.25s;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
  background: var(--cream); border-radius: 28px 28px 0 0;
  padding: 0.6rem 1.2rem calc(1.4rem + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.35s var(--ease);
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: #d9d3c5; margin: 0.2rem auto 0.9rem; }
.sheet h2 { font-family: var(--font-title); font-size: 1.6rem; line-height: 1.05; margin-bottom: 0.6rem; }
.sheet .close { position: sticky; top: 0; float: right; border: none; background: var(--paper); width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); }

/* ---------- Notification (toast) ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 0.92rem;
  padding: 0.75rem 1.1rem; border-radius: 14px; box-shadow: var(--shadow-lg);
  transition: all 0.3s var(--ease); max-width: 90vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Installer l'application ---------- */
.install {
  display: flex; gap: 0.8rem; align-items: center;
  background: var(--paper); border-radius: var(--radius-sm); padding: 0.85rem 1rem; box-shadow: var(--shadow);
}
.install img { width: 46px; height: 46px; border-radius: 12px; }
.install p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.3; }
.install b { color: var(--ink); display: block; font-size: 0.95rem; }

/* ---------- Pied de page ---------- */
.footer { text-align: center; padding: 2rem 0 1.5rem; color: var(--ink-soft); font-size: 0.88rem; }
.footer img { width: 64px; height: 64px; margin: 0 auto 0.6rem; }
.footer b { color: var(--ink); font-family: var(--font-title); font-size: 1.15rem; display: block; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1rem; margin: 0.9rem 0; }
.footer nav a { font-weight: 700; text-decoration: none; }

/* ---------- Apparitions au défilement ---------- */
/* Masqué seulement si le script a démarré : sans JavaScript, tout reste visible */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Grand écran ---------- */
@media (min-width: 720px) {
  .rail { grid-auto-columns: 46%; }
  .classes { grid-template-columns: repeat(2, 1fr); }
  .delegates { grid-template-columns: repeat(3, 1fr); }
  .projects, .news-list, .partners { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .hero-ctas { flex-direction: row; max-width: none; justify-content: center; }
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 28px; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .me-btn { margin-left: 0.5rem; }
  .rail { grid-auto-columns: calc(33.33% - 0.6rem); }
  .classes { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 2.5rem 0 7rem; }
  .hero-logo { width: 190px; height: 190px; }
  .toast { bottom: 24px; }
}

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

@media print {
  .topbar, .tabbar, .footer, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
}
