/* ============================================================
   contact.css — Styles de la page de contact
   ============================================================ */

/* ---------- En-tête de page ---------- */
#entete-page-contact {
    background: linear-gradient(135deg, #1a1a1a 0%, #cc5200 100%);
    color: #fff;
    padding: var(--esp-lg) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
#entete-page-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
#entete-page-contact h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.4rem; position: relative; z-index: 1; }
#entete-page-contact p  { color: rgba(255,255,255,0.75); position: relative; z-index: 1; }

/* ---------- Corps ---------- */
#corps-contact {
    padding: var(--esp-xl) 0;
    background: linear-gradient(160deg, #ff6b00 0%, #ff9a45 20%, #ffcfa0 50%, #fff5ee 75%, #ffffff 100%);
}

/* Mise en page 2 colonnes */
.contact-mise-en-page {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--esp-xl);
    align-items: start;
}

/* ---------- Formulaire ---------- */
.contact-formulaire {
    background: #fff;
    border-radius: var(--rayon-md);
    box-shadow: var(--ombre-sm);
    padding: var(--esp-lg);
}
.contact-formulaire h2 {
    font-size: 1.4rem;
    color: var(--couleur-primaire);
    margin-bottom: 0.4rem;
}
.contact-sous-titre {
    color: var(--couleur-texte-clair);
    font-size: 0.9rem;
    margin-bottom: var(--esp-lg);
}

/* Ligne de deux champs côte à côte */
.ligne-champs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--esp-sm);
}

/* Champ individuel */
.champ-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: var(--esp-sm);
}
.champ-form label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--couleur-texte-clair);
}
.requis { color: var(--couleur-accent); }

/* Inputs, selects, textarea */
.champ-form input[type="text"],
.champ-form input[type="email"],
.champ-form input[type="tel"],
.champ-form select,
.champ-form textarea {
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--couleur-bordure);
    border-radius: var(--rayon-sm);
    font-size: 0.95rem;
    font-family: var(--police-corps);
    color: var(--couleur-texte);
    background: var(--couleur-fond);
    transition: border-color var(--transition), background var(--transition);
    width: 100%;
}
.champ-form input:focus,
.champ-form select:focus,
.champ-form textarea:focus {
    outline: none;
    border-color: var(--couleur-accent);
    background: #fff;
}
/* État d'erreur */
.champ-form input.erreur,
.champ-form select.erreur,
.champ-form textarea.erreur {
    border-color: #e53935;
}
/* État valide */
.champ-form input.valide,
.champ-form select.valide,
.champ-form textarea.valide {
    border-color: #43a047;
}

.champ-form textarea { resize: vertical; min-height: 120px; }
.champ-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.2rem;
    cursor: pointer;
}

/* Champ lecture seule (véhicule pré-rempli) */
.champ-form input[readonly] {
    background: #f0f0f0;
    cursor: default;
    color: var(--couleur-texte);
}

/* Compteur de caractères */
.compteur-chars {
    font-size: 0.75rem;
    color: var(--couleur-texte-clair);
    text-align: right;
}

/* Messages d'erreur inline */
.erreur-champ {
    font-size: 0.78rem;
    color: #e53935;
    min-height: 1em;
    display: block;
}

/* Case à cocher CGV */
.case-cgv {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--couleur-texte);
    cursor: pointer;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.case-cgv input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--couleur-accent);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}
.case-cgv a {
    color: var(--couleur-accent);
    text-decoration: underline;
}
.case-cgv a:hover { opacity: 0.75; }

/* Bouton de soumission */
.btn-submit {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    margin-top: var(--esp-xs);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Message de confirmation ---------- */
.msg-confirmation {
    text-align: center;
    padding: var(--esp-xl) var(--esp-md);
}
.msg-confirmation.masque { display: none; }

.confirmation-icone {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #43a047;
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--esp-sm);
}
.msg-confirmation h3 {
    font-size: 1.4rem;
    color: var(--couleur-primaire);
    margin-bottom: 0.5rem;
}
.msg-confirmation p {
    color: var(--couleur-texte-clair);
    margin-bottom: var(--esp-md);
}

/* ---------- Panneau d'informations ---------- */
.contact-infos {
    display: flex;
    flex-direction: column;
    gap: var(--esp-md);
}

.info-bloc {
    background: #fff;
    border-radius: var(--rayon-md);
    box-shadow: var(--ombre-sm);
    padding: var(--esp-md);
}
.info-bloc h3 {
    font-size: 1rem;
    color: var(--couleur-primaire);
    margin-bottom: var(--esp-sm);
    padding-bottom: var(--esp-xs);
    border-bottom: 2px solid var(--couleur-bordure);
}

/* Lignes coordonnées */
.info-ligne {
    display: flex;
    gap: var(--esp-sm);
    align-items: flex-start;
    margin-bottom: var(--esp-sm);
}
.info-ligne:last-child { margin-bottom: 0; }
.info-icone { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.info-ligne strong { display: block; font-size: 0.82rem; color: var(--couleur-texte-clair); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.info-ligne p, .info-ligne a { font-size: 0.9rem; color: var(--couleur-texte); }
.info-ligne a:hover { color: var(--couleur-accent); }

/* Tableau des horaires */
.horaires { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.horaires td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--couleur-fond); }
.horaires td:first-child { font-weight: 600; color: var(--couleur-texte); }
.horaires td:last-child  { text-align: right; color: var(--couleur-texte-clair); }
.horaires tr.ferme td   { color: #e53935; }

/* Bloc urgence */
.info-urgence { background: var(--couleur-primaire); color: rgba(255,255,255,0.85); }
.info-urgence h3 { color: #fff; border-color: rgba(255,255,255,0.15); }
.info-urgence p  { font-size: 0.88rem; margin-bottom: var(--esp-sm); }
.btn-tel { display: block; text-align: center; padding: 0.8rem; font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .contact-mise-en-page {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .ligne-champs         { grid-template-columns: 1fr; }
    .contact-formulaire   { padding: var(--esp-md); }
    .contact-formulaire h2 { font-size: 1.2rem; }
    .info-bloc            { padding: var(--esp-md); }
}

@media (max-width: 480px) {
    /* En-tête de page */
    #entete-page-contact { padding: var(--esp-md) var(--esp-sm); }
    #entete-page-contact h1 { font-size: 1.3rem; }

    /* Formulaire */
    .contact-formulaire    { padding: var(--esp-sm); }
    .champ-form label      { font-size: 0.78rem; }
    .champ-form input,
    .champ-form select,
    .champ-form textarea   { font-size: 0.88rem; padding: 0.55rem 0.7rem; }

    /* Bloc infos : empiler les lignes */
    .info-ligne            { flex-direction: column; gap: 0.15rem; }
    .info-icone            { display: none; }

    /* Horaires : plus compact */
    .horaires td           { padding: 0.3rem 0.4rem; font-size: 0.82rem; }
}

/* ============================================================
   THÈME SOMBRE — contact.css
   ============================================================ */
[data-theme="dark"] #entete-page-contact {
    background: linear-gradient(135deg, #0a0a0a 0%, #2d1200 100%);
}
[data-theme="dark"] #corps-contact {
    background: linear-gradient(160deg, #1a0800 0%, #0f0f0f 30%, #121212 100%);
}
[data-theme="dark"] .contact-formulaire {
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
}
[data-theme="dark"] .contact-formulaire h2 { color: #f0f0f0; }
[data-theme="dark"] .contact-formulaire p  { color: #a0a0a0; }
[data-theme="dark"] .champ-form label { color: #a0a0a0; }
[data-theme="dark"] .champ-form input[readonly] {
    background: #222;
    color: #a0a0a0;
}
[data-theme="dark"] .info-bloc {
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
}
[data-theme="dark"] .info-bloc h3 {
    color: #f0f0f0;
    border-bottom-color: #3a3a3a;
}
[data-theme="dark"] .info-ligne p,
[data-theme="dark"] .info-ligne a { color: #e0e0e0; }
[data-theme="dark"] .horaires td { border-bottom-color: #2a2a2a; }
[data-theme="dark"] .horaires td:first-child { color: #e0e0e0; }
[data-theme="dark"] .horaires td:last-child  { color: #a0a0a0; }
[data-theme="dark"] .msg-confirmation h3 { color: #f0f0f0; }
[data-theme="dark"] .case-cgv { color: #e0e0e0; }
