/* =====================================================
 * R11.1 — Expert Onboarding wizard (real app).
 * Pixel-perfect port of the canonical mockup:
 *   /mockups/expert/onboarding (pb-shell + eo- form)
 * No inline CSS — every rule lives here.
 * ===================================================== */

/* === Shell tokens === */
.pb-shell {
  --pb-bg: #FFFFFF;
  --pb-surface: #FFFFFF;
  --pb-surface-warm: #FBF8F1;
  --pb-border: #E5E5E5;
  --pb-border-soft: #EFEAE0;
  --pb-text: #0A0A0A;
  --pb-text-muted: #737373;
  --pb-text-dim: #A3A3A3;
  --pb-gold-main: #A38543;
  --pb-gold-deep: #5A4A25;
  --pb-grad: linear-gradient(99deg, #BD9733 0%, #E5D29F 25%, #E8CC6E 50%, #E5D29F 75%, #FFF4C2 100%);
  --pb-grad-dark: linear-gradient(135deg, #5A4A25 0%, #422D05 100%);
  --pb-radius: 12px;
  --pb-radius-sm: 8px;
  --pb-stepbar-h: 64px;
  font-family: 'Geist', system-ui, sans-serif;
  background: var(--pb-bg);
  color: var(--pb-text);
  min-height: 100vh;
}

/* === Sticky stepper === */
.pb-stepbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--pb-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.pb-brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--pb-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pb-brand-logo { height: 24px; width: auto; }

.pb-steps {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.pb-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pb-step-num {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 0;
  background: #F4F4F5;
  color: var(--pb-text-dim);
  text-decoration: none;
  cursor: pointer;
}
.pb-step-num.done { background: var(--pb-grad); color: #000; }
.pb-step-num.active { background: #000; color: #E8CC6E; box-shadow: 0 0 0 3px rgba(163,133,67,.18); }
.pb-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--pb-text-muted);
  white-space: nowrap;
  text-decoration: none;
}
.pb-step-label.active { color: var(--pb-text); font-weight: 600; }
.pb-step-line {
  width: 36px;
  height: 1px;
  background: var(--pb-border);
  margin: 0 12px;
}
.pb-step-line.done { background: linear-gradient(90deg, var(--pb-gold-main), #E8CC6E); height: 2px; }

.pb-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pb-exit {
  font-size: 13px;
  color: var(--pb-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 9999px;
}
.pb-exit:hover { background: rgba(163,133,67,.06); color: var(--pb-gold-main); }

/* === Pane head row === */
.pb-pane-head-row {
  display: flex;
  justify-content: center;
  background: #FFFFFF;
  border-bottom: 1px solid var(--pb-border-soft);
}
.pb-pane-head--right {
  width: 100%;
  max-width: 820px;
  background: #FFFFFF;
  padding: 10px 28px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
}
.pb-pane-head-title {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 3px;
  color: var(--pb-text);
}
.pb-pane-head-sub {
  font-size: 10px;
  color: var(--pb-text-muted);
  margin: 3px 0 0;
  line-height: 1.5;
}

/* === Single-column layout === */
.pb-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}
.pb-pane {
  padding: 18px 24px 24px;
  background: #FFFFFF;
}
.pb-pane-right {
  width: 100%;
  max-width: 820px;
  background: #FFFFFF;
  padding: 14px 28px 24px;
  font-size: 12px;
}

/* ============ FORM (single column) ============ */
.eo-form { display: flex; flex-direction: column; gap: 22px; max-width: 100%; }
.eo-form-head { display: flex; flex-direction: column; gap: 5px; }
.eo-step-counter {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  color: #A38543; text-transform: uppercase;
}
.eo-step-title {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 22px; font-weight: 700; color: #0A0A0A; line-height: 1.15;
}
.eo-step-title em { font-style: italic; color: #A38543; font-weight: 400; }
.eo-step-sub { font-size: 12px; color: #737373; line-height: 1.5; }

.eo-section-card {
  background: #FFFFFF;
  border: 1px solid #EFEAE0;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.eo-section-card.tight { gap: 12px; }
.eo-section-card-title { font-size: 13px; font-weight: 700; color: #0A0A0A; }
.eo-grid { display: grid; gap: 12px; }
.eo-grid.two { grid-template-columns: 1fr 1fr; }

.eo-field { display: flex; flex-direction: column; gap: 5px; }
.eo-field-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  color: #525252; text-transform: uppercase;
}
.eo-field-label .opt { color: #A3A3A3; font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.eo-field-label .req { color: #BD9733; }
.eo-input, .eo-select, .eo-textarea {
  width: 100%;
  border: 1px solid #E5E0D4;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: #0A0A0A;
  transition: border-color .15s ease;
  box-sizing: border-box;
}
.eo-textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.eo-input:focus, .eo-select:focus, .eo-textarea:focus {
  outline: none;
  border-color: #BD9733;
}
.eo-input[readonly] { background: #FAFAF8; color: #737373; }

/* Tabs (TALENT / EXPERT) */
.eo-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1.5px solid #E5E0D4; border-radius: 10px; overflow: hidden;
  margin-bottom: 4px;
}
.eo-tab {
  padding: 10px 14px; text-align: center;
  font-size: 12px; font-weight: 600;
  color: #737373; background: #FAFAFA; cursor: pointer;
  border: none; font-family: inherit;
  transition: all .15s ease;
  text-decoration: none;
}
.eo-tab.active { background: #000; color: #E8CC6E; }
.eo-tab:first-child { border-right: 1px solid #E5E0D4; }

/* CGU checkbox */
.eo-cgu-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 2px 0;
}
.eo-cgu-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: #BD9733; margin-top: 2px; flex-shrink: 0; cursor: pointer;
}
.eo-cgu-label {
  font-size: 11px; color: #525252; line-height: 1.6; cursor: pointer;
}
.eo-cgu-label a { color: #A38543; text-decoration: underline; text-underline-offset: 2px; }

/* ============ STEP 2: EXPERTISE GRID ============ */
.eo-expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.eo-expertise-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background-color: #2A1F0A;
  background-size: cover;
  background-position: center;
  border: 2.5px solid transparent;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  padding: 0;
}
.eo-expertise-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
.eo-expertise-card.is-selected {
  border-color: #BD9733;
  box-shadow: 0 0 0 3px rgba(189,151,51,0.30), 0 8px 22px rgba(0,0,0,0.22);
}
.eo-expertise-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.12) 60%, rgba(0,0,0,0.0) 100%);
  pointer-events: none;
}
.eo-expertise-label {
  position: absolute; bottom: 8px; left: 0; right: 0;
  padding: 0 8px;
  font-size: 10px; font-weight: 700; color: #ffffff;
  text-align: center; line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  pointer-events: none;
  z-index: 1;
}
.eo-expertise-check {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  width: 20px; height: 20px; border-radius: 9999px;
  background: linear-gradient(99deg, #BD9733 0%, #E5D29F 25%, #E8CC6E 50%, #E5D29F 75%, #FFF4C2 100%);
  color: #000; display: none; place-items: center;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.eo-expertise-card.is-selected .eo-expertise-check { display: grid; }

.eo-expertise-counter {
  font-size: 11px; color: #737373; font-weight: 600; margin-top: 4px;
  display: flex; align-items: center; justify-content: space-between;
}
.eo-expertise-counter span { color: #A38543; }

/* ============ STEP 3: OFFRE ============ */
.eo-pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.eo-pill {
  padding: 7px 13px; border-radius: 9999px;
  border: 1px solid #E5E0D4; background: #FFFFFF;
  font-size: 12px; font-weight: 600; color: #525252;
  cursor: pointer; transition: all .15s ease; font-family: inherit;
}
.eo-pill:hover { border-color: #BD9733; }
.eo-pill.is-selected {
  background: linear-gradient(99deg, #BD9733 0%, #E5D29F 25%, #E8CC6E 50%, #E5D29F 75%, #FFF4C2 100%);
  color: #000; border-color: transparent;
}

.eo-tjm-wrap { position: relative; }
.eo-tjm-prefix {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: #A3A3A3; font-weight: 500; pointer-events: none;
}
.eo-input.tjm { padding-left: 28px; }
.eo-field-hint { font-size: 11px; color: #A3A3A3; line-height: 1.4; margin-top: 2px; }

/* Disponibilité choice cards */
.eo-choice-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.eo-choice-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px; border-radius: 10px;
  border: 1.5px solid #E5E0D4; background: #FFFFFF;
  font-size: 12px; font-weight: 600; color: #525252;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: all .15s ease;
}
.eo-choice-card:hover { border-color: #BD9733; }
.eo-choice-card.is-selected {
  border-color: #BD9733; background: #FBF4E0; color: #5A4A25;
}
.eo-choice-em { font-size: 18px; }

/* ============ STEP 4: FEED ============ */
.eo-mission-list { display: flex; flex-direction: column; gap: 8px; }
.eo-mission-card {
  background: #FFFFFF;
  border: 1px solid #EFEAE0;
  border-radius: 12px;
  padding: 13px 14px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: box-shadow .15s ease;
}
.eo-mission-card:hover { box-shadow: 0 4px 16px rgba(38,28,8,0.08); }
.eo-mission-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #C9A54A, #E0C060);
}
.eo-mission-avatar.c-cb { background: #C9A54A; }
.eo-mission-avatar.c-mn { background: #8B5E3C; }
.eo-mission-avatar.c-ra { background: #1E2D4A; }
.eo-mission-body { flex: 1; min-width: 0; }
.eo-mission-row1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.eo-mission-title { font-size: 13px; font-weight: 600; color: #0A0A0A; }
.eo-mission-badge {
  font-size: 10px; font-weight: 600; border-radius: 9999px; padding: 3px 8px; white-space: nowrap;
  background: #FBF6EC; color: #A38543; border: 1px solid rgba(163,133,67,0.25);
}
.eo-mission-badge.new { background: #F5F1EB; color: #737373; border-color: rgba(0,0,0,0.08); }
.eo-mission-sub { font-size: 11px; color: #737373; margin-bottom: 6px; }
.eo-mission-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.eo-mission-tag {
  font-size: 10px; padding: 3px 8px; border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.08); background: #F5F1EB; color: #525252;
}
.eo-mission-tag.gold { background: #FAF3DC; border-color: rgba(163,133,67,0.25); color: #A38543; }

/* SIREN card */
.eo-siren-card {
  background: linear-gradient(135deg, #3A2210 0%, #4E2E14 100%);
  border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.eo-siren-top { display: flex; align-items: flex-start; gap: 10px; }
.eo-siren-icon-wrap {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: rgba(201,165,74,0.2); border: 1px solid rgba(201,165,74,0.35);
  display: grid; place-items: center;
}
.eo-siren-texts { flex: 1; }
.eo-siren-title { font-size: 13px; font-weight: 600; color: #FAF0D0; margin-bottom: 3px; }
.eo-siren-sub { font-size: 11px; color: rgba(250,240,208,0.6); line-height: 1.5; }
.eo-siren-badge {
  display: inline-flex; align-items: center;
  background: rgba(201,165,74,0.18); border: 1px solid rgba(201,165,74,0.35);
  color: #E8CC6E; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 9999px; white-space: nowrap;
  flex-shrink: 0;
}
.eo-siren-ctas { display: flex; gap: 8px; }
/* Variante « profil validé par l'admin » : tonalité verte de succès. */
.eo-siren-card.is-valid { background: linear-gradient(135deg, #123524 0%, #1B4D32 100%); }
.eo-siren-card.is-valid .eo-siren-icon-wrap { background: rgba(46,170,114,0.22); border-color: rgba(46,170,114,0.4); }
.eo-siren-card.is-valid .eo-siren-title { color: #DDF5E7; }
.eo-siren-card.is-valid .eo-siren-sub { color: rgba(221,245,231,0.65); }
.eo-siren-badge.is-valid { background: rgba(46,170,114,0.22); border-color: rgba(46,170,114,0.45); color: #6FE0A8; }
.eo-siren-ctas .ds-btn-gold,
.eo-siren-ctas .ds-btn-outline { flex: 1; font-size: 12px; }

/* SSO buttons */
.eo-sso-stack { display: flex; flex-direction: column; gap: 8px; }
.eo-sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 13px 18px; border-radius: 10px;
  border: 1.5px solid #E5E0D8; background: #FFFFFF;
  font-family: 'Geist', system-ui, sans-serif; font-size: 13px; font-weight: 500;
  color: #0A0A0A; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.eo-sso-btn:hover { border-color: #BD9733; box-shadow: 0 2px 10px rgba(189,151,51,0.1); }
.eo-divider {
  display: flex; align-items: center; gap: 10px; margin: 4px 0;
  font-size: 11px; color: #A3A3A3;
}
.eo-divider::before, .eo-divider::after { content: ''; flex: 1; height: 1px; background: #E5E0D4; }

/* Form footer */
.eo-form-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 8px;
}
.eo-form-footer .spacer { flex: 1; }

/* Info card */
.eo-info-card {
  background: #FBF8F1; border: 1px solid #EFEAE0;
  border-radius: 10px; padding: 12px 14px;
  font-size: 11px; color: #525252; line-height: 1.55;
}
.eo-info-card strong { color: #A38543; }

/* ============ VALIDATION (welcome) ============ */
.eo-welcome-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 12px 0 8px;
}
.eo-welcome-check {
  width: 56px; height: 56px; border-radius: 9999px;
  background: var(--pb-grad); color: #000;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(189,151,51,0.30);
}
.eo-welcome-name { font-size: 22px; font-weight: 700; color: #0A0A0A; line-height: 1.2; }
.eo-welcome-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; font-size: 12px; color: #737373;
}
.eo-status-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: #A38543;
}
.eo-status-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 9999px; background: #E0C060;
}
.eo-welcome-sub { max-width: 520px; margin: 4px auto 0; }

/* Récapitulatif */
.eo-recap { display: flex; flex-direction: column; gap: 8px; }
.eo-recap-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.eo-recap-key { color: #737373; }
.eo-recap-val { color: #0A0A0A; font-weight: 600; text-align: right; }
.eo-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.eo-chip {
  padding: 3px 9px; border-radius: 9999px;
  background: #FBF4E0; border: 1px solid #E5D29F;
  font-size: 10px; font-weight: 600; color: #5A4A25;
}

/* Responsive */
@media (max-width: 900px) {
  .pb-pane-right { padding: 18px 16px; }
}
@media (max-width: 760px) {
  .pb-step-label { display: none; }
  .pb-step-line { width: 16px; margin: 0 6px; }
}
@media (max-width: 600px) {
  .eo-grid.two { grid-template-columns: 1fr; }
  .eo-expertise-grid { grid-template-columns: repeat(3, 1fr); }
  .eo-choice-grid { grid-template-columns: 1fr 1fr; }
  /* Onboarding top bar: drop the (future) help link, shorten the long exit label
     and tighten so logo + steps fit instead of overflowing on narrow screens. */
  .pb-help-link { display: none; }
  .pb-header-right { gap: 8px; }
  .pb-step-line { width: 8px; margin: 0 4px; }
  .pb-exit { font-size: 0; padding: 6px 8px; }
  .pb-exit::after { content: "Quitter"; font-size: 13px; }
}
