/* Form, Success & Cancel page styles - loaded only on form/success/cancel pages */

/* =================================================================
   FORM PAGE VARIABLES (legacy form variables)
   ================================================================= */

:root {
    /* Legacy form variables */
    --primary-color: #10b981;
    --primary-hover-old: #1f2937;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --text-color: #2a2a2a;
    --text-secondary: #555555;
    --border-color: #e5e7eb;
    --error-color: #d90429;
    --warning-color: #ff9e00;
    --info-color: #10b981;
    --required-color: #d90429;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --input-background: #ffffff;
    --field-error-bg: rgba(239, 68, 68, 0.05);
    --tab-hover-bg: rgba(0, 0, 0, 0.05);
    --prompt-background: #f3f4f6;
    --border-radius: 8px;
    --button-border-radius: 50px;
    --selection-border-radius: 12px;
    --back-button-border-color: #374151;
    --back-button-text-color: #374151;
    --back-button-hover-bg: rgba(55, 65, 81, 0.05);
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --header-gradient-start: #10b981;
    --header-gradient-end: #6732a8;
    --landing-gradient-start: #1f2937;
    --landing-gradient-end: #111827;
    --testimonial-bg: rgba(0, 0, 0, 0.03);
    --feature-icon-bg: rgba(0, 0, 0, 0.05);
    --feature-icon-color: var(--primary-color);
    --section-spacing: 80px;
    --box-shadow-stronger: 0 8px 30px rgba(0, 0, 0, 0.08);
    --max-content-width: 1200px;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);

    /* Form font variables */
    --font-primary: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 13px;
    --font-size-small: 12px;
    --font-size-medium: 18px;
    --font-size-large: 20px;
    --font-size-xl: 24px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* =================================================================
   FORM DARK MODE VARIABLES
   ================================================================= */

:root.dark-theme {
    --primary-color: #34d399;
    --primary-hover-old: #ffffff;
    --secondary-color: #8a4fd6;
    --success-color: #34d399;
    --background-color: #0f172a;
    --card-background: #1e293b;
    --text-color: #e8e8e8;
    --text-secondary: #b0b0b0;
    --border-color: #334155;
    --error-color: #ff4d6d;
    --warning-color: #ffaa33;
    --info-color: #34d399;
    --required-color: #ff4d6d;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    --input-background: #2a2a2a;
    --field-error-bg: rgba(255, 77, 109, 0.1);
    --tab-hover-bg: rgba(16, 185, 129, 0.1);
    --prompt-background: #333333;
    --header-gradient-start: #10b981;
    --header-gradient-end: #059669;
    --landing-gradient-start: #10b981;
    --landing-gradient-end: #059669;
    --testimonial-bg: rgba(16, 185, 129, 0.1);
    --feature-icon-bg: rgba(16, 185, 129, 0.2);
    --gradient-primary: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --back-button-border-color: #cbd5e1;
    --back-button-text-color: #cbd5e1;
    --back-button-hover-bg: rgba(203, 213, 225, 0.1);
}

/* OS dark mode for form variables */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #34d399;
        --primary-hover-old: #ffffff;
        --secondary-color: #8a4fd6;
        --success-color: #34d399;
        --background-color: #0f172a;
        --card-background: #1e293b;
        --text-color: #e8e8e8;
        --text-secondary: #b0b0b0;
        --border-color: #334155;
        --error-color: #ff4d6d;
        --warning-color: #ffaa33;
        --info-color: #34d399;
        --required-color: #ff4d6d;
        --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        --input-background: #2a2a2a;
        --field-error-bg: rgba(255, 77, 109, 0.1);
        --tab-hover-bg: rgba(16, 185, 129, 0.1);
        --prompt-background: #333333;
        --header-gradient-start: #10b981;
        --header-gradient-end: #059669;
        --landing-gradient-start: #10b981;
        --landing-gradient-end: #059669;
        --testimonial-bg: rgba(16, 185, 129, 0.1);
        --feature-icon-bg: rgba(16, 185, 129, 0.2);
        --gradient-primary: linear-gradient(135deg, #34d399 0%, #10b981 100%);
        --back-button-border-color: #cbd5e1;
        --back-button-text-color: #cbd5e1;
        --back-button-hover-bg: rgba(203, 213, 225, 0.1);
    }
}

/* =================================================================
   FORM PAGE SCOPED STYLES
   ================================================================= */

/* Form pages use different body padding (fixed bottom nav + header) */
.page-form {
    padding-bottom: 70px;
    padding-top: 80px;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 14px;
    font-family: var(--font-primary);
}

/* Form pages use Open Sans for headings */
.page-form h1,
.page-form h2,
.page-form h3,
.page-form h4,
.page-form h5,
.page-form h6 {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
}

/* Step titles — clean, professional typography */
.step-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.3;
    border: none;
    padding: 0;
    position: static;
}

:root.dark-theme .step-content h2 {
    color: #f3f4f6;
}

.step-content h2::after {
    display: none;
}

.step-content .step-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 20px 0;
    font-weight: 400;
    line-height: 1.5;
}

/* Hide subtitle when empty (no text flicker) */
.step-content .step-subtitle:empty {
    display: none;
}

/* URL input with analyze button */
.url-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.url-input-row input[type="url"] {
    flex: 1;
    min-width: 0;
}

.url-analyze-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.url-analyze-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #ecfdf5;
}

.url-analyze-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.url-analyze-btn.analyzing {
    pointer-events: none;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.url-analyze-btn.analyzing .analyze-btn-text {
    display: none;
}

.url-analyze-btn.analyzing::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

:root.dark-theme .url-analyze-btn {
    background: #1a1d23;
    border-color: #2d3139;
    color: #d1d5db;
}

:root.dark-theme .url-analyze-btn:hover:not(:disabled) {
    background: #064e3b;
    border-color: var(--primary-color);
    color: #d1fae5;
}

/* Analyze feedback */
.analyze-feedback {
    margin-top: -8px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.5;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analyze-feedback.success {
    color: #059669;
}

.analyze-feedback.error {
    color: #dc2626;
}

.analyze-feedback.info {
    color: #6b7280;
}

.detect-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.detect-chip {
    display: inline-block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    white-space: nowrap;
}

:root.dark-theme .detect-chip {
    background: #064e3b;
    color: #a7f3d0;
    border-color: #065f46;
}

/* Mobile: stack URL input */
@media (max-width: 480px) {
    .url-input-row {
        flex-direction: column;
    }

    .url-analyze-btn {
        justify-content: center;
        padding: 10px 16px;
    }
}

/* Page-form h2 base (non-step contexts like info-box) */
.page-form h2 {
    font-size: 1.4rem;
    margin-top: 1em;
    margin-bottom: 0.6em;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0;
}

.page-form h2::after {
    display: none;
}

/* Form container (scoped .container override for form pages) */
.form-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    background-color: transparent;
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
    box-sizing: border-box !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

:root.dark-theme .form-container {
    border-color: transparent;
    background-color: transparent;
}

/* Result pages (success/cancel) hide header and have no top padding */
.page-result {
    padding-top: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.page-result .site-header {
    display: none;
}

.page-result .site-footer {
    display: none;
}
/* =================================================================
   SECTION 2 — FORM UI STYLES
   Extracted from public/css/form.css
   ================================================================= */

/* -----------------------------------------------------------------
   1. Form header overrides
   ----------------------------------------------------------------- */

.page-form {
    padding-top: 69px;
    height: 100vh;
    overflow: hidden;
}

.page-form .site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    color: var(--text-color);
    height: auto;
}

:root.dark-theme .page-form .site-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 10px 20px !important;
    height: auto !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.logo img,
.logo svg {
    height: 48px;
    margin-right: 10px;
    flex-shrink: 0;
}

.logo-content {
    display: flex;
    flex-direction: column;
}

/* Header progress indicator (right side) */
.form-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Header time left */
.header-time-left {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

:root.dark-theme .header-time-left {
    color: #9ca3af;
}

/* Header progress ring */
.header-progress-ring {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.header-progress-ring svg {
    transform: rotate(-90deg);
    width: 48px;
    height: 48px;
}

.header-progress-ring .ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3;
}

:root.dark-theme .header-progress-ring .ring-bg {
    stroke: #2d3139;
}

.header-progress-ring .ring-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-progress-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

:root.dark-theme .header-progress-pct {
    color: #f3f4f6;
}

@keyframes progressBump {
    0%   { transform: translate(-50%, -50%) scale(1); }
    30%  { transform: translate(-50%, -50%) scale(1.35); color: var(--primary-color); }
    60%  { transform: translate(-50%, -50%) scale(0.95); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.header-progress-pct.bump {
    animation: progressBump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Sidebar fake steps — fine (top) and price (bottom) integrated in timeline */
.sidebar-fake-step {
    cursor: default !important;
}

.sidebar-fake-step .sidebar-step-info {
    padding-top: 0;
}

/* Fine step connecting line to first real step */
.sidebar-fine-step::after {
    content: '';
    position: absolute;
    left: 27px;
    top: 50%;
    height: 100%;
    width: 2px;
    background: #fecaca;
    z-index: 0;
}

:root.dark-theme .sidebar-fine-step::after {
    background: rgba(220, 38, 38, 0.2);
}

/* Price step — no connecting line below */
.sidebar-price-step::after {
    display: none !important;
}

/* When price entry is visible, show connecting line from last stepper step */
.sidebar-stepper.has-price-below .sidebar-step:last-child::after {
    content: '';
    position: absolute;
    left: 27px;
    top: 50%;
    height: 100%;
    width: 2px;
    background: #e5e7eb;
    z-index: 0;
}

:root.dark-theme .sidebar-stepper.has-price-below .sidebar-step:last-child::after {
    background: #2d3139;
}

.sidebar-stepper.has-price-below .sidebar-step.completed:last-child::after {
    background: var(--primary-color);
}

/* Fine circle — red warning style, 30px like active */
.sidebar-fine-circle {
    width: 30px !important;
    height: 30px !important;
    margin-left: 0 !important;
    border-color: #dc2626 !important;
    background: #dc2626 !important;
    color: white;
}

.sidebar-fine-circle::after {
    display: none;
}

.sidebar-fine-circle svg {
    display: block;
}

.sidebar-fine-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #991b1b;
    line-height: 1.3;
}

.sidebar-fine-amount {
    font-size: 14px;
    font-weight: 800;
    color: #dc2626;
    line-height: 1.3;
}

:root.dark-theme .sidebar-fine-label {
    color: #fca5a5;
}

:root.dark-theme .sidebar-fine-amount {
    color: #f87171;
}

:root.dark-theme .sidebar-fine-circle {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* Price circle — green shield style, 30px like active */
.sidebar-price-circle {
    width: 30px !important;
    height: 30px !important;
    margin-left: 0 !important;
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: white;
}

.sidebar-price-circle::after {
    display: none;
}

.sidebar-price-circle svg {
    display: block;
}

.sidebar-price-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #065f46;
    line-height: 1.3;
}

.sidebar-price-amount {
    font-size: 14px;
    font-weight: 800;
    color: #15803d;
    line-height: 1.3;
}

:root.dark-theme .sidebar-price-label {
    color: #6ee7b7;
}

:root.dark-theme .sidebar-price-amount {
    color: #34d399;
}

@media (max-width: 600px) {
    .header-time-left { display: none; }
}

/* Hide JS-injected promotion banner on form page (conflicts with sidebar layout) */
.page-form .promotion-banner,
.page-form #promotion-banner {
    display: none !important;
}

.form-progress-container .step-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 4px 0 2px;
    max-width: 800px;
    width: 100%;
    overflow: visible;
    position: relative;
}

.form-progress-container .step-indicator::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(229, 231, 235, 0.4) 0%,
        rgba(209, 213, 219, 0.8) 50%,
        rgba(229, 231, 235, 0.4) 100%
    );
    z-index: 1;
    transform: none;
}

.form-progress-container .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex: 1;
    min-width: 0;
    max-width: 130px;
}

.form-progress-container .step-title {
    font-size: 10px;
    white-space: nowrap;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
    display: block;
    margin-top: 4px;
    position: static !important;
    transform: none !important;
    bottom: auto !important;
    left: auto !important;
    opacity: 1 !important;
    overflow: visible;
    max-width: 130px;
    padding: 0 2px;
}

/* Mobile progress indicator */
.mobile-progress-indicator {
    display: none;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--button-border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    align-self: center;
}

.mobile-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(229, 231, 235, 0.5);
    border-radius: 2px;
    margin: 4px 0;
    overflow: hidden;
}

.mobile-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: var(--progress-width, 14%);
}

/* Desktop form container — no border (sidebar layout provides structure) */
@media (min-width: 769px) {
    .form-container {
        border: none;
        border-radius: 0;
        padding: 0;
        margin-top: 0;
    }
}

/* Responsive styles for mobile header */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 16px !important;
        gap: 8px;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .logo svg {
        width: 36px !important;
        height: 36px !important;
    }

    /* Hide complex progress bar on mobile */
    .form-progress-container .step-indicator {
        display: none !important;
    }

    /* Show simple mobile progress indicator */
    .mobile-progress-indicator {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 80px;
    }

    .form-progress-container {
        justify-content: flex-end;
        flex-grow: 0;
        flex-shrink: 0;
    }

    .header-container {
        gap: 12px !important;
    }
}

/* -----------------------------------------------------------------
   2. Step indicator & navigation
   ----------------------------------------------------------------- */

/* Step indicator - Compact et superpose */
.step-indicator {
    position: relative;
    margin: 10px auto 30px;
    padding: 0 40px;
    max-width: 900px;
    height: 50px;
    display: flex;
    align-items: center;
}

/* Chaque etape - dots minimalistes */
.step {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

/* Dots compacts superposes sur la barre */
.form-progress-container .step-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.form-progress-container .step-circle:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

.step-circle:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

/* Etape active - plus grosse et visible */
.form-progress-container .step.active .step-circle {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.step.active .step-circle {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Etapes completees */
.step.completed .step-circle {
    background: linear-gradient(145deg, var(--primary), var(--primary-hover));
    color: white;
    border-color: var(--primary);
    transform: scale(1.3);
    border: 2px solid var(--card-background);
    box-shadow:
        0 4px 12px rgba(90, 114, 230, 0.4),
        inset 1px 1px 3px rgba(255, 255, 255, 0.3);
}

/* Labels compacts en desktop */
.step-indicator:not(.form-progress-container .step-indicator) .step-title {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
    letter-spacing: 0.1px;
    text-align: center;
    max-width: 90px;
    line-height: 1.2;
}

/* Etats des labels */
.step.active .step-title {
    color: var(--primary-color);
    font-weight: 600;
    transform: translateX(-50%) translateY(-2px);
}

.step.completed .step-title {
    color: var(--primary);
    font-weight: 600;
}

.step:hover .step-title {
    transform: translateX(-50%) translateY(-2px);
    color: var(--primary-color);
}

/* Ligne de base moderne avec glassmorphism */
.step-indicator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(240, 240, 240, 0.4) 0%,
        rgba(220, 220, 220, 0.8) 50%,
        rgba(240, 240, 240, 0.4) 100%
    );
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

/* Ligne de progression coherente */
.step-indicator::after {
    content: "";
    position: absolute;
    top: 35%;
    left: 40px;
    right: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 50%, var(--primary-hover) 100%);
    z-index: 2;
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow:
        0 2px 12px rgba(16, 185, 129, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.form-progress-container .step-indicator::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 50%, var(--primary-hover) 100%);
    z-index: 2;
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow:
        0 1px 6px rgba(16, 185, 129, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* -----------------------------------------------------------------
   SIDEBAR LAYOUT
   ----------------------------------------------------------------- */
.form-layout {
    display: flex;
    height: calc(100vh - 69px);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    transition: opacity 0.15s ease;
}

:root.dark-theme .form-layout {
    border-left-color: #2d3139;
    border-right-color: #2d3139;
}

.form-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #f8fafb;
    border-right: 1px solid #e5e7eb;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

:root.dark-theme .form-sidebar {
    background: #1a1d23;
    border-right-color: #2d3139;
}

.form-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-main > form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sidebar stepper */
.sidebar-stepper {
    flex-shrink: 0;
}

.sidebar-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 -12px;
    border-radius: 10px;
    position: relative;
    cursor: default;
    transition: background 0.3s ease;
    min-height: 50px; /* fixed height prevents layout shift when circles change size */
}

.sidebar-step.active {
    background: rgba(241, 245, 249, 0.85);
}

:root.dark-theme .sidebar-step.active {
    background: rgba(30, 37, 48, 0.85);
}

/* Vertical connecting line — spans from circle center to next step's circle center.
   With min-height: 50px and align-items: center, circle center is always at 50%.
   Line goes from center of this step to center of next step = full step height. */
.sidebar-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 27px;
    top: 50%;
    height: 100%;
    width: 2px;
    background: #e5e7eb;
    transition: background 0.3s ease;
    z-index: 0;
}

:root.dark-theme .sidebar-step:not(:last-child)::after {
    background: #2d3139;
}

/* Green line on completed steps AND on the step just before active */
.sidebar-step.completed:not(:last-child)::after {
    background: var(--primary-color);
}

/* Hide step numbers — always show checkmark icons instead */
.sidebar-step-number {
    display: none;
}

/* --- Circle sizes: active=30px, completed=22px, pending=26px --- */
.sidebar-step-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    background: white;
    position: relative;
    z-index: 1;
}

/* Checkmark icon */
.sidebar-step-circle::after {
    content: '';
    width: 12px;
    height: 12px;
    background-color: #d1d5db;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: background-color 0.3s ease;
}

:root.dark-theme .sidebar-step-circle {
    background: #1a1d23;
    border-color: #2d3139;
}

:root.dark-theme .sidebar-step-circle::after {
    background-color: #4b5563;
}

/* Active step — larger circle (30px) with pulse */
.sidebar-step.active .sidebar-step-circle {
    width: 30px;
    height: 30px;
    border-color: var(--primary-color);
    background: white;
    animation: stepPulse 2s ease-in-out infinite;
}

.sidebar-step.active .sidebar-step-circle::after {
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    /* Pen/edit icon instead of checkmark — indicates "currently editing" */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E");
}

:root.dark-theme .sidebar-step.active .sidebar-step-circle {
    border-color: var(--primary-color);
    background: #1e2530;
    animation: stepPulseDark 2s ease-in-out infinite;
}

:root.dark-theme .sidebar-step.active .sidebar-step-circle::after {
    background-color: var(--primary-color);
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

@keyframes stepPulseDark {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.3); }
    50%      { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* Completed step — smaller circle (22px) */
.sidebar-step.completed .sidebar-step-circle {
    width: 22px;
    height: 22px;
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.sidebar-step.completed .sidebar-step-circle::after {
    width: 11px;
    height: 11px;
    background-color: white;
}

/* Align all circles on the same vertical axis (center of 30px active circle) */
/* Active: 30px → margin-left: 0px, center at 15px from gap start */
/* Pending: 26px → margin-left: 2px, center at 2+13=15px ✓ */
/* Completed: 22px → margin-left: 4px, center at 4+11=15px ✓ */
.sidebar-step-circle {
    margin-left: 2px; /* default for pending (26px) */
}

.sidebar-step.active .sidebar-step-circle {
    margin-left: 0;
}

.sidebar-step.completed .sidebar-step-circle {
    margin-left: 4px;
}

/* Connecting line centered at: padding(12px) + 15px = 27px from step left edge
   But step has margin: 0 -12px, so absolute left = 12+15 = 27px */

.sidebar-step-info {
    padding-top: 0;
}

.sidebar-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    line-height: 1.3;
    transition: color 0.3s ease;
}

:root.dark-theme .sidebar-step-title {
    color: #6b7280;
}

.sidebar-step.active .sidebar-step-title {
    color: #111827;
    font-weight: 700;
}

:root.dark-theme .sidebar-step.active .sidebar-step-title {
    color: #f3f4f6;
}

.sidebar-step.completed .sidebar-step-title {
    color: var(--primary-color);
    font-size: 12px;
}

.sidebar-step.clickable {
    cursor: pointer;
}

.sidebar-step.clickable:hover .sidebar-step-title {
    color: var(--primary-color);
}

/* Sidebar promo card */
.sidebar-promo {
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 12px;
    line-height: 1.5;
    display: none;
}

:root.dark-theme .sidebar-promo {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: #047857;
    color: #d1fae5;
}

.sidebar-promo.visible {
    display: block;
}

.sidebar-promo-text {
    margin: 0;
}

.sidebar-promo-text {
    margin: 0;
}

.sidebar-promo-text strong,
.sidebar-promo-text b {
    color: #34d399;
    font-weight: 600;
}

:root.dark-theme .sidebar-promo {
    background: linear-gradient(135deg, #1a2332 0%, #0f172a 100%);
    border: 1px solid #2d3139;
}

/* -----------------------------------------------------------------
   3. Step content & CGV notification
   ----------------------------------------------------------------- */

.step-content {
    display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cgv-smart-defaults-notification {
    font-family: "Open Sans", sans-serif;
}

.cgv-smart-defaults-notification .notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cgv-smart-defaults-notification .notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cgv-smart-defaults-notification .notification-text {
    flex: 1;
}

.cgv-smart-defaults-notification .notification-text strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
}

.cgv-smart-defaults-notification .notification-text p {
    margin: 0;
    color: #424242;
    font-size: 14px;
    line-height: 1.4;
}

.cgv-smart-defaults-notification .notification-close {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.cgv-smart-defaults-notification .notification-close:hover {
    background: var(--primary-hover);
}

/* Indicateur pour les champs auto-selectionnes */
[data-smart-default="true"] + label::after {
    content: " \1F916";
    opacity: 0.7;
    font-size: 12px;
    margin-left: 4px;
}

/* -----------------------------------------------------------------
   4. Website analyzer
   ----------------------------------------------------------------- */

.website-analyzer-container {
    margin-top: 12px;
    padding: 0;
}

.btn-analyze-website {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-analyze-website svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-analyze-website svg.spinner {
    animation: spin 1s linear infinite;
}

.btn-analyze-website:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-analyze-website:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-analyze-website.loading {
    background: #94a3b8;
    cursor: wait;
}

.btn-analyze-website.loading::before {
    content: "";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.analyzer-results {
    margin-top: 16px;
    padding: 16px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analyzer-results h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text-color);
}

.analyzer-results h4 svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.analyzer-suggestions h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-color);
}

.analyzer-suggestions h4 svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.analyzer-results.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.analyzer-results.success {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.analyzer-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.analyzer-result-item:last-child {
    border-bottom: none;
}

.analyzer-result-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.analyzer-result-content {
    flex: 1;
}

.analyzer-result-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 2px;
}

.analyzer-result-value {
    font-size: 13px;
    color: var(--text-secondary);
}

.analyzer-suggestions {
    margin-top: 16px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.analyzer-suggestions h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-color);
}

.analyzer-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.analyzer-suggestion input[type="checkbox"] {
    margin: 0;
}

.analyzer-suggestion .recommendation-text {
    font-style: italic;
    color: var(--text-secondary);
}

.analyzer-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.btn-apply-suggestions {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-apply-suggestions svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-apply-suggestions:hover {
    background: #059669;
}

.btn-dismiss-analysis {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-dismiss-analysis svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-dismiss-analysis:hover {
    background: var(--tab-hover-bg);
}

/* -----------------------------------------------------------------
   5. Form elements
   ----------------------------------------------------------------- */

.step-content.active {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.step-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 4px 40px 20px;
    min-height: 0;
}

/* Step description styles */
.step-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
    text-align: center;
    font-style: italic;
    padding: 12px 0;
}

/* Optional Field Styles */
.optional {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    font-style: italic;
    margin-left: var(--spacing-xs);
}

/* Form groups */
.form-group {
    margin-bottom: 0.75rem;
}

/* Label optional text */
.label-optional-text {
    color: var(--text-secondary);
    margin-left: 6px;
    font-weight: normal;
    font-size: 0.85em;
    opacity: 0.75;
    font-style: italic;
    transition:
        color 0.3s,
        opacity 0.3s;
}

/* Scoped label to .page-form to avoid affecting homepage */
.page-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text-color);
    transition: color 0.3s;
    letter-spacing: -0.01em;
    line-height: 1;
    font-family:
        "Open Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

/* Tighter label styling within form groups */
.page-form .form-group > label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

:root.dark-theme .page-form .form-group > label {
    color: #d1d5db;
}

/* Scoped input/select/textarea to .page-form */
.page-form input[type="text"],
.page-form input[type="email"],
.page-form input[type="tel"],
.page-form input[type="url"],
.page-form input[type="number"],
.page-form input[type="date"],
.page-form select,
.page-form textarea {
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 13px;
    background-color: transparent;
    box-sizing: border-box;
    line-height: 1.5;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: all 0.15s ease-in-out;
    outline: none;
    background-color: var(--input-background);
    color: var(--text-color);
    font-family:
        "Open Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* Textarea adjustments */
.page-form textarea {
    min-height: 5rem;
    resize: vertical;
}

/* Placeholder styling */
.page-form input::placeholder,
.page-form textarea::placeholder,
.page-form select::placeholder {
    color: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

:root.dark-theme .page-form input::placeholder,
:root.dark-theme .page-form textarea::placeholder,
:root.dark-theme .page-form select::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Dark theme: explicit input/select/textarea overrides */
:root.dark-theme .page-form input[type="text"],
:root.dark-theme .page-form input[type="email"],
:root.dark-theme .page-form input[type="tel"],
:root.dark-theme .page-form input[type="url"],
:root.dark-theme .page-form input[type="number"],
:root.dark-theme .page-form input[type="date"],
:root.dark-theme .page-form select,
:root.dark-theme .page-form textarea {
    background-color: var(--input-background);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Focus states */
.page-form input:focus,
.page-form select:focus,
.page-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5);
    background-color: var(--card-background);
}

.page-form input:required:invalid:focus,
.page-form select:required:invalid:focus,
.page-form textarea:required:invalid:focus {
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.08);
    border-color: rgba(217, 4, 41, 0.3);
}

/* Textarea overrides */
.page-form textarea {
    min-height: 80px;
    resize: vertical;
    padding: 12px 14px;
}

/* Select appearance/arrow */
.page-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23777777' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
}

/* Dark mode select arrow */
:root.dark-theme .page-form select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23aaaaaa' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

/* -----------------------------------------------------------------
   6. Form layout
   ----------------------------------------------------------------- */

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-col {
    flex: 1;
}

.form-col .form-group {
    margin-bottom: 0;
}

/* Multi-column form layouts */
.form-row-3 {
    display: flex;
    gap: 12px;
}
.form-row-3 .form-col {
    flex: 1;
}

/* URL + Country + Language trio row */
.form-row-url-trio .form-col-url {
    flex: 2;
}

/* Checkbox grid for compact display */
.checkbox-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}


/* Responsive: single column on mobile */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .form-row-3 {
        flex-direction: column;
    }

    /* Site type grid 2x2 on mobile */
    .site-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* Document options grid 2x2 on mobile */
    #documentOptions {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .checkbox-grid-2col {
        grid-template-columns: 1fr;
    }

}

/* Tablet breakpoint - 2x2 layout */
@media (min-width: 769px) and (max-width: 1024px) {
    .site-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    #documentOptions {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

/* Checkbox styles */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    padding: 2px 0;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-container label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Site type grid - 4 columns on desktop */
.site-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

/* Document option cards */
.document-option {
    border: 1px solid var(--border-color);
    border-radius: var(--selection-border-radius);
    padding: 15px;
    margin-bottom: 0;
    cursor: pointer;
    transition:
        all 0.25s,
        background-color 0.3s,
        border-color 0.3s;
    background-color: var(--input-background);
}

/* Document options container - 4 columns on desktop */
#documentOptions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: stretch;
}

#documentOptions .document-option {
    margin-bottom: 0;
    border-radius: var(--selection-border-radius);
    min-height: 150px;
    align-self: stretch;
}

.document-option:hover {
    border-color: var(--primary);
    background-color: var(--tab-hover-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#documentOptions .document-option:hover {
    transform: none;
}

.document-option.selected {
    border-color: var(--primary-color);
    background-color: var(--tab-hover-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.document-option h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-family:
        "Open Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.document-option p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Disabled state for document-options */
.document-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--prompt-background);
    border-color: var(--border-color);
    position: relative;
}

.document-option.disabled:hover {
    border-color: var(--border-color);
    background-color: var(--prompt-background);
    transform: none;
    box-shadow: none;
}

.document-option.disabled .disabled-message {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 11px;
    color: #8b4513;
    font-weight: 500;
    font-style: italic;
    background-color: #fff3e0;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #d4a574;
    box-shadow: 0 2px 4px rgba(212, 165, 116, 0.3);
}

/* Dark mode disabled message */
:root.dark-theme .document-option.disabled .disabled-message {
    color: #ffb74d;
    background-color: rgba(255, 183, 77, 0.15);
    border-color: #ff8f00;
}

/* -----------------------------------------------------------------
   Pill selector mode (compact step 1)
   ----------------------------------------------------------------- */

/* Step 1 uses same typography as all steps now */
#step1 .step-description {
    display: none;
}

/* Form section labels — hidden (sidebar stepper replaces them) */
.form-section-label,
.form-section-divider {
    display: none;
}

.form-section-number {
    display: none;
}

/* Pill mode - override grid to flex */
.pill-mode {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
    margin-bottom: 4px;
    grid-template-columns: unset !important;
}

.pill-mode .document-option {
    flex: 0 1 auto;
    padding: 8px 16px !important;
    border-radius: 100px !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    border: 1.5px solid var(--border-color);
    background: var(--input-background);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.pill-mode .document-option .document-info {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex: unset;
}

.pill-mode .document-option .document-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.pill-mode .document-option .document-info h3::after {
    display: none;
}

.pill-mode .document-option .document-info p,
.pill-mode .document-option .document-sample {
    display: none !important;
}

/* Pill hover & selected — green accent for site types */
.pill-mode .document-option:hover {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: none;
    transform: none;
}

.pill-mode .document-option.selected {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.pill-mode .document-option.selected .document-info h3 {
    color: var(--primary-color);
    font-weight: 600;
}

/* Pill icons via SVG masks — color follows background-color */
.pill-mode .document-option::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-color: var(--text-secondary);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.2s ease;
}

.pill-mode .document-option:hover::before {
    background-color: var(--primary-color);
}

.pill-mode .document-option.selected::before {
    background-color: var(--primary-color);
}

/* Site type icons (Lucide-style line SVGs) */
.site-type-grid.pill-mode .document-option[data-value="personal"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E");
}

.site-type-grid.pill-mode .document-option[data-value="business"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E");
}

.site-type-grid.pill-mode .document-option[data-value="ecommerce"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E");
}

.site-type-grid.pill-mode .document-option[data-value="saas"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
}

/* Document type pills — indigo accent to differentiate from site types */
.pill-mode--doc .document-option:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.pill-mode--doc .document-option:hover::before {
    background-color: #6366f1;
}

.pill-mode--doc .document-option.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 1px #6366f1;
}

.pill-mode--doc .document-option.selected .document-info h3 {
    color: #6366f1;
}

.pill-mode--doc .document-option.selected::before {
    background-color: #6366f1;
}

/* Document type icons */
.pill-mode--doc .document-option[data-value="cgu"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}

.pill-mode--doc .document-option[data-value="privacy"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.pill-mode--doc .document-option[data-value="cookies"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01'/%3E%3Cpath d='M16 15.5v.01'/%3E%3Cpath d='M12 12v.01'/%3E%3Cpath d='M11 17v.01'/%3E%3Cpath d='M7 14v.01'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01'/%3E%3Cpath d='M16 15.5v.01'/%3E%3Cpath d='M12 12v.01'/%3E%3Cpath d='M11 17v.01'/%3E%3Cpath d='M7 14v.01'/%3E%3C/svg%3E");
}

.pill-mode--doc .document-option[data-value="cgv"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z'/%3E%3Ccircle cx='7.5' cy='7.5' r='.5' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z'/%3E%3Ccircle cx='7.5' cy='7.5' r='.5' fill='black'/%3E%3C/svg%3E");
}

/* Dark mode adjustments for pill accents */
:root.dark-theme .pill-mode .document-option.selected {
    background: rgba(52, 211, 153, 0.15);
}
:root.dark-theme .pill-mode--doc .document-option.selected {
    background: rgba(99, 102, 241, 0.2);
}

/* Selected pill description text */
/* Document selection subtitle (dynamic per site type) */
.document-selection-subtitle {
    font-size: 12.5px;
    color: var(--text-secondary, #64748b);
    margin: 2px 0 4px;
    line-height: 1.45;
    font-weight: 400;
    transition: opacity 0.2s ease;
}

.document-selection-subtitle:empty {
    display: none;
}

/* Legacy pill-selected-desc (keep for backward compat if referenced elsewhere) */
.pill-selected-desc {
    font-size: 12.5px;
    color: var(--text-secondary, #64748b);
    margin: 4px 0 16px;
    min-height: 0;
    line-height: 1.4;
    font-weight: 400;
    padding: 6px 10px;
}

.pill-selected-desc:empty {
    display: none;
}

/* Disabled pills */
.pill-mode .document-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pill-mode .document-option.disabled .disabled-message {
    position: static;
    font-size: 9px;
    padding: 2px 6px;
    margin-left: 4px;
}

/* Responsive pills */
@media (max-width: 480px) {
    .pill-mode .document-option {
        padding: 6px 12px !important;
        font-size: 12px;
    }
    .pill-mode .document-option::before {
        width: 14px;
        height: 14px;
    }
    .pill-mode .document-option .document-info h3 {
        font-size: 12px;
    }
}

/* -----------------------------------------------------------------
   7. Form buttons
   ----------------------------------------------------------------- */

/* NOTE: .btn is NOT scoped to .page-form because success/cancel pages also use .btn */
.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--button-border-radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    min-height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    font-family: "Open Sans", sans-serif;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Apple-style wave effect on click */
.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition:
        width 0.4s ease,
        height 0.4s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-container {
    flex-shrink: 0;
    height: 72px;
    box-sizing: border-box;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(224, 224, 224, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 0 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 24px;
}

/* Step 5 button wrapper (generate + preview) */
.btn-container > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Force spacing between navigation buttons */
.btn-container > button {
    margin: 0 12px !important;
}

.btn-container > button:first-child {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.btn-container > button:last-child {
    margin-right: 0 !important;
}

/* Inner container for button alignment */
.btn-container-inner {
    display: flex;
    justify-content: space-between;
    max-width: var(--max-content-width, 960px);
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.btn-back {
    background-color: #8d99ae;
}

.btn-back:hover {
    background-color: #7d8a9e;
}

/* Back outline button modifier */
.btn.btn-back-outline {
    background: transparent;
    color: var(--back-button-text-color);
    border: 1px solid var(--back-button-border-color);
    box-shadow: none;
    padding: 13px 27px;
    box-sizing: border-box;
}

.btn.btn-back-outline:hover {
    background: var(--back-button-hover-bg);
    border-color: var(--back-button-text-color);
    color: var(--back-button-text-color);
    box-shadow: none;
    transform: translateY(-1px);
}

/* Dark mode for fixed navigation */
:root.dark-theme .btn-container {
    background: rgba(30, 30, 30, 0.85);
    border-top: 1px solid rgba(51, 51, 51, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Hidden fields */
.hidden-fields {
    display: none;
}

/* -----------------------------------------------------------------
   8. Tabs & misc form UI
   ----------------------------------------------------------------- */

.tab {
    padding: 8px 14px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    border-radius: 6px 6px 0 0;
    transition:
        all 0.2s,
        background-color 0.3s,
        color 0.3s,
        border-color 0.3s;
    font-size: 13px;
    color: var(--text-color);
}

.tab:hover {
    background-color: var(--tab-hover-bg);
}

.tab.active {
    background-color: var(--card-background);
    border-color: var(--border-color);
    border-bottom-color: var(--card-background);
    font-weight: 600;
    color: var(--primary-color);
}

/* Accordion for FAQ */
.accordion-item {
    margin-bottom: 15px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--input-background);
}

.accordion-header:hover {
    background-color: var(--tab-hover-bg);
}

/* Alerts and messages */
.alert {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    font-size: 13px;
    transition:
        background-color 0.3s,
        border-color 0.3s,
        color 0.3s;
}

.alert-error {
    background-color: rgba(217, 4, 41, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(217, 4, 41, 0.25);
}

.alert-success {
    background-color: rgba(56, 176, 0, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(56, 176, 0, 0.25);
}

/* Toast message */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(217, 4, 41, 0.9);
    color: white;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Field error */
.field-error {
    border: 2px solid var(--error-color) !important;
    background-color: var(--field-error-bg);
}

.field-error-container {
    border: 2px solid var(--error-color) !important;
    background-color: var(--field-error-bg);
    border-radius: var(--border-radius);
    padding: 10px;
}

/* Info box */
.info-box {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px !important;
    box-shadow: var(--box-shadow);
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 20px !important;
}

.info-box h2 {
    color: var(--primary-color);
    margin-top: 0;
    font-weight: 600;
    font-size: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}

.info-box h3 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

/* -----------------------------------------------------------------
   9. Document pricing
   ----------------------------------------------------------------- */

/* Structure for document option cards with pricing */
.document-options .document-option,
.document-option:has(.document-info) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    padding: 15px;
    min-height: 130px;
}

/* Document info section */
.document-info {
    flex: 1;
    margin-bottom: 8px;
}

.document-info h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-family:
        "Open Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.document-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Current price display */
.current-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 18px;
}

/* =================================================================
   PREVIEW SYSTEM
   ================================================================= */

/* Summary step buttons — consistent sizing */
.page-form .btn-primary,
.page-form .btn-outline {
    font-size: 14px;
    padding: 12px 24px;
}

/* Outline variant (preview button) */
.page-form .btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-form .btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Container preview */
.preview-container {
    margin: 20px 0;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
}

/* Messages systeme */
.preview-generating {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 0;
    font-size: 16px;
}

.preview-error {
    text-align: center;
    color: #dc3545;
    padding: 40px 0;
    border: 1px dashed #dc3545;
    border-radius: 4px;
    background: #fff5f5;
    font-size: 16px;
}

.preview-timeout {
    text-align: center;
    color: #ff6b35;
    margin-top: 20px;
    padding: 15px;
    background: #fff4e6;
    border-radius: 4px;
    font-size: 14px;
    font-style: italic;
}

/* Document preview content */
.preview-document {
    min-height: 200px;
    line-height: 1.6;
}

/* Reset pour eviter conflits avec styles WebLegal */
.preview-container * {
    box-sizing: border-box;
}

/* Styles dark mode pour preview */
.dark-theme .preview-container {
    background: var(--background-secondary);
    border-color: var(--border-color);
}

.dark-theme .preview-generating {
    color: var(--text-secondary);
}

.dark-theme .preview-error {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.dark-theme .preview-timeout {
    background: rgba(255, 107, 53, 0.1);
    color: #ffb347;
}

.dark-theme .page-form .btn-outline {
    color: var(--primary);
    border-color: var(--primary);
}

.dark-theme .page-form .btn-outline:hover {
    background: var(--primary);
    color: var(--background);
}

/* Animation scroll fluide pour preview */
.preview-container {
    scroll-behavior: smooth;
}

/* Responsive design pour preview */
@media (max-width: 768px) {
    .preview-container {
        max-height: 400px;
        padding: 15px;
        margin: 15px 0;
    }

    .preview-generating,
    .preview-error {
        padding: 30px 15px;
        font-size: 14px;
    }

    .page-form .btn-primary,
    .page-form .btn-outline {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* =================================================================
   SUCCESS & CANCEL PAGE STYLES
   ================================================================= */

.success-page {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px 30px;
    text-align: center;
    background-color: var(--card-background, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

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

.success-page h1 {
    font-size: 28px;
    color: var(--text-color, #1a1a1a);
    margin-bottom: 12px;
    font-weight: 700;
}

.success-page p {
    color: var(--text-secondary, #666666);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.next-steps {
    text-align: left;
    background-color: var(--background-color, #f8f9fa);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
}

.next-steps h3 {
    font-size: 18px;
    color: var(--text-color, #1a1a1a);
    margin-bottom: 16px;
    margin-top: 0;
}

.next-steps ol {
    padding-left: 20px;
    margin: 0;
}

.next-steps li {
    color: var(--text-secondary, #555555);
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 15px;
}

.next-steps li:last-child {
    margin-bottom: 0;
}

.email-address {
    color: var(--primary, #10b981);
    word-break: break-all;
}

.cancel-page {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px 30px;
    text-align: center;
    background-color: var(--card-background, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cancel-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

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

.cancel-page h1 {
    font-size: 28px;
    color: var(--text-color, #1a1a1a);
    margin-bottom: 12px;
    font-weight: 700;
}

.cancel-page p {
    color: var(--text-secondary, #666666);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* CTA Buttons (used on success & cancel pages) */
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px;
    padding: 14px 28px;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-buttons .btn-outline {
    background: transparent;
    color: var(--primary, #10b981);
    border: 2px solid var(--primary, #10b981);
}

.cta-buttons .btn-outline:hover {
    background: var(--primary, #10b981);
    color: white;
}

/* Additional note section */
.additional-note {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary, #888888);
    line-height: 1.5;
    padding: 0 20px;
}

/* Dark mode for success/cancel pages */
:root.dark-theme .success-page,
:root.dark-theme .cancel-page {
    background-color: var(--card-background);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

:root.dark-theme .next-steps {
    background-color: var(--background-color);
}

/* =================================================================
   RESPONSIVE RULES (form-specific)
   ================================================================= */

/* -----------------------------------------------------------------
   Tablet breakpoint (769px - 1024px)
   ----------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .site-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    #documentOptions {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

/* -----------------------------------------------------------------
   Form container responsive (880px)
   ----------------------------------------------------------------- */
@media (max-width: 880px) {
    .form-container {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding: 12px !important;
    }

    .info-box {
        padding: 15px !important;
    }

    .page-form .header-container,
    .footer-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .step-indicator {
        padding: 0 20px;
        margin-bottom: 20px;
        height: 40px;
    }

    .step-indicator::before {
        left: 20px;
        right: 20px;
    }

    .step-indicator::after {
        left: 20px;
    }

    .step-title {
        opacity: 0;
        font-size: 10px;
        bottom: -25px;
    }

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

    .btn-container-inner {
        padding: 0 16px;
    }

    .step {
        margin-bottom: 8px;
    }

    .step-title {
        font-size: 11px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 14px;
        min-height: 42px;
    }

    .tab {
        padding: 6px 10px;
        font-size: 12px;
        margin-bottom: 5px;
    }

    .step-indicator::before {
        left: 10px;
        right: 10px;
    }

    .step-indicator::after {
        left: 10px;
    }

    .document-option h3 {
        font-size: 15px;
    }

    .document-option p {
        font-size: 12px;
    }
}

/* -----------------------------------------------------------------
   Mobile responsive (768px)
   ----------------------------------------------------------------- */
@media (max-width: 768px) {
    .page-form .header-container {
        padding: 15px 16px !important;
        gap: 8px;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .page-form .logo svg {
        width: 36px !important;
        height: 36px !important;
    }

    .form-progress-container .step-indicator {
        display: none !important;
    }

    .mobile-progress-indicator {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 80px;
    }

    .form-progress-container {
        justify-content: flex-end;
        flex-grow: 0;
        flex-shrink: 0;
    }

    .page-form .header-container {
        gap: 12px !important;
    }

    .page-form {
        padding-top: 84px;
    }

    .form-progress-container {
        padding: 0 8px;
    }

    .form-progress-container .step-indicator {
        gap: 8px;
        max-width: 100%;
    }

    .form-progress-container .step {
        min-width: 60px;
    }

    .form-progress-container .step-title {
        font-size: 9px;
    }

    /* Sidebar collapses to horizontal on mobile */
    .form-layout {
        flex-direction: column;
        min-height: auto;
    }

    .form-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        /* Grid: fine/price row on top, stepper below */
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 0;
        padding: 10px 8px;
        overflow: visible;
    }

    :root.dark-theme .form-sidebar {
        border-bottom-color: #2d3139;
    }

    /* Fine entry — top-left, compact badge */
    .sidebar-fake-step {
        display: flex !important;
        padding: 0;
        min-height: auto;
        margin: 0;
        gap: 6px;
        align-items: center;
    }

    .sidebar-fine-step {
        grid-column: 1;
        grid-row: 1;
    }

    .sidebar-fine-step::after {
        display: none !important;
    }

    /* Price entry — top-right, compact badge */
    .sidebar-price-step {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .sidebar-price-step::after {
        display: none !important;
    }

    /* Compact circles for fine/price on mobile */
    .sidebar-fake-step .sidebar-step-circle {
        width: 22px !important;
        height: 22px !important;
    }

    .sidebar-fake-step .sidebar-step-circle svg {
        width: 10px;
        height: 10px;
    }

    .sidebar-fake-step .sidebar-step-info {
        display: block;
        padding: 0;
    }

    .sidebar-fine-label,
    .sidebar-price-label {
        font-size: 9px !important;
        line-height: 1.1;
    }

    .sidebar-fine-amount,
    .sidebar-price-amount {
        font-size: 12px !important;
        line-height: 1.2;
    }

    /* Stepper — full width on second row */
    .sidebar-stepper {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 8px 4px 0;
    }

    /* Single horizontal line behind all circles */
    .sidebar-stepper::before {
        content: '';
        position: absolute;
        top: calc(50% + 4px);
        left: 8px;
        right: 8px;
        height: 2px;
        background: #e5e7eb;
        z-index: 0;
    }

    :root.dark-theme .sidebar-stepper::before {
        background: #2d3139;
    }

    .sidebar-step {
        flex: 1;
        align-items: center;
        justify-content: center;
        padding: 0;
        min-width: 0;
        min-height: auto;
        margin: 0;
    }

    /* Hide ALL connecting lines on steps (including last-child for has-price-below) */
    .sidebar-step::after {
        display: none !important;
    }

    /* Hide step titles on mobile — circles + progress ring are sufficient */
    .sidebar-stepper .sidebar-step-info {
        display: none;
    }

    .sidebar-step-circle {
        width: 24px;
        height: 24px;
        margin-left: 0 !important;
        position: relative;
        z-index: 1;
    }

    .sidebar-step-circle::after {
        width: 10px;
        height: 10px;
    }

    .sidebar-step.active .sidebar-step-circle {
        width: 30px;
        height: 30px;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    }

    .sidebar-step.active .sidebar-step-circle::after {
        width: 13px;
        height: 13px;
    }

    .sidebar-step.completed .sidebar-step-circle {
        width: 22px;
        height: 22px;
    }

    .sidebar-step.completed .sidebar-step-circle::after {
        width: 9px;
        height: 9px;
    }

    .sidebar-promo {
        display: none !important;
    }

    .form-layout {
        border-left: none;
        border-right: none;
        flex: 1;
        height: auto;
        min-height: 0;
    }

    .page-form {
        display: flex;
        flex-direction: column;
        padding-bottom: 0;
    }

    .step-scroll {
        padding: 16px;
    }

    .btn-container {
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        gap: 12px;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    /* Form row stacking */
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .site-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    #documentOptions {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .payment-security {
        margin-bottom: 20px;
    }
}

/* -----------------------------------------------------------------
   Small mobile responsive (480px)
   ----------------------------------------------------------------- */
@media (max-width: 480px) {
    .btn-container-inner {
        flex-direction: row;
        gap: 10px;
        padding: 0;
        align-items: center;
    }

    .btn {
        width: 100%;
    }

    .step-indicator {
        padding: 0 15px;
        height: 35px;
        margin-bottom: 15px;
    }

    .step-indicator::before {
        left: 15px;
        right: 15px;
        height: 1.5px;
    }

    .step-indicator::after {
        left: 15px;
        height: 3px;
    }

    .step-title {
        opacity: 0;
        font-size: 9px;
        bottom: -20px;
        max-width: 70px;
    }

    .step.active .step-title {
        opacity: 1;
        font-weight: 600;
    }

    .step-circle {
        width: 8px;
        height: 8px;
        border: 1px solid var(--card-background);
    }

    .step.active .step-circle {
        transform: scale(1.6);
        border: 2px solid var(--card-background);
    }

    .step.completed .step-circle {
        transform: scale(1.2);
        border: 1px solid var(--card-background);
    }

    .toast {
        max-width: 90%;
        font-size: 13px;
        padding: 8px 12px;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .page-form label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .form-progress-container {
        padding: 0 8px;
    }

    .cancel-page,
    .success-page {
        margin: 30px 15px !important;
        padding: 20px 15px !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }

    .cta-buttons .btn {
        min-width: auto !important;
        width: 100% !important;
        max-width: 320px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .additional-note {
        margin: 0 15px 40px !important;
        padding: 0 10px !important;
    }

    .site-type-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    #documentOptions {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    .document-option {
        flex-direction: row;
    }

    .document-options-multi {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ========================================
   PACK QUICK-SELECT BUTTONS
   ======================================== */

.pack-quick-select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.pack-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg, #fff);
    position: relative;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.pack-btn:hover {
    border-color: var(--primary-color, #10b981);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.pack-btn.active {
    border-color: var(--primary-color, #10b981);
    background: rgba(16, 185, 129, 0.06);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.pack-btn.featured {
    border-color: rgba(16, 185, 129, 0.4);
}

.pack-btn-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color, #10b981);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.pack-btn-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary, #1f2937);
    margin-top: 4px;
}

.pack-btn-docs {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    margin-top: 4px;
    line-height: 1.3;
}

.pack-btn-pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
}

.pack-btn-crossed {
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
    text-decoration: line-through;
    line-height: 1;
}

.pack-btn-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color, #10b981);
    line-height: 1.2;
}

/* Pack button auto-matched animation (individual docs match a pack) */
.pack-btn.auto-matched {
    animation: packMatchPulse 0.7s ease;
}

@keyframes packMatchPulse {
    0%   { transform: scale(1);    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
    35%  { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.25); }
    100% { transform: scale(1);    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
}

/* Pack button disabled state (e.g. Business when personal site) */
.pack-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Pack / individual divider (clickable toggle) */
.pack-or-divider {
    display: flex;
    align-items: center;
    margin: 12px 0 0;
    gap: 12px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    padding: 8px 0;
    font-family: inherit;
}

.pack-or-divider::before,
.pack-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e5e7eb);
}

.pack-or-divider span {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
    text-transform: lowercase;
}

.pack-or-divider:hover span,
.pack-or-divider:hover .pack-or-chevron {
    color: var(--primary-color, #10b981);
}

.pack-or-chevron {
    color: var(--text-secondary, #6b7280);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.pack-or-divider[aria-expanded="true"] .pack-or-chevron {
    transform: rotate(180deg);
}

/* ========================================
   MULTI-SELECT DOCUMENT CARDS
   ======================================== */

.document-options-multi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 0;
}

/* Collapsible individual cards (must be AFTER the grid rule) */
.document-options-multi.collapsed {
    display: none !important;
}

.document-checkbox {
    display: block;
    cursor: pointer;
}

.document-checkbox input[type="checkbox"] {
    display: none;
}

.doc-check-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg, #fff);
    position: relative;
    height: 100%;
}

.doc-check-card:hover {
    border-color: var(--primary-color, #10b981);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.document-checkbox input:checked + .doc-check-card {
    border-color: var(--primary-color, #10b981);
    background: rgba(16, 185, 129, 0.06);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.document-checkbox input:checked + .doc-check-card::after {
    content: '\2713';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--primary-color, #10b981);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.doc-check-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary, #1f2937);
    margin-bottom: 4px;
    line-height: 1.3;
}

.doc-check-desc {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    line-height: 1.3;
    flex: 1;
}

.doc-check-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color, #10b981);
    margin-top: 8px;
}

.doc-check-original-price {
    font-size: 12px;
    color: var(--text-muted, #9ca3af);
    text-decoration: line-through;
    margin-top: 2px;
}

/* Disabled document card (e.g. CGV for personal sites) */
.document-checkbox.disabled .doc-check-card {
    opacity: 0.45;
    cursor: not-allowed;
}

.document-checkbox.disabled .doc-check-card .doc-check-price {
    display: none;
}

/* Disabled reason text shown on card */
.doc-check-disabled-reason {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
    margin-top: 6px;
    line-height: 1.3;
}

/* Disabled reason text on pack button */
.pack-btn.disabled .pack-btn-disabled-reason {
    font-size: 10px;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
    margin-top: 2px;
    line-height: 1.2;
}

/* ── Pack-included muted style for doc cards ── */
/* When a pack is active, included docs keep normal selected style;
   excluded docs are dimmed so the pack content is immediately obvious */
.document-options-multi.pack-active .document-checkbox input:not(:checked) + .doc-check-card {
    opacity: 0.35;
    pointer-events: auto;
}

/* "Included in pack" badge — hidden by default, replaces price when pack is active */
.doc-check-included {
    display: none;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color, #10b981);
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 8px;
    letter-spacing: 0.2px;
}

.document-options-multi.pack-active .document-checkbox input:checked + .doc-check-card .doc-check-included {
    display: inline-block;
}

.document-options-multi.pack-active .document-checkbox input:checked + .doc-check-card .doc-check-price {
    display: none;
}

/* ========================================
   DARK MODE — Pack & Document cards
   ======================================== */

:root.dark-theme .pack-btn {
    background: var(--card-background);
    border-color: var(--border-color);
    color: var(--text-color);
}

:root.dark-theme .pack-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.1);
}

:root.dark-theme .pack-btn.active {
    background: rgba(52, 211, 153, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

:root.dark-theme .pack-btn-name {
    color: var(--text-color);
}

:root.dark-theme .pack-btn-docs {
    color: var(--text-secondary);
}

:root.dark-theme .pack-btn-crossed {
    color: #6b7280;
}

:root.dark-theme .doc-check-card {
    background: var(--card-background);
    border-color: var(--border-color);
}

:root.dark-theme .doc-check-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.1);
}

:root.dark-theme .document-checkbox input:checked + .doc-check-card {
    background: rgba(52, 211, 153, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

:root.dark-theme .doc-check-title {
    color: var(--text-color);
}

:root.dark-theme .doc-check-desc {
    color: var(--text-secondary);
}

:root.dark-theme .doc-check-original-price,
:root.dark-theme .doc-check-disabled-reason {
    color: #6b7280;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive: stack pack buttons on small screens */
@media (max-width: 640px) {
    .pack-quick-select {
        grid-template-columns: 1fr;
    }
    .document-options-multi {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .document-options-multi {
        grid-template-columns: 1fr 1fr;
    }
}

/* Dynamic document step containers */
.dynamic-doc-step {
    /* inherits from .step-content */
}

.dynamic-doc-step .step-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.dynamic-document-fields {
    /* Container for cloned template fields */
}

/* Dynamic sidebar steps — same visual as other steps (no override needed) */

/* Multi-doc price summary in step 5 */
.summary-documents-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.summary-doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.summary-doc-item:last-child {
    border-bottom: none;
}

.summary-doc-name {
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

.summary-doc-price {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.summary-pack-docs {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    padding: 0 0 8px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 2px solid var(--primary-color, #10b981);
    font-size: 18px;
    font-weight: 700;
}

.summary-total-price {
    color: var(--primary-color, #10b981);
    font-size: 22px;
}

/* ===================================================================
   MOBILE: Compact back button (arrow only)
   JS wraps buttons in .btn-container-inner, so target through it
   =================================================================== */
@media (max-width: 768px) {
    .btn-container button.btn-secondary,
    .btn-container button.btn-step-prev {
        font-size: 0 !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        border-radius: var(--radius, 8px) !important;
        overflow: hidden !important;
    }

    .btn-container button.btn-secondary::before,
    .btn-container button.btn-step-prev::before {
        content: '\2190';
        font-size: 20px;
    }
}
