
:root {
  --primary: #6bbb43;
  --primary-dark: #858585;
  --accent: #ffd166;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #dbe4ee;
  --success: #107c41;
  --danger: #c62828;
  --shadow: 0 18px 40px rgba(15, 76, 129, 0.12);
  --radius: 22px;
  --container: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #eef4fa;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }
.section { padding: 1rem 0; }
.section-sm { padding: 2.5rem 0; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .9rem; border-radius: 999px;
  margin-bottom: 10px;
  background: rgba(15, 76, 129, .08); color: var(--primary);
  font-weight: 700; font-size: .92rem;
}
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head h1, .section-head h2, .hero-text h1 {
  margin: .35rem 0 1rem; line-height: 1.06; letter-spacing: -.03em;
}
.section-head p, .hero-text p, .muted { color: var(--muted); }
.page-hero {
  padding: 4rem 0 0;
  background: #eef4fa 100%;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(18px);
  background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(219,228,238,.7);
}
.header-wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px;
}
.logo {
  display:flex; align-items:center; gap:.9rem; font-weight: 800; letter-spacing:-.02em;
}
.logo-mark {
  width: 44px; height: 44px; border-radius: 14px;
  display:grid; place-items:center; color:#fff; background: linear-gradient(135deg, var(--primary), #2f7ac0);
  box-shadow: 0 12px 25px rgba(15,76,129,.25);
}
.logo small { display:block; color: var(--muted); font-weight: 600; }
.nav-toggle {
  display:none; background: transparent; border: 0; width: 46px; height: 46px; border-radius: 12px;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content:""; display:block; width:24px; height:2px; margin:6px auto; background: var(--text); transition:.25s;
}
.site-nav ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  flex-wrap: nowrap;
}
.site-nav a {
  display: block;
  padding: .75rem .8rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}
.site-nav a:hover, .site-nav a.active { background: rgba(15, 76, 129, .08); color: var(--primary); }
.hero {
  padding: 1.75rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1.5rem;
  align-items: center;
}

.hero-text {
  max-width: 100%;
}

.hero-text .actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 50px;
  padding: 0 1.2rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: .2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 28px rgba(15, 76, 129, .18);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.hero-media {
  padding: 0;
  overflow: hidden;
  border-radius: 30px;
  position: relative;
  min-height: 250px;
  margin: 0;
  background: linear-gradient(180deg, rgba(15,76,129,.05), rgba(15,76,129,.14));
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-stats {
  position:absolute; right:1rem; left:1rem; bottom:1rem; display:grid; grid-template-columns:repeat(3,1fr); gap:.8rem;
}
.stat {
  background: rgba(255,255,255,.9); border:1px solid rgba(255,255,255,.7); padding: 1rem; border-radius: 18px;
}
.stat strong { display:block; font-size:1.35rem; }
.grid-3, .grid-4, .grid-2 {
  display:grid; gap:1.2rem;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-card, .news-card, .team-card, .infra-card, .doc-card, .project-card, .contact-card, .photo-card {
  padding: 1.15rem;
}
.feature-card h3, .news-card h3, .team-card h3, .infra-card h3, .doc-card h3, .project-card h3, .contact-card h3 { margin: .4rem 0 .6rem; }
.image-shell { overflow:hidden; border-radius: 18px; margin-bottom: 1rem; }
.image-shell img { width:100%; aspect-ratio: 16/11; object-fit:cover; transition: transform .35s ease; }
.card:hover .image-shell img { transform: scale(1.03); }
.meta { display:flex; gap:.8rem; flex-wrap:wrap; color: var(--muted); font-size:.92rem; }
.news-list { display:grid; gap: 1rem; }
.news-card { display:grid; gap: .9rem; }
.news-card p:last-child { margin-bottom:0; }
.filters {
  display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between; margin-bottom: 1.4rem;
}
.select-wrap select, .field input, .field textarea {
  width:100%; border:1px solid var(--border); background:#fff; border-radius: 14px; padding: .95rem 1rem;
  outline:none;
}
.select-wrap select:focus, .field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15,76,129,.1); }
.team-card .role { color: var(--primary); font-weight: 700; }
.doc-card .doc-meta { display:flex; justify-content:space-between; gap:1rem; color: var(--muted); font-size: .92rem; }
.doc-card .doc-actions { display:flex; gap:.8rem; flex-wrap:wrap; margin-top:1rem; }
.project-card ul { padding-left: 1.2rem; color: var(--muted); }
.contact-layout { display:grid; grid-template-columns: 1.08fr .92fr; gap:1.4rem; }
.form-grid { display:grid; gap:1rem; }
.field label { display:block; margin-bottom:.45rem; font-weight:700; }
.field textarea { min-height: 170px; resize: vertical; }
.form-note { font-size: .92rem; color: var(--muted); }
.alert {
  padding: 1rem 1.1rem; border-radius: 16px; margin-bottom:1rem; font-weight: 700;
}
.alert-success { background: rgba(16,124,65,.09); color: var(--success); border:1px solid rgba(16,124,65,.18); }
.alert-error { background: rgba(198,40,40,.08); color: var(--danger); border:1px solid rgba(198,40,40,.16); }
.map-embed {
  min-height: 180px; border:0; width:100%; border-radius: 20px;
}
.site-footer {
  background: #74b64b; color: #dbe7f5; padding: 1.6rem 0 0.8rem; margin-top: 3rem;
}
.footer-grid { display:grid; grid-template-columns: 1fr 1fr 1fr; gap:1.2rem; align-items:start; }
.footer-card {
  background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); padding:0.8rem; border-radius: 20px;
}
.footer-card h3 { margin-top:0; color: #fff; }
.footer-bottom { margin-top:0.7rem; color: #aac0d7; font-size: .92rem; }
.gallery-grid {
  display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:1.2rem;
}
.photo-card figure { margin: 0; }
.photo-card .album-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:.8rem; }
.photo-card .count { color: var(--primary); font-weight:800; }
.photo-card .thumb img { aspect-ratio: 16/10; object-fit: cover; border-radius: 18px; }
.photo-card figcaption { margin-top: .8rem; color: var(--muted); }
.hidden { display:none !important; }
.newsletter {
  display:grid; grid-template-columns: 1.1fr .9fr; gap:1rem; align-items:center; padding:1.1rem;
}
.newsletter form { display:flex; gap:.8rem; flex-wrap:wrap; }
.newsletter form input { flex:1 1 220px; }
.lightbox {
  position:fixed; inset:0; background: rgba(7, 15, 24, .86); display:none; align-items:center; justify-content:center; z-index: 1200; padding:1rem;
}
.lightbox.open { display:flex; }
.lightbox-inner {
  width:min(1000px, 100%); position:relative; background:#08131f; border-radius: 24px; padding:1rem;
}
.lightbox-image img { width:100%; max-height: 70vh; object-fit: contain; border-radius: 18px; }
.lightbox-caption { color:#edf5ff; padding:.9rem .4rem .2rem; }
.lightbox-controls {
  position:absolute; inset:50% 0 auto 0; display:flex; justify-content:space-between; transform: translateY(-50%); pointer-events:none;
}
.lightbox-btn, .close-btn {
  pointer-events:all; border:0; background: rgba(255,255,255,.14); color:#fff; width:50px; height:50px; border-radius:50%; cursor:pointer;
}
.close-btn { position:absolute; top:1rem; right:1rem; }
.empty-state { padding: 2rem; text-align:center; color: var(--muted); }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
@media (max-width: 1024px) {
  .hero-grid, .contact-layout, .newsletter, .footer-grid, .grid-4, .grid-3, .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


.album-actions { margin-top: 1rem; }
.album-downloads {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.album-downloads strong {
  display: block;
  margin-bottom: .65rem;
  color: var(--text);
}
.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.download-list a {
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(15, 76, 129, .08);
  color: var(--primary);
  font-weight: 700;
  font-size: .9rem;
}
.download-list a:hover {
  background: rgba(15, 76, 129, .14);
}
.lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .9rem .4rem .2rem;
}
.lightbox-caption {
  color:#edf5ff;
  padding: 0;
}
.lightbox-download {
  white-space: nowrap;
}
@media (max-width: 820px) {
  .lightbox-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .lightbox-download {
    width: 100%;
  }
}

/* =========================
   ACTUALITÉS ULTRA VISIBLES
========================= */

.news-highlight-section {
  position: relative;
}

.news-highlight-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  padding: 0.9rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(90deg, #7f1d1d 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 14px 35px rgba(127, 29, 29, 0.22);
}

.news-alert-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.news-alert-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.news-featured-board {
  position: relative;
  padding: 2rem 1.5rem 1.5rem;
  margin-bottom: 1.8rem;
  border-left: 10px solid #dc2626;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,250,250,0.98)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 30px,
      rgba(15, 23, 42, 0.03) 31px
    );
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.12),
    0 6px 16px rgba(220, 38, 38, 0.10);
  transform: rotate(-0.4deg);
}

.news-featured-pin {
  position: absolute;
  top: -16px;
  left: 42px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffb4b4, #dc2626 70%);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.08),
    0 12px 24px rgba(220, 38, 38, 0.28);
}

.news-featured-pin::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
}

.news-featured-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.news-featured-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.news-featured-date {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 700;
}

.news-featured-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.6rem, 2vw, 2.3rem);
  line-height: 1.15;
  color: #111827;
}

.news-featured-text {
  margin: 0 0 1.2rem;
  max-width: 70ch;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.8;
}

.news-featured-btn {
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
}

/* actualités secondaires */
.news-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.news-card-small {
  position: relative;
  padding: 1.15rem 1rem 1rem;
  border-radius: 20px;
  background: #ffffff;
  border: 2px solid #f1f5f9;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card-small:hover {
  transform: translateY(-5px);
  border-color: #fecaca;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.news-card-small::before {
  content: "📰";
  position: absolute;
  top: -10px;
  right: 14px;
  font-size: 1.2rem;
  background: #fff;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.news-card-small .news-date {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #b91c1c;
}

.news-card-small h3 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  line-height: 1.35;
  color: #0f172a;
}

.news-card-small p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
  font-size: 0.96rem;
}

/* version mobile */
@media (max-width: 980px) {
  .news-secondary-grid {
    grid-template-columns: 1fr;
  }

  .news-featured-board {
    transform: none;
  }

  .news-featured-title {
    font-size: 1.45rem;
  }

  .news-featured-text {
    font-size: 1rem;
  }
}


@media (max-width: 820px) {
  .nav-toggle { display:block; }

  .site-nav {
    position: fixed;
    top: 78px;
    left: 1rem;
    right: 1rem;
    background:#fff;
    border:1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: .8rem;
    display:none;
  }

  .site-nav.open { display:block; }
  .site-nav ul { flex-direction:column; align-items:stretch; }
  .site-nav a { display:block; }

  .hero {
    padding: 1.5rem 0 1.25rem;
  }

  .hero-grid,
  .contact-layout,
  .grid-3,
  .grid-2,
  .grid-4,
  .gallery-grid,
  .newsletter,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 1rem;
  }

  .hero-text {
    padding-right: 0.15rem;
  }

  .hero-text h1 {
    margin-bottom: 0.8rem;
  }

  .hero-text p {
    margin-bottom: 0;
  }

  .hero-media {
    min-height: auto;
    border-radius: 24px;
  }

  .hero-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .hero-stats { grid-template-columns: 1fr; }
  .page-hero { padding-top: 7rem; }
}

@media (max-width: 820px) {

  .hero {
    position: relative;
    background-image: url("../images/photo-ecole-acceuil.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 1.5rem 0;

  }
  

  .page-hero {
    padding-top: 4rem;
    padding-bottom: 0rem;
  }

    .section-sm{
      padding-top: 0rem;
    }
  /* overlay transparent pour lire le texte */
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
  }

  .page-hero{
     background: #eef4fa 100%;

  }

  /* texte au-dessus de l'image */
  .hero .container {
    position: relative;
    z-index: 2;
  }

  /* cacher l'image de droite */
  .hero-media {
    display: none;
  }
  
  .news-highlight-section {
    margin-top: 2.5rem;
  }

  .container.section-head
  {
    margin-left: 20px;
  }
}


.nav-toggle.active span {
  opacity: 0;
}

.nav-toggle.active::before {
  transform: rotate(50deg) translateY(9px) translateX(2px);
}

.nav-toggle.active::after {
  transform: rotate(-50deg) translateY(-11px) translateX(1px);
}

@media (max-width: 1024px) {

.hero {
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;

  background: linear-gradient(
    to bottom,
    rgba(238,244,250,0) 0%,
    rgba(238,244,250,0.4) 40%,
    #eef4fa 100%
  );

  pointer-events: none;
}

}