/* ============================================
   DiagErgo Express — Stylesheet
   Charte DuoGames : #1B2A4A, #2E75B6, #E8833A
   ============================================ */

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

:root {
    --navy: #1B2A4A;
    --blue: #2E75B6;
    --orange: #E8833A;
    --green: #27ae60;
    --red: #c0392b;
    --light-gray: #f5f7fa;
    --gray: #6b7280;
    --dark-gray: #374151;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
    --shadow-lg: 0 4px 16px rgba(27, 42, 74, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--navy);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header --- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid rgba(27, 42, 74, 0.1);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
}

.nav-badge {
    background: var(--light-gray);
    color: var(--blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.btn-primary:hover {
    background: #d47530;
    border-color: #d47530;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

.btn-secondary:hover {
    background: #2566a0;
    border-color: #2566a0;
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: rgba(27, 42, 74, 0.2);
}

.btn-outline:hover {
    border-color: var(--navy);
    background: var(--light-gray);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-arrow {
    font-size: 1.2em;
    transition: transform var(--transition);
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* --- Hero Section --- */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
}

.hero h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--navy);
}

.highlight {
    color: var(--blue);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
}

/* --- Features --- */
.features {
    padding: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--white);
    border: 1px solid rgba(27, 42, 74, 0.08);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--gray);
}

/* --- How it works --- */
.how-it-works {
    padding: 3rem 0;
    background: var(--light-gray);
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--navy);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.step p {
    font-size: 0.9rem;
    color: var(--gray);
}

/* --- CTA Section --- */
.cta-section {
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--navy);
}

/* --- Questionnaire --- */
.questionnaire-container {
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

.progress-wrapper {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(27, 42, 74, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

/* Sections */
.form-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Questions */
.question-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(27, 42, 74, 0.06);
}

.question-block:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--navy);
}

.question-number {
    color: var(--blue);
    margin-right: 0.25rem;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(27, 42, 74, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.answer-option:hover {
    border-color: var(--blue);
    background: rgba(46, 117, 182, 0.04);
}

.answer-option input[type="radio"] {
    margin-top: 0.2rem;
    accent-color: var(--blue);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.answer-option input[type="radio"]:checked + .answer-label {
    color: var(--blue);
    font-weight: 500;
}

.answer-option:has(input:checked) {
    border-color: var(--blue);
    background: rgba(46, 117, 182, 0.06);
}

.answer-label {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--dark-gray);
}

/* Gate question */
.gate-question {
    text-align: center;
    padding: 2rem 1rem;
}

.gate-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--navy);
}

.gate-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Email step */
.email-input-wrapper {
    max-width: 480px;
    margin: 0 auto;
}

.email-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.email-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(27, 42, 74, 0.15);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--navy);
    transition: border-color var(--transition);
}

.email-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.15);
}

.email-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Form navigation */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(27, 42, 74, 0.08);
}

/* --- Results Page --- */
.results-container {
    padding: 2rem 0 4rem;
}

.score-hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--light-gray);
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
}

.score-value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.score-value.green { color: var(--green); }
.score-value.orange { color: var(--orange); }
.score-value.red { color: var(--red); }

.score-label {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.score-message {
    font-size: 1.15rem;
    color: var(--navy);
    font-weight: 600;
    max-width: 500px;
    margin: 0 auto;
}

/* Radar chart */
.chart-wrapper {
    max-width: 500px;
    margin: 2rem auto;
}

/* Section scores */
.section-scores {
    margin-bottom: 2.5rem;
}

.section-scores h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.section-score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.section-score-name {
    flex: 0 0 180px;
    font-weight: 500;
    font-size: 0.9rem;
}

.section-score-bar {
    flex: 1;
    height: 12px;
    background: rgba(27, 42, 74, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.section-score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.section-score-fill.green { background: var(--green); }
.section-score-fill.orange { background: var(--orange); }
.section-score-fill.red { background: var(--red); }

.section-score-value {
    flex: 0 0 50px;
    text-align: right;
    font-weight: 700;
    font-size: 0.95rem;
}

.section-score-value.green { color: var(--green); }
.section-score-value.orange { color: var(--orange); }
.section-score-value.red { color: var(--red); }

/* Section summaries */
.section-summaries {
    margin-bottom: 2.5rem;
}

.summary-card {
    padding: 1rem 1.25rem;
    border-left: 4px solid;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 0.75rem;
    background: var(--light-gray);
}

.summary-card.green { border-color: var(--green); }
.summary-card.orange { border-color: var(--orange); }
.summary-card.red { border-color: var(--red); }

.summary-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--navy);
}

.summary-text {
    font-size: 0.9rem;
    color: var(--gray);
}

/* CTA box */
.cta-box {
    background: linear-gradient(135deg, var(--navy) 0%, #2a3f6b 100%);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--white);
}

.cta-box h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.cta-box p {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-price {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.cta-features li::before {
    content: "\2713 ";
    color: var(--green);
    font-weight: 700;
}

.cta-badge {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.cta-email-wrapper {
    max-width: 400px;
    margin: 0 auto 1.5rem;
    text-align: left;
}

.cta-email-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.cta-email-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: border-color 0.2s;
}

.cta-email-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.cta-email-input:focus {
    outline: none;
    border-color: var(--orange);
    background: rgba(255,255,255,0.15);
}

.cta-email-note {
    font-size: 0.75rem !important;
    opacity: 0.6 !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0 !important;
}

/* --- Success Page --- */
.success-container {
    padding: 4rem 0;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(39, 174, 96, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--green);
}

.success-container h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.success-container p {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

/* --- Footer --- */
.site-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    background: var(--light-gray);
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
}

.footer-links {
    margin-top: 0.25rem;
}

.footer-links a {
    color: var(--blue);
}

/* --- Loading spinner --- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .section-score-name {
        flex: 0 0 120px;
        font-size: 0.8rem;
    }

    .gate-buttons {
        flex-direction: column;
        align-items: center;
    }

    .form-nav {
        gap: 0.5rem;
    }

    .cta-box {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .score-value {
        font-size: 3rem;
    }

    .section-score-row {
        flex-wrap: wrap;
    }

    .section-score-name {
        flex: 1 1 100%;
    }

    .section-score-bar {
        flex: 1;
    }
}
