/* ══════════════════════════════════════════════════════════
   Site vitrine — Complexe Privé Laïc ESPOIR. Palette de marque
   identique à gestion_ecole_app (vert #118302, or #ffe200), pour
   que le site public et l'application interne se ressemblent.
   Feuille volontairement simple (rebâtie de zéro), pas de calque
   sombre/clair - un site vitrine public reste toujours en thème clair.
   ══════════════════════════════════════════════════════════ */
:root {
  --brand: #118302;
  --brand-dark: #0b5c02;
  --brand-light: #2fae1c;
  --brand-soft: #eaf7e6;
  --gold: #ffe200;
  --gold-text: #8a6d00;
  --gold-soft: #fff9d6;
  --text: #1c2620;
  --text-soft: #4b5a50;
  --text-dim: #8a978f;
  --border: #dce6de;
  --surface: #ffffff;
  --surface-2: #f5f9f4;
  --bg: #fbfdf9;
  --shadow-sm: 0 1px 3px rgba(17,131,2,.08);
  --shadow: 0 8px 24px rgba(17,131,2,.10);
  --r: 10px;
  --r-lg: 16px;
  --r-pill: 999px;
  --f-head: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --f-body: 'Inter', sans-serif;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ── HEADER ─────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--border);
}
.site-header .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; padding: .8rem 1.5rem; gap: 1rem; }
.nav-links-mobile-only { display: none; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-family: var(--f-head); font-weight: 800; font-size: 1.05rem; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--text-soft); font-weight: 600; font-size: .9rem; transition: color .2s; }
.nav-links a:hover { color: var(--brand); }
.btn-parent {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff !important; font-weight: 700; font-size: .85rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(17,131,2,.28);
  transition: transform .2s, box-shadow .2s;
}
.btn-parent:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(17,131,2,.32); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1.2rem; cursor: pointer; flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* ── HERO ───────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--brand-dark), var(--brand) 60%, var(--brand-light));
  color: #fff; padding: 4.5rem 1.5rem; text-align: center;
}
.hero .eyebrow { font-family: var(--f-head); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--gold); margin-bottom: .8rem; }
.hero h1 { font-family: var(--f-head); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; margin: 0 0 1rem; line-height: 1.1; }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.88); max-width: 620px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.btn-hero {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.7rem; border-radius: var(--r-pill);
  font-weight: 700; font-size: .92rem; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.btn-hero.primary { background: var(--gold); color: #3a2e00; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.btn-hero.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-hero:hover { transform: translateY(-2px); }

/* ── SECTIONS ───────────────────────── */
.section { padding: 4rem 1.5rem; }
.section.alt { background: var(--surface-2); }
.section-eyebrow { font-family: var(--f-head); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .74rem; color: var(--brand); text-align: center; margin-bottom: .6rem; }
.section-title { font-family: var(--f-head); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; text-align: center; margin: 0 0 .8rem; color: var(--text); }
.section-lede { text-align: center; color: var(--text-soft); max-width: 620px; margin: 0 auto 2.6rem; font-size: 1rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: var(--r); margin-bottom: 1rem;
  background: var(--brand-soft); color: var(--brand); font-size: 1.4rem;
}
.card h3 { font-family: var(--f-head); font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem; }
.card p { color: var(--text-soft); font-size: .92rem; margin: 0; line-height: 1.55; }

/* ── PHOTOTHÈQUE (établissement / salles) ──────────── */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.photo-grid-4 { grid-template-columns: repeat(4, 1fr); }
.photo-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
}
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.photo-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-placeholder {
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 2.2rem;
}
.photo-label { padding: .8rem 1rem; font-weight: 700; font-size: .85rem; color: var(--text); text-align: center; }

/* ── ÉQUIPE PÉDAGOGIQUE ─────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.team-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 1.4rem 1rem; text-align: center; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.team-photo, .team-photo-placeholder {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto .9rem; object-fit: cover;
}
.team-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 2rem;
}
.team-name { font-family: var(--f-head); font-weight: 700; font-size: .92rem; color: var(--text); }
.team-role { font-size: .8rem; color: var(--text-soft); margin-top: .2rem; }

/* ── FORMS ──────────────────────────── */
.form-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; overflow: hidden;
}
.form-card-head { padding: 1.6rem 2rem; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.form-card-head h2 { font-family: var(--f-head); font-size: 1.2rem; margin: 0 0 .3rem; }
.form-card-head p { margin: 0; font-size: .85rem; color: rgba(255,255,255,.85); }
.form-card-body { padding: 1.8rem 2rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .8rem; font-weight: 700; color: var(--text-soft); margin-bottom: .4rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--f-body); font-size: .92rem; padding: .68rem .9rem;
  border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field textarea { resize: vertical; min-height: 110px; }

.btn-submit {
  width: 100%; padding: .85rem; border: none; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
  font-weight: 700; font-size: .92rem; cursor: pointer; box-shadow: 0 4px 14px rgba(17,131,2,.3);
  transition: opacity .2s, transform .2s;
}
.btn-submit:hover { opacity: .93; transform: translateY(-1px); }

.alert { padding: .9rem 1.1rem; border-radius: var(--r); font-size: .88rem; font-weight: 600; margin-bottom: 1.2rem; }
.alert.success { background: var(--brand-soft); color: var(--brand-dark); border: 1.5px solid rgba(17,131,2,.25); }
.alert.error { background: #fdeceb; color: #b3261e; border: 1.5px solid rgba(179,38,30,.25); }

/* ── TABLES (bulletin) ─────────────── */
.table-shell { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: .75rem 1rem; font-family: var(--f-head); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); background: var(--surface-2); text-align: center; border-bottom: 2px solid var(--border); }
thead th:first-child { text-align: left; padding-left: 1.4rem; }
tbody td { padding: .7rem 1rem; text-align: center; font-size: .9rem; border-bottom: 1px solid var(--border); }
tbody td:first-child { text-align: left; padding-left: 1.4rem; font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }

.stat-row { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.stat-box { flex: 1; min-width: 140px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 1.2rem 1.4rem; text-align: center; box-shadow: var(--shadow-sm); }
.stat-box .label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .4rem; }
.stat-box .value { font-family: var(--f-head); font-size: 1.5rem; font-weight: 800; color: var(--brand); }

.badge { display: inline-block; padding: .3rem .8rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 700; }
.badge.paye { background: var(--brand-soft); color: var(--brand-dark); }
.badge.partiel { background: var(--gold-soft); color: var(--gold-text); }
.badge.impaye { background: #fdeceb; color: #b3261e; }

/* ── FOOTER ─────────────────────────── */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.85); padding: 2.6rem 1.5rem 1.6rem; margin-top: 3rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--f-head); font-size: .95rem; margin: 0 0 .8rem; }
.site-footer p, .site-footer a { color: rgba(255,255,255,.75); font-size: .85rem; text-decoration: none; line-height: 1.7; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { text-align: center; font-size: .78rem; color: rgba(255,255,255,.55); margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.15); }

/* ── UTIL ───────────────────────────── */
.text-center { text-align: center; }
.mt-2 { margin-top: 1.4rem; }
.small-link { font-size: .85rem; color: var(--text-soft); }

@media (max-width: 860px) {
  /* Nav mobile : menu déroulant sous le bandeau plutôt que des liens qui disparaissent sans
     moyen de les rouvrir (voir includes/header.php pour le bouton #navToggle + le script). */
  .nav-desktop-only { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1.5px solid var(--border);
    box-shadow: var(--shadow); padding: .5rem 1.5rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .8rem .2rem; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links-mobile-only { display: block; margin-top: .6rem; }
  .nav-links-mobile-only a.btn-parent { display: flex; justify-content: center; padding: .75rem 1.2rem; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-row { flex-direction: column; }
  .site-footer .wrap { flex-direction: column; gap: 1.4rem; }
  .photo-grid, .photo-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3.2rem 1.2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-hero { justify-content: center; }
  .section { padding: 2.8rem 1.2rem; }
}

@media (max-width: 480px) {
  .photo-grid, .photo-grid-4, .team-grid { grid-template-columns: 1fr; }
  .brand span { display: none; }
}
