/* Step indicator */
.generator-steps {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg) 0;
}

.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.step-dot {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0.4;
    transition: var(--transition);
}

.step-dot.active {
    opacity: 1;
}

.step-dot.completed {
    opacity: 0.7;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-muted);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.step-dot.active .step-num {
    background: var(--primary);
    color: var(--text-white);
}

.step-dot.completed .step-num {
    background: var(--success);
    color: var(--text-white);
}

.step-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-muted);
}

.step-dot.active .step-label {
    color: var(--text);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border);
}

/* Generator panels */
.generator-panel {
    display: none;
    padding: var(--space-3xl) 0;
}

.generator-panel.active {
    display: block;
}

.generator-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.generator-subtitle {
    color: var(--text-muted);
    margin-bottom: var(--space-3xl);
}

/* Type selector grid */
.type-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.type-selector-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl);
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: var(--font);
}

.type-selector-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.type-selector-card.selected {
    border-color: var(--primary);
    background: rgba(30, 64, 175, 0.03);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.type-selector-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.type-selector-card h3 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xs);
}

.type-selector-card p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* Form layout */
.generator-form-layout {
    max-width: 700px;
    margin: 0 auto;
}

.form-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

/* Preview layout */
.preview-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.preview-sidebar {
    position: sticky;
    top: 80px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.preview-sidebar h2 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.preview-sidebar > p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.preview-pricing-info {
    border-top: 1px solid var(--border);
    padding-top: var(--space-lg);
}

.preview-pricing-info > p {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.preview-pricing-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.pricing-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.pricing-option:hover {
    border-color: var(--primary);
}

.pricing-option.popular {
    border-color: var(--primary);
    background: rgba(30, 64, 175, 0.03);
}

/* Letter preview */
.preview-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.letter-preview {
    padding: 60px;
    min-height: 800px;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    outline: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Anti-copy blur overlay */
.letter-preview-protected {
    position: relative;
}

.letter-preview-protected::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 30%, rgba(255,255,255,0.98) 60%, #ffffff 100%);
    pointer-events: none;
    z-index: 10;
}

/* CTA overlay on blurred area */
.preview-unlock-cta {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    white-space: nowrap;
}

.preview-unlock-cta svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.preview-unlock-cta p {
    font-family: var(--font);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.preview-unlock-cta .btn {
    font-size: var(--font-size-base);
    white-space: nowrap;
}

.letter-preview:focus {
    box-shadow: inset 0 0 0 2px var(--primary-light);
}

.letter-preview .letter-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.letter-preview .letter-sender {
    max-width: 250px;
}

.letter-preview .letter-date {
    text-align: right;
}

.letter-preview .letter-recipient {
    text-align: right;
    margin-bottom: 40px;
    max-width: 300px;
    margin-left: auto;
}

.letter-preview .letter-object {
    margin-bottom: 20px;
    font-weight: bold;
}

.letter-preview .letter-recommande {
    margin-bottom: 20px;
    font-style: italic;
    text-decoration: underline;
}

.letter-preview .letter-body p {
    margin-bottom: 12px;
    text-align: justify;
}

.letter-preview .letter-signature {
    margin-top: 40px;
}
