/* ═══════════════════════════════════════════════════════════════
   AFFINAGE UI — Services (transport · déménagement · livraison)
   Fichier : css/services.css
   Chargé APRÈS style.css : n'altère que les pages de service.

   Intention : cette page n'est pas une vitrine, c'est un outil.
   L'utilisateur veut un prix, vite, sur son téléphone, souvent
   dehors en pleine lumière. D'où : sans-serif unique, contrastes
   soutenus, neutres légèrement chauds (moins fatigants au soleil
   que des gris bleutés), et zones tactiles généreuses.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Ancre de marque (inchangée : identité déjà installée) */
  --sv-bleu:        #1800ad;
  --sv-bleu-fonce:  #10007a;
  --sv-bleu-pale:   #eeebff;

  /* Neutres légèrement chauds — lisibilité en extérieur */
  --sv-encre:       #1a1725;
  --sv-encre-2:     #514c63;
  --sv-encre-3:     #86808f;
  --sv-trait:       #e5e1ea;
  --sv-fond:        #faf9fb;
  --sv-blanc:       #ffffff;

  /* Sémantique : chaque couleur porte un sens précis */
  --sv-depart:      #0d8a5f;   /* point A */
  --sv-arrivee:     #c8442f;   /* point B */
  --sv-attente:     #b8730a;   /* en cours, patience */
  --sv-succes:      #0d8a5f;

  --sv-r:      14px;   /* rayon standard */
  --sv-r-sm:   10px;
  --sv-tap:    46px;   /* hauteur tactile minimale */
}

/* ── Typographie : une seule famille sur les pages de service ──
   Les serif du site (Playfair, Cormorant) servent la vitrine
   immobilière ; ici elles nuisent à la lecture en petit corps. */
.sv-scope,
.sv-scope input, .sv-scope select, .sv-scope textarea, .sv-scope button {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.sv-scope { color: var(--sv-encre); }

.sv-titre {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
}
.sv-sous {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--sv-encre-2);
  max-width: 58ch;
  margin: 0 0 1.4rem;
}

/* ── Icônes : alignement et taille cohérents ── */
.sv-scope svg { display: inline-block; }
.sv-ico-rond {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sv-bleu-pale); color: var(--sv-bleu);
  flex-shrink: 0;
}

/* ── Choix du service : 3 options tactiles ── */
.sv-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: 1.2rem;
}
.sv-service {
  border: 1.5px solid var(--sv-trait);
  border-radius: var(--sv-r);
  background: var(--sv-blanc);
  padding: .85rem .5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  min-height: 84px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
}
.sv-service:hover { border-color: var(--sv-encre-3); }
.sv-service[aria-pressed="true"],
.sv-service.actif {
  border-color: var(--sv-bleu);
  background: var(--sv-bleu-pale);
  box-shadow: inset 0 0 0 1px var(--sv-bleu);
}
.sv-service-nom  { font-size: .82rem; font-weight: 700; line-height: 1.2; }
.sv-service-desc { font-size: .68rem; color: var(--sv-encre-3); line-height: 1.25; }
.sv-service svg  { color: var(--sv-bleu); }

/* ── Champs : hauteur tactile, 16px pour éviter le zoom iOS ── */
.sv-champ {
  width: 100%;
  min-height: var(--sv-tap);
  padding: .7rem .85rem .7rem 2.4rem;
  border: 1.5px solid var(--sv-trait);
  border-radius: var(--sv-r-sm);
  font-size: 16px;
  background: var(--sv-blanc);
  color: var(--sv-encre);
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.sv-champ:focus {
  outline: none;
  border-color: var(--sv-bleu);
  box-shadow: 0 0 0 3px rgba(24,0,173,.12);
}
.sv-champ-groupe { position: relative; }
.sv-champ-ico {
  position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  pointer-events: none; display: flex;
}
.sv-champ-ico.depart  { color: var(--sv-depart); }
.sv-champ-ico.arrivee { color: var(--sv-arrivee); }

.sv-label {
  display: block;
  font-size: .8rem; font-weight: 600;
  color: var(--sv-encre-2);
  margin-bottom: .35rem;
}

/* ── Boutons ── */
.sv-btn {
  width: 100%; min-height: var(--sv-tap);
  border: none; border-radius: var(--sv-r-sm);
  background: var(--sv-bleu); color: #fff;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background .15s;
}
.sv-btn:hover  { background: var(--sv-bleu-fonce); }
.sv-btn:active { transform: translateY(1px); }
.sv-btn-valider { background: var(--sv-succes); }
.sv-btn-valider:hover { background: #0a6f4c; }
.sv-btn-fin {
  background: var(--sv-blanc); color: var(--sv-encre-2);
  border: 1.5px solid var(--sv-trait);
}

/* Petit bouton d'appoint (ma position, appliquer…) */
.sv-btn-sec {
  min-height: 38px; padding: .45rem .8rem;
  border: 1.5px solid var(--sv-trait); border-radius: 8px;
  background: var(--sv-blanc); color: var(--sv-encre-2);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
}
.sv-btn-sec:hover { border-color: var(--sv-bleu); color: var(--sv-bleu); }

/* ── Résultat de l'estimation : le moment fort de la page ── */
.sv-resultat {
  border: 1.5px solid var(--sv-bleu);
  border-radius: var(--sv-r);
  background: var(--sv-blanc);
  overflow: hidden;
  margin-top: 1rem;
}
.sv-resultat-prix {
  background: var(--sv-bleu); color: #fff;
  padding: 1.1rem 1rem;
  text-align: center;
}
.sv-resultat-montant {
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 800; line-height: 1;
  letter-spacing: -.02em;
}
.sv-resultat-mention { font-size: .72rem; opacity: .8; margin-top: .3rem; }
.sv-resultat-detail {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--sv-trait);
}
.sv-resultat-detail > div {
  padding: .7rem .8rem; text-align: center;
  border-right: 1px solid var(--sv-trait);
}
.sv-resultat-detail > div:last-child { border-right: none; }
.sv-resultat-val { font-size: 1rem; font-weight: 700; }
.sv-resultat-lab { font-size: .7rem; color: var(--sv-encre-3); }

/* ── Étiquettes de majoration / promo ── */
.sv-tag {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .5rem; border-radius: 6px;
  font-size: .7rem; font-weight: 700;
}
.sv-tag-nuit  { background: #ede9fe; color: #4c1d95; }
.sv-tag-promo { background: #d1fae5; color: #065f46; }
.sv-tag-info  { background: #fef3c7; color: #78350f; }

/* ── Carte (Leaflet) ── */
.sv-carte {
  height: 260px; border-radius: var(--sv-r);
  overflow: hidden; border: 1.5px solid var(--sv-trait);
  margin-top: .9rem; position: relative;
}

/* ═══════════ MOBILE-FIRST : l'outil avant le décor ═══════════ */
@media (max-width: 900px) {
  /* Le hero décoratif rétrécit : le calculateur doit être vu vite */
  .dh { min-height: auto !important; }
  .dh .container {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
    padding-top: 5rem !important;
    padding-bottom: 1.5rem !important;
  }
  .dh-txt { text-align: left !important; }
  .dh-txt h1 { font-size: clamp(1.45rem, 6.5vw, 1.9rem) !important; }
  .dh-txt p  { font-size: .9rem !important; margin-bottom: 1rem !important; }
  .dh-acts   { justify-content: flex-start !important; }
  .dh-acts a { flex: 1 1 auto; text-align: center; }

  .est { max-width: 100% !important; margin: 0 !important; padding: 1.1rem .9rem !important; }
  .sv-carte { height: 220px; }
  .sv-services { gap: .4rem; }
  .sv-service { min-height: 76px; padding: .7rem .35rem; }
  .sv-service-nom { font-size: .76rem; }
  .sv-service-desc { display: none; }   /* on garde le nom, on coupe le superflu */
}

@media (max-width: 380px) {
  .sv-services { grid-template-columns: 1fr 1fr; }
  .sv-services > *:last-child { grid-column: 1 / -1; }
  .sv-resultat-detail { grid-template-columns: 1fr; }
  .sv-resultat-detail > div { border-right: none; border-bottom: 1px solid var(--sv-trait); }
}

/* ── Accessibilité : focus visible au clavier, motion réduite ── */
.sv-scope :focus-visible {
  outline: 2.5px solid var(--sv-bleu);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .sv-scope *, .sv-scope *::before, .sv-scope *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RÈGLE DE SÉCURITÉ — lisibilité sur fond coloré
   Tout élément posé sur un fond bleu plein reçoit un texte blanc,
   quelle que soit la règle qui s'appliquait avant.
   ═══════════════════════════════════════════════════════════════ */
.btn-primary, .btn-primary *,
.sv-btn, .sv-btn *,
.et-suivant, .et-suivant *,
.calc-btn, .calc-btn *,
.promo-btn, .promo-btn *,
.map-addr-ok,
.now-opt.active,
.svc-opt.active .svc-opt-nm,
.pill:has(input:checked),
.vol-card:has(input:checked) .vol-nm,
.sv-resultat-prix, .sv-resultat-prix * {
  color: #ffffff !important;
}
/* Les icônes suivent la couleur du texte de leur bouton */
.btn-primary svg, .sv-btn svg, .et-suivant svg, .calc-btn svg { color: inherit; }

/* Boutons d'appoint : fond clair, texte bleu foncé (contraste suffisant) */
.addr-btn, .sv-btn-sec {
  background: #ffffff;
  color: #1800ad;
  border-color: rgba(24,0,173,.25);
}
.addr-btn:hover, .sv-btn-sec:hover {
  background: rgba(24,0,173,.06);
  color: #12007a;
}
