/* ============================================
   STYLES POUR LA PAGE D'ACCUEIL
   ============================================ */

/* CORRECTION : Styles pour stabiliser le menu de navigation */
.nav-bar {
    position: relative;
    z-index: 1000;
}

.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 0;
    border-radius: 0 0 5px 5px;
}

/* Éviter les transitions problématiques */
.navbar-nav .nav-link-responsive {
    transition: all 0.2s ease !important;
}

/* Correction spécifique pour le hover sur desktop */
@media (min-width: 992px) {
    .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .navbar-nav .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }
    
    .nav-link-responsive:hover {
        background-color: rgba(255,255,255,0.1) !important;
        transform: none !important;
    }
}

/* Styles pour mobile */
@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none;
        width: 100%;
    }
    
    .nav-item.dropdown.show .dropdown-menu {
        display: block !important;
    }
}

/* Désactiver les transitions problématiques */
.navbar-collapse {
    transition: none !important;
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* --- NAVIGATION RESPONSIVE --- */
.navbar-brand {
    font-size: 0.8rem !important;
}

.nav-link-responsive {
    font-size: 0.75rem !important;
    white-space: nowrap;
    padding: 8px 4px !important;
    transition: all 0.3s ease;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    
}

.dropdown-item {
    font-size: 0.75rem;
    padding: 8px 15px;
    white-space: normal;
}

.nav-register-btn {
    background-color: white;
    border-radius: 4px;
    padding: 0 !important;
    margin-left: 10px;
}

.nav-register-btn .nav-link {
    color: black !important;
    padding: 8px 15px !important;
    font-size: 0.75rem;
}

/* --- SECTIONS PRINCIPALES --- */
.section-title {
    color: #1B1464;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.section-title-alt {
    color: #1B1464;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid #FF9A12;
}

/* --- CONTENU SIMPLIFIÉ --- */
.content-section {
    background: white;
    padding: 50px 0;
}

.simple-text {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
    text-align: justify;
    margin-bottom: 25px;
}

.content-title {
    color: #1B1464;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.content-subtitle {
    color: #1B1464;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* --- CARTES SIMPLES --- */
.simple-card {
    background: white;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.simple-card:hover {
    transform: translateY(-5px);
}

/* --- FORMATIONS CQP --- */
.formation-card {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.formation-badge {
    background: #FF9A12;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.formation-list {
    color: #555;
    padding-left: 20px;
    line-height: 1.8;
}

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

/* --- BOOTCAMPS --- */
.bootcamp-section {
    margin-bottom: 40px;
}

.bootcamp-title {
    color: #1B1464;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.bootcamp-text {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.program-day {
    color: #555;
    margin-bottom: 10px;
    padding-left: 20px;
}

.program-day strong {
    color: #1B1464;
}

/* --- ENTREPRISES --- */
.enterprise-offer {
    margin-bottom: 30px;
}

.offer-title {
    color: #1B1464;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.offer-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.highlight-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* --- BOUTONS --- */
.btn-primary-custom {
    background: #1B1464;
    border: none;
    border-radius: 25px;
    padding: 12px 40px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    color: white;
}

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

.dropdown-menu {
    animation: fadeIn 0.3s ease;
}

/* --- NAVBAR TOGGLER --- */
.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 4px 8px;
}

.navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* --- GRANDS ÉCRANS (min 1400px) --- */
@media (min-width: 1400px) {
    .nav-link-responsive {
        font-size: 0.8rem !important;
        padding: 10px 15px !important;
    }
    
    .navbar-brand {
        font-size: 0.7rem !important;
    }
}

/* --- ÉCRANS MOYENS (max 1199px) --- */
@media (max-width: 1199px) {
    .nav-link-responsive {
        font-size: 0.8rem !important;
        padding: 6px 2px !important;
    }
    
    .dropdown-item {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
}

/* --- TABLETTES (max 991px) --- */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        padding: 15px;
        margin-top: 10px;
        border-radius: 8px;
    }
    
    .nav-link-responsive {
        font-size: 0.9rem;
        padding: 10px 15px !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        white-space: normal;
    }
    
    .nav-link-responsive:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        background: #495057;
        margin: 5px 0;
        border-left: 3px solid #FF9A12;
    }
    
    .dropdown-item {
        color: #fff !important;
        font-size: 0.85rem;
        padding: 8px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .dropdown-item:hover {
        background: #FF9A12;
        color: #000 !important;
    }
    
    .nav-register-btn {
        margin: 15px 0 0 0;
        text-align: center;
    }
    
    .nav-register-btn .nav-link {
        display: block;
        font-size: 0.9rem;
        padding: 12px 20px !important;
    }
    
    .agrement.hide-desktop {
        display: block !important;
        text-align: center;
        margin-bottom: 10px;
    }
}

/* --- MOBILES (max 767px) --- */
@media (max-width: 767px) {
    .nav-link-responsive {
        font-size: 0.85rem;
        padding: 12px 15px !important;
    }
    
    .dropdown-item {
        font-size: 0.8rem;
        padding: 10px 25px;
    }
    
    .navbar-brand {
        font-size: 0.75rem !important;
        text-align: center;
        display: block;
    }
    
    .agrement.hide-desktop p {
        font-size: 0.8rem;
        margin-bottom: 5px !important;
    }
    
    .content-section {
        padding: 30px 0;
    }
    
    .simple-card {
        padding: 20px 15px;
    }
    
    .formation-card {
        padding: 20px;
    }
}

/* --- PETITS MOBILES (max 575px) --- */
@media (max-width: 575px) {
    .nav-link-responsive {
        font-size: 0.8rem;
        padding: 10px 12px !important;
    }
    
    .dropdown-item {
        font-size: 0.75rem;
        padding: 8px 20px;
    }
    
    .navbar-brand {
        font-size: 0.7rem !important;
    }
    
    .nav-register-btn .nav-link {
        font-size: 0.85rem;
        padding: 10px 15px !important;
    }
    
    .btn-primary-custom {
        padding: 10px 30px;
        font-size: 0.9rem;
    }
}

/* --- TRÈS PETITS ÉCRANS (max 400px) --- */
@media (max-width: 400px) {
    .nav-link-responsive {
        font-size: 0.75rem;
        padding: 8px 10px !important;
    }
    
    .navbar-brand {
        font-size: 0.65rem !important;
    }
    
    .agrement.hide-desktop p {
        font-size: 0.75rem;
    }
}

  /* ==== SECTION INTRO (style Alpha Digital) ==== */
    .intro-section {
        background-color: #ffffff;
        overflow: hidden;
    }

    .intro-title {
        font-size: 2.8rem;
        font-weight: 800;
        color: #1B1464;
        line-height: 1.2;
    }

    .intro-title span {
        color: #FF9A12;
    }

    .intro-image {
        width: 100%;
        max-width: 500px;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 6px 25px rgba(0,0,0,0.15);
        transition: transform 0.4s ease, box-shadow 0.4s ease;
    }

    .intro-image:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .content-text p {
        font-size: 1.1rem;
        line-height: 1.8;
        color: #444;
        margin-bottom: 20px;
        text-align: justify;
    }

    .director-name {
        text-align: center;
        padding: 25px 20px;
        background: linear-gradient(135deg, rgba(27, 20, 100, 0.03) 0%, rgba(255, 154, 18, 0.03) 100%);
        border-radius: 8px;
        margin-top: 10px;
    }

    .director-name strong {
        font-size: 1.3rem;
        display: block;
        margin-bottom: 8px;
        color: #1B1464;
    }

    .director-name span {
        color: #666;
        font-size: 1rem;
        font-style: italic;
    }

    /* ==== Responsive ==== */
    @media (max-width: 991px) {
        .intro-title {
            font-size: 2.2rem;
            text-align: center;
        }
        .intro-image {
            max-width: 380px;
            margin-top: 25px;
        }
    }

    @media (max-width: 575px) {
        .intro-title {
            font-size: 1.8rem;
        }
        .intro-image {
            max-width: 280px;
        }
    }

     .formations-optimisees {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 1200px;
        margin: 10px auto;
        padding: 0 20px;
    }

    /* CARD */
    .formation-card-opt {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
        transition: 0.3s;
        cursor: pointer;
        display: flex;
        flex-direction: column;
    }

    .formation-card-opt:hover {
        transform: translateY(-6px);
    }

    /* IMAGE */
    .formation-image-opt {
        height: 180px;
        background-size: cover;
        background-position: center;
    }

    /* CONTENT */
    .formation-content-opt {
        padding: 25px;
    }

    .formation-content-opt h3 {
        color: #020936;
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .formation-content-opt p {
        color: #4b5563;
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .formation-link {
        font-weight: 600;
        color: #020936;
    }

    .formation-link:hover {
        color: #FF9A12;
    }

    .badge-free {
        position: absolute;
        top: 15px;
        right: 15px;
        background: #28a745;
        color: white;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.7rem;
    }

    /* RESPONSIVE */
    @media (max-width: 992px) {
        .formations-optimisees {
            grid-template-columns: repeat(2, 1fr);
        }
    }

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

    /* =========================
    BLOC OPTIONS CLEAN
    ========================= */

    .formations-options {
        grid-column: 1 / -1;
        background: #ffffff;
        margin-top: 10px;
        padding: 0px 30px;
        border-radius: 16px;
        text-align: center;
        box-shadow: 0 6px 25px rgba(0,0,0,0.06);
    }

    .options-title {
        font-size: 1.6rem;
        font-weight: 700;
        color: #020936;
        margin-bottom: 10px;
    }

    .options-subtitle {
        font-size: 1rem;
        color: #4a5568;
        margin-bottom: 25px;
    }

    .options-tags {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .options-tags span {
        background: #f1f5f9;
        padding: 10px 18px;
        border-radius: 30px;
        font-size: 0.95rem;
        font-weight: 600;
        color: #020936;
        transition: all 0.3s ease;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .formations-options {
            padding: 30px 20px;
        }

        .options-title {
            font-size: 1.4rem;
        }

        .options-tags span {
            font-size: 0.9rem;
            padding: 8px 14px;
        }
    }

    #headerCarousel {
        height: 90vh;
        min-height: 600px;
        overflow: hidden;
        position: relative;
    }

    .carousel-inner,
    .carousel-item {
        height: 100%;
    }

    .carousel-image-container {
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    .carousel-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 10s ease;
    }

    .carousel-item:hover .carousel-image-container img {
        transform: scale(1.05);
    }

    .carousel-caption {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        max-width: 1200px;
        padding: 0 20px;
        text-align: center;
        z-index: 2;
    }

    .caption-content {
        background: rgb(3 12 77 / 52%);
        padding: 40px;
        border-radius: 15px;
        backdrop-filter: blur(0px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        animation: fadeInUp 1s ease;
    }

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

    .caption-title {
        color: #FFFFFF;
        font-size: 3.5rem;
        font-weight: 800;
        margin-bottom: 20px;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
        line-height: 1.2;
    }

    .caption-subtitle {
        color: #FF9A12;
        font-size: 1.8rem;
        font-weight: 600;
        margin-bottom: 15px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .caption-text {
        color: #FFFFFF;
        font-size: 1.4rem !important;
        margin-bottom: 30px;
        line-height: 1.6;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    }

    .caption-buttons {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .caption-buttons .btn {
        padding: 15px 35px;
        font-size: 1.2rem;
        font-weight: 600;
        border-radius: 50px;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        border: none;
        min-width: 200px;
    }

    .caption-buttons .btn-primary {
        background: #020936;
        color: white;
    }

    .caption-buttons .btn-success {
        background: #28A745;
        color: white;
    }

    .caption-buttons .btn-warning {
        background: #FF9A12;
        color: white;
    }

    .caption-buttons .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        opacity: 0.9;
    }

    .carousel-indicators {
        bottom: 30px;
    }

    .carousel-indicators li {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        margin: 0 10px;
        background-color: rgba(255, 255, 255, 0.5);
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .carousel-indicators li.active {
        background-color: #020936;
        width: 40px;
        border-radius: 10px;
        border-color: white;
    }

    .carousel-indicators li:hover {
        background-color: #051685;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        top: 50%;
        transform: translateY(-50%);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        opacity: 0.7;
    }

    .carousel-control-prev {
        left: 30px;
    }

    .carousel-control-next {
        right: 30px;
    }

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background: rgba(40, 167, 69, 0.8);
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 40px;
        height: 40px;
    }

    .carousel-item {
        transition: transform 1s ease, opacity 1s ease;
    }

    /* Responsive */
    @media (max-width: 1200px) {
        .caption-title {
            font-size: 3rem;
        }
        
        .caption-text {
            font-size: 1.3rem !important;
        }
    }

    @media (max-width: 992px) {
        #headerCarousel {
            height: 80vh;
            min-height: 500px;
        }
        
        .caption-title {
            font-size: 2.5rem;
        }
        
        .caption-subtitle {
            font-size: 1.5rem !important;
        }
        
        .caption-text {
            font-size: 1.2rem !important;
        }
        
        .caption-content {
            padding: 30px;
        }
        
        .carousel-control-prev,
        .carousel-control-next {
            width: 60px;
            height: 60px;
        }
        
        .carousel-control-prev {
            left: 15px;
        }
        
        .carousel-control-next {
            right: 15px;
        }
    }

    @media (max-width: 768px) {
        #headerCarousel {
            height: 70vh;
            min-height: 400px;
        }
        
        .caption-title {
            font-size: 2rem;
        }
        
        .caption-subtitle {
            font-size: 1.3rem !important;
        }
        
        .caption-text {
            font-size: 1.1rem !important;
        }
        
        .caption-content {
            padding: 25px;
            margin: 0 15px;
        }
        
        .caption-buttons .btn {
            padding: 12px 25px;
            font-size: 1rem;
            min-width: 180px;
        }
        
        .carousel-control-prev,
        .carousel-control-next {
            display: none;
        }
    }

    @media (max-width: 576px) {
        #headerCarousel {
            height: 60vh;
            min-height: 350px;
        }
        
        .caption-title {
            font-size: 1.6rem;
            margin-bottom: 15px;
        }
        
        .caption-subtitle {
            font-size: 1.1rem !important;
            margin-bottom: 10px;
        }
        
        .caption-text {
            font-size: 1rem !important;
            margin-bottom: 20px;
        }
        
        .caption-content {
            padding: 20px;
        }
        
        .caption-buttons {
            flex-direction: column;
            gap: 10px;
        }
        
        .caption-buttons .btn {
            width: 100%;
            min-width: unset;
        }
        
        .carousel-indicators {
            bottom: 15px;
        }
        
        .carousel-indicators li {
            width: 10px;
            height: 10px;
            margin: 0 5px;
        }
        
        .carousel-indicators li.active {
            width: 30px;
        }
    }

    @media (max-width: 360px) {
        #headerCarousel {
            height: 50vh;
            min-height: 300px;
        }
        
        .caption-title {
            font-size: 1.4rem;
        }
        
        .caption-subtitle {
            font-size: 1rem !important;
        }
        
        .caption-text {
            font-size: 0.9rem !important;
        }
    }

     /* =========================
        BLOCS HOME
        ========================= */

        .home-blocks {
            padding: 20px 0;
            background: #f9fafb;
        }

        .block-item {
            margin-bottom: 80px;
        }

        .block-image img {
            width: 100%;
            border-radius: 15px;
            object-fit: cover;
            transition: transform 0.4s ease;
        }

        .block-image img:hover {
            transform: scale(1.03);
        }

        .block-content h2 {
            font-size: 2.2rem;
            font-weight: 700;
            color: #020936;
            margin-bottom: 15px;
        }

        .block-content .subtitle {
            color: #FF9A12;
            font-weight: 600;
            margin-bottom: 15px;
        }

        .block-content p {
            font-size: 1.05rem;
            color: #4b5563;
            line-height: 1.7;
            margin-bottom: 15px;
        }

        .block-buttons {
            margin-top: 20px;
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .block-buttons .btn {
            padding: 12px 25px;
            border-radius: 30px;
            font-weight: 600;
        }

        .block-buttons .btn-primary {
            background: #020936;
            border: none;
        }

        .block-buttons .btn-outline-primary {
            border: 2px solid #020936;
            color: #020936;
        }

        .block-buttons .btn-outline-primary:hover {
            background: #020936;
            color: #fff;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .block-item {
                text-align: center;
            }

            .block-buttons {
                justify-content: center;
            }
        }