﻿/* ==========================================================================
   SAMA XELL SAMA JÀMM — Feuille de styles principale
   Palette : vert (espoir) + orange (chaleur humaine)
   ========================================================================== */

:root {
    --green-900: #0f3d2a;
    --green-800: #145536;
    --green-700: #1a6b44;
    --green-600: #1f7a4d;
    --green-500: #2c9462;
    --green-100: #e3f3ea;
    --green-50: #f2faf6;
    --orange-700: #c25a12;
    --orange-600: #e87722;
    --orange-500: #f28c38;
    --orange-100: #fdebd9;
    --ink: #17211c;
    --muted: #5d6b63;
    --line: #e1e8e4;
    --bg: #f7f9f8;
    --white: #ffffff;
    --danger: #c0392b;
    --warning: #b7791f;
    --info: #2b6cb0;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(15, 61, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 61, 42, .14);
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Manrope', 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--orange-600); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--green-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--green-800); color: #fff; padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; color: #fff; }

/* ---------------- Boutons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
    font-family: var(--font-body); font-weight: 600; font-size: .95rem; cursor: pointer;
    transition: all .18s ease; text-align: center; line-height: 1.2;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--orange-600); color: #fff; box-shadow: 0 8px 20px rgba(232, 119, 34, .25); }
.btn-primary:hover { background: var(--orange-700); color: #fff; transform: translateY(-1px); }
.btn-green { background: var(--green-700); color: #fff; }
.btn-green:hover { background: var(--green-800); color: #fff; }
.btn-outline { background: transparent; border-color: var(--green-600); color: var(--green-700); }
.btn-outline:hover { background: var(--green-100); color: var(--green-800); }
.btn-ghost { background: transparent; color: var(--green-800); }
.btn-ghost:hover { background: var(--green-50); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a33224; color: #fff; }
.btn-sm { padding: .5rem .95rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---------------- Badges & alertes ---------------- */
.badge { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.badge-success { background: #e3f6ea; color: #1a6b44; }
.badge-info { background: #e4effb; color: #215c96; }
.badge-warning { background: #fdf1d8; color: #925f0d; }
.badge-danger { background: #fbe4e0; color: #a33224; }
.badge-primary { background: var(--orange-100); color: var(--orange-700); }
.badge-muted { background: #eef1f0; color: #55635b; }

.alert { position: relative; padding: .95rem 2.6rem .95rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border-left: 4px solid; font-size: .95rem; }
.alert-success { background: #eefaf3; border-color: var(--green-500); color: #155c3b; }
.alert-error { background: #fdefec; border-color: var(--danger); color: #8f2b1f; }
.alert-warning { background: #fdf6e7; border-color: var(--warning); color: #7d5412; }
.alert-info { background: #edf4fc; border-color: var(--info); color: #1f4f7a; }
.alert-close { position: absolute; right: .6rem; top: .5rem; background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: inherit; opacity: .6; }
.alert-close:hover { opacity: 1; }
.flash-wrap { padding-top: 1.2rem; }

/* ---------------- Formulaires ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.4rem; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 600; font-size: .88rem; color: var(--green-900); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field.required label::after { content: " *"; color: var(--orange-600); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="time"], input[type="number"], input[type="datetime-local"],
select, textarea {
    width: 100%; padding: .72rem .9rem; border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem;
    color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(44, 148, 98, .14); }
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { margin-top: .35rem; width: 18px; height: 18px; accent-color: var(--green-600); flex: 0 0 auto; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.form-section-title { font-family: var(--font-head); font-weight: 700; color: var(--green-800); margin: 1.6rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.form-section-title:first-child { margin-top: 0; }
.form-actions { margin-top: 1.6rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.inline-form { display: inline; }

/* ---------------- Topbar & navigation ---------------- */
.topbar { background: var(--green-900); color: #cfe8db; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; flex-wrap: wrap; padding-top: .25rem; padding-bottom: .25rem; }
.topbar-contacts { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.topbar a { color: #dff1e7; }
.topbar a:hover { color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-note { opacity: .75; }
.topbar-link { border: 1px solid rgba(255,255,255,.25); padding: .1rem .7rem; border-radius: 999px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--green-900); }
.brand-logo { height: 50px; width: auto; border-radius: 8px; object-fit: contain; }
.brand-fallback { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--green-700), var(--green-500)); color: #fff; font-family: var(--font-head); font-weight: 800; letter-spacing: .02em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: .98rem; letter-spacing: -.01em; }
.brand-text small { font-size: .7rem; color: var(--muted); font-weight: 500; }

.primary-nav { display: flex; align-items: center; gap: .15rem; }
.nav-link { background: none; border: 0; font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--green-900); padding: .6rem .9rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.nav-link:hover, .nav-link.active { background: var(--green-50); color: var(--green-700); }
.caret { width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); }

.nav-dropdown { position: relative; }
.nav-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .5rem; display: none; }
.nav-dropdown.open .nav-menu, .nav-dropdown:hover .nav-menu { display: block; }
.nav-menu a { display: block; padding: .6rem .8rem; border-radius: 9px; font-size: .9rem; color: var(--ink); }
.nav-menu a:hover { background: var(--green-50); color: var(--green-700); }
.nav-actions { display: flex; align-items: center; gap: .4rem; margin-left: .6rem; }

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

/* ---------------- Quiz QCM & resultats ---------------- */
.quiz-fail { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.quiz-fail-label { font-family:var(--font-head); font-weight:800; font-size:clamp(3rem, 10vw, 5rem); color:var(--danger); letter-spacing:.12em; animation:quiz-fail-pulse 1.2s ease-in-out infinite; }
@keyframes quiz-fail-pulse { 0%, 100% { transform:scale(1); opacity:1; } 50% { transform:scale(1.08); opacity:.75; } }
.quiz-result-wrap { display:flex; justify-content:center; margin-bottom:1.2rem; }
.quiz-result { display:flex; align-items:center; justify-content:center; min-width:220px; padding:1.6rem 2.4rem; border-radius:20px; background:var(--green-100); border:2px solid var(--green-500); }
.quiz-result.failed { background:#fbe4e0; border-color:var(--danger); }
.quiz-result.passed .quiz-result-label { color:var(--green-700); }
.quiz-result.failed .quiz-result-label { color:var(--danger); animation:quiz-fail-pulse 1.2s ease-in-out infinite; }
.quiz-result-label { font-family:var(--font-head); font-weight:800; font-size:clamp(2.4rem, 8vw, 3.6rem); letter-spacing:.08em; }
.quiz-question { font-family:var(--font-head); font-size:1.25rem; font-weight:700; color:var(--green-900); margin-bottom:1.4rem; }
.quiz-option { display:flex; gap:.8rem; align-items:flex-start; padding:.9rem 1rem; border:1.5px solid var(--line); border-radius:var(--radius-sm); margin-bottom:.7rem; cursor:pointer; background:#fff; }
.quiz-option:has(input:checked) { border-color:var(--green-500); background:var(--green-50); }

/* ---------------- Hero & sections ---------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--green-900) 0%, var(--green-800) 55%, #1e6b47 100%); color: #fff; }
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(232,119,34,.35), transparent 65%); border-radius: 50%; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: 4.5rem 0; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--orange-500); }
.hero p.lead { font-size: 1.1rem; color: #d8ecdf; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 22px; padding: 1.8rem; backdrop-filter: blur(6px); }
.hero-card h3 { color: #fff; }
.hero-card p { color: #d8ecdf; font-size: .94rem; }
.hero-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.hero-list li { display: flex; gap: .7rem; align-items: flex-start; color: #eaf6ef; font-size: .92rem; }
.hero-list li::before { content: "✓"; color: var(--orange-500); font-weight: 800; flex: 0 0 auto; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.hero-badges span { font-size: .78rem; padding: .35rem .8rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #eaf6ef; }

.section { padding: 4.5rem 0; }
.section-alt { background: var(--green-50); }
.section-head { max-width: 720px; margin: 0 auto 2.6rem; text-align: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-600); margin-bottom: .7rem; }
.section-head p { color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: 0 4px 16px rgba(15,61,42,.04); transition: .2s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .94rem; }
.card-icon { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--green-100); color: var(--green-700); font-weight: 800; font-family: var(--font-head); margin-bottom: 1rem; }
.card-icon.accent { background: var(--orange-100); color: var(--orange-700); }

.value-card { padding: 1.8rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.value-card .num { font-family: var(--font-head); color: var(--orange-600); font-weight: 800; font-size: .85rem; letter-spacing: .1em; }

.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-band .stat { text-align: center; padding: 1.4rem 1rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.stat-band strong { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--green-700); }
.stat-band span { font-size: .82rem; color: var(--muted); }

/* ---------------- Cartes contenus ---------------- */
.content-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(15,61,42,.04); }
.content-card .thumb { aspect-ratio: 16 / 10; background: var(--green-100); overflow: hidden; }
.content-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.content-card:hover .thumb img { transform: scale(1.04); }
.content-card .thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--green-600); font-family: var(--font-head); font-weight: 700; font-size: .9rem; background: linear-gradient(135deg, var(--green-100), #f5fbf7); }
.content-card .body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.content-card .meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .78rem; color: var(--muted); margin-bottom: .5rem; }
.content-card h3 { font-size: 1.1rem; }
.content-card h3 a { color: inherit; }
.content-card p { color: var(--muted); font-size: .9rem; flex: 1; }
.content-card .card-link { font-weight: 600; font-size: .88rem; margin-top: .4rem; }

.empty-state { text-align: center; padding: 3rem 1.5rem; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: #fff; }
.empty-state strong { display: block; color: var(--green-900); margin-bottom: .3rem; font-family: var(--font-head); }

/* ---------------- Page héro interne ---------------- */
.page-hero { background: linear-gradient(130deg, var(--green-900), var(--green-700)); color: #fff; padding: 3.4rem 0; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .4rem; }
.page-hero p { color: #d8ecdf; max-width: 720px; margin: 0; }
.breadcrumb { font-size: .8rem; color: #a9cdb9; margin-bottom: .7rem; }
.breadcrumb a { color: #d8ecdf; }

.prose { max-width: 820px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: #33443b; }
.prose blockquote { margin: 1.6rem 0; padding: 1.2rem 1.5rem; background: var(--green-50); border-left: 4px solid var(--orange-600); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--green-900); }

/* ---------------- Galerie ---------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--green-100); cursor: pointer; border: 0; padding: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption { position: absolute; inset: auto 0 0 0; padding: .8rem; background: linear-gradient(transparent, rgba(15,61,42,.85)); color: #fff; font-size: .8rem; text-align: left; }
.lightbox { position: fixed; inset: 0; background: rgba(10,25,18,.92); display: none; align-items: center; justify-content: center; z-index: 999; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; }
.lightbox-close { position: absolute; top: 1.2rem; right: 1.5rem; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }

/* ---------------- CTA & urgence ---------------- */
.director-card .motto-body { display:none; border-top:1px solid var(--line); margin-top:1rem; padding-top:1rem; background:var(--green-50); border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.director-card.open .motto-body { display:block; }
.cta-band { background: linear-gradient(120deg, var(--orange-600), var(--orange-500)); color: #fff; border-radius: 24px; padding: 2.6rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { color: #fff4ea; margin: 0; max-width: 46rem; }
.cta-band .btn { background: #fff; color: var(--orange-700); }
.cta-band .btn:hover { background: var(--green-900); color: #fff; }

.emergency-strip { background: #fff8ef; border-top: 1px solid var(--orange-100); border-bottom: 1px solid var(--orange-100); }
.emergency-inner { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 0; flex-wrap: wrap; }
.emergency-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--orange-600); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
.emergency-inner p { margin: 0; font-size: .86rem; color: var(--muted); }
.emergency-numbers { margin-left: auto; display: flex; gap: 1.5rem; font-size: .78rem; color: var(--muted); }
.emergency-numbers a { color: var(--orange-700); }
.emergency-numbers strong { font-size: 1rem; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--green-900); color: #c9dece; padding-top: 3.4rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2.6rem; }
.footer-brand p { font-size: .88rem; color: #a9c6b4; }
.brand-footer { color: #fff; margin-bottom: 1rem; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #9dbfa9; }
.footer-col h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; color: #b6d1c0; font-size: .88rem; margin-bottom: .5rem; }
.footer-col a:hover { color: var(--orange-500); }
.footer-address { color: #b6d1c0; font-size: .88rem; }
.socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.socials a { font-size: .75rem; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .3rem .7rem; color: #d6e9dd; }
.socials a:hover { background: rgba(255,255,255,.1); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.1rem 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: #93b8a1; }

/* ---------------- Authentification ---------------- */
.auth-wrap { min-height: calc(100vh - 120px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { background: linear-gradient(150deg, var(--green-900), var(--green-700)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-visual h2 { color: #fff; }
.auth-visual p { color: #d8ecdf; }
.auth-visual ul { list-style: none; padding: 0; display: grid; gap: .8rem; margin-top: 1.5rem; }
.auth-visual li { display: flex; gap: .6rem; color: #eaf6ef; font-size: .92rem; }
.auth-visual li::before { content: "✓"; color: var(--orange-500); font-weight: 800; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; background: var(--bg); }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: 20px; padding: 2.2rem; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.auth-card > p { color: var(--muted); font-size: .92rem; margin-bottom: 1.4rem; }
.auth-foot { margin-top: 1.2rem; font-size: .88rem; color: var(--muted); text-align: center; }

/* ---------------- Dashboard ---------------- */
body.dashboard { background: var(--bg); }
.dash-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.dash-sidebar { background: var(--green-900); color: #cfe4d6; display: flex; flex-direction: column; padding: 1.2rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60; }
.brand-sidebar { padding: .4rem .5rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: .9rem; }
.brand-sidebar .brand-text strong { color: #fff; }
.brand-sidebar .brand-text small { color: #9dbfa9; }
.brand-sidebar .brand-logo { height: 42px; background: #fff; padding: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #7fa78d; padding: 1rem .6rem .35rem; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: .65rem; padding: .52rem .65rem; border-radius: 9px; color: #cfe4d6; font-size: .87rem; font-weight: 500; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.active { background: var(--green-700); color: #fff; box-shadow: inset 3px 0 0 var(--orange-500); }
.side-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; flex: 0 0 auto; }
.side-link.active .side-dot { opacity: 1; background: var(--orange-500); }
.side-count { margin-left: auto; background: var(--orange-600); color: #fff; font-size: .68rem; padding: .05rem .4rem; border-radius: 999px; font-weight: 700; }
.side-footer { border-top: 1px solid rgba(255,255,255,.1); padding-top: .7rem; margin-top: .8rem; }
.side-logout { color: #f2b88f; }
.side-user { display: flex; align-items: center; gap: .6rem; padding: .9rem .6rem .2rem; }
.side-user strong { display: block; color: #fff; font-size: .84rem; line-height: 1.2; }
.side-user small { color: #93b8a1; font-size: .72rem; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; flex: 0 0 auto; }

.dash-main { display: flex; flex-direction: column; min-width: 0; }
.dash-topbar { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.8rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.dash-title h1 { font-size: 1.25rem; margin: 0; }
.dash-title p { margin: 0; font-size: .8rem; color: var(--muted); }
.dash-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--green-800); font-size: 1.15rem; background: #fff; }
.icon-btn:hover { background: var(--green-50); }
.icon-count { position: absolute; top: -4px; right: -4px; background: var(--orange-600); color: #fff; font-size: .64rem; min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: .55rem; padding: .25rem .5rem; border-radius: 12px; }
.user-chip:hover { background: var(--green-50); }
.user-chip-text strong { display: block; font-size: .82rem; color: var(--ink); line-height: 1.2; }
.user-chip-text small { font-size: .7rem; color: var(--muted); }
.dash-burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: 6px; cursor: pointer; }
.dash-burger span { width: 22px; height: 2px; background: var(--green-900); border-radius: 2px; }

.dash-content { padding: 1.8rem; flex: 1; }
.dash-footer { padding: 1rem 1.8rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .76rem; color: var(--muted); background: #fff; }
.dash-overlay { display: none; }

/* Stats dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -20px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--green-50); }
.stat-card.accent::after { background: var(--orange-100); }
.stat-card .stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--green-800); line-height: 1.15; }
.stat-card.accent .stat-value { color: var(--orange-700); }
.stat-card .stat-hint { font-size: .76rem; color: var(--muted); }
.stat-card a { font-size: .78rem; font-weight: 600; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.5rem; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.02rem; margin: 0; }
.panel-head p { margin: 0; font-size: .8rem; color: var(--muted); }
.panel-body { padding: 1.4rem; }
.panel-body.flush { padding: 0; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th { text-align: left; padding: .75rem 1rem; background: var(--green-50); color: var(--green-800); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid #eef2f0; vertical-align: middle; }
.data-table tr:hover td { background: #fbfdfc; }
.data-table .actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.data-table .cell-strong { font-weight: 600; color: var(--ink); }
.data-table .cell-sub { display: block; font-size: .75rem; color: var(--muted); }
.table-empty { padding: 2.5rem 1.4rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); background: #fbfdfc; }
.filters .field { gap: .2rem; }
.filters .field label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.filters input, .filters select { padding: .45rem .6rem; font-size: .84rem; }
.filters .field.grow { flex: 1 1 200px; }
.filters .btn { padding: .5rem .9rem; font-size: .82rem; }

.pagination { display: flex; gap: .3rem; flex-wrap: wrap; padding: 1rem 1.4rem; }
.page-link { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--line); font-size: .82rem; color: var(--ink); padding: 0 .5rem; }
.page-link:hover { border-color: var(--green-500); }
.page-link.active { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.page-dots { padding: .4rem; color: var(--muted); }

/* Détails */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
.detail-list { display: grid; gap: .7rem; margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.detail-block { background: var(--green-50); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: .9rem; color: #33443b; white-space: pre-line; }

.notif-list { display: grid; gap: .2rem; }
.notif-item { display: flex; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif-item.unread { background: #f6fcf9; }
.notif-item .notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange-600); margin-top: .45rem; flex: 0 0 auto; }
.notif-item .notif-dot.read { background: var(--line); }
.notif-item h3 { font-size: .92rem; margin: 0 0 .15rem; }
.notif-item p { margin: 0 0 .25rem; font-size: .84rem; color: var(--muted); }
.notif-item time { font-size: .74rem; color: var(--muted); }

/* Page erreur */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 2rem; }
.error-card { background: #fff; border-radius: 24px; padding: 3rem; text-align: center; box-shadow: var(--shadow-lg); max-width: 520px; }
.error-code { font-family: var(--font-head); font-size: 4rem; font-weight: 800; color: var(--orange-600); line-height: 1; }
.error-actions { display: flex; gap: .7rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }

/* Vidéo / iframe */
.embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-sm); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------- Avis & témoignages ---------------- */
.stars { display: inline-flex; gap: 1px; line-height: 1; font-size: .82rem; }
.stars .star-on { color: #f0a02a; }
.stars .star-off { color: #cfd8d2; }
.testimonial-list { display: grid; gap: 1rem; }
.testimonial { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; background: #fff; }
.testimonial-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.testimonial-meta { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.testimonial p { font-size: .9rem; margin: 0 0 .4rem; }
.row-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 940px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute; top: 100%; left: 0; right: 0; background: #fff;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
        flex-direction: column; align-items: stretch; padding: .8rem 1rem 1.2rem; gap: .2rem; display: none;
    }
    .primary-nav.open { display: flex; }
    .nav-link { justify-content: space-between; width: 100%; }
    .nav-menu { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 .4rem .8rem; min-width: 0; }
    .nav-dropdown.open .nav-menu, .nav-dropdown:hover .nav-menu { display: block; }
    .nav-actions { margin: .8rem 0 0; flex-wrap: wrap; }
    .nav-actions .btn { flex: 1; }
    .hero-inner { grid-template-columns: 1fr; padding: 3rem 0; gap: 2rem; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .dash-shell { grid-template-columns: 1fr; }
    .dash-sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-overlay { display: block; position: fixed; inset: 0; background: rgba(10,25,18,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
    .dash-overlay.open { opacity: 1; pointer-events: auto; }
    .dash-burger { display: flex; }
    .detail-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .section { padding: 3rem 0; }
    .form-grid { grid-template-columns: 1fr; }
    .topbar-note, .topbar-contacts a:first-child { display: none; }
    .topbar-inner { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card .stat-value { font-size: 1.6rem; }
    .dash-content { padding: 1.1rem; }
    .dash-topbar { padding: .8rem 1rem; flex-wrap: wrap; }
    .user-chip-text { display: none; }
    .cta-band { padding: 1.8rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .emergency-numbers { margin-left: 0; width: 100%; }
    .table-wrap table.data-table { min-width: 680px; }
    .filters { gap: .5rem; }
}
