/* ==========================
   STYLES POUR LES MODALS - VERSION PROFESSIONNELLE
   ========================== */

.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    backdrop-filter: blur(10px);
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.modal-content {
    position: relative;
    background: linear-gradient(
        145deg,
        rgba(10, 11, 13, 0.85),
        rgba(26, 29, 35, 0.9)
    );
    backdrop-filter: blur(10px);
    margin: 3% auto;
    padding: 0;
    width: 90%;
    max-width: 1400px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    border: 1px solid rgba(224, 67, 67, 0.1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(224, 67, 67, 0.08);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    color: #fff;
    position: fixed;
    top: 30px;
    right: 40px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(224, 67, 67, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 20px rgba(224, 67, 67, 0.4);
    backdrop-filter: blur(10px);
}

.close-modal:hover,
.close-modal:focus {
    background: #E04343;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 30px rgba(224, 67, 67, 0.6);
}

/* Styles du contenu des modals */
.modal-body {
    padding: 60px 50px;
    color: white;
}

/* Box avec image à gauche et texte à droite */
.modal-body .box {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 35px;
    background: linear-gradient(145deg, #12141a, #1e2229);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 50px;
    align-items: start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.modal-body .box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(224, 67, 67, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-body .box img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
}

.modal-body .box div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.modal-body .box h3 {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.7rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #c4cfde 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left;
}

.modal-body .box p {
    color: #c4cfde;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
    opacity: 0.9;
    text-align: left;
}

/* Container avec image et texte */
.modal-body .container {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
}

.modal-body .image-section,
.modal-body .image-section2 {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

.modal-body .image-section::after,
.modal-body .image-section2::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.modal-body .header-image,
.modal-body .image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.modal-body .image-section:hover .image,
.modal-body .image-section2:hover .header-image {
    transform: scale(1.05);
}

.modal-body .content-section,
.modal-body .text-section {
    padding: 30px 0;
}

.modal-body .section-title,
.modal-body h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    font-family: "Poppins", sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.modal-body .section-title::after,
.modal-body h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #E04343 0%, #FFE800 100%);
    border-radius: 2px;
}

.modal-body h2,
.modal-body h3 {
    margin-bottom: 20px;
    font-size: 1.6em;
    line-height: 1.3;
    text-transform: capitalize;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.modal-body .intro-text {
    font-size: 1.15em;
    font-style: italic;
    text-align: justify;
    color: #b4b4b4;
    margin-bottom: 30px;
    line-height: 1.9;
    font-family: 'Titillium Web', sans-serif;
    font-weight: 300;
}

.modal-body .p-text {
    font-size: 1.1em;
    font-style: italic;
    text-align: justify;
    color: #a8a8a8;
    line-height: 1.9;
    margin-bottom: 25px;
    font-family: 'Titillium Web', sans-serif;
    font-weight: 300;
}

.modal-body .main-text {
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    color: #b4a9a9;
    font-family: "Titillium Web", sans-serif;
    font-weight: 300;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border-left: 4px solid #E04343;
    margin-top: 20px;
}

.modal-body strong {
    font-size: 1.05em;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.8;
    font-family: "Titillium Web", sans-serif;
    font-weight: 300;
    color: #b4a9a9;
}

/* Scrollbar personnalisée pour les modals */
.modal-content::-webkit-scrollbar {
    width: 12px;
}

.modal-content::-webkit-scrollbar-track {
    background: #0a0b0d;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #E04343 0%, #c43636 100%);
    border-radius: 10px;
    border: 2px solid #0a0b0d;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFE800 0%, #d4c500 100%);
}

/* Responsive pour les modals */
@media screen and (max-width: 1200px) {
    .modal-body .box {
        grid-template-columns: 200px 1fr;
        gap: 30px;
        padding: 35px;
    }
    
    .modal-body .box img {
        max-width: 200px;
    }
}

@media screen and (max-width: 991px) {
    .modal-content {
        width: 95%;
        margin: 4% auto;
    }
    
    .modal-body {
        padding: 40px 30px;
    }
    
    .modal-body .box {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px;
    }
    
    .modal-body .box img {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .modal-body .box h3 {
        text-align: center;
    }
    
    .modal-body .box p {
        text-align: justify;
    }
    
    .close-modal {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .modal-body .section-title,
    .modal-body h1 {
        font-size: 1.8em;
    }
}

@media screen and (max-width: 767px) {
    .modal-body {
        padding: 30px 20px;
    }
    
    .modal-body .box {
        padding: 25px;
    }
    
    .modal-body .section-title,
    .modal-body h1 {
        font-size: 1.5em;
    }
    
    .modal-body .intro-text,
    .modal-body .p-text {
        font-size: 1em;
    }
    
    .modal-body .main-text {
        padding: 20px;
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 576px) {
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-body {
        padding: 25px 15px;
    }
    
    .modal-body .box {
        padding: 20px;
        gap: 20px;
    }
    
    .modal-body .box img {
        max-width: 100%;
    }
    
    .modal-body .box h3 {
        font-size: 1.4rem;
        text-align: center;
    }
    
    .modal-body .box p {
        font-size: 0.95rem;
        text-align: justify;
    }
    
    .modal-body .section-title,
    .modal-body h1 {
        font-size: 1.3em;
    }
    
    .modal-body .intro-text,
    .modal-body .p-text {
        font-size: 0.9em;
    }
    
    .modal-body .main-text {
        font-size: 0.9rem;
        padding: 15px;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}