/**
 * Synelio API Bundle - Base Styles
 *
 * These styles provide the base layout and structure for Synelio components.
 * Projects can override colors and branding by loading their own CSS after this file.
 */

/* ========================================
   AGENCY BAR - Professional User Banner
   ======================================== */
.synelio-agency-bar {
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.synelio-agency-bar-title {
  display: flex;
  align-items: center;
}

.synelio-agency-bar-links {
  display: flex;
  gap: 1.5rem;
}

.synelio-agency-bar-links a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.synelio-agency-bar-links a:hover {
  color: white;
  opacity: 1;
  text-decoration: underline;
}

/* ========================================
   AUTOCOMPLETE
   ======================================== */
.synelio-autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.25rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.synelio-autocomplete-results:empty {
  display: none;
}

.synelio-autocomplete-results .list-group-item {
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.synelio-autocomplete-results .list-group-item:hover {
  background-color: var(--bs-primary);
  color: white;
}

.synelio-autocomplete-results .list-group-item.active {
  background-color: var(--bs-primary);
  color: white;
}

.synelio-autocomplete-results .list-group-item.disabled {
  cursor: default;
  color: var(--bs-secondary);
}

.synelio-autocomplete-results .synelio-autocomplete-country {
  font-size: 0.75em;
  color: #bbb;
}

.synelio-autocomplete-results .list-group-item:hover .synelio-autocomplete-country,
.synelio-autocomplete-results .list-group-item.active .synelio-autocomplete-country {
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   LOADING STATE
   ======================================== */
.synelio-flight-search-loading {
  min-height: 400px;
  background: var(--bs-light);
  color: var(--bs-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.synelio-flight-search-loading .container {
  position: relative;
  z-index: 10;
}

.synelio-flight-search-loading h1 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.synelio-flight-search-loading h2 {
  font-size: 1.2rem;
  font-weight: normal;
  margin-top: 1rem;
}

.synelio-flight-search-loading .synelio-journey {
  font-size: 1rem;
  margin: 1rem 0;
}

.synelio-flight-search-loading .synelio-journey p {
  margin: 0.25rem 0;
  font-weight: 500;
}

@keyframes synelio-spin {
  to { transform: translateX(-50%) rotate(360deg); }
}

/* ========================================
   SEARCH RECAP BAR
   ======================================== */
.synelio-recap-bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.synelio-recap-segments {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.synelio-recap-segment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.synelio-recap-segment strong {
  font-size: 1rem;
}

.synelio-recap-arrow {
  font-weight: bold;
}

.synelio-recap-date {
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.synelio-recap-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.synelio-recap-pax,
.synelio-recap-cabin {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* ========================================
   FILTERS BAR
   ======================================== */
.synelio-filters-bar {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.synelio-filters-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.synelio-filters-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.synelio-filter-group {
  position: relative;
}

.synelio-filter-results {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bs-dark);
}

.synelio-filter-reset {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.875rem;
  color: var(--bs-primary);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  white-space: nowrap;
  margin-left: 0.75rem;
  text-decoration: none;
  visibility: visible;
  opacity: 1;
}

.synelio-filter-reset.synelio-filter-reset-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.synelio-filter-reset svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.synelio-filter-reset:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

.synelio-filter-reset:hover svg {
  transform: rotate(-45deg);
}

.synelio-filter-reset:active {
  opacity: 0.7;
}

.synelio-filter-dropdown {
  position: relative;
}

.synelio-filter-dropdown-btn {
  padding: 0.4rem 0.875rem;
  border: 1px solid #d0d0d0;
  background: white;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #5a5a5a;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.synelio-filter-dropdown-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.synelio-filter-dropdown-btn:hover {
  background: #f8f8f8;
  border-color: var(--bs-secondary);
  color: var(--bs-dark);
}

.synelio-filter-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 1000;
}

.synelio-filter-dropdown-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem;
}

.synelio-filter-radio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background 0.15s ease;
  margin: 0;
}

.synelio-filter-radio:hover {
  background: #f5f5f5;
}

.synelio-filter-radio.disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.synelio-filter-radio.disabled:hover {
  background: transparent;
}

.synelio-filter-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--bs-primary);
}

.synelio-filter-radio input[type="radio"]:disabled {
  cursor: not-allowed;
}

.synelio-filter-radio span {
  font-size: 0.875rem;
  color: var(--bs-dark);
  flex: 1;
}

.synelio-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background 0.15s ease;
  margin: 0;
}

.synelio-filter-checkbox:hover {
  background: #f5f5f5;
}

.synelio-filter-checkbox.disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.synelio-filter-checkbox.disabled:hover {
  background: transparent;
}

.synelio-filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--bs-primary);
}

.synelio-filter-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.synelio-filter-airline-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.synelio-filter-checkbox span {
  font-size: 0.875rem;
  color: var(--bs-dark);
  flex: 1;
}

.synelio-filter-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0.5rem 0;
}

/* Filters - Responsive */
@media (max-width: 992px) {
  .synelio-filters-right {
    gap: 0.5rem;
  }

  .synelio-filter-dropdown-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
}

@media (max-width: 768px) {
  .synelio-filters-bar {
    position: static;
  }

  .synelio-filters-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .synelio-filters-right {
    justify-content: space-between;
    width: 100%;
  }

  .synelio-filter-results {
    text-align: center;
  }

  .synelio-filter-dropdown-menu {
    right: auto;
    left: 0;
  }
}

/* ========================================
   FLIGHT OFFERS
   ======================================== */
.synelio-offer {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: all 0.15s ease;
}

.synelio-offer:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--bs-primary);
}

.synelio-offer-main {
  display: flex;
  align-items: center;
  width: 100%;
}

.synelio-offer-flights {
  flex: 1;
  /* Sans min-width:0, un enfant flex garde min-width:auto et refuse de se
     comprimer sous la largeur de son contenu : la rangée débordait la carte
     et poussait .synelio-offer-price-block hors de l'écran sur mobile. */
  min-width: 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.synelio-offer-flight {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  padding-right: 1rem;
  border-right: 1px solid var(--bs-border-color);
}

.synelio-offer-flight:last-child {
  padding-right: 0;
  border-right: none;
}

.synelio-offer-carrier {
  width: 40px;
  flex-shrink: 0;
}

.synelio-carrier-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
}

.synelio-offer-times {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}

.synelio-time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-dark);
}

.synelio-route {
  font-size: 0.75rem;
  color: var(--bs-secondary);
}

.synelio-offer-duration {
  flex: 1;
  /* Colonne élastique de la rangée : c'est elle qui doit absorber la
     compression, sinon les colonnes horaires fixes débordent la carte. */
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 1rem;
}

.synelio-duration-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.synelio-duration-line {
  width: 100%;
  height: 2px;
  background: var(--bs-border-color);
  position: relative;
}

.synelio-duration-line::before,
.synelio-duration-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--bs-secondary);
  border-radius: 50%;
  transform: translateY(-50%);
}

.synelio-duration-line::before { left: 0; }
.synelio-duration-line::after { right: 0; }

.synelio-duration-bottom {
  margin-top: 0.25rem;
}

.synelio-duration-text {
  font-size: 0.75rem;
  color: var(--bs-dark);
}

.synelio-stops {
  font-size: 0.7rem;
  color: var(--bs-secondary);
}

.synelio-offer-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  padding-left: 1.5rem;
  margin-left: 1rem;
  border-left: 1px solid var(--bs-border-color);
  min-width: 130px;
  align-self: center;
}

.synelio-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-primary);
}

.synelio-offer-price-block .btn {
  white-space: nowrap;
}

/* Toggle button with chevron */
.synelio-offer-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.synelio-offer-toggle:hover {
  color: var(--bs-primary);
}

.synelio-chevron {
  transition: transform 0.3s ease;
}

.synelio-chevron-open {
  transform: rotate(180deg);
}

/* ========================================
   FARE TYPE BADGES
   ======================================== */
.synelio-fare-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.synelio-fare-type--published {
  background-color: #e3f2fd;
  color: #1565c0;
}

.synelio-fare-type--negotiated {
  background-color: #fff3e0;
  color: #e65100;
}

.synelio-fare-type--corporate {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.synelio-fare-type--gds {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.synelio-fare-type--ndc {
  background-color: #fce4ec;
  color: #c2185b;
}

/* Fare info (booking class + fare basis) for agency users */
.synelio-offer-fare-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 45px;
}
.synelio-booking-class {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bs-primary, #0d6efd);
}
.synelio-fare-basis {
  font-size: 0.6rem;
  color: var(--bs-secondary-color, #6c757d);
  font-family: monospace;
}

/* ========================================
   BAGGAGE INFO
   ======================================== */
.synelio-baggage {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.8rem;
}

.synelio-baggage-icon {
  display: flex;
  align-items: center;
}

.synelio-baggage-qty {
  font-weight: 600;
  font-size: 0.75rem;
  color: #198754;
}

.synelio-baggage-included {
  color: #198754;
}

.synelio-baggage-none {
  color: #999;
  opacity: 0.6;
}

.synelio-baggage-cross {
  font-size: 0.7rem;
  color: #dc3545;
  margin-left: -0.1rem;
}

/* ========================================
   CORPORATE VARIANTS (AQC) — alternatives sous l'offre publiée
   Traitement "game changer" : bloc tinté chaud + accent brand + typographie punchy.
   La colonne action recopie .synelio-offer-price-block (min-width, padding-left,
   margin-left, border-left, align-items: flex-end) pour que les boutons des
   variantes tombent pixel-perfect sous "Sélectionner".
   ======================================== */
.synelio-offer-variants {
  position: relative;
  margin: 0.9rem -1.25rem -1rem;
  padding: 0.85rem 1.25rem 1rem;
  background: linear-gradient(
    180deg,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.05),
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.015) 60%,
    transparent
  );
  border-top: 1px solid color-mix(in srgb, var(--bs-primary, #0d6efd) 22%, transparent);
  border-bottom-left-radius: calc(0.5rem - 1px);
  border-bottom-right-radius: calc(0.5rem - 1px);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Titre de la section variants : "Autres options pour ce vol".
   Rendu une seule fois en haut de la section, aligné à droite. */
.synelio-offer-variants-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--bs-primary, #0d6efd);
  text-align: right;
}

.synelio-offer-variant {
  display: flex;
  align-items: center;
  width: 100%;
}

.synelio-offer-variant-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* contenu collé à droite, contre la barre verticale */
  justify-content: center;
  gap: 0.3rem;
}

/* Texte "N bagage(s) en soute (+M)" préfixé par une icône valise (SVG inline)
   pour rendre l'info plus visuelle. Couleur succès = signal de valeur. */
.synelio-offer-variant-bagsdiff {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bs-success, #198754);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.synelio-offer-variant-bagsdiff::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2.5 1a.5.5 0 0 0-.5.5V5h-.5A1.5 1.5 0 0 0 0 6.5v7a1.5 1.5 0 0 0 1 1.415v.335a.75.75 0 0 0 1.5 0V15H4v-1H1.5a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5H12v1h1.5v.25a.75.75 0 0 0 1.5 0v-.335a1.5 1.5 0 0 0 1-1.415v-7A1.5 1.5 0 0 0 14.5 5H14V1.5a.5.5 0 0 0-.5-.5h-11zM13 5H3V2h10v3z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2.5 1a.5.5 0 0 0-.5.5V5h-.5A1.5 1.5 0 0 0 0 6.5v7a1.5 1.5 0 0 0 1 1.415v.335a.75.75 0 0 0 1.5 0V15H4v-1H1.5a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5H12v1h1.5v.25a.75.75 0 0 0 1.5 0v-.335a1.5 1.5 0 0 0 1-1.415v-7A1.5 1.5 0 0 0 14.5 5H14V1.5a.5.5 0 0 0-.5-.5h-11zM13 5H3V2h10v3z'/></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Badges fareType plus punchy dans le contexte variant : fond solide + texte blanc */
.synelio-offer-variants .synelio-fare-type {
  padding: 0.28rem 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.synelio-offer-variants .synelio-fare-type--negotiated {
  background-color: #E65100;
  color: #FFFFFF;
}

.synelio-offer-variants .synelio-fare-type--corporate {
  background-color: #6A1B9A;
  color: #FFFFFF;
}

/* Groupe de badges sur une variante : Exclusivité + fareType (NÉGO/CORPO). */
.synelio-offer-variant-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Badge "Exclusivité <brand>" : positionnement premium — fond brand, texte blanc,
   étoile ambre en préfixe. C'est le badge porteur du positionnement sur chaque variante. */
.synelio-offer-variants .synelio-fare-type--exclusive {
  background-color: var(--bs-primary, #0d6efd);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: help;
}

.synelio-offer-variants .synelio-fare-type--exclusive::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  background-color: var(--bs-secondary, #FFA726);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z'/></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.synelio-offer-variant-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.4rem;
  padding-left: 1.5rem;
  margin-left: 1rem;
  border-left: 1px solid color-mix(in srgb, var(--bs-primary, #0d6efd) 18%, transparent);
  /* Largeur identique à .synelio-offer-price-block (130px min) pour que la barre
     verticale et le bouton tombent pixel-perfect sous "Sélectionner". */
  min-width: 130px;
}

.synelio-offer-variant-price {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.5rem;
  white-space: nowrap;
}

.synelio-offer-variant-price .synelio-price {
  font-size: 1.25rem;
}

.synelio-offer-variant-delta {
  font-size: 0.8rem;
  font-weight: 700;
}

.synelio-offer-variant-delta--higher {
  color: var(--bs-secondary, #6c757d);
}

.synelio-offer-variant-delta--lower {
  color: var(--bs-success, #198754);
}

/* Bouton variant : couleur ambre brand (--bs-secondary) pour trancher avec le
   rouge primary de "Sélectionner" — signal visuel "tarif négocié exclusif". */
.synelio-offer-variant-action .btn {
  white-space: nowrap;
  background-color: var(--bs-secondary, #FFA726);
  border-color: var(--bs-secondary, #FFA726);
  color: var(--bs-secondary-text-emphasis, #66430F);
  font-weight: 700;
}

.synelio-offer-variant-action .btn:hover,
.synelio-offer-variant-action .btn:focus {
  background-color: color-mix(in srgb, var(--bs-secondary, #FFA726) 88%, black);
  border-color: color-mix(in srgb, var(--bs-secondary, #FFA726) 88%, black);
  color: var(--bs-secondary-text-emphasis, #66430F);
}

/* ========================================
   OFFER DETAILS - Expandable section
   ======================================== */
.synelio-offer-details-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.75rem;
}

.synelio-offer-details {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  background: var(--bs-light);
  border-radius: 0.25rem;
}

.synelio-details-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.synelio-details-header strong {
  color: var(--bs-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.synelio-details-date {
  color: var(--bs-secondary-text-emphasis);
  font-size: 0.85rem;
}

.synelio-details-segment {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.synelio-details-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.synelio-details-time-point {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.synelio-details-time {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bs-dark);
}

.synelio-details-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bs-primary);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--bs-primary);
}

.synelio-details-line {
  flex: 1;
  width: 2px;
  background: var(--bs-primary);
  margin: 0.25rem 0;
  margin-right: 0.75rem;
  min-height: 40px;
  position: relative;
}

.synelio-details-duration {
  font-size: 0.75rem;
  color: var(--bs-secondary-text-emphasis);
  white-space: nowrap;
  padding-right: 0.75rem;
  border-right: 1px solid var(--bs-border-color);
}

.synelio-details-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.synelio-details-airport {
  display: flex;
  flex-direction: column;
}

.synelio-details-airport strong {
  font-size: 0.95rem;
  color: var(--bs-dark);
}

.synelio-details-airport span {
  font-size: 0.8rem;
  color: var(--bs-secondary-text-emphasis);
}

.synelio-details-terminal {
  font-size: 0.75rem;
  color: var(--bs-info);
}

.synelio-details-flight-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Sans wrap, le bloc bagages déborde le panneau dès que la colonne
     compagnie manque de place. Mesuré : nécessaire de 375 à 992 px, sans
     effet au-delà (hauteur identique wrap/nowrap à 1024, 1280 et 1440),
     d'où le placement en règle de base plutôt que sous un breakpoint.
     NB : .synelio-details-baggage ci-dessous déclare display:grid et
     flex-shrink:0, mais `.synelio-details-flight-info > div` (0,1,1) le
     bat et le résout en flex:1 — la grille deux colonnes n'a jamais pris. */
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  background: white;
  border-radius: 0.25rem;
}

.synelio-details-baggage {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.1rem 0.4rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--bs-border-color);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.synelio-details-baggage-label {
  color: var(--bs-secondary-text-emphasis);
  text-align: right;
}

.synelio-details-baggage-value {
  font-weight: 600;
  color: var(--bs-dark);
}

.synelio-details-carrier-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.synelio-details-flight-info > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
}

.synelio-details-carrier {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--bs-dark);
}

.synelio-details-flight-number {
  font-size: 0.8rem;
  color: var(--bs-secondary-text-emphasis);
}

.synelio-details-operated {
  font-size: 0.75rem;
  color: var(--bs-tertiary-color);
}

.synelio-details-aircraft {
  font-size: 0.75rem;
  color: var(--bs-tertiary-color);
}

.synelio-details-layover {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid var(--bs-warning);
  border-radius: 0 0.25rem 0.25rem 0;
  font-size: 0.85rem;
  color: var(--bs-dark);
}

.synelio-details-layover svg {
  color: var(--bs-warning);
}

/* ========================================
   BOOKING PAGES
   ======================================== */
.synelio-air-booking {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.synelio-air-booking h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 1rem;
}

.synelio-air-booking h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bs-dark);
  margin-bottom: 0.75rem;
}

.synelio-air-booking h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bs-primary);
}

.synelio-air-booking .card {
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.synelio-air-booking .card-body {
  padding: 1.25rem;
}

.synelio-air-booking .card.opacity-50 {
  background: var(--bs-light);
}

.synelio-air-booking .card.opacity-50 h2 {
  margin-bottom: 0;
  color: var(--bs-secondary);
}

.synelio-air-booking .synelio-sqa-recap {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.synelio-air-booking .synelio-sqa-recap .synelio-recap-bar {
  flex: 1;
}

.synelio-air-booking .synelio-sqa-recap .synelio-recap-segment strong {
  font-size: 1rem;
}

.synelio-air-booking .synelio-sqa-recap .synelio-recap-arrow {
  font-size: 1.1rem;
  margin: 0 0.25rem;
}

.synelio-air-booking .synelio-sqa-recap .synelio-recap-flag {
  font-size: 1.2rem;
}

.synelio-air-booking .synelio-sqa-recap .synelio-recap-info {
  font-size: 0.85rem;
}

.synelio-air-booking .synelio-sqa-recap .btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  flex-shrink: 0;
}

.synelio-air-booking .synelio-offer {
  margin-bottom: 0;
}

.synelio-air-booking .form-label {
  font-weight: 600;
  color: var(--bs-dark);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.synelio-air-booking .form-control,
.synelio-air-booking .form-select {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}

.synelio-air-booking .form-control:focus,
.synelio-air-booking .form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.synelio-air-booking .card .card {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-light);
}

.synelio-air-booking .card .card .card-body {
  padding: 1rem;
}

.synelio-air-booking .row > .col-md-6 > .card {
  height: 100%;
}

.synelio-air-booking .row > .col-md-6 > .card h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.synelio-air-booking .row > .col-md-6 > .card p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.synelio-air-booking .row > .col-md-6 > .card .h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0;
}

.synelio-air-booking .alert-info {
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.2);
  color: var(--bs-dark);
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
}

.synelio-air-booking .invalid-feedback,
.synelio-air-booking .form-error-message {
  font-size: 0.8rem;
}

/* ========================================
   RESPONSIVE - Offers
   ======================================== */
@media (max-width: 992px) {
  .synelio-offer-flights {
    flex-direction: column;
    gap: 0.75rem;
  }

  .synelio-offer-flight {
    padding-right: 0;
    border-right: none;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
  }

  .synelio-offer-flight:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  /* .synelio-offer est déjà flex-direction:column par défaut : c'est
     .synelio-offer-main qui porte la rangée « vols | prix ». Tant qu'elle
     restait en row, le bloc prix et le bouton « Sélectionner » sortaient de
     l'écran (mesuré : left 392 → right 522 sur un écran de 430). */
  .synelio-offer-main {
    flex-direction: column;
    align-items: stretch;
  }

  .synelio-offer-price-block {
    border-left: none;
    border-top: 1px solid var(--bs-border-color);
    padding-left: 0;
    padding-top: 1rem;
    margin-top: 1rem;
    margin-left: 0;
    min-width: 0;
    align-self: stretch;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Détail d'offre : aller et retour côte à côte rejetaient tout le panneau
     retour hors écran (left 449 → right 851 sur un écran de 430). */
  .synelio-offer-details-row {
    flex-direction: column;
  }

  /* La pastille chevron mesurait 19×32 et tombait sous le bord droit de
     l'écran : le détail était inatteignable au doigt en dessous de 430 px.
     La zone tactile est étendue par un ::after absolu — l'élargir vraiment
     coûterait 25 px à une rangée qui n'en a déjà plus. */
  .synelio-offer-toggle {
    position: relative;
    min-height: 44px;
    flex-shrink: 0;
  }

  .synelio-offer-toggle::after {
    content: '';
    position: absolute;
    inset: -6px -12px;
  }

  .synelio-offer-flight {
    gap: 0.5rem;
  }

  /* Durée et escales côte à côte cassaient « 1 escale(s) » en plein milieu
     dans une colonne réduite à ~105 px. */
  .synelio-duration-top {
    flex-direction: column;
    gap: 0.125rem;
  }

  /* 32 px de padding sur une colonne qui tombe à 50 px à 320 px, et à 52 px
     dans la variante agence (colonne classe/fare-basis en plus) : le texte
     des escales débordait alors sur les colonnes horaires voisines. */
  .synelio-offer-duration {
    padding: 0 0.5rem;
  }

  /* Variantes sur mobile : mêmes ajustements que la colonne prix publiée */
  .synelio-offer-variant {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .synelio-offer-variant-action {
    border-left: none;
    border-top: 1px dotted var(--bs-border-color);
    padding-left: 0;
    padding-top: 0.5rem;
    margin-left: 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
  }

  .synelio-offer-variant-action .btn {
    flex-shrink: 0;
  }

  .synelio-recap-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .synelio-recap-segments {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* .synelio-recap-info restait en row sans wrap : la pastille passagers
     (« 1 adulte + 1 enfant ») se cassait sur quatre lignes. */
  .synelio-recap-info {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .synelio-recap-date,
  .synelio-recap-pax,
  .synelio-recap-cabin {
    white-space: nowrap;
  }

  .synelio-air-booking .synelio-sqa-recap {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .synelio-air-booking .synelio-sqa-recap .synelio-recap-bar {
    flex-direction: column;
  }

  .synelio-air-booking .synelio-sqa-recap .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* ========================================
   BAGGAGE SELECTION
   ======================================== */
.synelio-baggage-card {
  background: white;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.synelio-baggage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-light);
}

.synelio-baggage-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.synelio-baggage-title svg {
  color: var(--bs-primary);
}

.synelio-baggage-title h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bs-dark);
}

.synelio-baggage-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.synelio-baggage-itineraries {
  display: flex;
  flex-direction: row;
}

.synelio-baggage-itinerary {
  flex: 1;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--bs-border-color);
}

.synelio-baggage-itinerary:last-child {
  border-right: none;
}

.synelio-baggage-itinerary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bs-primary);
}

.synelio-baggage-direction {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--bs-primary);
  letter-spacing: 0.025em;
}

.synelio-baggage-route {
  font-size: 0.85rem;
  color: var(--bs-secondary-text-emphasis);
  font-weight: 500;
}

.synelio-baggage-travelers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.synelio-baggage-traveler-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bs-light);
  border-radius: 0.375rem;
}

.synelio-baggage-traveler-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.synelio-baggage-traveler-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.synelio-baggage-traveler-badge--adult {
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
}

.synelio-baggage-traveler-badge--child {
  background: #e0f7fa;
  color: #00838f;
}

.synelio-baggage-traveler-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bs-dark);
}

.synelio-baggage-select {
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  background: white;
  cursor: pointer;
  min-width: 240px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.synelio-baggage-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
  outline: none;
}

.synelio-baggage-unavailable {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(108, 117, 125, 0.06);
  border-left: 3px solid var(--bs-secondary-text-emphasis);
  border-radius: 0 0.25rem 0.25rem 0;
  font-size: 0.85rem;
  color: var(--bs-secondary-text-emphasis);
}

.synelio-baggage-unavailable svg {
  color: var(--bs-secondary-text-emphasis);
  flex-shrink: 0;
}

.synelio-baggage-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-light);
}

.synelio-baggage-supplement-label {
  font-size: 0.85rem;
  color: var(--bs-secondary-text-emphasis);
}

.synelio-baggage-supplement-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-primary);
}

/* Baggage recap (shown on purchaser/travelers/paxleader pages) */
.synelio-baggage-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.synelio-baggage-modify-link {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--bs-primary);
  border-radius: 0.25rem;
  color: var(--bs-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.synelio-baggage-modify-link:hover {
  background: var(--bs-primary);
  color: white;
  text-decoration: none;
}

.synelio-baggage-recap-body {
  padding: 0.75rem 1.25rem;
}

.synelio-baggage-recap-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
}

.synelio-baggage-recap-row + .synelio-baggage-recap-row {
  border-top: 1px solid var(--bs-border-color);
}

.synelio-baggage-recap-selection {
  font-size: 0.85rem;
  color: var(--bs-dark);
  flex: 1;
}

.synelio-baggage-recap-none {
  font-size: 0.85rem;
  color: var(--bs-secondary-text-emphasis);
  font-style: italic;
}

/* Baggage - Responsive */
@media (max-width: 768px) {
  .synelio-baggage-itineraries {
    flex-direction: column;
  }

  .synelio-baggage-itinerary {
    border-right: none;
    border-bottom: 1px solid var(--bs-border-color);
  }

  .synelio-baggage-itinerary:last-child {
    border-bottom: none;
  }

  .synelio-baggage-traveler-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .synelio-baggage-select {
    min-width: auto;
    width: 100%;
  }
}

/* Flag input widget: drapeau rendu en background-image de l'input, contrôlé par
   la variable CSS --flag-url posée par le template (server-side) ou le JS
   (sur sélection autocomplete). Évite tout FOUC : le drapeau est visible dès
   le premier paint, sans dépendre de l'exécution du JS Stimulus. */
[data-controller~="tws-synelio--flag-input"] input[type="text"] {
    padding-left: 2.25rem;
    background-image: var(--flag-url, none);
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 24px 18px;
}
