/* ============================================================
   DESIGN SYSTEM — ComparateurCuisine.fr
   ============================================================ */

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8e;
    --primary-dark: #0f2540;
    --accent: #e8913a;
    --accent-hover: #d17e2e;
    --bg: #f7f8fc;
    --card: #ffffff;
    --text: #1a202c;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ---- NAVIGATION ---- */
nav {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.nav-links {
    display: flex;
    gap: 0.3rem;
    list-style: none;
}
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.nav-links a:hover { color: var(--primary); background: rgba(30,58,95,0.05); }
.nav-links a.active { color: var(--primary); background: rgba(30,58,95,0.08); font-weight: 700; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

/* ---- HERO ---- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 2rem 3.5rem;
    text-align: center;
}
.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    max-width: 750px;
    margin: 0 auto 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-outline-white { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.1); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- SECTIONS ---- */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- CARDS ---- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}
.card-lg { padding: 2.5rem; }

/* ---- TABLE COMPARATIVE ---- */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}
.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}
.compare-table thead th {
    background: var(--primary);
    color: white;
    padding: 1rem 0.8rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    position: sticky;
    top: 52px;
    z-index: 10;
    white-space: nowrap;
}
.compare-table thead th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 11;
    background: var(--primary-dark);
    min-width: 200px;
}
.compare-table thead th.highlight {
    background: var(--accent);
}
.compare-table tbody td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}
.compare-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text);
    position: sticky;
    left: 0;
    background: var(--card);
    z-index: 5;
    min-width: 200px;
}
.compare-table tbody tr:hover td {
    background: rgba(30,58,95,0.02);
}
.compare-table tbody tr:hover td:first-child {
    background: rgba(30,58,95,0.04);
}
.compare-table tbody td.highlight {
    background: rgba(232,145,58,0.06);
    font-weight: 600;
}
.compare-table tbody tr:hover td.highlight {
    background: rgba(232,145,58,0.1);
}

.compare-table .section-row td {
    background: var(--bg);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    padding: 0.6rem 0.8rem;
}
.compare-table .section-row td:first-child {
    background: var(--bg);
}

/* Indicateurs visuels dans le tableau */
.check { color: var(--success); font-weight: 700; }
.cross { color: var(--danger); }
.partial { color: var(--warning); font-weight: 600; }
.flag-fr { font-size: 0.85em; }
.flag-eu { font-size: 0.85em; }

.score-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
}
.score-pill.high { background: var(--success-light); color: #166534; }
.score-pill.mid { background: var(--warning-light); color: #92400e; }
.score-pill.low { background: var(--danger-light); color: #991b1b; }

.enseigne-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 4px;
}
.badge-qp { background: var(--accent); color: white; }
.badge-premium { background: var(--primary); color: white; }
.badge-budget { background: var(--success); color: white; }
.badge-access { background: #7c3aed; color: white; }

/* ---- FORMS ---- */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
}
.form-group label small {
    font-weight: 400;
    color: var(--text-light);
}
input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    height: 6px;
}
.range-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 0.3rem;
}
.radio-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.radio-option { flex: 1; min-width: 120px; }
.radio-option input[type="radio"] { display: none; }
.radio-option label {
    display: block;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
}
.radio-option input:checked + label {
    border-color: var(--primary);
    background: rgba(30,58,95,0.05);
    color: var(--primary);
}
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
}
.checkbox-option input { display: none; }
.checkbox-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}
.checkbox-option label::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.checkbox-option input:checked + label {
    border-color: var(--primary);
    background: rgba(30,58,95,0.05);
}
.checkbox-option input:checked + label::before {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="text"], input[type="email"], input[type="tel"], select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ---- WIZARD ---- */
.wizard-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 2rem;
}
.wizard-step-indicator {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.3s;
}
.wizard-step-indicator.active { background: var(--primary); }
.wizard-step-indicator.done { background: var(--success); }

.wizard-step { display: none; animation: fadeIn 0.4s; }
.wizard-step.active { display: block; }
.wizard-step h3 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.wizard-step > p { color: var(--text-light); margin-bottom: 1.5rem; font-size: 0.95rem; }
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}
.wizard-result { display: none; animation: fadeIn 0.5s; }
.wizard-result.visible { display: block; }

/* ---- CHECKLIST ---- */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: rgba(30,58,95,0.02); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: 6px; }
.checklist-box {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.checklist-item.checked .checklist-box {
    background: var(--success);
    border-color: var(--success);
    color: white;
}
.checklist-text { font-size: 0.95rem; }
.checklist-cat {
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg);
    padding: 1px 8px;
    border-radius: 50px;
    margin-left: auto;
    white-space: nowrap;
}

.score-gauge {
    text-align: center;
    padding: 2rem;
    background: var(--bg);
    border-radius: var(--radius);
    margin-top: 2rem;
}
.score-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.score-label {
    color: var(--text-light);
    margin: 0.5rem 0;
}
.score-bar-full {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
    margin: 1rem 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.score-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}

/* ---- FEATURES GRID ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(30,58,95,0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ---- CTA SECTION ---- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}
.cta-section h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
.cta-section p { opacity: 0.9; margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ---- RESULT CARD ---- */
.result-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}

/* ---- FOOTER ---- */
footer {
    background: var(--primary-dark);
    color: #94a3b8;
    padding: 3rem 2rem 1.5rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-col h4 {
    color: white;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}
.footer-col p {
    font-size: 0.85rem;
    line-height: 1.6;
}
.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.8rem;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .nav-links.open { display: flex; }
    .hero { padding: 3rem 1.5rem 2.5rem; }
    .hero h1 { font-size: 1.7rem; }
    .hero p { font-size: 1rem; }
    .section { padding: 3rem 1rem; }
    .section-title { font-size: 1.5rem; }
    .card-lg { padding: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .radio-group { flex-direction: column; }

    .compare-table { font-size: 0.8rem; }
    .compare-table thead th { padding: 0.6rem 0.5rem; font-size: 0.75rem; }
    .compare-table tbody td { padding: 0.5rem; }
}

html { scroll-behavior: smooth; }
