/* =============================================================================
   INGA — Feuille de style principale
   Charte : bordeaux #7A1B0E · rouge-orangé #C1272D · orange #E8590C/#F2701A
            jaune soleil #F7941D→#FFC20E · noir #1A1A1A · fond #FAFAFA
   Approche : mobile-first, CSS vanilla, pas de dépendance externe.
   ========================================================================== */

/* ---------- Variables ---------------------------------------------------- */
:root {
    --bordeaux:      #7A1B0E;
    --bordeaux-dark: #5E1409;
    --rouge:         #C1272D;
    --orange:        #E8590C;
    --orange-light:  #F2701A;
    --soleil:        #F7941D;
    --jaune:         #FFC20E;

    --noir:          #1A1A1A;
    --gris-800:      #333333;
    --gris-600:      #5b5b5b;
    --gris-400:      #9a9a9a;
    --gris-200:      #e4e2df;
    --gris-100:      #f0eeeb;
    --blanc:         #ffffff;
    --fond:          #faf8f5;

    --degrade-marque: linear-gradient(135deg, var(--jaune) 0%, var(--orange) 45%, var(--bordeaux) 100%);
    --degrade-chaud:  linear-gradient(120deg, var(--orange-light) 0%, var(--rouge) 100%);

    --font-titre: "Poppins", "Segoe UI", system-ui, sans-serif;
    --font-corps: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    --rayon:      14px;
    --rayon-sm:   8px;
    --ombre:      0 10px 30px rgba(122, 27, 14, .10);
    --ombre-forte:0 18px 50px rgba(122, 27, 14, .18);

    --contenu-max: 1140px;
    --gap:         clamp(1.5rem, 4vw, 3rem);
    --section-y:   clamp(3rem, 8vw, 6rem);
}

/* ---------- Reset léger ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-corps);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--noir);
    background: var(--fond);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rouge); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
    font-family: var(--font-titre);
    line-height: 1.15;
    color: var(--noir);
    margin: 0 0 .6em;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }
p  { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }

/* ---------- Utilitaires --------------------------------------------- */
.container { width: 100%; max-width: var(--contenu-max); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.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;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    background: var(--bordeaux); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 var(--rayon-sm) 0;
}
.skip-link:focus { left: 0; }
.text-center { text-align: center; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--blanc); }
.section--dark { background: var(--bordeaux); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
/* Les cartes gardent leur fond clair : le texte y reste sombre même en section foncée. */
.section--dark .card { color: var(--noir); }
.section--dark .card h2, .section--dark .card h3 { color: var(--noir); }
.section__intro { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section--center .section__intro { margin-inline: auto; text-align: center; }
.eyebrow {
    display: inline-block; font-family: var(--font-titre); font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
    color: var(--orange); margin-bottom: .8rem;
}
.section--dark .eyebrow { color: var(--jaune); }
.gradient-text {
    background: var(--degrade-chaud);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Boutons ------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-titre); font-weight: 700; font-size: .95rem;
    padding: .9rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--degrade-chaud); color: #fff; box-shadow: 0 8px 20px rgba(193, 39, 45, .3); }
.btn--outline { background: transparent; border-color: currentColor; color: var(--bordeaux); }
.section--dark .btn--outline, .hero .btn--outline { color: #fff; }
.btn--light { background: #fff; color: var(--bordeaux); }
.btn--ghost { background: rgba(255,255,255,.14); color: #fff; }
.btn--sm { padding: .6rem 1.1rem; font-size: .85rem; }
.btn--block { width: 100%; }

/* ---------- En-tête / navigation ---------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--gris-200);
}
.site-header.is-scrolled { box-shadow: var(--ombre); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark { flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
    font-family: var(--font-titre); font-weight: 800; font-size: 1.5rem; letter-spacing: .04em;
    background: var(--degrade-chaud); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__baseline { font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--noir); font-weight: 600; }

.nav-toggle {
    --bar: var(--bordeaux);
    position: relative; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--bar);
    transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle__bar::before { position: absolute; transform: translateY(-8px); }
.nav-toggle__bar::after  { position: absolute; transform: translateY(8px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: rotate(-45deg); }

.primary-nav {
    position: fixed; inset: 64px 0 auto 0;
    background: var(--blanc); border-bottom: 1px solid var(--gris-200);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.primary-nav.is-open { max-height: 80vh; box-shadow: var(--ombre-forte); }
.primary-nav ul { list-style: none; margin: 0; padding: 1rem clamp(1rem, 4vw, 2rem) 1.6rem; display: flex; flex-direction: column; gap: .3rem; }
.primary-nav__link {
    display: block; padding: .8rem .4rem; font-family: var(--font-titre); font-weight: 600;
    color: var(--gris-800); border-radius: var(--rayon-sm);
}
.primary-nav__link:hover, .primary-nav__link.active { color: var(--bordeaux); text-decoration: none; }
.primary-nav__link.active { background: var(--gris-100); }
.primary-nav .btn { margin-top: .6rem; }

/* ---------- Messages flash --------------------------------------- */
.flash-zone { margin-top: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.flash { padding: .9rem 1.1rem; border-radius: var(--rayon-sm); border-left: 5px solid; font-size: .95rem; }
.flash--success { background: #e8f6ec; border-color: #2e7d32; color: #1b4d20; }
.flash--error   { background: #fdecea; border-color: var(--rouge); color: #8a1f16; }
.flash--info    { background: #fff4e6; border-color: var(--orange); color: #8a4b12; }

/* ---------- Hero ------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(120% 120% at 80% 0%, var(--rouge) 0%, var(--bordeaux) 55%, var(--bordeaux-dark) 100%);
}
.hero::after {
    content: ""; position: absolute; right: -12%; top: -18%; width: 55vw; height: 55vw;
    max-width: 620px; max-height: 620px; border-radius: 50%;
    background: var(--degrade-marque); opacity: .25; filter: blur(6px);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(3.5rem, 10vw, 7rem); max-width: 46rem; }
.hero h1 { color: #fff; }
.hero p.hero__lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: rgba(255,255,255,.9); max-width: 40ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3rem); margin-top: 3rem; }
.hero__stat b { display: block; font-family: var(--font-titre); font-size: 1.9rem; color: var(--jaune); }
.hero__stat span { font-size: .85rem; color: rgba(255,255,255,.8); }

/* ---------- Grilles de cartes ---------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
    background: var(--blanc); border: 1px solid var(--gris-200); border-radius: var(--rayon);
    padding: 1.6rem; box-shadow: var(--ombre); height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); }
.card__num {
    font-family: var(--font-titre); font-weight: 800; font-size: 1rem; color: #fff;
    width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--degrade-chaud); margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card--pilier { border-top: 4px solid var(--orange); }

.icon-badge {
    width: 3rem; height: 3rem; border-radius: var(--rayon-sm); margin-bottom: 1rem;
    background: var(--degrade-marque); display: inline-flex;
}

/* ---------- Événements ---------------------------------------- */
.event-card { display: flex; flex-direction: column; gap: .6rem; }
.event-card__date {
    font-family: var(--font-titre); font-weight: 700; font-size: .8rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--orange);
}
.event-card__meta { font-size: .9rem; color: var(--gris-600); }
.event-card__tag {
    align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; padding: .25rem .6rem; border-radius: 999px;
}
.event-card__tag--upcoming { background: #e8f6ec; color: #1b4d20; }
.event-card__tag--past { background: var(--gris-100); color: var(--gris-600); }

/* ---------- Témoignages ------------------------------------- */
.testimonial {
    background: var(--blanc); border-radius: var(--rayon); padding: 1.8rem;
    box-shadow: var(--ombre); border-left: 5px solid var(--orange);
}
.testimonial__quote { font-size: 1.05rem; font-style: italic; margin-bottom: 1rem; }
.testimonial__author { display: flex; align-items: center; gap: .8rem; }
.testimonial__avatar {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    background: var(--degrade-marque); flex: none;
}
.testimonial__name { font-family: var(--font-titre); font-weight: 700; }
.testimonial__role { font-size: .82rem; color: var(--gris-600); }

/* ---------- Bloc newsletter -------------------------------- */
.newsletter-band { background: var(--degrade-chaud); color: #fff; border-radius: var(--rayon); padding: clamp(2rem, 5vw, 3rem); }
.newsletter-band h2 { color: #fff; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: .8rem; }
.newsletter-form input[type="email"] {
    flex: 1 1 220px; padding: .9rem 1.1rem; border-radius: 999px; border: 0; font: inherit; color: var(--noir);
}
.newsletter-form--footer input[type="email"] { border: 1px solid var(--gris-200); }

/* ---------- Formulaires ----------------------------------- */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.form__row { display: grid; gap: 1.1rem; }
.form label { font-family: var(--font-titre); font-weight: 600; font-size: .9rem; display: block; margin-bottom: .35rem; }
.form input, .form select, .form textarea {
    width: 100%; padding: .85rem 1rem; font: inherit; color: var(--noir);
    border: 1px solid var(--gris-200); border-radius: var(--rayon-sm); background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: 3px solid rgba(232, 89, 12, .25); border-color: var(--orange);
}
.form textarea { min-height: 150px; resize: vertical; }
.form .hint { font-size: .82rem; color: var(--gris-600); margin-top: .3rem; }
.field-error { color: var(--rouge); font-size: .85rem; margin-top: .3rem; font-weight: 600; }
.form input.is-invalid, .form textarea.is-invalid { border-color: var(--rouge); }

/* ---------- Ressources ---------------------------------- */
.resource-item { display: flex; flex-direction: column; gap: .5rem; }
.resource-item__cat {
    align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; padding: .25rem .6rem; border-radius: 999px;
    background: var(--gris-100); color: var(--bordeaux);
}
.resource-item__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .8rem; }
.resource-item__count { font-size: .82rem; color: var(--gris-400); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-bar a {
    padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--gris-200);
    font-size: .85rem; font-weight: 600; color: var(--gris-800); background: #fff;
}
.filter-bar a:hover { text-decoration: none; border-color: var(--orange); }
.filter-bar a.is-active { background: var(--bordeaux); color: #fff; border-color: var(--bordeaux); }

/* ---------- Articles ---------------------------------- */
.article-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.article-card__media { aspect-ratio: 16 / 9; background: var(--degrade-marque); }
.article-card__body { padding: 1.4rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; height: 100%; }
.article-card__date { font-size: .8rem; color: var(--gris-600); }
.article-card .btn { margin-top: auto; align-self: flex-start; }

.article-full { max-width: 760px; margin-inline: auto; }
.article-full__hero { aspect-ratio: 21 / 9; background: var(--degrade-marque); border-radius: var(--rayon); margin-bottom: 2rem; }
.article-full__meta { color: var(--gris-600); font-size: .9rem; margin-bottom: 2rem; }
.article-body { font-size: 1.05rem; }
.article-body h2, .article-body h3 { margin-top: 2rem; }
.article-body img { border-radius: var(--rayon); margin-block: 1.5rem; }

/* ---------- Équipe ---------------------------------- */
.team-card { text-align: center; }
.team-card__photo {
    width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 1rem;
    background: var(--degrade-marque); object-fit: cover;
}
.team-card__role { color: var(--orange); font-weight: 600; font-size: .88rem; }

/* ---------- Fil d'Ariane / retour ------------------ */
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; margin-bottom: 1.5rem; }

/* ---------- Modale d'inscription ------------------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(26,26,26,.6); }
.modal__dialog {
    position: relative; background: #fff; max-width: 520px; margin: 8vh auto 0;
    border-radius: var(--rayon); padding: 2rem; box-shadow: var(--ombre-forte);
    max-height: 84vh; overflow-y: auto;
}
.modal__close {
    position: absolute; top: .8rem; right: .8rem; width: 40px; height: 40px; border: 0;
    background: var(--gris-100); border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--noir);
}

/* ---------- Pied de page -------------------------- */
.site-footer { background: var(--noir); color: #d8d4d0; margin-top: var(--section-y); }
.site-footer a { color: #d8d4d0; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4rem); grid-template-columns: 1fr; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.brand--footer .brand__name { -webkit-text-fill-color: transparent; }
.brand--footer .brand__baseline { color: #d8d4d0; }
.site-footer__tagline { margin-top: 1rem; font-size: .9rem; max-width: 30ch; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; font-weight: 600; }
.site-footer__bottom { border-top: 1px solid #333; padding-block: 1.2rem; font-size: .82rem; color: var(--gris-400); }

/* ---------- Bouton haut de page ------------------ */
.to-top {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 90; width: 46px; height: 46px;
    border: 0; border-radius: 50%; background: var(--bordeaux); color: #fff; font-size: 1.2rem;
    cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
    box-shadow: var(--ombre);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Animations au scroll ---------------- */
/* Masqué uniquement si JavaScript est actif (classe .js ajoutée dans <head>).
   Sans JS, le contenu reste visible. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* =============================================================================
   Points de rupture
   ========================================================================== */
@media (min-width: 620px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .form__row--2 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .primary-nav {
        position: static; max-height: none; overflow: visible; background: transparent;
        border: 0; box-shadow: none;
    }
    .primary-nav ul { flex-direction: row; align-items: center; padding: 0; gap: .3rem; }
    .primary-nav__link.active { background: transparent; border-bottom: 3px solid var(--orange); border-radius: 0; }
    .primary-nav .btn { margin: 0 0 0 .8rem; }

    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }

    .split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
    .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
}

@media (min-width: 1024px) {
    .newsletter-band__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
}
