/* ═══════════════════════════════════════════════════════════════════════════
   CHAMPAGNE GARDET — ONBOARDING (create.php)
   Split 50/50 : mansion à gauche, formulaire à droite.
   Construit sur les tokens de homepage.css.
   ═══════════════════════════════════════════════════════════════════════════ */

body.page-onboarding {
  background: #1a1a1a;
  min-height: 100vh;
  min-height: 100svh;
  display: block;
  overflow-x: hidden;
}

/* Désactive la nav flottante héritée éventuellement de homepage.css
   (la page d'onboarding n'a pas de nav globale) */
body.page-onboarding .top-nav,
body.page-onboarding .site-footer { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — split 50/50
   ═══════════════════════════════════════════════════════════════════════════ */

.onboarding {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
}

/* ─── LEFT : mansion + logo ─── */
.ob-left {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
}

.ob-left-image {
  position: absolute;
  inset: 0;
  background-image: url('img/maison.jpg');
  background-size: cover;
  background-position: center;
  /* Léger renforcement sépia/contraste pour cohérence avec la maquette */
  filter: brightness(0.92) contrast(1.05) saturate(0.95);
}

.ob-left-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.0) 25%, rgba(0,0,0,0.0) 75%, rgba(0,0,0,0.45) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.0) 70%, rgba(0,0,0,0.25) 100%);
}

.ob-logo {
  position: absolute;
  top: clamp(24px, 3vw, 36px);
  left: clamp(28px, 3.5vw, 56px);
  z-index: 2;
  display: inline-flex;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
}
.ob-logo .logo-svg {
  width: clamp(120px, 12vw, 160px);
  height: auto;
  color: var(--gold);
  display: block;
}

/* ─── RIGHT : form panel ─── */
.ob-right {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(36px, 4.5vw, 64px) clamp(28px, 5vw, 80px);
  background: #1a1a1a;
  min-height: 100vh;
  min-height: 100svh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEPPER
   ═══════════════════════════════════════════════════════════════════════════ */

.stepper {
  list-style: none;
  margin: 0 0 clamp(36px, 5vw, 60px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.step {
  position: relative;
  text-align: center;
  padding: 0 6px;
}

/* Ligne pointillée entre les dots (segments) — par défaut */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  border-top: 1px dashed rgba(201,168,76,0.4);
  pointer-events: none;
  transition: border-top-color 0.3s ease, border-top-style 0.3s ease;
}

/* Étapes complétées : ligne CONTINUE en or vif vers l'étape suivante
   (matérialise la progression — la portion « parcourue » devient solide). */
.step--done:not(:last-child)::after {
  border-top: 1.5px solid var(--gold);
}

/* Dot */
.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--bg-main);
  border: 1.5px solid var(--gold);
  position: relative;
  z-index: 1;
  transition: all 0.25s ease;
}

/* État actif : dot plein blanc, ring or, halo */
.step--current .step-dot {
  background: #fff;
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(201,168,76,0.18),
    0 0 14px rgba(255,240,180,0.4);
}
.step--current .step-primary { color: #fff; }
.step--current .step-secondary { color: rgba(255,255,255,0.7); }

/* Étapes complétées (pour usage futur) */
.step--done .step-dot {
  background: var(--gold);
  border-color: var(--gold);
}

/* Étapes à venir */
.step--todo .step-dot {
  background: var(--bg-main);
  border-color: rgba(201,168,76,0.45);
}
.step--todo .step-primary  { color: rgba(255,255,255,0.85); }
.step--todo .step-secondary { color: rgba(255,255,255,0.45); }

/* Labels */
.step-text {
  display: block;
  font-family: 'Jost', sans-serif;
  line-height: 1.35;
}
.step-primary {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.step-secondary {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BODY (titre + form)
   ═══════════════════════════════════════════════════════════════════════════ */

.ob-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.ob-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: 0.01em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 14px;
  white-space: nowrap;         /* force le titre sur une seule ligne */
}

.ob-subtitle {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 0.005em;
}

.ob-intro {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(232,224,208,0.78);
  text-align: center;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto clamp(28px, 3.5vw, 38px);
}

.ob-error {
  background: rgba(80,15,15,0.85);
  color: #ffd5d0;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid rgba(180,60,40,0.5);
}

/* ─── Bandeau de bienvenue post-démo (step 1, from_demo=true) ────────────────
   Visuel chaleureux gold tendre — signal de transition « sandbox → vraie
   inscription ». Pas de friction (pas d'action requise), juste un message
   rassurant + cadrage temporel (« en 5 minutes »).
   Icône à gauche, texte centré sur sa colonne. Border or subtil + glow léger
   pour faire écho au champagne sans crier. */
.ob-welcome-demo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(201,168,76,0.10) 0%, rgba(201,168,76,0.04) 100%);
  border: 1px solid rgba(201,168,76,0.45);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 auto 22px;
  max-width: 540px;
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.06) inset,
    0 4px 18px rgba(201,168,76,0.08);
  animation: ob-welcome-demo-in 480ms ease-out;
}
.ob-welcome-demo-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.45));
}
.ob-welcome-demo-body {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(232,224,208,0.92);
  letter-spacing: 0.01em;
}
@keyframes ob-welcome-demo-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 520px) {
  .ob-welcome-demo { padding: 12px 14px; gap: 10px; }
  .ob-welcome-demo-icon { font-size: 18px; }
  .ob-welcome-demo-body { font-size: 12.5px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM
   ═══════════════════════════════════════════════════════════════════════════ */

.ob-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  position: relative;
}

.field-label {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* ─── Inputs ─── */
.ob-form input[type="text"],
.ob-form input[type="email"] {
  width: 100%;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 14px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--gold);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

.ob-form input::placeholder {
  color: rgba(232,224,208,0.5);
  font-weight: 300;
}

.ob-form input:hover {
  border-color: var(--gold-light);
}

.ob-form input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}

/* Annule le bleu d'autofill */
.ob-form input:-webkit-autofill,
.ob-form input:-webkit-autofill:hover,
.ob-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset;
  caret-color: var(--text-primary);
  transition: background-color 9999s ease-in-out 0s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM COMBOBOX
   ═══════════════════════════════════════════════════════════════════════════ */

.combo {
  position: relative;
}

.combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 14px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--gold);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
}
.combo-trigger:hover { border-color: var(--gold-light); }
.combo-trigger:focus-visible {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}

/* Placeholder colour quand aucune valeur n'est choisie */
.combo[data-value=""] .combo-label {
  color: rgba(232,224,208,0.5);
}

.combo-chevron {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

/* État ouvert : le trigger se "soude" au panneau (rayon bas = 0) */
.combo[data-open="true"] .combo-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.combo[data-open="true"] .combo-chevron {
  transform: rotate(180deg);
}

/* Panneau de liste */
.combo-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #1a1a1a;
  border: 1px solid var(--gold);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  /* Caché par défaut */
  display: none;
  /* Petit scrollbar custom */
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.combo-list::-webkit-scrollbar { width: 6px; }
.combo-list::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

.combo[data-open="true"] .combo-list { display: block; }

.combo-option {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-primary);
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  letter-spacing: 0.01em;
}

.combo-option:hover,
.combo-option.is-active {
  background: rgba(201,168,76,0.12);
  color: var(--gold-light);
}

.combo-option.is-selected {
  color: var(--gold);
  font-weight: 400;
}
.combo-option.is-selected::before {
  /* Petite indication visuelle de l'option sélectionnée — discrète */
  content: "•";
  margin-right: 8px;
  color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTON CONTINUE — gold gradient
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-continue {
  margin-top: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 8px;
  border: 1px solid rgba(40,25,5,0.5);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 500;
  color: #2a1a05;
  cursor: pointer;
  letter-spacing: 0.01em;
  background:
    linear-gradient(180deg,
      #f0d27e 0%,
      #e2bc60 30%,
      #d4ad53 65%,
      #c39e48 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,245,200,0.5),
    inset 0 -1px 0 rgba(60,40,10,0.35),
    0 6px 18px -6px rgba(201,168,76,0.5),
    0 2px 6px rgba(0,0,0,0.25);
  text-shadow: 0 1px 0 rgba(255,240,200,0.4);
  transition: all 0.18s ease;
}

.btn-continue:hover {
  background:
    linear-gradient(180deg,
      #f5d98a 0%,
      #ecc670 30%,
      #ddb55c 65%,
      #cba34d 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,250,210,0.6),
    inset 0 -1px 0 rgba(60,40,10,0.35),
    0 8px 22px -6px rgba(201,168,76,0.6),
    0 3px 8px rgba(0,0,0,0.3);
}

.btn-continue:active {
  transform: translateY(0);
  background:
    linear-gradient(180deg,
      #c39e48 0%,
      #d4ad53 50%,
      #f0d27e 100%);
  box-shadow:
    inset 0 2px 4px rgba(40,25,5,0.4),
    0 1px 3px rgba(0,0,0,0.2);
}

.btn-continue:focus-visible {
  outline: 2px solid rgba(255,240,180,0.7);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HELP LINKS (pied de panel droit)
   ═══════════════════════════════════════════════════════════════════════════ */

.ob-help {
  margin-top: clamp(28px, 4vw, 44px);
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(232,224,208,0.6);
  letter-spacing: 0.01em;
  white-space: nowrap;        /* force la ligne d'aide sur une seule ligne */
}
.ob-help a {
  color: rgba(232,224,208,0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  margin: 0 4px;
  transition: color 0.2s ease;
}
.ob-help a:hover { color: var(--gold-light); }
.ob-help span { margin: 0 6px; color: rgba(232,224,208,0.4); }

/* ═══════════════════════════════════════════════════════════════════════════
   NATIVE SELECT (step 2 — Logistics Frequency)
   Style discret : bordure plus fine que les inputs, chevron OS custom.
   ═══════════════════════════════════════════════════════════════════════════ */

.native-select {
  position: relative;
}

.native-select::after {
  /* Chevron custom — SVG inline en background */
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 12px;
  height: 12px;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888880' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  transform: translateY(-50%);
  transition: transform 0.18s ease;
}

.native-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 12px 38px 12px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(232,224,208,0.22);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Supprime le triangle natif Edge/IE */
.native-select select::-ms-expand { display: none; }

.native-select select:hover {
  border-color: rgba(232,224,208,0.4);
}

.native-select select:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}

/* Style des <option> dans le menu déroulant (limité selon les navigateurs) */
.native-select select option {
  background: #1a1a1a;
  color: var(--text-primary);
  padding: 10px;
}

.native-select select option:disabled {
  color: rgba(232,224,208,0.4);
}

/* L'option placeholder ("e.g. Weekly, Monthly") en gris muted */
.native-select select:has(option[value=""]:checked) {
  color: rgba(232,224,208,0.5);
}
/* Fallback pour navigateurs sans :has() — JS optionnel pour gérer ça,
   mais :has() est supporté partout sauf vieux Firefox */

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTONS — Back + Continue (rangée d'actions)
   ═══════════════════════════════════════════════════════════════════════════ */

.ob-actions {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

/* Le Continue prend plus de place quand Back est présent */
.ob-actions .btn-continue {
  flex: 2;
  margin-top: 0;
}

.btn-back {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 8px;
  border: 1px solid rgba(232,224,208,0.45);
  background: transparent;
  color: var(--text-primary);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-back:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,168,76,0.06);
}

.btn-back:focus-visible {
  outline: 2px solid rgba(255,240,180,0.7);
  outline-offset: 3px;
}

.btn-back:active {
  background: rgba(201,168,76,0.12);
  transform: translateY(1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 3 — BRAND VALUE CARDS (multi-select via checkboxes cachées)
   ═══════════════════════════════════════════════════════════════════════════ */
 
.brand-values {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 24px);
  justify-items: center;
}
 
.brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
  width: 100%;
}
 
/* Checkbox invisible mais focusable au clavier */
.brand-card-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
 
/* Icône */
.brand-card-icon {
  width: clamp(80px, 9vw, 110px);
  height: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
  border-radius:15px;
}
 
/* Label */
.brand-card-label {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  transition: color 0.22s ease;
}
 
/* États : hover, focus clavier, sélection */
.brand-card:hover .brand-card-icon {
  transform: translateY(-3px) scale(1.05);
  filter: drop-shadow(0 10px 18px rgba(201,168,76,0.35));
}
.brand-card:hover .brand-card-label { color: var(--gold-light); }
 
.brand-card-input:focus-visible + .brand-card-icon {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 8px;
}
 
.brand-card.is-selected,
.brand-card:has(.brand-card-input:checked) {
  background: rgba(201,168,76,0.08);
  box-shadow: inset 0 0 0 1px rgba(201,168,76,0.4);
}
 
.brand-card.is-selected .brand-card-icon,
.brand-card:has(.brand-card-input:checked) .brand-card-icon {
  filter: drop-shadow(0 8px 20px rgba(201,168,76,0.55));
  transform: translateY(-2px);
}
 
.brand-card.is-selected .brand-card-label,
.brand-card:has(.brand-card-input:checked) .brand-card-label {
  color: var(--gold);
  font-weight: 500;
}
 
/* Petite coche en haut à droite quand sélectionné */
.brand-card.is-selected::after,
.brand-card:has(.brand-card-input:checked)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  animation: brandCheck 0.22s cubic-bezier(.2,.7,.3,1.4);
}
 
@keyframes brandCheck {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
 
/* ═══════════════════════════════════════════════════════════════════════════
   TEXTAREA (step 3 — vision)
   ═══════════════════════════════════════════════════════════════════════════ */
 
.ob-form textarea {
  width: 100%;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 16px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--gold);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  /* Petit scrollbar custom */
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
 
.ob-form textarea::-webkit-scrollbar { width: 6px; }
.ob-form textarea::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
 
.ob-form textarea::placeholder {
  color: rgba(232,224,208,0.5);
  font-weight: 300;
}
 
.ob-form textarea:hover { border-color: var(--gold-light); }
 
.ob-form textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}
 
/* ═══════════════════════════════════════════════════════════════════════════
   STEP 4 — SUMMARY ACCORDION
   Cartes récap utilisant <details> natif (accessible + clavier gratuit).
   ═══════════════════════════════════════════════════════════════════════════ */
 
.summary-card {
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 24px;
  background: rgba(0,0,0,0.15);
  /* Léger glow doré en bas pour matcher la maquette */
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,0.06),
    0 12px 24px -16px rgba(201,168,76,0.5);
}
 
.summary-row {
  border-bottom: 1px solid rgba(201,168,76,0.18);
}
.summary-row:last-child { border-bottom: none; }
 
.summary-row summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 8px;
  cursor: pointer;
  list-style: none;          /* Supprime le triangle natif */
  user-select: none;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  transition: color 0.2s ease;
}
/* Supprime aussi le triangle WebKit */
.summary-row summary::-webkit-details-marker { display: none; }
.summary-row summary::marker { display: none; }
 
.summary-row summary:hover {
  color: var(--gold-light);
}
 
.row-icon {
  width: 20px;
  height: 20px;
  color: var(--gold);
  flex-shrink: 0;
}
 
.row-label {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
 
.row-snippet {
  color: rgba(232,224,208,0.6);
  font-weight: 300;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Place le snippet juste après le label, en débordant à droite si besoin */
  grid-column: 2;
  justify-self: start;
  margin-left: -4px;
}
 
.row-chevron {
  width: 18px;
  height: 18px;
  color: rgba(232,224,208,0.55);
  transition: transform 0.25s ease, color 0.2s ease;
}
.summary-row summary:hover .row-chevron { color: var(--gold-light); }
.summary-row[open] .row-chevron { transform: rotate(180deg); color: var(--gold); }
 
/* Contenu déroulé */
.row-detail {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 18px;
  row-gap: 8px;
  padding: 4px 12px 18px 40px;
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  animation: rowReveal 0.25s ease;
}
.row-detail dt {
  color: rgba(232,224,208,0.55);
  font-weight: 300;
}
.row-detail dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 400;
  word-break: break-word;
}
 
@keyframes rowReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
/* ═══════════════════════════════════════════════════════════════════════════
   STEP 4 — PARTNERSHIP CONTRACT (bloc à lire + checkbox accept)
   Cadre or, intérieur scrollable, h3 éditorial avec mot italic gold.
   ═══════════════════════════════════════════════════════════════════════════ */

.partnership-contract {
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  padding: 24px 22px 20px;
  margin-bottom: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,0.06),
    inset 0 0 0 1px rgba(201,168,76,0.15),
    0 10px 22px -14px rgba(201,168,76,0.4);
}

.pc-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  letter-spacing: 0.01em;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 10px;
}
.pc-title-italic {
  font-style: italic;
  color: var(--gold);
}

.pc-intro {
  font-family: 'Jost', sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(232,224,208,0.72);
  text-align: center;
  max-width: 440px;
  margin: 0 auto 18px;
}

/* Zone de contrat scrollable */
.pc-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding: 14px 16px 14px 18px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 8px;
  margin-bottom: 16px;
  /* Scrollbar discrète or */
  scrollbar-width: thin;
  scrollbar-color: rgba(201,168,76,0.45) rgba(0,0,0,0.3);
}
.pc-scroll::-webkit-scrollbar { width: 6px; }
.pc-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.25); border-radius: 4px; }
.pc-scroll::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.45); border-radius: 4px; }
.pc-scroll::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.7); }
.pc-scroll:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.pc-article-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin: 18px 0 6px;
}
.pc-article-title:first-child { margin-top: 0; }

.pc-article-body {
  font-family: 'Jost', sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232,224,208,0.85);
  margin: 0 0 4px;
}

/* Checkbox d'acceptation */
.pc-acknowledge {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pc-acknowledge:hover {
  border-color: rgba(201,168,76,0.55);
  background: rgba(201,168,76,0.05);
}
.pc-acknowledge input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--gold);
  cursor: pointer;
}
.pc-acknowledge:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}
.pc-check-text {
  font-family: 'Jost', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  letter-spacing: 0.005em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 4 — SIGNATURE PAD
   ═══════════════════════════════════════════════════════════════════════════ */
 
.signature-pad {
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  padding: 0;                 /* 0 (était 18px) : le canvas remplit jusqu'au bord
                                 → signable de bord à bord. La hauteur est reportée
                                 sur le canvas (+36px) pour garder la même taille. */
  margin-bottom: 22px;
  /* Léger glow doré + reflet interne pour matcher l'inset shadow de la maquette */
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,0.06),
    inset 0 0 0 1px rgba(201,168,76,0.15),
    0 10px 22px -14px rgba(201,168,76,0.45);
}
 
.signature-canvas {
  display: block;
  width: 100%;
  height: 216px;             /* = 180 + 2×18 (ancien padding du pad) → MÊME hauteur
                                visuelle qu'avant, mais signable de bord à bord. */
  border-radius: 11px;       /* suit l'arrondi intérieur du pad (12px - 1px de bord) */
  /* Curseur stylo plume (noir & or, thème Gardet) — la pointe de la plume est
     le point actif (hotspot 5 27). Fallback crosshair si non supporté. */
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3E%3Cg%20transform='rotate(45%2016%2016)'%3E%3Cpath%20d='M12.2%205.5a3.8%203.8%200%200%201%207.6%200V23h-7.6z'%20fill='%23242424'%20stroke='%23c9a84c'%20stroke-width='0.7'/%3E%3Crect%20x='18.3'%20y='3.2'%20width='1.2'%20height='7.6'%20rx='0.6'%20fill='%23c9a84c'/%3E%3Crect%20x='12.2'%20y='12.3'%20width='7.6'%20height='1.7'%20fill='%23c9a84c'/%3E%3Cpath%20d='M12.2%2023h7.6l-0.8%202.3h-6z'%20fill='%23323232'/%3E%3Cpath%20d='M13%2025.3h6l-1.3%203.5L16%2031l-1.7-2.2z'%20fill='%23dcc079'%20stroke='%23b8923f'%20stroke-width='0.45'/%3E%3Cline%20x1='16'%20y1='26'%20x2='16'%20y2='30.4'%20stroke='%236b5012'%20stroke-width='0.55'/%3E%3Ccircle%20cx='16'%20cy='25.8'%20r='0.85'%20fill='%236b5012'/%3E%3C/g%3E%3C/svg%3E") 5 27, crosshair;
  touch-action: none;        /* Bloque le scroll mobile pendant le dessin */
  background: transparent;
  position: relative;
  z-index: 1;
}
 
/* Placeholder "Signature." en cursive + ligne de base */
.signature-placeholder {
  position: absolute;
  inset: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease;
}
.signature-pad[data-has-drawing="true"] .signature-placeholder {
  opacity: 0;
}
 
.signature-script {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  color: rgba(232,224,208,0.45);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  transform: rotate(-2deg);
}
.signature-baseline {
  display: block;
  width: 78%;
  height: 1px;
  background: rgba(232,224,208,0.3);
}
 
.signature-required {
  /* Posé en overlay AU FOND du canvas (zone signable) — pointer-events: none
     pour que la signature reste possible « par-dessus » la légende.
     Disparaît dès qu'on commence à dessiner. */
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(232,224,208,0.55);
  letter-spacing: 0.02em;
  margin: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}
.signature-pad[data-has-drawing="true"] .signature-required {
  opacity: 0;
}
 
/* Bouton clear — discret, en haut à droite */
.signature-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(232,224,208,0.18);
  border-radius: 999px;
  color: rgba(232,224,208,0.65);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 2;
}
.signature-clear svg { width: 12px; height: 12px; }
 
/* Le clear n'apparaît que si l'utilisateur a commencé à signer */
.signature-pad[data-has-drawing="true"] .signature-clear {
  opacity: 1;
  pointer-events: auto;
}
.signature-clear:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
}
 
/* ═══════════════════════════════════════════════════════════════════════════
   CTA pleine largeur (step 4 — Seal Partnership)
   ═══════════════════════════════════════════════════════════════════════════ */
 
.btn-continue--full {
  flex: 1;
}
 
/* État d'erreur (validation submit sans signature) */
.signature-pad--error {
  border-color: rgba(180,60,40,0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,200,180,0.08),
    inset 0 0 0 1px rgba(180,60,40,0.4),
    0 0 0 3px rgba(180,60,40,0.15);
  animation: sigShake 0.4s ease;
}
@keyframes sigShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
 
/* Utilitaires natifs */
[hidden] { display: none !important; }
 
/* ═══════════════════════════════════════════════════════════════════════════
   UTILS
   ═══════════════════════════════════════════════════════════════════════════ */
 
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
 
/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
 
/* Tablette : on resserre, mais on garde le split */
@media (max-width: 1024px) {
  .ob-right { padding: 36px 32px; }
  .ob-body { max-width: 100%; }
}
 
/* Mobile : on empile — mansion devient bannière en haut */
@media (max-width: 760px) {
  .onboarding {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
    min-height: auto;
  }
 
  .ob-left {
    height: 220px;
  }
  .ob-logo {
    top: 18px;
    left: 20px;
  }
  .ob-logo .logo-svg { width: 110px; }
 
  .ob-right {
    padding: 32px 22px 50px;
    min-height: auto;
    min-width: 0;              /* item de grille : autorise à rétrécir sous le min-content d'un enfant */
  }

  /* Anti-débordement horizontal (.ob-right sortait à droite) : min-width:0 sur la
     chaîne flex/grille pour qu'elle puisse rétrécir. Le titre .ob-title reste sur
     UNE seule ligne (nowrap) et sa police est réduite en JS pour tenir dans la
     largeur (cf. create.php) → plus de débordement malgré le nowrap. La ligne
     d'aide .ob-help peut, elle, repasser à la ligne. */
  .ob-body { min-width: 0; }
  .ob-help  { white-space: normal; }
  .row-snippet { min-width: 0; }   /* étape 4 : le snippet s'ellipse au lieu de déborder */

  .stepper { gap: 4px; }
  .step-primary { font-size: 11.5px; }
  .step-secondary { font-size: 10.5px; }
  .step:not(:last-child)::after {
    left: calc(50% + 11px);
    right: calc(-50% + 11px);
  }
 
  .ob-help { font-size: 11px; }
  .ob-help span { margin: 0 3px; }
 
  .ob-actions { gap: 10px; }
  .btn-back, .ob-actions .btn-continue { padding: 14px 16px; }
 
  /* Brand cards : on resserre l'espacement vertical */
  .brand-values { gap: 8px; }
  .brand-card { gap: 10px; padding: 10px 6px; }
  .brand-card-icon { width: clamp(60px, 22vw, 90px); }
  .brand-card-label { font-size: 12.5px; }
  .brand-card::after { width: 16px; height: 16px; }
 
  .ob-form textarea { min-height: 110px; padding: 14px 16px; }
 
  /* Step 4 — compaction mobile */
  .summary-card { padding: 4px 6px; }
  .summary-row summary { padding: 14px 6px; gap: 10px; font-size: 13px; }
  .row-snippet { font-size: 12px; }
  .row-detail { padding: 4px 8px 14px 32px; font-size: 12.5px; }
  .signature-canvas { height: 150px; }
  .signature-script { font-size: clamp(1.5rem, 8vw, 2rem); }
}
 
@media (max-width: 420px) {
  .stepper {
    gap: 2px;
  }
  .step { padding: 0 2px; }
  .step-secondary {
    /* Tronque proprement sur petit écran */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
 
@media (prefers-reduced-motion: reduce) {
  .combo-chevron,
  .combo-list,
  .btn-continue { transition: none; }
}
