/* ═══════════════════════════════════════════════════════
   Reservation Modal — Base Styles (kept from v1)
   ═══════════════════════════════════════════════════════ */

.resa-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: Inter, sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  background: var(--bricks-color-primary, #F5C800);
  color: var(--bricks-color-black, #111);
}

.resa-trigger-btn:hover {
  background: var(--bricks-color-primary-dark, #D4AD00);
}

.resa-trigger-btn--fixed {
  display: none;
}

.resa-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.resa-modal-overlay.is-open {
  display: flex;
}

@media (min-width: 601px) {
  .mcp-reservation-modal > .resa-trigger-btn {
    display: none !important;
  }

  .mcp-reservation-modal > .resa-modal-overlay {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    padding: 0 !important;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .mcp-reservation-modal > .resa-modal-overlay > .resa-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: none !important;
  }

  .mcp-reservation-modal > .resa-modal-overlay .resa-close,
  .mcp-reservation-modal > .resa-modal-overlay .resa-modal-header {
    display: none !important;
  }
}

.resa-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: none;
  animation: resaSlideUp 0.3s ease;
  position: relative;
}

@keyframes resaSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.resa-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  border-bottom: 1px solid #e5e5e5;
}

.resa-vehicle-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.resa-vehicle-info {
  flex: 1;
}

.resa-vehicle-info strong {
  display: block;
  font-size: 16px;
  color: #111;
}

.resa-vehicle-info span {
  font-size: 13px;
  color: #999;
}

.resa-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.2s;
}

.resa-close:hover {
  background: #e5e5e5;
}

/* ── Stepper ─────────────────────────────────────────── */
.resa-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px 16px;
  gap: 0;
}

.resa-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 50px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: #f5f5f5;
  color: #999;
  transition: all 0.3s;
}

.resa-step.active .step-num {
  background: var(--resa-primary, #F5C800);
  color: #111;
}

.resa-step.completed .step-num {
  background: #25D366;
  color: #fff;
}

.step-label {
  font-size: 10px;
  color: #999;
  text-align: center;
}

.resa-step.active .step-label {
  color: #111;
  font-weight: 500;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e5e5e5;
  margin: 0 2px;
  margin-bottom: 18px;
  min-width: 16px;
}

/* ── Panel base ──────────────────────────────────────── */
.resa-panel {
  padding: 0 28px 28px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.resa-panel h3 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  font-style: italic;
}

.resa-subtitle {
  font-size: 14px;
  color: #999;
  margin: 0 0 24px;
}

/* ── Location bar ────────────────────────────────────── */
.resa-location-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FFF3CC;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #444;
}

.resa-location-bar strong {
  font-size: 14px;
  color: #111;
}

/* ── Calendar ────────────────────────────────────────── */
.resa-calendars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

.resa-cal-label {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.resa-calendar {
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 13px;
}

.resa-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.resa-cal-nav button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.resa-cal-nav button:hover {
  background: #f0f0f0;
}

.resa-cal-nav strong {
  font-size: 14px;
  color: #111;
}

.resa-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.resa-cal-grid .day-header {
  font-size: 12px;
  color: #999;
  font-weight: 500;
  padding: 4px 0;
}

.resa-cal-grid .day {
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
}

.resa-cal-grid .day:hover:not(.past):not(.empty):not(.busy) {
  background: #f5f5f5;
}

.resa-cal-grid .day.selected {
  background: var(--resa-primary, #F5C800);
  color: #111;
  font-weight: 600;
}

.resa-cal-grid .day.empty {
  cursor: default;
}

.resa-cal-grid .day.past {
  color: #ccc;
  cursor: not-allowed;
}

.resa-cal-grid .day.available {
  color: #111;
}

.resa-cal-grid .day.busy {
  background: #fee2e2;
  color: #dc2626;
  cursor: not-allowed;
  text-decoration: line-through;
  font-weight: 500;
}

.resa-cal-grid .day.today {
  border: 2px solid var(--resa-primary, #F5C800);
  font-weight: 700;
}

.resa-cal-grid .day.today.past {
  border-color: #ccc;
}

/* ── Calendar legend ─────────────────────────────────── */
.resa-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 11px;
  color: #666;
  padding: 0 4px;
}

.resa-cal-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.resa-cal-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.resa-cal-legend .legend-dot.available {
  background: #f5f5f5;
  border: 1px solid #ccc;
}

.resa-cal-legend .legend-dot.busy {
  background: #fee2e2;
  border: 1px solid #dc2626;
}

.resa-cal-legend .legend-dot.past {
  background: #f0f0f0;
  border: 1px solid #ddd;
}

.resa-cal-legend .legend-dot.today-indicator {
  background: #fff;
  border: 2px solid var(--resa-primary, #F5C800);
}

/* ── Time select (replaces input time) ───────────────── */
.resa-time-field {
  margin-top: 16px;
}

.resa-time-field label {
  display: block;
  font-size: 13px;
  color: var(--resa-primary, #F5C800);
  margin-bottom: 6px;
  font-weight: 500;
}

.resa-time-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 15px;
  font-family: Inter, sans-serif;
  color: #111;
  outline: none;
  box-sizing: border-box;
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.resa-time-select:focus {
  border-color: var(--resa-primary, #F5C800);
}

/* ── Duration summary ────────────────────────────────── */
.resa-duration-summary {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 8px;
  border: 1px solid #e5e5e5;
}

.resa-dur-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}

.resa-dur-label {
  color: #666;
}

.resa-dur-value {
  font-weight: 600;
  color: #111;
}

.resa-dur-price {
  color: var(--resa-primary, #F5C800);
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════
   Panel 2 — Options & Extras
   ═══════════════════════════════════════════════════════ */

/* ── Section titles ──────────────────────────────────── */
.resa-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.resa-section-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 20px 0;
}

/* ── Radio cards (km, insurance) ─────────────────────── */
.resa-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resa-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Nombre impair d'options (p. ex. acompte + total + agence) : la dernière
   carte occupe toute la largeur au lieu de laisser un trou dans la grille. */
.resa-radio-grid .resa-radio-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.resa-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.resa-radio-card:hover {
  border-color: #ccc;
}

.resa-radio-card.active {
  border-color: var(--resa-primary, #F5C800);
  background: #FFFBEB;
}

.resa-radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ddd;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}

.resa-radio-card.active .resa-radio-dot {
  border-color: var(--resa-primary, #F5C800);
}

.resa-radio-card.active .resa-radio-dot::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--resa-primary, #F5C800);
}

.resa-radio-content {
  flex: 1;
  min-width: 0;
}

.resa-radio-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #111;
}

.resa-radio-desc {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.resa-km-extra {
  color: #D4A800;
  font-weight: 600;
}

.resa-radio-price {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
}

/* ── Custom KM input ─────────────────────────────────── */
.resa-km-custom-wrap {
  padding: 12px 16px;
  margin: -6px 0 4px;
  background: #FAFAFA;
  border-radius: 10px;
  border: 1px solid #E5E5E5;
}

.resa-km-custom-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resa-km-custom-input {
  width: 80px;
  padding: 8px 10px;
  border: 1.5px solid #E5E5E5;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  font-family: 'Inter', sans-serif;
  text-align: center;
  -moz-appearance: textfield;
  transition: border-color 0.2s;
}

.resa-km-custom-input::-webkit-inner-spin-button,
.resa-km-custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.resa-km-custom-input:focus {
  outline: none;
  border-color: #F5C800;
}

.resa-km-custom-label {
  font-size: 13px;
  color: #666;
}

.resa-km-custom-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #999;
  font-style: italic;
}

/* ── Equipment grid ──────────────────────────────────── */
.resa-equip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.resa-equip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  transition: border-color 0.2s;
}

.resa-equip-card:hover {
  border-color: #ccc;
}

.resa-equip-info {
  flex: 1;
  min-width: 0;
}

.resa-equip-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resa-equip-price {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* ── Quantity controls ───────────────────────────────── */
.resa-equip-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 8px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
}

.qty-btn:hover {
  border-color: #999;
  color: #111;
}

.qty-btn:active {
  background: #f5f5f5;
}

.qty-value {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  min-width: 20px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   Panel 3 — Summary / Panel 4 — Contact / Panel 5 — Payment
   ═══════════════════════════════════════════════════════ */

.resa-summary {
  margin-bottom: 24px;
}

.resa-summary-section {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.resa-summary-section h4 {
  font-size: 14px;
  color: #999;
  font-weight: 500;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resa-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: #444;
}

.resa-summary-row strong {
  color: #111;
  text-align: right;
}

.resa-km-total-row {
  background: #FFF9E0;
  border-radius: 6px;
  padding: 8px 10px !important;
  margin: 4px 0;
}

.resa-km-total-row strong {
  color: #B8860B;
}

.resa-km-total-row strong small {
  font-weight: 400;
  color: #666;
}

.resa-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  border-top: 2px solid #111;
}

/* ── Contact form ────────────────────────────────────── */
.resa-contact-form {
  margin-bottom: 12px;
}

.resa-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.resa-form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.resa-form-field {
  margin-bottom: 0;
}

.resa-form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  margin-bottom: 4px;
}

.resa-form-field input,
.resa-form-field textarea,
.resa-form-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 13px;
  font-family: Inter, sans-serif;
  color: #111;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  line-height: 1.4;
}

.resa-form-field input:focus,
.resa-form-field textarea:focus,
.resa-form-field select:focus {
  border-color: var(--resa-primary, #F5C800);
}

.resa-form-field textarea {
  resize: vertical;
  min-height: 50px;
}

/* Optional section */
.resa-optional-section {
  margin-top: 14px;
  border: none;
}

.resa-optional-toggle {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  user-select: none;
}

.resa-optional-toggle::-webkit-details-marker {
  display: none;
}

.resa-optional-toggle::before {
  content: '\25B6';
  font-size: 10px;
  margin-right: 6px;
  display: inline-block;
  transition: transform 0.2s;
}

details[open]>.resa-optional-toggle::before {
  transform: rotate(90deg);
}

.resa-optional-fields {
  padding-top: 10px;
}

/* Address section */
.resa-address-section {
  margin-top: 12px;
}

.resa-address-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: all 0.2s;
}

.resa-address-btn:hover {
  border-color: #F5C800;
  color: #111;
}

.resa-address-preview {
  background: #FAFAFA;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #444;
  line-height: 1.4;
}

/* Address sub-modal */
.resa-address-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resa-address-inner {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.resa-address-inner h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.resa-address-inner .resa-form-field {
  margin-bottom: 8px;
}

.resa-address-actions {
  text-align: right;
  margin-top: 12px;
}

/* Autocomplete Google Places, inline dans le formulaire de l'étape 3
   (optionnel — masqué sans clé configurée) */
.resa-address-autocomplete {
  margin-bottom: 10px;
}

.resa-address-autocomplete-host gmp-place-autocomplete {
  width: 100%;
  /* L'élément Google suit le color-scheme hérité (fond noir en mode sombre) :
     le formulaire est clair, on force le thème clair. */
  color-scheme: light;
  --gmp-mat-color-surface: #ffffff;
  --gmp-mat-color-on-surface: #111111;
  --gmp-mat-color-on-surface-variant: #666666;
  border-radius: 8px;
}

/* Repli legacy : le widget Autocomplete attache sa liste .pac-container au
   body avec un z-index (~1000) sous l'overlay de la modale (99999). */
.pac-container {
  z-index: 100001 !important;
}

.resa-note {
  font-size: 13px;
  color: #999;
  margin: 12px 0 0;
}

/* ── Error display ───────────────────────────────────── */
.resa-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
}

.resa-error p {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* ── Loading / Spinner ───────────────────────────────── */
.resa-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.resa-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e5e5;
  border-top-color: var(--resa-primary, #F5C800);
  border-radius: 50%;
  animation: resaSpin 0.8s linear infinite;
}

.resa-spinner-sm {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #111;
  border-radius: 50%;
  animation: resaSpin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes resaSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════════════
   Panel 6 — Confirmation
   ═══════════════════════════════════════════════════════ */

.resa-confirmation {
  text-align: center;
  padding: 32px 0;
}

.resa-confirm-icon {
  margin-bottom: 16px;
}

.resa-confirmation h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.resa-confirmation p {
  font-size: 14px;
  color: #666;
  max-width: 400px;
  margin: 0 auto 8px;
}

.resa-confirm-details {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 16px 24px;
  margin: 24px auto;
  max-width: 400px;
  text-align: left;
}

/* ── Action buttons (WhatsApp & Phone) ───────────────── */
.resa-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 16px;
  flex-wrap: wrap;
}

.resa-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: background 0.2s;
  text-decoration: none;
}

.resa-btn-whatsapp:hover {
  background: #1fad54;
  color: #fff;
  text-decoration: none;
}

.resa-btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--resa-primary, #F5C800);
  color: #111;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: background 0.2s;
  text-decoration: none;
}

.resa-btn-phone:hover {
  background: #D4AD00;
  color: #111;
  text-decoration: none;
}

/* ── Navigation buttons ──────────────────────────────── */
.resa-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  margin-top: auto;
}

.resa-nav .resa-btn-next:first-child {
  margin-left: auto;
}

.resa-btn-next,
.resa-btn-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--resa-primary, #F5C800);
  color: #111;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: background 0.2s;
}

.resa-btn-next:hover,
.resa-btn-confirm:hover {
  background: #D4AD00;
}

.resa-btn-next:disabled,
.resa-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.resa-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: none;
  border: 1px solid #ddd;
  color: #666;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: all 0.2s;
}

.resa-btn-prev:hover {
  border-color: #999;
  color: #111;
}

/* ── Toast notification ──────────────────────────────── */
.resa-toast {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-family: Inter, sans-serif;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: resaToastIn 0.3s ease;
}

.resa-toast-fade {
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes resaToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ── Equipment checkbox (max=1) ─────────────────────── */
.resa-equip-card.resa-equip-checkbox {
  cursor: pointer;
}

.resa-equip-card.resa-equip-checkbox.resa-equip-active {
  border-color: var(--resa-primary, #F5C800);
  background: #FFFBEB;
}

.resa-equip-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
  cursor: pointer;
}

.resa-equip-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.resa-equip-checkmark {
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.resa-equip-cb:checked+.resa-equip-checkmark {
  border-color: var(--resa-primary, #F5C800);
  background: var(--resa-primary, #F5C800);
}

.resa-equip-cb:checked+.resa-equip-checkmark::after {
  content: '\2713';
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

/* ── Secondary driver ──────────────────────────────── */
.resa-secondary-driver {
  margin-top: 20px;
  padding: 16px 20px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

.resa-secondary-driver-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #111;
}

.resa-secondary-cb {
  width: 18px;
  height: 18px;
  accent-color: var(--resa-primary, #F5C800);
  cursor: pointer;
}

.resa-secondary-cost {
  font-size: 13px;
  color: #999;
  font-weight: 400;
}

.resa-secondary-fields {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5e5e5;
}

.resa-secondary-fields .resa-form-field {
  margin-bottom: 8px;
}

/* ── CGV checkbox ──────────────────────────────────── */
.resa-cgv-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
}

.resa-cgv-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  line-height: 1.4;
}

.resa-cgv-cb {
  width: 18px;
  height: 18px;
  accent-color: var(--resa-primary, #F5C800);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
}

.resa-cgv-label a {
  color: var(--resa-primary, #D4AD00);
  text-decoration: underline;
  font-weight: 500;
}

.resa-cgv-label a:hover {
  color: #111;
}

/* ═══════════════════════════════════════════════════════
   Payment Section (Stripe)
   ═══════════════════════════════════════════════════════ */

.resa-payment-section {}

.resa-payment-choice-label {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin: 0 0 10px;
}

.resa-payment-summary {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin: 16px 0;
}

.pay-block {
  flex: 1;
  background: #f8f8f0;
  border-radius: 12px;
  padding: 16px 20px;
}

.pay-block-main {
  border-left: 4px solid var(--resa-primary, #F5C800);
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pay-block-detail {
  display: flex;
  align-items: center;
}

.resa-payment-summary .payable-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}

.resa-payment-summary .payable-amount {
  font-size: 1.4em;
  font-weight: 700;
  color: #111;
}

.resa-payment-summary .payable-detail {
  font-size: 0.85em;
  color: #555;
  line-height: 1.6;
}

/* Stripe Payment Element wrapper */
#stripe-payment-element,
[data-stripe-element] {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin: 16px 0 8px;
  background: #fff;
  min-height: 60px;
}

#stripe-payment-errors,
[data-stripe-errors] {
  color: #e53e3e;
  font-size: 0.85em;
  margin-top: 8px;
  min-height: 20px;
}

/* Pay button (Stripe purple variant) */
.resa-btn-pay {
  background: #635bff !important;
  color: #fff !important;
}

.resa-btn-pay:hover {
  background: #5046e5 !important;
}

.resa-btn-pay:disabled {
  background: #a5a1ff !important;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .resa-modal {
    max-width: 100%;
    border-radius: 16px;
  }

  .resa-calendars {
    grid-template-columns: 1fr;
  }

  .resa-equip-grid {
    grid-template-columns: 1fr;
  }

  .resa-form-row,
  .resa-form-row-3 {
    grid-template-columns: 1fr;
  }

  .resa-radio-grid {
    grid-template-columns: 1fr;
  }

  .resa-payment-summary {
    flex-direction: column;
  }

  .resa-stepper {
    gap: 0;
    padding: 16px 8px;
  }

  .resa-step {
    min-width: 30px;
  }

  .step-label {
    display: none;
  }

  .step-num {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .step-line {
    min-width: 12px;
    margin-bottom: 0;
  }

  .resa-panel {
    padding: 0 16px 16px;
  }

  .resa-modal-header {
    padding: 16px;
  }

  .resa-confirm-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .resa-btn-whatsapp,
  .resa-btn-phone {
    justify-content: center;
  }

  .resa-radio-card {
    padding: 12px 14px;
  }

  .resa-equip-name {
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .resa-trigger-btn:not(.resa-trigger-btn--fixed) {
    display: none !important;
  }

  .resa-trigger-btn--fixed {
    display: inline-flex !important;
    justify-content: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    font-size: 16px;
    font-weight: 700;
    z-index: 99998;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  }

  /* Force the modal to behave as a true full-screen overlay on mobile,
     overriding any page-level inline-render rules saved in Bricks. */
  body .resa-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  body .resa-modal-overlay:not(.is-open) {
    display: none !important;
  }

  body .resa-modal-overlay.is-open {
    display: flex !important;
  }

  body .resa-modal {
    background: #fff !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body .resa-modal-header,
  body .resa-close {
    display: flex !important;
  }

  /* Sticky footer: only the panel content scrolls */
  body .resa-modal-overlay.is-open .resa-modal {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body .resa-modal-overlay.is-open .resa-modal-header {
    padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
  }

  body .resa-modal-overlay.is-open .resa-panel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-top: 20px !important;
    padding-bottom: 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body .resa-modal-overlay.is-open .resa-panel .resa-nav,
  body .resa-modal-overlay.is-open .resa-panel .resa-nav-price {
    position: sticky !important;
    bottom: 0 !important;
    /* The mobile panel has 16px horizontal padding. Matching that inset keeps
       the sticky action bar full-bleed without creating a 12px page overflow. */
    margin: 24px -16px 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff !important;
    border-top: 1px solid #e5e5e5 !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06) !important;
    z-index: 5 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
  }

  body .resa-modal-overlay.is-open .resa-panel .resa-inline-price {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    /* Shrinkable: the duration + km line can be long and must never squeeze
       the action button out of the sticky bar. */
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.2;
    font-size: 13px;
    color: #111;
  }

  body .resa-modal-overlay.is-open .resa-panel .resa-inline-dur {
    font-size: 11px;
  }

  body .resa-modal-overlay.is-open .resa-panel .resa-inline-km {
    font-size: 13px;
    padding: 2px 10px;
  }

  body .resa-modal-overlay.is-open .resa-panel .resa-btn-next {
    flex: 0 1 auto;
    white-space: nowrap;
  }
  body .resa-modal-overlay.is-open .resa-panel .resa-inline-price[style*="display:none"],
  body .resa-modal-overlay.is-open .resa-panel .resa-inline-price[style*="display: none"] {
    display: none !important;
  }
  body .resa-modal-overlay.is-open .resa-panel .resa-inline-total { font-weight: 700; font-size: 16px; }

  body .resa-modal-overlay.is-open .resa-panel .resa-btn-next,
  body .resa-modal-overlay.is-open .resa-panel .resa-btn-confirm,
  body .resa-modal-overlay.is-open .resa-panel .resa-btn-prev {
    flex: 1 1 auto;
    justify-content: center;
    width: auto !important;
  }

  .resa-cal-legend {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .resa-modal-overlay {
    padding: 0;
  }

  .resa-modal {
    border-radius: 0;
  }

  .resa-panel h3 {
    font-size: 18px;
  }

  .resa-nav {
    flex-direction: column-reverse;
  }

  .resa-btn-next,
  .resa-btn-confirm,
  .resa-btn-prev {
    justify-content: center;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════
   Hardened interaction and accessibility layer
   ═══════════════════════════════════════════════════════ */
.resa-sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.resa-modal:focus {
  outline: none;
}

.resa-modal :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}

.resa-cal-grid .day {
  min-width: 34px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #111;
  font-family: inherit;
  line-height: 1;
}

.resa-cal-grid .day:disabled {
  opacity: 1;
}

.resa-cal-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.resa-calendar-privacy-note {
  margin: 10px 4px 0;
  color: #666;
  font-size: 11px;
}

.resa-summary-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 14px 18px;
}

.resa-summary-payable {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
  color: #111;
}

.resa-summary-payable strong {
  color: #166534;
}

.resa-radio-card > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.resa-radio-card:has(input[type="radio"]:focus-visible),
.resa-equip-toggle:has(.resa-equip-cb:focus-visible) .resa-equip-checkmark {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}

.resa-radio-card:has(input[type="radio"]:disabled) {
  cursor: not-allowed;
  opacity: 0.65;
}

.resa-error:focus {
  outline: 3px solid #b91c1c;
  outline-offset: 2px;
}

.resa-address-is-open > :not(.resa-panel[data-panel="3"]) {
  pointer-events: none;
}

.resa-confirm-details div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr;
  gap: 12px;
  padding: 5px 0;
}

.resa-confirm-details dt {
  color: #666;
}

.resa-confirm-details dd {
  margin: 0;
  color: #111;
  font-weight: 600;
}

body.resa-modal-open {
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  .resa-modal,
  .resa-modal * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .resa-cal-grid .day {
    min-width: 32px;
    min-height: 38px;
  }

  .resa-calendar-privacy-note {
    font-size: 12px;
  }
}

/* ══════════════════════════════════════════════════════════
   COMPACT SINGLE-STEP LAYOUT (v4)
   ══════════════════════════════════════════════════════════ */

/* Smaller calendar */
.resa-cal-compact {
  margin-bottom: 16px;
}

.resa-cal-hint {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.4;
}

.resa-cal-hint strong {
  color: #111;
}

/* Dual-month calendar */
.resa-calendar-sm {
  padding: 6px 8px;
  font-size: 12px;
  border: none;
}

.resa-calendar-sm .resa-cal-nav {
  margin-bottom: 4px;
}

.resa-calendar-sm .resa-cal-nav span {
  flex: 1;
}

.resa-calendar-sm .resa-cal-legend {
  font-size: 10px;
  margin-top: 4px;
  gap: 8px;
}

.resa-cal-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.resa-cal-month-title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.resa-cal-month .resa-cal-grid .day {
  padding: 5px 0;
  font-size: 12px;
}

.resa-cal-month .resa-cal-grid .day-header {
  padding: 2px 0;
}

@media (max-width: 520px) {
  .resa-cal-duo {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Range calendar highlighting */
.resa-cal-grid .day.range-start {
  border-radius: 8px 0 0 8px;
}

.resa-cal-grid .day.range-end {
  border-radius: 0 8px 8px 0;
}

.resa-cal-grid .day.range-start.range-end {
  border-radius: 8px;
}

.resa-cal-grid .day.in-range {
  background: rgba(245, 200, 0, 0.15);
  color: #111;
  border-radius: 0;
}

.resa-cal-legend .legend-dot.selected {
  background: var(--resa-primary, #F5C800);
}

/* Time selects row — compact */
.resa-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.resa-time-row .resa-time-field label {
  font-size: 13px;
  color: #888;
  margin-bottom: 3px;
  display: block;
}

.resa-time-row .resa-time-select {
  padding: 4px 6px;
  font-size: 13px;
  height: auto;
  border-radius: 6px;
  width: 100%;
  line-height: 2;
}

/* Compact fields (selects) */
.resa-compact-field {
  margin-bottom: 14px;
}

.resa-compact-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
}

.resa-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  color: #111;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: auto;
}

.resa-select:focus {
  border-color: var(--resa-primary, #F5C800);
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 200, 0, 0.15);
}

.resa-km-extra-note {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #664d03;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 999px;
  padding: 4px 10px;
  margin-top: 2px;
  margin-bottom: 0;
  text-align: left;
  line-height: 1.3;
}

.resa-km-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resa-km-control {
  flex: 1 1 0;
  min-width: 0;
}

.resa-km-info {
  flex: 0 0 auto;
  text-align: left;
}

.resa-km-total-note {
  font-size: 12px;
  color: #444;
  margin: 0;
  text-align: left;
}

.resa-km-total-note strong {
  color: #1a1a1a;
}

.resa-km-total-detail {
  color: #999;
  margin-left: 8px;
}

/* Location à l'heure — bouton de bascule horaire ↔ forfait journée. */
.resa-hourly-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  background: var(--resa-primary, #f5c800);
  border: 1px solid var(--resa-primary, #f5c800);
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.resa-hourly-toggle:hover {
  filter: brightness(0.95);
}

/* Location à l'heure — motif du plafond (remplace la bascule hors limite). */
.resa-hourly-cap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  padding: 9px 12px;
  background: #f4f6f8;
  border: 1px solid #e1e6ea;
  border-radius: 10px;
  color: #4a5560;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
}

.resa-hourly-cap-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #7a8794;
}

/* Location à l'heure — badge « KM illimité » (remplace le sélecteur de forfait). */
.resa-km-unlimited {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #1b5e20;
  background: #e6f4ea;
  border: 1px solid #b7dfc2;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 8px 0 0;
}

/* Location à l'heure — avertissement KM illimités / forfait journée. */
.resa-hourly-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 12px 14px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid var(--resa-primary, #f5c800);
  border-radius: 10px;
  color: #5d4b00;
  font-size: 13px;
  line-height: 1.45;
}

.resa-hourly-warning-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #b78a00;
}

.resa-hourly-warning strong {
  color: #4a3c00;
}

/* Avertissement « hors heures d'ouverture » (prise en charge) — bandeau ambre. */
.resa-hours-warning {
  margin: 10px 0 20px;
  padding: 10px 14px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid var(--resa-primary, #f5c800);
  border-radius: 10px;
  color: #5d4b00;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
  animation: resaHoursWarningFade 0.25s ease;
}

.resa-hours-warning[hidden] {
  display: none;
}

@keyframes resaHoursWarningFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .resa-km-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .resa-km-info {
    text-align: left;
  }

  .resa-km-total-note,
  .resa-km-extra-note {
    text-align: left;
  }
}

/* Equipment collapsible */
.resa-equip-details {
  margin-bottom: 6px;
}

.resa-equip-toggle-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  user-select: none;
  list-style: none;
  background: #ffd400;
  color: #000;
  font-weight: 700;
  border-radius: 6px;
}

.resa-equip-toggle-label::-webkit-details-marker {
  display: none;
}

.resa-equip-toggle-label .resa-toggle-icon {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  transition: transform 0.2s;
}

.resa-equip-details[open] .resa-toggle-icon {
  transform: rotate(45deg);
}

/* Equipment list (compact) */
.resa-equip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.resa-equip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
  transition: border-color 0.15s;
}

.resa-equip-item.resa-equip-active {
  border-color: var(--resa-primary, #F5C800);
  background: rgba(245, 200, 0, 0.04);
}

.resa-equip-item .resa-equip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.resa-equip-item .resa-equip-name {
  font-size: 13px;
  font-weight: 500;
  color: #111;
}

.resa-equip-item .resa-equip-price {
  font-size: 12px;
  color: #666;
}

/* Conducteur secondaire : libellé et prix en gras (demande client 03/09). */
.resa-sd-card .resa-equip-name {
  font-weight: 700;
}

.resa-sd-card .resa-equip-price {
  font-weight: 700;
  color: #111;
}

.resa-equip-item .resa-equip-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.resa-equip-item .resa-equip-toggle {
  flex-shrink: 0;
  margin-left: 12px;
}

/* ── Equipment photo + floating tooltip ───────────────────── */
.resa-equip-photo {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  overflow: visible;
  cursor: zoom-in;
  display: inline-flex;
}

.resa-equip-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.resa-equip-photo-preview {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: 180px;
  height: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}

.resa-equip-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.resa-equip-photo:hover .resa-equip-photo-preview,
.resa-equip-photo:focus-visible .resa-equip-photo-preview,
.resa-equip-photo.resa-photo-open .resa-equip-photo-preview {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Insurance checkbox group (multi-insurance) ───────────── */
.resa-ins-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resa-ins-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s;
}

.resa-ins-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--resa-primary, #F5C800);
}

.resa-ins-item.resa-ins-active {
  border-color: var(--resa-primary, #F5C800);
  background: rgba(245, 200, 0, 0.04);
}

.resa-ins-item.resa-ins-base {
  cursor: default;
  border-color: var(--resa-primary, #F5C800);
  background: rgba(245, 200, 0, 0.06);
}

.resa-ins-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  line-height: 1.35;
}

.resa-ins-price {
  flex-shrink: 0;
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

.resa-ins-base .resa-ins-price {
  color: #2f855a;
  font-weight: 600;
}

/* ── Recap small notes / per-line detail ──────────────────── */
.resa-summary-note {
  font-size: 11.5px;
  color: #888;
  margin: -2px 0 6px;
}

.resa-summary-detail {
  display: block;
  font-size: 11.5px;
  color: #888;
  font-weight: 400;
  margin-top: 1px;
}

/* Inline price (left of button) */
.resa-nav-price {
  align-items: center;
}

.resa-inline-price {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.resa-inline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.resa-inline-dur {
  font-size: 12px;
  color: #888;
}

.resa-inline-km {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  background: #fdf3cd;
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}

.resa-inline-km[hidden] {
  display: none;
}

.resa-inline-price.is-warn .resa-inline-dur {
  color: #b42318;
  font-weight: 600;
}

.resa-inline-total {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.resa-summary-row .resa-summary-sub {
  display: block;
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-top: 2px;
}

/* Tighten panel 1 spacing */
.resa-cal-compact {
  margin-bottom: 10px;
}

.resa-cal-hint {
  margin-bottom: 6px;
}

.resa-compact-field {
  margin-bottom: 10px;
}

.resa-compact-label {
  margin-bottom: 4px;
}

.resa-select {
  padding: 7px 10px;
}

/* Secondary driver card */
.resa-sd-card.resa-equip-active {
  border-color: var(--resa-primary, #F5C800);
  background: rgba(245, 200, 0, 0.04);
}

.resa-location-bar {
  margin-bottom: 8px;
  padding: 8px 12px;
}

/* Responsive for compact layout */
@media (max-width: 480px) {
  .resa-time-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .resa-calendar-sm {
    max-width: 100%;
  }
}

/* Dates saisies au clavier (JJ.MM.AAAA) */
.resa-form-field input[data-date-input] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.resa-form-field input.is-invalid,
.resa-form-field input.is-invalid:focus {
  border-color: #dc2626;
}

/* iOS zoome sur tout champ < 16px au focus : sur mobile, les champs du
   formulaire passent à 16px pour que la page ne saute pas à chaque saisie. */
@media (max-width: 600px) {
  .resa-form-field input,
  .resa-form-field textarea,
  .resa-form-field select,
  .resa-phone-group select {
    font-size: 16px;
  }
}
