/* =====================================================================
   PROGRAMME ZÉRO — Design system
   ===================================================================== */

:root {
    --navy-900: #0d2846;
    --navy-800: #123a63;
    --navy-700: #1a4a7a;
    --green-600: #16a34a;
    --green-700: #12833c;
    --green-100: #dcfce7;
    --blue-600: #1e5f9e;
    --blue-700: #184c80;
    --amber-100: #fef3c7;
    --amber-700: #92400e;
    --bg-page: #f4f7fb;
    --card-bg: #ffffff;
    --text-primary: #16233d;
    --text-muted: #64748b;
    --border-color: #e5eaf1;
    --shadow-card: 0 1px 3px rgba(15, 35, 60, 0.06), 0 1px 2px rgba(15, 35, 60, 0.04);
    --radius: 12px;
    --font-sans: 'Times New Roman', Times, serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
p { text-align: justify; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Boutons ---------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-outline { background: #fff; color: var(--navy-900); border-color: var(--border-color); }
.btn-outline:hover { border-color: var(--navy-700); }
.btn-blue { background: var(--blue-600); color: #fff; }
.btn-blue:hover { background: var(--blue-700); }
.btn-block { width: 100%; }

/* --- Cartes ------------------------------------------------------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

/* --- Badges de statut ---------------------------------------------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}
.badge-green   { background: var(--green-100); color: var(--green-700); }
.badge-amber   { background: var(--amber-100); color: var(--amber-700); }
.badge-outline { background: #fff; color: var(--blue-600); border: 1px solid var(--blue-600); }
.badge-gray    { background: #eef1f6; color: var(--text-muted); }

/* --- En-tête / navigation du site public ---------------------------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    color: var(--navy-900);
    letter-spacing: .2px;
}
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.footer-brand .brand-mark,
.site-footer .brand-mark {
    background: #fff;
    padding: 4px;
    border-radius: 50%;
}
.brand small {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-primary);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
.site-nav a.active,
.site-nav a:hover {
    color: var(--green-700);
    border-bottom-color: var(--green-600);
}
.site-header .btn { white-space: nowrap; }

@media (max-width: 480px) {
    .brand small { display: none; }
    .brand { font-size: 15px; gap: 8px; }
    .brand-mark { width: 32px; height: 32px; }
    .site-header .container { gap: 8px; }
    .site-header .btn { padding: 8px 14px; font-size: 12.5px; }
}

/* --- Hero ------------------------------------------------------- */
.hero {
    padding: 56px 0 40px;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: center;
}
.hero h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 18px;
    color: var(--navy-900);
}
.hero h1 .line-2 { color: var(--green-600); display: block; }
.hero p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 46ch;
}
.hero-actions { display: flex; gap: 14px; }
.hero-actions .btn { border-radius: 999px; padding: 13px 26px; }
.hero-image-wrap { position: relative; }
.hero-image {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1400 / 764;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
}
.hero-image svg { width: 100%; height: 100%; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 820px) {
    .hero-grid { gap: 28px; grid-template-columns: 1fr; }
}

/* --- Sections generic ------------------------------------------- */
section { padding: 36px 0; }
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-900);
    margin: 0;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-700);
}
.section-kicker {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--green-700);
    margin: 0 0 6px;
}
.section-intro {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.7;
    max-width: 72ch;
    margin: 0 0 22px;
}

/* --- À propos --------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
}
.about-text p { color: var(--text-muted); font-size: 14.5px; line-height: 1.75; margin: 0 0 16px; }
.about-side { display: flex; flex-direction: column; gap: 16px; }
.mv-card { padding: 20px; }
.mv-card h4 { margin: 0 0 8px; font-size: 15px; color: var(--navy-900); display:flex; align-items:center; gap:8px; }
.mv-card p { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }

.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.value-card { padding: 20px; }
.value-card h4 { margin: 10px 0 6px; font-size: 14.5px; color: var(--navy-900); }
.value-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.value-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--green-100); color: var(--green-700);
}

/* --- Équipe --------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.team-card { padding: 22px 16px; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.team-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,35,60,.1); }
.team-photo {
    width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px;
    object-fit: cover; border: 3px solid var(--green-100);
}
.team-name { font-weight: 700; font-size: 14px; color: var(--navy-900); margin-bottom: 4px; line-height: 1.3; }
.team-role { font-size: 12.5px; color: var(--green-700); font-weight: 600; line-height: 1.4; }

/* --- Chiffres clés ------------------------------------------------ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.stat-card {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--green-100);
    color: var(--green-700);
}
.stat-value { font-size: 20px; font-weight: 800; color: var(--navy-900); line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--text-muted); }

/* --- Projets ------------------------------------------------------ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.project-card { overflow: hidden; }
.project-thumb {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #2d5f8a, #16324f);
}
.project-body { padding: 16px; }
.project-ref { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.project-title { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; color: var(--navy-900); }
.project-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0 0 14px; min-height: 40px; }
.project-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.project-footer a { font-size: 13px; font-weight: 600; color: var(--blue-600); }

/* --- Domaines / impact ---------------------------------------- */
.domain-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.domain-card { padding: 20px 12px; text-align: center; }
.domain-icon {
    width: 42px; height: 42px; margin: 0 auto 10px;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: var(--green-100); color: var(--green-700);
}
.domain-name { font-size: 13.5px; font-weight: 600; }

.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.impact-card { padding: 18px 16px; }
.impact-value { font-size: 22px; font-weight: 800; color: var(--navy-900); }
.impact-label { font-size: 12.5px; color: var(--text-muted); }

/* --- Partenaires ------------------------------------------------ */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}
.partner-card {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 84px;
}
.partner-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* --- Pied de page ------------------------------------------------ */
.site-footer {
    background: var(--navy-900);
    color: #cbd7e6;
    margin-top: 40px;
    padding: 44px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}
.footer-grid h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 13.5px; }
.footer-brand { color: #fff; font-weight: 700; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 32px;
    padding-top: 18px;
    font-size: 12.5px;
    color: #90a2ba;
    text-align: center;
}
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #cbd7e6;
    display: flex; align-items: center; justify-content: center;
    transition: background-color .15s ease, color .15s ease;
}
.social-row a:hover { background: var(--green-600); color: #fff; }

/* --- Responsive ------------------------------------------------- */
@media (max-width: 960px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .domain-grid { grid-template-columns: repeat(3, 1fr); }
    .impact-grid { grid-template-columns: repeat(2, 1fr); }
    .partner-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .site-nav { display: none; }
    .about-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-toggle { display: flex !important; }
    .site-nav.mobile-open {
        display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border-color); padding: 14px 24px; gap: 14px; z-index: 30;
    }
}
.nav-toggle {
    display: none;
    width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border-color);
    background: #fff; align-items: center; justify-content: center; color: var(--navy-900);
}

/* --- Bouton WhatsApp flottant ------------------------------------- */
.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 80;
    animation: whatsapp-pulse 2.4s ease-in-out infinite;
}
.whatsapp-float:hover { background: #1ebe5a; }
@keyframes whatsapp-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45); }
    50% { box-shadow: 0 6px 26px rgba(37, 211, 102, 0.75), 0 0 0 8px rgba(37, 211, 102, 0.12); }
}
@media (max-width: 640px) {
    .whatsapp-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}

/* --- Fenêtre modale "lire tout le texte" (actualités + projets) --- */
.text-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 40, 70, .6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    padding: 20px;
}
.text-modal-overlay.open { display: flex; }
.text-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.text-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.92);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy-900);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.text-modal-image { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.text-modal-content { padding: 26px 28px; }
.text-modal-meta {
    font-size: 12.5px; font-weight: 700; color: var(--green-700);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: .3px;
}
.text-modal-title { font-size: 21px; color: var(--navy-900); margin: 0 0 14px; line-height: 1.3; }
.text-modal-body { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.text-modal-body p { margin: 0 0 12px; }
.text-modal-body p:last-child { margin-bottom: 0; }

/* --- Actualités --------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { overflow: hidden; display: flex; flex-direction: column; }
.news-thumb { aspect-ratio: 4/3; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.news-card:hover .news-thumb img { transform: scale(1.04); }
.news-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 12px; font-weight: 700; color: var(--green-700); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 8px; }
.news-title { font-size: 15.5px; font-weight: 700; color: var(--navy-900); margin: 0 0 8px; line-height: 1.35; }
.news-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0 0 14px; flex: 1; }
.news-link { font-size: 13px; font-weight: 600; color: var(--blue-600); cursor: pointer; }

@media (max-width: 960px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .news-grid { grid-template-columns: 1fr; }
    .domain-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Formulaires (page Contact) ------------------------------------------ */
.form-card { padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--navy-900); }
.form-field input, .form-field textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--green-600); }
.field-error { font-size: 12.5px; color: #dc2626; }
.form-actions { margin-top: 22px; }

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* --- Vidéos (YouTube) --------------------------------------------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.video-card { overflow: hidden; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-title { padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--navy-900); }

@media (max-width: 780px) {
    .video-grid { grid-template-columns: 1fr; }
}
