/* ============================================
   A.F.3C.SNJ — Refonte moderne (couche de design)
   Chargé APRÈS styles.css : redéfinit les couleurs,
   la typographie, les cartes, la navigation et le footer.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
    --vert: #12a636;
    --vert-fonce: #0b7a28;
    --vert-clair: #e8f7ec;
    --or: #f5c518;
    --or-fonce: #c99a00;
    --rouge: #ce1126;
    --noir: #0f172a;
    --gris-fonce: #1e293b;
    --gris: #475569;
    --gris-clair: #f6f8fb;
    --bordure: #e5e9f0;
    --rayon: 18px;
    --rayon-sm: 12px;
    --ombre: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --ombre-forte: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 48px rgba(15, 23, 42, .12);
    --transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--noir);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -.02em;
    color: var(--noir);
}

::selection { background: var(--vert); color: #fff; }

/* ---------- Boutons ---------- */
.btn {
    border-radius: 999px;
    padding: 13px 28px;
    font-weight: 600;
    letter-spacing: 0;
    border: 1.5px solid transparent;
    transition: var(--transition);
}
.btn-primary {
    background: var(--vert);
    color: #fff;
    box-shadow: 0 6px 18px rgba(18, 166, 54, .28);
}
.btn-primary:hover {
    background: var(--vert-fonce);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(18, 166, 54, .35);
}
.btn-secondary {
    background: var(--gris-clair);
    color: var(--noir);
    border-color: var(--bordure);
}
.btn-outline {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.btn-outline:hover {
    background: #fff;
    color: var(--noir);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ---------- Navigation (verre dépoli clair) ---------- */
.navbar {
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--bordure);
    box-shadow: none;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 4px 24px rgba(15, 23, 42, .08);
}
.nav-brand .brand-text { color: var(--noir); }
.nav-brand .brand-text .brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1rem; }
.nav-brand .brand-text .brand-sub { color: var(--vert-fonce); font-weight: 500; }
.nav-logo-img { border-radius: 12px; }
.nav-menu a { color: var(--gris); font-weight: 500; border-radius: 999px; padding: 8px 12px; }
.nav-menu a:hover,
.nav-menu a.active { color: var(--vert-fonce); background: var(--vert-clair); }
.nav-menu a.active::after { display: none; }
.nav-menu a.nav-cta,
.nav-cta { border-radius: 999px !important; }
.nav-menu a.btn-secondary.nav-cta {
    background: transparent !important;
    color: var(--gris) !important;
    border: 1px solid var(--bordure) !important;
}
.nav-menu a.btn-primary.nav-cta { background: var(--vert) !important; color: #fff !important; }
.nav-toggle span { background: var(--noir); }
.dropdown-menu {
    background: #fff;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre-forte);
}
.dropdown-menu a { color: var(--gris) !important; }
.dropdown-menu a:hover { color: var(--vert-fonce) !important; background: var(--vert-clair); }
.dropdown-label { color: var(--vert-fonce); }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(900px 500px at 15% 10%, rgba(18, 166, 54, .45), transparent 60%),
        radial-gradient(700px 500px at 90% 90%, rgba(245, 197, 24, .22), transparent 60%),
        radial-gradient(600px 400px at 85% 10%, rgba(206, 17, 38, .22), transparent 60%),
        linear-gradient(160deg, #06150d 0%, #0b2415 55%, #0a1a14 100%);
}
.hero::before {
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero h1 { font-weight: 800; letter-spacing: -.03em; color: #fff; }
.hero h1 .highlight {
    background: linear-gradient(90deg, #5ee27c, var(--or));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-badge {
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.hero-logo-img { border-radius: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.hero .promotion { color: rgba(255, 255, 255, .8); }
.hero-stats .hero-stat {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--rayon);
    padding: 18px 26px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.hero-stat .number { color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; }
.hero-stat .label { color: rgba(255, 255, 255, .7); }
.hero-divider { height: 4px; background: linear-gradient(90deg, var(--vert) 33%, var(--or) 33% 66%, var(--rouge) 66%); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-light { background: var(--gris-clair); }
.section-dark {
    background:
        radial-gradient(700px 300px at 10% 0%, rgba(18, 166, 54, .22), transparent 70%),
        #0b1a13;
}
.section-header .overline {
    display: inline-block;
    background: var(--vert-clair);
    color: var(--vert-fonce);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.section-dark .section-header .overline { background: rgba(255, 255, 255, .1); color: #8df0a5; }
.section-header h2 { font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-dark .section-header h2 { color: #fff; }
.section-divider { width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--vert), var(--or)); }

/* ---------- Cartes ---------- */
.objectif-card, .organe-card, .valeur-item, .realisation-card, .condition-card,
.contact-card, .cohorte-card, .contingent-card, .partenaire-card, .bureau-member,
.cotisation-table, .form-container, .article-box, .aide-item, .gallery-item,
.commissaires-wrapper, .hommage-engagement-item {
    border-radius: var(--rayon);
}
.objectif-card, .organe-card, .realisation-card, .condition-card, .contact-card,
.cohorte-card, .contingent-card, .partenaire-card, .bureau-member, .cotisation-table,
.form-container {
    background: #fff;
    border: 1px solid var(--bordure);
    box-shadow: var(--ombre);
    transition: var(--transition);
}
.objectif-card:hover, .organe-card:hover, .realisation-card:hover, .condition-card:hover,
.contact-card:hover, .cohorte-card:hover, .contingent-card:hover, .partenaire-card:hover,
.bureau-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--ombre-forte);
    border-color: rgba(18, 166, 54, .35);
}
.section-dark .valeur-item, .section-dark .aide-item {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.objectif-card .icon, .organe-card .o-icon, .partenaire-icon, .condition-card .c-icon, .contact-card .cc-icon {
    background: var(--vert-clair);
    border-radius: 16px;
}
.realisation-date { border-radius: var(--rayon-sm); background: var(--vert); color: #fff; }

/* ---------- En-têtes de pages internes ---------- */
.page-header {
    background:
        radial-gradient(700px 300px at 20% 0%, rgba(18, 166, 54, .45), transparent 65%),
        radial-gradient(500px 300px at 90% 100%, rgba(245, 197, 24, .2), transparent 65%),
        linear-gradient(160deg, #06150d, #0b2415);
    padding: 140px 0 72px;
}
.page-header h1 { color: #fff; font-weight: 800; }
.page-header p { color: rgba(255, 255, 255, .75); }
.breadcrumb a { color: #8df0a5; }

/* ---------- Formulaires ---------- */
.form-group input, .form-group select, .form-group textarea {
    border: 1.5px solid var(--bordure);
    border-radius: var(--rayon-sm);
    background: #fff;
    transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--vert);
    box-shadow: 0 0 0 4px rgba(18, 166, 54, .15);
    outline: none;
}

/* ---------- Carrousel / galerie / vidéo ---------- */
.carousel, .video-wrapper, .gallery-item { border-radius: 22px; overflow: hidden; box-shadow: var(--ombre-forte); }
.carousel-btn { border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--noir); }
.carousel-dot.active { background: var(--vert); }

/* ---------- Citation du président ---------- */
.president-photo img { border-radius: 24px; box-shadow: var(--ombre-forte); }

/* ---------- Pied de page ---------- */
.footer {
    background: #07120c;
    border-top: 0;
}
.footer h4 { color: #fff; }
.footer-links a:hover { color: #8df0a5; }

/* ---------- Mobile ---------- */
@media (max-width: 991px) {
    .nav-menu { background: #fff; box-shadow: -10px 0 40px rgba(15, 23, 42, .18); }
    .nav-menu a { border-radius: var(--rayon-sm); }
    .nav-dropdown .dropdown-menu { background: var(--gris-clair); }
}
@media (max-width: 767px) {
    .section { padding: 64px 0; }
}

/* ---------- Animations d'apparition douces ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ============================================
   Intégration Bootstrap 5 (navbar, offcanvas, grille, formulaires)
   ============================================ */
:root {
    --bs-primary: #12a636;
    --bs-primary-rgb: 18, 166, 54;
    --bs-success: #12a636;
    --bs-success-rgb: 18, 166, 54;
    --bs-link-color: #0b7a28;
    --bs-body-font-family: 'Inter', system-ui, sans-serif;
    --bs-border-radius: 12px;
}
.btn-success { --bs-btn-bg: var(--vert); --bs-btn-border-color: var(--vert); --bs-btn-hover-bg: var(--vert-fonce); --bs-btn-hover-border-color: var(--vert-fonce); --bs-btn-active-bg: var(--vert-fonce); }

.navbar { padding: 8px 0; position: fixed; top: 0; left: 0; right: 0; z-index: 1030; }
.navbar .container { padding-top: 0; padding-bottom: 0; }
.navbar-brand { margin: 0; padding: 4px 0; }
.navbar-brand .brand-name { color: var(--noir); font-size: 1rem; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: 0; }
.navbar-brand .brand-sub { color: var(--vert-fonce); font-size: .7rem; font-weight: 500; }
.navbar .nav-link { color: var(--gris); font-size: .86rem; font-weight: 500; padding: .5rem .75rem; border-radius: 999px; }
.navbar .nav-link:hover, .navbar .nav-link.active, .navbar .nav-link.show { color: var(--vert-fonce); background: var(--vert-clair); }
.navbar .dropdown-toggle::after { margin-left: .4em; vertical-align: .15em; }
.dropdown-menu-mega { padding: 10px; border-radius: 16px; min-width: 240px; max-height: 70vh; overflow-y: auto; }
.dropdown-menu-mega .dropdown-item { border-radius: 8px; font-size: .88rem; padding: 6px 12px; }
.dropdown-menu-mega .dropdown-item:hover { background: var(--vert-clair); color: var(--vert-fonce); }
.dropdown-header { color: var(--vert-fonce); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.offcanvas { border-left: 0; }
@media (min-width: 992px) {
    .offcanvas { position: static; transform: none !important; visibility: visible !important; background: transparent; width: auto; border: 0; flex-grow: 1; }
    .offcanvas-body { display: flex; align-items: center; padding: 0; overflow: visible; }
}
@media (max-width: 991.98px) {
    .navbar .nav-link { border-radius: 12px; font-size: 1rem; padding: .7rem .9rem; }
    .dropdown-menu-mega { box-shadow: none !important; background: var(--gris-clair); }
}

/* Hero (grille Bootstrap) */
.hero { padding: 120px 0 80px; }
.hero-content { max-width: 1140px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.hero-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 10px; }
.hero-stat .number { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1; }
.hero-stat .label { font-size: .78rem; margin-top: 6px; }

/* Grilles converties : cartes pleine hauteur */
.row > [class*="col"] > .objectif-card, .row > [class*="col"] > .organe-card,
.row > [class*="col"] > .realisation-card, .row > [class*="col"] > .partenaire-card,
.row > [class*="col"] > .valeur-item, .row > [class*="col"] > .aide-item { margin: 0; width: 100%; }
.partenaire-card { display: block; padding: 24px; }
.cta-panel { max-width: 820px; padding: 56px 32px; border-radius: 28px; background: #fff; border: 1px solid var(--bordure); box-shadow: var(--ombre-forte); }

/* Formulaires */
.form-container { padding: 32px; }
.form-label { font-size: .9rem; color: var(--gris-fonce); }
.form-control, .form-select { border: 1.5px solid var(--bordure); border-radius: var(--rayon-sm); padding: .7rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--vert); box-shadow: 0 0 0 4px rgba(18, 166, 54, .15); }
.form-group { margin-bottom: 1rem; }
.form-row > .form-group { flex: 1 1 100%; width: 100%; }
@media (min-width: 576px) { .form-row > .form-group { flex: 1 1 calc(50% - 1rem); width: auto; } }

/* Fil d'Ariane */
.page-header .breadcrumb { background: transparent; padding: 0; margin-top: 16px; }
.page-header .breadcrumb-item, .page-header .breadcrumb-item.active { color: rgba(255,255,255,.75); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.45); }
.footer { color: rgba(255,255,255,.65); }
.footer a { color: rgba(255,255,255,.65); }
.footer .brand-sub { color: #8df0a5; font-size: .8rem; }
.footer-links li { margin-bottom: 8px; }
.footer-contact li { display: flex; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }

/* Navbar : pas de retour à la ligne, conteneur large */
.navbar .container { max-width: 1320px; }
.navbar .nav-link, .navbar .btn { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1279.98px) {
    .navbar .nav-link { padding: .45rem .5rem; font-size: .8rem; }
    .navbar-brand .brand-sub { display: none !important; }
}

/* Hero : apparition fiable (remplace l'animation d'origine) */
@keyframes heroRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero .hero-content .row > div > * { opacity: 1; animation: heroRise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero .hero-content .row > div > *:nth-child(2) { animation-delay: .08s; }
.hero .hero-content .row > div > *:nth-child(3) { animation-delay: .16s; }
.hero .hero-content .row > div > *:nth-child(4) { animation-delay: .24s; }
.hero .hero-content .row > div > *:nth-child(5) { animation-delay: .32s; }
.hero .hero-content .row > div > *:nth-child(n+6) { animation-delay: .4s; }
.hero h1, .hero .promotion, .hero .devise, .hero .hero-date, .hero .hero-buttons { opacity: 1; }

/* Icônes de cartes : pastilles carrées */
.objectif-card .icon, .organe-card .o-icon, .partenaire-icon, .condition-card .c-icon, .contact-card .cc-icon {
    width: 60px; height: 60px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem;
}

@media (max-width: 575.98px) {
    .navbar-brand .brand-sub { display: none !important; }
    .navbar-brand .brand-name { font-size: 1.05rem; }
    .navbar-toggler { margin-left: auto; flex-shrink: 0; }
    .hero { padding: 100px 0 56px; }
}

/* Section président : empilement sur mobile (la règle de base d'origine écrasait le responsive) */
.president-message { min-width: 0; }
@media (max-width: 767.98px) {
    .president-section { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .president-photo img { max-width: 220px; }
}
html, body { overflow-x: clip; }
.hero .hero-stats.row { display: flex; flex-direction: row; flex-wrap: wrap; margin-top: 0; gap: 0; }
@media (max-width: 575.98px) { .hero-stat { padding: 12px 6px; } .hero-stat .label { font-size: .68rem; } }

/* Carrousel : fond de chargement + conflits Bootstrap (.carousel-indicators est en position absolue) */
.carousel-slide { background: linear-gradient(135deg, #e8f7ec, #dfe6ee); aspect-ratio: 16 / 9; }
.carousel-slide img { height: 100%; min-height: 320px; max-height: 520px; }
.carousel-indicators { position: static; margin: 16px 0 0; justify-content: center; flex-wrap: wrap; }
.carousel-indicators:empty { display: none; }
@media (max-width: 575.98px) { .carousel-slide img { min-height: 240px; } }

/* Vidéos : lecteur à gauche, liste de lecture visible à droite (sinon elle était repoussée sous la vidéo) */
.video-player-section { flex-direction: column; align-items: stretch; gap: 20px; }
.video-wrapper video { max-height: 70vh; object-fit: contain; }
.video-playlist { grid-template-columns: repeat(2, 1fr); }
.video-playlist-item { border-radius: var(--rayon-sm); }
.video-playlist-item:hover { background: rgba(141, 240, 165, .12); border-color: rgba(141, 240, 165, .35); }
.video-playlist-item.active { background: rgba(141, 240, 165, .16); border-color: #5ee27c; box-shadow: none; }
.video-playlist-item.active .video-play-icon, .video-play-icon { color: #8df0a5; }
@media (min-width: 992px) {
    .video-player-section { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; gap: 24px; }
    .video-playlist { grid-template-columns: 1fr; max-height: 480px; overflow-y: auto; padding-right: 4px; align-content: start; }
    .video-playlist::before { content: 'Toutes les vidéos'; color: #8df0a5; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
}
@media (max-width: 767.98px) { .video-playlist { grid-template-columns: 1fr; } }
