/* =========================================================
   ARMURE-SCOLAIRE — STYLE.CSS FINAL
   Version optimisée, cohérente, professionnelle
   ========================================================= */

/* ------------------------------
   Variables & typographie
------------------------------ */
:root {
    --color-blue-dark: #0b2c4a;
    --color-blue-light: #2f7fd3;
    --color-yellow: #f4b41a;
    --color-white: #ffffff;
    --color-bg-base: #d5deea;
    --color-bg-alt: #c8d4e2;
    --color-text: #1e293b;
    --color-border: #cbd5e1;

    --font-sans-primary: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-sans-secondary: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius-card: 12px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* ------------------------------
   Reset & base
------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

section[id],
div[id],
.onepage-section {
    scroll-margin-top: 85px;
}

body {
    margin: 0;
    font-family: var(--font-sans-primary);
    color: var(--color-text);
    background-color: var(--color-bg-base);
    background-image:
        linear-gradient(rgba(206, 217, 231, 0.9), rgba(196, 208, 223, 0.93)),
        url("../../images/hero/paysage_nord.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    line-height: 1.6;
}

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

/* ------------------------------
   Layout
------------------------------ */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
    background-color: rgba(197, 209, 224, 0.8);
}

.section-header {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.section-header h2 {
    font-family: var(--font-sans-secondary);
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-blue-dark);
}

.section-header p {
    margin: 0;
    color: #334155;
    font-weight: 500;
}

.purpose-section {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(219, 184, 104, 0.2), transparent 65%),
        repeating-linear-gradient(135deg, transparent 0 22px, rgba(158, 126, 61, 0.045) 22px 23px),
        #fbf8f0;
    border-block: 1px solid #ded0ad;
}

.purpose-section::before {
    content: "";
    position: absolute;
    inset: 1rem;
    z-index: -1;
    border: 1px solid rgba(158, 126, 61, 0.35);
    pointer-events: none;
}

.purpose-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        url("../../images/backgrounds/purpose-threads.svg") left center / min(28%, 320px) 100% no-repeat,
        url("../../images/backgrounds/purpose-threads.svg") right center / min(28%, 320px) 100% no-repeat;
    pointer-events: none;
}

.purpose-section .section-header {
    margin-bottom: 0;
}

.purpose-section .purpose-introduction {
    margin-bottom: 2rem;
}

.purpose-section .purpose-introduction::after {
    display: none;
}

.purpose-section .section-header::after {
    content: "";
    display: block;
    width: 5rem;
    height: 3px;
    margin: 1.75rem auto 0;
    background: linear-gradient(90deg, transparent, #aa8035, transparent);
}

.purpose-section .section-header h2 {
    --purpose-ink: #17334a;
    color: #17334a;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .purpose-section #purpose-title[data-effect="shine"] {
        background-image: linear-gradient(110deg, var(--purpose-ink) 39%, #b98020 45%, #ffe29a 49%, #fff4d6 50%, #ffe29a 51%, #b98020 55%, var(--purpose-ink) 61%);
        background-size: 300% 100%;
        background-position: 0% center;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: purpose-title-shine 5s ease-in-out infinite;
    }
}

@keyframes purpose-title-shine {
    from { background-position: 100% center; }
    to { background-position: 0% center; }
}

.purpose-section #purpose-title.purpose-animation-paused {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .purpose-section #purpose-title[data-effect] {
        animation: none;
        background: none;
        color: var(--purpose-ink);
    }
}

.purpose-section .section-header p {
    color: #405263;
}

body.dark .purpose-section {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(200, 160, 79, 0.13), transparent 65%),
        repeating-linear-gradient(135deg, transparent 0 22px, rgba(223, 196, 135, 0.035) 22px 23px),
        #142331;
    border-color: #76613d;
}

body.dark .purpose-section .section-header h2 {
    --purpose-ink: #f5e5bf;
    color: #f5e5bf;
}

body.dark .purpose-section .section-header p {
    color: #d2dce4;
}

/* Variante d'en-tête utilisée par la section organigramme */
.text-center {
    text-align: center;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 2.5rem;
}

.section-heading h2 {
    font-family: var(--font-sans-secondary);
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-blue-dark);
}

.section-lead {
    margin: 0;
    color: #334155;
    font-weight: 500;
}

.photo-credits {
    font-size: 0.72rem;
    opacity: 0.75;
}

body.dark .section-lead {
    color: #c3ced8;
}

/* ------------------------------
   Header & navigation
------------------------------ */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(90deg, #0b2c4a 0%, #11395d 55%, #164a7c 100%);
    border-bottom: 2px solid rgba(244, 180, 26, 0.55);
    box-shadow: 0 4px 16px rgba(11, 44, 74, 0.28);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
    margin-right: 0.75rem;
}

.logo-text {
    font-family: var(--font-sans-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-white);
    letter-spacing: 0.04em;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #d8e2ee;
    padding: 0.35rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-yellow), #ffd166);
    transition: width var(--transition-fast);
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active {
    color: #ffd166;
    font-weight: 600;
}

.main-nav a:hover::after,
.main-nav a:focus::after,
.main-nav a.active::after {
    width: 100%;
}

.support-widget {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid #dfb9c3;
    border-radius: 18px;
    background: #fff5f7;
    color: #542032;
    text-align: center;
}

.support-widget h3 {
    margin-top: 0;
    color: #782b44;
}

.support-total strong {
    display: block;
    font-size: 2.5rem;
    line-height: 1.2;
}

.support-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.support-like {
    border: 2px solid #a52148;
    background: #a52148;
    color: #fff;
    cursor: pointer;
    white-space: normal;
}

.support-like:hover {
    background: #7d1635;
    color: #fff;
}

.support-like[aria-pressed="true"] {
    background: #175c47;
    border-color: #175c47;
}

.support-like:disabled {
    cursor: default;
}

.support-like:focus-visible,
.support-share:focus-visible {
    outline: 3px solid #0b2c4a;
    outline-offset: 3px;
}

.support-status {
    min-height: 1.5em;
    margin: 1rem 0 0.5rem;
    font-weight: 700;
}

.support-note {
    font-size: 0.85rem;
    line-height: 1.5;
}

.support-share-fallback input {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.6rem;
    border: 1px solid #a52148;
    border-radius: 6px;
    background: #fff;
    color: #0b2c4a;
}

body.dark .support-widget {
    border-color: #865466;
    background: #301e2b;
    color: #f7e5ec;
}

body.dark .support-widget h3 {
    color: #ffc9db;
}

body.dark .support-like:focus-visible,
body.dark .support-share:focus-visible {
    outline-color: #ffd166;
}

.partner-logos {
    --partner-columns: 5;
    display: grid;
    grid-template-columns: repeat(var(--partner-columns), minmax(0, 1fr));
    align-items: center;
    gap: 1rem;
}

.partner-logo-card[hidden] {
    display: none;
}

.partner-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.partner-invitation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin: 0;
}

#partenaires .partner-invitation {
    border: 1px solid rgba(244, 180, 26, 0.55);
    border-left: 4px solid var(--color-yellow);
}

#partenaires .partner-pagination {
    color: #fff;
}

@media (max-width: 1100px) {
    .partner-logos {
        --partner-columns: 4;
    }
}

.partner-cooperation {
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(244, 180, 26, 0.55);
    border-left: 4px solid var(--color-yellow);
    border-radius: var(--radius-card);
    background: linear-gradient(135deg, #173650, #081630);
    box-shadow: 0 12px 30px rgba(8, 22, 48, 0.2);
    color: #fff;
}

#partenaires .partner-cooperation h3 {
    margin: 0 0 1rem;
    color: #ffda7a;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

#partenaires .partner-cooperation p {
    color: #e8eef6;
    margin: 0;
    line-height: 1.8;
}

@media (max-width: 720px) {
    .partner-overview {
        grid-template-columns: minmax(0, 1fr);
    }

    .partner-logos {
        --partner-columns: 2;
    }
}

.activity-public-card[hidden],
.activity-pagination[hidden] {
    display: none;
}

.activity-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.activity-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.partner-logo-card {
    width: 100%;
    margin: 0;
    padding: 0.75rem;
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    background: #fff;
    color: #0b2c4a;
    box-shadow: 0 6px 20px rgba(11, 44, 74, 0.12);
    text-align: center;
}

.partner-logo-card img {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: contain;
}

.partner-logo-card figcaption {
    margin-top: 1rem;
    font-weight: 700;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    margin: 0;
}

.country-bar,
.home-section-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: #09283f url("../../images/backgrounds/country-light-spiral.svg") center / cover no-repeat;
    color: #fff;
}

.home-section-divider {
    height: 24px;
    border-bottom: 1px solid rgba(244, 180, 26, 0.4);
}

.country-bar-content,
.federal-identity,
.country-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.country-bar-content {
    justify-content: space-between;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    font-size: 0.85rem;
}

.federal-identity img,
.country-option img {
    flex-shrink: 0;
    object-fit: contain;
}

.country-switcher {
    position: relative;
}

.country-switcher summary {
    cursor: pointer;
    padding: 0.45rem 0.8rem;
    border: 1px solid #ffd166;
    border-radius: 6px;
    background: #ffd166;
    color: #09283f;
    font-weight: 700;
}

.country-switcher summary:hover,
.country-switcher[open] summary {
    background: #ffe3a1;
}

.country-switcher summary:focus-visible,
.country-option:focus-visible {
    outline: 3px solid #ffd166;
    outline-offset: 2px;
}

.country-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    width: min(340px, calc(100vw - 2rem));
    max-height: 65dvh;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.country-option {
    padding: 0.7rem;
    border-radius: 6px;
    background: #edf5f1;
    color: #134e40;
    font-weight: 700;
    text-decoration: none;
}

.country-option small {
    display: block;
    margin-top: 0.25rem;
    font-weight: 400;
}

.country-panel p {
    margin: 0.8rem 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

body.dark .country-panel {
    border-color: #475569;
    background: #0f172a;
    color: #e2e8f0;
}

body.dark .country-option {
    background: #183b32;
    color: #d1fae5;
}

.language-flag {
    display: block;
    width: 20px;
    height: 15px;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 2px;
    object-fit: cover;
}

.language-switcher select {
    width: 5.1rem;
    min-height: 2.35rem;
    padding: 0.35rem 0.4rem;
    border: 1px solid rgba(232, 238, 246, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.language-switcher select option {
    background: #0b2c4a;
    color: #ffffff;
}

.language-switcher select:focus-visible {
    outline: 3px solid var(--color-yellow);
    outline-offset: 2px;
}

/* ------------------------------
   Menu mobile
------------------------------ */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background-color: var(--color-white);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0.25rem;
    border: none;
    background: transparent;
    color: var(--color-white);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.theme-toggle:hover {
    opacity: 0.9;
}

.theme-toggle:focus-visible {
    outline: 3px solid var(--color-yellow);
    outline-offset: 3px;
    border-radius: 999px;
}

/* ------------------------------
   Hero
------------------------------ */
.hero {
    position: relative;
    isolation: isolate;
    background-color: var(--color-blue-dark);
    background-image:
        linear-gradient(100deg, rgba(11, 44, 74, 0.96) 0%, rgba(11, 44, 74, 0.86) 52%, rgba(11, 44, 74, 0.68) 100%),
        url("../../images/hero/cascade.jpg");
    background-position: center 42%;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--color-white);
    padding: 4.5rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-sans-secondary);
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    max-width: 540px;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.hero-image img {
    width: 100%;
    max-width: 460px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    object-fit: cover;
}

.home-slider {
    position: relative;
    min-height: min(760px, calc(100svh - 78px));
    min-height: clamp(560px, 76svh, 760px);
    overflow: hidden;
    background: #102b3b;
    color: #fff;
    isolation: isolate;
}

.home-slides,
.home-slide {
    position: absolute;
    inset: 0;
}

.home-slide {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 650ms ease;
}

.home-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.home-slide:not(.is-active) .home-slide-content {
    visibility: hidden;
}

.home-slide-image,
.home-slide-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-slide-image {
    object-fit: cover;
    object-position: center 45%;
    transform: scale(1.015);
    transition: transform 7s ease;
}

.home-slide.is-active .home-slide-image {
    transform: scale(1.07);
}

.home-slide-shade {
    background: linear-gradient(90deg, rgba(7, 24, 36, 0.88) 0%, rgba(7, 24, 36, 0.68) 42%, rgba(7, 24, 36, 0.16) 100%), linear-gradient(0deg, rgba(7, 24, 36, 0.32), transparent 48%);
}

.home-slide-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: inherit;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 7.5rem;
}

.home-slide-kicker {
    margin: 0 0 1rem;
    color: #f6ca65;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.home-slide-content h1,
.home-slide-content h2 {
    max-width: 760px;
    margin: 0 0 1.1rem;
    color: #fff;
    font-family: var(--font-sans-secondary);
    font-size: clamp(2.4rem, 4.2vw, 4.6rem);
    line-height: 1.08;
}

.home-slide-description {
    max-width: 610px;
    margin: 0 0 1.8rem;
    color: #f0f4f7;
    font-size: 1.12rem;
    line-height: 1.65;
}

.home-slide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.home-slide-actions .btn-primary {
    background: #f3c24f;
    color: #152a35;
}

.home-slide-actions .btn-secondary {
    border-color: rgba(255, 255, 255, 0.78);
    color: #fff;
}

.home-slider-controls {
    position: absolute;
    z-index: 3;
    right: max(1.5rem, calc((100vw - 1200px) / 2 + 1.5rem));
    bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.home-slider-arrow,
.home-slider-pause {
    display: inline-grid;
    min-width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 50%;
    background: rgba(10, 31, 44, 0.44);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.home-slider-arrow {
    font-size: 1.25rem;
}

.home-slider-pause {
    width: auto;
    padding: 0 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

.home-slider-pagination {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.home-slider-pagination button {
    width: 0.6rem;
    height: 0.6rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    cursor: pointer;
    transition: width 180ms ease, background-color 180ms ease;
}

.home-slider-pagination button.is-active {
    width: 1.7rem;
    background: #f3c24f;
}

.home-slider-progress {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    background: #f3c24f;
}

.home-slider.is-playing .home-slider-progress {
    animation: home-slide-progress 6s linear infinite;
}

.home-slider-arrow:hover,
.home-slider-pause:hover,
.home-slider-arrow:focus-visible,
.home-slider-pause:focus-visible {
    background: #f3c24f;
    color: #152a35;
}

@keyframes home-slide-progress {
    to { transform: scaleX(1); }
}

@media (max-width: 720px) {
    .home-slider {
        min-height: min(760px, 78svh);
        min-height: clamp(570px, 78svh, 720px);
    }

    .home-slide-image {
        object-position: 58% center;
    }

    .home-slide-shade {
        background: linear-gradient(90deg, rgba(7, 24, 36, 0.83), rgba(7, 24, 36, 0.38)), linear-gradient(0deg, rgba(7, 24, 36, 0.54), transparent 70%);
    }

    .home-slide-content {
        padding-top: 3rem;
        padding-bottom: 8rem;
    }

    .home-slide-content h1,
    .home-slide-content h2 {
        max-width: 600px;
        font-size: clamp(2.25rem, 10vw, 3.3rem);
    }

    .home-slide-description {
        font-size: 1rem;
    }

    .home-slider-controls {
        right: 1rem;
        bottom: 1.25rem;
        left: 1rem;
        justify-content: flex-end;
        gap: 0.55rem;
    }

    .home-slider-pagination {
        margin-right: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-slide,
    .home-slide-image,
    .home-slider-pagination button,
    .gallery-slide.is-active,
    .gallery-slider-arrow,
    .gallery-slider-pause,
    .gallery-slider-thumbnail {
        transition: none;
        animation: none;
    }

    .home-slider.is-playing .home-slider-progress {
        animation: none;
    }
}

/* ------------------------------
   Boutons
------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-yellow), var(--color-blue-light));
    color: var(--color-blue-dark);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* Bouton à fond bleu nuit pour les sections claires */
.btn-navy {
    background: linear-gradient(135deg, var(--color-blue-dark), #164a7c 55%, var(--color-blue-light));
    color: var(--color-white);
    border: 1px solid rgba(244, 180, 26, 0.55);
    box-shadow: 0 10px 20px rgba(11, 44, 74, 0.28);
}

.btn-navy:hover,
.btn-navy:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(11, 44, 74, 0.36);
    border-color: var(--color-yellow);
    color: var(--color-white);
}

.btn-link {
    background: none;
    color: var(--color-blue-light);
    padding: 0;
    border-radius: 0;
    font-weight: 600;
}

.btn-link:hover {
    color: var(--color-blue-dark);
}

/* ------------------------------
   Toast Notifications Premium
------------------------------ */
.toast {
    position: fixed;
    right: 25px;
    top: 25px;
    padding: 15px 20px;
    border-radius: 12px;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toast-warning {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1f2937;
}

/* ------------------------------
   Grids & cards
------------------------------ */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--color-white);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(11, 44, 74, 0.08);
    transition: var(--transition-medium);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.card h3 {
    font-family: var(--font-sans-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--color-blue-dark);
}

.card p {
    margin: 0;
    color: #4b5563;
}

/* ------------------------------
   Galerie
------------------------------ */
.gallery-item,
.gallery-video-item {
    min-width: 0;
    margin: 0;
    overflow: hidden;
}

.gallery-item {
    padding: 0.85rem;
}

/* ------------------------------
   Galerie Diaporama Haut de Gamme
   Effets spectaculaires : Volantes (envol 3D & translations) & Fondantes (cross-fade lumineux)
------------------------------ */
.gallery-slides {
    position: relative;
    display: grid;
    max-width: 1040px;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid rgba(244, 180, 26, 0.75);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(47, 127, 211, 0.35), transparent 70%),
        radial-gradient(circle at 85% 85%, rgba(244, 180, 26, 0.12), transparent 45%),
        linear-gradient(180deg, #061423 0%, #092036 50%, #05101c 100%);
    box-shadow:
        0 25px 70px rgba(6, 20, 35, 0.65),
        0 0 35px rgba(47, 127, 211, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    perspective: 1400px;
    transform-style: preserve-3d;
}

.gallery-slide {
    display: none;
    grid-area: 1 / 1;
    padding: clamp(0.75rem, 2vw, 1.4rem);
    border: 0;
    border-radius: 20px;
    background: transparent;
    box-shadow: none;
    will-change: transform, opacity, filter;
    transform-origin: center center;
    backface-visibility: hidden;
}

/* Diapositive active et animée */
.gallery-slide.is-active,
.gallery-slide.active,
.slide.active {
    display: block;
    z-index: 2;
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
}

/* Diapositive entrante animée via CSS Variable (--effect) */
.gallery-slide.animate,
.slide.animate {
    display: block !important;
    z-index: 3;
    animation: var(--effect) 720ms cubic-bezier(0.16, 1, 0.25, 1) both;
    will-change: transform, opacity, filter;
    pointer-events: auto;
}

/* Diapositive sortante (maintien visible en dessous pendant la transition) */
.gallery-slide.is-exiting,
.slide.is-exiting {
    display: block !important;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* -------------------------------------------------------------
   43 Effets de Diaporama Spécifiés (Keyframes & CSS Variable)
------------------------------------------------------------- */

/* 1. Fondu (fade) - Apparition progressive */
@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 2. Fondu enchaîné (crossfade) - Mélange de deux images */
@keyframes crossfade {
    from {
        opacity: 0;
        transform: scale(1.08);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* 3. Glissement gauche (slide-left) - Entrée depuis la droite */
@keyframes slide-left {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 4. Glissement droite (slide-right) - Entrée depuis la gauche */
@keyframes slide-right {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 5. Glissement haut (slide-up) - Entrée depuis le bas */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 6. Glissement bas (slide-down) - Entrée depuis le haut */
@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 7. Zoom avant (zoom-in) - Agrandissement */
@keyframes zoom-in {
    from {
        opacity: 0;
        transform: scale(0.62);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* 8. Zoom arrière (zoom-out) - Réduction */
@keyframes zoom-out {
    from {
        opacity: 0;
        transform: scale(1.36);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* 9. Fondu haut (fade-up) - Fondu et montée */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(55px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 10. Fondu bas (fade-down) - Fondu et descente */
@keyframes fade-down {
    from {
        opacity: 0;
        transform: translateY(-55px);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 11. Flip horizontal (flip-horizontal) - Rotation 3D horizontale */
@keyframes flip-horizontal {
    from {
        opacity: 0;
        transform: perspective(900px) rotateY(-85deg) scale(0.88);
        filter: brightness(1.25);
    }
    to {
        opacity: 1;
        transform: perspective(900px) rotateY(0deg) scale(1);
        filter: brightness(1);
    }
}
@keyframes flip {
    from {
        opacity: 0;
        transform: perspective(800px) rotateY(80deg);
    }
    to {
        opacity: 1;
        transform: perspective(800px) rotateY(0);
    }
}

/* 12. Flip vertical (flip-vertical) - Rotation 3D verticale */
@keyframes flip-vertical {
    from {
        opacity: 0;
        transform: perspective(900px) rotateX(85deg) scale(0.88);
        filter: brightness(1.25);
    }
    to {
        opacity: 1;
        transform: perspective(900px) rotateX(0deg) scale(1);
        filter: brightness(1);
    }
}

/* 13. Cube (cube) - Rotation façon cube */
@keyframes cube {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateY(-90deg) translateZ(180px);
        filter: brightness(1.3);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateY(0deg) translateZ(0);
        filter: brightness(1);
    }
}

/* 14. Révélation (reveal) - Dévoilement progressif */
@keyframes reveal {
    from {
        opacity: 0.4;
        clip-path: circle(0% at 50% 50%);
    }
    to {
        opacity: 1;
        clip-path: circle(145% at 50% 50%);
    }
}

/* 15. Masque animé (mask-reveal) - Révélation par masque */
@keyframes mask-reveal {
    from {
        opacity: 0.2;
        clip-path: polygon(50% 0%, 50% 0%, 50% 100%, 50% 100%);
    }
    to {
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
}

/* 16. Balayage (wipe) - Apparition par balayage */
@keyframes wipe {
    from {
        opacity: 0.6;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* 17. Rideau (curtain) - Ouverture en deux panneaux */
@keyframes curtain {
    from {
        opacity: 0.5;
        clip-path: inset(0 50% 0 50%);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* 18. Cercle (circle-reveal) - Révélation circulaire */
@keyframes circle-reveal {
    from {
        opacity: 0.3;
        clip-path: circle(0% at 50% 50%);
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        clip-path: circle(150% at 50% 50%);
        transform: scale(1);
    }
}

/* 19. Diagonale (diagonal-reveal) - Révélation en diagonale */
@keyframes diagonal-reveal {
    from {
        opacity: 0.3;
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }
    to {
        opacity: 1;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* 20. Zoom cinématique (cinematic-zoom) - Zoom lent et élégant */
@keyframes cinematic-zoom {
    from {
        opacity: 0;
        transform: scale(1.24);
        filter: blur(5px) brightness(1.2);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0) brightness(1);
    }
}

/* 21. Ken Burns (ken-burns) - Zoom et panoramique */
@keyframes ken-burns {
    from {
        opacity: 0;
        transform: scale(1.18) translate(-18px, -10px);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: scale(1) translate(0, 0);
        filter: blur(0);
    }
}

/* 22. Parallaxe (parallax) - Profondeur visuelle */
@keyframes parallax {
    from {
        opacity: 0;
        transform: translate3d(90px, 15px, -130px) scale(0.88);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

/* 23. Flou (blur) - Transition floutée */
@keyframes blur {
    from {
        opacity: 0;
        filter: blur(24px) brightness(1.25);
        transform: scale(1.08);
    }
    to {
        opacity: 1;
        filter: blur(0px) brightness(1);
        transform: scale(1);
    }
}

/* 24. Morphose (seamless-morph) - Transformation visuelle */
@keyframes seamless-morph {
    from {
        opacity: 0;
        transform: scale(0.82) rotate(-4deg) skewX(-4deg);
        filter: blur(5px);
        border-radius: 40px;
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg) skewX(0deg);
        filter: blur(0);
        border-radius: 14px;
    }
}

/* 25. Liquide (liquid-transition) - Déformation fluide */
@keyframes liquid-transition {
    0% {
        opacity: 0;
        transform: scaleY(0.65) skewY(6deg);
        filter: blur(6px);
    }
    55% {
        transform: scaleY(1.05) skewY(-2deg);
    }
    100% {
        opacity: 1;
        transform: scaleY(1) skewY(0deg);
        filter: blur(0);
    }
}

/* 26. Glitch (glitch) - Distorsion numérique */
@keyframes glitch {
    0% {
        opacity: 0;
        transform: translate(-10px, 4px) skewX(6deg);
        filter: drop-shadow(4px 0 #2f7fd3) drop-shadow(-4px 0 #f4b41a);
    }
    30% {
        opacity: 0.8;
        transform: translate(8px, -4px) skewX(-5deg);
    }
    60% {
        transform: translate(-4px, 2px) skewX(3deg);
    }
    85% {
        transform: translate(2px, -1px) skewX(-1deg);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) skewX(0);
        filter: none;
    }
}

/* 27. Pixelisation (pixelate) - Transition en pixels */
@keyframes pixelate {
    0% {
        opacity: 0;
        filter: contrast(180%) blur(16px);
        transform: scale(1.06);
    }
    60% {
        filter: contrast(130%) blur(6px);
    }
    100% {
        opacity: 1;
        filter: contrast(100%) blur(0);
        transform: scale(1);
    }
}

/* 28. Ondulation (ripple) - Effet d’ondes */
@keyframes ripple {
    0% {
        opacity: 0;
        transform: scale(0.75);
        clip-path: circle(15% at 50% 50%);
        filter: blur(6px);
    }
    60% {
        clip-path: circle(85% at 50% 50%);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        clip-path: circle(150% at 50% 50%);
        filter: blur(0);
    }
}

/* 29. Vague (wave) - Déformation en vague */
@keyframes wave {
    0% {
        opacity: 0;
        transform: translateY(35px) skewX(-7deg);
    }
    50% {
        transform: translateY(-8px) skewX(4deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) skewX(0deg);
    }
}

/* 30. Élastique (elastic) - Mouvement élastique */
@keyframes elastic {
    0% {
        opacity: 0;
        transform: scale(0.35);
    }
    55% {
        opacity: 1;
        transform: scale(1.09);
    }
    75% {
        transform: scale(0.96);
    }
    90% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 31. Carrousel focalisé (focus-carousel) - Mise en avant de l’image centrale */
@keyframes focus-carousel {
    from {
        opacity: 0;
        transform: scale(0.72) translateZ(-240px);
        filter: blur(8px) brightness(0.65);
    }
    to {
        opacity: 1;
        transform: scale(1) translateZ(0);
        filter: blur(0) brightness(1);
    }
}

/* 32. Cartes empilées (stacked-cards) - Cartes superposées */
@keyframes stacked-cards {
    0% {
        opacity: 0;
        transform: translateY(80px) scale(0.85) rotate(-5deg);
    }
    65% {
        transform: translateY(-8px) scale(1.02) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

/* 33. Coverflow (coverflow) - Carrousel avec perspective */
@keyframes coverflow {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateY(65deg) translateX(120px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateY(0deg) translateX(0) scale(1);
    }
}

/* 34. Fondu du texte (text-fade) - Apparition du texte */
@keyframes text-fade {
    from {
        opacity: 0;
        filter: blur(8px);
        transform: scale(1.04);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

/* 35. Texte révélé (text-reveal) - Texte dévoilé progressivement */
@keyframes text-reveal {
    from {
        opacity: 0.3;
        clip-path: inset(0 100% 0 0);
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
}

/* 36. Texte séquencé (text-stagger) - Apparition successive des éléments */
@keyframes text-stagger {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 37. Machine à écrire (typewriter) - Texte écrit progressivement */
@keyframes typewriter {
    0% {
        opacity: 0.2;
        clip-path: inset(0 100% 0 0);
    }
    50% {
        clip-path: inset(0 50% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* 38. Rebond (bounce) - Mouvement avec rebond */
@keyframes bounce {
    0% {
        opacity: 0;
        transform: translateY(-110px);
    }
    50% {
        opacity: 1;
        transform: translateY(18px);
    }
    75% {
        transform: translateY(-8px);
    }
    90% {
        transform: translateY(3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 39. Pulsation (pulse) - Agrandissement répétitif */
@keyframes pulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    45% {
        opacity: 1;
        transform: scale(1.08);
    }
    75% {
        transform: scale(0.97);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 40. Flottement (float) - Mouvement vertical doux */
@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    60% {
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 41. Halo lumineux (glow) - Lumière autour de l’élément */
@keyframes glow {
    0% {
        opacity: 0;
        filter: brightness(1.7) drop-shadow(0 0 25px rgba(244, 180, 26, 0.9));
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        filter: brightness(1) drop-shadow(0 0 0 transparent);
        transform: scale(1);
    }
}

/* 42. Apparition pop (pop-in) - Apparition avec agrandissement */
@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.4) rotate(-4deg);
    }
    65% {
        transform: scale(1.08) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* 43. Rotation d’entrée (roll-in) - Entrée avec rotation */
@keyframes roll-in {
    from {
        opacity: 0;
        transform: translateX(-120px) rotate(-120deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

.gallery-slide-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: radial-gradient(circle at center, rgba(11, 44, 74, 0.4), transparent 80%);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.gallery-item img {
    width: 100%;
    height: clamp(290px, 64vh, 700px);
    object-fit: contain;
    padding: 0;
    border-radius: 14px;
    margin: 0 auto;
    transition: transform 600ms cubic-bezier(0.2, 0.9, 0.3, 1), filter 600ms ease;
    will-change: transform;
}

.gallery-slide.is-active .gallery-item img {
    animation: slideFloatBreath 9s ease-in-out infinite alternate;
}

/* Respiration / flottement doux après atterrissage */
@keyframes slideFloatBreath {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.015);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.gallery-slide:hover .gallery-item img {
    transform: scale(1.025) !important;
}

.gallery-slide-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(11, 44, 74, 0.85);
    border: 1px solid rgba(244, 180, 26, 0.65);
    color: #f4b41a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tag-fade-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tag-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-slide figcaption {
    padding: 1rem 0.5rem 0.25rem;
    text-align: center;
}

.gallery-slide-caption-title {
    display: inline-block;
    color: #ffffff;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: caption-rise 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes caption-rise {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-video-item figcaption {
    padding: 0.8rem 0.35rem 0.3rem;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.gallery-slider-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
}

.gallery-slider-effect-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(11, 44, 74, 0.06);
    border: 1px solid rgba(11, 44, 74, 0.15);
}

.gallery-slider-effect-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-blue-dark);
}

.gallery-slider-effect-select {
    padding: 0.38rem 0.85rem;
    border: 1px solid rgba(11, 44, 74, 0.22);
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-blue-dark);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.gallery-slider-effect-select:hover,
.gallery-slider-effect-select:focus-visible {
    border-color: var(--color-yellow);
    box-shadow: 0 0 0 3px rgba(244, 180, 26, 0.28);
}

body.dark .gallery-slider-effect-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(244, 180, 26, 0.3);
}

body.dark .gallery-slider-effect-label {
    color: #ffd166;
}

body.dark .gallery-slider-effect-select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .gallery-slider-effect-select:hover,
body.dark .gallery-slider-effect-select:focus-visible {
    border-color: #ffd166;
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.28);
}

.gallery-slider-arrow,
.gallery-slider-pause {
    display: inline-grid;
    min-width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border: 1px solid rgba(11, 44, 74, 0.2);
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-blue-dark);
    font: inherit;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.gallery-slider-pause {
    width: auto;
    padding: 0 0.85rem;
    font-size: 0.82rem;
}

.gallery-slider-count {
    min-width: 5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--color-blue-dark);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.gallery-slider-arrow:hover,
.gallery-slider-pause:hover,
.gallery-slider-arrow:focus-visible,
.gallery-slider-pause:focus-visible {
    background: #f3c24f;
    color: #152a35;
}

.gallery-slider-arrow:hover,
.gallery-slider-pause:hover {
    transform: translateY(-2px);
}

.gallery-slider-thumbnails {
    display: flex;
    gap: 0.65rem;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0.5rem 0.15rem 0.85rem;
    overflow-x: auto;
    scrollbar-color: var(--color-yellow) rgba(11, 44, 74, 0.12);
    scrollbar-width: thin;
}

.gallery-slider-thumbnail {
    flex: 0 0 96px;
    height: 68px;
    padding: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #0b2c4a;
    cursor: pointer;
    opacity: 0.68;
    transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.gallery-slider-thumbnail img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}

.gallery-slider-thumbnail:hover,
.gallery-slider-thumbnail:focus-visible {
    opacity: 1;
    transform: translateY(-2px);
}

.gallery-slider-thumbnail.is-active {
    border-color: var(--color-yellow);
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(244, 180, 26, 0.2);
}

.gallery-video-item figcaption {
    padding: 0.8rem 0.35rem 0.3rem;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.gallery-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    align-items: start;
    gap: 1.5rem;
}

.gallery-video-item {
    padding: 0.85rem;
}

.gallery-video-frame {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #0b1118;
}

.gallery-video-item video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 0;
    color: #e8eef6;
}

.image-fallback-note {
    display: block;
    margin-top: -0.35rem;
    color: #475569;
    font-size: 0.8rem;
    font-style: italic;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-width: 0;
    padding: 1rem 1rem 1.25rem;
}

.news-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ebf2ff, #f5f7fb);
    max-width: 100%;
    box-sizing: border-box;
}

.news-image img,
.article-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #edf3fb;
    box-sizing: border-box;
}

.news-image img {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    transition: transform 0.35s ease;
}

.news-card:hover .news-image img,
.article-image:hover {
    transform: scale(1.03);
}

.news-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.news-content h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.news-content p {
    margin-bottom: 1rem;
}

.news-card .btn-primary {
    margin-top: auto;
    width: fit-content;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #475569;
    font-size: 0.8rem;
}

.news-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(47, 127, 211, 0.08);
    color: var(--color-blue-dark);
    padding: 0.28rem 0.7rem;
    font-weight: 700;
}

.activity-public-grid {
    align-items: stretch;
}

.activity-archive-heading {
    margin-bottom: 1.5rem;
}

.activity-archive-heading h2 {
    margin-top: 0;
    color: var(--color-blue-dark);
}

.activity-archive-count {
    color: #475569;
    font-size: 0.9rem;
}

.activity-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    align-items: start;
    gap: 1rem;
}

.activity-archive-item {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.activity-archive-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #eef2f6;
}

.activity-public-card .news-content h2 {
    margin: 0 0 0.75rem;
    color: var(--color-blue-dark);
    font-family: var(--font-sans-secondary);
    font-size: 1.15rem;
    line-height: 1.35;
}

.activity-public-location {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
}

.activity-details {
    margin-top: auto;
    padding-top: 0.75rem;
}

.activity-details summary {
    color: var(--color-blue-dark);
    font-weight: 700;
    cursor: pointer;
}

.activity-details p {
    margin-top: 0.75rem;
    white-space: normal;
}

.activity-public-empty {
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4rem);
    border: 1px solid rgba(47, 127, 211, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.activity-public-empty > span {
    display: block;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.activity-public-empty h2 {
    color: var(--color-blue-dark);
}

.activity-public-empty p {
    margin-bottom: 1.5rem;
}

body.dark .activity-public-card .news-content h2,
body.dark .activity-details summary,
body.dark .activity-public-empty h2 {
    color: #e8edf3;
}

body.dark .activity-public-location {
    color: #c3ced8;
}

body.dark .activity-archive-heading h2 {
    color: #e8edf3;
}

body.dark .activity-archive-count {
    color: #c3ced8;
}

body.dark .activity-archive-item {
    background: #1a2632;
}

body.dark .activity-public-empty {
    border-color: #344454;
    background: rgba(26, 38, 50, 0.94);
}

.article-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    min-width: 0;
}

.article-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.article-content {
    width: 100%;
    min-width: 0;
}

.article-content h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

body.dark .image-fallback-note {
    color: #c3ced8;
}

body.dark .news-category {
    background: rgba(142, 200, 255, 0.12);
    color: #d8ebff;
}

@media (min-width: 900px) {
    .article-wrapper {
        flex-direction: row;
        gap: 2.5rem;
        align-items: stretch;
    }

    .article-image {
        width: 46%;
        max-width: 46%;
    }

    .article-content {
        width: 54%;
    }
}


/* ------------------------------
   Identité — logo & texte (Notre histoire)
------------------------------ */
/* ------------------------------
   Identité — section sur fond Afrique (image satellite NASA)
------------------------------ */
#identite.section-alt,
#histoire.section-alt {
    background-image:
        linear-gradient(rgba(8, 22, 48, 0.5), rgba(8, 22, 48, 0.5)),
        url("../../images/hero/afrique.jpg");
    background-repeat: no-repeat;
    background-position: center 30%;
    background-size: cover;
    background-attachment: fixed;
}

#identite.section-alt .section-header h2 {
    color: #ffffff;
}

#identite.section-alt .section-header p {
    color: #e8eef6;
}

#identite.section-alt .badge-role-gold {
    background: rgba(11, 44, 74, 0.55);
    border-color: rgba(244, 180, 26, 0.7);
    color: #ffd166;
}

body.dark #identite.section-alt,
body.dark #histoire.section-alt {
    background-image:
        linear-gradient(rgba(5, 12, 24, 0.68), rgba(5, 12, 24, 0.68)),
        url("../../images/hero/afrique.jpg");
}

/* ------------------------------
   Sections sur fonds photographiques du Togo
   (monument de l'Indépendance, cases en argile, paysage du nord)
------------------------------ */
#organigramme.governance-section {
    background-image:
        linear-gradient(rgba(8, 22, 48, 0.55), rgba(8, 22, 48, 0.55)),
        url("../../images/hero/monument.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

#projets.section-alt {
    background-image:
        linear-gradient(rgba(8, 22, 48, 0.55), rgba(8, 22, 48, 0.55)),
        url("../../images/hero/cases.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

#galerie-videos.section-alt {
    background-image:
        linear-gradient(rgba(8, 22, 48, 0.5), rgba(8, 22, 48, 0.5)),
        url("../../images/hero/paysage_nord.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

#partenaires.section-alt {
    background-image:
        linear-gradient(rgba(8, 22, 48, 0.5), rgba(8, 22, 48, 0.5)),
        url("../../images/hero/tropical.jpg");
    background-repeat: no-repeat;
    background-position: center 38%;
    background-size: cover;
    background-attachment: fixed;
}

body.dark #organigramme.governance-section {
    background-image:
        linear-gradient(rgba(5, 12, 24, 0.7), rgba(5, 12, 24, 0.7)),
        url("../../images/hero/monument.jpg");
}

body.dark #projets.section-alt {
    background-image:
        linear-gradient(rgba(5, 12, 24, 0.7), rgba(5, 12, 24, 0.7)),
        url("../../images/hero/cases.jpg");
}

body.dark #galerie-videos.section-alt {
    background-image:
        linear-gradient(rgba(5, 12, 24, 0.7), rgba(5, 12, 24, 0.7)),
        url("../../images/hero/paysage_nord.jpg");
}

body.dark #partenaires.section-alt {
    background-image:
        linear-gradient(rgba(5, 12, 24, 0.7), rgba(5, 12, 24, 0.7)),
        url("../../images/hero/tropical.jpg");
}

/* Textes clairs sur ces fonds sombres */
#organigramme .section-heading h2,
#projets .section-header h2,
#galerie-videos .section-header h2,
#partenaires .section-header h2 {
    color: #ffffff;
}

#organigramme .section-lead,
#projets .section-header p,
#galerie-videos .section-header p,
#partenaires .section-header p {
    color: #e8eef6;
}

#organigramme .badge-role-gold,
#projets .badge-role-gold,
#galerie-videos .badge-role-gold,
#partenaires .badge-role-gold {
    background: rgba(11, 44, 74, 0.55);
    border-color: rgba(244, 180, 26, 0.7);
    color: #ffd166;
}

#partenaires .note {
    color: #e8eef6;
}

#organigramme .org-level-title {
    color: #0b2c4a;
}

#organigramme .org-level-meta {
    color: #334155;
}

#organigramme .org-level-tag {
    background: #dbeafe;
    color: #1e3a8a;
}

#organigramme .org-tag-exec {
    background: #ffedd5;
    color: #7c2d12;
}

body.dark #organigramme .org-level-title {
    color: #f1f5f9;
}

body.dark #organigramme .org-level-meta {
    color: #cbd5e1;
}

body.dark #organigramme .org-level-tag {
    background: #1e3a5f;
    color: #dbeafe;
}

body.dark #organigramme .org-tag-exec {
    background: #713f12;
    color: #ffedd5;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
    gap: 2.5rem;
    align-items: center;
}

.about-image {
    grid-row: 1 / span 4;
}

.about-image img {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.about-text {
    background-color: rgba(255, 255, 255, 0.93);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

.about-principles {
    grid-column: 2;
}

@media (max-width: 960px) {
    .about-principles {
        grid-column: 1;
    }
}

.about-principles.about-text {
    padding: 1.5rem;
}

.about-principles p:last-child,
.about-text > .about-history-details:last-child {
    margin-bottom: 0;
}

.about-history-details {
    margin: 0 0 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background-color: rgba(228, 234, 242, 0.55);
}

.about-history-details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--color-blue-dark);
}

.about-history-details h3 {
    margin: 1.1rem 0 0.35rem;
    font-size: 1.02rem;
    color: var(--color-blue-dark);
}

.about-history-details p {
    margin: 0 0 0.6rem;
}

.about-text h2 {
    font-family: var(--font-sans-secondary);
    color: var(--color-blue-dark);
    font-size: 1.35rem;
    margin: 1.75rem 0 0.5rem;
}

.about-text h2:first-child {
    margin-top: 0;
}

.values-list {
    margin: 0;
    padding-left: 1.25rem;
}

.values-list li {
    margin-bottom: 0.45rem;
}

@media (max-width: 960px) {
    #identite.section-alt,
    #histoire.section-alt,
    #organigramme.governance-section,
    #projets.section-alt,
    #galerie-videos.section-alt,
    #partenaires.section-alt {
        background-attachment: scroll;
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-image {
        grid-row: auto;
        max-width: 520px;
        margin: 0 auto;
    }
}

/* ------------------------------
   Contact
------------------------------ */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    perspective: 1400px;
}

.contact-info {
    background-color: var(--color-white);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    box-shadow: var(--shadow-soft);
}

body.dark .contact-info {
    background-color: #1a2632;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.contact-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

body.dark .contact-socials {
    border-top-color: #344454;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-blue-dark), #164a7c);
    color: var(--color-white);
    border: 1px solid rgba(244, 180, 26, 0.45);
    box-shadow: 0 4px 12px rgba(11, 44, 74, 0.25);
    transition: var(--transition-fast);
}

.social-icon:hover,
.social-icon:focus-visible {
    transform: translateY(-2px);
    border-color: var(--color-yellow);
    box-shadow: 0 8px 18px rgba(11, 44, 74, 0.35);
    color: #ffd166;
}

.social-icon-logo {
    background: var(--color-white);
    overflow: hidden;
}

.social-icon-logo img {
    width: 34px;
    height: auto;
}

.contact-info a {
    text-decoration: none;
}

.contact-info a:hover,
.contact-info a:focus-visible {
    text-decoration: underline;
}

.contact-form {
    position: relative;
    padding: 2rem;
    overflow: hidden;
    border: 1px solid #d8e1ec;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f5f8fc 100%);
    box-shadow: 0 14px 36px rgba(11, 44, 74, 0.12);
    transition: box-shadow var(--transition-medium), border-color var(--transition-medium);
}

.contact-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-yellow), var(--color-blue-light), var(--color-blue-dark));
}

.contact-form:hover,
.contact-form:focus-within {
    border-color: #b9cadd;
    box-shadow: 0 18px 42px rgba(11, 44, 74, 0.17);
}

.contact-form h2 {
    margin: 0 0 1.25rem;
    color: var(--color-blue-dark);
    font-family: var(--font-sans-secondary);
    font-size: 1.55rem;
}

.contact-form label {
    display: block;
    margin: 1rem 0 0.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-blue-dark);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #64748b;
    opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2f7fd3;
    box-shadow: 0 0 0 3px rgba(47, 127, 211, 0.2);
}

.contact-form .btn-primary {
    min-height: 50px;
    margin-top: 1.25rem;
    width: 100%;
    box-shadow: 0 6px 14px rgba(11, 44, 74, 0.18);
}

.contact-form .btn-primary:hover {
    box-shadow: 0 9px 20px rgba(11, 44, 74, 0.24);
}

.contact-form .btn-primary:focus-visible {
    outline: 3px solid #2f7fd3;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .contact-form,
    .contact-form input,
    .contact-form textarea {
        transition: none;
    }
}

body.dark .contact-form {
    background: linear-gradient(145deg, #1e2a38 0%, #141f2a 100%);
    border-color: #344454;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
}

body.dark .contact-form:hover,
body.dark .contact-form:focus-within {
    border-color: #526579;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

body.dark .contact-form h2 {
    color: #f1f5f9;
}

body.dark .contact-form label {
    color: #e8eef6;
}

body.dark .contact-form input,
body.dark .contact-form textarea {
    border-color: #526579;
    background-color: #101820;
    color: #f2f6fa;
}

body.dark .contact-form input::placeholder,
body.dark .contact-form textarea::placeholder {
    color: #aab8c5;
}

body.dark .contact-form input:focus,
body.dark .contact-form textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(128, 189, 255, 0.22);
}

@media (max-width: 480px) {
    .contact-form {
        padding: 1.5rem 1.1rem;
    }
}

.form-message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid transparent;
}

.form-message-success {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.25);
    color: #0f766e;
}

.form-message-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

/* ------------------------------
   Footer
------------------------------ */
.main-footer {
    background-color: #0b1f33;
    color: #e5e7eb;
    padding: 2.5rem 0;
    margin-top: 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    height: 45px;
    width: auto;
    margin-top: 10px;
}

.footer-col h3 {
    font-family: var(--font-sans-secondary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--color-yellow);
}

.footer-col a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

/* ------------------------------
   Dark mode
------------------------------ */
body.dark {
    color-scheme: dark;
    background-color: #101820;
    background-image:
        linear-gradient(rgba(16, 24, 32, 0.93), rgba(16, 24, 32, 0.93)),
        url("../../images/hero/paysage_nord.jpg");
    color: #e8edf3;
}

body.dark .main-header {
    background-color: #141f2a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark .logo-text {
    color: #f2f6fa;
}

body.dark p,
body.dark li,
body.dark label,
body.dark .section-header p,
body.dark .card p {
    color: #c3ced8;
}

body.dark .card,
body.dark .contact-form {
    background-color: #1a2632;
    border-color: #344454;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

body.dark .about-text {
    background-color: #1a2632;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

body.dark .about-history-details {
    background-color: #141f2a;
    border-color: #344454;
}

body.dark .about-history-details summary,
body.dark .about-history-details h3 {
    color: #f2f6fa;
}

body.dark .gallery-item figcaption,
body.dark .gallery-video-item figcaption {
    color: #c3ced8;
}

body.dark .gallery-item figcaption {
    color: #fff;
}

body.dark .card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

body.dark .section-alt {
    background-color: #151f2a;
}

body.dark .main-footer {
    background-color: #0b1219;
}

body.dark .main-nav a {
    color: #d5dee7;
}

body.dark .main-nav a:hover,
body.dark .main-nav a.active {
    color: #ffd166;
}

body.dark .main-nav {
    background-color: #141f2a;
}

body.dark .theme-toggle,
body.dark .nav-toggle-bar {
    color: #f2f6fa;
}

body.dark .theme-toggle {
    background: transparent;
}

body.dark .language-switcher select {
    border-color: #465767;
    background: #101820;
    color: #f2f6fa;
}

body.dark .contact-form input,
body.dark .contact-form textarea,
body.dark input,
body.dark textarea,
body.dark select {
    border-color: #465767;
    background-color: #101820;
    color: #f2f6fa;
}

body.dark .form-message-success {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.25);
    color: #99f6e4;
}

body.dark .form-message-error {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.25);
    color: #fecaca;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
    color: #aab8c5;
    opacity: 1;
}

body.dark .contact-form input:focus,
body.dark .contact-form textarea:focus,
body.dark input:focus,
body.dark textarea:focus,
body.dark select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(128, 189, 255, 0.2);
}

body.dark a:not(.btn) {
    color: #8ec8ff;
}

body.dark a:not(.btn):hover {
    color: #ffd166;
}

body.dark .footer-col a {
    color: #d5dee7;
}

body.dark .btn-primary {
    background: #2f7fd3;
    color: #071725;
}

body.dark .btn-secondary {
    border-color: #d5dee7;
    color: #f2f6fa;
}

body.dark .assistant-message-link {
    color: #83d8bb;
}

body.dark :focus-visible {
    outline: 3px solid #ffd166;
    outline-offset: 3px;
}

/* ------------------------------
   Responsive
------------------------------ */
@media (max-width: 960px) {
    .nav-container {
        gap: 0.55rem;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #11395d;
        box-shadow: 0 10px 25px rgba(11, 44, 74, 0.35);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-medium);
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.75rem 1rem 1rem;
        gap: 0.5rem;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
        text-align: center;
    }

    .hero-image img {
        max-width: 380px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body {
        background-attachment: scroll;
    }

    .hero {
        background-position: 58% center;
        padding: 3.5rem 0;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #11395d;
        box-shadow: 0 10px 25px rgba(11, 44, 74, 0.35);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-medium);
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.75rem 1rem 1rem;
        gap: 0.5rem;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .nav-container {
        gap: 0.45rem;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .logo {
        min-width: 0;
    }

    .logo-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .language-switcher select {
        width: 4rem;
    }

    .grid-3,
    .grid-4,
    .footer-container {
        grid-template-columns: 1fr;
    }

    .gallery-slider-controls {
        gap: 0.45rem;
    }

    .hero-text h1 {
        font-size: 2.1rem;
    }
}

/* ------------------------------
   Assistant de discussion
------------------------------ */
.site-assistant {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1100;
    font-family: var(--font-sans-primary);
}

.assistant-support {
    position: relative;
    border: 0;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 3.25rem;
    min-height: 3.25rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: #a52148;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(11, 44, 74, 0.24);
}

.assistant-support:hover {
    background: #7d1635;
    color: #fff;
}

.assistant-support:disabled {
    cursor: wait;
    opacity: 0.7;
}

.support-like {
    position: relative;
}

.support-feedback {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: max-content;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: #fff;
    color: #7d1635;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.support-feedback:empty {
    display: none;
}

.support-heart-burst {
    position: absolute;
    left: 50%;
    top: 0;
    pointer-events: none;
}

.support-heart-burst > span {
    position: absolute;
    color: #f44f80;
    font-size: 1.4rem;
    animation: support-heart-rise 1s ease-out both;
    animation-delay: var(--heart-delay);
}

@keyframes support-heart-rise {
    from { opacity: 1; transform: translate(-50%, 0) scale(0.6); }
    to { opacity: 0; transform: translate(var(--heart-x), -90px) scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
    .support-heart-burst {
        display: none;
    }
}

.assistant-support:focus-visible {
    outline: 3px solid #ffd166;
    outline-offset: 3px;
}

.assistant-support > span:first-child {
    font-size: 1.3rem;
}

.assistant-launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 3.25rem;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #176b5b;
    color: #fff;
    box-shadow: 0 8px 24px rgba(11, 44, 74, 0.24);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.assistant-launcher:hover,
.assistant-form button:hover {
    background: #105447;
}

.assistant-launcher-icon {
    font-size: 1.2rem;
}

.assistant-panel {
    position: absolute;
    right: 0;
    bottom: 4.1rem;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 2rem));
    max-height: min(600px, calc(100dvh - 7rem));
    overflow: hidden;
    border: 1px solid #d9e4df;
    border-radius: 8px;
    background: #fff;
    color: #1f2933;
    box-shadow: 0 16px 48px rgba(11, 44, 74, 0.2);
    animation: assistant-appear 160ms ease-out;
}

.assistant-panel[hidden] {
    display: none;
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: #176b5b;
    color: #fff;
}

.assistant-header div {
    display: grid;
    gap: 0.15rem;
}

.assistant-header span {
    color: #d8eee7;
    font-size: 0.78rem;
}

.assistant-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.assistant-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 120px;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.assistant-message {
    max-width: 88%;
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.assistant-message-bot {
    align-self: flex-start;
    white-space: pre-wrap;
    background: #edf5f1;
}

.assistant-message-user {
    align-self: flex-end;
    background: #e8f0f8;
}

.assistant-message-link {
    align-self: flex-start;
    color: #176b5b;
    font-size: 0.88rem;
    font-weight: 700;
}

.assistant-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    font-size: 0.78rem;
}

.assistant-sources span {
    color: #475569;
    font-weight: 700;
}

.assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1rem 0.8rem;
}

.assistant-suggestions button {
    padding: 0.4rem 0.6rem;
    border: 1px solid #b8d4ca;
    border-radius: 999px;
    background: #fff;
    color: #176b5b;
    font: inherit;
    font-size: 0.76rem;
    cursor: pointer;
}

.assistant-suggestions button:hover {
    background: #edf5f1;
}

.assistant-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid #e3e9e6;
}

.assistant-form input:not([type="hidden"]) {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.7rem;
    border: 1px solid #cbd5d1;
    border-radius: 6px;
    color: inherit;
    font: inherit;
}

.assistant-form input:not([type="hidden"]):focus {
    outline: 2px solid #176b5b;
    outline-offset: 1px;
}

.assistant-form button {
    padding: 0.6rem 0.8rem;
    border: 0;
    border-radius: 6px;
    background: #176b5b;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.assistant-form button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.assistant-disclaimer {
    margin: 0;
    padding: 0 1rem 0.8rem;
    color: #475569;
    font-size: 0.78rem;
}

.assistant-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.dark .assistant-panel {
    border-color: #334155;
    background: #0f172a;
    color: #e5e7eb;
}

body.dark .assistant-message-bot,
body.dark .assistant-suggestions button {
    background: #1e293b;
    color: #e5e7eb;
}

body.dark .assistant-message-user {
    background: #18364a;
}

body.dark .assistant-sources span {
    color: #cbd5e1;
}

body.dark .assistant-form {
    border-color: #334155;
}

body.dark .assistant-form input:not([type="hidden"]) {
    border-color: #475569;
    background: #020617;
    color: #e5e7eb;
}

body.dark .assistant-disclaimer {
    color: #cbd5e1;
}

@keyframes assistant-appear {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .assistant-support {
        padding: 0.65rem;
    }

    .assistant-support-label {
        display: none;
    }

    .site-assistant {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .assistant-panel {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 4.7rem;
        width: auto;
        max-height: calc(100dvh - 6rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-slide.animate,
    .slide.animate,
    .gallery-slide.is-exiting,
    .slide.is-exiting,
    .gallery-slide[class*="eff-"] {
        animation: none !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
    }
    .gallery-slide.is-active .gallery-item img {
        animation: none !important;
    }
}

/* =========================================================
   GOUVERNANCE & ORGANIGRAMME HIÉRARCHIQUE (Statuts 2015)
   ========================================================= */

.governance-section {
    position: relative;
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.badge-role-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    background: rgba(244, 180, 26, 0.16);
    border: 1px solid rgba(244, 180, 26, 0.45);
    color: #7c2d12;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

body.dark .badge-role-gold {
    background: rgba(244, 180, 26, 0.12);
    border-color: rgba(244, 180, 26, 0.4);
    color: #fbbf24;
}

.organigramme-tree {
    max-width: 1140px;
    margin: 2.5rem auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* NIVEAU 0 : Assemblée Générale */
.org-level-ag {
    width: 100%;
    display: flex;
    justify-content: center;
}

.org-node-ag {
    max-width: 720px;
    width: 100%;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #0b2c4a, #163e65);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(11, 44, 74, 0.25);
    border: 1px solid rgba(244, 180, 26, 0.35);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.org-node-ag:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(11, 44, 74, 0.35);
}

.org-node-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(244, 180, 26, 0.22);
    color: #f4b41a;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.org-node-title {
    margin: 0.25rem 0 0.5rem;
    font-family: var(--font-sans-secondary);
    font-size: 1.35rem;
    color: #ffffff;
}

.org-node-desc {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #e0e7ef;
}

.org-statut-ref {
    display: inline-block;
    font-size: 0.78rem;
    color: #ffd166;
    font-weight: 600;
}

/* Connecteurs verticaux */
.org-connector-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0;
    position: relative;
}

.org-connector-line {
    width: 3px;
    height: 36px;
    background: linear-gradient(to bottom, #f4b41a, #2f7fd3);
}

.org-connector-label {
    margin-top: -0.3rem;
    margin-bottom: 0.2rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d0d7e5;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0b2c4a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

body.dark .org-connector-label {
    background: #0f172a;
    border-color: #334155;
    color: #ffd166;
}

/* NIVEAU 1 : Conseil d'Administration */
.org-level-ca,
.org-level-coordination {
    width: 100%;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(11, 44, 74, 0.12);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    backdrop-filter: blur(8px);
}

body.dark .org-level-ca,
body.dark .org-level-coordination {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

.org-level-header {
    text-align: center;
    margin-bottom: 2rem;
}

.org-level-tag {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    background: rgba(47, 127, 211, 0.12);
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.dark .org-level-tag {
    background: rgba(47, 127, 211, 0.2);
    color: #93c5fd;
}

.org-tag-exec {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

body.dark .org-tag-exec {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}

.org-level-title {
    margin: 0.4rem 0 0.25rem;
    font-family: var(--font-sans-secondary);
    font-size: 1.5rem;
    color: var(--color-blue-dark);
}

body.dark .org-level-title {
    color: #e2e8f0;
}

.org-level-meta {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

body.dark .org-level-meta {
    color: #94a3b8;
}

/* Président Wrapper */
.org-ca-president-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Branch connector */
.org-connector-branch {
    position: relative;
    width: 80%;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-connector-stem {
    width: 2px;
    height: 24px;
    background: #f4b41a;
}

.org-connector-bar {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #f4b41a 10%, #f4b41a 90%, transparent);
}

/* Membres Grid */
.org-ca-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Cartes individuelles */
.org-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.org-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 44, 74, 0.12);
    border-color: rgba(47, 127, 211, 0.4);
}

body.dark .org-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark .org-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    border-color: rgba(244, 180, 26, 0.4);
}

/* Carte Président (Mise en valeur) */
.org-card-president {
    max-width: 460px;
    width: 100%;
    padding: 2rem 1.75rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #f4b41a;
    box-shadow: 0 10px 30px rgba(244, 180, 26, 0.15);
}

body.dark .org-card-president {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #f4b41a;
    box-shadow: 0 10px 30px rgba(244, 180, 26, 0.1);
}

.org-card-badge {
    position: absolute;
    top: -11px;
    padding: 0.22rem 0.8rem;
    border-radius: 999px;
    background: #0b2c4a;
    color: #f4b41a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.org-card-president .org-card-badge {
    background: linear-gradient(135deg, #f4b41a, #d97706);
    color: #0b2c4a;
    font-size: 0.76rem;
}

/* Photo Wrapper & Image */
.org-photo-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 1.15rem;
    border-radius: 50%;
}

.org-card-president .org-photo-wrapper,
.org-card-coordinator .org-photo-wrapper {
    width: 130px;
    height: 130px;
}

.org-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #0b2c4a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    border: 3px solid #ffffff;
    transition: transform 0.3s ease;
}

.org-card:hover .org-photo {
    transform: scale(1.04);
}

body.dark .org-photo {
    border-color: #334155;
}

.org-photo-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(47, 127, 211, 0.35);
    pointer-events: none;
    transition: border-color 0.3s ease, inset 0.3s ease;
}

.org-card:hover .org-photo-ring {
    border-color: #f4b41a;
    inset: -6px;
}

.org-card-president .org-photo-ring,
.org-ring-gold {
    border-color: rgba(244, 180, 26, 0.7);
}

/* Contenu de carte */
.org-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.org-member-name {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-blue-dark);
}

.org-card-president .org-member-name {
    font-size: 1.25rem;
}

body.dark .org-member-name {
    color: #f1f5f9;
}

.org-member-role {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

body.dark .org-member-role {
    color: #93c5fd;
}

.org-member-desc {
    margin: 0 0 1rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #475569;
    flex-grow: 1;
}

body.dark .org-member-desc {
    color: #cbd5e1;
}

.org-card-footer {
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px dashed #e2e8f0;
    width: 100%;
}

body.dark .org-card-footer {
    border-top-color: #334155;
}

.org-signature-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

body.dark .org-signature-tag {
    color: #94a3b8;
}

/* Connecteur de délégation CA -> Coordination */
.org-connector-delegation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.75rem 0 1.25rem;
    position: relative;
}

.org-connector-delegation .org-connector-line {
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, #2f7fd3, #d97706);
}

.org-connector-pill {
    margin-top: -0.65rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: #0b2c4a;
    color: #f4b41a;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px rgba(11, 44, 74, 0.2);
}

/* Coordination Wrapper & Card */
.org-coordination-wrapper {
    display: flex;
    justify-content: center;
}

.org-card-coordinator {
    max-width: 500px;
    width: 100%;
    padding: 2rem 1.75rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #2f7fd3;
    box-shadow: 0 10px 30px rgba(47, 127, 211, 0.15);
}

body.dark .org-card-coordinator {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #2f7fd3;
    box-shadow: 0 10px 30px rgba(47, 127, 211, 0.1);
}

.org-badge-coordinator {
    background: linear-gradient(135deg, #2f7fd3, #0b2c4a);
    color: #ffffff;
}

/* Organes associés (Commissariat aux comptes & Antennes) */
.org-associated-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

.org-associated-card {
    padding: 1.5rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    text-align: center;
}

body.dark .org-associated-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.org-associated-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.org-associated-card h4 {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.05rem;
    color: var(--color-blue-dark);
}

body.dark .org-associated-card h4 {
    color: #f1f5f9;
}

.org-associated-card p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #475569;
}

body.dark .org-associated-card p {
    color: #94a3b8;
}

/* Bouton document statutaire */
.org-doc-link-wrap {
    margin-top: 2.5rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .org-ca-members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 720px) {
    .org-ca-members-grid {
        grid-template-columns: 1fr;
    }

    .org-associated-grid {
        grid-template-columns: 1fr;
    }

    .org-connector-branch {
        display: none;
    }

    .org-node-ag {
        padding: 1.25rem 1rem;
    }

    .org-node-title {
        font-size: 1.15rem;
    }
}
