/**
 * PROGRAMME PAGES IMPROVEMENTS
 * =============================
 * Améliorations visuelles pour les pages de programmes
 * Garde toutes les couleurs et la charte graphique
 * Focus sur la disposition, l'espacement et la hiérarchie visuelle
 */

/* ========================================================= */
/* LAYOUT GÉNÉRAL AMÉLIORÉ                                   */
/* ========================================================= */

/* Container principal avec padding amélioré */
.page-container-px {
    background-color: #ffffff;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
}

/* Contenu principal - largeur optimisée */
.main-content-px {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 2vw, 2rem);
}

/* ========================================================= */
/* HIÉRARCHIE TYPOGRAPHIQUE AMÉLIORÉE                       */
/* ========================================================= */

/* Titre principal (H1) avec accent visuel */
.main-content-px h1 {
    font-family: 'Roboto Condensed', sans-serif;
    color: var(--accent-green);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    padding-bottom: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 1px;
    line-height: 1.2;
}

/* Titres H2 avec espacement optimisé */
.page-container-px .main-content-px h2 {
    font-family: 'Roboto Condensed', sans-serif;
    color: #000000;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.3;
    position: relative;
    padding-left: clamp(0.8rem, 1.5vw, 1.2rem);
}

/* Accent visuel pour les H2 */
.page-container-px .main-content-px h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: var(--accent-green);
    border-radius: 2px;
}

/* Titres H3 */
.page-container-px .main-content-px h3 {
    font-family: 'Roboto Condensed', sans-serif;
    color: #000000;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin-top: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
    line-height: 1.4;
}

/* ========================================================= */
/* SECTIONS DE CONTENU AMÉLIORÉES                           */
/* ========================================================= */

/* Content section avec carte visuelle */
.content-section {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1.5rem, 3vw, 2.5rem) 0; /* Horizontal padding set to 0 */
    background-color: #ffffff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Hover effect sur les sections */
.content-section:hover {
    background-color: #ffffff;
}

/* Première section sans background pour effet de variété */
.content-section:first-of-type {
    background-color: #ffffff;
    padding: 0; /* Reset all padding for first type to ensure alignment */
}

.content-section:first-of-type:hover {
    background-color: #ffffff;
}

/* ========================================================= */
/* SECTION HEADER ACTION AMÉLIORÉ                           */
/* ========================================================= */

.section-header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    padding: clamp(1rem, 2vw, 1.5rem) 0; /* Horizontal padding set to 0 */
    background-color: #ffffff;
    border-radius: 6px;
}

.section-header-action h2 {
    margin: 0;
    padding: 0;
    max-width: 70%;
    flex: 1;
}

.section-header-action h2::before {
    display: none;
}

/* ========================================================= */
/* PARAGRAPHES ET TEXTES                                     */
/* ========================================================= */

.page-container-px .main-content-px p {
    color: #212529;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.8;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    text-align: left;
}

/* Premier paragraphe après un titre - légèrement plus grand */
.page-container-px .main-content-px h1 + p,
.page-container-px .main-content-px h2 + p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #333333;
    line-height: 1.9;
}

/* Strong dans les paragraphes */
.page-container-px .main-content-px p strong {
    color: #000000;
    font-weight: 600;
}

/* ========================================================= */
/* LISTES AMÉLIORÉES                                         */
/* ========================================================= */

.styled-list {
    list-style: none;
    padding-left: 0;
    margin-top: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.styled-list li {
    position: relative;
    padding-left: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
    color: #212529;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.7;
    text-align: left;
}

.styled-list li::before {
    content: "●";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-green);
    font-size: 1.5em;
    line-height: 1;
}

.styled-list li strong {
    color: #000000;
    font-weight: 600;
}

/* ========================================================= */
/* SIDEBAR NAVIGATION AMÉLIORÉE                              */
/* ========================================================= */

.sidebar-nav-px {
    position: sticky;
    top: 120px;
    padding: clamp(1.5rem, 3vw, 2rem) 0; /* Horizontal padding set to 0 */
    background-color: #ffffff;
    border-radius: 4px;
}

.sidebar-nav-px .nav-item {
    margin-bottom: clamp(0.3rem, 0.8vw, 0.5rem);
}

.sidebar-nav-px .nav-link {
    display: block;
    color: #495057;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 500;
    padding: clamp(0.7rem, 1.5vw, 1rem) clamp(1rem, 2vw, 1.5rem);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.sidebar-nav-px .nav-link:hover {
    color: #000000;
    background-color: rgba(69, 75, 27, 0.08);
    border-left-color: var(--accent-green);
    padding-left: clamp(1.3rem, 2.5vw, 1.8rem);
}

.sidebar-nav-px .nav-link.active {
    color: #000000;
    font-weight: 600;
    background-color: rgba(69, 75, 27, 0.12);
    border-left-color: var(--accent-green);
    border-left-width: 4px;
}

/* ========================================================= */
/* ========================================================= */
/* RESPONSIVE MOBILE OPTIMISÉ                                */
/* ========================================================= */

@media (max-width: 991px) {
    /* Container avec padding réduit sur mobile */
    .page-container-px {
        padding: clamp(1.5rem, 4vw, 2rem) clamp(0.8rem, 2vw, 1rem);
    }

    /* Contenu principal pleine largeur */
    .main-content-px {
        width: 100%;
        padding: 0 clamp(0.5rem, 1.5vw, 1rem);
    }

    /* Titre H1 mobile */
    .main-content-px h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: clamp(1.5rem, 3vw, 2rem);
        padding-bottom: clamp(0.8rem, 1.5vw, 1rem);
    }

    /* H2 mobile */
    .page-container-px .main-content-px h2 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
        margin-top: clamp(2rem, 4vw, 2.5rem);
    }

    /* Content sections mobile */
    .content-section {
        padding: clamp(1rem, 2.5vw, 1.5rem);
        margin-bottom: clamp(2rem, 4vw, 3rem);
    }

    .content-section:hover {
        background-color: #ffffff;
    }

    /* Section header action en colonne sur mobile */
    .section-header-action {
        flex-direction: column;
        align-items: flex-start;
        padding: clamp(1rem, 2vw, 1.2rem);
    }

    .section-header-action h2 {
        max-width: 100%;
        margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
    }

    /* Sidebar mobile */
    .sidebar-nav-px {
        position: static;
        margin-bottom: clamp(2rem, 4vw, 2.5rem);
        padding: clamp(1rem, 2.5vw, 1.5rem);
    }

    .sidebar-nav-px .nav-link {
        padding: clamp(0.6rem, 1.2vw, 0.8rem) clamp(0.8rem, 1.5vw, 1rem);
    }

    .sidebar-nav-px .nav-link:hover {
        padding-left: clamp(1rem, 2vw, 1.2rem);
    }

    /* Listes mobile */
    .styled-list li {
        font-size: clamp(0.9rem, 2vw, 1rem);
        padding-left: clamp(1.8rem, 3.5vw, 2.2rem);
    }

    /* Paragraphes mobile */
    .page-container-px .main-content-px p {
        font-size: clamp(0.9rem, 2vw, 1rem);
        line-height: 1.7;
        text-align: left;
    }
}

/* ========================================================= */
/* TABLETTE (768px - 991px)                                  */
/* ========================================================= */

@media (min-width: 768px) and (max-width: 991px) {
    .main-content-px {
        max-width: 720px;
    }

    .content-section {
        padding: clamp(1.5rem, 2.5vw, 2rem);
    }
}

/* ========================================================= */
/* DESKTOP LARGE (> 1200px)                                  */
/* ========================================================= */

@media (min-width: 1200px) {
    .page-container-px {
        padding: clamp(3rem, 5vw, 5rem) clamp(2rem, 4vw, 4rem);
    }

    .main-content-px {
        max-width: 1000px;
    }

    .content-section {
        padding: clamp(2rem, 3vw, 3rem);
    }
}

/* ========================================================= */
/* AMÉLIORATIONS VISUELLES SUBTILES                         */
/* ========================================================= */

/* Animation douce au scroll pour les sections */
@media (prefers-reduced-motion: no-preference) {
    .content-section {
        animation: fadeInUp 0.6s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Focus visible pour accessibilité */
.sidebar-nav-px .nav-link:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
    background-color: rgba(69, 75, 27, 0.15);
}

/* ========================================================= */
/* PRINT STYLES                                              */
/* ========================================================= */

@media print {
    .content-section {
        background-color: transparent;
        page-break-inside: avoid;
    }

    .sidebar-nav-px {
        display: none;
    }

    .section-header-action {
        border: none;
    }
}
