:root {
  --kaki: #52632F;
  --kaki-deep: #33401D;
  --ecorce: #2B2114;
  --sable: #F4EEDD;
  --brume: #FBF9F2;
  --or: #D9A63E;
  --rouge: #B23A2E;
  --encre-soft: #5A5645;
  --line: rgba(43,33,20,0.14);
  --radius: 18px;
  --font-display: 'Bitter', serif;
  --font-body: 'Nunito Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ecorce); background: var(--brume); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- NAV ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,249,242,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
header.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(43,33,20,0.06); }
nav.main-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 32px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.15; }
.brand .brand-badge { width: 40px; height: 40px; flex-shrink: 0; transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.brand:hover .brand-badge { transform: rotate(-10deg) scale(1.08); }
.brand .brand-sub { font-family: var(--font-mono); font-weight: 500; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--encre-soft); display: block; }

.nav-links { display: flex; gap: 28px; font-weight: 600; font-size: 0.92rem; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--rouge); transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.65,0,.35,1);
}
.nav-links a:hover::after { transform: scaleX(1); }

.btn {
  font-weight: 700; font-size: 0.88rem; padding: 12px 22px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease, background .3s ease;
}
.btn-rouge { background: var(--rouge); color: var(--brume); }
.btn-rouge:hover { background: var(--kaki-deep); transform: translateY(-3px) rotate(-1deg); box-shadow: 0 14px 26px -10px rgba(51,64,29,0.5); }
.btn-outline { border: 2px solid var(--line); color: var(--ecorce); background: transparent; }
.btn-outline:hover { border-color: var(--ecorce); transform: translateY(-3px); background: var(--sable); }
@media (max-width: 780px) { .nav-links { display: none; } }

/* ---------- HERO CAROUSEL ---------- */
.hero-carousel { position: relative; overflow: hidden; min-height: clamp(500px, 62vw, 640px); color: var(--brume); }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; z-index: 0;
  transition: opacity 0.9s ease;
  display: flex; align-items: flex-end;
}
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide-bg.gradient-bg { background: radial-gradient(circle at 82% 15%, var(--kaki), var(--kaki-deep) 72%); }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30,23,13,0.88) 0%, rgba(30,23,13,0.45) 55%, rgba(30,23,13,0.25) 100%); }
.slide .compass { position: absolute; right: -100px; top: -80px; width: 480px; height: 480px; opacity: 0.4; }
.slide .compass circle { fill: none; stroke: rgba(251,249,242,0.4); }
.slide .compass .needle { transform-origin: 240px 240px; animation: sway 7s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

.slide-content { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 0 32px 100px; width: 100%; }
.slide-content .inner { max-width: 620px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.03em;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(251,249,242,0.14); border: 1px solid rgba(251,249,242,0.28);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--or); }
.slide h1, .slide h2.slide-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.15; }
.slide h1 em { font-style: italic; color: var(--or); }
.slide p.lead { margin-top: 16px; font-size: 1.02rem; opacity: 0.92; max-width: 480px; line-height: 1.6; }
.hero-ctas { margin-top: 26px; display: flex; gap: 16px; flex-wrap: wrap; }
.slide .btn-outline { border-color: rgba(251,249,242,0.35); color: var(--brume); }
.slide .btn-outline:hover { border-color: var(--brume); background: rgba(251,249,242,0.1); }

/* Arrows */
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(251,249,242,0.35);
  background: rgba(43,33,20,0.35); color: var(--brume); font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, transform .25s ease;
}
.carousel-arrow:hover { background: rgba(43,33,20,0.65); transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { left: 20px; }
.carousel-arrow.next { right: 20px; }

/* Dots */
.carousel-dots { position: absolute; bottom: 128px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(251,249,242,0.4); border: none; cursor: pointer; padding: 0; transition: background .25s ease, transform .25s ease; }
.dot.active { background: var(--or); transform: scale(1.3); }

/* Badge stats overlapping the bottom of the carousel */
.badge-row { position: absolute; left: 0; right: 0; bottom: -46px; z-index: 4; max-width: 1180px; margin: 0 auto; padding: 0 32px; display: flex; gap: 16px; flex-wrap: wrap; }
.badge {
  background: var(--brume); color: var(--ecorce); border-radius: 16px; padding: 18px 16px; flex: 1; min-width: 120px;
  text-align: center; box-shadow: 0 24px 50px -20px rgba(0,0,0,0.4);
  transform: rotate(-2deg); transition: transform .4s ease;
  border-top: 4px solid var(--or);
}
.badge:nth-child(2) { transform: rotate(1.5deg); border-top-color: var(--rouge); }
.badge:nth-child(3) { transform: rotate(-1deg); border-top-color: var(--kaki); }
.badge:hover { transform: rotate(0deg) translateY(-6px); }
.badge .num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--kaki-deep); }
.badge .lab { font-size: 0.74rem; color: var(--encre-soft); margin-top: 4px; }

.hero-carousel + section { padding-top: 130px; }

@media (max-width: 780px) {
  .carousel-arrow { width: 36px; height: 36px; }
  .carousel-dots { bottom: 156px; }
  .badge-row { bottom: -60px; }
}

/* ---------- SECTIONS ---------- */
section { padding: 80px 32px; }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head .eyebrow { background: var(--sable); border-color: var(--line); color: var(--ecorce); }
.section-head .eyebrow .dot { background: var(--rouge); }
.section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 14px; }
.section-head p { margin-top: 12px; color: var(--encre-soft); font-size: 1rem; line-height: 1.6; }
.section-sable { background: var(--sable); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Prose blocks (mission/but/vision) */
.prose p { color: var(--encre-soft); line-height: 1.7; margin-bottom: 14px; font-size: 1.02rem; }
.prose p:last-child { margin-bottom: 0; }

.info-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.info-card { background: var(--brume); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: transform .3s ease, box-shadow .3s ease; }
.info-card:hover { transform: translateY(-6px); box-shadow: 0 20px 36px -18px rgba(43,33,20,0.18); }
.info-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 10px; }

/* ---------- MOT DU COMMISSAIRE ---------- */
.mot-band { max-width: 1180px; margin: 0 auto; background: var(--brume); border: 1px solid var(--line); border-radius: 28px; padding: 50px; display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
.mot-portrait { text-align: center; }
.mot-portrait .avatar-ring {
  width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  background: var(--kaki); color: var(--brume); font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  border: 5px solid var(--or); transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.mot-band:hover .avatar-ring { transform: rotate(-6deg) scale(1.05); }
.avatar-ring.avatar-photo { padding: 0; overflow: hidden; }
.avatar-ring.avatar-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mot-portrait .nom { font-family: var(--font-display); font-weight: 700; }
.mot-portrait .role { font-size: 0.82rem; color: var(--encre-soft); margin-top: 2px; }
.mot-text p { color: var(--encre-soft); line-height: 1.7; margin-bottom: 12px; }
.mot-text p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .mot-band { grid-template-columns: 1fr; padding: 34px; } }

/* ---------- VALEURS ---------- */
.valeurs-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(5,1fr); gap: 18px; }
.valeur-card {
  background: var(--brume); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px; text-align: center;
  position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, background .35s ease;
}
.valeur-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 22px 40px -18px rgba(43,33,20,0.22); background: var(--kaki); color: var(--brume); }
.valeur-icon { font-size: 1.9rem; display: inline-block; margin-bottom: 14px; transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.valeur-card:hover .valeur-icon { transform: scale(1.2) rotate(-8deg); }
.valeur-card h3 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 8px; }
.valeur-card p { font-size: 0.85rem; line-height: 1.5; color: var(--encre-soft); transition: color .35s ease; }
.valeur-card:hover p { color: rgba(251,249,242,0.9); }
@media (max-width: 960px) { .valeurs-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .valeurs-grid { grid-template-columns: 1fr; } }

/* ---------- ACTUS ---------- */
.actus-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.actu-card { background: var(--brume); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; }
.actu-card:hover { transform: translateY(-6px); box-shadow: 0 20px 36px -18px rgba(43,33,20,0.2); }
.actu-media { aspect-ratio: 16/10; overflow: hidden; background: var(--kaki); position: relative; }
.actu-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.actu-card:hover .actu-media img { transform: scale(1.07); }
.actu-media.no-image { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.actu-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.actu-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--rouge); }
.actu-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 8px 0 10px; line-height: 1.35; }
.actu-body p { color: var(--encre-soft); font-size: 0.88rem; line-height: 1.5; flex: 1; }
.actu-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 700; font-size: 0.85rem; color: var(--kaki-deep); }
.actu-link .arrow { transition: transform .3s ease; }
.actu-card:hover .actu-link .arrow { transform: translateX(5px); }
@media (max-width: 860px) { .actus-grid { grid-template-columns: 1fr; } }

/* ---------- STATS BAND ---------- */
.stats-band { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; text-align: center; }
.stat-item { padding: 30px 16px; border-radius: var(--radius); background: var(--kaki-deep); color: var(--brume); }
.stat-item .num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--or); }
.stat-item .lab { font-size: 0.85rem; opacity: 0.85; margin-top: 6px; }
@media (max-width: 700px) { .stats-band { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-band { max-width: 1180px; margin: 0 auto 90px; background: var(--kaki-deep); color: var(--brume); border-radius: 28px; padding: 60px 46px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, var(--rouge), transparent 70%); opacity: 0.28; top: -170px; left: -100px; }
.cta-band h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem,3.2vw,2.2rem); position: relative; z-index: 1; }
.cta-band p { margin-top: 12px; opacity: 0.85; position: relative; z-index: 1; }
.cta-band .hero-ctas { justify-content: center; margin-top: 26px; position: relative; z-index: 1; }
.cta-band .btn-outline { border-color: rgba(251,249,242,0.3); color: var(--brume); }
.cta-band .btn-outline:hover { border-color: var(--brume); background: rgba(251,249,242,0.08); }

/* ---------- FOOTER ---------- */
footer.site-footer { padding: 40px 32px 50px; max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--encre-soft); font-size: 0.85rem; }
footer .foot-links { display: flex; gap: 20px; }
footer .foot-links a:hover { color: var(--rouge); }

/* ---------- SINGLE ACTU PAGE ---------- */
.single-header { background: var(--kaki-deep); color: var(--brume); padding: 60px 32px; }
.single-media img { width: 100%; max-width: 720px; margin: 0 auto; border-radius: 16px; }
.single-content { max-width: 720px; margin: 0 auto; padding: 50px 32px; line-height: 1.8; font-size: 1.03rem; }
.back-link { display: inline-flex; gap: 6px; margin-bottom: 18px; font-weight: 700; color: var(--brume); }

/* ---------- ADMIN ---------- */
body.admin-body { background: var(--sable); font-family: var(--font-body); }
.admin-wrap { max-width: 1040px; margin: 0 auto; padding: 40px 24px; }
.admin-card { background: var(--brume); border-radius: 16px; padding: 30px; border: 1px solid var(--line); margin-bottom: 24px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.admin-topbar h1 { font-family: var(--font-display); font-size: 1.5rem; }
.admin-nav { display: flex; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.admin-nav a { padding: 9px 16px; border-radius: 999px; background: var(--brume); border: 1px solid var(--line); font-size: 0.88rem; font-weight: 700; transition: background .2s ease; }
.admin-nav a:hover, .admin-nav a.active { background: var(--kaki); color: var(--brume); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.admin-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--encre-soft); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); font-family: var(--font-body); font-size: 0.93rem; }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 0.88rem; }
.alert-success { background: #E5EEDA; color: var(--kaki-deep); }
.alert-error { background: #F6DCD8; color: #7A2A20; }
.icon-btn { font-size: 0.83rem; font-weight: 700; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--brume); cursor: pointer; }
.icon-btn.danger { color: #B23A2E; border-color: #EFC5BE; }
.login-box { max-width: 380px; margin: 100px auto; }
.hint { font-size: 0.8rem; color: var(--encre-soft); margin-top: -10px; margin-bottom: 16px; }
