/* ==========================================================================
   CONTACT — feuille de style alternative (test)
   Fichier : css/contact-v2.css
   Aucune modification de HTML/PHP : mêmes sélecteurs que contact.php.

   C'est un COMPLÉMENT de contact.css (qui sert aussi à la page franchise) :
   il ne remplace rien et ne cible que #contact et #contact-agences.

   Pour tester, dans php/_inc_header.php, ajouter la ligne suivante APRÈS
   contact.css (idéalement à la fin, après main-responsive.css) :
     <link rel="stylesheet" href="css/contact-v2.css">
   Pour revenir en arrière : retirer cette ligne (le fichier peut être supprimé).
   ========================================================================== */

#contact,
#contact-agences {
    --ct-line: #e6e8eb;
    --ct-soft: #f6f4f1;
    --ct-tint: #fbe9ea;
    --ct-ink: #1f2328;
    --ct-radius: 16px;
}

/* ---------- Panneau crème autour du formulaire ---------- */

#contact {
    width: calc(100% - 64px);
    margin: 24px auto 0;
    padding: 56px 40px;
    background: var(--ct-soft);
    border-radius: 24px;
    min-height: unset !important;
}

/* ---------- Carte du formulaire ---------- */

#contact #contact-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 44px 64px;
    align-content: start;
    align-items: start;
    justify-content: stretch;
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 52px;
    background: #fff;
    border: 1px solid #ebe8e3;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(31, 35, 40, .08);
}

#contact .blockContact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
    align-items: start;
    justify-content: stretch;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* titres de section avec pastille d'icône */
#contact .blockContact h2 {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    color: var(--ct-ink);
}

#contact .blockContact h2::before {
    content: "\f007";
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ct-tint);
    color: var(--col-red);
    font-family: var(--font-awesome);
    font-weight: 900;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
}

#contact #contact-form .blockContact:nth-child(1) h2::before { content: "\f007"; } /* coordonnées */
#contact #contact-form .blockContact:nth-child(2) h2::before { content: "\f095"; } /* contacts */
#contact #contact-form .blockContact:nth-child(3) h2::before { content: "\f075"; } /* questions */

/* ---------- Champs ---------- */

#contact .blockContact input:not([type="hidden"]),
#contact .blockContact textarea,
#contact .blockContact select {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0 16px;
    background-color: #fff;
    border: 1.5px solid #d9dce1;
    border-radius: 10px;
    box-shadow: none;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.4;
    color: var(--ct-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

#contact .blockContact input::placeholder,
#contact .blockContact textarea::placeholder {
    color: #7b828c;
}

#contact .blockContact input:not([type="hidden"]):hover,
#contact .blockContact textarea:hover,
#contact .blockContact select:hover {
    border-color: #b9bec6;
    box-shadow: none;
}

#contact .blockContact input:not([type="hidden"]):focus,
#contact .blockContact textarea:focus,
#contact .blockContact select:focus {
    border-color: var(--col-red);
    box-shadow: 0 0 0 4px rgba(var(--col-red-rgb), .12);
}

/* champs sur toute la largeur du bloc */
#contact #nom,
#contact #address,
#contact #tel,
#contact #email {
    grid-column: 1 / -1;
}

/* liste déroulante : flèche rouge */
#contact #agenceSelect {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 48px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%23bd1522' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
}

/* ---------- Bloc « Vos questions » ---------- */

#contact #contact-form .blockContact:nth-child(3) {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 28px;
}

#contact #comment {
    grid-column: 1;
    grid-row: 2 / span 3;
    min-height: 190px;
    padding: 14px 16px;
    line-height: 1.6;
    resize: vertical;
}

#contact .blockContact label {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    margin: 0;
    color: var(--ct-ink);
    font-weight: 600;
    line-height: 1.5;
}

#contact #agenceSelect {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
}

/* ---------- Envoi ---------- */

#contact #contact-form .blockContact:nth-child(4) {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px 28px;
    padding-top: 32px;
    border-top: 1px solid #eceef1;
}

#contact #contact-submit-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 54px;
    padding: 0 36px;
    background-color: var(--col-red);
    background-image: none;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-family: var(--font-special);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

#contact #contact-submit-button:hover,
#contact #contact-submit-button:focus-visible {
    background-color: var(--col-red-f);
    background-image: none;
}

#contact #contact-submit-button:active {
    transform: translateY(1px);
}

#contact #contact-form .blockContact:last-child span {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--col-red);
}

/* ---------- Liste des agences (version aérée) ---------- */

#contact-agences {
    width: 100%;
    padding: 96px 32px 112px;
}

#contact-agences #contact-agences-ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 64px 72px;
    align-content: start;
    align-items: start;
    justify-content: stretch;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0;
}

/* un bloc ouvert par agence : simple filet gris + court trait rouge */
#contact-agences .contact-agences-li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    width: auto;
    margin: 0;
    padding: 28px 0 0;
    background: transparent;
    border: 0;
    border-top: 1.5px solid var(--ct-line);
    border-radius: 0;
    overflow: visible;
}

#contact-agences .contact-agences-li::before {
    content: "";
    position: absolute;
    top: -1.5px;
    left: 0;
    width: 44px;
    height: 1.5px;
    background: var(--col-red);
    transition: width .35s ease;
}

#contact-agences .contact-agences-li:hover::before {
    width: 100%;
}

/* titre : EUROMAT en gris léger, nom en gras sombre, flèche rouge */
#contact-agences .cal-nom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .3em;
    margin: 0 0 10px;
    padding: 0;
    background: transparent;
    color: #6b7280;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: left;
    transition: color .15s ease;
}

#contact-agences .cal-nom b {
    color: var(--ct-ink);
    font-weight: 600;
    text-transform: uppercase;
}

#contact-agences .cal-nom::after {
    content: "\f061";
    margin-left: 6px;
    color: var(--col-red);
    font-family: var(--font-awesome);
    font-weight: 900;
    font-size: 14px;
    transition: transform .25s ease;
}

#contact-agences .cal-nom:hover {
    background: transparent;
    color: var(--col-red);
}

#contact-agences .contact-agences-li:hover .cal-nom::after {
    transform: translateX(5px);
}

/* lignes e-mail / téléphone / adresse : petites icônes grises, sans pastille */
#contact-agences .cal-email,
#contact-agences .cal-tel,
#contact-agences .cal-addresse1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.55;
}

#contact-agences .cal-email::before,
#contact-agences .cal-tel::before,
#contact-agences .cal-addresse1::before {
    flex: none;
    width: 17px;
    padding: 0;
    color: #a3a9b2;
    font-family: var(--font-awesome);
    font-weight: 400;
    font-size: 15px;
    text-align: center;
}

#contact-agences .cal-email {
    color: var(--col-red);
    font-weight: 500;
    word-break: break-all;
}

#contact-agences .cal-email::before {
    content: "\f0e0";
}

#contact-agences .cal-tel {
    color: var(--ct-ink);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
}

#contact-agences .cal-tel::before {
    content: "\f095";
}

#contact-agences .cal-addresse1 {
    margin-top: 6px;
    color: #5b626b;
    font-weight: 500;
}

#contact-agences .cal-addresse1::before {
    content: "\f3c5";
}

#contact-agences .cal-addresse2 {
    margin: -12px 0 0;
    padding: 0 0 0 29px;
    color: #5b626b;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.55;
    text-transform: uppercase;
}

#contact-agences .cal-email:hover,
#contact-agences .cal-tel:hover,
#contact-agences .cal-addresse1:hover,
#contact-agences .cal-addresse2:hover {
    color: var(--col-red);
}

/* e-mail ou téléphone manquant : la ligne vide est masquée */
#contact-agences .contact-agences-li a[class=""] {
    display: none;
}

/* ---------- Tablette / mobile ---------- */

@media screen and (max-width: 1079px) {
    #contact {
        width: calc(100% - 24px);
        margin-top: 12px;
        padding: 28px 12px;
    }

    #contact #contact-form {
        padding: 32px 24px;
        gap: 36px;
    }

    #contact-agences {
        padding: 64px 20px 72px;
    }

    #contact-agences #contact-agences-ul {
        gap: 44px 40px;
    }

    #contact-agences .contact-agences-li {
        width: auto;
        margin: 0;
    }
}

@media screen and (max-width: 760px) {
    #contact #contact-form .blockContact:nth-child(3) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
    }

    #contact #comment,
    #contact .blockContact label,
    #contact #agenceSelect {
        grid-column: 1;
        grid-row: auto;
    }

    #contact .blockContact label {
        margin-top: 6px;
    }

    #contact #contact-submit-button {
        width: 100%;
        justify-content: center;
    }
}

/* Petits écrans : moins de cadres imbriqués, plus de largeur utile pour les champs */
@media screen and (max-width: 600px) {
    #contact {
        width: 100%;
        margin: 0;
        padding: 12px;
        border-radius: 0;
    }

    #contact #contact-form {
        padding: 28px 18px;
        gap: 36px;
        border-radius: 16px;
    }

    #contact .blockContact {
        gap: 12px;
    }

    #contact .blockContact h2 {
        gap: 12px;
        font-size: 21px;
    }

    #contact .blockContact h2::before {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 16px;
    }

    #contact .blockContact input:not([type="hidden"]),
    #contact .blockContact textarea,
    #contact .blockContact select {
        padding-left: 14px;
        padding-right: 14px;
    }

    #contact #agenceSelect {
        padding-right: 44px;
    }

    #contact #comment {
        min-height: 150px;
    }

    #contact #contact-form .blockContact:nth-child(4) {
        padding-top: 24px;
    }

    #contact-agences {
        padding: 48px 20px 64px;
    }

    #contact-agences #contact-agences-ul {
        gap: 40px;
    }

    #contact-agences .cal-nom {
        font-size: 20px;
    }
}

/* Très petits écrans : les champs en paires passent en pleine largeur */
@media screen and (max-width: 480px) {
    #contact #zipCode,
    #contact #city,
    #contact #tel2,
    #contact #fax {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    #contact .blockContact input,
    #contact .blockContact textarea,
    #contact .blockContact select,
    #contact #contact-submit-button,
    #contact-agences .contact-agences-li::before,
    #contact-agences .cal-nom,
    #contact-agences .cal-nom::after {
        transition: none;
    }
}
