/* ============================================================
   detail-airbnb.css — Design type Airbnb pour toutes les fiches
   ============================================================ */

/* ── BASE ── */
html, body {
  overflow-y: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
.panel-left > .detail-hero-wrap:first-child { margin-top: 0 !important; }

/* ── HIDE OLD HEADER ── */
.header { display: none !important; }

/* ── FLOATING NAV (boutons sur la photo) ── */
.float-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  pointer-events: none;
}
.float-nav > * { pointer-events: auto; }
.float-nav-right { display: flex; gap: 8px; }

/* Toujours blanc (boutons sur la photo, pas sur la carte) */
.btn-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: transform .12s;
  color: #1d1d1f !important;
}
.btn-circle:active { transform: scale(.9); }
/* Même en dark mode — les boutons flottent sur la photo, pas sur la carte */
html[data-theme="dark"] .btn-circle {
  background: rgba(255,255,255,0.92) !important;
  color: #1d1d1f !important;
}

/* ── SPLIT: colonne unique ── */
.split { display: block !important; height: auto !important; padding-top: 0 !important; overflow: visible !important; }

/* ── PANEL-LEFT: pleine largeur ── */
.panel-left {
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  overflow: visible !important;
  border-right: none !important;
  border-bottom: none !important;
  display: block !important;
}

/* ── HERO (photo plein écran, haute) ── */
.detail-hero-wrap { position: relative; overflow: hidden; flex-shrink: 0; display: block; }
.detail-hero-img {
  width: 100% !important;
  height: 56vh !important;          /* 56% de la hauteur écran — imposant comme Airbnb */
  min-height: 300px !important;
  max-height: 620px !important;
  object-fit: cover !important;
  display: block !important;
}

/* Placeholder emoji : caché par défaut, visible si image échoue */
.detail-hero-placeholder {
  display: none !important;
  width: 100%;
  height: 56vh;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: var(--color-surface);
}
.detail-hero-placeholder.visible { display: flex !important; }

/* Dégradé EN OVERLAY sur la photo (position absolute = ne crée PAS d'espace) */
.detail-hero-grad {
  position: absolute !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important;
  height: 160px !important;
  background: linear-gradient(to top, rgba(0,0,0,0.38), transparent) !important;
  pointer-events: none !important;
}

/* Compteur de photos */
.hero-photo-count {
  position: absolute;
  bottom: 36px; right: 16px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── PANEL-BODY → CARTE BLANCHE avec bords arrondis ── */
.panel-body {
  /* Toujours blanc en clair, #1c1c1e en sombre — jamais le même noir que la photo */
  background: #ffffff !important;
  /* Redéfinit les variables CSS à l'intérieur de la carte pour un contraste correct */
  --color-bg: #ffffff;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-text-tertiary: #a0a0a8;
  --color-surface: #f5f5f7;
  --color-border: #e8e8ed;
  --color-primary: #1d1d1f;

  border-radius: 28px 28px 0 0 !important;   /* plus arrondi qu'avant */
  margin-top: -28px !important;              /* chevauche la photo */
  position: relative !important;
  z-index: 10 !important;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 100px) !important;
  /* Ombre pour séparer visuellement la carte de la photo */
  box-shadow: 0 -6px 24px rgba(0,0,0,0.18) !important;
}

/* Mode sombre : carte distincte de la photo (pas le même noir) */
html[data-theme="dark"] .panel-body {
  background: #1c1c1e !important;
  --color-bg: #1c1c1e;
  --color-text: #f2f2f5;
  --color-text-secondary: #9a9aa2;
  --color-text-tertiary: #6a6a72;
  --color-surface: #2c2c2e;
  --color-border: #3a3a3c;
  --color-primary: #f2f2f5;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .panel-body {
    background: #1c1c1e !important;
    --color-bg: #1c1c1e;
    --color-text: #f2f2f5;
    --color-text-secondary: #9a9aa2;
    --color-text-tertiary: #6a6a72;
    --color-surface: #2c2c2e;
    --color-border: #3a3a3c;
    --color-primary: #f2f2f5;
  }
}

/* ── TITRE SECTION ── */
.ab-head { padding: 28px 24px 14px; }
.ab-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  color: var(--color-text) !important;
  margin: 0 0 6px !important;
}
.ab-sub {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 12px;
}

/* Chips sur une seule ligne scrollable (pas de retour à la ligne) */
.filter-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
  margin: 10px 0 0;
  padding-bottom: 4px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 100px;
  background: var(--color-surface); color: var(--color-text);
  font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.filter-chip.chip-metier { background: #fef9e7; border-color: #fbeac1; color: #7a5b00; }
.filter-chip.chip-eco    { background: #e7f8ee; border-color: #c2eed4; color: #0f5132; }
html[data-theme="dark"] .filter-chip.chip-metier { background: rgba(212,168,71,.12); border-color: rgba(212,168,71,.25); color: #d4a847; }
html[data-theme="dark"] .filter-chip.chip-eco    { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.2); color: #4ade80; }

/* ── STATS ROW ── */
.ab-stats {
  display: flex;
  align-items: center;
  padding: 16px 24px 20px;
  border-bottom: 1px solid var(--color-border);
}
.ab-stat-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.ab-stat-num {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1;
}
.ab-stars { font-size: 12px; color: #D4A847; letter-spacing: 1px; margin: 2px 0; }
.ab-stat-label { font-size: 11px; color: var(--color-text-secondary); font-weight: 500; }
.ab-stat-sep { width: 1px; height: 44px; background: var(--color-border); flex-shrink: 0; margin: 0 6px; }
.ab-badge-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ab-badge-icon { font-size: 20px; line-height: 1; }
.ab-badge-text { font-size: 11px; font-weight: 700; color: var(--color-text); line-height: 1.3; }

/* ── DIVIDER ── */
.ab-hr { border: none; border-top: 1px solid var(--color-border); margin: 0; }

/* ── HOST ROW ── */
.ab-host-row { display: flex; align-items: center; gap: 14px; padding: 20px 24px; }
.ab-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0; overflow: hidden;
  border: 1.5px solid var(--color-border);
}
.ab-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ab-host-name { font-size: 15px; font-weight: 700; color: var(--color-text); margin: 0 0 2px; }
.ab-host-sub  { font-size: 13px; color: var(--color-text-secondary); margin: 0; line-height: 1.4; }

/* ── HIGHLIGHTS ── */
.ab-highlights { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.ab-hl { display: flex; align-items: flex-start; gap: 16px; }
.ab-hl-icon { font-size: 22px; flex-shrink: 0; width: 28px; text-align: center; line-height: 1.3; }
.ab-hl-title { font-size: 14px; font-weight: 600; color: var(--color-text); margin: 0 0 2px; }
.ab-hl-sub   { font-size: 13px; color: var(--color-text-secondary); line-height: 1.45; margin: 0; }

/* ── DESCRIPTION ── */
.ab-desc-section { padding: 20px 24px; }
.ab-desc-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); margin: 0 0 10px; }
.ab-desc-text { font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.65; margin: 0; }

/* ── LOCALISATION ── */
.ab-location { padding: 20px 24px 4px; }
.ab-location-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); margin: 0 0 10px; }
.ab-location-addr { font-size: 14px; color: var(--color-text-secondary); margin: 0 0 14px; display: flex; align-items: flex-start; gap: 7px; line-height: 1.5; }

/* ── CARTE LEAFLET PRODUCTEUR ── */
#producer-map-wrap { padding: 0 24px 20px; }
#producer-map-wrap > p { display: none; }
#producer-map { width: 100%; height: 240px; border-radius: 16px; overflow: hidden; background: var(--color-surface); position: relative; z-index: 0; }

/* ── INFOS EN GRILLE ── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 24px 20px; }
.info-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 14px 16px; }
.info-item-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-tertiary); margin: 0 0 4px; }
.info-item-value { font-size: 14px; font-weight: 600; color: var(--color-text); margin: 0; }

/* ── ACTIONS ── */
.ab-actions { padding: 4px 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.btn-primary-deca {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px; border-radius: 14px;
  background: #1d1d1f; color: #fff;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform .15s;
}
html[data-theme="dark"] .btn-primary-deca { background: #f2f2f5; color: #1d1d1f; }
.btn-primary-deca:active { transform: scale(.97); }
.btn-secondary-deca {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 14px;
  background: var(--color-surface); color: var(--color-text);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: 1.5px solid var(--color-border);
  text-decoration: none; transition: transform .15s;
}
.btn-secondary-deca:active { transform: scale(.97); }
.action-row { display: flex; gap: 10px; }
.action-row .btn-secondary-deca { flex: 1; }

/* ── STATUS BAR ── */
.status-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: #15803d; background: rgba(74,222,128,.07); border: 1px solid rgba(74,222,128,.18); border-radius: 10px; padding: 10px 16px; margin: 0 24px 16px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #63b3ed; flex-shrink: 0; animation: ab-pulse 2s ease-in-out infinite; }
@keyframes ab-pulse { 0%,100%{box-shadow:0 0 6px rgba(74,222,128,.6)} 50%{box-shadow:0 0 14px rgba(74,222,128,.9)} }

/* ── SOURCE NOTE ── */
.source-note { padding: 8px 24px 16px; font-size: 11px; color: var(--color-text-tertiary); text-align: center; line-height: 1.5; }
.source-note a { color: var(--color-text-tertiary); text-decoration: underline; }

/* ── CERTIFICATIONS ── */
.cert-section { padding: 0 24px 20px; }
.cert-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-tertiary); margin: 0 0 10px; }
.cert-list { display: flex; flex-direction: column; gap: 8px; }
.cert-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; font-size: 13.5px; color: var(--color-text); font-weight: 500; }
.cert-icon { font-size: 15px; flex-shrink: 0; }

/* ── BARRE D'ACTION BAS DE PAGE ── */
.ab-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: #ffffff !important;
  border-top: 1px solid #e8e8ed;
  padding: 14px 24px calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
html[data-theme="dark"] .ab-bottom {
  background: #1c1c1e !important;
  border-top-color: var(--color-text-tertiary) !important;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .ab-bottom { background: #1c1c1e !important; border-top-color: var(--color-text-tertiary) !important; }
}

.ab-bottom-info { flex: 1; min-width: 0; }
.ab-bottom-type { font-size: 12px; color: #6e6e73; margin: 0 0 2px; }
.ab-bottom-name { font-size: 15px; font-weight: 700; color: #1d1d1f; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="dark"] .ab-bottom-type { color: #9a9aa2; }
html[data-theme="dark"] .ab-bottom-name { color: var(--color-text); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .ab-bottom-type { color: #9a9aa2; }
  html:not([data-theme="light"]) .ab-bottom-name { color: var(--color-text); }
}

.ab-btn-res {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px;
  background: #1d1d1f; color: #fff;
  font-size: 14px; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
  transition: transform .12s;
}
html[data-theme="dark"] .ab-btn-res { background: #f2f2f5; color: #1d1d1f; }
.ab-btn-res:active { transform: scale(.95); }

/* ── PANEL-RIGHT: galerie sous la carte ── */
.panel-right { position: static !important; flex: none !important; width: 100% !important; height: auto !important; overflow: visible !important; background: transparent !important; }
.panel-right > div { position: static !important; height: auto !important; }
.panel-right .map-frame { width: calc(100% - 48px) !important; height: 300px; border-radius: 12px; display: block; margin: 0 24px; }
.map-overlay-badge { display: none !important; }

/* Galerie photos scrollable */
.deca-gallery-scroll {
  display: flex !important; gap: 10px !important;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 0 24px !important; margin: 0 !important;
}
.deca-gallery-scroll::-webkit-scrollbar { display: none; }
.deca-gallery-img {
  flex: 0 0 auto; width: 78%; max-width: 300px; aspect-ratio: 4/3;
  object-fit: cover; border-radius: 16px; scroll-snap-align: start;
  background: var(--color-surface);
}
.deca-gallery-scroll.single .deca-gallery-img { width: 100% !important; max-width: none !important; }
.panel-right iframe { width: 100% !important; height: 280px; border-radius: 12px; border: none; display: block; }

/* Roots JS */
#reviews-root, #visit-root, #edit-root, #photos-root { padding: 0 24px; }

/* Spinner de chargement initial */
.map-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vw; gap: 16px; }
.map-loading-spinner { width: 32px; height: 32px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: ab-spin .8s linear infinite; }
@keyframes ab-spin { to { transform: rotate(360deg); } }
.map-loading p { font-size: 14px; color: var(--color-text-tertiary); margin: 0; }

/* ── DESKTOP ── */
@media (min-width: 768px) {
  .detail-hero-img { height: 60vh !important; max-height: 700px !important; }
  .ab-bottom { max-width: 680px; left: 50%; transform: translateX(-50%); border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
  .panel-body { max-width: 680px; margin-left: auto !important; margin-right: auto !important; }
}
