/* ============================================================
   AKTIVA NUMÉRIQUE — FEUILLE DE STYLE PRINCIPALE
   ============================================================
   Charte graphique : Design A "Institutionnel moderne"
   Couleurs : bleu profond, sable, terracotta
   Typographies : Fraunces (titres), IBM Plex Sans (UI),
                  IBM Plex Serif (lecture)

   Organisation :
   1. Variables CSS (palette + typographies)
   2. Reset et base
   3. Header et navigation
   4. Fil d'Ariane
   5. Composants génériques (boutons, sections)
   6. Footer
   7. Responsive
   ============================================================ */

/* ============================================================
   1. VARIABLES CSS
   ============================================================ */
:root {
    /* Bleus */
    --bleu-profond: #1B3A5C;
    --bleu-profond-clair: #2A5078;
    --bleu-tres-fonce: #122A44;

    /* Sables */
    --sable: #E8E2D5;
    --sable-clair: #F4F0E8;
    --sable-tres-clair: #FAF8F3;

    /* Terracotta */
    --terracotta: #C66B4E;
    --terracotta-fonce: #A8553A;

    /* Gris */
    --gris-texte: #2E2E2E;
    --gris-doux: #6B6B6B;
    --gris-leger: #999999;
    --blanc: #FFFFFF;
    --noir: #1A1A1A;

    /* Couleurs sémantiques (utilisées dans le tableau cas d'usage) */
    --vert-ok: #4A7C59;
    --orange-attention: #C79030;
    --rouge-stop: #B84A3A;

    /* Polices */
    --font-titre: 'Fraunces', Georgia, serif;
    --font-texte: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-lecture: 'IBM Plex Serif', Georgia, serif;

    /* Largeurs */
    --container-width: 1280px;
    --content-width: 880px;
    --reading-width: 720px;
}

/* ============================================================
   2. RESET ET BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-texte);
    color: var(--gris-texte);
    background: var(--sable-tres-clair);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   3. HEADER ET NAVIGATION
   ============================================================ */
.site-header {
    background: var(--blanc);
    border-bottom: 1px solid rgba(27, 58, 92, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-titre);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--bleu-profond);
    letter-spacing: -0.01em;
}

.logo span {
    color: var(--terracotta);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.25rem;
    align-items: center;
}

.main-nav a {
    font-size: 0.95rem;
    color: var(--bleu-profond);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.main-nav a.active {
    color: var(--terracotta);
    border-bottom: 2px solid var(--terracotta);
}

.main-nav a:hover {
    color: var(--terracotta);
}

.main-nav a.cta-nav {
    background: var(--bleu-profond);
    color: var(--blanc);
    padding: 0.65rem 1.25rem;
    border-radius: 2px;
    border-bottom: none;
}

.main-nav a.cta-nav:hover {
    background: var(--terracotta);
}

.main-nav a.cta-nav.active {
    background: var(--terracotta);
}

/* ============================================================
   4. FIL D'ARIANE
   ============================================================ */
.breadcrumb {
    background: var(--sable-tres-clair);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(27, 58, 92, 0.05);
}

.breadcrumb-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--gris-doux);
}

.breadcrumb a {
    color: var(--bleu-profond);
}

.breadcrumb a:hover {
    color: var(--terracotta);
}

.breadcrumb-sep {
    margin: 0 0.5rem;
    color: var(--gris-doux);
}

/* ============================================================
   5. COMPOSANTS GÉNÉRIQUES
   ============================================================ */

/* Hero générique de page */
.page-hero {
    background: var(--sable-tres-clair);
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232, 226, 213, 0.6) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--terracotta);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.page-title {
    font-family: var(--font-titre);
    font-weight: 400;
    font-size: clamp(2.25rem, 4.8vw, 3.75rem);
    line-height: 1.1;
    color: var(--bleu-profond);
    letter-spacing: -0.025em;
    margin-bottom: 1.75rem;
    max-width: 55rem;
}

.page-title em {
    font-style: italic;
    font-weight: 300;
    color: var(--bleu-profond-clair);
}

.page-lead {
    font-family: var(--font-lecture);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--gris-texte);
    max-width: 42rem;
    font-style: italic;
}

/* Sections génériques */
.section {
    padding: 5rem 2rem;
}

.section.alt-bg {
    background: var(--sable-clair);
}

.section.dark-bg {
    background: var(--bleu-profond);
    color: var(--blanc);
    position: relative;
    overflow: hidden;
}

.section.dark-bg::before {
    content: "";
    position: absolute;
    bottom: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(198, 107, 78, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.section-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: 3.5rem;
    max-width: 50rem;
}

.section-header-centered {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--terracotta);
    font-weight: 500;
    margin-bottom: 1rem;
}

.section.dark-bg .section-eyebrow {
    color: var(--sable);
}

.section-title {
    font-family: var(--font-titre);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 400;
    color: var(--bleu-profond);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.section.dark-bg .section-title {
    color: var(--blanc);
}

.section-title em {
    font-style: italic;
    font-weight: 300;
}

.section.dark-bg .section-title em {
    color: var(--sable);
}

.section-lead {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--gris-doux);
}

.section.dark-bg .section-lead {
    color: rgba(255, 255, 255, 0.85);
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    font-family: var(--font-texte);
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 2px;
    text-decoration: none;
}

.btn-primary {
    background: var(--bleu-profond);
    color: var(--blanc);
}

.btn-primary:hover {
    background: var(--terracotta);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--bleu-profond);
    border: 1px solid var(--bleu-profond);
}

.btn-secondary:hover {
    background: var(--bleu-profond);
    color: var(--blanc);
}

/* CTA final récurrent */
.cta-final {
    padding: 6rem 2rem;
    background: var(--sable);
    text-align: center;
}

.cta-final-inner {
    max-width: 720px;
    margin: 0 auto;
}

.cta-final h2 {
    font-family: var(--font-titre);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    color: var(--bleu-profond);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.cta-final h2 em {
    font-style: italic;
    font-weight: 300;
}

.cta-final p {
    font-family: var(--font-lecture);
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--gris-texte);
    margin-bottom: 2.5rem;
    font-style: italic;
}

.cta-final-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   6. FOOTER
   ============================================================ */
.site-footer {
    background: var(--bleu-tres-fonce);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 2rem 2rem;
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand {
    font-family: var(--font-titre);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--blanc);
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--terracotta);
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.footer-contact {
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-contact a {
    color: var(--sable);
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--terracotta);
}

.footer-col h4 {
    font-family: var(--font-titre);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sable);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.65rem;
}

.footer-col a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--blanc);
}

.footer-bottom {
    max-width: var(--container-width);
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 1.5rem;
}

.footer-bottom a:hover {
    color: var(--blanc);
}

/* ============================================================
   7. RESPONSIVE
   ============================================================ */
/* =====================================================
   MENU MOBILE — Burger + panneau coulissant
   ===================================================== */

/* Bouton burger : caché en desktop, visible en mobile */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 200;
}
.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--bleu-profond);
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* Bouton fermer (à l'intérieur du panneau ouvert) */
.nav-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    color: var(--blanc);
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 210;
}

/* Overlay (fond sombre derrière le menu ouvert) */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 42, 68, 0.6);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.is-visible {
    opacity: 1;
}

/* =====================================================
   RESPONSIVE — refonte propre
   ===================================================== */

@media (max-width: 980px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    /* Affichage du burger, masquage de la nav classique */
    .nav-toggle {
        display: flex;
    }

    /* Le menu devient un panneau coulissant à droite */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 88%;
        max-width: 360px;
        background: var(--bleu-profond);
        padding: 5rem 2rem 2rem;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 180;
        box-shadow: -8px 0 32px rgba(18, 42, 68, 0.2);
    }
    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-overlay {
        display: block;
    }

    /* Liste verticale dans le panneau */
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        font-size: 1rem;
    }
    .main-nav li {
        border-bottom: 1px solid rgba(232, 226, 213, 0.15);
    }
    .main-nav a {
        display: block;
        padding: 1rem 0.25rem;
        color: var(--blanc);
        font-family: var(--font-titre);
        font-size: 1.1rem;
        font-weight: 400;
        letter-spacing: -0.01em;
        transition: color 0.2s, padding-left 0.2s;
    }
    .main-nav a:hover,
    .main-nav a:focus {
        color: var(--sable);
        padding-left: 0.6rem;
    }
    .main-nav a.active {
        color: var(--terracotta);
        font-weight: 500;
    }

    /* Le CTA Contact dans le menu mobile : style distinctif */
    .main-nav a.cta-nav {
        background: var(--terracotta);
        color: var(--blanc);
        padding: 0.85rem 1.25rem;
        text-align: center;
        border-radius: 3px;
        margin-top: 1rem;
        font-weight: 500;
    }
    .main-nav a.cta-nav:hover {
        background: var(--terracotta-fonce, #A8553A);
        color: var(--blanc);
        padding-left: 1.25rem;
    }
    .main-nav a.cta-nav.active {
        background: var(--terracotta-fonce, #A8553A);
    }

    /* Le bouton fermer visible quand le menu est ouvert */
    .nav-close {
        display: block;
    }

    /* Animation du burger en croix quand le menu est ouvert */
    .nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 640px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-bottom a {
        margin: 0 0.5rem;
    }
}

/* ============================================================
   NOTE : les styles spécifiques à chaque page (cards modules,
   tableau cas d'usage, encarts spéciaux, etc.) seront ajoutés
   page par page dans des sections /* === PAGE: XXX === */
   au fil des conversions HTML → PHP.
   ============================================================ */
