/* ==========================================================================
   1. STRUCTURE GÉNÉRALE & CONTENEURS
   ========================================================================== */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Conteneur de l'arborescence (Centre) */
.tree-wrapper {
    background: #ffffff;
    max-height: 850px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    scrollbar-width: thin;
}

/* ==========================================================================
   2. ARBORESCENCE EN ESCALIER (SOMMAIRE)
   ========================================================================== */

/* Indentation des niveaux de dossiers */
.tree-wrapper details {
    margin-left: 15px !important;
    transition: all 0.2s ease;
}

/* Style des titres de dossiers (summary) */
.tree-wrapper summary {
    cursor: pointer;
    list-style: none; /* Cache la flèche standard */
    outline: none;
    padding: 6px 0;
    display: flex;
    align-items: center;
}

.tree-wrapper summary::-webkit-details-marker {
    display: none; /* Cache la flèche sur Chrome/Safari */
}

.tree-wrapper summary b {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}


/* ==========================================================================
   3. SOUS-TITRES (SOUSTITRE_TA)
   ========================================================================== */
.soustitre-sommaire {
    display: block;
    margin-top: 15px;
    margin-bottom: 8px;
    margin-left: 12px;
    padding-bottom: 4px;
    
    font-size: 0.85rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    border-bottom: 1px solid #eee;
    position: relative;
}

.soustitre-sommaire::before {
    content: "•";
    margin-right: 8px;
    color: #28a745;
}

/* ==========================================================================
   4. ARTICLES & LIENS
   ========================================================================== */
.article-link {
    text-decoration: none !important;
    display: flex !important;
    align-items: center;
    color: #0056b3;
}

.article-link .icon-article {
    margin-right: 10px;
    width: 30px;
    text-align: center;
    text-decoration: none !important;
}

.article-link:hover span:not(.icon-article) {
    text-decoration: underline !important;
}

/* ==========================================================================
   5. DÉTAIL DE L'ARTICLE (DROITE)
   ========================================================================== */
.card-header {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content {
    font-size: 1.4rem;
    line-height: 1.7;
    text-align: justify;
    color: #13191f;
}

/* 1. On retire le scroll du conteneur parent s'il y en avait un */
#display-zone {
    height: auto !important;
    overflow: visible !important;
}

/* 2. On configure le bloc vert pour qu'il soit le seul à scroller */
.annotation-box {
    background-color: #006837 !important;
    color: #ffffff !important;
    padding: 20px;
    margin-top: 25px;
    
    /* CONFIGURATION DU SCROLL INTERNE */
    max-height: 800px;    /* Hauteur max avant l'apparition du scroll */
    overflow-y: auto;     /* Active le scroll vertical uniquement ici */
    
    /* Optionnel : Amélioration visuelle de la barre de scroll interne */
    scrollbar-width: thin;
    scrollbar-color: #28a745 #004d29;
}

.annotation-title {
    font-weight: bold;
    font-size: 1.5rem;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    padding-bottom: 8px;
    text-transform: uppercase;
    font-size: 1.5rem; /* Modifiez cette valeur pour le titre (ex: 1.2rem pour plus grand) */
}

.card-header.bg-dark {
    border-bottom: 1px solid rgba(44, 44, 44, 0.3) !important;
    margin-bottom: 15px;
    font-weight: bold;
}

.annotation-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.annotation-item .icon {
    margin-right: 12px;
    font-size: 1rem;
    flex-shrink: 0;
}


/* Ajoute un espace de sécurité en bas pour que le bloc vert ne soit pas coupé */
.annotation-box {
    margin-bottom: 50px !important;
}


/* ==========================================================================
   6. CORRECTIFS & DIVERS
   ========================================================================== */
#empty-message {
    opacity: 0.7;
}

/* Ajustement scrollbar pour Chrome/Edge */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

