/* =========================================================
   PAGE RECHERCHE - 123 Services à Domicile
   Fichier : /CSS/recherche-style.css
   Objectif : améliorer la présentation de /recherche.php
   sans toucher à la logique PHP.
   ========================================================= */

/* ---------------------------------------------------------
   Bloc titre de la page recherche
   --------------------------------------------------------- */

.page-departement .section-titre {
    max-width: 1140px;
    margin: 24px auto 18px auto;
    padding: 26px 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f2f8fa 100%);
    border: 1px solid rgba(16, 75, 95, 0.10);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
}

.page-departement .section-titre h1 {
    margin: 0 0 10px 0;
    color: #12343f;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.15;
}

.page-departement .section-titre p {
    margin: 0;
    color: #3f4f55;
    font-size: 1.05rem;
    line-height: 1.55;
}

/* ---------------------------------------------------------
   Bloc formulaire de recherche
   --------------------------------------------------------- */

.page-departement .section-recherche {
    max-width: 1140px;
    margin: 0 auto 22px auto;
    padding: 0;
}

.form-recherche-root {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr) auto;
    gap: 16px;
    align-items: end;
    padding: 22px;
    background: #ffffff;
    border: 1px solid rgba(16, 75, 95, 0.12);
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.form-recherche-root .form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-recherche-root label {
    margin-bottom: 7px;
    color: #12343f;
    font-weight: 800;
    font-size: 0.95rem;
}

.form-recherche-root select,
.form-recherche-root input[type="text"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(16, 75, 95, 0.22);
    border-radius: 14px;
    background: #f8fbfc;
    color: #12343f;
    font-size: 0.97rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-recherche-root select:focus,
.form-recherche-root input[type="text"]:focus {
    background: #ffffff;
    border-color: #0f7896;
    box-shadow: 0 0 0 4px rgba(15, 120, 150, 0.14);
}

.form-recherche-root .help {
    display: block;
    margin-top: 6px;
    color: #65757b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.form-recherche-root .form-submit {
    align-self: end;
}

.form-recherche-root .form-submit button {
    min-height: 46px;
    padding: 11px 20px;
    border: 0;
    border-radius: 999px;
    background: #0f7896;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.96rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 120, 150, 0.24);
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.form-recherche-root .form-submit button:hover {
    background: #0b6078;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 120, 150, 0.30);
}

/* ---------------------------------------------------------
   Zone résultats
   --------------------------------------------------------- */

#resultats-enseignes {
    max-width: 1140px;
    margin: 0 auto 30px auto;
}

.result-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px 0;
    padding: 9px 14px;
    border-radius: 999px;
    background: #eaf6f9;
    color: #12343f;
    font-weight: 800;
    font-size: 0.94rem;
    border: 1px solid rgba(15, 120, 150, 0.16);
}

/* ---------------------------------------------------------
   Pagination
   --------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 4px 0;
    padding: 14px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(16, 75, 95, 0.10);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.pagination a {
    color: #0f5f78;
    background: #f2f8fa;
    border: 1px solid rgba(15, 120, 150, 0.12);
}

.pagination a:hover {
    color: #ffffff;
    background: #0f7896;
}

.pagination .current {
    color: #ffffff;
    background: #12343f;
}

.pagination .disabled {
    color: #8a9aa0;
    background: #f3f3f3;
    cursor: not-allowed;
}

/* ---------------------------------------------------------
   Modal contact enseigne
   --------------------------------------------------------- */

.contact-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
}

.contact-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 25, 31, 0.58);
    backdrop-filter: blur(3px);
}

.contact-modal-box {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.contact-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f0f5f6;
    color: #12343f;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.contact-modal-close:hover {
    background: #0f7896;
    color: #ffffff;
}

.contact-modal-box h3 {
    margin: 0 42px 18px 0;
    color: #12343f;
    font-size: 1.35rem;
}

.contact-modal-box .form-group {
    margin-bottom: 14px;
}

.contact-modal-box label {
    display: block;
    margin-bottom: 6px;
    color: #12343f;
    font-weight: 800;
    font-size: 0.93rem;
}

.contact-modal-box input,
.contact-modal-box textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(16, 75, 95, 0.22);
    border-radius: 14px;
    background: #f8fbfc;
    color: #12343f;
    font-size: 0.96rem;
    outline: none;
}

.contact-modal-box input:focus,
.contact-modal-box textarea:focus {
    background: #ffffff;
    border-color: #0f7896;
    box-shadow: 0 0 0 4px rgba(15, 120, 150, 0.14);
}

.contact-modal-box textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-modal-box .form-submit button {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: #0f7896;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.contact-modal-box .form-submit button:hover {
    background: #0b6078;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-message {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f2f8fa;
    color: #12343f;
    font-weight: 700;
    font-size: 0.92rem;
}

.form-message.ok {
    background: #e8f7ed;
    color: #1d6b36;
}

.form-message.erreur {
    background: #fdecec;
    color: #9b1c1c;
}

.form-message.envoi {
    background: #fff6dc;
    color: #7a5a00;
}

/* ---------------------------------------------------------
   Ajustements mobile
   --------------------------------------------------------- */

@media (max-width: 980px) {
    .form-recherche-root {
        grid-template-columns: 1fr 1fr;
    }

    .form-recherche-root .form-submit {
        grid-column: 1 / -1;
    }

    .form-recherche-root .form-submit button {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .page-departement .section-titre {
        margin: 16px 12px 14px 12px;
        padding: 20px 18px;
        border-radius: 18px;
    }

    .page-departement .section-recherche {
        margin: 0 12px 18px 12px;
    }

    .form-recherche-root {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
        border-radius: 18px;
    }

    #resultats-enseignes {
        margin-left: 12px;
        margin-right: 12px;
    }

    .result-count {
        display: flex;
        width: 100%;
        justify-content: center;
        text-align: center;
        border-radius: 14px;
    }

    .pagination {
        padding: 10px;
        border-radius: 16px;
    }

    .pagination a,
    .pagination span {
        min-height: 34px;
        padding: 6px 9px;
        font-size: 0.86rem;
    }

    .contact-modal-box {
        width: calc(100% - 20px);
        margin: 10px auto;
        padding: 20px 16px;
        border-radius: 18px;
    }

    .contact-modal-box h3 {
        font-size: 1.18rem;
    }
}