/* =========================================================================
   FICHIER : css/alaune.css - CENTRAGE HORIZONTAL ET ÉTANCHÉITÉ GLOBALE
   ========================================================================= */

/* Reset local pour empêcher tout débordement global */
.alaune-main-section, 
.alaune-main-section * {
    box-sizing: border-box !important;
}

.alaune-main-section { 
    padding: 40px 0; 
    background: #ffffff; 
    width: 100%; 
    overflow: hidden; 
}

/* Grille principale : centrée sur les grands écrans */
.alaune-grid-layout { 
    display: flex !important; 
    flex-direction: row; 
    gap: 30px; 
    width: 100%; 
    align-items: stretch !important; 
    justify-content: center !important; /* Centre les deux blocs principaux horizontalement */
}

.alaune-books-block, 
.alaune-news-block { 
    flex: 1 1 calc(50% - 15px) !important; 
    width: calc(50% - 15px) !important; 
    max-width: calc(50% - 15px) !important; 
    min-width: 0 !important; 
    display: flex; 
    flex-direction: column; 
}

/* Centrage des titres de section de chaque bloc */
.alaune-block-header {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les titres h2 */
    text-align: center;
    width: 100%;
}

.alaune-books-container-scroll { 
    max-height: 350px !important; 
    overflow-y: auto; 
    padding-right: 5px; 
    flex-grow: 1; 
    width: 100%;
}

/* Grille interne des livres : centrée automatiquement */
.alaune-books-grid {
    justify-content: center !important; /* Centre les cartes de livres à l'intérieur s'il y a du vide */
}

.news-carousel-container-stretch { 
    width: 100%; 
    flex-grow: 1; 
    position: relative; 
    overflow: hidden; 
    border-radius: 4px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    background: white; 
    height: calc(100% - 43px); 
    margin: 0 auto; /* Centre le carrousel sur son axe */
}

.news-carousel-item-stretch { 
    width: 100%; 
    height: 100%; 
    flex-direction: column; 
    flex-grow: 1; 
}

.news-card-inner-stretch { 
    background: white; 
    border: 1px solid #eaeaea; 
    border-radius: 4px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    flex-grow: 1; 
}

.news-text-frame-scroll { 
    padding: 15px; 
    flex-grow: 1; 
    background: white; 
    overflow-y: auto; 
    word-break: break-word; 
}

/* 📱 ADAPTATION MOBILE ET CENTRAGE STRICT (MAX-WIDTH: 768PX) */
@media (max-width: 768px) {
    .alaune-grid-layout { 
        flex-direction: column !important; 
        align-items: center !important; /* Aligne les blocs au centre sur mobile */
        gap: 30px;
    }
    .alaune-books-block, 
    .alaune-news-block { 
        flex: 1 1 100% !important; 
        width: 100% !important; 
        max-width: 100% !important; 
    }
    .alaune-books-container-scroll, 
    .news-carousel-container-stretch { 
        max-height: 420px !important; 
    }
    .news-carousel-container-stretch {
        height: auto;
        width: 100%;
    }
}
