/* ==========================================================================
   Conteneur principal du formulaire
   ========================================================================== */
.zone-finder-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #f4f7f6;
    border-radius: 16px;
    padding: 2rem;
    max-width: 650px;
    margin: 2rem auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    position: relative;
}

/* Styles pour les différentes étapes */
.zone-finder-step {
    text-align: center;
    display: none; /* Caché par défaut */
}
.zone-finder-step.active {
    display: block; /* Affiché si actif */
}

/* Icônes des étapes */
.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #eaf3f1;
    margin-bottom: 1rem;
}
.step-icon svg {
    color: #1c8566;
    width: 32px;
    height: 32px;
}
.step-icon.success {
    background-color: #e9f9f5;
}
.step-icon.success svg {
    color: #008060;
}

/* Titres et descriptions */
.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}
.step-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.success-message {
    color: #008060;
}

/* ==========================================================================
   Styles des formulaires et des champs
   ========================================================================== */
.zone-finder-form .input-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.codepostalFormCp {
    flex-grow: 1;
    border: 1px solid #ddd;
    padding: 1rem;
    font-size: 1rem;
    color: #333;
    min-width: 0;
    border-radius: 8px 0 0 8px;
    transition: border-color 0.2s ease;
    border-right: none;
    /* MODIFICATION : Centre le texte et le placeholder */
    text-align: center;
}
.codepostalFormCp:focus {
    outline: none;
    border-color: #1c8566;
    position: relative;
    z-index: 2;
}

.submitCodePostal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #1c8566;
    background-color: #1c8566;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: background-color 0.2s ease;
    margin-left: -1px;
}
.submitCodePostal:hover {
    background-color: #008060;
}
.submitCodePostal:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.submitCodePostal span {
    white-space: nowrap;
}

/* Bouton d'appel */
/* CORRECTION : Utilisation d'un sélecteur plus spécifique pour forcer la couleur blanche */
#zone-finder-container .phone-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #008060;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* CORRECTION : Cible spécifiquement le texte pour le mettre en gras et s'assurer qu'il est blanc */
#zone-finder-container .phone-button span {
    font-weight: bold;
    color: white;
}

/* S'assure que l'icône hérite bien de la couleur blanche */
#zone-finder-container .phone-button svg {
    color: white;
}

#zone-finder-container .phone-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 128, 96, 0.3);
}

/* Séparateur "OU" */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: #aaa;
    margin: 1.5rem 0;
}
.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}
.separator:not(:empty)::before {
    margin-right: .5em;
}
.separator:not(:empty)::after {
    margin-left: .5em;
}

/* Messages d'erreur */
.form-error {
    color: #D8000C;
    font-weight: 500;
    text-align: center;
    margin-top: 1rem;
    min-height: 1.2em;
}

/* ==========================================================================
   Adaptabilité (Responsive)
   ========================================================================== */
@media (max-width: 700px) {
    .zone-finder-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .step-title {
        font-size: 1.25rem;
    }
    .step-description {
        font-size: 0.95rem;
    }
    .codepostalFormCp, .submitCodePostal {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    .submitCodePostal {
        padding: 0.8rem 1rem;
    }
    .phone-button {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
}
