/* Styles des articles (gabarit single.php). Servi en fichier pour être mis en cache par le
 * navigateur ; chargé par parts/single/styles.php à la même place que l'ancien <style> en ligne,
 * pour conserver l'ordre de priorité des règles (voir le commentaire de ce fichier). */

    /* --- CSS CRITIQUE ET DESIGN SYSTEM --- */
    :root {
        --primary: #4F46E5;
        --primary-dark: #4338CA;
        --accent: #C81E3A;
        --bg-body: #F8F9FE;
        --surface: #FFFFFF;
        --text-main: #1E1B4B;
        --text-muted: #64748B;
        --border-light: #E2E8F0;
        --radius-xl: 32px;
        --radius-lg: 24px;
        --radius-md: 16px;
        --font-head: 'Clash Display', sans-serif;
        --font-body: 'Space Grotesk', sans-serif;
        --shadow-pop: 0 12px 30px -10px rgba(79, 70, 229, 0.15);
    }

    html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }

    /* --- BARRE DE PROGRESSION --- */
    #aba-reading-progress {
        position: fixed; top: 0; left: 0; height: 5px;
        background: var(--accent); z-index: 10000; width: 0%; transition: width 0.1s linear;
    }

    /* --- LAYOUT GLOBAL --- */
    .aba-wrapper { font-family: var(--font-body); background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; padding-bottom: 80px; }
    .aba-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; }

    /* --- HEADER ARTICLE --- */
    .aba-post-header { text-align: center; padding: 60px 0 40px; margin: 0 auto; }
    .aba-breadcrumbs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 25px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
    .aba-cat-badge { display: inline-block; background: #EEF2FF; color: var(--primary); padding: 8px 18px; border-radius: 50px; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; margin-bottom: 20px; border: 1px solid rgba(79, 70, 229, 0.1); text-decoration: none; }
    /* Un mot long du titre (ex. "Interprofessionnelle", ou en DE
       "Studierendenwohnungsreservierungen") dépasse la boîte à 40px sur mobile et se
       faisait rogner. Socle universel : overflow-wrap/word-break, qui garantit que rien
       n'est jamais rogné, y compris pour les mots sans point de césure valide
       (URLs, mots concaténés) que hyphens ne saurait pas couper. */
    .aba-post-title { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 30px; color: var(--text-main); overflow-wrap: break-word; word-break: break-word; }

    /* Amélioration typographique, conditionnée au support de hyphenate-limit-chars.
       hyphens:auto donne une césure propre aux syllabes, avec trait d'union (le bon
       dictionnaire est chargé car <html lang> est correct par locale : fr-FR, de-DE...).
       Mais SANS la limite, il couperait aussi tous les titres normaux ("d'In-demnisation",
       "ba-rème"...) : visuellement chargé sur un grand titre centré. On ne l'active donc
       que si le navigateur sait restreindre la césure aux mots >= 16 caractères.
       Firefox (pas de hyphenate-limit-chars) garde le socle overflow-wrap seul : coupure
       sans trait d'union sur les seuls mots trop longs, et titres normaux intacts. */
    @supports (hyphenate-limit-chars: 16 8 6) {
        .aba-post-title {
            -webkit-hyphens: auto;
            hyphens: auto;
            hyphenate-limit-chars: 16 8 6;
        }
    }
    .aba-post-infos { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
    .aba-meta-sep { width: 6px; height: 6px; background: #CBD5E1; border-radius: 50%; }

    /* --- IMAGE UNE --- */
    .aba-featured-wrapper { margin: 40px auto 60px; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-pop); position: relative; aspect-ratio: 21/9; background:#e2e8f0; }
    .aba-featured-img { width: 100%; height: 100%; object-fit: cover; }

    /* --- CONTENU --- */
    .aba-content-layout { position: relative; max-width: 850px; margin: 0 auto; }
    
    @media (min-width: 1200px) { .aba-share-sidebar { position: absolute; left: -100px; top: 0; display: flex; flex-direction: column; align-items: center; gap: 15px; } }
    @media (max-width: 1199px) { .aba-share-sidebar { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; } .aba-share-label { display: none; } }

    .aba-share-btn { width: 48px; height: 48px; border-radius: 50%; background: white; border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; color: var(--text-muted); text-decoration: none; transition: 0.3s; font-size: 1.1rem; }
    .aba-share-btn:hover { color: white; transform: translateY(-3px); }
    .aba-share-btn.fb:hover { background: #1877F2; border-color: #1877F2; }
    .aba-share-btn.x:hover { background: #000; border-color: #000; }
    .aba-share-btn.in:hover { background: #0A66C2; border-color: #0A66C2; }
    .aba-share-label { font-size: 0.7rem; text-transform: uppercase; font-weight: 800; color: var(--text-muted); margin-bottom: 15px; writing-mode: vertical-lr; transform: rotate(180deg); }

    /* ANTI-CASSE CSS : Utilisation de :where() pour ne pas écraser Tailwind dans les simulateurs/infographies */
    .aba-content { font-size: 1.15rem; color: #334155; }

    /* ── H2 avec numérotation automatique ───────────────────────── */
    :where(.aba-content) { counter-reset: h2-counter; }
    :where(.aba-content) h2:not(.aba-faq-title):not(.aba-magnet-text h2) {
        counter-increment: h2-counter;
        font-family: var(--font-head); color: var(--text-main); font-size: 2rem;
        margin-top: 2em; margin-bottom: 0.8em; font-weight: 600;
        text-transform: uppercase; font-style: italic;
        border-bottom: 2px solid var(--border-light); padding-bottom: 15px;
        display: flex; align-items: baseline; gap: 14px;
    }
    :where(.aba-content) h2:not(.aba-faq-title):not(.aba-magnet-text h2)::before {
        content: counter(h2-counter, decimal-leading-zero);
        font-size: 0.75rem; font-weight: 800; font-style: normal;
        text-transform: none; color: var(--primary);
        background: #EEF2FF; padding: 4px 10px;
        border-radius: 6px; flex-shrink: 0; line-height: 1.6;
        letter-spacing: 0.05em;
    }

    /* ── H3 avec tiret accent ────────────────────────────────────── */
    :where(.aba-content) h3 {
        font-family: var(--font-head); font-size: 1.6rem; color: var(--text-main);
        margin-top: 1.5em; margin-bottom: 0.8em; font-weight: 600;
        padding-left: 16px;
        border-left: 3px solid var(--primary);
    }
    /* Sur téléphone, un H2 en capitales à 32 px ne tient pas à côté de sa pastille :
       le texte, élément flex sans retour possible, débordait et se faisait rogner
       par .aba-content (« L'ACCOUCHEMENT » sur un écran de 390 px). */
    @media (max-width: 640px) {
        :where(.aba-content) h2:not(.aba-faq-title):not(.aba-magnet-text h2) {
            font-size: 1.4rem; line-height: 1.25; gap: 10px;
            overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto;
        }
        :where(.aba-content) h3 { font-size: 1.25rem; overflow-wrap: anywhere; }
    }

    /* ── Paragraphes ─────────────────────────────────────────────── */
    :where(.aba-content) p { margin-bottom: 1.5em; line-height: 1.8; }

    /* ── Listes avec checkmarks violets ─────────────────────────── */
    :where(.aba-content) ul:not([class]) {
        list-style: none;
        padding-left: 0;
        margin-bottom: 1.5em;
    }
    :where(.aba-content) ul:not([class]) li {
        position: relative;
        padding-left: 1.8em;
        margin-bottom: 0.5em;
        line-height: 1.7;
    }
    :where(.aba-content) ul:not([class]) li::before {
        content: '✓';
        position: absolute;
        left: 0;
        top: 0.05em;
        width: 1.2em; height: 1.2em;
        background: #EEF2FF;
        color: var(--primary);
        font-size: 0.72rem;
        font-weight: 900;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
    }
    /* Listes ordonnées stylées */
    :where(.aba-content) ol {
        list-style: none;
        padding-left: 0;
        counter-reset: ol-counter;
        margin-bottom: 1.5em;
    }
    :where(.aba-content) ol li {
        counter-increment: ol-counter;
        position: relative;
        padding-left: 2.4em;
        margin-bottom: 0.7em;
        line-height: 1.7;
    }
    :where(.aba-content) ol li::before {
        content: counter(ol-counter);
        position: absolute;
        left: 0;
        top: 0.05em;
        width: 1.5em; height: 1.5em;
        background: var(--primary);
        color: white;
        font-size: 0.8rem;
        font-weight: 800;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
    }

    /* ── Blockquotes / Citations ─────────────────────────────────── */
    :where(.aba-content) blockquote {
        position: relative;
        margin: 2.5em 0;
        padding: 28px 32px 28px 40px;
        background: linear-gradient(135deg, #F8F7FF 0%, #EEF2FF 100%);
        border-left: 4px solid var(--primary);
        border-radius: 0 16px 16px 0;
        overflow: hidden;
    }
    :where(.aba-content) blockquote::before {
        content: '\201C';
        position: absolute;
        top: -10px; left: 14px;
        font-size: 6rem; line-height: 1;
        color: #C7D2FE;
        font-family: Georgia, 'Times New Roman', serif;
        pointer-events: none;
    }
    :where(.aba-content) blockquote p {
        font-style: italic;
        font-size: 1.15rem !important;
        color: #4338CA !important;
        margin: 0 !important;
        line-height: 1.7 !important;
        position: relative;
        z-index: 1;
    }
    :where(.aba-content) blockquote cite {
        display: block;
        margin-top: 12px;
        font-size: 0.85rem;
        font-style: normal;
        font-weight: 700;
        color: var(--text-muted);
    }

    /* ── Tableaux ────────────────────────────────────────────────── */
    :where(.aba-content) table {
        width: 100%;
        border-collapse: collapse;
        margin: 2em 0;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(79, 70, 229, 0.07);
        font-size: 0.98rem;
    }
    :where(.aba-content) thead th {
        background: var(--text-main);
        color: white;
        padding: 14px 18px;
        text-align: left;
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    :where(.aba-content) tbody td {
        padding: 13px 18px;
        border-bottom: 1px solid #F1F5F9;
        color: #334155;
        vertical-align: top;
    }
    :where(.aba-content) tbody tr:nth-child(even) td { background: #F8F9FE; }
    :where(.aba-content) tbody tr:hover td { background: #EEF2FF; transition: background 0.15s; }
    /* Responsive table */
    @media (max-width: 640px) {
        :where(.aba-content) table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    }

    /* ── Code inline & blocs ─────────────────────────────────────── */
    :where(.aba-content) code:not(pre code) {
        background: #EEF2FF;
        color: #4338CA;
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 0.9em;
        font-family: 'Courier New', monospace;
        font-weight: 600;
    }
    :where(.aba-content) pre {
        background: #1E1B4B;
        color: #E2E8F0;
        padding: 24px;
        border-radius: 14px;
        overflow-x: auto;
        font-size: 0.9rem;
        line-height: 1.7;
        margin: 2em 0;
    }

    /* ── Mark / Surligné ─────────────────────────────────────────── */
    :where(.aba-content) mark {
        background: linear-gradient(120deg, #FEF9C3 0%, #FDE68A 100%);
        color: #92400E;
        padding: 1px 4px;
        border-radius: 4px;
    }

    /* ── Séparateur HR élégant ───────────────────────────────────── */
    :where(.aba-content) hr {
        border: none;
        height: 2px;
        background: linear-gradient(90deg, var(--primary), transparent);
        margin: 3em 0;
        border-radius: 2px;
    }

    /* ── Légendes d'images ───────────────────────────────────────── */
    :where(.aba-content) figcaption,
    :where(.aba-content) .wp-element-caption {
        text-align: center;
        font-size: 0.85rem;
        color: var(--text-muted);
        font-style: italic;
        margin-top: 10px;
        padding: 8px 16px;
        background: #F8F9FE;
        border-radius: 0 0 10px 10px;
    }

    /* ── Gras et italique ────────────────────────────────────────── */
    :where(.aba-content) strong, :where(.aba-content) b { font-weight: 700; color: #1E1B4B; }
    :where(.aba-content) em, :where(.aba-content) i { color: #475569; }

    /* ── Liens ───────────────────────────────────────────────────── */
    :where(.aba-content) a:not(.aba-btn):not(.aba-rel-card):not(.aba-nav-btn) { color: var(--primary); font-weight: 700; text-decoration: none; border-bottom: 2px solid rgba(79, 70, 229, 0.2); transition: border-color 0.2s; }
    :where(.aba-content) a:not(.aba-btn):not(.aba-rel-card):not(.aba-nav-btn):hover { border-bottom-color: var(--primary); }
    
    /* --- NAVIGATION ARTICLE PRÉCÉDENT / SUIVANT --- */
    .aba-post-navigation { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding-top: 40px; border-top: 2px solid var(--border-light); }
    .aba-nav-btn { display: flex; flex-direction: column; padding: 20px; background: white; border-radius: var(--radius-md); border: 1px solid var(--border-light); text-decoration: none !important; width: 48%; transition: 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
    .aba-nav-btn:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-pop); }
    .aba-nav-btn.next { text-align: right; align-items: flex-end; }
    .aba-nav-btn.prev { text-align: left; align-items: flex-start; }
    .nav-dir { font-size: 0.85rem; color: var(--primary); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
    .nav-title { font-family: var(--font-head); color: var(--text-main); font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
    @media (max-width: 768px) { .aba-post-navigation { flex-direction: column; } .aba-nav-btn { width: 100%; align-items: flex-start; text-align: left; } .aba-nav-btn.next { align-items: flex-start; text-align: left; } .aba-nav-btn.next .nav-dir { flex-direction: row-reverse; } }

    /* --- FIX RESPONSIVE VIDÉOS YOUTUBE ---
       wp-block-library CSS est désactivé (perf) → wp-block-embed__wrapper
       perd son position:relative. WP Rocket lazy YouTube (rll-youtube-player)
       devient alors position:absolute relatif à .aba-content-layout et couvre
       tout l'article. On rétablit ici ce que wp-block-library fournissait.
    ------------------------------------------------------------------ */

    /* 1. Wrapper Gutenberg : position:relative indispensable comme containing block */
    .aba-content .wp-block-embed__wrapper {
        position: relative !important;
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;   /* remplace le padding-bottom trick */
        overflow: hidden;
        border-radius: var(--radius-md);
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        margin: 20px 0;
        background: #000;
    }

    /* 2. WP Rocket lazy thumbnail (div.rll-youtube-player) :
       dans le contexte responsive-embeds, WP Rocket le passe en position:absolute.
       Il doit rester confiné dans son wrapper (désormais aspect-ratio). */
    .aba-content .rll-youtube-player {
        overflow: hidden;
    }

    /* 3. Iframe chargée après clic sur le thumbnail (remplace rll-youtube-player) */
    .aba-content .wp-block-embed__wrapper iframe {
        position: absolute !important;
        top: 0; left: 0;
        width: 100% !important;
        height: 100% !important;
        border: none;
    }

    /* 4. Iframes hors embed YouTube (shortcodes, autres services) */
    .aba-content iframe:not(.wp-block-embed__wrapper iframe) {
        display: block;
        max-width: 100%;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: var(--radius-md);
        margin: 20px 0;
    }

    /* ==========================================================================
       NOUVEAUX BLOCS INJECTÉS (Articles Relatifs & E-book)
       ========================================================================== */
    .aba-incontent-related { background: white; padding: 25px; border-radius: var(--radius-md); border: 1px solid var(--border-light); margin: 40px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
    .aba-incontent-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin-bottom: 20px; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
    .aba-incontent-title i { color: var(--primary); }
    .aba-incontent-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
    @media (min-width: 768px) { .aba-incontent-grid { grid-template-columns: 1fr 1fr; } }
    .aba-rel-card { display: flex; align-items: center; gap: 15px; text-decoration: none !important; border: none !important; padding: 10px; border-radius: 12px; transition: 0.3s; background: var(--bg-body); }
    /* « Pour aller plus loin » : cartes verticales sur une grille régulière, sans effet
       de survol (demande du 03/09/2026). Spécificité renforcée : les articles du gabarit
       otc embarquent leur propre feuille et déformaient la disposition. */
    .aba-content .aba-incontent-related { display: block !important; padding: 22px 22px 24px; }
    .aba-content .aba-incontent-title { display: flex !important; width: 100%; margin: 0 0 16px; font-size: 1.15rem; }
    .aba-content .aba-incontent-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
    .aba-content .aba-rel-card { display: flex !important; flex-direction: column; align-items: stretch; gap: 0; padding: 0; margin: 0; border: 1px solid var(--border-light) !important; border-radius: 12px; overflow: hidden; background: #fff; transform: none !important; }
    .aba-content .aba-rel-thumb { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border-radius: 0; background: #EEF2FF; }
    .aba-content .aba-rel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .aba-content .aba-rel-thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--primary); font-size: 1.6rem; }
    .aba-content .aba-rel-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
    .aba-content .aba-rel-title { margin: 0; font-size: 0.95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .aba-content .aba-rel-meta { margin-top: auto; font-size: 0.75rem; }
    .aba-rel-thumb { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
    .aba-rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .aba-rel-text h4, .aba-rel-text .aba-rel-title { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; margin: 0 0 5px 0; line-height: 1.3; color: var(--text-main); }
    .aba-rel-text span { font-size: 0.8rem; color: var(--primary); font-weight: 700; text-transform: uppercase; }

    /* E-book CTA IN-CONTENT */
    .aba-incontent-ebook { margin: 50px 0; border-radius: var(--radius-lg); padding: 4px; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: var(--shadow-pop); transition: 0.3s; position: relative; z-index: 0; }
    .aba-incontent-ebook:hover { transform: scale(1.01); }
    .aba-ebook-inner { background: var(--text-main); border-radius: 20px; padding: 40px 30px; text-align: center; color: white; overflow: hidden; }
    .aba-ebook-layout { display: flex; align-items: center; gap: 30px; text-align: left; }
    .aba-ebook-img-wrap { flex-shrink: 0; display: block; }
    .aba-ebook-img { border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); display: block; width: 130px; height: auto; max-height: 220px; object-fit: contain; }
    .aba-ebook-text { flex: 1; min-width: 0; }
    .aba-ebook-badge { display: inline-block; background: rgba(255,255,255,0.1); padding: 6px 15px; border-radius: 20px; font-weight: 700; font-size: 0.85rem; margin-bottom: 15px; color: #FBBF24; }
    .aba-ebook-inner h3 { font-family: var(--font-head); font-size: 1.8rem; margin: 0 0 15px 0; color: white; }
    .aba-ebook-inner p { font-size: 1.05rem; color: #CBD5E1; margin-bottom: 25px; line-height: 1.5; }
    .aba-ebook-inner strong, .aba-ebook-inner b { color: white; }
    @media (max-width: 600px) { .aba-ebook-layout { flex-direction: column; text-align: center; } .aba-ebook-img { width: 100px; } }

    /* ==========================================================================
       LEAD MAGNET (QUIZ)
       ========================================================================== */
    .aba-magnet-section { margin-top: 60px; margin-bottom: 80px; }
    .aba-magnet-card-modern { background: white; border-radius: var(--radius-xl); overflow: hidden; display: grid; grid-template-columns: 1fr; border: 1px solid var(--border-light); box-shadow: var(--shadow-pop); }
    @media (min-width: 992px) { .aba-magnet-card-modern { grid-template-columns: 1.2fr 1fr; } }
    .aba-magnet-text { padding: 40px 30px; background: var(--text-main); color: white; position: relative; }
    .aba-magnet-text::after { content:''; position:absolute; top:0; right:0; width:100%; height:100%; background: radial-gradient(circle at top right, rgba(79,70,229,0.3), transparent 60%); pointer-events:none; }
    .aba-magnet-tag { display: inline-block; background: var(--accent); color: white; padding: 5px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; margin-bottom: 15px; text-transform: uppercase; }
    .aba-magnet-text h2 { font-family: var(--font-head); font-size: 2rem; color: white; margin-top:0; margin-bottom: 15px; line-height: 1.1; }
    .aba-magnet-text p { color: #CBD5E1; font-size: 1.05rem; margin-bottom: 30px; }
    .aba-magnet-proof { display: flex; align-items: center; gap: 15px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
    .aba-proof-avatars { display: flex; }
    .aba-avatar-mini { width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--text-main); margin-left: -10px; background-size: cover; }
    .aba-avatar-mini:first-child { margin-left: 0; }
    .aba-magnet-proof span { font-size: 0.9rem; color: #CBD5E1; }
    .aba-magnet-proof strong { color: white; }
    .aba-magnet-form-wrapper { padding: 40px 30px; background: white; display: flex; flex-direction: column; justify-content: center; }
    .aba-magnet-form-wrapper h3 { font-family: var(--font-head); font-size: 1.4rem; margin-top:0; margin-bottom: 25px; color: var(--text-main); }
    /* Fix champs Forminator invisibles : ce wrapper est sur fond BLANC ici (bloc moderne),
       alors que le CSS du footer le style pour fond sombre (bordure + labels blancs). On surcharge
       avec une spécificité supérieure pour rendre champs et labels visibles sur fond clair. */
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-input,
    .aba-magnet-card-modern .aba-magnet-form-wrapper input[type="text"],
    .aba-magnet-card-modern .aba-magnet-form-wrapper input[type="email"] {
        background: #fff !important;
        border: 1.5px solid #d1d5db !important;
        color: #1e1b4b !important;
    }
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-input:focus,
    .aba-magnet-card-modern .aba-magnet-form-wrapper input[type="text"]:focus,
    .aba-magnet-card-modern .aba-magnet-form-wrapper input[type="email"]:focus {
        border-color: #4F46E5 !important;
        box-shadow: 0 0 0 3px rgba(79,70,229,0.18) !important;
    }
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-input::placeholder { color: #9ca3af !important; }
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-label,
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-label label,
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-checkbox-label,
    .aba-magnet-card-modern .aba-magnet-form-wrapper .forminator-description { color: #374151 !important; }
    .aba-input-group { position: relative; margin-bottom: 15px; }
    .aba-input-group i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.1rem; }
    .aba-input-group input { width: 100%; padding: 16px 20px 16px 50px; border-radius: 12px; border: 2px solid var(--border-light); background: var(--bg-body); font-family: var(--font-body); font-size: 1rem; color: var(--text-main); transition: 0.3s; outline: none; }
    .aba-input-group input:focus { border-color: var(--primary); background: white; }

    /* --- UTILS --- */
    .aba-btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: 100px; font-weight: 700; cursor: pointer; transition: 0.3s; border: none; text-decoration: none; gap: 8px; }
    .aba-btn-primary { background: var(--primary); color: white !important; }
    .aba-btn-accent { background: var(--accent); color: white !important; box-shadow: 0 4px 15px rgba(200, 30, 58, 0.4); }
    .aba-btn-outline { background: transparent; border: 2px solid var(--border-light); color: var(--text-main) !important; }
    .aba-btn-outline:hover { background: var(--surface); border-color: var(--text-main); }
    .aba-btn-white { background: white; color: var(--text-main) !important; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .aba-btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
    
    .mobile-hidden { display: none; }
    .desktop-hidden { display: block; }
    @media (min-width: 768px) { .mobile-hidden { display: inline-flex; } .desktop-hidden { display: none; } }

    /* MEILLEURS COURS (Grille) */
    .aba-related-section { margin-top: 40px; }
    .aba-related-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
    .aba-related-title { font-family: var(--font-head); font-size: 2rem; font-weight: 700; margin: 0; }
    /* 4 cartes : 4 colonnes sur grand écran, 2 en tablette, 1 en mobile — plus de carte orpheline. */
    .aba-courses-grid-featured { display: grid; grid-template-columns: 1fr; gap: 20px; }
    @media (min-width: 640px) { .aba-courses-grid-featured { grid-template-columns: 1fr 1fr; } }
    @media (min-width: 1100px) { .aba-courses-grid-featured { grid-template-columns: repeat(4, 1fr); } }
    .aba-feat-card { background: white; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-light); text-decoration: none; display: block; transition: 0.3s; }
    .aba-feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-pop); border-color: transparent; }
    .aba-feat-img { height: 170px; background-size: cover; background-position: center top; background-color: #EEF2FF; }
    .aba-feat-content { padding: 20px; }
    .aba-tag { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--primary); background: #EEF2FF; padding: 4px 10px; border-radius: 6px; display: inline-block; margin-bottom: 10px; }
    .aba-feat-content h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--text-main); margin: 0; line-height: 1.3; font-weight: 600; }

    /* ==========================================================================
       ENCARTS EBOOK SWOT / PESTEL
       ========================================================================== */

    /* Bandeau compact — top d'article */
    .aba-swot-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #EEF2FF; border: 1.5px solid #C7D2FE; border-radius: var(--radius-md); padding: 18px 24px; margin: 0 0 36px; flex-wrap: wrap; }
    .aba-swot-banner-left { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
    .aba-swot-banner-tag { font-size: 0.75rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
    .aba-swot-banner-left p { margin: 0; font-size: 0.95rem; color: #1E293B; line-height: 1.5; }
    .aba-swot-banner-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: white !important; padding: 11px 22px; border-radius: 100px; font-weight: 700; font-size: 0.9rem; text-decoration: none; white-space: nowrap; transition: 0.2s; border: none !important; flex-shrink: 0; }
    .aba-swot-banner-btn:hover { background: #4338CA; transform: translateY(-2px); }

    /* Encart complet — bas d'article */
    .aba-swot-cta { display: flex; gap: 30px; align-items: flex-start; background: white; border-radius: var(--radius-xl); padding: 36px; border: 1px solid var(--border-light); box-shadow: 0 8px 30px rgba(79,70,229,0.08); margin: 50px 0 20px; position: relative; overflow: hidden; }
    .aba-swot-cta::after { content: ''; position: absolute; top: 0; right: 0; width: 200px; height: 200px; background: radial-gradient(circle, rgba(79,70,229,0.06), transparent 70%); pointer-events: none; }
    .aba-swot-cta-img { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.8rem; flex-shrink: 0; }
    .aba-swot-cta-tag { font-size: 0.75rem; font-weight: 800; color: #059669; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 8px; }
    .aba-swot-cta-content h3 { font-family: var(--font-head); font-size: 1.5rem; color: var(--text-main); margin: 0 0 10px; }
    .aba-swot-cta-content p { font-size: 0.95rem; color: #475569; margin: 0 0 16px; line-height: 1.6; }
    .aba-swot-cta-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
    .aba-swot-cta-list li { font-size: 0.88rem; font-weight: 600; color: #1E293B; display: flex; align-items: center; gap: 7px; }
    .aba-swot-cta-list i { color: #059669; font-size: 0.85rem; }
    @media (max-width: 640px) { .aba-swot-cta { flex-direction: column; gap: 20px; padding: 24px; } .aba-swot-banner { flex-direction: column; align-items: flex-start; } }

    /* --- ENCART IN-CONTENT ALTERNANCE / STAGE --- */
    .aba-alternance-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #FFFBEB; border: 1.5px solid #FDE68A; border-left: 4px solid #D97706; border-radius: var(--radius-md); padding: 18px 24px; margin: 0 0 36px; flex-wrap: wrap; }
    .aba-alternance-banner-left { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
    .aba-alternance-banner-tag { font-size: 0.75rem; font-weight: 800; color: #D97706; text-transform: uppercase; letter-spacing: 0.05em; }
    .aba-alternance-banner-left p { margin: 0; font-size: 0.95rem; color: #1E293B; line-height: 1.5; }
    .aba-alternance-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
    .aba-alternance-btn-primary { display: inline-flex; align-items: center; gap: 8px; background: #D97706; color: white !important; padding: 10px 20px; border-radius: 100px; font-weight: 700; font-size: 0.88rem; text-decoration: none !important; white-space: nowrap; transition: 0.2s; border: none !important; }
    .aba-alternance-btn-primary:hover { background: #B45309; transform: translateY(-2px); }
    .aba-alternance-btn-secondary { display: inline-flex; align-items: center; gap: 8px; background: white; color: #D97706 !important; padding: 10px 20px; border-radius: 100px; font-weight: 700; font-size: 0.88rem; text-decoration: none !important; white-space: nowrap; transition: 0.2s; border: 1.5px solid #FDE68A !important; }
    .aba-alternance-btn-secondary:hover { background: #FEF3C7; transform: translateY(-2px); }
    @media (max-width: 640px) { .aba-alternance-banner { flex-direction: column; align-items: flex-start; } .aba-alternance-banner-actions { width: 100%; } .aba-alternance-btn-primary, .aba-alternance-btn-secondary { flex: 1; justify-content: center; } }

    /* --- MAILLAGE INTERNE STRATÉGIQUE --- */
    .aba-maillage-box { border-radius: var(--radius-lg); border: 1px solid var(--border-light); overflow: hidden; margin: 20px 0 50px; }
    .aba-maillage-header { display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
    .aba-maillage-bts .aba-maillage-header { background: #EEF2FF; color: var(--primary); }
    .aba-maillage-assurance .aba-maillage-header { background: #F0FDF4; color: #059669; }
    .aba-maillage-alternance .aba-maillage-header { background: #FEF3C7; color: #D97706; }
    .aba-maillage-metier .aba-maillage-header { background: #F0F9FF; color: #0369A1; }
    .aba-maillage-recruteur .aba-maillage-header { background: #FAF5FF; color: #7C3AED; }
    .aba-maillage-links { display: grid; grid-template-columns: 1fr 1fr; }
    @media (max-width: 640px) { .aba-maillage-links { grid-template-columns: 1fr; } }
    .aba-maillage-item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-decoration: none !important; border: none !important; border-top: 1px solid var(--border-light); transition: background 0.2s; color: var(--text-main) !important; }
    .aba-maillage-item:nth-child(odd) { border-right: 1px solid var(--border-light); }
    .aba-maillage-item:hover { background: #F8FAFF; }
    .aba-maillage-item > i:first-child { font-size: 1.2rem; flex-shrink: 0; width: 22px; text-align: center; }
    .aba-maillage-bts .aba-maillage-item > i:first-child { color: var(--primary); }
    .aba-maillage-assurance .aba-maillage-item > i:first-child { color: #059669; }
    .aba-maillage-alternance .aba-maillage-item > i:first-child { color: #D97706; }
    .aba-maillage-metier .aba-maillage-item > i:first-child { color: #0369A1; }
    .aba-maillage-recruteur .aba-maillage-item > i:first-child { color: #7C3AED; }
    .aba-maillage-item div { flex: 1; }
    .aba-maillage-item strong { display: block; font-size: 0.9rem; color: var(--text-main); line-height: 1.3; }
    .aba-maillage-item span { font-size: 0.78rem; color: var(--text-muted); }
    .aba-maillage-arrow { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }

    /* --- BADGE MIS À JOUR --- */
    .aba-meta-updated { color: #059669; font-weight: 700; }
    .aba-meta-updated i { color: #059669; }

    /* --- AUTHOR BOX --- */
    .aba-author-box { display: flex; gap: 28px; align-items: flex-start; background: white; border-radius: var(--radius-xl); padding: 32px; border: 1px solid var(--border-light); box-shadow: 0 4px 20px rgba(0,0,0,0.04); position: relative; overflow: hidden; margin: 50px 0 10px; }
    .aba-author-box::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(180deg, var(--primary), var(--accent)); }
    .aba-author-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid #EEF2FF; }
    .aba-author-label { font-size: 0.72rem; text-transform: uppercase; font-weight: 800; color: var(--primary); letter-spacing: 0.06em; display: block; margin-bottom: 4px; }
    .aba-author-name { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--text-main); margin: 0 0 10px 0; }
    .aba-author-name a { color: inherit; text-decoration: none; border: none !important; }
    .aba-author-credentials { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
    .aba-author-credentials span { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
    .aba-author-credentials i { color: var(--primary); }
    .aba-author-bio { font-size: 0.95rem; color: #475569; line-height: 1.7; margin: 0 0 14px 0; }
    .aba-author-link { font-size: 0.88rem; font-weight: 700; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s; border: none !important; }
    .aba-author-link:hover { gap: 10px; }
    @media (max-width: 640px) { .aba-author-box { flex-direction: column; gap: 18px; padding: 24px 20px; } .aba-author-avatar { width: 70px; height: 70px; } .aba-author-credentials { gap: 8px; } }

    /* --- SEO BOX --- */
    .aba-social-section { margin-top: 80px; background: white; padding: 60px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
    .aba-seo-box { background: white; padding: 40px; border-radius: var(--radius-xl); margin-top: 80px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid var(--border-light); }
    .aba-seo-content { max-height: 120px; overflow: hidden; position: relative; transition: 0.5s; }
    .aba-seo-content.open { max-height: 3000px; }
    .aba-seo-fade { position: absolute; bottom: 0; left: 0; width: 100%; height: 80px; background: linear-gradient(transparent, white); }
    .aba-seo-content.open .aba-seo-fade { display: none; }
    
    
    /* --- CORRECTION DÉBORDEMENT IMAGES (ARTICLES & MOBILE) --- */

/* 1. On empêche le site de créer un défilement horizontal (le fameux scroll de la mort) */
html, body {
    overflow-x: hidden;
}

/* 2. On s'assure que les images ET leurs conteneurs respectent les limites */
img, 
figure.wp-block-image, 
.wp-block-image img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important; /* Prend en compte les marges internes */
    margin-left: 0 !important;
    margin-right: 0 !important;
}
