/* RateHawk Booking Widget — personnalisez les couleurs via ces variables dans votre thème */
.rhb-widget {
  --rhb-primary: #0b5cad;
  --rhb-primary-text: #fff;
  --rhb-text: #1d2430;
  --rhb-muted: #6b7380;
  --rhb-border: #dfe3e8;
  --rhb-bg: #fff;
  --rhb-soft: #f5f7fa;
  --rhb-ok: #157347;
  --rhb-warn: #b4540a;
  --rhb-radius: 10px;
  color: var(--rhb-text);
  font-size: 15px;
  line-height: 1.45;
  max-width: 1100px;
  margin: 0 auto;
}
.rhb-widget *, .rhb-widget *::before, .rhb-widget *::after { box-sizing: border-box; }
.rhb-widget h3, .rhb-widget h4, .rhb-widget h5 { margin: 0 0 .3em; line-height: 1.25; }

/* Barre de recherche */
.rhb-search {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr auto; gap: 10px; align-items: end;
  background: var(--rhb-bg); border: 1px solid var(--rhb-border); border-radius: var(--rhb-radius);
  padding: 14px; box-shadow: 0 4px 18px rgba(20, 30, 50, .06);
}
.rhb-field { position: relative; display: flex; flex-direction: column; gap: 4px; }
.rhb-field label { font-size: 12px; font-weight: 600; color: var(--rhb-muted); text-transform: uppercase; letter-spacing: .03em; }
.rhb-widget input, .rhb-widget select, .rhb-widget textarea, .rhb-guests-toggle {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rhb-border); border-radius: 8px;
  background: var(--rhb-bg); color: var(--rhb-text); font: inherit; text-align: left; min-height: 44px;
}
.rhb-widget input:focus, .rhb-widget select:focus, .rhb-widget textarea:focus, .rhb-guests-toggle:focus {
  outline: 2px solid var(--rhb-primary); outline-offset: 1px; border-color: transparent;
}
.rhb-suggest, .rhb-guests-pop {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50; margin: 4px 0 0; padding: 6px;
  list-style: none; background: var(--rhb-bg); border: 1px solid var(--rhb-border); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 30, 50, .14);
}
.rhb-suggest li { padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.rhb-suggest li:hover { background: var(--rhb-soft); }
.rhb-suggest small { color: var(--rhb-muted); text-transform: uppercase; }
.rhb-ico { margin-right: 6px; }
.rhb-guests-pop { min-width: 240px; padding: 12px; }
.rhb-counter { display: grid; grid-template-columns: 1fr 34px 30px 34px; align-items: center; gap: 6px; margin-bottom: 8px; text-align: center; }
.rhb-counter span { text-align: left; }
.rhb-counter button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rhb-border); background: var(--rhb-bg); cursor: pointer; font-size: 18px; color: var(--rhb-text); }
.rhb-ages label { display: block; font-size: 13px; margin-top: 6px; }

/* Boutons */
.rhb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
.rhb-btn-primary { background: var(--rhb-primary); color: var(--rhb-primary-text); }
.rhb-btn-primary:hover { filter: brightness(1.08); }
.rhb-btn-primary:disabled { opacity: .6; cursor: wait; }
.rhb-btn-ghost { background: transparent; border-color: var(--rhb-border); color: var(--rhb-text); }
.rhb-btn-block { width: 100%; }
.rhb-link { background: none; border: 0; color: var(--rhb-primary); cursor: pointer; padding: 0; margin: 0 0 12px; font: inherit; }

.rhb-view { margin-top: 18px; }
.rhb-sandbox { margin: 8px 0 0; font-size: 13px; color: var(--rhb-warn); }
.rhb-muted { color: var(--rhb-muted); font-size: 14px; margin: 2px 0; }
.rhb-stars { color: #e3a008; font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
.rhb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.rhb-tags span { font-size: 12.5px; padding: 3px 8px; border-radius: 99px; background: var(--rhb-soft); }
.rhb-ok { color: var(--rhb-ok); }
.rhb-warn { color: var(--rhb-warn); }

/* États */
.rhb-loading { display: flex; align-items: center; gap: 12px; padding: 30px; justify-content: center; color: var(--rhb-muted); }
.rhb-spinner { width: 22px; height: 22px; border: 3px solid var(--rhb-border); border-top-color: var(--rhb-primary); border-radius: 50%; animation: rhb-spin .8s linear infinite; }
@keyframes rhb-spin { to { transform: rotate(360deg); } }
.rhb-error { padding: 16px; border-radius: var(--rhb-radius); background: #fdf1ef; color: #8a2a1d; }
.rhb-notice { padding: 12px 14px; border-radius: 8px; background: #fff6e5; margin-bottom: 14px; }

/* Résultats */
.rhb-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.rhb-head span { color: var(--rhb-muted); }
.rhb-list { display: grid; gap: 12px; }
.rhb-card { display: grid; grid-template-columns: 220px 1fr 200px; border: 1px solid var(--rhb-border); border-radius: var(--rhb-radius); overflow: hidden; background: var(--rhb-bg); }
.rhb-card-img { background: var(--rhb-soft) center/cover no-repeat; min-height: 160px; }
.rhb-card-body { padding: 14px 16px; }
.rhb-card-price { padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; border-left: 1px solid var(--rhb-border); text-align: right; }
.rhb-card-price strong { font-size: 22px; }
.rhb-card-price small { color: var(--rhb-muted); font-size: 12px; }
.rhb-card-price .rhb-btn { margin-top: 8px; }

/* Hôtel */
.rhb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin: 12px 0; }
.rhb-gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; }
.rhb-desc { max-width: 75ch; }
.rhb-rates { display: grid; gap: 10px; margin-top: 8px; }
.rhb-rate { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 16px; border: 1px solid var(--rhb-border); border-radius: var(--rhb-radius); }
.rhb-rate-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rhb-rate-price strong { font-size: 20px; }
.rhb-rate-price small { color: var(--rhb-muted); }
.rhb-rate-price .rhb-btn { margin-top: 6px; }

/* Commande */
.rhb-checkout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.rhb-book { display: grid; gap: 10px; }
.rhb-guest { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rhb-guest legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }
.rhb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rhb-cgv { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.rhb-cgv input { width: auto; min-height: 0; margin-top: 3px; }
.rhb-form-err { color: #8a2a1d; margin: 0; }
.rhb-summary { background: var(--rhb-soft); border-radius: var(--rhb-radius); padding: 16px; position: sticky; top: 20px; }
.rhb-summary p { margin: 6px 0; }
.rhb-total { display: flex; justify-content: space-between; border-top: 1px solid var(--rhb-border); padding-top: 10px; margin-top: 10px !important; font-size: 17px; }

.rhb-success { text-align: center; padding: 30px 16px; }
.rhb-check { width: 60px; height: 60px; line-height: 60px; margin: 0 auto 12px; border-radius: 50%; background: var(--rhb-ok); color: #fff; font-size: 30px; }

/* Mobile */
@media (max-width: 860px) {
  .rhb-search { grid-template-columns: 1fr 1fr; }
  .rhb-field-dest, .rhb-search > .rhb-btn { grid-column: 1 / -1; }
  .rhb-card { grid-template-columns: 1fr; }
  .rhb-card-img { min-height: 180px; }
  .rhb-card-price { border-left: 0; border-top: 1px solid var(--rhb-border); flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; text-align: left; }
  .rhb-checkout { grid-template-columns: 1fr; }
  .rhb-summary { position: static; order: -1; }
}
@media (max-width: 480px) {
  .rhb-search { grid-template-columns: 1fr; }
  .rhb-guest, .rhb-row { grid-template-columns: 1fr; }
  .rhb-rate { grid-template-columns: 1fr; }
  .rhb-rate-price { align-items: stretch; }
}

/* Paiement Stripe */
.rhb-payment { padding: 12px; border: 1px solid var(--rhb-border); border-radius: 8px; background: var(--rhb-bg); min-height: 60px; }
.rhb-secure { font-size: 13px; }
.rhb-cgv a { color: var(--rhb-primary); }
.rhb-tags .rhb-hotelpay { background: #e8f1fb; color: var(--rhb-primary); font-weight: 600; }
