/* ═══════════════════════════════════════════════════════════════
   Rochefontaine Booking — CSS
   Palette : navy #1c2b3a  rust #c45c3a  sand #f5f0e8
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --rf-navy:   #1c2b3a;
  --rf-rust:   #c45c3a;
  --rf-sand:   #f5f0e8;
  --rf-white:  #ffffff;
  --rf-border: #e0d9d0;
  --rf-text:   #2a2a2a;
  --rf-muted:  #6b6660;
  --rf-radius: 6px;
  --rf-shadow: 0 2px 12px rgba(28,43,58,.10);
}

/* ── Wrapper ────────────────────────────────────────────────────── */
.rf-booking {
  max-width: 760px;
  margin: 0 auto;
  font-family: inherit;
  color: var(--rf-text);
}

/* ── Intro ──────────────────────────────────────────────────────── */
.rf-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--rf-navy);
  margin: 0 0 4px;
}
.rf-subtitle {
  font-size: 1rem;
  color: var(--rf-muted);
  margin: 0 0 32px;
}
.rf-intro { margin-bottom: 28px; }

/* ── Day cards grid ─────────────────────────────────────────────── */
.rf-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.rf-day-card {
  position: relative;
  border: none;
  border-radius: var(--rf-radius);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--rf-white);
  box-shadow: var(--rf-shadow);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}
.rf-day-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(28,43,58,.18);
}
.rf-day-card:focus-visible {
  outline: 3px solid var(--rf-rust);
  outline-offset: 2px;
}

.rf-day-card__img {
  position: relative;
  height: 140px;
  overflow: hidden;
}
.rf-day-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rf-day-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(28,43,58,.55));
}

.rf-day-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rf-day-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rf-navy);
  margin: 0;
}
.rf-day-card__desc {
  font-size: .8rem;
  color: var(--rf-muted);
  margin: 0;
  line-height: 1.4;
}
.rf-day-card__spots {
  font-size: .75rem;
  color: var(--rf-rust);
  font-weight: 600;
  margin-top: 4px;
}
.rf-day-card__cta {
  font-size: .78rem;
  color: var(--rf-navy);
  opacity: .55;
  margin-top: 2px;
}

/* ── Slot list (étape 2) ────────────────────────────────────────── */
.rf-slot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.rf-slot-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1.5px solid var(--rf-border);
  border-radius: var(--rf-radius);
  background: var(--rf-white);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.rf-slot-card:hover {
  border-color: var(--rf-rust);
  box-shadow: var(--rf-shadow);
}
.rf-slot-card:focus-visible {
  outline: 3px solid var(--rf-rust);
  outline-offset: 2px;
}

.rf-slot-card__info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.rf-slot-card__label {
  font-weight: 700;
  color: var(--rf-navy);
  font-size: .95rem;
}
.rf-slot-card__date {
  font-size: .82rem;
  color: var(--rf-muted);
}

.rf-slot-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.rf-slot-card__price {
  font-weight: 600;
  color: var(--rf-navy);
  font-size: .9rem;
}
.rf-slot-card__spots {
  font-size: .75rem;
  color: var(--rf-muted);
}
.rf-slot-card__spots--low {
  color: #d97706;
  font-weight: 600;
}

.rf-slot-card__arrow {
  font-size: 1.1rem;
  color: var(--rf-rust);
  opacity: .7;
}

/* ── Slot summary banner ────────────────────────────────────────── */
.rf-slot-summary {
  background: var(--rf-sand);
  border-left: 3px solid var(--rf-rust);
  padding: 12px 16px;
  border-radius: 0 var(--rf-radius) var(--rf-radius) 0;
  font-size: .88rem;
  color: var(--rf-navy);
  margin-bottom: 24px;
}
.rf-slot-summary__spots {
  color: var(--rf-muted);
  font-size: .8rem;
}

/* ── Form ───────────────────────────────────────────────────────── */
.rf-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rf-fieldset {
  border: 1.5px solid var(--rf-border);
  border-radius: var(--rf-radius);
  padding: 20px 20px 16px;
  margin: 0 0 20px;
}
.rf-fieldset__legend {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rf-muted);
  padding: 0 8px;
}

.rf-form-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) {
  .rf-form-row--2col { grid-template-columns: 1fr; }
}

.rf-form-row { margin-bottom: 14px; }
.rf-form-row:last-child { margin-bottom: 0; }

.rf-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.rf-form-field:last-child { margin-bottom: 0; }

.rf-form-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--rf-navy);
}

.rf-form-field input[type="text"],
.rf-form-field input[type="email"],
.rf-form-field input[type="tel"],
.rf-form-field input[type="number"] {
  padding: 9px 12px;
  border: 1.5px solid var(--rf-border);
  border-radius: var(--rf-radius);
  font-size: .92rem;
  color: var(--rf-text);
  background: var(--rf-white);
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.rf-form-field input:focus {
  outline: none;
  border-color: var(--rf-rust);
  box-shadow: 0 0 0 3px rgba(196,92,58,.12);
}

.rf-form-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rf-form-field--inline label { white-space: nowrap; }
.rf-form-field--inline input { max-width: 80px; }

/* Diver name list */
.rf-diver-names {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Checkbox */
.rf-form-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.rf-form-field--checkbox input { margin-top: 3px; flex-shrink: 0; }
.rf-form-field--checkbox label { font-size: .85rem; font-weight: 400; color: var(--rf-muted); }
.rf-form-field--checkbox a { color: var(--rf-rust); }

/* Total bar */
.rf-total-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--rf-navy);
  color: var(--rf-white);
  padding: 14px 20px;
  border-radius: var(--rf-radius);
  margin-bottom: 20px;
  font-size: .95rem;
}
.rf-total-bar__label { opacity: .7; }
.rf-total-bar__amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rf-white);
}

/* Error */
.rf-form-error, .rf-error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--rf-radius);
  font-size: .88rem;
  margin-bottom: 16px;
}

/* Submit button */
.rf-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--rf-rust);
  color: var(--rf-white);
  border: none;
  border-radius: var(--rf-radius);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
  width: 100%;
}
.rf-submit-btn:hover { background: #a84b2d; }
.rf-submit-btn:active { transform: scale(.98); }
.rf-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.rf-payment-note {
  font-size: .78rem;
  color: var(--rf-muted);
  text-align: center;
  margin-top: 12px;
}

/* ── Back button ────────────────────────────────────────────────── */
.rf-back-btn {
  background: none;
  border: none;
  color: var(--rf-rust);
  font-size: .85rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  font-weight: 600;
}
.rf-back-btn:hover { text-decoration: underline; }

/* ── Loader ─────────────────────────────────────────────────────── */
.rf-loader {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.rf-loader__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--rf-border);
  border-top-color: var(--rf-rust);
  border-radius: 50%;
  animation: rf-spin .7s linear infinite;
}
@keyframes rf-spin { to { transform: rotate(360deg); } }

/* ── Empty state ────────────────────────────────────────────────── */
.rf-empty {
  text-align: center;
  color: var(--rf-muted);
  padding: 48px 0;
  font-size: .95rem;
}

/* ── Step transitions ───────────────────────────────────────────── */
.rf-step { animation: rf-fadein .22s ease; }
@keyframes rf-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Subscriber code ────────────────────────────────────────────── */
.rf-sub-code-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.rf-sub-validate-btn {
  background: var(--rf-navy);
  color: var(--rf-white);
  border: none;
  border-radius: var(--rf-radius);
  padding: 9px 16px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  height: 38px;
}
.rf-sub-validate-btn:hover { background: #253b4e; }

.rf-sub-feedback {
  padding: 8px 12px;
  border-radius: var(--rf-radius);
  font-size: .85rem;
  margin-top: 8px;
}
.rf-sub-feedback--ok {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
}
.rf-sub-feedback--err {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
}

/* ── Success page ───────────────────────────────────────────────── */
.rf-success {
  max-width: 560px;
  margin: 48px auto;
  text-align: center;
  padding: 0 16px;
}
.rf-success__icon {
  width: 64px;
  height: 64px;
  background: var(--rf-rust);
  color: var(--rf-white);
  border-radius: 50%;
  font-size: 2rem;
  line-height: 64px;
  margin: 0 auto 24px;
}
.rf-success__title {
  font-size: 1.6rem;
  color: var(--rf-navy);
  margin: 0 0 12px;
}
.rf-success__intro {
  color: var(--rf-muted);
  font-size: .95rem;
  margin-bottom: 28px;
  line-height: 1.6;
}
.rf-success__card {
  background: var(--rf-white);
  border: 1.5px solid var(--rf-border);
  border-radius: var(--rf-radius);
  overflow: hidden;
  text-align: left;
  margin-bottom: 24px;
  box-shadow: var(--rf-shadow);
}
.rf-success__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 18px;
  font-size: .9rem;
  border-bottom: 1px solid var(--rf-border);
}
.rf-success__row:last-child { border-bottom: none; }
.rf-success__row span { color: var(--rf-muted); }
.rf-success__row strong { color: var(--rf-navy); text-align: right; }

.rf-success__row--names ul {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
}
.rf-success__row--names li {
  font-size: .88rem;
  color: var(--rf-navy);
}

.rf-success__row--total {
  background: var(--rf-sand);
}
.rf-success__row--total strong {
  font-size: 1.05rem;
  color: var(--rf-rust);
}

.rf-success__note {
  font-size: .82rem;
  color: var(--rf-muted);
  margin-bottom: 28px;
  background: var(--rf-sand);
  padding: 12px 16px;
  border-radius: var(--rf-radius);
}

.rf-success__home-btn {
  display: inline-block;
  background: var(--rf-navy);
  color: var(--rf-white);
  padding: 12px 24px;
  border-radius: var(--rf-radius);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s;
}
.rf-success__home-btn:hover { background: #253b4e; }

/* ─── Panier (v2.0) ─────────────────────────────────────────────── */

/* Slot item (liste de tickets) */
.rf-slot-item {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.rf-slot-item--in-cart {
  border-color: #22c55e;
  background: #f0fdf4;
}
.rf-slot-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rf-slot-item__info { flex: 1; }
.rf-slot-item__label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: #1c2b3a;
}
.rf-slot-item__sub {
  font-size: .85rem;
  color: #555;
  margin-top: 2px;
}
.rf-slot-item__spots { }
.rf-slot-item__spots--low { color: #e67e22; font-weight: 600; }
.rf-abo-tag { color: #c45c3a; font-style: normal; font-weight: 600; }
.rf-slot-item__cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Mini-form ajout au panier */
.rf-slot-item__form { padding-top: 12px; border-top: 1px solid #eef0f2; margin-top: 12px; }
.rf-add-form { }
.rf-add-form__total { margin: 10px 0 0; font-size: .9rem; color: #444; }
.rf-add-form__btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.rf-add-form__err { }

/* Boutons génériques */
.rf-btn {
  border: none; border-radius: 6px; padding: 8px 14px;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.rf-btn--add     { background: #1c2b3a; color: #fff; }
.rf-btn--add:hover { background: #253d52; }
.rf-btn--outline { background: transparent; border: 2px solid #1c2b3a; color: #1c2b3a; }
.rf-btn--outline:hover { background: #f0f4f8; }
.rf-btn--ghost   { background: transparent; color: #dc2626; font-size: .8rem; padding: 4px 8px; }
.rf-btn--ghost:hover { text-decoration: underline; }
.rf-btn--confirm { background: #22c55e; color: #fff; }
.rf-btn--confirm:hover { background: #16a34a; }
.rf-btn--cancel  { background: #f1f5f9; color: #475569; }
.rf-btn--cancel:hover { background: #e2e8f0; }
.rf-btn--pay     { background: #1c2b3a; color: #fff; padding: 10px 20px; font-size: .95rem; }
.rf-btn--pay:hover { background: #253d52; }

/* Badge "dans le panier" */
.rf-in-cart-badge {
  color: #16a34a; font-weight: 600; font-size: .85rem;
}

/* Panel panier */
#rf-cart-panel { margin-top: 20px; }
.rf-cart {
  background: #f8fafc;
  border: 2px solid #22c55e;
  border-radius: 10px;
  padding: 16px;
}
.rf-cart__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #1c2b3a;
}
.rf-cart__list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.rf-cart__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}
.rf-cart__item:last-child { border-bottom: none; }
.rf-cart__item-info { flex: 1; }
.rf-cart__item-label { display: block; font-weight: 600; font-size: .9rem; }
.rf-cart__item-date  { display: block; font-size: .8rem; color: #666; }
.rf-cart__item-divers { display: block; font-size: .8rem; color: #888; font-style: italic; }
.rf-cart__item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-align: right; }
.rf-cart__item-price { font-size: .85rem; color: #1c2b3a; white-space: nowrap; }
.rf-cart__remove {
  background: none; border: none; color: #999; cursor: pointer;
  font-size: .85rem; padding: 2px 5px; line-height: 1;
  border-radius: 4px; transition: color .12s, background .12s;
}
.rf-cart__remove:hover { color: #dc2626; background: #fee2e2; }
.rf-cart__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.rf-cart__total { font-size: 1rem; color: #1c2b3a; }

/* Résumé dans la page de paiement */
.rf-checkout-summary {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 16px;
}
.rf-checkout-summary li {
  padding: 5px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: .9rem;
  color: #333;
}
.rf-checkout-summary li:last-child { border-bottom: none; }
.rf-checkout-total {
  text-align: right;
  font-size: 1rem;
  margin: 0 0 16px;
  color: #1c2b3a;
}

/* ── Barre panier persistante (step 1) ─────────────────────── */
#rf-cart-bar { display: none; }
.rf-cart-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #1c2b3a;
  color: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  margin-top: 20px;
}
.rf-cart-bar__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.rf-cart-bar__item {
  background: rgba(255,255,255,.12);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: .82rem;
  white-space: nowrap;
}
.rf-cart-bar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.rf-cart-bar__total {
  font-size: 1.05rem;
  color: #86efac;
}
.rf-cart-bar .rf-btn--pay {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 9px 18px;
  font-size: .92rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.rf-cart-bar .rf-btn--pay:hover { background: #16a34a; }
