/* =============================================
   TECHNICIEN LOCAL v2.0 - CSS entierement isole
   Tout est prefixe #tl-wrapper pour ne jamais
   toucher au design du site Elementor autour.
   ============================================= */

/* --- RESET ISOLE --- */
#tl-wrapper,
#tl-wrapper *,
#tl-wrapper *::before,
#tl-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: 1.5;
}

/* --- CONTENEUR --- */
#tl-wrapper {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

/* --- INTRO --- */
#tl-wrapper .tl-intro {
    font-size: 15px;
    color: #555555;
    margin-bottom: 16px;
    display: block;
}

/* --- FORMULAIRE CODE POSTAL --- */
#tl-wrapper #tl-form-cp {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#tl-wrapper #tl-cp {
    flex: 0 0 auto;
    width: 190px;
    padding: 13px 16px;
    font-size: 16px;
    color: #333333;
    background: #ffffff;
    border: 2px solid #2475BB;
    border-radius: 6px;
    outline: none;
    text-align: center;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

#tl-wrapper #tl-cp:focus {
    border-color: #48B366;
}

#tl-wrapper #tl-cp::placeholder {
    color: #aaaaaa;
}

/* --- BOUTON SUBMIT --- */
#tl-wrapper #tl-btn-submit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background-color: #48B366;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 180px;
}

#tl-wrapper #tl-btn-submit:hover {
    background-color: #3a9a56;
}

#tl-wrapper #tl-btn-submit:active {
    transform: scale(0.97);
}

#tl-wrapper #tl-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner */
#tl-wrapper .tl-btn-spin {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: tl-spin 0.7s linear infinite;
    flex-shrink: 0;
}

#tl-wrapper #tl-btn-submit.tl-loading .tl-btn-label {
    display: none;
}

#tl-wrapper #tl-btn-submit.tl-loading .tl-btn-spin {
    display: inline-block;
}

@keyframes tl-spin {
    to { transform: rotate(360deg); }
}

/* --- ERREUR --- */
#tl-wrapper #tl-error {
    font-size: 14px;
    color: #cc0000;
    margin-top: 10px;
    min-height: 20px;
    display: block;
}

/* --- ETAPE 2 - RESULTAT --- */
#tl-wrapper #tl-step-2 {
    animation: tl-fadein 0.35s ease;
}

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

#tl-wrapper .tl-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: #48B366;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 14px;
}

#tl-wrapper #tl-titre {
    font-size: 20px;
    font-weight: 700;
    color: #2475BB;
    margin-bottom: 8px;
    display: block;
}

#tl-wrapper #tl-localite {
    font-size: 17px;
    font-weight: 600;
    color: #48B366;
    margin-bottom: 8px;
    display: block;
}

#tl-wrapper #tl-sous {
    font-size: 14px;
    color: #666666;
    margin-bottom: 22px;
    display: block;
}

/* --- BOUTONS D'ACTION --- */
#tl-wrapper .tl-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

#tl-wrapper .tl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 190px;
}

#tl-wrapper .tl-btn:active {
    transform: scale(0.97);
}

#tl-wrapper .tl-btn-green {
    background-color: #48B366;
    color: #ffffff !important;
}

#tl-wrapper .tl-btn-green:hover {
    background-color: #3a9a56;
}

#tl-wrapper .tl-btn-blue {
    background-color: #2475BB;
    color: #ffffff !important;
}

#tl-wrapper .tl-btn-blue:hover {
    background-color: #1a5e99;
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    #tl-wrapper #tl-form-cp {
        flex-direction: column;
        align-items: center;
    }

    #tl-wrapper #tl-cp,
    #tl-wrapper #tl-btn-submit {
        width: 85%;
        max-width: 320px;
    }

    #tl-wrapper .tl-actions {
        flex-direction: column;
        align-items: center;
    }

    #tl-wrapper .tl-btn {
        width: 85%;
        max-width: 320px;
    }

    #tl-wrapper #tl-titre {
        font-size: 17px;
    }
}
