/* =============================================================
   SmartWork — Funnel de réservation (modal)
   Hérite des tokens de styles.css. À charger APRÈS styles.css.
   ============================================================= */

body.sw-bloque { overflow: hidden; }

.sw-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 761px) { .sw-modal { align-items: center; } }
.sw-modal[hidden] { display: none; }

.sw-modal-fond {
  position: absolute; inset: 0;
  background: rgba(10, 59, 84, 0.62);
  backdrop-filter: blur(3px);
}

.sw-dialog {
  position: relative;
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  padding: 30px 24px 32px;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.3);
  animation: sw-monte 260ms cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 761px) {
  .sw-dialog { border-radius: var(--radius); padding: 38px 40px 40px; }
}
@keyframes sw-monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sw-dialog { animation: none; } }

.sw-fermer {
  position: absolute; top: 12px; right: 14px;
  width: 38px; height: 38px; border: none; background: transparent;
  font-size: 1.8rem; line-height: 1; color: var(--ink-soft); border-radius: 50%;
}
.sw-fermer:hover { background: var(--paper-2); color: var(--ink); }

/* Ligne d'en-tête : nom de l'espace (+ « Changer » au premier écran).
   Hauteur fixe : pas de saut quand la puce apparaît ou disparaît. */
.sw-eyebrow {
  display: flex; align-items: center; gap: 10px; min-height: 32px;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--blue-dark); margin-bottom: 14px;
  padding-right: 48px;                       /* jamais sous la croix de fermeture */
}
/* La croix, centrée sur cette ligne (30 px de marge haute + 16 = 46 ; 46 − 19 = 27). */
.sw-fermer { top: 27px; }
@media (min-width: 761px) { .sw-fermer { top: 35px; } }

/* ---------- « Changer » d'espace : une puce, pas un lien ---------- */
.sw-changer {
  position: relative; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px 0 11px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper); cursor: pointer;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: var(--ink);
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}
.sw-changer::before { content: ""; position: absolute; inset: -6px -4px; }   /* zone tactile ≥ 44 px */
.sw-changer svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--blue); }
.sw-changer:active { transform: scale(0.96); }
.sw-changer:focus-visible { border-radius: 999px; }
.sw-changer[hidden] { display: none; }
@media (hover: hover) {
  .sw-changer:hover { border-color: var(--blue); background: var(--paper-3); color: var(--blue-dark); }
}

/* ---------- Choix de l'espace (boutons « Réserver » généraux) ----------
   Même langage que les cartes des espaces sur le site : pastille jaune
   cerclée d'encre, carte qui se soulève, prix en mono avec montant gras. */
.sw-espaces { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.sw-espace {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 16px 16px 16px 14px; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  font-family: inherit; color: var(--ink);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.sw-espace:active { transform: scale(0.99); background: var(--paper-3); border-color: var(--blue); }
.sw-espace:focus-visible { border-radius: var(--radius); outline-offset: 2px; }
.sw-espace-icone {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--yellow-soft); border: 2px solid var(--ink); font-size: 1.3rem; line-height: 1;
}
.sw-espace-texte { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.sw-espace-texte strong {
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; line-height: 1.25; color: var(--ink);
}
.sw-espace-texte em { font-style: normal; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }
.sw-espace-prix {
  margin-top: 4px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap;
}
.sw-espace-prix b { font-weight: 600; font-size: 0.86rem; color: var(--ink); }
.sw-espace-fleche {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); color: var(--ink);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.sw-espace-fleche svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .sw-espace:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--shadow-soft); }
  .sw-espace:hover .sw-espace-fleche { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateX(2px); }
}
@media (max-width: 380px) {
  .sw-espace { gap: 12px; padding: 14px 12px; }
  .sw-espace-icone { width: 40px; height: 40px; font-size: 1.12rem; }
  .sw-espace-fleche { width: 30px; height: 30px; }
  .sw-espace-texte em { font-size: 0.82rem; }
  .sw-espace-prix { font-size: 0.74rem; }
  .sw-espace-prix b { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-espace, .sw-espace-fleche, .sw-changer { transition: none; }
  .sw-espace:hover, .sw-espace:active, .sw-changer:active { transform: none; }
}

/* ---------- Progression ---------- */
.sw-progres { display: flex; gap: 6px; margin-bottom: 24px; }
.sw-progres span {
  height: 4px; flex: 1; border-radius: 2px; background: var(--line);
  transition: background var(--transition);
}
.sw-progres span.is-fait { background: var(--blue); }

/* Conteneur des étapes : hauteur stable pour éviter que le modal
   ne saute à chaque changement d'étape. */
.sw-corps { min-height: 220px; }

/* ---------- Typo interne ---------- */
.sw-titre { font-size: 1.45rem; margin-bottom: 10px; line-height: 1.2; }
.sw-sous { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 24px; }
.sw-note { font-size: 0.86rem; color: var(--ink-soft); margin-top: 16px; font-style: italic; }

/* ---------- Champs ---------- */
.sw-champs { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.sw-champ { display: flex; flex-direction: column; gap: 7px; }
.sw-champ > span { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.sw-champ > span em { font-weight: 400; font-style: normal; color: var(--ink-soft); }
.sw-champ select,
.sw-champ input {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: var(--paper); width: 100%;
  appearance: none; -webkit-appearance: none;
}
.sw-champ select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%234A4A48' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px;
  padding-right: 40px;
}
.sw-champ select:focus, .sw-champ input:focus { border-color: var(--blue); outline: none; }

.sw-case { display: flex; align-items: center; gap: 11px; font-size: 0.94rem; color: var(--ink-soft); }
.sw-case input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }

.sw-erreur { color: #B3261E; font-size: 0.88rem; font-weight: 500; }
.sw-rgpd { font-size: 0.78rem; color: var(--ink-soft); margin-top: 14px; text-align: center; }

/* ---------- Boutons ---------- */
.sw-pleine { width: 100%; }
.sw-lien {
  display: inline-block; margin-top: 14px; background: none; border: none;
  color: var(--ink-soft); font-size: 0.89rem; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px; padding: 6px 0;
}
.sw-lien:hover { color: var(--blue-dark); }
.sw-lien-bloc { display: block; text-align: center; width: 100%; }

/* ---------- Le devis (pièce maîtresse) ---------- */
.sw-devis {
  background: var(--blue-ink); color: #fff;
  border-radius: var(--radius); padding: 26px 24px; margin-bottom: 18px;
}
.sw-devis-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--yellow); margin-bottom: 10px;
}
.sw-devis-formule { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; margin-bottom: 6px; }
.sw-devis-prix {
  font-family: var(--font-display); font-size: 2.3rem; font-weight: 700;
  line-height: 1.1; letter-spacing: -0.02em;
}
.sw-devis-prix span { font-size: 0.95rem; font-weight: 500; opacity: 0.7; margin-left: 4px; }
.sw-devis-detail { font-size: 0.88rem; color: rgba(255, 255, 255, 0.72); margin-top: 8px; }
.sw-devis-bonus { font-size: 0.88rem; color: var(--yellow); margin-top: 10px; }
.sw-devis-reserve {
  font-size: 0.85rem; color: #FFD9A0; margin-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2); padding-top: 10px;
}

/* ---------- Encarts ---------- */
.sw-encart { border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 18px; font-size: 0.93rem; }
.sw-encart-vert { background: #E8F6EC; border: 1.5px solid #B6E0C2; color: #14532D; }
.sw-encart-jaune { background: var(--yellow-soft); border: 1.5px solid var(--yellow-deep); color: #5A4A00; }
.sw-encart strong { font-weight: 700; }

/* ---------- Autres formules ---------- */
.sw-autres { margin-bottom: 20px; }
.sw-autres summary {
  cursor: pointer; font-size: 0.89rem; font-weight: 600; color: var(--blue-dark);
  list-style: none; padding: 8px 0;
}
.sw-autres summary::-webkit-details-marker { display: none; }
.sw-autres summary::before { content: "+ "; }
.sw-autres[open] summary::before { content: "− "; }
.sw-autres ul { border-top: 1px solid var(--line); margin-top: 6px; }
.sw-autres li {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono); font-size: 0.86rem; color: var(--ink-soft);
}
.sw-autres li strong { color: var(--ink); white-space: nowrap; }

/* ---------- Les 5 intentions ---------- */
.sw-intentions { display: flex; flex-direction: column; gap: 10px; }
.sw-intention {
  display: flex; align-items: flex-start; gap: 14px; text-align: left; width: 100%;
  padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); font-family: inherit;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.sw-intention:hover { border-color: var(--blue); background: var(--paper-3); transform: translateX(2px); }
.sw-intention-icone { font-size: 1.35rem; line-height: 1.2; flex-shrink: 0; }
.sw-intention-texte { display: flex; flex-direction: column; gap: 3px; }
.sw-intention-texte strong { font-size: 0.99rem; font-weight: 600; color: var(--ink); }
.sw-intention-texte em { font-style: normal; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.45; }

/* ---------- Confirmation ---------- */
.sw-ok { text-align: center; }
.sw-ok-pastille {
  width: 60px; height: 60px; border-radius: 50%; margin: 4px auto 18px;
  background: var(--yellow); border: 2.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 700; color: var(--ink);
}
.sw-ref {
  font-family: var(--font-mono); font-size: 0.88rem; color: var(--ink-soft);
  background: var(--paper-2); border: 1px dashed var(--line);
  border-radius: var(--radius-sm); padding: 11px; margin-bottom: 20px;
}
.sw-ref strong { color: var(--ink); letter-spacing: 0.05em; }

/* =============================================================
   Barre d'action fixe sur mobile
   ============================================================= */
.sw-barre { display: none; }
@media (max-width: 760px) {
  .sw-barre {
    display: flex; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .sw-barre .btn { flex: 1; padding: 13px 10px; font-size: 0.93rem; box-shadow: none; }
  .sw-barre .btn-primary { box-shadow: 0 4px 0 var(--blue-dark); }
  body { padding-bottom: 74px; }
  .sw-modal { z-index: 300; }
}

/* =============================================================
   Avis clients
   ============================================================= */
.section-avis { background: var(--paper-2); }
.avis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.avis {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 14px;
}
.avis-note { color: var(--yellow-deep); font-size: 1rem; letter-spacing: 2px; }
.avis blockquote { margin: 0; font-size: 0.97rem; color: var(--ink); line-height: 1.6; }
.avis-auteur { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avis-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  flex: 0 0 44px;
}
.avis-avatar-bleu { background: #DCEFF8; color: #12577B; }
.avis-avatar-corail { background: #FCE4DE; color: #873A2E; }
.avis-avatar-vert { background: #E3F2E7; color: #245A36; }
.avis-avatar-jaune { background: #FFF2C2; color: #644F00; }
.avis-google {
  display: flex; justify-content: center; margin-top: 28px;
}
.avis-auteur-nom { font-weight: 600; font-size: 0.92rem; }
.avis-auteur-role { font-size: 0.82rem; color: var(--ink-soft); }
@media (max-width: 980px) { .avis-grid { grid-template-columns: 1fr; } }

/* =============================================================
   Bloc "comment venir"
   ============================================================= */
.loc-trajets { margin-top: 32px; }
.loc-trajets h3 { font-size: 1.02rem; margin-bottom: 14px; }
.loc-trajets ul { display: flex; flex-wrap: wrap; gap: 10px; }
.loc-trajets li {
  font-family: var(--font-mono); font-size: 0.84rem; color: var(--ink-soft);
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 15px;
}

/* ---------- Horaires début / fin ---------- */
.sw-duo{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.sw-duree{
  font-family:var(--font-mono); font-size:0.86rem; color:var(--blue-dark);
  background:var(--paper-3); border-radius:var(--radius-sm);
  padding:9px 12px; margin-top:-4px;
}
.sw-duree.is-erreur{ color:#B3261E; background:#FDECEA; }

/* ---------- Champ libre (besoin combiné) ---------- */
.sw-champ textarea{
  font-family:inherit; font-size:1rem; color:var(--ink); line-height:1.5;
  padding:13px 14px; border:1.5px solid var(--line);
  border-radius:var(--radius-sm); background:var(--paper);
  width:100%; resize:vertical;
}
.sw-champ textarea:focus{ border-color:var(--blue); outline:none; }

/* iOS : un champ date vide s'écrase sans hauteur minimale. */
.sw-champ input[type="date"] { min-height: 50px; }
.sw-champ select:disabled { color: var(--ink-soft); background-color: var(--paper-2); }

/* Masqué à l'écran, lu par les lecteurs d'écran. */
.sw-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =============================================================
   Voie « Quelques heures »
   ============================================================= */

/* ---------- Sélecteur de voie (segmented control) ----------
   Deux options, un curseur qui glisse. Radios natifs dessous :
   clavier (flèches) et lecteurs d'écran fonctionnent d'office. */
.sw-segment {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; margin-bottom: 22px;
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 999px;
}
.sw-segment::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 999px; background: var(--paper);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08), 0 6px 14px -6px rgba(17, 17, 17, 0.25);
  transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
}
.sw-segment[data-actif="heures"]::before { transform: translateX(100%); }
.sw-segment-opt {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 10px; border-radius: 999px; cursor: pointer;
  font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); text-align: center;
  transition: color var(--transition);
}
.sw-segment-opt:hover { color: var(--ink); }
.sw-segment-opt.is-actif { color: var(--ink); }
.sw-segment-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.sw-segment-opt input:focus-visible + span {
  outline: 3px solid var(--blue); outline-offset: 6px; border-radius: 999px;
}

/* ---------- Puces de durée ---------- */
.sw-puces { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.sw-puces-grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sw-puce { position: relative; }
.sw-puce input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.sw-puce span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 54px; padding: 6px 4px; line-height: 1.1;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--ink);
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.sw-puce span small {
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
  color: var(--ink-soft); margin-top: 3px;
}
.sw-puce:hover span { border-color: var(--blue); }
.sw-puce input:checked + span {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 3px 0 var(--blue-dark); transform: translateY(-2px);
}
.sw-puce input:checked + span small { color: rgba(255, 255, 255, 0.82); }
.sw-puce input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Jour + heure d'arrivée ----------
   Le champ date a besoin de place ; l'heure, beaucoup moins. */
.sw-duo-creneau { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }

/* ---------- Ligne d'aide (horaires) ---------- */
.sw-aide {
  font-size: 0.84rem; color: var(--blue-dark); background: var(--paper-3);
  border-radius: var(--radius-sm); padding: 9px 12px; margin: 10px 0 0;
}

/* ---------- Prix en direct ---------- */
.sw-prix {
  background: var(--blue-ink); color: #fff;
  border-radius: var(--radius); padding: 18px 20px; margin: 16px 0 18px;
}
.sw-prix-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sw-prix-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--yellow);
}
.sw-prix-montant {
  font-family: var(--font-display); font-size: 1.95rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sw-prix-formule {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; font-weight: 600; font-size: 0.97rem;
}
.sw-prix-gain {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  background: var(--yellow); color: var(--ink); padding: 3px 9px; border-radius: 999px;
}
.sw-prix-detail { font-size: 0.86rem; color: rgba(255, 255, 255, 0.72); margin-top: 3px; }
.sw-prix-dimanche {
  font-size: 0.86rem; color: #FFD9A0; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}
.sw-prix.is-maj .sw-prix-montant { animation: sw-pop 280ms cubic-bezier(.2, .8, .2, 1); }
@keyframes sw-pop { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Récapitulatif (étape coordonnées) ---------- */
.sw-recap {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; margin-bottom: 20px;
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
.sw-recap-titre { font-weight: 600; font-size: 0.97rem; color: var(--ink); }
.sw-recap-sous { font-size: 0.86rem; color: var(--ink-soft); margin-top: 2px; }
.sw-recap-modifier { margin: 2px 0 0; padding: 4px 0; font-size: 0.84rem; }
.sw-recap-prix {
  font-family: var(--font-display); font-size: 1.2rem; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Petits écrans (≤ 380 px) : tout tient sur une ligne ---------- */
@media (max-width: 380px) {
  .sw-segment-opt { font-size: 0.84rem; padding: 8px 4px; }
  .sw-puces-grille { gap: 6px; }
  .sw-puce span { font-size: 0.95rem; min-height: 50px; }
  .sw-duo-creneau { gap: 10px; }
  .sw-duo-creneau select { padding-left: 12px; padding-right: 34px; background-position: right 8px center; }
  .sw-prix { padding: 16px; }
  .sw-prix-montant { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-segment::before, .sw-puce span { transition: none; }
  .sw-puce input:checked + span { transform: none; }
  .sw-prix.is-maj .sw-prix-montant { animation: none; }
}
