/* ================================
   TUNNEL KLAY PARTNERS — RDV express
   ================================ */

:root {
  --kp-red: #E73D25;
  --kp-red-bright: #FA3719;
  --kp-red-soft: #FF896D;

  --dark-0: #0A0A0E;
  --dark-1: #101014;
  --dark-2: #18181D;
  --dark-3: #25252C;
  --dark-line: rgba(255,255,255,0.08);
  --dark-line-strong: rgba(255,255,255,0.16);

  --text: #FAFAFA;
  --text-mute: rgba(250,250,250,0.65);
  --text-faint: rgba(250,250,250,0.45);

  --font-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --maxw: 640px;
}

/* ================================ RESET ================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--dark-0);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

/* ================================ BACKGROUND ================================ */
.bg-atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-atmos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
  filter: blur(1px);
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(231,61,37,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(10,10,14,0.4) 0%, rgba(10,10,14,0.95) 70%),
    linear-gradient(180deg, rgba(10,10,14,0.55) 0%, rgba(10,10,14,0.92) 60%, var(--dark-0) 100%);
}

/* ================================ HEADER ================================ */
.mini-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--dark-line);
  background: rgba(10,10,14,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { width: 28px; height: 28px; }
.brand-text {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.brand-text em {
  font-style: normal;
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.88em;
}
.header-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ================================ TUNNEL ================================ */
.tunnel {
  position: relative;
  z-index: 5;
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
}

/* Progress */
.progress {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  gap: 8px;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.progress-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--dark-3);
  border: 1px solid var(--dark-line);
  color: var(--text-mute);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 240ms ease;
}
.progress-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 500;
  transition: color 240ms ease;
}
.progress-step.active .progress-num {
  background: var(--kp-red);
  border-color: var(--kp-red);
  color: #fff;
  box-shadow: 0 0 16px rgba(231,61,37,0.5);
}
.progress-step.active .progress-label { color: var(--text); }
.progress-step.done .progress-num {
  background: var(--dark-2);
  border-color: var(--kp-red);
  color: var(--kp-red-soft);
}
.progress-step.done .progress-label { color: var(--text-mute); }
.progress-line {
  flex: 1;
  height: 1px;
  background: var(--dark-line);
  position: relative;
  overflow: hidden;
}
.progress-line-fill {
  position: absolute;
  inset: 0;
  background: var(--kp-red);
  transform: translateX(-100%);
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-line-fill.fill { transform: translateX(0); }

/* Steps */
.step {
  display: none;
  animation: stepIn 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.step-active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-header { margin-bottom: 32px; }
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kp-red-soft);
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid rgba(255,137,109,0.35);
  border-radius: var(--radius-pill);
  background: rgba(231,61,37,0.08);
}
.step-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.step-title em {
  font-style: italic;
  color: var(--kp-red-bright);
}
.step-sub {
  color: var(--text-mute);
  font-size: 1rem;
  line-height: 1.5;
}

/* ================================ FORM ================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.field input {
  background: var(--dark-2);
  border: 1px solid var(--dark-line-strong);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus {
  outline: none;
  border-color: var(--kp-red);
  background: var(--dark-3);
  box-shadow: 0 0 0 4px rgba(231,61,37,0.15);
}
.field input.invalid {
  border-color: #f87171;
  background: rgba(248,113,113,0.05);
}
.field-error {
  font-size: 0.8rem;
  color: #f87171;
  min-height: 0;
  opacity: 0;
  transition: opacity 160ms ease;
}
.field-error.show { opacity: 1; }

/* Radio grid pour patrimoine */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.radio-card {
  cursor: pointer;
  position: relative;
}
.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: var(--dark-2);
  border: 1px solid var(--dark-line-strong);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: all 160ms ease;
  text-align: center;
}
.radio-card:hover .radio-card-inner {
  border-color: var(--kp-red-soft);
  background: var(--dark-3);
}
.radio-card input:checked + .radio-card-inner {
  border-color: var(--kp-red);
  background: rgba(231,61,37,0.12);
  color: #fff;
  box-shadow: 0 0 0 1px var(--kp-red);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow { font-size: 1.1em; transition: transform 200ms ease; }
.btn:hover .arrow { transform: translate(2px, -1px); }

.btn-primary {
  background: var(--kp-red);
  color: #fff;
  border-color: var(--kp-red);
  box-shadow: 0 4px 18px rgba(231,61,37,0.35);
}
.btn-primary:hover {
  background: var(--kp-red-bright);
  border-color: var(--kp-red-bright);
  box-shadow: 0 8px 26px rgba(250,55,25,0.45);
}
.btn-large {
  padding: 18px 28px;
  font-size: 1rem;
  width: 100%;
  margin-top: 8px;
}

.form-fineprint {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.5;
  margin-top: 4px;
}

/* ================================ CONSENTEMENT RGPD ================================ */
.consent-field { margin-top: 4px; }

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.checkbox-card:hover { background: rgba(255,255,255,0.04); border-color: var(--dark-line-strong); }
.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--dark-line-strong);
  background: var(--dark-2);
  position: relative;
  margin-top: 2px;
  transition: all 160ms ease;
}
.checkbox-card input[type="checkbox"]:checked + .checkbox-mark {
  background: var(--kp-red);
  border-color: var(--kp-red);
}
.checkbox-card input[type="checkbox"]:checked + .checkbox-mark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-card input[type="checkbox"]:focus-visible + .checkbox-mark {
  outline: 2px solid var(--kp-red-soft);
  outline-offset: 2px;
}
.checkbox-text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-mute);
}
.checkbox-text a {
  color: var(--kp-red-soft);
  text-decoration: underline;
  text-decoration-color: rgba(255,137,109,0.3);
  text-underline-offset: 2px;
  transition: color 160ms ease;
}
.checkbox-text a:hover { color: var(--kp-red-bright); }

.consent-field .field-error {
  margin-left: 4px;
}

/* Notice CNIL */
.cnil-notice {
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.015);
  border-left: 2px solid var(--dark-line-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-faint);
}
.cnil-notice p + p { margin-top: 8px; }
.cnil-notice strong { color: var(--text-mute); font-weight: 600; }
.cnil-notice a {
  color: var(--text-mute);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
  text-underline-offset: 2px;
}
.cnil-notice a:hover { color: var(--kp-red-soft); }
.cnil-notice .amf-notice { padding-top: 8px; border-top: 1px dashed var(--dark-line); }

/* ================================ ÉTAPE 2 : SLOTS ================================ */
.slots-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--dark-3) transparent;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.day-tabs::-webkit-scrollbar { height: 4px; }
.day-tabs::-webkit-scrollbar-thumb { background: var(--dark-3); border-radius: 2px; }

.day-tab {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 12px 16px;
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 160ms ease;
  text-align: center;
}
.day-tab:hover {
  border-color: var(--kp-red-soft);
  background: var(--dark-3);
}
.day-tab.active {
  border-color: var(--kp-red);
  background: rgba(231,61,37,0.12);
  box-shadow: 0 0 0 1px var(--kp-red);
}
.day-tab-name {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.day-tab.active .day-tab-name { color: var(--kp-red-soft); }
.day-tab-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}
.day-tab-month {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.slot {
  padding: 16px;
  background: var(--dark-2);
  border: 1px solid var(--dark-line-strong);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 160ms ease;
  text-align: center;
}
.slot:hover {
  border-color: var(--kp-red);
  background: rgba(231,61,37,0.1);
  color: #fff;
  transform: translateY(-1px);
}
.slot:active { transform: translateY(0); }
.slot.taken {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot.taken:hover {
  border-color: var(--dark-line-strong);
  background: var(--dark-2);
  color: var(--text);
  transform: none;
}

.recap {
  margin-top: 8px;
  padding: 16px 20px;
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-mute);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recap-row { display: flex; gap: 8px; }
.recap-row strong { color: var(--text); font-weight: 600; }
.recap-row .recap-label { min-width: 90px; color: var(--text-faint); }

.btn-back {
  align-self: flex-start;
  color: var(--text-mute);
  font-size: 0.88rem;
  padding: 8px 0;
  transition: color 160ms ease;
}
.btn-back:hover { color: var(--kp-red-soft); }

/* ================================ ÉTAPE 3 : CONFIRM ================================ */
.confirm-wrapper {
  text-align: center;
  padding: 16px 0;
}
.confirm-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(231,61,37,0.15);
  border: 1px solid rgba(231,61,37,0.4);
  border-radius: 50%;
  color: var(--kp-red-soft);
  animation: confirmPop 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes confirmPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.confirm-wrapper .step-sub { margin-bottom: 32px; }
.confirm-wrapper .step-sub strong { color: var(--text); font-weight: 600; }

.confirm-box {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 0 auto 24px;
  max-width: 520px;
  text-align: left;
}
.confirm-box h3 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--kp-red-soft);
  margin-bottom: 16px;
}
.confirm-steps {
  list-style: none;
  counter-reset: confirmStep;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.confirm-steps li {
  counter-increment: confirmStep;
  position: relative;
  padding-left: 36px;
  font-size: 0.95rem;
  color: var(--text-mute);
  line-height: 1.5;
}
.confirm-steps li::before {
  content: counter(confirmStep);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(231,61,37,0.15);
  border: 1px solid rgba(231,61,37,0.4);
  color: var(--kp-red-soft);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-steps li strong {
  color: var(--text);
  font-weight: 600;
}
.confirm-secondary {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-mute);
}
.confirm-secondary a {
  color: var(--kp-red-soft);
  transition: color 160ms ease;
}
.confirm-secondary a:hover { color: var(--kp-red-bright); }

/* ================================ FOOTER ================================ */
.mini-footer {
  position: relative;
  z-index: 5;
  padding: 28px 32px 24px;
  border-top: 1px solid var(--dark-line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-faint);
  background: rgba(10,10,14,0.7);
  backdrop-filter: blur(8px);
  line-height: 1.6;
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 4px;
}
.footer-legal { color: var(--text-mute); }
.footer-legal strong { color: var(--text); font-weight: 600; }
.footer-regul { font-size: 0.72rem; color: var(--text-faint); }
.footer-regul strong { color: var(--text-mute); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--dark-line);
}
.footer-copy { font-size: 0.7rem; color: var(--text-faint); opacity: 0.7; }
.mini-footer .dot { margin: 0 8px; opacity: 0.4; }
.mini-footer a {
  color: var(--text-mute);
  transition: color 160ms ease;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.15);
  text-underline-offset: 2px;
}
.mini-footer a:hover { color: var(--kp-red-soft); }
.footer-regul a { text-decoration: none; color: var(--text-mute); }
.footer-regul a:hover { color: var(--kp-red-soft); }

/* ================================ PAGES LÉGALES ================================ */
body.page-legal { background: var(--dark-0); }
body.page-legal .mini-header { background: rgba(10,10,14,0.92); }
.header-back {
  color: var(--text-mute);
  font-size: 0.85rem;
  transition: color 160ms ease;
}
.header-back:hover { color: var(--kp-red-soft); }
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 80px;
  flex: 1;
}
.legal-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.1;
  font-weight: 400;
  margin: 12px 0 8px;
  color: var(--text);
}
.legal-wrap h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--kp-red-soft);
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}
.legal-wrap p,
.legal-wrap li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.legal-wrap ul { padding-left: 22px; margin-bottom: 12px; }
.legal-wrap ul ul { padding-left: 22px; margin-top: 6px; }
.legal-wrap li { margin-bottom: 6px; }
.legal-wrap strong { color: var(--text); font-weight: 600; }
.legal-wrap em { font-style: italic; color: var(--text-faint); }
.legal-wrap a {
  color: var(--kp-red-soft);
  text-decoration: underline;
  text-decoration-color: rgba(255,137,109,0.3);
  text-underline-offset: 2px;
  transition: color 160ms ease;
}
.legal-wrap a:hover { color: var(--kp-red-bright); }
.legal-update {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-style: italic;
  margin-bottom: 24px;
}
.legal-wrap section { margin-bottom: 8px; }
.placeholder {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(231,61,37,0.08);
  border: 1px dashed rgba(231,61,37,0.4);
  border-radius: 4px;
  color: var(--kp-red-soft);
  font-size: 0.85em;
  font-style: italic;
}
.legal-back {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-line);
}

/* ================================ RESPONSIVE ================================ */
@media (max-width: 540px) {
  .tunnel { padding: 32px 20px 48px; }
  .mini-header { padding: 16px 20px; }
  .header-trust { display: none; }
  .progress-label { display: none; }
  .progress { gap: 6px; margin-bottom: 32px; }
  .step-title { font-size: 2rem; }
  .radio-grid { grid-template-columns: 1fr; }
  .slots { grid-template-columns: 1fr 1fr; }
  .day-tab { min-width: 68px; padding: 10px 12px; }
  .mini-footer { flex-direction: column; gap: 8px; text-align: center; padding: 16px 20px; }
}
