/* Classes existantes */
.banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    z-index: 1;
}

.banner_texte {
    height: 30%;
    z-index: 2;
    position: relative;
}

.home_main {
    max-width: 1550px;
    margin: 0 auto;
    padding: 30px;
}

.intro {
    position: absolute;
    right: 0;
    top: -10px;
    font-size: 7rem;
    color: rgba(144, 33, 53, 0.05);
    font-weight: 900;
    z-index: -1;
    pointer-events: none;
}

.intro_2 {
    position: absolute;
    right: 0;
    top: -10px;
    font-size: 6rem;
    color: rgba(24, 60, 182, 0.04);
    font-weight: 900;
    z-index: -1;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
}

/* Nouvelles classes extraites */
.slide-description {
    font-size: 1.1rem;
    color: #555;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.4);
    border: none;
    height: 50px;
    width: 30px;
    cursor: pointer;
    z-index: 10;
}

.slider-nav-prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.slider-nav-next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.slider-pagination {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.content-section {
    margin-bottom: 50px;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 10px;

}

.section-title {
    margin: 0;
    font-size: 1.6rem;
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: 1px;
}

.section-title-domain {
    margin: 0;
    font-size: 1.5rem;
    color: var(--katalog-black);
    font-weight: 700;

    font-family: 'Montserrat', sans-serif;
  
}

.flex-gap-12 {
    display: flex;
    gap: 12px;
}

/* Styles des cartes ressources */
.res-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    background: #fff;
}

.res-img-content {
    width: 100%;
    height: 290px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.badge-read {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--katalog-green);
    color: white;
    padding: 4px 12px;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.res-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.05));
}

.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;
}

.res-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 5px;
}

.res-meta-info {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 700;
}

.res-meta-info i {
    margin-right: 4px;
}

.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-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}


/* ==========================================
       MEDIA QUERIES (RESPONSIVE)
       ========================================== */

@media (max-width: 768px) {
    .home_main {
        padding: 15px;
    }

    /* Moins de padding sur les côtés */

    /* Ajustement du Slider */
    .banner_texte h2 {
        font-size: 1.4rem;
    }
     
     .section-title-domain  {
        font-size: 1.3rem;
        /* On réduit un peu le titre pour laisser de la place aux boutons */
        flex: 1;
    }


    .slide-description {
        font-size: 1.1rem;
    }

    .slider-nav-btn {
        height: 40px;
        width: 25px;
    }

    /* Textes décoratifs : ajustés pour mobile */
    .intro {
        font-size: clamp(2.5rem, 8vw, 4rem);
        color: rgba(144, 33, 53, 0.07);
    }
    .intro_2 {
        font-size: clamp(2.5rem, 8vw, 4rem);
        color: rgba(24, 60, 182, 0.07);
    }

    
    /* Titres de section plus petits */
    .section-title {
        font-size: 1rem;
    }
    .section-title-domain {
        font-size: 1.2rem;
    }

    /* Section header: titre seul sur mobile, boutons masqués */
    .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .section-header .flex-gap-12 {
        display: none;
    }

    /* Scroll natif activé sur mobile (les boutons JS sont masqués) */
    .scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
    }
    .scroll-container::-webkit-scrollbar { display: none; }
    .scroll-container .res-card          { scroll-snap-align: start; }

    /* Cartes : on réduit un peu la hauteur des images pour en voir plus */
    .res-img-content {
        height: 220px;
    }

    /* Ajustement de l'en-tête de section (boutons de scroll) */
    .section-header {
        margin-bottom: 15px;
    }

    .scroll-btn {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .banner_texte {
        height: 50%;
    }

    .banner_texte h2 {
        font-size: 1.2rem;
        line-height: 1.2;
    }
    
    .res-card {
        min-width: 200px;
    }

    /* Ajuste la largeur min des cartes dans le scroll */
}


/* --- Structure de base --- */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    /* Un peu plus haut pour le confort desktop */
    overflow: hidden;
}

.slides-container {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    width: 100%;
}

.slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    /* On utilise flexbox pour centrer le contenu sur mobile plus tard */
    align-items: center;
    justify-content: flex-start;
}

.banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    z-index: 1;
}

/* --- Le contenu (La carte texte) --- */
.slide-content {
    position: relative;
    z-index: 2;
    margin-left: 5%;
    /* Positionnement relatif au bord gauche */
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    max-width: 450px;
    /* On retire le height: 100px fixe pour laisser le texte respirer */
    min-height: fit-content;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-left: 5px solid var(--katalog-bordeaux, #800000);
}

.slide-content h2 {
    color: var(--katalog-bordeaux, #800000);
    margin-bottom: 10px;
    font-size: 1.8rem;
    line-height: 1.2;
}

.slide-description {
    font-size: 1rem;
    color: #333;
    margin: 0;

}



/* ==========================================
   MEDIA QUERIES
   ========================================== */

/* Tablette */
@media (max-width: 768px) {
    .slider-wrapper {
        height: 350px;
    }

    .slide-content {
        margin-left: 30px;
        max-width: 60%;
        padding: 1.5rem;
    }

    .slide-content h2 {
        font-size: 1.4rem;
    }
}

/* Mobile (Smartphone) */
@media (max-width: 480px) {
    .slider-wrapper {
        height: 300px;
    }

    /* On centre tout pour le mobile pour éviter les décalages */
    .slide {
        justify-content: center;
    }

    .slide-content {
        margin-left: 0;
        width: 85%;
        /* Prend presque toute la largeur */
        max-width: none;
        padding: 1rem;
        text-align: center;
        border-left: none;
        border-bottom: 4px solid var(--katalog-bordeaux, #800000);
    }

    .slide-content h2 {
        font-size: 1.1rem;
    }

    .slide-description {
        font-size: 0.8rem; /* Un peu plus petit pour gagner de l'espace */
        line-height: 1.3;
        
        /* On passe à 3 ou 4 lignes au lieu de 2 */
        -webkit-line-clamp: 3; 
        line-clamp: 3;
        
        /* Ajustement de la hauteur de sécurité (1.3 * 3 = 3.9) */
        max-height: 3.9em; 
        
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}