/* booking.css */

.booking-container {
    padding: 120px 1rem 4rem;
}

.booking-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

/* --- Barre de progression --- */
.progress-bar { display: flex; justify-content: space-between; margin-bottom: 2rem; border-bottom: 1px solid #e0e0e0; }
.progress-bar .step { flex: 1; text-align: center; padding-bottom: 1rem; color: #999; font-weight: 600; position: relative; }
.progress-bar .step.active { color: #3e2372; }
.progress-bar .step.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background-color: #3e2372; }

/* --- Affichage des étapes --- */
.form-step { display: none; }
.form-step.active { display: block; }
.step-buttons { display: flex; gap: 1rem; justify-content: space-between; margin-top: 2rem; }
.step-buttons .btn-submit { flex: 1; }

/* --- Étape 1 : Grille des services --- */
.service-category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.category-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #e0e0e0; border-radius: 12px; text-decoration: none; color: #1d1d1f; font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.category-card:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.07); border-color: #ccc; }
.category-card img { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }
.category-card span { flex-grow: 1; text-align: left; }
.category-card svg { stroke: #999; stroke-width: 2.5; flex-shrink: 0; }

/* --- Étape 3 : Carte --- */
#address-map { height: 250px; width: 100%; border-radius: 8px; margin-top: 1rem; z-index: 1; }
/* booking.css */

/* --- Étape 4 : Calendrier et Heure --- */
#date-picker { 
    background: #fff; 
    cursor: pointer; 
}

/* Grille pour les créneaux horaires */
.time-slots-container {
    display: grid;
    /* Crée des colonnes de 110px qui s'adaptent automatiquement */
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}

/* Message qui s'affiche avant la sélection d'une date */
.time-slot-placeholder {
    color: #999;
    font-style: italic;
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
    text-align: center;
    padding: 1rem 0;
}

/* Style des boutons de créneaux */
.time-slot { 
    padding: 1rem; 
    font-size: 1rem; 
    font-weight: 600; 
    border: 2px solid #e0e0e0; 
    background: #fff; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.2s; 
}

.time-slot:hover { 
    border-color: #3e2372; 
}

.time-slot.selected { 
    background: #6140b2; 
    color: #fff; 
    border-color: #6140b2; 
}

/* Style pour les créneaux désactivés (dans le passé) */
.time-slot:disabled {
    background-color: #f5f5f7;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

/* Style pour le calendrier Flatpickr */
.flatpickr-calendar { 
    font-family: 'Inter', sans-serif; 
    border-radius: 8px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
}
.flatpickr-day.selected { 
    background: #6140b2; 
    border-color: #6140b2; 
}
.flatpickr-day:hover { 
    background: #eef5ff; 
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .service-category-grid { grid-template-columns: 1fr; }
    .booking-wrapper { padding: 1.5rem; }
}


/* ================================================= */
/* NOUVEAU : STYLE POUR LES SUGGESTIONS D'ADRESSE    */
/* ================================================= */
#address-suggestions-wrapper {
    position: relative; /* Conteneur de référence pour la liste */
}
#address-suggestions {
    position: absolute;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1000; /* Doit être au-dessus de la carte */
    max-height: 190px;
    overflow-y: auto;
}
.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
}
.suggestion-item:hover {
    background-color: #f5f5f7;
}

/* ================================================= */
/* NOUVEAU : STYLE POUR L'ÉPINGLE DE CARTE ANIMÉE    */
/* ================================================= */
.custom-map-marker .marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0; /* Forme de goutte */
    background: #3e2372;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px; /* Centrage */
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
/* Point blanc au centre de la goutte */
.custom-map-marker .marker-pin::after {
    content: '';
    width: 14px;
    height: 14px;
    margin: 8px 0 0 8px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
}








/* NOUVEAU : Style pour les cases à cocher personnalisées */
.options-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonne pour plus de clarté */
    gap: 0.5rem;
}

.option-item {
    position: relative;
    display: block;
}

.option-item input[type="checkbox"] {
    /* On cache la case par défaut mais on la garde accessible */
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.option-item label {
    display: block;
    padding: 1rem 1rem 1rem 3rem; /* Espace pour la fausse case */
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-weight: 600;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}

/* La fausse case à cocher (le carré) */
.option-item label::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s;
}

/* La coche (le V) qui apparaît */
.option-item label::after {
    content: '✔';
    position: absolute;
    left: 1.35rem;
    top: 50%;
    transform: translateY(-50%) scale(0); /* Cachée par défaut */
    font-size: 1.2rem;
    color: #fff;
    transition: transform 0.2s;
}

/* Quand on coche la case... */
.option-item input[type="checkbox"]:checked + label {
    background-color: #eef5ff;
    border-color: #3e2372;
}
.option-item input[type="checkbox"]:checked + label::before {
    background-color: #3e2372;
    border-color: #3e2372;
}
.option-item input[type="checkbox"]:checked + label::after {
    transform: translateY(-50%) scale(1); /* On affiche la coche */
}





/* Style pour l'estimation du prix (version simple) */
#price-estimator {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background-color: #fff;
    border: 2px solid #3e2372;
    border-radius: 12px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

#price-estimator span {
    font-size: 1.5rem;
}




/* Ajoute de l'espace entre les champs du formulaire de réservation */
.booking-wrapper .form-group {
    margin-bottom: 2rem !important; /* On ajoute !important pour forcer la priorité */
}






/* --- Style pour l'aperçu des photos uploadées --- */

.file-preview-container {
    display: flex;       /* Utilise Flexbox pour l'alignement horizontal */
    flex-wrap: wrap;     /* Permet aux vignettes de passer à la ligne */
    gap: 1rem;           /* Espace entre les vignettes */
    margin-top: 1rem;
    padding: 0.5rem;
    border: 1px dashed #cccccc;
    border-radius: 8px;
    min-height: 120px;
    align-items: center;
}

.file-preview-item {
    position: relative;
    width: 100px;        /* Largeur de la vignette */
    height: 100px;       /* Hauteur de la vignette */
    flex-shrink: 0;      /* Empêche les vignettes de rétrécir */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image pour qu'elle remplisse la vignette */
    display: block;
}

.remove-file-btn {
    position: absolute;
    top:  1px;
    right: 1px;
    width: 24px;
    height: 24px;
    background-color: #e53e3e;
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.remove-file-btn:hover {
    background-color: #e53e3e; /* Changement de couleur au survol */
}


/* Cache l'input file par défaut */
#job-photos {
    display: none; 
}