/* ============================================================
   Bienvenu — Onboarding & Login
   Extrait et adapté depuis docs/mockups/onboarding-hote.html
   ============================================================ */

:root {
    --cream: #f5efe6;
    --cream-warm: #ede4d3;
    --ivory: #faf6ef;
    --paper: #fcfaf5;
    --terracotta: #c8593a;
    --terracotta-deep: #a04428;
    --olive: #4a5d3a;
    --olive-deep: #2f3d24;
    --olive-soft: #6b7d5b;
    --charcoal: #2a2520;
    --charcoal-soft: #4a4338;
    --sand: #d9c9a9;
    --success: #4f8a5c;
    --danger: #c8593a;
    --shadow-sm: 0 2px 8px rgba(42,37,32,.05);
    --shadow-md: 0 8px 24px rgba(42,37,32,.08);
    --shadow-lg: 0 30px 80px rgba(42,37,32,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; overflow-x: hidden; }

body {
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--charcoal);
    background:
        radial-gradient(ellipse at top right, #e8dcc4 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, #d4b896 0%, transparent 60%),
        linear-gradient(135deg, #ede4d3 0%, #d9c9a9 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: .6;
    z-index: 0;
}

/* ── Topbar ──────────────────────────────────────────────── */
.ob-topbar {
    position: relative;
    z-index: 5;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ob-brand { display: flex; align-items: center; gap: 10px; }
.ob-brand-mark {
    width: 36px; height: 36px; background: var(--ivory); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 4px;
    border: 1px solid var(--cream-warm); box-shadow: 0 2px 8px rgba(42,37,32,.12);
    transform: rotate(-6deg);
}
.ob-brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ob-brand-name {
    font-family: 'Fraunces', serif;
    font-size: 20px; font-weight: 500; letter-spacing: -.02em;
    text-decoration: none; color: var(--charcoal);
}
.ob-brand-name .dot { color: var(--terracotta); }
.ob-top-right { display: flex; align-items: center; gap: 16px; }
.ob-step-indicator {
    font-size: 12px; color: var(--olive-deep);
    font-style: italic; font-family: 'Fraunces', serif; opacity: .8;
}
.ob-skip {
    font-size: 12px; color: var(--charcoal-soft);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

/* ── Stage + Card ────────────────────────────────────────── */
.ob-stage {
    position: relative; z-index: 1;
    min-height: calc(100vh - 88px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px 24px 60px;
}
.ob-card {
    width: 100%; max-width: 540px;
    background: var(--ivory);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

/* Progress bar */
.ob-progress { height: 4px; background: var(--cream-warm); }
.ob-progress-fill {
    height: 100%; background: var(--terracotta);
    transition: width .5s cubic-bezier(.65,0,.35,1);
}

/* ── Step body ───────────────────────────────────────────── */
.ob-body { padding: 36px 40px 32px; }

.ob-eyebrow {
    font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
    color: var(--terracotta); font-weight: 700; margin-bottom: 12px;
}
.ob-title {
    font-family: 'Fraunces', serif;
    font-size: 36px; font-weight: 400; line-height: 1.05;
    letter-spacing: -.02em; margin-bottom: 12px;
}
.ob-title .italic { font-style: italic; }
.ob-subtitle {
    font-size: 14px; line-height: 1.55;
    color: var(--charcoal-soft); margin-bottom: 28px;
}

/* ── Illustration (step 1) ───────────────────────────────── */
.ob-illust {
    width: calc(100% + 80px);
    height: 200px;
    margin: -36px -40px 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #c8593a 0%, #8b3a24 50%, #4a5d3a 100%);
}
.ob-illust svg { width: 100%; height: 100%; }

/* ── Fields ──────────────────────────────────────────────── */
.ob-field { margin-bottom: 12px; }
.ob-label {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--olive); margin-bottom: 6px;
}
.ob-input {
    width: 100%;
    background: var(--paper);
    border: 1.5px solid var(--cream-warm);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: inherit; font-size: 14px;
    color: var(--charcoal); outline: none;
    transition: border-color .15s;
}
.ob-input:focus { border-color: var(--terracotta); background: var(--ivory); }
.ob-input::placeholder { color: var(--charcoal-soft); opacity: .5; }
.ob-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Error ───────────────────────────────────────────────── */
.ob-error {
    background: #fdf0ed;
    border: 1px solid #f0c4b8;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #8b3a24;
    display: flex; align-items: center; gap: 8px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.ob-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ob-btn {
    width: 100%; padding: 14px 20px;
    border: none; border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    letter-spacing: .02em;
    transition: transform .15s, background .15s, box-shadow .15s;
    text-decoration: none;
}
.ob-btn:active { transform: scale(.98); }
.ob-btn-primary { background: var(--charcoal); color: var(--ivory); }
.ob-btn-primary:hover { background: var(--olive-deep); }
.ob-btn-secondary {
    background: var(--cream); color: var(--charcoal);
    border: 1px solid var(--cream-warm);
}
.ob-btn-secondary:hover { background: var(--cream-warm); }
.ob-btn-link {
    background: transparent; color: var(--charcoal-soft);
    font-weight: 500; text-decoration: underline;
    text-underline-offset: 4px; text-decoration-color: var(--sand);
}

.ob-nav { display: flex; gap: 10px; margin-top: 12px; }
.ob-nav .ob-btn { flex: 1; }
.ob-back {
    flex: 0 0 auto !important;
    width: 48px !important; padding: 14px !important;
    text-decoration: none;
    display: flex; align-items: center; justify-content: center;
}

/* ── Feature pills (step 1) ──────────────────────────────── */
.ob-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.ob-pill {
    background: var(--cream);
    border: 1px solid var(--cream-warm);
    padding: 7px 14px; border-radius: 100px;
    font-size: 12px; font-weight: 600;
    color: var(--olive-deep);
    display: inline-flex; align-items: center; gap: 6px;
}

/* ── Divider ──────────────────────────────────────────────── */
.ob-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0; color: var(--charcoal-soft);
    opacity: .5; font-size: 11px; font-style: italic;
    font-family: 'Fraunces', serif;
}
.ob-divider::before, .ob-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--cream-warm);
}

/* ── Login link ───────────────────────────────────────────── */
.ob-login-link {
    text-align: center; font-size: 12px;
    color: var(--charcoal-soft); margin-top: 16px;
}
.ob-login-link a { color: var(--terracotta); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ── Property summary (step 3) ────────────────────────────── */
.ob-property-summary {
    background: var(--paper); border: 1px solid var(--cream-warm);
    border-radius: 18px; overflow: hidden; margin-bottom: 18px;
}
.ob-property-row { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ob-property-field { display: flex; flex-direction: column; gap: 2px; }
.ob-property-label {
    font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--olive); opacity: .7; font-weight: 600;
}
.ob-property-value { font-size: 13px; font-weight: 600; }

/* ── Theme grid (step 4) ──────────────────────────────────── */
.ob-theme-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 24px;
}
.ob-theme-card {
    border: 2px solid var(--cream-warm);
    border-radius: 16px; padding: 14px;
    cursor: pointer; background: var(--paper);
    transition: all .2s; position: relative;
}
.ob-theme-card:hover { border-color: var(--sand); transform: translateY(-2px); }
.ob-theme-card.selected { border-color: var(--charcoal); background: var(--ivory); }
.ob-theme-card.selected::after {
    content: '✓';
    position: absolute; top: 10px; right: 12px;
    width: 22px; height: 22px;
    background: var(--charcoal); color: var(--ivory);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.ob-theme-preview {
    height: 80px; border-radius: 10px; margin-bottom: 12px;
    display: flex; align-items: flex-end; padding: 8px;
}
.ob-theme-preview.t-med { background: linear-gradient(135deg,#c8593a 0%,#8b3a24 50%,#4a5d3a 100%); }
.ob-theme-preview.t-cot { background: linear-gradient(135deg,#2f6e8a 0%,#1f4a5e 50%,#d4c4a4 100%); }
.ob-theme-preview.t-mon { background: linear-gradient(135deg,#6b4a2a 0%,#3d2a18 50%,#4a5d3a 100%); }
.ob-theme-preview.t-min { background: linear-gradient(135deg,#2a2520 0%,#4a4338 100%); }
.ob-swatches { display: flex; gap: 3px; }
.ob-sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255,255,255,.3); }
.ob-theme-name { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.ob-theme-desc { font-size: 11px; color: var(--charcoal-soft); }

/* ── Done (step 5) ────────────────────────────────────────── */
.ob-done { text-align: center; }
.ob-celebrate {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg,#c8593a 0%,#d9a04a 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    box-shadow: 0 12px 32px rgba(200,89,58,.3);
    animation: ob-pop .6s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ob-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.ob-link-card {
    background: linear-gradient(135deg,#2f3d24 0%,#1f2a16 100%);
    border-radius: 18px; padding: 18px;
    color: var(--ivory); margin-bottom: 16px;
    display: flex; align-items: center; gap: 16px;
    text-align: left; position: relative; overflow: hidden;
}
.ob-link-card::after {
    content: ''; position: absolute; top: -30px; right: -30px;
    width: 140px; height: 140px;
    background: radial-gradient(circle,rgba(200,89,58,.3) 0%,transparent 70%);
    border-radius: 50%;
}
.ob-qr-block {
    width: 84px; height: 84px;
    background: var(--ivory); border-radius: 12px;
    padding: 8px; flex-shrink: 0; z-index: 1;
}
.ob-link-info { flex: 1; z-index: 1; min-width: 0; }
.ob-link-label {
    font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
    opacity: .6; margin-bottom: 4px; font-weight: 700;
}
.ob-link-url {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px; font-weight: 500; margin-bottom: 6px;
    word-break: break-all; line-height: 1.3;
}
.ob-copy-btn {
    background: rgba(250,246,239,.15);
    border: 1px solid rgba(250,246,239,.25);
    color: var(--ivory); padding: 5px 12px; border-radius: 100px;
    font-size: 11px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    font-family: inherit;
}
.ob-copy-btn:hover { background: rgba(250,246,239,.25); }

.ob-pro-tip {
    background: var(--cream); border: 1px solid var(--cream-warm);
    border-radius: 12px; padding: 12px 14px; margin-top: 16px;
    font-size: 12px; color: var(--charcoal-soft); line-height: 1.5;
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
}
.ob-pro-tip-icon { color: var(--terracotta); font-size: 14px; flex-shrink: 0; }
.ob-pro-tip strong { color: var(--charcoal); font-weight: 600; }

@media (max-width: 600px) {
    .ob-topbar { padding: 16px 20px; }
    .ob-body { padding: 28px 24px 24px; }
    .ob-title { font-size: 28px; }
    .ob-illust { margin: -28px -24px 22px; }
    .ob-input-row { grid-template-columns: 1fr; }
}
