/* =========================================================
   AFPOD — feuille de style du site public
   Couleurs tirées du logo : vert, magenta, jaune
========================================================= */
:root {
    --brand: #157a3c;
    --brand-dark: #0f5c2d;
    --brand-soft: #eaf4ec;
    --accent: #c2185b;
    --accent-dark: #9c1249;
    --sun: #f4c20d;
    --ink: #1d2a22;
    --muted: #5b665e;
    --line: #e3e8e2;
    --bg: #ffffff;
    --bg-alt: #f6f8f5;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(20, 40, 25, .07);
    --shadow-lg: 0 14px 34px rgba(20, 40, 25, .14);
    --header-h: 72px;
    --font-title: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Open Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    padding-top: var(--header-h);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 2000;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Boutons ---------- */
.btn { font-weight: 600; border-radius: 10px; padding: .7rem 1.4rem; transition: all .2s ease; }
.btn-brand { background: var(--brand); border: 2px solid var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(21,122,60,.25); }
.btn-accent { background: var(--accent); border: 2px solid var(--accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn-outline-brand { border: 2px solid var(--brand); color: var(--brand); background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn-ghost-light { border: 2px solid rgba(255,255,255,.85); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }

/* ---------- En-tête ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; height: var(--header-h);
    background: rgba(255,255,255,.97);
    backdrop-filter: saturate(160%) blur(8px);
    box-shadow: 0 1px 0 var(--line);
    z-index: 1030;
    transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.site-header .navbar { height: 100%; padding: 0; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.brand-name { font-family: var(--font-title); font-weight: 800; font-size: 1.25rem; color: var(--brand); line-height: 1; }
.brand-sub { display: block; font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; margin-top: 3px; }

.site-header .nav-link {
    font-weight: 600; font-size: .95rem; color: var(--ink);
    padding: .5rem .9rem !important; border-radius: 8px;
}
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--brand); background: var(--brand-soft); }

@media (max-width: 991.98px) {
    .site-header .navbar-collapse {
        position: absolute; top: var(--header-h); left: 0; right: 0;
        background: #fff; padding: 12px 16px 20px;
        box-shadow: 0 12px 24px rgba(0,0,0,.08); border-top: 1px solid var(--line);
    }
    .site-header .nav-link { padding: .8rem 1rem !important; }
    .site-header .btn { width: 100%; margin-top: 10px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: min(calc(100vh - var(--header-h)), 760px);
    display: flex; align-items: center; color: #fff; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(10,40,20,.82) 0%, rgba(10,40,20,.55) 50%, rgba(10,40,20,.15) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block; background: var(--sun); color: var(--ink);
    font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
    padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; max-width: 680px; margin-bottom: 18px; }
.hero h1 span { color: var(--sun); }
.hero p { font-size: clamp(1rem, 2.2vw, 1.2rem); max-width: 560px; opacity: .95; margin-bottom: 30px; }
.hero .btn { margin: 0 10px 10px 0; }

@media (max-width: 767.98px) {
    .hero { min-height: 560px; }
    .hero::after { background: rgba(10,40,20,.68); }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
    display: inline-block; color: var(--accent); font-weight: 700; font-size: .8rem;
    letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.section-lead { color: var(--muted); font-size: 1.05rem; }

@media (max-width: 767.98px) { .section { padding: 60px 0; } .section-head { margin-bottom: 32px; } }

/* ---------- Chiffres clés ---------- */
.stats { background: var(--brand); color: #fff; padding: 48px 0; }
.stat-value { font-family: var(--font-title); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--sun); line-height: 1.1; }
.stat-label { font-size: .95rem; opacity: .92; margin-top: 4px; }

/* ---------- Qui sommes-nous ---------- */
.about-img { position: relative; }
.about-img img {
    width: 100%; height: auto;          /* garde les proportions malgré l'attribut height du HTML */
    aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.about-img::before {
    content: ""; position: absolute; width: 50%; height: 45%; left: -18px; bottom: -18px;
    background: var(--brand-soft); border-radius: var(--radius); z-index: -1;
}
.check-list { list-style: none; padding: 0; margin: 22px 0 28px; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 10px; color: var(--ink); }
.check-list li::before {
    content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0;
    color: var(--brand); font-size: 1.2rem;
}

/* ---------- Domaines d'action ---------- */
.action-card {
    background: #fff; border-radius: var(--radius); padding: 32px 26px; height: 100%;
    box-shadow: var(--shadow); border-top: 4px solid var(--c, var(--brand));
    transition: transform .25s ease, box-shadow .25s ease;
}
.action-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.action-icon {
    width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--c, var(--brand)) 12%, #fff);
    color: var(--c, var(--brand)); font-size: 1.6rem; margin-bottom: 18px;
}
.action-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.action-card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- Présidente ---------- */
.quote-mark { font-size: 3.4rem; color: var(--sun); line-height: 1; font-family: Georgia, serif; }
.president-text { font-size: 1.12rem; color: var(--ink); }
.president-sign { margin-top: 20px; padding-left: 16px; border-left: 4px solid var(--accent); }
.president-sign strong { display: block; font-family: var(--font-title); }
.president-sign span { color: var(--muted); font-size: .92rem; }
.video-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.video-frame video { width: 100%; display: block; max-height: 520px; }

/* ---------- Actualités ---------- */
.news-card {
    background: #fff; border-radius: var(--radius); overflow: hidden; height: 100%;
    box-shadow: var(--shadow); display: flex; flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.news-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-soft); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: .82rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.news-title { font-size: 1.1rem; margin-bottom: 10px; }
.news-title a { color: var(--ink); text-decoration: none; }
.news-title a::after { content: ""; position: absolute; inset: 0; } /* carte entièrement cliquable */
.news-card { position: relative; }
.news-title a:hover { color: var(--brand); }
.news-excerpt { color: var(--muted); font-size: .94rem; flex: 1; margin-bottom: 14px; }
.news-more { font-weight: 600; font-size: .92rem; color: var(--brand); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: var(--brand); display: block; margin-bottom: 10px; }

/* ---------- Partenaires ---------- */
.partners-marquee {
    overflow: hidden; padding: 12px 0 18px;
    /* fondu sur les bords gauche et droit */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners-track { display: flex; width: max-content; animation: partners-scroll 50s linear infinite; }
.partners-marquee:hover .partners-track,
.partners-marquee:focus-within .partners-track { animation-play-state: paused; }
.partners-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0 11px; }
@keyframes partners-scroll { to { transform: translateX(-50%); } }

.partner-card {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    width: 210px; height: 100%; padding: 22px 18px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.partner-card:hover, .partner-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, #fff); }
.partner-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 96px; overflow: hidden; }
.partner-logo img { max-width: 100%; max-height: 96px; object-fit: contain; }
.partner-name {
    font-family: var(--font-title); font-weight: 600; font-size: .8rem; line-height: 1.3;
    text-align: center; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); width: 100%;
}
.partner-card:hover .partner-name { color: var(--brand); }

.partners-cta { text-align: center; margin: 36px 0 0; color: var(--muted); }
.partners-cta a { font-weight: 600; text-decoration: none; margin-left: 4px; }
.partners-cta a i { transition: transform .2s; display: inline-block; }
.partners-cta a:hover i { transform: translateX(4px); }

@media (max-width: 767.98px) {
    .partner-card { width: 170px; padding: 18px 14px 14px; }
    .partner-logo { height: 76px; }
    .partner-logo img { max-height: 76px; }
    .partners-track { animation-duration: 40s; }
}

/* Sans animation : grille statique, la copie de la liste est retirée */
@media (prefers-reduced-motion: reduce) {
    .partners-marquee { -webkit-mask-image: none; mask-image: none; }
    .partners-track { animation: none; width: auto; justify-content: center; }
    .partners-list { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
    .partners-list[aria-hidden="true"] { display: none; }
}

/* ---------- Bandeau "Nous soutenir" ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--brand-dark), var(--brand) 60%, #1f9a4f);
    color: #fff; border-radius: 20px; padding: 56px 40px; position: relative; overflow: hidden;
}
.cta-band::after {
    content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -80px;
    border-radius: 50%; background: rgba(244,194,13,.18);
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-band p { opacity: .92; max-width: 560px; margin-bottom: 0; }
.cta-band .btn { position: relative; z-index: 1; }
@media (max-width: 767.98px) { .cta-band { padding: 40px 24px; text-align: center; } .cta-band p { margin: 0 auto 20px; } }

/* ---------- Contact ---------- */
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; height: 100%; }
.contact-info { list-style: none; padding: 0; margin: 0; }
.contact-info li { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-info i {
    flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-size: 1.15rem;
}
.contact-info strong { display: block; font-family: var(--font-title); font-size: .9rem; }
.contact-info a, .contact-info span { color: var(--muted); text-decoration: none; word-break: break-word; }
.contact-info a:hover { color: var(--brand); }
.map-frame { border: 0; width: 100%; height: 220px; border-radius: 12px; margin-top: 8px; }

.form-label { font-weight: 600; font-size: .9rem; }
.form-control { border-radius: 10px; border: 1.5px solid var(--line); padding: .7rem .9rem; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(21,122,60,.15); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pied de page ---------- */
.site-footer { background: #10261a; color: rgba(255,255,255,.75); padding: 64px 0 0; font-size: .95rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; overflow-wrap: anywhere; }
.cta-band .btn { min-width: 220px; border: 2px solid #fff; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,.08); color: #fff; font-size: 1.05rem;
}
.socials a:hover { background: var(--sun); color: var(--ink); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding: 20px 0; font-size: .85rem; }

/* ---------- Page détail / liste ---------- */
.page-header { background: var(--brand-soft); padding: 48px 0 40px; }
.page-header h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: 10px; }
.breadcrumb { font-size: .88rem; margin-bottom: 14px; }
.breadcrumb a { text-decoration: none; }

.article-cover { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); margin-bottom: 28px; }
.article-video { width: 100%; border-radius: var(--radius); margin-bottom: 28px; background: #000; }
.article-content { font-size: 1.05rem; line-height: 1.85; }
.article-content img { max-width: 100%; height: auto; border-radius: 10px; }
.article-content h1, .article-content h2, .article-content h3 { margin-top: 1.6em; }
.article-content .ql-align-center { text-align: center; }
.article-content .ql-align-right { text-align: right; }
.article-content .ql-align-justify { text-align: justify; }

.share-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-links a {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--bg-alt); color: var(--ink); text-decoration: none;
}
.share-links a:hover { background: var(--brand); color: #fff; }

.sidebar-box { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.sidebar-item { display: flex; gap: 12px; text-decoration: none; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
.sidebar-item:last-child { border-bottom: 0; }
.sidebar-item img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sidebar-item span { font-weight: 600; font-size: .92rem; line-height: 1.35; }
.sidebar-item small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }
.sidebar-item:hover span { color: var(--brand); }

/* ---------- Recrutement ---------- */
.job-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 24px; transition: transform .25s ease, box-shadow .25s ease;
}
.job-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.job-ref { font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.job-status { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.job-status.open { background: var(--brand-soft); color: var(--brand-dark); }
.job-status.closed { background: #f1f1f1; color: var(--muted); }
.job-count { font-size: .82rem; font-weight: 600; color: var(--muted); }
.job-meta { list-style: none; padding: 0; margin: 0 0 16px; font-size: .92rem; color: var(--muted); }
.job-meta li { display: flex; gap: 8px; margin-bottom: 6px; overflow-wrap: anywhere; }
.job-meta i { color: var(--brand); }
.job-table thead th { background: var(--brand-soft); color: var(--ink); font-family: var(--font-title); font-size: .88rem; border-bottom: 0; }
.job-table td { font-size: .95rem; }

.pagination { --bs-pagination-color: var(--brand); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-hover-color: var(--brand-dark); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(21,122,60,.2); }

/* ---------- Bouton retour en haut ---------- */
.to-top {
    position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%;
    background: var(--brand); color: #fff; border: 0; display: grid; place-items: center;
    box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 1000;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Apparition au défilement ---------- */
/* .js est ajouté par le layout : sans JavaScript, le contenu reste visible */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { transition: none !important; }
}
