/* ============================================================
   DESIGN SYSTEM SDEPEND - POPUP MODAL
   ============================================================ */

/* 1. Conteneur Global */
/* 1. On permet au conteneur noir de scroller si le contenu dépasse */
/* Le conteneur (le fond noir derrière le popup) */
.custom-modal {
    display: none; 
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    /* On utilise RGBA pour que SEUL le fond soit transparent, pas le contenu */
    background-color: rgba(10, 29, 55, 0.8) !important; 
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

/* La boîte du formulaire (le popup lui-même) */
.modal-content {
    background-color: #ffffff !important; /* BLANC PUR OPAQUE */
    opacity: 1 !important; /* Force l'opacité à 100% */
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: #0a1d37; /* Couleur du texte sombre pour bien voir */
}

/* 3. Optimisation pour les très petits écrans (iPhone SE, etc.) */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px 15px; /* On réduit un peu les marges internes */
        margin-top: 10px;
    }
    
    .step-title {
        font-size: 20px; /* Titre un peu plus petit sur mobile */
    }

    /* Le calendrier s'adapte déjà grâce à la flex-direction: column précédente */
}

/* 2. Logo et Titres */
.modal-logo {
    display: block;
    margin: 0 auto 20px;
    max-width: 150px;
}

.step-title {
    font-size: 26px;
    font-weight: 800;
    color: #0a1d37;
    margin-bottom: 25px;
    text-align: center;
}

/* 3. Formulaires et Inputs */
.step { display: none; }
.step.active { display: block; }

input[type="email"], input[type="text"], input[type="tel"] {
    width: 100%;
    padding: 14px 18px;
    margin: 8px 0;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-row {
    display: flex;
    gap: 15px;
}

/* 4. Boutons stylisés (Style SDepend) */
.btn-next, .btn-submit {
    background-color: #007bff; /* Bleu Royal */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-next:hover, .btn-submit:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-submit {
    background-color: #4ade80; /* Vert pour la validation finale */
}

.btn-submit:hover {
    background-color: #38c172;
}

.btn-back {
    background: none;
    border: 1px solid #ced4da;
    color: #6c757d;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-back:hover {
    background-color: #f8f9fa;
}

.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

/* 5. Nouveau Layout Calendrier (Etape 4) */
.calendar-layout {
    display: flex;
    gap: 20px;
    background: #fdfdfd;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.datepicker-side { flex: 1.2; }
.slots-side { flex: 1; }

.slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.slot {
    padding: 10px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    transition: 0.2s;
}

.slot:hover, .slot.selected {
    background: #007bff;
    color: white;
}

/* 6. Stepper (Points de progression) */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.circle {
    width: 35px; height: 35px;
    border-radius: 50%;
    border: 2px solid #e1e8ed;
    display: flex;
    align-items: center; justify-content: center;
    color: #adb5bd;
    font-weight: 700;
}

.circle.active {
    background-color: #5c4ee5; /* Violet SDepend */
    border-color: #5c4ee5;
    color: white;
}

.line {
    width: 50px; height: 2px;
    background-color: #e1e8ed;
    margin: 0 10px;
}

.line.active {
    background-color: #5c4ee5;
}

/* 7. Fermeture */
.close-modal {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 28px;
    color: #adb5bd;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 600px) {
    .calendar-layout { flex-direction: column; }
    .input-row { flex-direction: column; gap: 0; }
}

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #007bff;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.circle.active {
    background: #007bff;
    color: #fff;
}

.line {
    width: 40px;
    height: 2px;
    background: #e1e8ed;
}

.line.active {
    background: #007bff;
}