/* Liste de résultats hôtels : carte hôtel (générée par hotel-results.js) */
.hc {
  --hc-primary: #0B6EB4;
  --hc-primary-dark: #08548a;
  --hc-primary-soft: #E4ECF4;
  --hc-primary-ink: #0B4F82;
  --hc-ink: #14212E;
  --hc-muted: #5A6878;
  --hc-line: #E2E7EE;
  --hc-chip: #F0F3F7;
  --hc-orange: #EB8725;
  --hc-green: #1F7A3D;
  border: 1px solid var(--hc-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 33, 46, .04);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--hc-ink);
  transition: box-shadow .15s;
}
.hc:hover { box-shadow: 0 8px 24px rgba(20, 33, 46, .08); }

.hc-main { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .hc-main { grid-template-columns: 260px minmax(0, 1fr) 200px; min-height: 220px; }
}
@media (min-width: 1200px) {
  .hc-main { grid-template-columns: 300px minmax(0, 1fr) 210px; }
}

/* Photo */
.hc-photo { position: relative; display: block; background: var(--hc-chip); min-height: 200px; }
.hc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 6px;
  background: var(--hc-orange); color: #2B1600; font-size: 12px; font-weight: 600;
}

/* Infos */
.hc-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hc-title { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; }
.hc-title a { color: var(--hc-ink); text-decoration: none; }
.hc-title a:hover { color: var(--hc-primary); }
.hc-address {
  display: inline-flex; align-items: flex-start; gap: 6px; align-self: flex-start; max-width: 100%;
  padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--hc-muted); text-align: left; cursor: pointer;
}
.hc-address svg { flex: none; margin-top: 3px; }
.hc-address:hover span { text-decoration: underline; color: var(--hc-primary); }
.hc-review { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.hc-review > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.hc-review small { color: var(--hc-muted); font-size: 12px; }
.hc-score { background: var(--hc-primary); color: #fff; font-weight: 600; padding: 3px 7px; border-radius: 6px 6px 6px 0; }
.hc-score small { color: #fff; opacity: .8; font-size: 11px; }
.hc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.hc-tags li { font-size: 12px; font-weight: 600; color: #3A4A5C; background: var(--hc-chip); padding: 4px 10px; border-radius: 999px; }
.hc-tags .hc-tag-more { color: var(--hc-muted); background: transparent; border: 1px solid var(--hc-line); cursor: help; }
.hc-accroche { margin: 0; font-size: 13px; font-weight: 600; color: var(--hc-primary-ink); }
.hc-offer { margin: 0; font-size: 13px; font-weight: 600; color: #9A4A00; }
.hc-perk { margin: auto 0 0; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hc-green); }

/* Prix */
.hc-price {
  padding: 16px 20px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px;
  border-top: 1px solid var(--hc-line);
}
@media (min-width: 768px) { .hc-price { border-top: 0; border-left: 1px solid var(--hc-line); } }
.hc-board { font-size: 13px; color: var(--hc-muted); }
.hc-from { margin-top: auto; font-size: 13px; color: var(--hc-muted); }
.hc-amount { font-size: 26px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.hc-amount small { font-size: 14px; font-weight: 600; }
.hc-total { font-size: 13px; color: var(--hc-muted); margin-bottom: 10px; }
.hc-cta {
  align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; background: var(--hc-primary); color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none;
}
.hc-cta:hover { background: var(--hc-primary-dark); }
.hc-cta::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.hc-cta[aria-expanded="true"] { background: var(--hc-primary-soft); color: var(--hc-primary-ink) !important; }
.hc-cta[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }

/* Mobile : photo en haut, prix et bouton sur une ligne */
@media (max-width: 767.98px) {
  .hc-photo { min-height: 190px; }
  .hc-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; text-align: left; column-gap: 12px; }
  .hc-price > * { grid-column: 1; }
  .hc-board { grid-row: 1; }
  .hc-from { grid-row: 2; margin-top: 0; }
  .hc-amount { grid-row: 3; }
  .hc-total { grid-row: 4; margin-bottom: 0; }
  .hc-cta { grid-column: 2; grid-row: 1 / span 4; align-self: end; }
}


/* Fixée en bas, centrée par rapport à l'écran (left/right 0 + marges auto : indépendant de la largeur de la page) */
.bloc-sorts { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1030; width: max-content; margin: 0 auto; pointer-events: none; }
.hs-fab {
  pointer-events: auto; display: inline-flex; align-items: stretch; border-radius: 999px; overflow: hidden;
  background: #14212E; box-shadow: 0 6px 20px rgba(20, 33, 46, .28); font-family: "DM Sans", system-ui, sans-serif;
}
.hs-fab a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; text-decoration: none; }
.hs-fab a + a { border-left: 1px solid rgba(255, 255, 255, .25); }

@media (max-width: 767.98px) {
  .hs-title { font-size: 17px !important; margin-bottom: 10px !important; }
  .hs-title small { display: block; font-size: 13px; font-weight: 400; color: #5A6878; margin-top: 2px; }
  .hc { border-radius: 12px; }
  .hc-photo { min-height: 170px; }
  .hc-body { padding: 12px 14px; gap: 6px; }
  .hc-title { font-size: 17px; }
  .hc-price { padding: 12px 14px; }
  .hc-amount { font-size: 22px; }
  .hc-cta { align-self: end; padding: 0 14px; font-size: 14px; }
}

/* Chargement : fenêtre centrée, largeur adaptée au mobile */
#loading-result { display: flex; align-items: center; justify-content: center; padding: 16px; }
#loading-result .loading {
  top: auto; width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto;
  padding: 24px 20px; border-radius: 16px; box-shadow: 0 12px 40px rgba(20, 33, 46, .25);
}
#loading-result .loading .row { margin: 0; }
#loading-result .loading-img { max-width: 140px; }

/* Mobile : aucun élément de la liste ne doit élargir la page (sinon elle défile de côté et la barre flottante se décale) */
@media (max-width: 991.98px) {
  html, body { overflow-x: clip; }
  #products, .hc { min-width: 0; max-width: 100%; }
  .hc-title, .hc-address span { overflow-wrap: anywhere; }
}

/* Mobile : la ville figure déjà dans le récapitulatif de recherche ; pas de fil d'Ariane ni de ville répétés */
@media (max-width: 767.98px) {
  .box-engine .breadcrumb { display: none; }
  .hs-title-city { display: none; }
  /* Le dernier résultat ne passe pas sous la barre Carte / Filtrer */
  #hotel_result_status { padding-bottom: 72px; }
  .hs-title small { margin-top: 0; font-size: 14px; font-weight: 600; color: #14212E; }
}
