/* search-widget.css — extrait fidèle de la barre de recherche de la home (calendrier + passagers + classe). */

.cal-popup {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 200;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(12, 31, 61, 0.16);
  padding: 18px;
  display: none;
  width: max-content;
  max-width: min(600px, calc(100vw - 40px));
}
.cal-popup.open { display: block; animation: calFadeIn 0.16s ease-out; }
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.cal-nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background 0.12s;
  flex-shrink: 0;
}
.cal-nav:hover { background: var(--line-soft); }
.cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.cal-nav svg { width: 18px; height: 18px; }
.cal-months-labels {
  flex: 1;
  display: flex;
  justify-content: space-around;
  gap: 40px;
}
.cal-month-label {
  font-family: var(--disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-transform: capitalize;
}
.cal-grids {
  display: flex;
  gap: 28px;
}
.cal-grid { width: 260px; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  padding: 4px 0;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
}
.cal-day.empty { cursor: default; }
.cal-day.disabled { color: var(--line); cursor: not-allowed; }
.cal-day:not(.disabled):not(.empty):hover { background: var(--sky-soft); }
.cal-day.today { font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line); }
.cal-day.selected-dep,
.cal-day.selected-ret {
  background: var(--sky);
  color: #fff;
  font-weight: 700;
}
.cal-day.in-range {
  background: var(--sky-soft);
  border-radius: 0;
  color: var(--sky-deep);
}
.cal-day.selected-dep { border-radius: 8px 0 0 8px; }
.cal-day.selected-ret { border-radius: 0 8px 8px 0; }
.cal-day.selected-dep.single-day,
.cal-day.selected-ret.single-day { border-radius: 8px; }
.cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  gap: 12px;
}
.cal-hint { font-size: 12.5px; color: var(--ink-soft); }
.cal-done {
  background: var(--sky);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background 0.12s;
  flex-shrink: 0;
}
.cal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cal-reset {
  background: transparent;
  color: var(--muted, #8A8678);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.cal-reset:hover { background: var(--line-soft); color: var(--ink); }
/* En-tête mobile : masqué sur desktop, affiché en plein écran sur mobile */
.cal-mobile-header { display: none; }
.cal-done:hover { background: var(--sky-deep); }
/* ════════════════════════════════════════════════════════════════
   AUTOCOMPLETE — Suggestions de villes/aéroports
   ════════════════════════════════════════════════════════════════ */
.ac-list {
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  margin-top: 6px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
.ac-list.open { display: block; }
.ac-item {
  padding: 11px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.1s;
  border-bottom: 1px solid var(--line-soft);
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.focused {
  background: var(--sky-soft);
}
.ac-flag {
  font-size: 20px;
  line-height: 1;
}
.ac-info { flex: 1; min-width: 0; }
.ac-city {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac-airport {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac-code {
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}
/* ════════════════════════════════════════════════════════════════
   POPUP PASSAGERS
   ════════════════════════════════════════════════════════════════ */
.pax-popup {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  margin-top: 6px;
  padding: 16px;
  min-width: 280px;
  display: none;
  z-index: 200;
}
.pax-popup.open { display: block; }
/* Verrouiller le scroll de la page quand la popup est ouverte (desktop + mobile) */
body.pax-open {
  overflow: hidden;
  /* Compensation de la barre de scroll pour éviter le "jump" */
  padding-right: var(--scrollbar-width, 0);
}
.pax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pax-row:last-of-type { border-bottom: 0; }
.pax-label { font-size: 14px; }
.pax-label .pax-sub { font-size: 11px; color: var(--muted); display: block; }
.pax-counter {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pax-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.15s;
}
.pax-btn:hover { background: var(--sky-soft); color: var(--sky-deep); }
.pax-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pax-count {
  min-width: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}
.pax-cabin {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pax-cabin-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.pax-cabin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pax-cabin-btn {
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.pax-cabin-btn.on {
  background: var(--sky);
  color: #fff;
  border-color: var(--sky-deep);
  font-weight: 600;
}
.pax-done {
  width: 100%;
  margin-top: 12px;
  background: var(--ink);
  color: #fff;
  padding: 10px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 13px;
}
/* Popup Passagers premium */
.pax-popup {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: 360px !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(12,31,61,.08) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 20px 60px rgba(12,31,61,.15) !important;
  z-index: 100 !important;
  display: none;
  font-family: 'Inter', sans-serif !important;
}
.pax-popup.open {
  display: block !important;
  animation: paxFade .2s ease;
}
/* Titre de section Instrument Serif italique */
.pax-section-title {
  font-family: 'Instrument Serif', serif !important;
  font-style: italic !important;
  font-size: 15px !important;
  color: #0C1F3D !important;
  margin-bottom: 14px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  padding: 0 !important;
}
.pax-cabin-title {
  margin-bottom: 12px !important;
}
/* Ligne passager (Adultes/Enfants/Bébés) */
.pax-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(12,31,61,.06) !important;
}
.pax-row:last-of-type {
  border-bottom: none !important;
}
.pax-label {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
.pax-label > span:first-child {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #0C1F3D !important;
  line-height: 1.2 !important;
}
.pax-sub {
  font-size: 12px !important;
  color: #8A8678 !important;
  font-weight: 400 !important;
}
/* Compteur +/- */
.pax-counter {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}
.pax-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(12,31,61,.15) !important;
  background: #FFFFFF !important;
  color: #0C1F3D !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all .15s ease !important;
  font-family: 'Inter', sans-serif !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 0 !important;
}
.pax-btn:hover:not(:disabled) {
  border-color: #1E90FF !important;
  color: #1E90FF !important;
  transform: scale(1.05) !important;
}
.pax-btn:disabled {
  opacity: .3 !important;
  cursor: not-allowed !important;
}
.pax-btn svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
}
.pax-count {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0C1F3D !important;
  min-width: 16px !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums !important;
}
/* Séparateur entre passagers et classe */
.pax-divider {
  height: 1px !important;
  background: rgba(12,31,61,.08) !important;
  margin: 16px -24px !important;
}
/* Zone Cabine */
.pax-cabin {
  margin-top: 0 !important;
}
.pax-cabin-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}
.pax-cabin-btn {
  padding: 12px 14px !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(12,31,61,.15) !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #4A5568 !important;
  cursor: pointer !important;
  transition: all .15s ease !important;
  font-family: 'Inter', sans-serif !important;
  text-align: center !important;
  line-height: 1.2 !important;
}
.pax-cabin-btn:hover:not(.on) {
  background: #F7F6F1 !important;
  color: #0C1F3D !important;
  border-color: rgba(12,31,61,.25) !important;
}
.pax-cabin-btn.on {
  background: #0C1F3D !important;
  color: #FFFFFF !important;
  border-color: #0C1F3D !important;
  font-weight: 600 !important;
}
/* Bouton Valider */
.pax-done {
  width: 100% !important;
  margin-top: 16px !important;
  padding: 14px !important;
  background: #0C1F3D !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: 'Inter', sans-serif !important;
  transition: background .15s ease !important;
}
.pax-done:hover {
  background: #1a3057 !important;
}
/* Cacher l'ancien label texte si présent */
.pax-cabin-label {
  display: none !important;
}

/* ── Responsive (dont calendrier plein écran mobile) ── */



/* ── Responsive (calendrier plein écran mobile, passagers) ── */
@media (max-width: 720px) {
  .cal-mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .cal-close {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; cursor: pointer; border: none;
  }
  .cal-close svg { width: 18px; height: 18px; }
  .cal-mobile-titles { display: flex; flex-direction: column; gap: 2px; }
  .cal-mobile-title { font-size: 15px; font-weight: 700; color: var(--ink); }
  .cal-mobile-hint { font-size: 11px; color: var(--muted, #8A8678); }
}

@media (max-width: 720px) {
  .cal-popup {
    position: fixed;
    inset: 0 !important;
    top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    padding: 0;
    overflow: hidden;
  }
  .cal-popup.open {
    display: flex;
    flex-direction: column;
    animation: calSlideUp 0.24s ease-out;
  }
  @keyframes calSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .cal-header { padding: 14px 16px 0; margin: 0; flex-shrink: 0; }
  .cal-grids {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    flex-direction: column;
    gap: 24px;
    -webkit-overflow-scrolling: touch;
  }
  .cal-grid { width: 100%; }
  .cal-month-label-1 { display: none; }
  .cal-months-labels { justify-content: center; }
  .cal-footer {
    padding: 14px 16px;
    margin: 0;
    flex-shrink: 0;
    background: var(--paper);
  }
}

@media (min-width: 721px) {
  body.pax-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(12, 31, 61, 0.10);
    z-index: 199;
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  /* Overlay sombre full-screen (séparé de la popup pour bon contraste) */
  body.pax-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(12, 31, 61, 0.45);
    z-index: 199;
    pointer-events: none;
  }
  .pax-popup {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    min-width: 0;
    padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px -10px rgba(0,0,0,0.3);
    max-height: 85vh;
    overflow-y: auto;
    border: 0;
    background: #ffffff;
    z-index: 200;
  }
  /* Petit indicateur "drag handle" en haut */
  .pax-popup::before {
    content: '';
    display: block;
    width: 44px;
    height: 5px;
    background: #D1D5DB;
    border-radius: 3px;
    margin: -4px auto 18px;
  }
  /* Espace + lisibilité sur mobile */
  .pax-row { padding: 14px 0; }
  .pax-label { font-size: 15px; font-weight: 500; }
  .pax-label .pax-sub { font-size: 12px; margin-top: 2px; }
  .pax-btn { width: 34px; height: 34px; font-size: 18px; }
  .pax-count { font-size: 16px; min-width: 20px; }
  .pax-cabin { margin-top: 16px; padding-top: 18px; }
  .pax-cabin-btn { padding: 12px 10px; font-size: 13px; }
  .pax-done { padding: 14px; font-size: 15px; margin-top: 16px; }
}

@media (max-width: 720px) {
  .pax-popup {
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 28px 24px 32px !important;
    box-shadow: 0 -20px 60px rgba(0,0,0,.25) !important;
    z-index: 9999 !important;
  }
  .pax-divider {
    margin: 16px -24px !important;
  }
}

/* ── Conteneur barre de recherche (style fiche validé) ── */
.epf-search{--ink:#0C1F3D;--ink-soft:#3D4E6A;--bg:#F7F6F1;--paper:#fff;--line:#E5E2D9;--muted:#8A8678;--sky:#1E90FF;--sky-deep:#0F5FB8}
.epf-bar{background:#fff;border:1px solid var(--line);border-radius:16px;padding:9px;display:flex;gap:6px;align-items:stretch;box-shadow:0 8px 30px rgba(12,31,61,.07)}
.epf-field{flex:1;min-width:120px;position:relative;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:9px 14px;border-radius:11px;transition:background .15s;cursor:pointer}
.epf-field:hover{background:var(--bg)}
.epf-lbl{font-size:10.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.epf-val{font-size:15px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:6px}
.epf-val .geo{color:var(--sky-deep);font-size:11px;font-weight:600}
.epf-val .chev{width:13px;height:13px;stroke:var(--muted);stroke-width:2.4;fill:none;margin-left:auto}
.epf-input{border:0;background:transparent;font:inherit;font-size:15px;font-weight:600;color:var(--ink);padding:0;width:100%;outline:none}
.epf-sep{width:1px;background:var(--line);margin:8px 0}
.epf-go{background:var(--sky);color:#fff;border:0;border-radius:11px;padding:0 24px;display:flex;align-items:center;gap:9px;font-weight:600;font-size:15px;cursor:pointer;transition:background .15s;font-family:inherit}
.epf-go:hover{background:var(--sky-deep)}
.epf-go svg{width:18px;height:18px;stroke:#fff;stroke-width:2.4;fill:none;stroke-linecap:round}
.epf-hint{font-size:12px;color:var(--muted);margin-top:10px;padding-left:6px}
.epf-ac{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(12,31,61,.12);z-index:60;max-height:260px;overflow-y:auto;display:none}
.epf-ac.open{display:block}
.epf-ac-item{padding:10px 14px;font-size:14px;cursor:pointer;display:flex;justify-content:space-between;gap:10px}
.epf-ac-item:hover,.epf-ac-item.active{background:var(--bg)}
.epf-ac-item .code{color:var(--muted);font-weight:600;font-size:12px}
@media(max-width:760px){.epf-bar{flex-wrap:wrap}.epf-sep{display:none}.epf-go{width:100%;justify-content:center;padding:13px}}
/* Overlay derrière les popups (mobile plein écran) */
.epf-overlay{position:fixed;inset:0;background:rgba(12,31,61,.4);z-index:400;display:none}
.epf-overlay.open{display:block}

/* ── Auto-suffisance des popups (variables + z-index au-dessus de l'overlay) ── */
.cal-popup, .pax-popup, .epf-overlay, .epf-bar {
  --ink:#0C1F3D;--ink-soft:#3D4E6A;--bg:#F7F6F1;--paper:#FFFFFF;--line:#E5E2D9;--line-soft:#F0EDE3;--muted:#8A8678;
  --sky:#1E90FF;--sky-deep:#0F5FB8;--sun:#E89C2A;--green:#2D9B5F;
  --r:14px;--r-sm:8px;--r-lg:20px;
  --shadow:0 1px 2px rgba(12,31,61,.04),0 2px 8px rgba(12,31,61,.06);--shadow-lg:0 4px 24px rgba(12,31,61,.08);
}
.cal-popup, .pax-popup { z-index:500; }
