/* Fox Clean Auto — tunnel réservation publique (UX / design only) */
.page-book {
  --book-pad: clamp(0.85rem, 3.5vw, 1.5rem);
  --book-max: 56rem;
  --book-card-max: 42rem;
  --book-radius: 16px;
  --book-input-h: 3.05rem;
  --book-ease: 0.2s ease;
  min-height: 100vh;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse 70% 45% at 80% -10%, rgba(249, 115, 22, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 30%, rgba(251, 146, 60, 0.06), transparent 60%),
    var(--bg-deep);
  color: var(--text);
}

/* —— Header —— */
.book-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 6, 4, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.book-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(100% - (var(--book-pad) * 2), var(--book-max));
  margin: 0 auto;
  min-height: 3.6rem;
}

.book-top__logo img {
  display: block;
  height: 2.05rem;
  width: auto;
}

.book-top__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.9rem;
}

.book-top__home,
.book-top__login {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.book-top__home:hover,
.book-top__login:hover {
  color: var(--accent-bright);
}

.book-top__home {
  font-weight: 600;
  color: rgba(244, 241, 236, 0.88);
}

@media (max-width: 520px) {
  .book-top__login {
    display: none;
  }
}

/* —— Layout —— */
.book-wrap {
  width: min(100% - (var(--book-pad) * 2), var(--book-card-max));
  margin: 0 auto;
  padding: 1.15rem 0 2rem;
}

/* —— Progress —— */
.book-progress {
  margin-bottom: 1.15rem;
}

.book-progress__label {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.book-progress__bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.book-progress__fill {
  height: 100%;
  width: 16.66%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width var(--book-ease);
}

.book-progress__steps {
  display: none;
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0;
  gap: 0.25rem;
}

@media (min-width: 860px) {
  .book-progress__steps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }
}

.book-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  min-width: 0;
}

.book-progress__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px transparent;
  transition: background var(--book-ease), box-shadow var(--book-ease);
}

.book-progress__name {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.book-progress__step.is-done .book-progress__dot,
.book-progress__step.is-active .book-progress__dot {
  background: var(--accent-bright);
}

.book-progress__step.is-active .book-progress__dot {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.book-progress__step.is-active .book-progress__name,
.book-progress__step.is-done .book-progress__name {
  color: var(--text);
  font-weight: 600;
}

/* —— Card —— */
.book-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--book-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    rgba(18, 16, 14, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  padding: clamp(1.15rem, 3.5vw, 1.75rem);
}

.book-card h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.8vw, 1.7rem);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.book-card__lead {
  margin: 0 0 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* —— Steps (one visible) —— */
.book-step {
  display: none;
}

.book-step.is-active {
  display: block;
  animation: book-step-in 0.22s ease;
}

@keyframes book-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-step.is-active {
    animation: none;
  }
  .book-progress__fill,
  .book-plan,
  .book-slot span {
    transition: none !important;
  }
}

/* —— Offer cards —— */
.book-plans {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .book-plans {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    align-items: stretch;
  }
}

.book-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color var(--book-ease), background var(--book-ease), transform var(--book-ease);
  min-height: 100%;
}

.book-plan--featured {
  border-color: rgba(249, 115, 22, 0.28);
}

.book-plan:hover {
  border-color: rgba(249, 115, 22, 0.4);
}

.book-plan:focus-within {
  outline: 2px solid rgba(249, 115, 22, 0.45);
  outline-offset: 2px;
}

.book-plan:has(input:checked) {
  border-color: rgba(249, 115, 22, 0.75);
  background:
    linear-gradient(165deg, rgba(249, 115, 22, 0.16), transparent 55%),
    rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.book-plan input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
}

.book-plan__check {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}

.book-plan:has(input:checked) .book-plan__check {
  border-color: var(--accent);
  background: var(--accent);
}

.book-plan:has(input:checked) .book-plan__check::after {
  content: "";
  position: absolute;
  left: 0.38rem;
  top: 0.22rem;
  width: 0.32rem;
  height: 0.58rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.book-plan__badge {
  align-self: flex-start;
  margin: 0 0 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  color: var(--accent-bright);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.book-plan__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  padding-right: 1.6rem;
}

.book-plan__price {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.15rem 0 0.2rem;
}

.book-plan__tagline {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(244, 241, 236, 0.9);
}

.book-plan__duration {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.book-plan__desc {
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* —— Fields —— */
.book-grid {
  display: grid;
  gap: 0 0.85rem;
}

@media (min-width: 640px) {
  .book-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.book-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}

.book-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.book-optional {
  font-weight: 500;
  color: var(--text-muted);
}

.book-field input,
.book-field textarea,
.book-field select {
  width: 100%;
  min-height: var(--book-input-h);
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0a08;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--book-ease), box-shadow var(--book-ease);
}

.book-field input::placeholder,
.book-field textarea::placeholder {
  color: rgba(161, 161, 170, 0.55);
}

.book-field input:hover,
.book-field textarea:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.book-field input:focus,
.book-field textarea:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.book-field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.book-field__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.book-reassure {
  margin: -0.55rem 0 1.1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.08);
  color: rgba(244, 241, 236, 0.9);
  font-size: 0.88rem;
  font-weight: 500;
}

.book-zone-note {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* —— Slots —— */
.book-slots__title {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.book-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

@media (min-width: 480px) {
  .book-slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .book-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.book-slot {
  display: block;
  cursor: pointer;
  position: relative;
}

.book-slot input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
}

.book-slot span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  transition: border-color var(--book-ease), background var(--book-ease), color var(--book-ease);
}

.book-slot:hover span {
  border-color: rgba(249, 115, 22, 0.4);
}

.book-slot:has(input:checked) span,
.book-slot:has(input:focus-visible) span {
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #1a0f05;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

.book-slots__empty,
.book-slots__loading {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.book-slots__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.book-slots__loading::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.25);
  border-top-color: var(--accent-bright);
  animation: book-spin 0.7s linear infinite;
}

@keyframes book-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-slots__loading::before {
    animation: none;
    border-top-color: var(--accent-bright);
  }
}

/* —— Summary —— */
.book-summary {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background:
    linear-gradient(160deg, rgba(249, 115, 22, 0.1), transparent 45%),
    rgba(0, 0, 0, 0.28);
}

.book-summary__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.book-summary__row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.book-summary__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.book-summary__meta strong {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  white-space: pre-line;
}

.book-summary__price {
  margin: 0.1rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.book-summary__edit {
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--accent-bright);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.book-summary__edit:hover {
  border-color: rgba(249, 115, 22, 0.45);
}

/* —— Nav buttons —— */
.book-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.book-nav .btn {
  justify-content: center;
  min-height: 3.05rem;
  font-weight: 700;
  border-radius: 12px;
  padding-inline: 1.15rem;
}

.book-nav .btn--ghost {
  flex: 0 1 auto;
  min-width: 6.5rem;
}

.book-nav .btn--primary,
.book-nav .book-btn-next,
.book-nav #bookSubmit {
  flex: 1 1 12rem;
}

.page-book .btn--primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #1a0f05;
  border: 0;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.25);
}

.page-book .btn--primary:hover {
  filter: brightness(1.05);
}

.page-book .btn--primary:disabled,
.page-book .btn--primary.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.page-book .btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.page-book .btn--ghost:hover {
  border-color: rgba(249, 115, 22, 0.4);
  color: var(--accent-bright);
}

@media (max-width: 520px) {
  .book-nav {
    flex-direction: column-reverse;
  }

  .book-nav .btn--ghost,
  .book-nav .btn--primary,
  .book-nav .book-btn-next,
  .book-nav #bookSubmit {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* —— Errors —— */
.book-errors {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  list-style: none;
}

.book-errors li {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

/* —— Confirmation success —— */
.book-success {
  text-align: center;
}

.book-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: var(--accent-bright);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.book-success .book-card__lead {
  max-width: 32rem;
  margin-inline: auto;
}

.book-success .book-summary {
  text-align: left;
  margin-top: 1.25rem;
}

.book-success .book-nav {
  justify-content: center;
}

.book-success .book-nav .btn {
  flex: 0 1 auto;
  min-width: min(100%, 16rem);
}

.book-success__hint {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
