
:root {
    --main-color: #d30d0d;
    --text-color: #141622;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --hover-color: #b00b0b;
    --border-color: #e1e4e8;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* Hero Banner — bandeau épreuves (compact, nom en rouge, 1 ligne) */
.hero-banner {
    position: relative;
    padding: 1.85rem 1rem 1.95rem;
    text-align: center;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, #1a1d2b 0%, var(--text-color, #141622) 100%);
    color: #fff;
    overflow: hidden;
}

.hero-banner::before {
    display: none;
    content: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(8.5rem, 42%);
    height: 3px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--main-color, #d30d0d), transparent);
    border-radius: 999px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.hero-banner .hero-kicker {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 0.65rem !important;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(211, 13, 13, 0.12);
    border: 1px solid rgba(211, 13, 13, 0.35);
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 0.72rem !important;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.2 !important;
}

.hero-banner .hero-kicker i {
    color: var(--main-color, #d30d0d);
    font-size: 0.95rem;
}

.hero-banner .hero-skill-title,
.hero-banner h1.hero-skill-title,
section.hero-banner h1.hero-skill-title,
body .hero-banner h1.hero-skill-title {
    margin: 0 0 0.4rem !important;
    padding-bottom: 0 !important;
    color: #d30d0d !important;
    -webkit-text-fill-color: #d30d0d !important;
    font-size: clamp(1.2rem, 5vw, 1.95rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    line-height: 1.15 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-shadow: none;
    text-transform: none !important;
}

.hero-banner .hero-skill-title::before,
.hero-banner h1.hero-skill-title::before,
section.hero-banner h1.hero-skill-title::before,
body .hero-banner h1.hero-skill-title::before {
    display: none !important;
    content: none !important;
    border: 0 !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

.hero-banner .hero-motto {
    margin: 0 0 0.6rem !important;
    color: #ffffff !important;
    font-size: clamp(0.95rem, 2.4vw, 1.2rem) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.hero-banner .hero-motto em,
.hero-banner .hero-motto span {
    color: var(--main-color, #d30d0d);
    font-style: normal;
    font-weight: 800;
}

.hero-banner .hero-lead,
.hero-banner p.hero-lead {
    margin: 0 auto !important;
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: clamp(0.8rem, 2vw, 0.95rem) !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
}

/* Compat anciennes pages / lecteur */
.hero-banner h4 {
    font-size: clamp(0.95rem, 3.5vw, 1.15rem) !important;
    margin: 0 0 0.4rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--main-color, #d30d0d) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.hero-banner h4 i {
    margin-right: 0;
    color: var(--main-color);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.hero-banner h1:not(.hero-skill-title) {
    font-size: clamp(1.2rem, 4.5vw, 1.75rem) !important;
    margin: 0 0 0.45rem !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
}

.hero-banner h1 span {
    color: var(--main-color);
}

.hero-banner > .hero-content > p:not(.hero-kicker):not(.hero-motto):not(.hero-lead) {
    font-size: clamp(0.8rem, 2vw, 0.95rem) !important;
    opacity: 0.85;
    max-width: 32rem;
    margin: 0 auto !important;
    line-height: 1.45 !important;
}

/* Bouton Consigne */
.consigne-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.35rem;
}

.consigne-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    min-height: 42px;
    white-space: nowrap;
}

.consigne-btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(211, 13, 13, 0.3);
}

.consigne-btn.is-active {
    background-color: #141622;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(211, 13, 13, 0.4), 0 6px 15px rgba(20, 22, 34, 0.35);
}

/* Modal Consigne */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--main-color);
}

.modal-title {
    color: var(--main-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.modal-text {
    line-height: 1.8;
    margin-bottom: 15px;
}

.modal-list {
    margin-left: 20px;
    margin-bottom: 20px;
}

.modal-list li {
    margin-bottom: 10px;
}

/* Section Épreuve — EE / EO listes : cadré avec marges latérales */
.section_epreuve {
    max-width: 1180px;
    margin: 0 auto 60px;
    padding: 0 clamp(1rem, 4vw, 1.75rem);
    box-sizing: border-box;
    width: 100%;
}

.row_arrangement {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 40px;
}

.column_arrangement {
    background: var(--text-color);
    color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--main-color);
    position: relative;
    overflow: hidden;
}

button.column_arrangement {
    color: #fff !important;
}

.column_arrangement.non_valide{
    background: #242323;
}

.column_arrangement::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(211, 13, 13, 0.05), transparent);
    transition: var(--transition);
}

.column_arrangement:hover::before {
    left: 100%;
}

.column_arrangement:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(211, 13, 13, 0.15);
}

.column_arrangement h5,
.column_arrangement a h5 {
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 600;
    flex-grow: 1;
    transition: var(--transition);
    padding-right: 15px;
    margin: 0;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

#ee-exams-list .column_arrangement .ee-exam-title,
#eo-exams-list .column_arrangement .ee-exam-title {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.column_arrangement:hover h5,
.column_arrangement:hover a h5 {
    color: var(--main-color);
}

#ee-exams-list .column_arrangement:hover .ee-exam-title,
#eo-exams-list .column_arrangement:hover .ee-exam-title {
    color: var(--main-color) !important;
    -webkit-text-fill-color: var(--main-color) !important;
}

.column_arrangement i {
    color: var(--main-color);
    font-size: 1.8rem;
    flex-shrink: 0;
}

.column_arrangement .bx.bx-lock-open{
    color: rgb(6, 241, 6);
}


/* Bouton scroll */
.scrollbtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--main-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
}

.scrollbtn.show {
    opacity: 1;
    visibility: visible;
}

.scrollbtn:hover {
    background: var(--hover-color);
    transform: translateY(-5px);
}

@media (max-width: 900px) {
    .hero-banner {
        padding: 1.35rem 0.85rem;
        margin-bottom: 1.05rem;
    }

    .consigne-container {
        margin: 0.7rem 0 1.25rem;
        gap: 0.5rem;
    }

}

@media (max-width: 992px) {
    .row_arrangement {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .row_arrangement {
        grid-template-columns: 1fr;
    }

    .hero-banner {
        padding: 1.15rem 0.75rem;
        margin-bottom: 0.9rem;
    }

    .hero-banner .hero-skill-title,
    .hero-banner h1.hero-skill-title {
        font-size: clamp(1.05rem, 5.5vw, 1.45rem) !important;
    }

    .consigne-container {
        margin: 0.55rem 0 1rem;
    }
}

/* Consignes CE / CO : en-tête compact (propre desktop + mobile) */
#ce-consignes-section > header,
#co-consignes-section > header {
    background: #141622;
    color: #fff;
    padding: 1.15rem 1.1rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 1.15rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

#ce-consignes-section > header::before,
#co-consignes-section > header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.08)"/></svg>');
    background-size: cover;
    pointer-events: none;
}

#ce-consignes-section > header .header-content,
#co-consignes-section > header .header-content {
    position: relative;
    max-width: 36rem;
    margin: 0 auto;
}

#ce-consignes-section > header h1,
#co-consignes-section > header h1 {
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    margin: 0 0 0.45rem;
    text-shadow: none;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #fff !important;
}

#ce-consignes-section > header h1::after,
#co-consignes-section > header h1::after {
    content: '';
    display: block;
    width: 2.4rem;
    height: 3px;
    margin: 0.55rem auto 0;
    border-radius: 999px;
    background: #d30d0d;
}

#ce-consignes-section > header .subtitle,
#co-consignes-section > header .subtitle,
#ce-consignes-section > header p,
#co-consignes-section > header p {
    margin: 0;
    font-size: clamp(0.8rem, 1.6vw, 0.92rem);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 500;
}

@media (max-width: 992px) {
    #ce-consignes-section > header,
    #co-consignes-section > header {
        padding: 0.95rem 0.95rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    #ce-consignes-section > header h1,
    #co-consignes-section > header h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    #ce-consignes-section > header,
    #co-consignes-section > header {
        padding: 0.75rem 0.8rem;
        margin-bottom: 0.85rem;
        border-radius: 10px;
    }

    #ce-consignes-section > header h1,
    #co-consignes-section > header h1 {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
    }

    #ce-consignes-section > header h1::after,
    #co-consignes-section > header h1::after {
        width: 1.85rem;
        height: 2.5px;
        margin-top: 0.4rem;
    }

    #ce-consignes-section > header .subtitle,
    #co-consignes-section > header .subtitle,
    #ce-consignes-section > header p,
    #co-consignes-section > header p {
        font-size: 0.78rem;
        line-height: 1.35;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        padding: 1rem 0.65rem 1.1rem;
        margin-bottom: 0.75rem;
    }

    .hero-banner .hero-kicker {
        font-size: 0.68rem !important;
        padding: 0.22rem 0.55rem;
        margin-bottom: 0.4rem !important;
    }

    .hero-banner .hero-skill-title,
    .hero-banner h1.hero-skill-title {
        font-size: clamp(1rem, 5.8vw, 1.28rem) !important;
        margin-bottom: 0.25rem !important;
    }

    .hero-banner .hero-motto {
        font-size: 0.92rem !important;
        margin-bottom: 0.4rem !important;
    }

    .hero-banner .hero-lead {
        font-size: 0.78rem !important;
    }

    .consigne-container {
        margin: 0.45rem 0 0.9rem;
        gap: 0.4rem;
    }

    .section_epreuve {
        padding: 0 15px;
    }

    .column_arrangement {
        padding: 20px;
    }

    .consigne-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.85rem;
        min-width: 0;
        justify-content: center;
    }
}
