/* =========================================================
   École Emmanuel — Feuille de style
   Palette et réglages principaux regroupés ci-dessous :
   tu peux changer les couleurs en un seul endroit.
   ========================================================= */

:root {
  --green:        #1f6e5c;   /* couleur principale */
  --green-dark:   #154a3e;
  --terracotta:   #e07a3f;   /* couleur d'accent (chaleur, soleil) */
  --terracotta-d: #c5632c;
  --cream:        #faf6ef;   /* fond clair */
  --sand:         #f0e9dc;   /* fond alterné */
  --ink:          #2b2926;   /* texte */
  --ink-soft:     #5c574f;   /* texte secondaire */
  --white:        #ffffff;
  --shadow:       0 18px 40px -18px rgba(21, 74, 62, .35);
  --radius:       18px;
  --maxw:         1140px;
  --serif:        "Fraunces", Georgia, "Times New Roman", serif;
  --sans:         "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.12; font-weight: 600; color: var(--ink); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 10px 24px -10px rgba(224,122,63,.8); }
.btn-primary:hover { background: var(--terracotta-d); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.6); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.25); }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-lg { padding: 18px 38px; font-size: 1.08rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,239,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(43,41,38,.07);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px -16px rgba(0,0,0,.4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  background: var(--green); color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
  border-radius: 12px;
}
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; line-height: 1.05; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--sans); font-weight: 600; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: .98rem; position: relative; }
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--terracotta); transition: width .22s ease;
}
.site-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { background: var(--green); color: #fff !important; padding: 9px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--green-dark); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  color: #fff;
  /* Voile vert par-dessus la photo. Pour rendre la photo PLUS visible,
     baisse les 2 opacités (le .60 = côté gauche/texte, le .15 = côté droit). */
  background:
    linear-gradient(120deg, rgba(21,74,62,.60), rgba(21,74,62,.15)),
    url("../assets/images/hero.jpg") center/cover no-repeat,
    linear-gradient(120deg, var(--green-dark), var(--green));
  background-blend-mode: normal;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(21,74,62,.55), transparent 45%); }
.hero-content { position: relative; max-width: 720px; padding-top: 40px; padding-bottom: 60px; text-shadow: 0 2px 14px rgba(15,40,33,.45); }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 700; color: #ffd9bf; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); color: #fff; margin-bottom: 22px; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 600px; color: rgba(255,255,255,.92); margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: rgba(255,255,255,.85); font-size: 1.6rem; text-decoration: none;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- Chiffres clés ---------- */
.stats { background: var(--green); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 44px 24px; }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: #ffd9bf; }
.stat-label { font-size: .92rem; color: rgba(255,255,255,.85); }

/* ---------- Sections génériques ---------- */
.section { padding: 92px 0; }
.section-alt { background: var(--sand); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--terracotta); margin-bottom: 14px; }
.eyebrow-light { color: #ffd9bf; }
.section h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 18px; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-intro { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Bloc texte + image ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--sand); }
.media-caption {
  position: absolute; left: 18px; bottom: 18px;
  background: rgba(255,255,255,.92); color: var(--ink);
  padding: 8px 14px; border-radius: 10px; font-size: .85rem; font-weight: 600;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.4);
}
.split-text p { color: var(--ink-soft); margin-bottom: 16px; }
.split-text .btn { margin-top: 12px; }

/* ---------- Cartes (association) ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px 26px;
  box-shadow: 0 14px 30px -22px rgba(21,74,62,.5);
  border: 1px solid rgba(43,41,38,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Résultats aux examens ---------- */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.result-card { text-align: center; }
.result-exam { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); margin-bottom: 4px; }
.result-exam span { display: block; font-family: var(--sans); font-weight: 500; font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }
.result-rate { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.4rem); color: var(--green); line-height: 1; margin: 18px 0 10px; }
.result-unit { font-size: .8em; color: var(--ink-soft); font-weight: 600; margin-left: 5px; }
.result-detail { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
.gallery-item { overflow: hidden; border-radius: 14px; aspect-ratio: 4/3; background: var(--sand); box-shadow: 0 10px 24px -18px rgba(0,0,0,.5); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.07); }

/* ---------- Galerie : carrousel (pages de 6 photos) ---------- */
.gallery-carousel { position: relative; margin-bottom: 56px; }
.gallery-viewport {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: 14px;
}
.gallery-viewport::-webkit-scrollbar { display: none; }
.gallery-track { display: flex; }
.gallery-slide {
  flex: 0 0 100%; min-width: 100%; scroll-snap-align: start;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 4px;
}
/* Flèches de navigation */
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green-dark); color: #fff; box-shadow: var(--shadow);
  font-size: 1.7rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, opacity .2s ease;
}
.carousel-btn:hover { background: #0f3a30; }
.carousel-prev { left: -12px; }
.carousel-next { right: -12px; }
.carousel-btn[disabled] { opacity: .3; cursor: default; }
/* Points indicateurs de page */
.carousel-dots { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(0,0,0,.2); transition: background .2s ease, transform .2s ease;
}
.carousel-dots button.active { background: var(--terracotta); transform: scale(1.3); }

/* ---------- Vidéos ---------- */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.video-card { text-align: center; }
.video-player {
  /* Vidéos verticales (format téléphone 9:16). Pour des vidéos paysage,
     remettre aspect-ratio: 16/9 et retirer le max-width. */
  width: 100%; max-width: 340px; aspect-ratio: 9/16; border-radius: 14px;
  background: #000; box-shadow: var(--shadow); object-fit: cover;
  display: block; margin: 0 auto;
}
.video-title { margin-top: 14px; font-weight: 700; }

/* ---------- Nous aider ---------- */
.help {
  background:
    linear-gradient(135deg, rgba(21,74,62,.74), rgba(31,110,92,.9)),
    url("../assets/images/help.jpg") center/cover no-repeat,
    var(--green-dark);
  color: #fff; text-align: center;
}
.help-inner { max-width: 720px; margin: 0 auto; }
.help h2 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 20px; }
.help-lead { font-size: 1.15rem; color: rgba(255,255,255,.92); margin-bottom: 34px; }
.help-note { margin-top: 18px; font-size: .9rem; color: rgba(255,255,255,.7); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-footer { color: #fff; margin-bottom: 16px; }
.brand-footer .brand-text { color: #fff; }
.brand-footer .brand-text small { color: rgba(255,255,255,.6); }
.footer-about { font-size: .95rem; max-width: 320px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-links li { color: rgba(255,255,255,.78); font-size: .95rem; }
.footer-links a:hover { color: var(--terracotta); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: .88rem; color: rgba(255,255,255,.6); flex-wrap: wrap; gap: 10px; }
.back-top { color: rgba(255,255,255,.7); }
.back-top:hover { color: var(--terracotta); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,30,26,.92);
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.lightbox-close { position: absolute; top: 24px; right: 28px; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* ---------- Animations au défilement ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0;
    background: var(--cream); flex-direction: column; align-items: stretch;
    gap: 0; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.08);
    transform: translateY(-120%); transition: transform .3s ease; box-shadow: var(--shadow);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 14px 24px; }
  .nav-cta { margin: 8px 24px; text-align: center; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .gallery-slide { grid-template-columns: repeat(2, 1fr); }
  .carousel-btn { width: 38px; height: 38px; font-size: 1.4rem; }
  .carousel-prev { left: 2px; }
  .carousel-next { right: 2px; }
  .videos { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
