/* ==========================================================================
   FIPECO Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables CSS
   -------------------------------------------------------------------------- */
:root {
    /* Couleurs principales */
    --primary: #1e3a8a;        /* Bleu Nuit */
    --primary-dark: #172554;   /* Bleu Nuit foncé (hover) */
    --accent: #dc2626;         /* Rouge brique (CTA) */
    --accent-dark: #b91c1c;    /* Rouge foncé (hover) */

    /* Neutres */
    --bg-light: #f3f4f6;       /* Gris très clair */
    --bg-dark: #0f172a;        /* Fond footer */
    --text-dark: #111827;      /* Quasi noir */
    --text-light: #4b5563;     /* Gris texte */
    --text-muted: #94a3b8;     /* Gris clair (footer) */
    --white: #ffffff;
    --border: #e5e7eb;         /* Bordures légères */

    /* Bleus complémentaires (graphiques) */
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;

    /* Typographies */
    --font-head: 'Merriweather', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Espacements */
    --section-padding: 5rem;
    --container-max: 1200px;

    /* Transitions */
    --transition: 0.3s ease;

    /* Ombres */
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Top Bar (Annonce)
   -------------------------------------------------------------------------- */
.top-bar {
    background: var(--text-dark);
    color: var(--white);
    font-size: 0.85rem;
    padding: 0.5rem 0;
    text-align: center;
}

.top-bar a {
    text-decoration: underline;
    margin-left: 10px;
    color: var(--blue-300);
}

.top-bar a:hover {
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar-fipeco {
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: var(--transition);
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-light);
}

/* Boutons navbar */
.btn-subscribe {
    background: var(--primary);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn-subscribe:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-donate {
    background: var(--accent);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    margin-left: 0.5rem;
}

.btn-donate:hover {
    background: var(--accent-dark);
    color: var(--white);
}

/* Lien visible uniquement dans le menu mobile */
.nav-mobile-only {
    display: none;
}

/* Bouton don visible uniquement en mobile sur la page d'accueil */
.donate-mobile-home {
    display: none;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-dark);
}

/* Barre de recherche navbar */
.nav-search {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.nav-search input {
    border: 1px solid var(--border);
    border-radius: 4px 0 0 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: 200px;
}

.nav-search input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--blue-100);
}

.nav-search button {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    align-self: stretch;
}

.nav-search button:hover {
    background: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.hero-container {
    display: flex;
    align-items: stretch;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    font-family: var(--font-head);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Visual (Stats panel) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 2.5rem;
}

.hero-stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hero-stat-number {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: var(--white);
}

.btn-secondary {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-text {
    font-weight: 600;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
}

.btn-text:hover {
    color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    padding: var(--section-padding) 0;
}

.section-grey {
    background: var(--bg-light);
    padding: var(--section-padding) 0;
}

.section-header {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease;
}

.section-header h1 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    overflow-wrap: break-word;
}

.section-header h2 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    overflow-wrap: break-word;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 0.5rem;
}

.section-header.centered {
    text-align: center;
}

.section-header.centered .line {
    margin: 0.5rem auto 0;
}

/* --------------------------------------------------------------------------
   Featured Card (A la une)
   -------------------------------------------------------------------------- */
.section-featured {
    padding: var(--section-padding) 0;
}

/* Layout magazine : 1 grande + 2 petites */
.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.featured-main {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.featured-main h3 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    line-height: 1.3;
}

.featured-excerpt {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.featured-secondary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: center;
}

.featured-side {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.featured-side:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.featured-side h4 {
    font-family: var(--font-head);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.featured-side h4 a {
    color: var(--primary);
}

.featured-side h4 a:hover {
    color: var(--accent);
}

.meta {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.read-more {
    font-weight: 700;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    font-size: 0.9rem;
}

.read-more:hover {
    color: var(--accent-dark);
    border-color: var(--accent-dark);
}


/* --------------------------------------------------------------------------
   Grille Thematiques (Topic Cards)
   -------------------------------------------------------------------------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.topic-card {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.topic-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.topic-number {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
    flex-shrink: 0;
    min-width: 2.5rem;
    opacity: 0.85;
}

.topic-body {
    flex: 1;
}

.topic-card h3 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.topic-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Content Cards (Fiches, News, Notes)
   -------------------------------------------------------------------------- */
.content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.content-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--blue-200);
}

.content-card .card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.content-card h3 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.content-card h3 a {
    color: inherit;
}

.content-card h3 a:hover {
    color: var(--accent);
}

.content-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.content-card .card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Badge catégorie */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: var(--blue-100);
    color: var(--primary);
}

.badge-accent {
    background: #fecaca;
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Article Content (Fiche detail)
   -------------------------------------------------------------------------- */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.article {
    max-width: 800px;
    margin: 0 auto;
}

.article p {
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.8;
}

.article h2 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blue-200);
}

.article h3 {
    font-size: 1.25rem;
    color: var(--blue-500);
    margin: 2rem 0 1rem;
}

.article h4 {
    font-size: 1.1rem;
    color: var(--accent);
    margin: 1.5rem 0 0.75rem;
}

.article img {
    display: block;
    width: 90%;
    margin: 2rem auto;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.article table {
    width: 90%;
    margin: 2rem auto;
    border-collapse: collapse;
    text-align: center;
}

.article table th,
.article table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
}

.article table th {
    background: var(--bg-light);
    font-weight: 600;
}

.article table tr:nth-child(even) {
    background: var(--bg-light);
}

.article ul,
.article ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    list-style: disc;
}

.article ol {
    list-style: decimal;
}

.article li {
    margin-bottom: 0.5rem;
}

.article blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--bg-light);
    font-style: italic;
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   Liste Items (Fiches par categorie)
   -------------------------------------------------------------------------- */
.list-group-fipeco {
    margin: 0;
    padding: 0;
}

.list-group-fipeco .list-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.list-group-fipeco .list-item:last-child {
    border-bottom: none;
}

.list-group-fipeco .list-item a {
    color: var(--primary);
    font-weight: 500;
}

.list-group-fipeco .list-item a:hover {
    color: var(--accent);
}

.list-group-fipeco .list-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: auto;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Book Promo
   -------------------------------------------------------------------------- */
/* Grille fiches + livre */
.fiches-livre-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.book-promo-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem 1.5rem;
}

.book-promo-side img {
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.book-promo-side h3 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
}

.book-promo-side p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Dépliant À propos */
.intro-details {
    border-top: 1px solid var(--border);
}

.intro-details summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    font-weight: 600;
    color: var(--primary);
    user-select: none;
}

.intro-details summary::-webkit-details-marker {
    display: none;
}

.intro-details summary::before {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--accent);
    line-height: 1;
    transition: var(--transition);
    width: 1rem;
    text-align: center;
}

.intro-details[open] summary::before {
    content: '−';
}

.intro-details .article {
    padding-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Category Sections
   -------------------------------------------------------------------------- */
.category-section {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.category-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.category-header h2 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 4rem 0 2rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col {
    min-width: 200px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-family: var(--font-head);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.7;
}

.socials {
    display: flex;
    gap: 1rem;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.socials a:hover {
    background: var(--primary);
}

.btn-footer-newsletter {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-footer-newsletter:hover {
    background: var(--accent);
    color: var(--white);
}

.footer-logo-legacy {
    display: block;
    width: 100%;
    max-width: 80px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1.25rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--blue-100);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   QCM / Quiz
   -------------------------------------------------------------------------- */
.qcm-container {
    max-width: 700px;
    margin: 0 auto;
}

.qcm-question {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.qcm-question h3 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.qcm-answers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.qcm-answer {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.qcm-answer:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.qcm-answer input {
    margin-right: 1rem;
}

.qcm-answer.correct {
    border-color: #22c55e;
    background: #dcfce7;
}

.qcm-answer.wrong {
    border-color: var(--accent);
    background: #fecaca;
}

/* Page de démarrage QCM */
.qcm-start {
    padding: 3rem;
}

.qcm-start .qcm-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.qcm-start h2 {
    font-family: var(--font-head);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

.qcm-start p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.qcm-start .form-group {
    max-width: 300px;
    margin: 0 auto 2rem;
}

/* Bouton large QCM */
.btn-lg {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Score QCM */
.qcm-score {
    padding: 2rem;
    margin-bottom: 2rem;
    background: var(--primary);
    color: var(--white);
}

.qcm-score h2 {
    font-family: var(--font-head);
    margin-bottom: 0.5rem;
    color: inherit;
}

.qcm-score-value {
    font-size: 3rem;
    font-weight: 700;
}

.qcm-score p {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

/* Résultats QCM */
.qcm-detail-title {
    font-family: var(--font-head);
    margin-bottom: 1.5rem;
    overflow-wrap: break-word;
}

.qcm-question--correct {
    border-left: 4px solid #22c55e;
}

.qcm-question--wrong {
    border-left: 4px solid var(--accent);
}

.qcm-question .badge {
    margin-right: 0.5rem;
}

.qcm-answers-review {
    margin: 1rem 0;
    font-size: 0.95rem;
}

.qcm-question .alert {
    margin-top: 1rem;
}

.qcm-fiche-link {
    color: inherit;
    text-decoration: underline;
}

.qcm-question .badge-result { font-size: 0.75rem; vertical-align: middle; margin-left: 0.5rem; }

/* --------------------------------------------------------------------------
   Alerts / Messages
   -------------------------------------------------------------------------- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: var(--blue-100);
    color: var(--primary);
    border: 1px solid var(--blue-200);
}

/* --------------------------------------------------------------------------
   Responsive - Tablette
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    :root {
        --section-padding: 4rem;
    }

    /* Navbar : passer en mode hamburger sur tablette */
    .nav-links,
    .btn-subscribe,
    .btn-donate,
    .nav-search {
        display: none;
    }

    .nav-mobile-only {
        display: list-item;
    }

    .donate-mobile-home {
        display: flex;
        justify-content: center;
        padding: 1rem 0 0.5rem;
    }

    .donate-mobile-home .btn-donate {
        display: inline-block;
    }

    .hamburger {
        display: block;
    }

    /* Menu mobile ouvert sur tablette */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem 20px;
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        z-index: 999;
        animation: slideDown 0.3s ease;
    }

    .nav-links.active li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active li:last-child {
        border-bottom: none;
    }

    .nav-links.active a {
        font-size: 1rem;
    }

    /* Dropdown tablette */
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: var(--bg-light);
        margin-top: 0.5rem;
        border-radius: 4px;
    }

    /* Hero : empiler verticalement */
    .hero {
        background: var(--white);
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        max-width: 100%;
    }

    /* Featured : passer en colonne sur tablette */
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .fiches-livre-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Grilles : ajuster les minimums pour tablette */
    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Footer : 2 colonnes sur tablette */
    .footer-container {
        flex-wrap: wrap;
    }

    .footer-col {
        min-width: calc(50% - 1.5rem);
    }
}

/* --------------------------------------------------------------------------
   Responsive - Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --section-padding: 3rem;
    }

    .featured-secondary {
        display: none;
    }

    .hero {
        text-align: center;
        padding: 3rem 0;
    }

    .hero-visual {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
    }

    .footer-col {
        min-width: 100%;
    }

    .article-header h1,
    .article h1 {
        font-size: 1.75rem;
    }

    .section-header h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .qcm-start h2 {
        font-size: 1.35rem;
    }

    .qcm-score h2 {
        font-size: 1.35rem;
    }

    .qcm-detail-title {
        font-size: 1.25rem;
    }

    .qcm-question {
        padding: 1.25rem;
    }
}

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Utilitaires additionnels --- */
.mb-0 { margin-bottom: 0; }
.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 1rem; }
.p-3 { padding: 1rem; }
.text-light { color: var(--text-light); }
.text-primary { color: var(--primary); }
.text-white { color: #fff; }
.bg-fipeco { background-color: #0C5077; }
.align-end { align-items: end; }
.border-top { border-top: 1px solid var(--border); }
.btn-block { width: 100%; }

/* --- Conteneurs étroits centrés --- */
.container-narrow { margin-left: auto; margin-right: auto; }
.container-narrow--sm { max-width: 500px; }
.container-narrow--md { max-width: 600px; }
.container-narrow--lg { max-width: 800px; }

/* --- Composant : Partage social --- */
.share-label { color: var(--text-light); font-size: 0.9rem; }
.btn-share { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* --- Composant : Texte --- */
.text-small { font-size: 0.85rem; color: var(--text-light); }

/* --- Composant : Icônes inline --- */
.icon-inline { margin-right: 0.5rem; }
.level-icon { margin-right: 0.75rem; flex-shrink: 0; }

/* --- Composant : Catégorie variante --- */
.category-number--accent { background: var(--accent); }

/* --- Composant : État vide recherche --- */
.search-empty { padding: 3rem; }
.search-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.search-empty h2 { font-family: var(--font-head); margin-bottom: 1rem; }

/* ==========================================================================
   PHASE 6 - Finitions et Améliorations
   ========================================================================== */

/* --------------------------------------------------------------------------
   Menu Mobile Amélioré
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    /* Hamburger animation */
    .hamburger.active svg {
        transform: rotate(90deg);
    }

    /* Breadcrumb tablette */
    .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    /* Breadcrumb mobile */
    .breadcrumb {
        font-size: 0.8rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Bouton Retour en Haut (Back to Top)
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 900;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}

/* --------------------------------------------------------------------------
   Animations Subtiles
   -------------------------------------------------------------------------- */
.topic-card,
.content-card,
.featured-main,
.featured-side {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de survol sur les liens de liste */
.list-group-fipeco .list-item {
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.list-group-fipeco .list-item:hover {
    background: var(--bg-light);
    padding-left: 0.5rem;
}

/* --------------------------------------------------------------------------
   Focus States (Accessibilité)
   -------------------------------------------------------------------------- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip link pour accessibilité */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* --------------------------------------------------------------------------
   Améliorations Typographiques
   -------------------------------------------------------------------------- */
/* Sélection de texte */
::selection {
    background: var(--blue-200);
    color: var(--text-dark);
}

/* Liens dans le contenu */
.article a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--blue-200);
    text-underline-offset: 2px;
}

.article a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* Préserver les styles des boutons dans les articles */
.article a.btn-primary,
.article a.btn-secondary,
.article a.btn-outline {
    color: var(--white);
    text-decoration: none;
}

.article a.btn-outline {
    color: var(--primary);
}

.article a.btn-outline:hover {
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Améliorations Formulaires
   -------------------------------------------------------------------------- */
/* Checkbox et Radio personnalisés */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Select amélioré */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234b5563' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    padding-bottom: 0.875rem;
    line-height: 1.5;
    height: auto;
}

/* --------------------------------------------------------------------------
   États de Chargement
   -------------------------------------------------------------------------- */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Accessibilité : prefers-reduced-motion (WCAG 2.3.3)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .navbar-fipeco,
    .top-bar,
    .footer,
    .back-to-top,
    .hamburger,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .nav-search,
    .toc-sidebar {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .article {
        max-width: 100%;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .section {
        padding: 1rem 0;
    }
}

/* --------------------------------------------------------------------------
   Corrections Diverses
   -------------------------------------------------------------------------- */
/* Fix pour les images dans le contenu CKEditor */
.article img[style*="float"] {
    margin: 1rem;
}

.article img[style*="float:left"],
.article img[style*="float: left"] {
    margin-left: 0;
    margin-right: 1.5rem;
}

.article img[style*="float:right"],
.article img[style*="float: right"] {
    margin-right: 0;
    margin-left: 1.5rem;
}

/* Fix pour les tableaux responsives */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
}

/* Fix pour les vidéos embed */
.article iframe,
.article video,
.article embed {
    max-width: 100%;
    margin: 2rem auto;
    display: block;
}

/* Fix ratio vidéo YouTube */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Dark Mode (Préparation future)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    /* Les styles dark mode peuvent être ajoutés ici plus tard */
}

/* ==========================================================================
   Security Pages (Login / Register)
   ========================================================================== */

/* Page background — gradient léger, centrage vertical */
.security-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--blue-100) 100%);
    padding: 2rem 1rem;
}

/* Conteneur centré */
.security-container {
    width: 100%;
    max-width: 440px;
    text-align: center;
}

/* Logo texte FIPECO */
.security-logo {
    margin-bottom: 0.25rem;
}

.security-logo a {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 2rem;
    color: var(--primary);
    text-decoration: none;
}

.security-logo a span {
    color: var(--accent);
}

/* Sous-titre */
.security-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

/* Card blanc */
.security-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

/* Inputs */
.security-card .form-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.security-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--blue-100);
    outline: none;
}

/* Bouton principal (full-width) */
.security-card .btn-primary {
    display: block;
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.security-card .btn-primary:hover {
    background: var(--primary-dark);
}

/* Checkbox "Se souvenir de moi" */
.security-card .custom-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-card .custom-control-label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

/* Alerts dans la card */
.security-card .alert-danger,
.security-card .alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.security-card .alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.security-card .alert-primary {
    background: var(--blue-100);
    color: var(--primary);
    border: 1px solid var(--blue-200);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Responsive mobile */
@media (max-width: 480px) {
    .security-card {
        padding: 2rem 1.5rem;
    }

    .security-logo a {
        font-size: 1.75rem;
    }

    .section-header h1 {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .qcm-start h2 {
        font-size: 1.2rem;
    }

    .qcm-score h2 {
        font-size: 1.2rem;
    }

    .qcm-score-value {
        font-size: 2.25rem;
    }

    .qcm-detail-title {
        font-size: 1.15rem;
    }

    .qcm-question {
        padding: 1rem;
    }

    .qcm-start {
        padding: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   Table des matières (TOC)
   -------------------------------------------------------------------------- */

/* Layout 2 colonnes : sidebar TOC + article */
.article-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Override du centrage autonome de .article quand il est dans la grille */
.article-layout .article {
    max-width: 800px;
    margin: 0;
    min-width: 0; /* évite le débordement dans la grille */
}

/* Sidebar sticky */
.toc-sidebar {
    position: sticky;
    top: 90px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    /* Scrollbar discrète */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--blue-200);
}

.toc-title {
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary);
}

/* Bouton toggle (mobile uniquement) */
.toc-toggle-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 0.2rem;
    line-height: 1;
    transition: transform var(--transition);
}

.toc-toggle-btn--open {
    transform: rotate(180deg);
}

/* Navigation TOC */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-link {
    display: block;
    font-size: 0.84rem;
    color: var(--text-light);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.toc-link:hover {
    color: var(--primary);
    background: var(--blue-100);
    border-left-color: var(--blue-300);
}

/* h3 : indentation */
.toc-link--h3 {
    padding-left: 1.25rem;
    font-size: 0.78rem;
}

/* Lien actif (section visible) */
.toc-link--active {
    color: var(--primary);
    font-weight: 600;
    background: var(--blue-100);
    border-left-color: var(--primary);
}

/* --------------------------------------------------------------------------
   TOC Responsive — Tablette & Mobile (≤ 1100px) : bloc repliable
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .article-layout {
        display: block;
    }

    .article-layout .article {
        max-width: 800px;
        margin: 0 auto;
    }

    .toc-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 1.75rem;
        overflow-y: visible;
    }

    .toc-toggle-btn {
        display: inline-flex;
        align-items: center;
    }

    /* Panneau fermé par défaut sur mobile */
    .toc-nav {
        display: none;
    }

    .toc-nav.toc-nav--open {
        display: block;
        margin-top: 0.5rem;
    }
}

/* Newsletter - reCAPTCHA responsive */
#g-recaptcha-response {
    display: block !important;
    position: absolute;
    margin: -78px 0 0 0 !important;
    width: 302px !important;
    height: 76px !important;
    z-index: -999999;
    opacity: 0;
}

@media (max-width: 360px) {
    .g-recaptcha {
        transform: scale(0.77);
        transform-origin: left top;
    }
}

@media (min-width: 361px) and (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.87);
        transform-origin: left top;
    }
}

