.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 2.5rem 3rem;
    border-radius: 30px;
    width: 600px;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: white;
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: left;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.6rem;
    margin-left: 5px;
}

.modal-content input[type="email"],
.modal-content select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    border-radius: 15px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.modal-content input[type="email"]:focus,
.modal-content select:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.modal-content select option {
    background-color: #111;
    color: white;
}

/* Option Chips Styling */
.option-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.option-chip {
    position: relative;
    cursor: pointer;
}

.option-chip input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.option-chip .chip-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
}

.option-chip:hover .chip-content {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.option-chip input:checked + .chip-content {
    background: white;
    color: black;
    border-color: white;
    font-weight: 600;
}

.submit-details {
    width: 100%;
    background: white;
    color: black;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.submit-details:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
}

/* 🎨 Feedback de validation élégant */
.modal-body .form-group.has-error label {
    color: #ff6b6b !important;
    opacity: 1 !important;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
}

.modal-body .form-group.has-error .chip-content {
    border: 1.5px solid #ff6b6b !important;
    background: rgba(255, 107, 107, 0.08) !important;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
}

.shake {
    animation: shakeAnim 0.5s ease-in-out both;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Message de succès */
.success-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.6s ease forwards;
}

.success-view h2 {
    margin-bottom: 1.5rem;
}

.success-view p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
}

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



@media (max-width: 600px) {
    .option-group {
        grid-template-columns: 1fr;
    }
    .modal-overlay {
        align-items: flex-end; 
    }
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%; 
        max-height: 100dvh; 
        border-radius: 0; 
        padding: 1.5rem;
        transform: translateY(100%);
        display: flex;
        flex-direction: column;
    }
    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
    .modal-content h2 {
        font-size: 1.6rem;
        margin-top: 2rem; 
        margin-bottom: 1.5rem;
        flex-shrink: 0; 
    }
    .modal-body {
        padding-bottom: 1rem;
        overflow-y: auto; 
        flex: 1; 
    }
    .submit-details {
        margin-top: 1rem;
        padding: 18px;
        flex-shrink: 0; 
    }
    .success-view {
        padding: 3rem 1rem;
    }
    .close-modal {
        top: 15px;
        right: 15px;
        background: rgba(255,255,255,0.1);
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .modal-content input[type="email"],
    .modal-content select {
        font-size: 16px; 
    }
}