/* ============================================================
   Test Drive — two-column form (left) + vehicle image (right)
   Steps: Modèle → Lieu → Date → Heure → Coordonnées → Confirmation
   ============================================================ */

.testdrive-page {
  /* navbar always solid (no hero) */
}

.c-td {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 1fr;
  padding-top: var(--navbar-h);
}

@media (max-width: 1024px) {
  .c-td {
    grid-template-columns: 1fr;
    padding-top: var(--navbar-h-mobile);
  }
}

.c-td__form-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-16) clamp(24px, 6vw, 80px);
  background: var(--color-bg);
}

@media (max-width: 640px) {
  .c-td__form-col { padding: var(--s-8) var(--gutter-mobile); }
}

.c-td__hero-col {
  position: relative;
  background: var(--color-bg-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
}

@media (max-width: 1024px) {
  .c-td__hero-col {
    order: -1;
    min-height: 280px;
    aspect-ratio: 16 / 9;
  }
}

.c-td__hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(24px, 6vw, 80px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}

.c-td__hero-meta {
  position: absolute;
  left: var(--s-10);
  bottom: var(--s-10);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-display);
}

@media (max-width: 640px) {
  .c-td__hero-meta { left: var(--gutter-mobile); bottom: var(--s-4); }
}

.c-td__hero-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.c-td__hero-name {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--color-text-strong);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
}

/* === Form area ========================================== */
.c-td__form {
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

.c-td__header {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.c-td__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: var(--ls-tight);
  color: var(--color-text-strong);
}

.c-td__subtitle {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* === Model selection list ============================= */
.c-model-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.c-model-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out);
  text-align: left;
  width: 100%;
}

.c-model-row:last-child { border-bottom: 0; }

.c-model-row:hover { background: var(--color-bg-soft); }

.c-model-row.is-selected {
  background: var(--color-bg-soft);
}

.c-model-row__thumb {
  width: 80px;
  height: 44px;
  border-radius: var(--radius-xs);
  background: var(--gray-50) center / cover no-repeat;
  flex: 0 0 80px;
}

.c-model-row__name {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--color-text-strong);
}

.c-model-row__check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}

.c-model-row.is-selected .c-model-row__check {
  border-color: var(--brand-black);
}

.c-model-row.is-selected .c-model-row__check::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-black);
}

/* === Search input (Lieu step) ========================== */
.c-search-input {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--s-3);
}

.c-search-input__icon {
  position: absolute;
  left: var(--s-4);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.c-search-input__field {
  padding-left: 44px !important;
  padding-right: 44px !important;
}

.c-search-input__clear {
  position: absolute;
  right: var(--s-3);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: var(--gray-100);
  transition: background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
}
.c-search-input__clear:hover {
  background: var(--color-text-strong);
  color: var(--white);
}

.c-loc-row__match {
  background: rgba(255, 0, 34, 0.14);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.c-loc-empty {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--s-6) var(--s-3);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
}

/* === Location radio cards ============================= */
.c-loc-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.c-loc-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
  width: 100%;
  text-align: left;
}

.c-loc-row:hover { border-color: var(--brand-black); }

.c-loc-row.is-selected {
  border-color: var(--brand-black);
  background: var(--color-bg-soft);
}

.c-loc-row__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  flex: 0 0 18px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-fast) var(--ease-out);
}

.c-loc-row.is-selected .c-loc-row__radio {
  border-color: var(--brand-black);
}
.c-loc-row.is-selected .c-loc-row__radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-black);
}

.c-loc-row__body { flex: 1; min-width: 0; }

.c-loc-row__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--color-text-strong);
  margin-bottom: 2px;
}

.c-loc-row__addr {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* === Calendar ========================================= */
.c-cal {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--s-4);
  background: var(--color-bg-elevated);
  user-select: none;
}

.c-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-3);
}

.c-cal__month {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--color-text-strong);
}

.c-cal__nav {
  display: inline-flex;
  gap: var(--s-1);
}

.c-cal__nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-strong);
  transition: border-color var(--t-fast) var(--ease-out);
}
.c-cal__nav-btn:hover { border-color: var(--brand-black); }
.c-cal__nav-btn[disabled] { opacity: 0.4; cursor: not-allowed; border-color: var(--color-border); }

.c-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.c-cal__weekday {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: var(--s-2) 0;
}

.c-cal__day {
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-strong);
  cursor: pointer;
  border: 0;
  background: transparent;
  transition: background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
}
.c-cal__day:hover:not([disabled]):not(.is-selected) { background: var(--gray-100); }
.c-cal__day[disabled] {
  color: var(--gray-300);
  cursor: not-allowed;
}
.c-cal__day.is-other { visibility: hidden; }
.c-cal__day.is-today {
  outline: 1.5px solid var(--brand-black);
  outline-offset: -1.5px;
}
.c-cal__day.is-selected {
  background: var(--brand-black);
  color: var(--white);
}

/* === Time slots ======================================== */
.c-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-2);
}

@media (max-width: 640px) {
  .c-slots { grid-template-columns: repeat(3, 1fr); }
}

.c-slot {
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-elevated);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-text-strong);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
}
.c-slot:hover:not([disabled]):not(.is-selected) { border-color: var(--brand-black); }
.c-slot[disabled] { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.c-slot.is-selected {
  background: var(--brand-black);
  border-color: var(--brand-black);
  color: var(--white);
}

.c-slots-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.c-slots-group__label {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* === Summary card (final step) ========================= */
.c-summary {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  overflow: hidden;
}

.c-summary__section {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--color-border);
}
.c-summary__section:last-child { border-bottom: 0; }

.c-summary__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-3);
}

.c-summary__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--color-text-strong);
}

.c-summary__edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease-out);
}
.c-summary__edit:hover { color: var(--color-text-strong); }

.c-summary__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s-3);
  align-items: baseline;
  padding: 6px 0;
}

.c-summary__key {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.c-summary__val {
  font-size: var(--fs-sm);
  color: var(--color-text-strong);
  font-weight: 500;
}

/* === Success state ===================================== */
.c-td__success {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.c-td__success-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E6F6EC;
  color: #0E6A2C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-td__success-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: var(--ls-tight);
  color: var(--color-text-strong);
}

.c-td__success-body {
  color: var(--color-text-muted);
  font-size: var(--fs-base);
}

/* Force solid navbar on test drive page */
.testdrive-page .c-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-strong);
}
[data-theme="dark"] .testdrive-page .c-navbar {
  background: rgba(11, 11, 18, 0.92);
  border-bottom-color: rgba(255,255,255,0.08);
  color: var(--white);
}
