:root {
    --katalog-bordeaux: #902135;
    --primary-blue: #235a81;
    --text-dark: #1f2937;
    --gray-text: #666666;
    --border-soft: #e5e7eb;
}

/* --- HEADER RESPONSIVE --- */
.author-header {
    background: linear-gradient(100deg, rgba(144, 33, 53, 0.04) 0%, #fff 45%, rgba(144, 33, 53, 0.15) 100%);
    padding: 40px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-soft);
}

.author-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}



.author-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.2rem);
    /* Taille fluide */
    color: var(--text-dark);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    flex: 1;
}

/* --- PHOTO DE L'AUTEUR --- */
.author-photo-wrapper {
    flex-shrink: 0;
    z-index: 10;
}

.author-photo {
    width: 180px;
    height: 240px;
    object-fit: cover;
    border: 8px solid white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #f3f4f6;
}

/* --- BIOGRAPHIE --- */
.author-bio-section {
    margin: 30px 0 60px;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 850px;
    text-align: justify;
}

/* --- BIBLIOGRAPHIE & CARROUSEL --- */
.biblio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-soft);
    padding-bottom: 15px;
}

.bibliography-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0;
}

.btn-voir-tout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--primary, #902135);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.btn-voir-tout:hover {
    background: #6e1829;
    transform: translateX(3px);
}

.btn-voir-tout i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.btn-voir-tout:hover i {
    transform: translateX(3px);
}

.scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    /* Permet le swipe au doigt */
    scroll-snap-type: x mandatory;
    /* Force la carte à "s'aimanter" au bord de l'écran */
    -webkit-overflow-scrolling: touch;
    /* Scroll fluide sur iOS */
    padding-bottom: 10px;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Cache la scrollbar Chrome/Safari */

.res-card-link {
    flex: 0 0 220px;
    /* Taille fixe */
    scroll-snap-align: start;
    /* La carte s'aligne au début du scroll */
    text-decoration: none;
}

.res-card {
    background: #fff;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.res-card:hover {
    transform: translateY(-8px);
}

.res-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.res-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.scroll-btn {
    background: white;
    border: 1px solid var(--border-soft);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--katalog-bordeaux);
}

.scroll-btn:hover {
    background: var(--katalog-bordeaux);
    color: white;
    border-color: var(--katalog-bordeaux);
}

/* --- FILIGRANE --- */
.bg-watermark {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: clamp(3rem, 10vw, 6rem);
    color: rgba(24, 60, 182, 0.04);
    font-weight: 900;
    z-index: -1;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
}

.h4 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-dark);
    font-weight: 800;

    /* On garde une hauteur max cohérente avec le line-height (1.4 * 2 lignes) */
    max-height: 2.8em;
    overflow: hidden;

    /* Compatibilité historique et actuelle (Blink, Webkit, Gecko) */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    /* Propriété standard pour le futur */
    line-clamp: 2;

    /* Force l'affichage en bloc si le moteur ne supporte pas webkit-box */
    display: box;
}

.res-type-label {
    font-size: 0.65rem;
    color: #666;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.res-info-body {
    padding-top: 6px;
}

.res-author-box {
    margin: 0 0 6px 0;
    font-size: 0.75rem;
    color: var(--text-dark);
    font-style: italic;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Standard line-clamp property for compatibility */
.res-title-text {
    margin: 2px 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-dark);
    font-weight: 900;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    /* Limite à 2 lignes */
    line-clamp: 2;
    height: 40px;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column-reverse;
        /* Photo au-dessus du nom ou inversement */
        align-items: center;
        text-align: center;
    }

    .author-photo {
        width: 150px;
        height: 200px;
        margin-bottom: 20px;
    }

    .author-bio-section {
        text-align: left;
        font-size: 1rem;
    }

    .res-card-link {
        flex: 0 0 200px;
        /* Cartes légèrement plus petites sur mobile */
    }

    .res-img {
        height: 270px;
    }

    .scroll-btn {
        display: none;
    }

    /* On utilise le swipe tactile sur mobile */

    .scroll-btn {
        display: flex !important;
        /* Force l'affichage */
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
        background: rgba(255, 255, 255, 0.9);
        /* Un peu plus opaque pour bien se détacher */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .biblio-header {
        flex-direction: row;
        /* Garde les boutons alignés avec le titre même sur petit écran */
        align-items: center;
        gap: 10px;
    }

    .bibliography-title {
        font-size: 1.3rem;
        /* On réduit un peu le titre pour laisser de la place aux boutons */
        flex: 1;
    }
}