/* =================================================
   1. RESET & BASICS
   ================================================= */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote,
pre, a, code, img, small, strong, b, u, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, tbody, tfoot, thead, tr, th, td,
article, aside, figure, figcaption, footer, header, nav, section, audio, video {
    margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, nav, section { display: block; }
body { line-height: 1; -webkit-text-size-adjust: none; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
table { border-collapse: collapse; border-spacing: 0; }
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

/* =================================================
   2. TYPOGRAPHIE & COULEURS
   ================================================= */
:root {
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Merriweather', serif;
    --color-dark: #0f172a;
    --color-blue: #3b82f6;
    --color-text: #334155;
    --sidebar-width: 20em;
}

body, input, select, textarea {
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px; 
    font-weight: 400;
    line-height: 1.65em;
    background-color: #f8fafc;
}

h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.4em;
    margin: 0 0 0.75em 0;
    letter-spacing: -0.02em;
}
/* Remplacer le bloc .image.main par ceci */
.image.main { 
    display: block; 
    width: 100%;
    
    /* MODIFICATION ICI : On passe de 16/9 à 3/1 pour un effet "bandeau" */
    aspect-ratio: 3 / 1; 
    
    /* SÉCURITÉ : Empêche l'image de dépasser 400px de haut sur les très grands écrans */
    max-height: 400px;
    
    height: auto; 
    border-radius: 0; 
    overflow: hidden; 
}

/* Sur mobile */
@media screen and (max-width: 768px) {
    .image.main {
        /* On garde un bandeau fin sur mobile aussi */
        aspect-ratio: 3 / 1; 
        /* On enlève la limite de hauteur max sur mobile pour laisser le ratio gérer */
        max-height: none; 
    }
}

.image.main img { 
    border-radius: 0; 
    object-fit: cover; /* Important : coupe l'image sans la déformer */
    object-position: center;
    height: 100%; 
    width: 100%;
}

h2 { font-size: 1.75em; }
h3 { font-size: 1.35em; }
h4 { font-size: 1.1em; }

p { color: #475569; line-height: 1.8; margin-bottom: 1.5em; }
strong, b { color: #1e293b; font-weight: 700; }

a {
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    border-bottom: solid 1px #e4e4e4;
    color: inherit;
    text-decoration: none;
}
a:hover { border-bottom-color: transparent; color: #3b82f6 !important; }

/* =================================================
   3. STRUCTURE (Layout)
   ================================================= */
.container { margin: 0 auto; max-width: calc(100% - 3em); width: 60em; }
#wrapper { background: #fff; padding-right: var(--sidebar-width); }
#main > section { border-top: solid 1px #e2e8f0; }
#main > section > .container { padding: 4em 0 3em 0; }
#main > section:first-child { border-top: 0; }

/* =================================================
   4. HEADER SIDEBAR (Menu Latéral)
   ================================================= */
#header {
    display: flex; flex-direction: column; justify-content: space-between;
    background: var(--color-dark) !important;
    color: #d2f2e9;
    height: 100%;
    overflow-y: auto;
    position: fixed;
    text-align: center;
    top: 0; right: 0; width: var(--sidebar-width);
    box-shadow: -4px 0 15px rgba(0,0,0,0.15);
    z-index: 10000;
}

#header > header { padding: 3em 2em 1em 2em; flex-shrink: 0; }
#header > header h1 { color: #fff !important; font-size: 1.6em; font-weight: 800; margin: 0; line-height: 1.2; }
#header > header p { color: #94a3b8 !important; font-size: 0.9em; margin: 1.5em 0 0 0; line-height: 1.6; }
#header > header .separator { width: 40px; height: 2px; background: #3b82f6; margin: 15px auto; opacity: 0.5; }

/* =================================================
   SECTION AUTEURS (Photos Identiques & Logos)
   ================================================= */

.authors-grid {
    display: flex;
    justify-content: center;
    gap: 3em;
    flex-wrap: wrap;
}

.author-card {
    background: #fff;
    padding: 2.5em 1.5em;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 280px;
    max-width: 450px;
    transition: transform 0.3s ease;
    
    /* Flexbox pour bien aligner le contenu en bas */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* --- PHOTO STANDARDISÉE (Le secret pour la même taille) --- */
.author-photo {
    width: 140px;  /* Taille fixe */
    height: 140px; /* Taille fixe identique */
    margin: 0 auto 1.5em auto;
    border-radius: 50%; /* Rond parfait */
    overflow: hidden; /* Coupe ce qui dépasse */
    border: 4px solid #f1f5f9;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #fff;
    flex-shrink: 0; /* Empêche l'image de s'écraser */
}

.author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit le cercle sans déformer */
    object-position: center top; /* Centre sur le visage */
    display: block;
}

/* Textes */
.author-card h4 {
    margin-bottom: 0.5em;
    color: #0f172a;
    font-size: 1.3em;
}

.author-name-link {
    text-decoration: none;
    color: inherit;
    border-bottom: none;
    transition: color 0.2s;
}
.author-name-link:hover {
    color: var(--color-blue) !important;
}

.author-card p {
    font-size: 0.95em;
    color: #475569;
    margin-bottom: 1.5em;
    flex-grow: 1; /* Pousse le footer vers le bas */
}

.role-subtitle {
    font-style: italic;
    color: #64748b;
    font-size: 0.9em;
}

/* --- LOGOS & FOOTER CARD --- */
.author-footer, .author-logos {
    margin-top: auto; /* Colle cet élément en bas de la carte */
    height: 80px; /* Hauteur réservée fixe pour alignement */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.author-logos {
    gap: 20px;
}

.author-logos img {
    height: 60px; /* Taille max des logos */
    width: auto;
    object-fit: contain;
}

.logo-separator {
    height: 40px;
    width: 1px;
    background-color: #cbd5e1;
    display: inline-block;
}

/* Navigation */
#header > nav { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 2em 0; }
#header > nav ul { list-style: none; padding: 0; width: 100%; }
#header > nav ul li { border-top: solid 1px rgba(51, 65, 85, 0.5); }
#header > nav ul li:first-child { border-top: none; }
#header > nav ul li a {
    color: #cbd5e1 !important; display: block; padding: 1em 0; font-size: 1em;
    transition: all 0.3s; letter-spacing: 0.05em; border: none;
}
#header > nav ul li a:hover { color: #fff !important; background: rgba(255,255,255,0.03); padding-left: 10px; }
#header > nav ul li a.active {
    background: rgba(59, 130, 246, 0.1); color: var(--color-blue) !important;
    font-weight: 700; border-right: 4px solid var(--color-blue);
}

/* =================================================
   FOOTER SIDEBAR (BARRE CONTACT)
   ================================================= */
#header > footer {
    padding: 2em;
    padding-bottom: 4em;
    width: 100%;
    text-align: center;
}

/* Ligne de séparation subtile */
.footer-separator {
    width: 50px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 auto 2em auto;
}

/* Conteneur du bouton */
.sidebar-btn-container {
    margin-bottom: 2em;
    display: flex;
    justify-content: center;
}

/* --- LE BOUTON STYLÉ --- */
.sidebar-contact-btn {
    display: flex;
    align-items: center;       /* Centre verticalement */
    justify-content: center;   /* Centre horizontalement */
    gap: 12px;                 /* Espace propre entre icône et texte */
    
    width: 100%;               /* Prend toute la largeur dispo */
    max-width: 240px;          /* Mais ne devient pas gigantesque */
    padding: 12px 20px;        /* Hauteur confortable */
    
    /* Style "Ghost" sur fond foncé */
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;       /* Forme de "pilule" moderne */
    
    /* Texte */
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    transition: all 0.3s ease;
}

/* L'icône dans le bouton */
.sidebar-contact-btn i {
    font-size: 1.1em;
    margin: 0; 
    line-height: 1; /* Fixe l'alignement vertical */
}

/* EFFET AU SURVOL */
.sidebar-contact-btn:hover {
    background: var(--color-blue); /* Fond bleu */
    border-color: var(--color-blue);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Copyright */
.footer-copyright {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.65em;
    line-height: 1.6;
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =================================================
   5. FEATURES (LIVRES - Design Premium)
   ================================================= */
/* Style de base de la carte */
.features article {
    border-top: 0; margin-bottom: 3em; padding: 0;
    background: #ffffff; border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: stretch; position: relative; overflow: hidden;
}

/* Couleur par défaut (Bleu) si pas d'ID spécifique */
.features article::before {
    content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 6px;
    background: var(--color-blue);
}

.features article:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.features article .image {
    width: 40%; background-color: #f1f5f9;
    display: flex; align-items: center; justify-content: center; padding: 3em;
}

.features article .image img {
    width: 100%; max-width: 220px; border-radius: 2px;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.15);
    transition: transform 0.5s ease; display: block;
}
.features article:hover .image img { transform: scale(1.05) rotate(-2deg); }

.features article .inner { width: 60%; padding: 3em; display: flex; flex-direction: column; justify-content: center; }
.features article h4 { font-size: 1.5em; color: #0f172a; margin-bottom: 0.8em; }

/* Badge & Tags */
.book-badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 0.75em; font-weight: 700; text-transform: uppercase;
    margin-bottom: 1em; width: fit-content;
}
.book-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5em; }
.tag {
    font-size: 0.85em; color: #475569; background: #f8fafc;
    border: 1px solid #e2e8f0; padding: 6px 12px; border-radius: 6px;
    font-weight: 500; display: flex; align-items: center; gap: 6px;
}

/* Boutons */
.button {
    background: linear-gradient(135deg, var(--color-blue) 0%, #2563eb 100%);
    color: #ffffff !important; border-radius: 6px; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; height: 2.75em; padding: 0 1.75em; font-size: 0.95em;
    text-decoration: none; box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
    transition: all 0.3s ease;
}
.button:hover { transform: translateY(-2px); }
.button.small { font-size: 0.75em; height: 2.25em; }
.button.icon:before { margin-right: 0.75em; font-size: 1.1em; }
ul.actions { list-style: none; padding: 0; }

/* --- COLORISATION DES LIVRES (VARIABLES) --- */

/* 1. COURS (Vert) */
#cours .features article::before { background: linear-gradient(180deg, #84cc16 0%, #4d7c0f 100%); }
#cours .features article:hover { border-color: #bef264; }
#cours .tag i { color: #65a30d; }
#cours .button { background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%); box-shadow: 0 4px 6px rgba(132, 204, 22, 0.3); }
#cours .button:hover { background: linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%); }

/* 2. TOME I (Jaune) */
#tome1 .features article::before { background: linear-gradient(180deg, #facc15 0%, #ca8a04 100%); }
#tome1 .features article:hover { border-color: #fde047; }
#tome1 .tag i { color: #ca8a04; }
#tome1 .button { background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%); box-shadow: 0 4px 6px rgba(234, 179, 8, 0.3); }
#tome1 .button:hover { background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%); }

/* 3. TOME II (Orange) */
#tome2 .features article::before { background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%); }
#tome2 .features article:hover { border-color: #fdba74; }
#tome2 .tag i { color: #ea580c; }
#tome2 .button { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); box-shadow: 0 4px 6px rgba(249, 115, 22, 0.3); }
#tome2 .button:hover { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }


/* =================================================
   6. COMPOSANTS DIVERS
   ================================================= */
/* Footer Modern */
#footer-modern {
    background-color: #0f172a; color: #fef3c7; padding: 4em 3em;
    width: auto; margin-right: var(--sidebar-width);
    font-family: var(--font-heading); border-top: 1px solid #1e293b;
}
.footer-columns {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 2em; text-align: left; margin-bottom: 3em;
}
.footer-col h3 {
    color: #ffffff; font-size: 1.1em; font-weight: 800; text-decoration: underline;
    text-decoration-color: #3b82f6; text-underline-offset: 6px; margin-bottom: 1.2em;
}
.footer-col a {
    display: block; color: #cbd5e1; border-bottom: none; margin-bottom: 0.6em;
    font-size: 0.95em; transition: all 0.2s;
}
.footer-col a:hover { color: #3b82f6 !important; padding-left: 5px; }

.footer-divider { height: 1px; background: linear-gradient(90deg, transparent, #1e293b, transparent); width: 100%; margin: 3em auto; }
.footer-bottom { text-align: center; display: flex; flex-direction: column; gap: 1.5em; align-items: center; }
.brand-name { color: #ffffff; font-size: 1.5em; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; border: 2px solid #3b82f6; padding: 0.3em 1em; }
.footer-icons { display: flex; gap: 1.5em; font-size: 1.4em; }

/* Titres décorés */
header.major h2 { color: #0f172a !important; }
header.major h2::after {
    content: ''; display: block; width: 50px; height: 4px;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    margin-top: 10px; border-radius: 2px;
}
/* MathJax */
.mjx-chtml { font-size: 110% !important; color: #1e293b; }

/* Animation Scroll */
.reveal-on-scroll {
    opacity: 0; transform: translateY(20px); transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* =================================================
   7. RESPONSIVE / MEDIA QUERIES (OPTIMISÉ)
   ================================================= */

/* --- TABLETTES & MOBILE (max-width: 1024px) --- */
@media screen and (max-width: 1024px) {
    
    /* 1. RESET DE LA STRUCTURE GLOBALE */
    #wrapper {
        padding-right: 0; /* On enlève la place réservée à la sidebar */
        transition: transform 0.5s ease; /* Pour l'animation du menu */
    }

    .container {
        width: 100% !important;
        max-width: 100%;
        padding: 0 1.5em; /* Marges latérales plus fines */
    }

    /* 2. LE HEADER (Menu Latéral) - MODE OFF-CANVAS */
    #header {
        height: 100vh; /* Toute la hauteur */
        position: fixed;
        top: 0;
        right: 0;
        width: 280px; /* Largeur confortable sur mobile */
        max-width: 80%;
        z-index: 10002; /* Au-dessus de tout */
        transform: translateX(100%); /* CACHÉ par défaut vers la droite */
        transition: transform 0.5s ease, box-shadow 0.5s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #0f172a !important; /* Couleur de fond forcée */
        display: block; /* On s'assure qu'il existe */
        box-shadow: none;
    }

    /* QUAND LE MENU EST OUVERT (Via Javascript) */
    body.header-visible #header {
        transform: translateX(0); /* On le ramène visible */
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }
    
    /* On floute/assombrit le site quand le menu est ouvert */
    body.header-visible #wrapper {
        transform: translateX(-50px); /* Petit effet de recul du site */
        opacity: 0.4;
        pointer-events: none; /* Empêche de cliquer sur le site */
    }

    /* 3. BARRE DE TITRE MOBILE (Le bandeau noir en haut) */
    #titleBar {
        display: block; /* Elle apparait */
        height: 50px;
        left: 0;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 10001;
        background: #0f172a;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    #titleBar .title {
        display: block;
        height: 50px;
        line-height: 50px;
        padding: 0 1em;
        color: #fff;
        font-weight: 700;
        font-size: 1.1em;
    }

    /* Le Bouton Burger */
    #titleBar .toggle {
        position: absolute;
        right: 0;
        top: 0;
        height: 50px;
        width: 60px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    #titleBar .toggle::before {
        content: '\f0c9'; /* Icone Menu (FontAwesome) */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        top: 0; left: 0; width: 100%; height: 50px;
        line-height: 50px;
        text-align: center;
        font-size: 1.4em;
        color: #3b82f6;
    }

    /* 4. AJUSTEMENTS DE CONTENU */
    
    /* On descend le contenu pour ne pas être caché par la barre de titre */
    #main {
        padding-top: 50px; 
    }
    
    #main > section > .container {
        padding: 3em 1.5em; /* Moins de padding vertical */
    }

    /* Cartes Auteurs : On les empile proprement */
    .authors-grid {
        gap: 2em;
    }
    .author-card {
        min-width: 100%; /* Prend toute la largeur disponible */
        margin: 0;
    }

    /* Cartes Livres : Image au dessus, texte en dessous */
    .features article {
        flex-direction: column;
    }
    .features article::before {
        width: 100%; height: 6px; /* Barre colorée en haut */
    }
    .features article .image {
        width: 100%;
        padding: 2em;
    }
    .features article .inner {
        width: 100%;
        padding: 2em 1.5em;
    }
    
    /* Footer */
    #footer-modern {
        margin-right: 0;
        padding: 3em 1.5em;
        text-align: center;
    }
    .footer-columns {
        grid-template-columns: 1fr; /* Une seule colonne */
    }
}

/* --- PETITS MOBILES (max-width: 480px) --- */
@media screen and (max-width: 480px) {
    h2 { font-size: 1.4em; }
    h3 { font-size: 1.2em; }
    
    /* Ajustement de la bannière image */
    .image.main {
        max-height: 180px;
    }
    
    /* Boutons plus larges pour le tactile */
    .button {
        width: 100%;
    }
}
/* --- CORRECTIF DU PROBLEME EN BAS DE PAGE --- */
/* Force la barre mobile à être cachée sur ordinateur */
#titleBar {
    display: none !important;
}

/* On ne l'affiche que sur les petits écrans */
@media screen and (max-width: 1024px) {
    #titleBar {
        display: block !important;
    }
}
/* =================================================
   BOUTON SIGNATURE (Site Perso)
   ================================================= */

.btn-signature {
    /* Forme et Taille */
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Espace entre icône et texte */
    padding: 12px 28px; /* Assez large pour être visible */
    border-radius: 50px; /* Forme de pilule très moderne */
    
    /* Couleurs & Fond */
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%); /* Dégradé Bleu Profond -> Bleu Ciel */
    color: #ffffff !important; /* Texte blanc forcé */
    
    /* Typographie */
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    border: none;
    
    /* L'effet "Glow" (Ombre portée colorée) */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); 
    
    /* Animation fluide */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- EFFET AU SURVOL --- */
.btn-signature:hover {
    /* Le bouton monte légèrement */
    transform: translateY(-3px);
    
    /* L'ombre grandit */
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
    
    /* Le dégradé change légèrement */
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
}

/* Petite animation sur l'icône au survol */
.btn-signature i {
    transition: transform 0.3s ease;
}
.btn-signature:hover i {
    transform: translateX(3px) translateY(-3px); /* La flèche part vers le haut-droite */
}
/* =================================================
   CORRECTIF POSITION "RETOUR ACCUEIL"
   ================================================= */

/* 1. On remonte la section globale */
#intro-tome.book-hero-section {
    padding-top: 0 !important; /* On annule le padding de la section */
}

/* 2. C'est ICI le secret : on annule le padding interne du container */
#intro-tome .container {
    padding-top: 2em !important; /* On remplace le 4em par défaut par 2em (plus petit) */
}

/* 3. On remonte le lien "Retour" lui-même */
.breadcrumb {
    margin-top: 0;
    margin-bottom: 2em; /* Espace sous le lien avant le livre */
}

/* --- NOUVEAUX BOUTONS MODERNES --- */

.buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Espace entre les boutons */
    margin-top: 2em;
}

/* Style de base commun */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espace entre l'icône et le texte */
    
    padding: 12px 28px;
    height: auto; /* On laisse la hauteur s'adapter */
    
    font-family: var(--font-heading, sans-serif);
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    
    border-radius: 8px; /* Coins légèrement arrondis, plus moderne */
    border: 2px solid transparent; /* Prépare la bordure */
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Légère ombre */
}

/* Correction pour les icônes */
.btn-modern i {
    font-size: 1.1em;
    margin: 0; /* On annule les marges par défaut du template */
    line-height: 1;
}

/* --- VARIATION 1 : BOUTON PLEIN (Ressources) --- */
.btn-primary {
    background: linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%); /* Dégradé vert riche */
    color: #ffffff !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(77, 124, 15, 0.3);
    background: linear-gradient(135deg, #4d7c0f 0%, #365314 100%);
}

/* --- VARIATION 2 : BOUTON CONTOUR (Acheter) --- */
.btn-outline {
    background-color: #ffffff;
    border-color: #4d7c0f;
    color: #4d7c0f !important;
}

.btn-outline:hover {
    background-color: #4d7c0f;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(77, 124, 15, 0.2);
}

/* Adaptation Mobile */
@media screen and (max-width: 480px) {
    .buttons-row {
        flex-direction: column;
    }
    .btn-modern {
        width: 100%;
    }
}
/* --- VARIATIONS COULEURS POUR TOME 1 (JAUNE/OCRE) --- */

/* Bouton Plein (Jaune) */
.btn-yellow {
    /* On écrase le vert par défaut */
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%) !important;
    color: #fff !important;
}

.btn-yellow:hover {
    background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%) !important;
    box-shadow: 0 8px 15px rgba(202, 138, 4, 0.3);
}

/* Bouton Contour (Jaune) */
.btn-yellow-outline {
    border-color: #ca8a04 !important;
    color: #ca8a04 !important;
}

.btn-yellow-outline:hover {
    background-color: #ca8a04 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 15px rgba(202, 138, 4, 0.2);
}