/* ===========================================================
   Cegelam — Design system (style éditorial / agence)
   =========================================================== */
:root {
  --ink:        #2B2118;   /* brun-noir chaud */
  --ink-soft:   #6B5849;   /* texte secondaire */
  --cream:      #FAF6F0;   /* sable clair */
  --cream-2:    #FDF9F4;
  --orange:     #C4623D;   /* terracotta — couleur de marque */
  --orange-deep:#98401F;
  --orange-50:  #FBEDE6;   /* tint clair */
  --amber:      #E0A458;   /* ambre — accent secondaire */
  --line:       #E8DDD1;
  --white:      #FFFFFF;

  --sans:  "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;

  --radius:   22px;
  --radius-s: 14px;
  --shadow:   0 2px 6px rgba(60,40,26,.04), 0 18px 40px rgba(60,40,26,.06);
  --shadow-h: 0 6px 16px rgba(60,40,26,.07), 0 28px 60px rgba(60,40,26,.12);
  --maxw: 1200px;
  --ease: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.05; color: var(--ink); letter-spacing: -.025em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; letter-spacing: -.02em; }
/* mot-accent en serif italique */
.accent { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1.04em; letter-spacing: -.01em; }
.accent--o { color: var(--orange); }
p  { margin: 0 0 1rem; }
a  { color: var(--ink); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--orange); }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.section   { padding: clamp(60px, 9vw, 116px) 0; }
.section--cream { background: var(--cream); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--orange); margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--orange); display: inline-block; }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 62ch; line-height: 1.65; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .92em 1.7em; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: all .22s var(--ease); white-space: nowrap;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-deep); color:#fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(196,98,61,.34); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color:#fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn .arr { transition: transform .22s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand img { height: 40px; width: auto; }
.brand b { font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 500; color: var(--ink-soft); font-size: .96rem; }
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s var(--ease); }

/* ---------- Hero ---------- */
.hero { background: var(--cream-2); }
.hero .container { padding-top: clamp(48px,7vw,84px); padding-bottom: clamp(48px,7vw,84px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: stretch; }
.hero-logo { height: 64px; width: auto; margin-bottom: 1.6rem; }
.hero h1 { max-width: 14ch; margin-bottom: .5em; }
.hero .lead { font-size: 1.24rem; }
.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero-panel {
  border-radius: var(--radius); padding: 38px; color: #fff;
  background: radial-gradient(120% 120% at 80% 0%, #E0A458 0%, #C4623D 45%, #7A3419 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 24px 60px rgba(196,98,61,.30); min-height: 340px;
}
.hero-panel p { color: rgba(255,255,255,.92); font-size: 1.16rem; line-height: 1.5; margin: 0; }
.hero-panel .big { font-family: var(--serif); font-style: italic; font-size: 3.4rem; line-height: 1; margin-bottom: .2em; }
.hero-panel .small { font-size: .92rem; color: rgba(255,255,255,.85); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px;
  box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-h); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.3rem;
  display: grid; place-items: center; background: var(--orange-50); color: var(--orange-deep);
}
.card .ico svg { width: 26px; height: 26px; }
.card p { color: var(--ink-soft); margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 28px; }
.stat { border-top: 2px solid var(--ink); padding-top: 18px; }
.stat .num { font-weight: 800; font-size: clamp(2.6rem,5vw,3.6rem); line-height: 1; letter-spacing: -.04em; }
.stat .num em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--orange); }
.stat .lab { color: var(--ink-soft); font-size: .96rem; margin-top: .6rem; }

/* ---------- Écoles ---------- */
.map {
  height: 480px; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); margin-bottom: 38px; overflow: hidden;
  position: relative; z-index: 0; background: var(--cream);
}
.leaflet-container { font-family: var(--sans); }
.pin svg { display: block; filter: drop-shadow(0 3px 4px rgba(21,21,31,.3)); }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-h); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.45; }
.map-pop .commune { font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--orange); }
.map-pop b { display: block; font-size: .98rem; margin: .15rem 0 .35rem; color: var(--ink); }
.map-pop span, .map-pop a { font-size: .86rem; color: var(--ink-soft); }
.map-pop a { display: inline-block; margin-top: .2rem; color: var(--orange); font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 30px; }
.filters input, .filters select {
  font-family: var(--sans); font-size: .96rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px; padding: .75em 1.3em; background:#fff;
}
.filters input { flex: 1; min-width: 230px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--orange); }
.count { color: var(--ink-soft); font-size: .92rem; margin-left: auto; font-weight: 500; }

.schools { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.school {
  background:#fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.school:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.school .commune { font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--orange); margin-bottom: .55rem; }
.school h3 { font-weight: 700; font-size: 1.12rem; line-height: 1.25; margin-bottom: .8rem; }
.school .tag { display: inline-block; font-size: .78rem; font-weight: 500; background: var(--orange-50); color: var(--orange-deep); padding: .28em .8em; border-radius: 999px; margin-bottom: 1rem; }
.school dl { margin: 0; display: grid; gap: .42rem; font-size: .92rem; }
.school dl div { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-soft); }
.school dl svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--orange); }
.school dl a { color: var(--ink); }
.school dl a:hover { color: var(--orange); }
.school-site {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.1rem;
  font-size: .9rem; font-weight: 600; color: var(--orange);
  background: var(--orange-50); border: 1px solid transparent;
  padding: .6em 1em; border-radius: 999px; align-self: flex-start;
  transition: all .2s var(--ease);
}
.school-site:hover { background: var(--orange); color: #fff; transform: translateY(-1px); }
.school-site svg { width: 15px; height: 15px; }
.school-site .ext, .school-site svg:last-child { width: 13px; height: 13px; opacity: .8; }
.school-site span { letter-spacing: -.01em; }
.school .remarque { margin-top: 1.1rem; padding-top: 1rem; font-size: .82rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.note { font-size: .84rem; color: var(--ink-soft); margin-top: 26px; font-style: italic; }
.empty { grid-column: 1/-1; text-align: center; color: var(--ink-soft); padding: 44px 0; }

/* ---------- Governance split ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.infobox { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 40px; }
.infobox h3 { color: #fff; }
.infobox p { color: rgba(255,255,255,.72); }
.infobox dl { display: grid; gap: 1rem; margin: 1.6rem 0 0; }
.infobox dt { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--orange); font-weight: 600; }
.infobox dd { margin: .2rem 0 0; color: rgba(255,255,255,.92); }
.infobox a { color: #fff; }
.tick { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.tick li { padding-left: 2rem; position: relative; margin-bottom: .9rem; color: var(--ink-soft); }
.tick li b { color: var(--ink); }
.tick li::before { content: ""; position: absolute; left: 0; top: .45em; width: 11px; height: 11px; border-radius: 50%; background: var(--orange); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.66); padding: 64px 0 30px; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; }
.site-footer h4 { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--orange); margin: 0 0 1.1rem; font-weight: 600; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: var(--orange); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.foot-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.foot-brand img { height: 50px; background: #fff; border-radius: 12px; padding: 7px; }
.foot-brand b { color: #fff; font-size: 1.3rem; font-weight: 700; }
.site-footer .cols > div:first-child p { color: rgba(255,255,255,.6); }
.legal { border-top: 1px solid rgba(255,255,255,.13); margin-top: 46px; padding-top: 24px; font-size: .84rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ===========================================================
   Charte page (deliverable autonome)
   =========================================================== */
.swatches { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.swatch .chip { height: 100px; }
.swatch .meta { padding: 15px 17px; background:#fff; }
.swatch .meta b { display: block; font-size: .94rem; }
.swatch .meta code { font-size: .82rem; color: var(--ink-soft); }
.swatch .copied { color: var(--orange); font-weight: 600; }
.type-row { border-bottom: 1px solid var(--line); padding: 18px 0; display:flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap;}
.type-row small { color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }
.do-dont { display:grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dd { border-radius: var(--radius-s); padding: 26px; }
.dd--do  { background: var(--orange-50); border:1px solid #F3C9AE; }
.dd--dont{ background: #F3EFE8; border:1px solid var(--line); }
.dd h4 { margin:0 0 .6rem; }
.dd ul { margin:0; padding-left: 1.1rem; color: var(--ink-soft); }
.logo-demo { display:flex; gap: 24px; flex-wrap: wrap; }
.logo-demo > div { border:1px solid var(--line); border-radius: var(--radius-s); padding: 30px; flex:1; min-width: 200px; display:grid; place-items:center; }
.logo-demo img { height: 80px; }
.on-dark { background: var(--ink); }
.on-dark img { background:#fff; border-radius: 12px; padding: 11px; }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { min-height: auto; }
  .grid--3, .schools { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); gap: 36px 28px; }
  .swatches { grid-template-columns: repeat(2,1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .do-dont { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column;
    background:#fff; border-bottom: 1px solid var(--line); padding: 20px 26px; gap: 1.1rem;
    display: none; box-shadow: var(--shadow-h); align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .grid--3, .schools, .swatches { grid-template-columns: 1fr; }
  .count { width:100%; margin-left:0; }
  .site-footer .cols { grid-template-columns: 1fr; }
}
