/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #050505;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.5);
    --text-dim: rgba(255,255,255,0.3);
    --accent-1: #6366f1;
    --accent-2: #a855f7;
    --accent-3: #ec4899;
    --card-bg: rgba(255,255,255,0.04);
    --card-border: rgba(255,255,255,0.08);
    --card-hover: rgba(255,255,255,0.08);
    --card-active: rgba(99,102,241,0.15);
    --card-active-border: rgba(99,102,241,0.5);
    --radius: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Progress Bar ── */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 100;
    background: rgba(255,255,255,0.06);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.progress.visible { opacity: 1; }

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transition: width 0.6s var(--ease);
    border-radius: 0 2px 2px 0;
}

/* ── Steps Container ── */
.steps {
    position: relative;
    min-height: 100dvh;
}

.step {
    position: absolute;
    inset: 0;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    padding: 16px;
}

.step.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

.step-inner {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

/* ── Hero ── */
.hero-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-1), transparent 70%);
    top: -150px;
    right: -100px;
    animation: drift 25s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-2), transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: drift 25s ease-in-out infinite -8s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-3), transparent 70%);
    top: 40%;
    left: 40%;
    animation: drift 25s ease-in-out infinite -16s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -60px) scale(1.05); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(20px, 50px) scale(1.08); }
}

.hero-inner { position: relative; z-index: 1; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.brand-logo {
    width: 32px;
    height: 32px;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-note {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ── Typography ── */
h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.step-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-2);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.step-insight {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    box-shadow: 0 4px 24px rgba(99,102,241,0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99,102,241,0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.btn-lg { padding: 16px 44px; font-size: 1.1rem; }

.btn-back {
    position: absolute;
    top: max(env(safe-area-inset-top, 16px), 16px);
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--card-border);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
}

.btn-back:hover { background: var(--card-hover); border-color: rgba(255,255,255,0.15); }

/* ── Cards Grid ── */
.grid {
    display: grid;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 24px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.option-card:hover {
    transform: translateY(-3px);
    background: var(--card-hover);
    border-color: rgba(255,255,255,0.15);
}

.option-card.selected {
    background: var(--card-active);
    border-color: var(--card-active-border);
    box-shadow: 0 0 24px rgba(99,102,241,0.2);
}

.option-card small {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}

.card-tall { padding: 28px 16px; }

.option-icon {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
}

.option-icon svg { width: 100%; height: 100%; }

.card-label {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ── Style Demos ── */
.style-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 64px;
    justify-content: center;
}

.style-demo .demo-shape {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s var(--ease);
}

.demo-minimal .demo-shape {
    border: 1.5px solid var(--text-muted);
    background: transparent;
}

.demo-minimal span { font-weight: 300; font-size: 0.85rem; color: var(--text-muted); }

.demo-bold .demo-shape {
    background: var(--text);
    border: none;
}

.demo-bold span { font-weight: 900; font-size: 0.95rem; }

.demo-elegant .demo-shape {
    border: 1px solid var(--text-muted);
    border-radius: 0;
    transform: rotate(45deg);
    width: 30px;
    height: 30px;
}

.demo-elegant span {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: 0.95rem;
    font-style: italic;
}

.demo-moderne .demo-shape {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border: none;
}

.demo-moderne span { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.9rem; }

/* ── Symbol Demos ── */
.symbol-demo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.demo-lettre {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.demo-geo {
    display: flex;
    gap: 4px;
    align-items: flex-end;
}

.demo-geo div {
    background: var(--text-muted);
    border-radius: 3px;
}

.demo-geo div:nth-child(1) { width: 16px; height: 24px; opacity: 0.4; }
.demo-geo div:nth-child(2) { width: 16px; height: 36px; opacity: 0.6; }
.demo-geo div:nth-child(3) { width: 16px; height: 20px; opacity: 0.3; }

.demo-icone svg { width: 40px; height: 40px; }

.demo-texte {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.15em;
}

/* ── Color Palette Cards ── */
.palette-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.palette-swatches {
    display: flex;
    gap: 6px;
    height: 40px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.palette-card { align-items: stretch; }

.palette-swatches span {
    flex: 1;
    display: block;
}

.palette-swatches span:first-child { border-radius: 8px 0 0 8px; }
.palette-swatches span:last-child { border-radius: 0 8px 8px 0; }

.palette-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ── Name Input ── */
.name-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    margin-top: 8px;
}

#businessName {
    width: 100%;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    outline: none;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#businessName::placeholder { color: var(--text-dim); font-weight: 400; }

#businessName:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.btn-generate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    align-self: center;
}

.btn-generate:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.2);
    background: var(--card-bg);
}

/* ── Generating Animation ── */
.generating-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.gen-rings {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-ring {
    position: absolute;
    border: 2px solid rgba(99,102,241,0.2);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.gen-ring:nth-child(1) { width: 80px; height: 80px; }
.gen-ring.r2 { width: 120px; height: 120px; animation-duration: 3s; animation-direction: reverse; border-top-color: var(--accent-2); }
.gen-ring.r3 { width: 160px; height: 160px; animation-duration: 4s; border-top-color: var(--accent-3); }

.gen-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.6; }
}

.gen-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    animation: fade-pulse 2s ease-in-out infinite;
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ── Preview & Paywall ── */
.preview-inner {
    max-width: 480px;
}

.preview-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 24px;
}

.logo-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
    background: #fff;
}

#logoCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-blur {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(255,255,255,0.1);
}

.lock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}

.paywall { text-align: center; }

.price-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.price-amount {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-sub {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 400;
}

.benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.benefits li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.benefits li svg { color: var(--accent-2); flex-shrink: 0; }

.btn-unlock {
    width: 100%;
    justify-content: center;
}

.trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
}

.trust span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.trust svg { opacity: 0.5; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    .option-card { padding: 18px 12px; }
    .card-tall { padding: 22px 12px; }

    .btn-back { top: 12px; left: 8px; width: 40px; height: 40px; }

    .hero-title { margin-top: 0; }

    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
}

@media (max-width: 380px) {
    .grid-2 { grid-template-columns: 1fr 1fr; gap: 8px; }

    h2 { font-size: 1.4rem; }

    .btn-primary { padding: 12px 28px; font-size: 0.95rem; }
    .btn-lg { padding: 14px 32px; font-size: 1rem; }
}
