/* =========================================
 * 1. POLICES & VARIABLES
 * ========================================= */

/* --- KARLA --- */
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-300italic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-500italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-600italic.woff2') format('woff2'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-700italic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fontes/karla-v33-latin_latin-ext-800italic.woff2') format('woff2'); font-weight: 800; font-style: italic; font-display: swap; }

/* --- FRAUNCES --- */
@font-face { font-family: 'Fraunces'; src: url('fontes/fraunces-v38-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
    --orange: #f66b06;
    --orange-hover: #e55a05;
    --noir: #1a1a1a;
    --gris-texte: #333333;
    --gris: #4a4a4a;
    --gris-section: #e0e0e0;
    --blanc: #ffffff;
    --max-width: 1100px;
    --padding-horizontal: 2rem;
    --transition: all 0.3s ease;
    --shadow-light: 0 2px 15px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 20px rgba(0,0,0,0.1);

    /* Variables du nouveau footer */
    --gris-moyen: #7a7169;
    --gris-filet: #d0d0d0;
    --font-sans: 'Karla', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* AUGMENTATION LÉGÈRE DES INTERLIGNES */
    --line-height-base: 1.5;   /* Était 1.25 */
    --line-height-lead: 1.35;  /* Était 1.1 */
    --line-height-titre: 1.25; /* Était 1.1 */
}

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

body {
    padding-top: 80px; /* Espace pour le header fixe */
    font-family: 'Karla', sans-serif;
    font-size: 1.2rem;
    color: var(--gris-texte);
    line-height: var(--line-height-base);
    hyphens: auto;
    -webkit-hyphens: auto;
    word-wrap: break-word;
}

/* APPLICATION DE FRAUNCES À TOUS LES TITRES */
h1, h2, h3, h4 {
    font-family: 'Fraunces', serif; /* Ajouté pour garantir Fraunces partout */
    hyphens: none;
    -webkit-hyphens: none;
    line-height: var(--line-height-titre);
    font-weight: 600;
    color: var(--noir);
}

/* ESPACE ENTRE PARAGRAPHES */
p {
    margin-bottom: 0.8rem; /* Ajout de l'espace demandé */
}
/* On retire la marge du dernier paragraphe pour éviter un décalage inutile */
p:last-child {
    margin-bottom: 0;
}

p strong, li strong { font-weight: 600; color: var(--noir); }

/* Liens texte (remplace les boutons) */
a {
    color: var(--noir);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.2);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: var(--transition);
}

a:hover {
    color: var(--orange);
    text-decoration: none;
}

/* Liens "CTA" intégrés au texte */
.link-arrow {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--orange);
}
.link-arrow:hover { gap: 0.8rem; }
.link-arrow::after { content: "→"; font-family: sans-serif; transition: var(--transition); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding-horizontal);
}

/* =========================================
 * 3. HEADER & NAV
 * ========================================= */
header {
    background: var(--blanc);
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--padding-horizontal);
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.logo {
    font-weight: 600;
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    text-decoration: none !important;
    color: var(--noir);
    border: none;
}
.logo:hover { color: var(--noir); }
.logo::after { content: ".be"; color: var(--orange); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    text-decoration: none;
    color: var(--gris);
    font-weight: 300;
    font-size: 1rem;
}
.nav-links a:hover { color: var(--orange); }

/* État actif du menu */
.nav-links a.active {
    color: var(--orange);
    font-weight: 600;
}

.burger {
    background: none; border: none; padding: 0.5rem; cursor: pointer;
    display: none; /* Masqué sur desktop */
}
.burger img { width: 2rem; height: 2rem; }

/* =========================================
 * 4. LAYOUT SYSTEM
 * ========================================= */

/* Structure de base des sections */
.section { padding: 4rem 0; }
.section-hero { padding: 3rem 0 3.5rem; background-color: var(--blanc); }

/* Alternance des bandes de contenu — priorité sur les fonds de composants. */
.section.bg-gray { background-color: var(--gris-section) !important; }
.section.bg-white { background-color: var(--blanc) !important; }

/* AJOUT : Bandeau de retour (Global) */
.return-banner {
    background: #f5f5f5;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

/* Hero Point (Point orange animé) */
.hero-point-container { margin-bottom: 1.5rem; }
.hero-point {
    width: 32px; height: 32px;
    background: var(--orange);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(246, 107, 6, 0.3); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(246, 107, 6, 0); }
}
.hero-point:hover { transform: scale(1.2) rotate(180deg); background: var(--orange-hover); }

/* Typography Hero & Titres */
/* CORRECTION: Utilisation de .section-hero au lieu de .hero qui n'existe pas dans le HTML */
.section-hero h1 {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    margin-bottom: 3rem; /* AUGMENTATION DE L'ESPACE DE RESPIRATION */
}

.section-hero .lead {
    font-size: 1.35rem; color: var(--gris);
    margin-bottom: 1.5rem; line-height: var(--line-height-lead);
}

.section-title {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem; margin-bottom: 2rem;
    position: relative; padding-left: 2rem;
}
.section-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 12px; height: 12px; background: var(--orange); border-radius: 50%;
}

/* Titre avec icône spécifique (Plante) */
.section-title-icon {
    font-family: 'Fraunces', serif; font-size: 1.8rem; margin-bottom: 2rem;
    position: relative; padding-left: 2.5rem;
}
.section-title-icon::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px;
    background-image: url('svg/plant-duotone.svg');
    background-size: contain; background-repeat: no-repeat;
}

/* --- GRILLES UNIFIÉES --- */

.grid-2 {
    display: grid;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
    grid-template-columns: 1.5fr 1fr;
}

/* AJOUT : Classe utilitaire pour forcer 2 colonnes égales sur desktop */
.grid-equal {
    grid-template-columns: repeat(2, 1fr) !important;
    align-items: stretch; /* Permet aux cartes d'avoir la même hauteur */
}

.grid-3 {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    grid-template-columns: repeat(4, 1fr);
}

/* RÉDUCTION DE LA TAILLE DU TEXTE DANS LES GRILLES */
.grid-2 p, .grid-3 p, .grid-4 p, .grid-equal p,
.grid-2 li, .grid-3 li, .grid-4 li, .grid-equal li {
    font-size: 1.1rem; /* Légèrement plus petit que le body (1.2rem) */
}

/* =========================================
 * 5. COMPOSANTS : CARTES
 * ========================================= */

/* Carte de base */
.card {
    background: var(--blanc);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

/* TYPE 1: Carte Service */
.card-service {
    padding: 2rem;
    display: flex; flex-direction: column;
}
/* CORRECTION: Texte ferré à gauche pour les cartes service */
.card-service p {
    text-align: left !important;
}

.card-service .icon { width: 2rem; height: 2rem; margin-bottom: 1rem; }
.card-service h3 {
    font-size: 1.15rem; color: var(--noir); margin-bottom: 0.5rem;
}
.card-service h3 a { text-decoration: none; color: inherit; }
.card-service p { font-size: 1.05rem; flex-grow: 1; margin-bottom: 1.5rem; }
.card-service .card-footer { margin-top: auto; font-size: 0.9rem; }

/* TYPE 2: Carte Référence */
.card-ref {
    padding: 2rem;
    flex: 0 0 calc(33.333% - 1.33rem);
    display: flex; flex-direction: column;
    height: auto;
    min-height: 100%;
}
.card-ref .logo-container { height: 60px; margin-bottom: 1.5rem; display: flex; align-items: center; }
.card-ref .logo-container img { max-height: 100%; max-width: 100%; object-fit: contain; }
.card-ref .meta { font-size: 0.8rem; color: var(--orange); text-transform: uppercase; font-weight: 600; margin-bottom: 0.5rem; }
.card-ref h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; margin-bottom: 0.5rem; }

/* MODIFICATION: Force l'alignement à gauche pour le texte des cartes du carrousel */
.card-ref p { font-size: 0.9rem; color: var(--gris); text-align: left !important; }

/* TYPE 3: Carte Large (Jeux) */
.card-wide {
    padding: 2rem;
    flex: 0 0 calc(50% - 1rem);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
}
.card-wide .icon { width: 3rem; height: 3rem; margin-bottom: 1.5rem; }
.card-wide h3 { font-family: 'Fraunces', serif; font-size: 1.4rem; margin-bottom: 1.5rem; }
.card-wide img.wide-visual {
    width: 100%; height: auto; border-radius: 8px; margin-bottom: 1.5rem;
    object-fit: cover; aspect-ratio: 2/1;
}
.card-wide p {
    font-size: 1.1rem; color: var(--gris);
    flex-grow: 1;
}

/* TYPE 4: Flip Card (Hauteur Automatique) */
.card-flip-container {
    perspective: 1000px;
    cursor: pointer;
    /* Suppression de la hauteur fixe (était 450px) */
    height: auto;

    /* Permet à la carte de s'étirer dans la grille parente .grid-3 */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-flip-inner {
    /* Le conteneur interne devient une grille pour superposer les faces */
    display: grid;
    grid-template-columns: 1fr;

    width: 100%;
    flex-grow: 1; /* Occupe toute la hauteur dispo */

    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flip-container.flipped .card-flip-inner { transform: rotateY(180deg); }

.card-face {
    /* Superposition des deux faces dans la même cellule de grille */
    grid-row: 1;
    grid-column: 1;

    /* Plus de position absolue ! Cela permet au contenu de pousser la hauteur */
    position: relative;
    width: 100%;

    backface-visibility: hidden;
    background: var(--blanc);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 2.5rem;
    display: flex; flex-direction: column;
}

/* RESSERREMENT DE L'INTERLIGNAGE SPÉCIFIQUE FLIPCARD ET AJUSTEMENT TAILLE */
.card-face p {
    text-align: left !important; /* Ajout alignement gauche forcé */
    font-size: 1.15rem; /* RECTO: Augmenté légèrement (était 1.05rem) */
    line-height: 1.25;
}

.card-face.back p {
    font-size: 1.35rem; /* VERSO: Augmenté plus fortement (Était 1.2rem) */
}

.card-face.back {
    transform: rotateY(180deg);
}

/* Contenu Flip Card */
.card-flip-container .icon { width: 3rem; height: 3rem; margin-bottom: 1rem; }
.card-flip-container .subtitle { font-size: 0.9rem; color: var(--gris); font-weight: 500; text-transform: uppercase; margin-bottom: 1rem; }
.card-flip-container h3 { font-family: 'Fraunces', serif; font-size: 1.4rem; margin-bottom: 1rem; }
.card-flip-container .duration {
    font-size: 0.9rem; color: var(--orange); font-weight: 600;
    margin-top: auto; padding: 0.5rem 1rem;
    background: rgba(246, 107, 6, 0.1); border-radius: 20px; align-self: center;
}
.card-flip-container .hint {
    /* Position absolue ok ici car c'est un petit élément en bas */
    position: absolute; bottom: 1rem; left: 0; right: 0;
    text-align: center; font-size: 0.8rem; color: var(--gris); font-style: italic;
}

/* =========================================
 * 6. COMPOSANTS : CARROUSEL & ÉLÉMENTS
 * ========================================= */

.carousel-wrapper {
    position: relative;
    max-width: 1200px; margin: 0 auto; padding: 0 4rem;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.5s ease;
    gap: 2rem;
}

.carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: var(--blanc); border: 2px solid var(--orange); border-radius: 50%;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); z-index: 10;
}
.carousel-nav:hover { background: var(--orange); }
.carousel-nav.prev { left: 0; }
.carousel-nav.next { right: 0; }
.carousel-nav img { width: 24px; height: 24px; }

.carousel-indicators {
    display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem;
}
.carousel-indicators span {
    width: 8px; height: 8px; border-radius: 50%; background: var(--gris);
    cursor: pointer; transition: var(--transition);
}
.carousel-indicators span.active { width: 24px; border-radius: 4px; background: var(--orange); }

/* Éléments divers */
.list-check { list-style: none; }
.list-check li {
    padding: 0.3rem 0 0.3rem 1.5rem; position: relative;
}
.list-check li::before {
    content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: bold;
}

.box-highlight {
    background: var(--gris-section); padding: 2rem; border-radius: 12px;
}
.box-highlight.orange-top { border-top: 4px solid var(--orange); }
.box-highlight.gray-left { border-left: 4px solid var(--gris); padding-left: 3rem; }
.box-highlight h3 { font-family: 'Fraunces', serif; margin-bottom: 1rem; }

/* MODIFICATION : Centrage de l'image portrait et suppression du cadre */
.portrait {
    display: flex;
    justify-content: center; /* Centre le contenu horizontalement */
}

.portrait img {
    width: 100%;
    max-width: 300px;
    /* Suppression des bordures arrondies et de l'ombre */
    border-radius: 0;
    box-shadow: none;
}

/* =========================================
 * 7. FOOTER
 * ========================================= */
.site-footer,
.site-footer * {
    box-sizing: border-box;
}

.site-footer {
    background: var(--blanc);
    color: var(--gris-texte);
    border-top: 1px solid var(--gris-filet);
    font-family: var(--font-sans);
    font-size: 1.2rem;
    line-height: 1.25;
}

.site-footer img,
.site-footer a img,
.footer-logo-box img,
.footer-logo-item:hover img,
.footer-logo-item:focus-within img {
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    outline: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.site-footer p,
.footer-identity p,
.footer-bottom p,
.footer-privacy,
.footer-trust-title,
.footer-logo-caption {
    line-height: 1.25 !important;
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding-horizontal);
}

.footer-trust {
    padding: 2.75rem 0 2.35rem;
    border-bottom: 1px solid var(--gris-filet);
}

.footer-trust-title {
    width: 100%;
    margin: 0 0 1.65rem;
    color: var(--gris-moyen);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-align: center;
    text-align-last: center;
    text-transform: uppercase;
}

.footer-logo-wall {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 0.55rem 1.25rem;
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

.footer-logo-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: var(--logo-cell-w, 132px);
    min-height: 48px;
    text-align: center;
}

.footer-logo-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
    border: 0;
}

.footer-logo-link:hover,
.footer-logo-link:focus {
    color: inherit;
    text-decoration: none;
}

.footer-logo-link:focus-visible {
    outline: 2px solid rgba(26, 26, 26, 0.35);
    outline-offset: 4px;
    border-radius: 4px;
}

.footer-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 34px;
}

.footer-logo-box img {
    display: block;
    width: auto;
    max-width: var(--logo-max-w, 138px);
    max-height: var(--logo-max-h, 34px);
    object-fit: contain;
    filter: none;
    opacity: 1;
    transform: none;
    transition: none;
}

.footer-logo-item:hover img,
.footer-logo-item:focus img,
.footer-logo-item:focus-within img {
    filter: none;
    opacity: 1;
    transform: none;
}

.footer-logo-caption {
    visibility: hidden;
    position: absolute;
    top: 38px;
    left: 50%;
    z-index: 3;
    width: max-content;
    max-width: 190px;
    color: #6a625c;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    transform: translateX(-50%);
}

.footer-logo-item:hover .footer-logo-caption,
.footer-logo-item:focus .footer-logo-caption,
.footer-logo-item:focus-within .footer-logo-caption {
    visibility: visible;
}

.logo-amnesty { --logo-max-w: 142px; --logo-cell-w: 144px; }
.logo-ligue { --logo-max-w: 136px; --logo-cell-w: 138px; }
.logo-smart { --logo-max-w: 122px; --logo-cell-w: 124px; }
.logo-acodev { --logo-max-w: 142px; --logo-cell-w: 144px; }
.logo-autreterre { --logo-max-w: 78px; --logo-cell-w: 88px; }
.logo-lmslf { --logo-max-w: 118px; --logo-cell-w: 122px; }
.logo-ssmg { --logo-max-w: 124px; --logo-cell-w: 126px; }
.logo-cenforgil { --logo-max-w: 132px; --logo-cell-w: 134px; }
.logo-brass { --logo-max-w: 92px; --logo-cell-w: 96px; }
.logo-calvados { --logo-max-w: 104px; --logo-cell-w: 108px; }

.footer-core {
    display: grid;
    grid-template-columns: minmax(220px, auto) 1fr;
    gap: 2rem;
    align-items: end;
    padding: 2rem 0 1.45rem;
}

.footer-identity {
    text-align: left;
}

.footer-wordmark {
    display: inline-block;
    color: var(--noir);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.52rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

.footer-wordmark::after {
    content: '.be';
    color: var(--orange);
}

.footer-identity p {
    margin: 0.5rem 0 0;
    color: #6a625c;
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: left;
    text-align-last: left;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem 1.2rem;
    width: 100%;
    margin-left: auto;
    padding: 0;
    text-align: right;
    text-align-last: right;
}

.site-footer a,
.footer-nav a,
.footer-bottom a {
    color: var(--noir);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
}

.site-footer .footer-wordmark {
    font-size: 1.52rem;
    font-weight: 600;
}

.site-footer a:hover,
.footer-nav a:hover,
.footer-bottom a:hover {
    color: var(--orange);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0 2rem;
    border-top: 1px solid var(--gris-filet);
    color: var(--gris-moyen);
    font-size: 0.82rem;
}

.footer-bottom p {
    margin: 0;
    color: inherit;
    font-size: inherit;
    text-align: left;
    text-align-last: left;
}

.footer-bottom > p:last-child {
    margin-left: auto;
    text-align: right;
    text-align-last: right;
}

.footer-copy {
    max-width: 560px;
}

.footer-privacy {
    margin: 0.35rem 0 0.85rem;
    color: inherit;
    font-size: inherit;
    line-height: inherit !important;
    text-align: left;
    text-align-last: left;
}

.footer-privacy strong {
    color: inherit;
    font-weight: 600;
}

/* =========================================
 * 8. RESPONSIVE
 * ========================================= */

@media (max-width: 1024px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .card-ref { flex: 0 0 calc(50% - 1rem); }
}

@media (min-width: 769px) {
    /* Justification du texte sur les grands écrans */
    /* NOTE: .card-service p a désormais un override pour rester à gauche */
    p, .section-hero .lead {
        text-align: justify;
        text-align-last: left;
    }

    .card-flip-container .hint::before { content: "Cliquez "; }
}

/* =========================================
 * MEDIA QUERY MOBILE (Max 768px)
 * ========================================= */
@media (max-width: 768px) {

    .burger { display: block; }
    .nav-links {
        display: none; flex-direction: column;
        background: var(--blanc); padding: 1rem 2rem;
        position: absolute; top: 100%; right: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1); z-index: 1000; border-radius: 8px;
    }
    .nav-links.open { display: flex; }

    /* --- NOUVEAUX AJUSTEMENTS TYPOGRAPHIE MOBILE --- */
    .section-hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    .section-hero .lead {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    .section-title, .section-title-icon {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.15rem; }
    .card-wide h3, .card-flip-container h3 {
        font-size: 1.2rem;
    }
    /* ------------------------------------------------ */

    /* AJOUT : Marge pour le bandeau retour sur mobile (évite chevauchement header) */
    .return-banner {
        margin-top: 1rem;
    }

    /* CORRECTION : Ajout de .grid-equal pour qu'elle passe aussi en 1 colonne */
    /* !important nécessaire pour surcharger le !important de .grid-equal desktop */
    .grid-2, .grid-3, .grid-4, .grid-equal { grid-template-columns: 1fr !important; gap: 2rem; }

    .grid-2 .portrait { order: -1; }

    /* Suppression de la hauteur fixe sur mobile aussi */
    .card-flip-container { height: auto; }
    .card-flip-container .hint::before { content: "Touchez "; }

    .carousel-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        display: flex;
        gap: 1rem;
        padding-bottom: 2rem;
        margin-left: -2rem;
        margin-right: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .carousel-wrapper::-webkit-scrollbar { display: none; }

    .carousel-track {
        display: flex;
        gap: 1rem;
        width: max-content;
        transform: none !important;
    }

    /* AJOUT : .card-linkedin + !important pour surcharger le style inline JS */
    /* NOTE : Maintenant que le style inline est retiré du HTML, !important est une sécurité supplémentaire */
    .card-ref, .card-wide, .card-linkedin {
        flex: 0 0 80vw !important;
        max-width: 80vw;
        min-width: 0 !important;
        scroll-snap-align: center;
        margin-right: 0;
    }

    .carousel-nav,
    .carousel-indicators {
        display: none;
    }

    /* --- NOUVEAUX AJUSTEMENTS FOOTER MOBILE --- */
    .site-footer {
        font-size: 1.08rem;
    }

    .footer-trust {
        padding: 2.1rem 0 1.8rem;
    }

    .footer-logo-wall {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem 0.9rem;
    }

    .footer-logo-item {
        width: 100%;
        min-height: 50px;
    }

    .footer-logo-box img {
        max-width: min(var(--logo-max-w, 122px), 38vw);
        max-height: 30px;
    }

    .footer-logo-caption {
        top: 36px;
        max-width: 150px;
        font-size: 0.72rem;
    }

    .footer-core {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-top: 1.75rem;
        text-align: center;
    }

    .footer-identity {
        text-align: center;
    }

    .footer-wordmark,
    .site-footer .footer-wordmark {
        font-size: 1.48rem;
    }

    .footer-nav {
        justify-content: center;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        text-align: center;
    }

    .footer-copy {
        max-width: none;
    }

    .footer-bottom p,
    .footer-bottom > p:last-child,
    .footer-privacy {
        margin-left: 0;
        text-align: center;
        text-align-last: center;
    }

    .footer-privacy {
        margin-bottom: 0.9rem;
    }
}

/* =========================================
 * 9. FORMATIONS INDIVIDUELLES — FENÊTRE FLOTTANTE
 * ========================================= */

.formations-float,
.formations-float * {
    box-sizing: border-box;
}

.formations-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1200;
    width: min(420px, calc(100vw - 2.5rem));
    max-height: min(72vh, 720px);
    overflow: hidden;
    background: var(--blanc);
    border: 1px solid var(--gris-filet);
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
    font-family: 'Karla', sans-serif;
    color: var(--gris-texte);
}

.formations-float__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 0;
    border-bottom: 1px solid #ececec;
    background: var(--blanc);
    color: var(--noir);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.formations-float__toggle:hover,
.formations-float__toggle:focus-visible {
    background: #fafafa;
}

.formations-float__toggle:focus-visible {
    outline: 2px solid rgba(246, 107, 6, 0.55);
    outline-offset: -2px;
}

.formations-float__heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.formations-float__dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orange);
}

.formations-float__toggle-icon {
    flex: 0 0 auto;
    color: var(--orange);
    font-family: sans-serif;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
}

.formations-float__panel {
    max-height: calc(min(72vh, 720px) - 52px);
    overflow: hidden;
}

.formations-float__scroll {
    max-height: inherit;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 0.2rem 0 0.55rem;
}

.formations-float__month {
    margin: 0;
    padding: 0.9rem 1rem 0.35rem;
    color: var(--gris-moyen);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-align: left !important;
    text-transform: uppercase;
}

.formations-float__item {
    position: relative;
    display: block;
    margin: 0;
    padding: 0.7rem 2.7rem 0.75rem 1rem;
    border-top: 0;
    color: var(--noir);
    text-decoration: none;
}


.formations-float__item.is-underlined {
    border-bottom: 1px solid #e6e6e6;
}

.formations-float__item:hover,
.formations-float__item:focus-visible {
    background: #fafafa;
    color: var(--noir);
    text-decoration: none;
}

.formations-float__item:focus-visible {
    outline: 2px solid rgba(246, 107, 6, 0.55);
    outline-offset: -2px;
}

.formations-float__meta {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.18rem;
    color: var(--noir);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1.2;
}

.formations-float__date {
    color: var(--orange);
}

.formations-float__city {
    color: var(--noir);
    text-align: left;
}

.formations-float__title {
    display: block;
    color: var(--gris-moyen);
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.25;
}

.formations-float__arrow {
    position: absolute;
    right: 1rem;
    bottom: 0.72rem;
    color: var(--orange);
    font-family: sans-serif;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.formations-float__item:hover .formations-float__arrow,
.formations-float__item:focus-visible .formations-float__arrow {
    transform: translateX(3px);
}

.formations-float.is-reduced {
    width: auto;
    max-width: calc(100vw - 2.5rem);
}

.formations-float.is-reduced .formations-float__toggle {
    border-bottom: 0;
}

.formations-float.is-reduced .formations-float__panel {
    display: none;
}

/* Tailles des trois nouveaux logos dans le pied de page */
.logo-rce { --logo-max-w: 118px; --logo-cell-w: 122px; }
.logo-bonnevie { --logo-max-w: 116px; --logo-cell-w: 120px; }
.logo-reperes { --logo-max-w: 116px; --logo-cell-w: 120px; }
.logo-fij { --logo-max-w: 104px; --logo-cell-w: 108px; }

@media (max-width: 768px) {
    .formations-float {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-height: min(74vh, 620px);
        max-height: min(74dvh, 620px);
        border-radius: 10px;
    }

    .formations-float.is-reduced {
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-width: none;
    }

    .formations-float__panel {
        max-height: calc(min(74vh, 620px) - 50px);
        max-height: calc(min(74dvh, 620px) - 50px);
    }

    .formations-float__toggle {
        padding: 0.82rem 0.9rem;
    }

    .formations-float__heading {
        font-size: 0.94rem;
    }

    .formations-float__month {
        padding-right: 0.9rem;
        padding-left: 0.9rem;
    }

    .formations-float__item {
        padding-right: 2.45rem;
        padding-left: 0.9rem;
    }

    .formations-float__meta {
        gap: 0.6rem;
    }

    .formations-float__title {
        font-size: 0.92rem;
    }
}
