/**
 * CLI Sommaire Dynamique - Styles Front
 */

/* === CONTENEUR PRINCIPAL === */
.cli-sommaire-wrapper {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin: 32px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

/* Respecter la largeur des containers du thème */
@media only screen and (min-width: 75em) {
    .cli-sommaire-wrapper {
        width: 71rem;
    }
}

@media only screen and (min-width: 64em) and (max-width: 74.999em) {
    .cli-sommaire-wrapper {
        width: 61rem;
    }
}

@media only screen and (min-width: 767px) and (max-width: 63.999em) {
    .cli-sommaire-wrapper {
        width: 46rem;
    }
}

@media only screen and (max-width: 766px) {
   .cli-sommaire-wrapper {
        width: 100%;
        padding: 20px;
        margin: 24px auto;
   
    }

}

.cli-sommaire-container {
    max-width: 100%;
}

/* === TITRE DU SOMMAIRE === */
.cli-sommaire-titre {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
}

/* === NAVIGATION === */
.cli-sommaire-nav {
    margin: 0;
}

.cli-sommaire-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === ITEMS DU SOMMAIRE === */
.cli-sommaire-item {
    margin: 0;
    padding: 0;
}

.cli-sommaire-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cli-sommaire-link:hover {
    background: #e9ecef;
    border-color: #2D2B7F;
    color: #2D2B7F;
    transform: translateX(4px);
    text-decoration: none;
}

.cli-sommaire-link.active {
    background: #2D2B7F;
    border-color: #2D2B7F;
    color: #ffffff;
}

.cli-sommaire-link.active:hover {
    background: #2D2B7F;
    border-color: #2D2B7F;
}

/* === ÉLÉMENTS DU LIEN === */
.cli-sommaire-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e9ecef;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cli-sommaire-link:hover .cli-sommaire-numero {
    background: #2D2B7F;
    color: #ffffff;
}

.cli-sommaire-link.active .cli-sommaire-numero {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.cli-sommaire-texte {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

/* === SECTIONS ANCRÉES === */
.cli-section-ancree {
    scroll-margin-top: 100px; /* Ajuster selon la hauteur du header */
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .cli-sommaire-wrapper {
        padding: 20px;
        margin: 24px auto;
    }
    
    .cli-sommaire-titre {
        font-size: 18px;
    }
    
    .cli-sommaire-link {
        padding: 10px 12px;
    }
    
    .cli-sommaire-numero {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-right: 10px;
    }
    
    .cli-sommaire-texte {
        font-size: 14px;
    }
}

/* === VARIANTE COMPACTE (optionnelle) === */
.cli-sommaire-wrapper.compact {
    padding: 16px;
    margin: 24px 0;
}

.cli-sommaire-wrapper.compact .cli-sommaire-titre {
    font-size: 18px;
    margin-bottom: 12px;
}

.cli-sommaire-wrapper.compact .cli-sommaire-link {
    padding: 8px 12px;
}

.cli-sommaire-wrapper.compact .cli-sommaire-numero {
    width: 24px;
    height: 24px;
    font-size: 13px;
}

.cli-sommaire-wrapper.compact .cli-sommaire-texte {
    font-size: 14px;
}

/* === VARIANTE STICKY (optionnelle) === */
.cli-sommaire-wrapper.sticky {
    position: sticky;
    top: 120px; /* Ajuster selon votre layout */
    z-index: 100;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cli-sommaire-wrapper {
    animation: fadeIn 0.4s ease;
}

/* === PRINT === */
@media print {
    .cli-sommaire-wrapper {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .cli-sommaire-link:hover {
        transform: none;
    }
}
