/* ==========================================================================
   NEOFLUX — Page Contact « Vitrine de nuit » (pages/contact.php)
   Chargé APRÈS css/style.css et css/interieur.css (socle commun des pages intérieures) :
     <link rel="stylesheet" href="../css/contact.css?v=<?= (int) @filemtime(__DIR__ . '/../css/contact.css') ?>">
   Ne contient que ce qui est propre à la page Contact :
     1. premier écran à 3 zones : titre / formulaire de devis / contact direct
        (ordinateur : formulaire à droite ; téléphone : formulaire juste après le titre) ;
     2. compléments du formulaire de devis : messages, liste des fichiers joints et erreurs
        créés par js/contact.js (inchangé) ;
     3. « Nous trouver » : carte Google chargée au clic, adresse, horaires, SAV ;
     4. ancre #contactForm (liens « Devis » de tout le site) adaptée à la nouvelle carte.
   Portée : toutes les règles sont limitées à <main class="vi … ct-page"> (aucun effet ailleurs).
   ========================================================================== */

/* ══════════ 1. Premier écran : titre + formulaire + contact direct ══════════ */
.ct-page .vi-hero.is-court .vi-hero-main { padding: 28px 0 72px; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); grid-template-rows: auto 1fr; grid-template-areas: "t f" "i f"; column-gap: 64px; align-items: start; }
.ct-t { grid-area: t; min-width: 0; padding-top: 8px; }
.ct-f { grid-area: f; min-width: 0; }
.ct-i { grid-area: i; min-width: 0; }
.ct-page .vi-hero-lead { max-width: 520px; }
.ct-checks { margin: 28px 0 26px; }
.ct-k { margin-bottom: 12px; font-size: .95rem; font-weight: 600; line-height: 1.4; color: #fff; }
.ct-i .vi-btns > .vi-btn { min-height: 48px; }
.ct-meta { margin-top: 22px; }
/* Ouvert / fermé à l'heure d'Alger (point vert seulement quand c'est ouvert) */
.ct-open { display: inline-flex; align-items: center; gap: 8px; }
.ct-open.is-open::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .16); }
.ct-open-sub { display: block; }

/* ══════════ 2. Formulaire de devis ══════════ */
.ct-page .vi-fm-sub { margin-bottom: 16px; }
/* Nom | Téléphone, puis Wilaya | « Joignable sur WhatsApp » (sous le téléphone).
   La case est calée sur la liste des wilayas (hauteur de l'étiquette + écart de .vi-fld) et non sur le bas
   de la ligne : elle ne descend pas quand un message d'erreur s'affiche sous la wilaya. */
.ct-id .ct-wa-w { grid-column: 2; grid-row: 2; align-self: start; padding-top: calc(.85rem * 1.4 + 6px); }
.ct-id .ct-wil-w { grid-column: 1; grid-row: 2; }
.ct-id .vi-ck { min-height: 48px; gap: 8px; }
.ct-wa-ic { color: #15803D; font-size: 1.05rem; }
/* Choix « SAV / dépannage » : icône outil */
.ct-page .vi-opt > .vi-ic { color: inherit; }
/* Bloc « Ajouter des détails » (ouvert / fermé par js/contact.js) */
.ct-plus { display: grid; gap: 14px; padding-top: 2px; }
.ct-plus.is-open { animation: ct-plus-in .25s ease; }
@keyframes ct-plus-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* Fichiers : glisser-déposer et erreur (classes posées par js/contact.js) */
.ct-page .vi-file.dragover { border-color: var(--vi-rouge); background: var(--vi-rouge-p); }
.ct-page .vi-file.nf-invalid { border-color: var(--vi-err); border-style: solid; }
.ct-page .file-list { display: grid; gap: 8px; }
.ct-page .file-list:empty { display: none; }
.ct-page .file-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 6px 6px 6px 10px; border: 1px solid var(--vi-line); border-radius: var(--vi-r-btn); background: var(--vi-fond); }
.ct-page .file-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ct-page .file-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--vi-rouge-p); color: var(--vi-rouge); font-size: .9rem; }
.ct-page .file-details { min-width: 0; }
.ct-page .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 600; color: var(--vi-ink); line-height: 1.35; }
.ct-page .file-size { font-size: .8rem; color: var(--vi-gris); line-height: 1.35; }
.ct-page .file-remove { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--vi-err); font-size: 1rem; cursor: pointer; }
.ct-page .file-remove:hover { background: var(--vi-err-p); }
/* Messages au-dessus du formulaire (#successMessage, #errorMessage : affichés par js/contact.js) */
.ct-page .alert-msg { display: none; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--vi-r-btn); font-size: .9rem; line-height: 1.5; }
.ct-page .alert-msg.show { display: flex; }
.ct-page .alert-msg > i { margin-top: .2em; flex: none; }
.ct-page .alert-msg.success { border: 1px solid #A7F3D0; background: var(--vi-ok-p); color: var(--vi-ok); }
.ct-page .alert-msg.success strong { color: var(--vi-ok); }
.ct-page .alert-msg.error { border: 1px solid #FECACA; background: var(--vi-err-p); color: #991B1B; }
/* Erreurs sous la grille des choix et sous les fichiers : js/contact.js prévoyait l'ancienne grille
   (marge négative) ; ici le message suit simplement le bloc */
.ct-page .nf-field-error.nf-after-grid { margin: 8px 0 0; }
.ct-page .nf-field-error.nf-after-files { margin: 6px 0 0; }
.ct-page .vi-fld > .nf-field-error { margin-top: 0; }

/* Liens « Devis » de tout le site (…/contact.php#contactForm) : le titre de la carte
   « Demandez votre devis gratuit » s'arrête juste sous l'en-tête fixe (css/style.css).
   --nfx-tete-form (titre + phrase au-dessus du formulaire) est mesurée par js/contact.js ;
   valeur de secours ici pour la nouvelle carte (l'ancienne, avec ses étapes 1-2-3, était plus haute).
   Ordinateur (formulaire à droite, dans le premier écran) : le lien ramène tout en haut de la page
   (marge plus grande que la distance au formulaire → le navigateur s'arrête à 0). Le premier écran
   reste celui de la maquette : formulaire entier visible, en-tête dans son état normal, et le ruban
   « 58 ans » ne recouvre plus le fil d'Ariane (avec un petit défilement de 37 px, il le chevauchait). */
.ct-page #contactForm { --nfx-tete-form: 68px; }
@media (min-width: 961px) {
    .ct-page #contactForm { --nfx-haut-fixe: 100vh; }
}

/* ══════════ 3. Nous trouver : carte, adresse, horaires, SAV, avis ══════════ */
.ct-co-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
/* Carte : aperçu dessiné (léger) ; la vraie carte Google se charge au clic */
.ct-map { position: relative; min-height: 440px; border-radius: var(--vi-r-card); overflow: hidden; background: #E8EDF3; border: 1px solid var(--vi-line); }
.ct-map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.ct-map-pin { position: absolute; left: 52%; top: 44%; width: 44px; height: 56px; transform: translate(-50%, -100%); color: var(--vi-rouge); filter: drop-shadow(0 8px 10px rgba(15, 23, 42, .3)); }
.ct-map-note { position: absolute; top: 14px; left: 14px; width: max-content; max-width: calc(100% - 28px); padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, .92); font-size: .78rem; font-weight: 600; line-height: 1.4; color: var(--vi-sub); }
.ct-map-card { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: var(--vi-sh-pop); }
.ct-map-card > div { min-width: 0; }
.ct-map-card b { display: block; font-size: 1rem; line-height: 1.3; color: var(--vi-ink); }
.ct-map-card span { display: block; font-size: .88rem; line-height: 1.45; color: var(--vi-sub); }
.ct-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ct-map.is-on > :not(iframe) { display: none; }
.ct-co-side { display: grid; gap: 16px; align-content: start; }
.ct-page .ct-co-side .vi-encart-body > p { color: var(--vi-sub); }
.ct-page .ct-co-side .vi-encart.is-dark .vi-encart-body > p { color: rgba(255, 255, 255, .78); }
.ct-ar { font-family: Tahoma, 'Segoe UI', Arial, sans-serif; }
.ct-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; font-size: .92rem; line-height: 1.55; }
.ct-dl dt { font-weight: 600; color: var(--vi-txt); }
.ct-dl dd { margin: 0; color: var(--vi-sub); }
.ct-co-l { display: grid; gap: 2px; margin-top: 4px; }
.ct-co-l a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: .92rem; font-weight: 600; line-height: 1.35; color: var(--vi-ink); text-decoration: none; overflow-wrap: anywhere; }
.ct-co-l a:hover { color: var(--vi-rouge); text-decoration: underline; text-underline-offset: 3px; }
.ct-co-l .vi-ic { color: var(--vi-rouge); }
.ct-co-l .ct-wa-ic { color: #15803D; }
.ct-avis { margin-top: 20px; }

/* ══════════ 4. Tablette et téléphone ══════════ */
@media (max-width: 960px) {
    .ct-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "t" "f" "i"; row-gap: 28px; }
    .ct-t { padding-top: 0; }
    /* colonnes empilées : « Devis gratuit et sans engagement » reste seulement sous le bouton d'envoi */
    .ct-i .is-free { display: none; }
    .ct-co-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .ct-id .ct-wa-w { padding-top: calc(15px * 1.4 + 6px); }   /* étiquettes à 15 px sur tablette / téléphone */
    .ct-page .vi-hero.is-court .vi-hero-main { padding: 12px 0 48px; }
    .ct-grid { row-gap: 22px; }
    .ct-checks { margin: 0 0 22px; }
    .ct-k, .ct-map-note, .ct-map-card span, .ct-dl, .ct-co-l a, .ct-page .alert-msg,
    .ct-page .file-name, .ct-page .file-size { font-size: 15px; }
    .ct-co-l a { min-height: 44px; }
    .ct-map { min-height: 320px; }
    .ct-map-card { left: 12px; right: 12px; bottom: 12px; padding: 14px; }
    .ct-map-card .vi-btn { width: 100%; }
    .ct-page .vi-encart.is-dark .vi-encart-act, .ct-page .vi-encart.is-dark .vi-encart-act > .vi-btn { width: 100%; }
}
@media (max-width: 600px) {
    .ct-id .ct-wa-w, .ct-id .ct-wil-w { grid-column: auto; grid-row: auto; }
    .ct-id .ct-wa-w { padding-top: 0; }
    .ct-page .vi-opt.ct-sav { grid-column: 1 / -1; }
}
