/* ==========================================================================
   1. RESET GLOBAL & COULEUR DE FOND BLANC PUR
   ========================================================================== */
* {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0px !important;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #333333;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    margin: 0 auto;
}

/* ==========================================================================
   2. EN-TÊTE FIXE PERSISTANT
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 300;
    background: transparent;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 21, 177, 0.85) 0%, rgba(0, 21, 177, 0.4) 70%, transparent 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
}

.header-container {
    width: 100%;
    padding: 0 10px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header.hide-header {
    transform: translateY(-100%);
}

.header.sticky-white {
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(0);
}
.header.sticky-white::before {
    opacity: 0;
}
.header.sticky-white .brand-name {
    color: #333333;
}
.header.sticky-white .hamburger-line {
    background-color: #333333;
}

.header.force-visible-validation {
    background-color: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(0) !important;
}
.header.force-visible-validation::before {
    opacity: 1 !important;
    background: linear-gradient(to bottom, rgba(0, 21, 177, 0.9) 0%, rgba(0, 21, 177, 0.7) 100%) !important;
}

.logo-and-name {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-container .logo {
    height: 32px;
    width: auto;
    display: block;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.right-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
}

.mobile-menu-toggle {
    background: transparent;
    border: none;
    width: 24px;
    height: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: absolute;
    z-index: 310;
    transition: opacity 0.15s ease;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

.close-menu-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 320;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.close-icon-circle {
    width: 32px;
    height: 32px;
    border: 2px solid #333333;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333333;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.header.menu-open-header .mobile-menu-toggle {
    opacity: 0;
    pointer-events: none;
}
.header.menu-open-header .close-menu-btn {
    opacity: 1;
    pointer-events: auto;
}
.header.menu-open-header {
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(0) !important;
}
.header.menu-open-header::before {
    opacity: 0 !important;
}

/* ==========================================================================
   3. RIDEAU DE NAVIGATION
   ========================================================================== */
.mobile-nav-link.active-link {
    color: #0015b1 !important;
    text-decoration: underline !important;
}

@media (max-width: 767px) {
    .mobile-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #ffffff;
        z-index: 150;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .mobile-nav.active { transform: translateY(0); }
    .mobile-nav-links { list-style: none; text-align: center; }
    .mobile-nav-links li { margin: 20px 0; }
    .mobile-nav-link { font-family: 'Playfair Display', serif; color: #333333; font-size: 1.8rem; text-decoration: none; font-weight: bold; }
}

@media (min-width: 768px) {
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 60px;
        background-color: #ffffff;
        box-shadow: 0 2px 15px rgba(0,0,0,0.05);
        z-index: 150;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .mobile-nav.active { transform: translateX(0); }
    .mobile-nav-links { list-style: none; display: flex; flex-direction: row; }
    .mobile-nav-links li { margin: 0 20px; }
    .mobile-nav-link { font-family: 'Playfair Display', serif; color: #333333; font-size: 1rem; font-weight: 600; text-decoration: none; line-height: 60px; }
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
@keyframes heroMoveUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.prepa-hero {
    background-image: url('../images/prepa1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 10px 0;
    position: relative;
}

.hero-fume-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0, 21, 177, 0.8) 0%, rgba(0, 21, 177, 0.3) 40%, rgba(33, 173, 35, 0.4) 70%, rgba(33, 173, 35, 0.85) 100%);
}

.prepa-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    animation: heroMoveUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.prepa-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
@media (min-width: 768px) {
    .prepa-hero-title { font-size: 4rem; }
}

.prepa-hero-subtitle {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prepa-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.prepa-stat { display: flex; flex-direction: column; align-items: center; }
.prepa-stat-number.hero-exam-text {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.prepa-stat-divider { width: 1px; height: 35px; background: rgba(255,255,255,0.3); }

.prepa-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #0015b1;
    text-decoration: none;
    padding: 0.9rem 2rem;
    font-weight: 700;
    font-size: 0.95rem;
}

/* ==========================================================================
   5. SECTION CHOIX
   ========================================================================== */
.prepa-choix { padding: 3rem 0; background-color: #ffffff; }

.exam-choix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 1.5rem;
}

.exam-choix-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    position: relative;
    display: flex;
    flex-direction: column;
}
.exam-choix-card.featured { border: 2px solid #21ad23; }

.exam-choix-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: #21ad23;
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.exam-choix-header { padding: 1rem 0.8rem; text-align: center; color: white; }
.exam-choix-header.bepc,
.exam-choix-header.bac {
    background: linear-gradient(135deg, #0015b1 0%, #21ad23 100%);
}
.exam-choix-icon { font-size: 1.4rem; margin-bottom: 0.2rem; opacity: 0.9; }
.exam-choix-title { font-size: 1.4rem; font-weight: 800; }
.exam-choix-subtitle { font-size: 0.75rem; opacity: 0.85; margin-top: 0.1rem; }

.exam-choix-body { padding: 1rem 1rem; text-align: center; flex-grow: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.exam-choix-price { margin-bottom: 0.1rem; }
.price-amount { font-size: 1.8rem; font-weight: 800; color: #0015b1; }
.price-currency { font-size: 0.85rem; font-weight: 600; color: #333333; }
.price-desc { font-size: 0.8rem; color: #666666; margin-bottom: 0.5rem; }

.exam-choix-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem;
    text-decoration: none;
    font-weight: 700;
    color: white;
    margin-top: auto;
    background: #21ad23;
}
.exam-choix-note { font-size: 0.7rem; color: #888888; margin-top: 0.4rem; }

.already-paid { text-align: center; margin-top: 1.5rem; padding: 0.8rem; border: 1px dashed #e5e7eb; }
.already-paid-text { font-size: 0.8rem; color: #555555; margin-bottom: 0.3rem; }
.already-paid-link { display: inline-flex; align-items: center; gap: 6px; color: #0015b1; text-decoration: none; font-weight: 700; font-size: 0.8rem; }

/* ==========================================================================
   6. SECTION ÉTAPES
   ========================================================================== */
.prepa-steps { padding: 3rem 0; background-color: #ffffff; }
.section-header { text-align: center; margin-bottom: 2rem; padding: 0 10px; }
.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 0.2rem;
    display: inline-block;
    position: relative;
    text-decoration: underline !important;
}
.section-subtitle { color: #666666; font-size: 0.9rem; margin-top: 0.4rem; }

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

.step-item {
    background: #ffffff;
    padding: 1.5rem;
    border: 1px solid #e5e7eb !important;
    display: flex;
    align-items: center;
    gap: 15px;
}
.step-num {
    width: 36px;
    height: 36px;
    background: #0015b1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    border-radius: 50% !important;
}
.step-content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; color: #111111; }
.step-content p { font-size: 0.85rem; color: #666666; line-height: 1.5; }

/* ==========================================================================
   7. STYLES POUR FORMULAIRES (PAIEMENT, ACCÈS DIRECT, ATTENTE, SUJETS)
   ========================================================================== */
.dynamic-form-section {
    padding: 100px 10px 60px;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
}

.form-wrapper-centered {
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.form-custom-header {
    padding: 1.5rem 1rem;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #0015b1 0%, #21ad23 100%);
}

.form-custom-body {
    padding: 2rem 1.5rem;
}

.instruction-text-bold {
    font-size: 1.05rem;
    font-weight: 700;
    color: #000000 !important;
    text-align: center;
    margin-bottom: 1.8rem;
}

.input-container-custom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.label-custom {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333333;
}

.input-custom {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid #cccccc;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #111111;
}

.form-actions-custom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: #21ad23;
    color: white;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}
.action-btn-submit:hover {
    opacity: 0.9;
}

.action-btn-cancel {
    width: 100%;
    padding: 0.85rem;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.action-btn-cancel:hover {
    background: #e5e7eb;
}

/* ==========================================================================
   7b. STYLES SPÉCIFIQUES POUR SECTION ATTENTE (améliorée)
   ========================================================================== */
#sectionAttente .form-wrapper-centered {
    max-width: 550px;
}

#sectionAttente .instruction-text-bold {
    color: #0015b1 !important;
    font-size: 1.1rem;
}

/* Note info — icône inline, pas de conteneur */
.attente-info-box {
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    text-align: left;
    border-radius: 0 !important;
}
.attente-info-box p {
    font-size: 0.84rem;
    color: #444;
    line-height: 1.5;
    margin: 0;
}
.attente-info-box p .info-icon-inline {
    color: #9ca3af;
    font-size: 0.82rem;
    margin-right: 0.3rem;
    vertical-align: middle;
}

/* ==========================================================================
   7c. STYLES SPÉCIFIQUES POUR LA PAGE SUJETS
   ========================================================================== */
#sectionSujets .container {
    max-width: 800px;
}

#sectionSujets .exam-choix-card {
    margin-bottom: 1rem;
}

#sectionSujets .exam-choix-header {
    background: #111111 !important;
}

#sectionSujets .exam-choix-btn {
    background: #21ad23;
}

/* Titre des matières sur la page sujets */
.matiere-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0015b1;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* ==========================================================================
   8. PIED DE PAGE
   ========================================================================== */
.footer {
    background: #ffffff;
    border-top: 1px solid #d0d0d0;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}
@media (min-width: 768px) {
    .footer-container { grid-template-columns: repeat(3, 1fr); text-align: left; }
}

.contact-section, .links-section, .company-section { padding: 0.8rem; }

.contact-title, .links-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}
.contact-title::after, .links-title::after {
    content: '';
    position: absolute;
    bottom: -0.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #0015b1;
}
@media (min-width: 768px) {
    .contact-title::after, .links-title::after { left: 0; transform: none; }
}

.contact-info { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
}
@media (min-width: 768px) { .contact-item { justify-content: flex-start; } }
.contact-icon { color: #0015b1; font-size: 1rem; width: 20px; text-align: center; }
.contact-text { color: #4a4a4a; font-size: 0.9rem; }

.footer-links { display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
@media (min-width: 768px) { .footer-links { align-items: flex-start; } }
.footer-link {
    color: #4a4a4a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer-link:hover { color: #0015b1; }

.company-logos {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
@media (min-width: 768px) { .company-logos { justify-content: flex-start; } }
.company-logo { height: 45px; width: auto; object-fit: contain; }
.company-text { color: #4a4a4a; font-size: 0.85rem; }

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #d0d0d0;
    text-align: center;
}
.footer-bottom p { color: #4a4a4a; font-size: 0.85rem; }

/* ---- Grille accès direct + sujets gratuits ---- */
.already-paid-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 0.6rem;
}
@media (min-width: 768px) {
    .already-paid-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .already-paid-grid .already-paid {
        margin-top: 0;
    }
}
.gratuits-card { border-color: #21ad23 !important; }
.gratuits-link { color: #21ad23 !important; }
.gratuits-link:hover { color: #0015b1 !important; }

/* ====================================================
   Compact pour petits écrans : 4 cartes visibles
   au premier coup d'oeil apres scroll vers #choisir
   ==================================================== */
@media (max-width: 500px) {
    .prepa-choix { padding: 1rem 0 1.5rem; }
    .exam-choix-grid { gap: 10px; margin-bottom: 0.5rem; }
    .exam-choix-header { padding: 0.55rem 0.8rem; }
    .exam-choix-body { padding: 0.55rem 0.8rem; gap: 0.1rem; }
    .price-desc { margin-bottom: 0.15rem; }
    .exam-choix-btn { padding: 0.45rem 0.7rem; }
    .exam-choix-note { margin-top: 0.1rem; }
    .already-paid-grid { margin-top: 0.4rem; gap: 0.3rem; }
    .already-paid { margin-top: 0 !important; padding: 0.45rem 0.8rem; }
}