/* ============================================================
   EcoleSN.com — Master Template CSS (v2.0)
   Variables CSS injectées dynamiquement via app.js + config.json
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-bg, #F5F7FA);
  color: var(--color-text, #1a1a2e);
  line-height: 1.7;
  overflow-x: hidden;
}

/* === DARK MODE === */
body.dark {
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-text: #e2e8f0;
  --color-text-light: #94a3b8;
  --color-accent: #1a2f1a;
}

body.dark .header {
  background: rgba(15, 23, 42, 0.95) !important;
}

body.dark .section--alt {
  background-color: #162032;
}

body.dark .program-card,
body.dark .director__card,
body.dark .newsletter__box,
body.dark .value-card,
body.dark .event-card,
body.dark .testimonial-card {
  background-color: #1e293b;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

body.dark .testimonial-card {
  border-top-color: var(--color-secondary);
}

body.dark .newsletter__input {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

body.dark .partners__item {
  background: #1e293b;
}

body.dark .footer__social-link {
  background: rgba(255,255,255,0.05);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === SECTION BASE === */
.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--color-accent, #E8F5E9);
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary-dark, #0D3B0F);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-secondary, #FF8F00);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light, #6B7280);
  max-width: 600px;
  margin: 0 auto;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  font-family: inherit;
}

.btn--primary {
  background: var(--color-primary, #1B5E20);
  color: var(--color-text-on-primary, #FFFFFF);
}

.btn--primary:hover {
  background: var(--color-primary-dark, #0D3B0F);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 94, 32, 0.35);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn--outline:hover {
  background: #fff;
  color: var(--color-primary, #1B5E20);
  transform: translateY(-2px);
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.header--scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-accent, #E8F5E9);
}

.header__logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary, #1B5E20);
  white-space: nowrap;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text, #1a1a2e);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary, #1B5E20);
  transition: width 0.3s;
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--color-primary, #1B5E20);
}

.header__nav-link:hover::after,
.header__nav-link.active::after {
  width: 100%;
}

/* Dark mode toggle */
.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--color-text-light, #6B7280);
  padding: 0.4rem;
  border-radius: 50%;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-toggle:hover {
  background: var(--color-accent, #E8F5E9);
  color: var(--color-primary, #1B5E20);
}

.dark-toggle--mobile {
  display: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Burger menu (mobile) */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-primary, #1B5E20);
  border-radius: 3px;
  transition: all 0.3s;
}

.header__burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.header__burger.active span:nth-child(2) {
  opacity: 0;
}
.header__burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-primary-dark, #0D3B0F);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--color-primary-dark, #0D3B0F) 0%,
    var(--color-primary, #1B5E20) 50%,
    var(--color-primary-light, #4CAF50) 100%
  );
  opacity: 0.65;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero__title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero__slogan {
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  opacity: 0.92;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 0.85rem;
  opacity: 0.7;
  animation: bounce 2s infinite;
  z-index: 2;
}

/* ============================================================
   STATS / CHIFFRES CLÉS
   ============================================================ */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stats__item {
  padding: 1.5rem;
}

.stats__icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.stats__counter {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary, #1B5E20);
  display: block;
  margin-bottom: 0.25rem;
}

.stats__label {
  font-size: 0.95rem;
  color: var(--color-text-light, #6B7280);
}

/* ============================================================
   ABOUT / MOT DU DIRECTEUR
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about__text p {
  font-size: 1.1rem;
  color: var(--color-text-light, #6B7280);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about__stats {
  display: flex;
  gap: 2rem;
}

.about__stat {
  text-align: center;
}

.about__stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary, #1B5E20);
}

.about__stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light, #6B7280);
}

.about__image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about__img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* Director Card */
.director {
  margin-top: 4rem;
}

.director__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--color-surface, #FFFFFF);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-left: 5px solid var(--color-secondary, #FF8F00);
}

.director__photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 4px solid var(--color-accent, #E8F5E9);
}

.director__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.director__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-secondary, #FF8F00);
  margin-bottom: 0.75rem;
}

.director__message {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text, #1a1a2e);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  quotes: none;
}

.director__name {
  display: block;
  font-size: 1.05rem;
  color: var(--color-primary-dark, #0D3B0F);
}

.director__title {
  font-size: 0.9rem;
  color: var(--color-text-light, #6B7280);
}

/* ============================================================
   VALEURS
   ============================================================ */
.values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.value-card {
  background: var(--color-surface, #FFFFFF);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.value-card__icon {
  font-size: 2.25rem;
  display: block;
  margin-bottom: 1rem;
}

.value-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark, #0D3B0F);
  margin-bottom: 0.5rem;
}

.value-card__desc {
  font-size: 0.92rem;
  color: var(--color-text-light, #6B7280);
  line-height: 1.6;
}

/* ============================================================
   PROGRAMS / NIVEAUX
   ============================================================ */
.programs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.program-card {
  background: var(--color-surface, #FFFFFF);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--card-color, var(--color-primary, #1B5E20));
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.program-card__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.program-card__name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary-dark, #0D3B0F);
  margin-bottom: 0.5rem;
}

.program-card__grades {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-light, #4CAF50);
  margin-bottom: 1rem;
}

.program-card__desc {
  font-size: 0.95rem;
  color: var(--color-text-light, #6B7280);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.program-card__ages {
  display: inline-block;
  background: var(--color-accent, #E8F5E9);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary, #1B5E20);
}

/* ============================================================
   TÉMOIGNAGES — Slider
   ============================================================ */
.testimonials__slider {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  min-height: 260px;
  overflow: hidden;
}

.testimonial-card {
  position: absolute;
  inset: 0;
  background: var(--color-surface, #FFFFFF);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-top: 4px solid var(--color-secondary, #FF8F00);
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
  position: relative;
}

.testimonial-card__photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--color-accent, #E8F5E9);
}

.testimonial-card__text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-text, #1a1a2e);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.testimonial-card__name {
  font-weight: 700;
  color: var(--color-primary-dark, #0D3B0F);
  display: block;
}

.testimonial-card__role {
  font-size: 0.85rem;
  color: var(--color-text-light, #6B7280);
}

.testimonials__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.testimonials__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s;
}

.testimonials__dot.active {
  background: var(--color-primary, #1B5E20);
  transform: scale(1.3);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.gallery__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery__item:hover::after {
  opacity: 1;
}

/* Lightbox */
.gallery__lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.gallery__lightbox.active {
  display: flex;
}

.gallery__lightbox-img {
  max-width: 85%;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.gallery__lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 3;
}

.gallery__lightbox-close:hover {
  color: var(--color-secondary, #FF8F00);
}

.gallery__lightbox-prev,
.gallery__lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  padding: 1rem 0.75rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.3s;
  z-index: 3;
}

.gallery__lightbox-prev { left: 1rem; }
.gallery__lightbox-next { right: 1rem; }

.gallery__lightbox-prev:hover,
.gallery__lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   ÉVÉNEMENTS
   ============================================================ */
.events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.event-card {
  display: flex;
  gap: 1.25rem;
  background: var(--color-surface, #FFFFFF);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.event-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-primary, #1B5E20);
  color: #fff;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
}

.event-card__day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.event-card__month {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 2px;
}

.event-card__icon {
  font-size: 1.8rem;
}

.event-card__info {
  flex: 1;
}

.event-card__title {
  font-weight: 700;
  color: var(--color-primary-dark, #0D3B0F);
  margin-bottom: 0.35rem;
}

.event-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-light, #6B7280);
  line-height: 1.5;
}

/* ============================================================
   PARTENAIRES
   ============================================================ */
.partners__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}

.partners__item {
  background: var(--color-surface, #FFFFFF);
  border-radius: 12px;
  padding: 1.25rem 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.partners__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.partners__item img {
  height: 55px;
  width: auto;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.3s;
}

.partners__item:hover img {
  opacity: 1;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter__box {
  background: linear-gradient(135deg, var(--color-primary-dark, #0D3B0F), var(--color-primary, #1B5E20));
  border-radius: 20px;
  padding: 3rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: #fff;
}

.newsletter__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.newsletter__desc {
  opacity: 0.9;
  max-width: 400px;
}

.newsletter__form {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  max-width: 500px;
}

.newsletter__input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s;
}

.newsletter__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter__input:focus {
  border-color: var(--color-secondary, #FF8F00);
}

.newsletter__form .btn--primary {
  background: var(--color-secondary, #FF8F00);
  color: #1a1a2e;
}

.newsletter__form .btn--primary:hover {
  background: var(--color-secondary-light, #FFB300);
}

.newsletter__success {
  display: none;
  width: 100%;
  text-align: center;
  font-weight: 600;
  animation: fadeInUp 0.4s ease;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-primary-dark, #0D3B0F);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 4rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer__brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer__desc {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.footer__social-link:hover {
  background: var(--color-secondary, #FF8F00);
  transform: translateY(-3px);
}

.footer__heading {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
}

.footer__heading::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--color-secondary, #FF8F00);
  margin-top: 0.4rem;
}

.footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.93rem;
  line-height: 1.5;
}

.footer__contact li i {
  color: var(--color-secondary, #FF8F00);
  font-size: 0.95rem;
  margin-top: 3px;
}

.footer__links li {
  margin-bottom: 0.65rem;
}

.footer__links a {
  font-size: 0.93rem;
  transition: color 0.3s;
}

.footer__links a:hover {
  color: var(--color-secondary, #FF8F00);
}

.footer__map {
  border-radius: 8px;
  overflow: hidden;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer__bottom strong {
  color: var(--color-secondary, #FF8F00);
  font-weight: 700;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary, #1B5E20);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-dark, #0D3B0F);
  transform: translateY(-3px);
}

/* ============================================================
   WHATSAPP FLOATING
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 7rem;
  right: 2rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  animation: none;
}

@keyframes pulse-whatsapp {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40%                     { transform: translateX(-50%) translateY(-10px); }
  60%                     { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablettes */
@media (max-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .values__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__grid {
    grid-template-columns: 1fr;
  }
  .about__image {
    order: -1;
  }
  .programs__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .events__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobiles */
@media (max-width: 768px) {
  .dark-toggle {
    display: none;
  }
  .dark-toggle--mobile {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--color-surface, #fff);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.35s, opacity 0.35s;
  }

  .header__nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 1.25rem;
  }

  .header__burger {
    display: flex;
  }

  .hero__title { font-size: 2.25rem; }
  .hero__slogan { font-size: 1.1rem; }

  .section { padding: 3.5rem 0; }
  .section__title { font-size: 1.75rem; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .values__grid { grid-template-columns: 1fr; }
  .about__stats { flex-wrap: wrap; gap: 1.5rem; }

  .director__card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .director__photo {
    margin: 0 auto;
    width: 110px;
    height: 110px;
  }

  .programs__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .events__grid { grid-template-columns: 1fr; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); }

  .newsletter__box {
    flex-direction: column;
    text-align: center;
  }
  .newsletter__form {
    flex-direction: column;
    max-width: 100%;
  }

  .footer__grid { grid-template-columns: 1fr; }

  .hero__cta { flex-direction: column; align-items: center; }

  .back-to-top { bottom: 1.5rem; right: 1rem; }
  .whatsapp-float { bottom: 5.5rem; right: 1rem; }

  .gallery__lightbox-prev { left: 0.5rem; padding: 0.5rem; }
  .gallery__lightbox-next { right: 0.5rem; padding: 0.5rem; }
}

/* Petits mobiles */
@media (max-width: 480px) {
  .hero__title { font-size: 1.75rem; }
  .hero__slogan { font-size: 1rem; }
  .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stats__counter { font-size: 2rem; }
}