/* ============================================
   SCÉNIC 1.9 dCi 2001 - Fiche Technique
   Design: Technical / Professional / Light
   ============================================ */

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

:root {
    --bg: #f5f5f7;
    --bg-alt: #ffffff;
    --border: #e2e2e6;
    --text: #1a1a1e;
    --text-sec: #555560;
    --text-muted: #8a8a95;
    --accent: #2563eb;
    --accent-bg: rgba(37, 99, 235, 0.06);
    --accent-border: rgba(37, 99, 235, 0.2);
    --green: #16a34a;
    --green-bg: rgba(22, 163, 74, 0.06);
    --orange: #d97706;
    --orange-bg: rgba(217, 119, 6, 0.06);
    --red: #dc2626;
    --red-bg: rgba(220, 38, 38, 0.06);
    --purple: #7c3aed;
    --purple-bg: rgba(124, 58, 237, 0.06);
    --cyan: #0891b2;
    --cyan-bg: rgba(8, 145, 178, 0.06);
    --radius: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 1px 12px rgba(0,0,0,0.06);
    --transition: 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* --- NAV --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.navbar-brand:hover { opacity: 0.8; }

.navbar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius);
    color: var(--text-sec);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-bg);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
}

/* --- LAYOUT --- */
.page {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px;
    animation: fadeIn 0.3s ease;
}

.page.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- HERO --- */
.hero {
    display: flex;
    align-items: stretch;
    gap: 32px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent-bg);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid var(--accent-border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: fit-content;
}

.hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 8px;
}

.hero h1 .model {
    display: block;
    font-size: 0.55em;
    font-weight: 600;
    color: var(--text-sec);
    letter-spacing: -0.01em;
    margin-top: 4px;
}

.hero-sub {
    font-size: 15px;
    color: var(--text-sec);
    margin-bottom: 16px;
}

.hero-year {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-image {
    flex: 0 0 560px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    box-shadow: var(--shadow);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- STATS RAPIDES --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.blue::before { background: var(--accent); }
.stat-card.green::before { background: var(--green); }
.stat-card.orange::before { background: var(--orange); }
.stat-card.red::before { background: var(--red); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.cyan::before { background: var(--cyan); }

.stat-card.blue:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.stat-card.green:hover {
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.2);
    transform: translateY(-2px);
}

.stat-card.orange:hover {
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.2);
    transform: translateY(-2px);
}

.stat-card.red:hover {
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
    transform: translateY(-2px);
}

.stat-card.purple:hover {
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
    transform: translateY(-2px);
}

.stat-card.cyan:hover {
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.2);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.stat-card.blue .stat-value { color: var(--accent); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.orange .stat-value { color: var(--orange); }
.stat-card.red .stat-value { color: var(--red); }
.stat-card.purple .stat-value { color: var(--purple); }
.stat-card.cyan .stat-value { color: var(--cyan); }

.stat-unit {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* --- SECTION TITLES --- */
.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- SPECS GRID (aperçu) --- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.spec-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

.spec-card.blue::before { background: var(--accent); }
.spec-card.green::before { background: var(--green); }
.spec-card.orange::before { background: var(--orange); }

.spec-card.blue:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
    border-color: var(--accent-border);
}

.spec-card.green:hover {
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.15);
    transform: translateY(-2px);
    border-color: rgba(22, 163, 74, 0.2);
}

.spec-card.orange:hover {
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.15);
    transform: translateY(-2px);
    border-color: rgba(217, 119, 6, 0.2);
}

.spec-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.spec-icon.blue { background: var(--accent-bg); border: 1px solid var(--accent-border); }
.spec-icon.green { background: var(--green-bg); border: 1px solid rgba(22,163,74,0.2); }
.spec-icon.orange { background: var(--orange-bg); border: 1px solid rgba(217,119,6,0.2); }

.spec-info {
    flex: 1;
    min-width: 0;
}

.spec-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 1px;
}

.spec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- SPECS PANELS (fiche technique) --- */
.specs-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.specs-panel .panel {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    background: var(--bg);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row:hover {
    background: var(--accent-bg);
}

.spec-row .label {
    font-weight: 600;
    color: var(--text-sec);
    font-size: 12px;
    white-space: nowrap;
}

.spec-row .value {
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
    text-align: right;
}

/* --- ANECDOTES --- */
.anecdotes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anecdote-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.anecdote-card:hover {
    box-shadow: var(--shadow);
}

.anecdote-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.anecdote-emoji { font-size: 20px; }

.anecdote-meta { flex: 1; }

.anecdote-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1px;
}

.anecdote-date {
    font-size: 12px;
    color: var(--text-muted);
}

.anecdote-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-sec);
}

/* --- GALLERY --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-sec);
}

/* --- FOOTER --- */
.site-footer {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        gap: 24px;
    }
    .hero-image {
        flex: none;
        width: 100%;
        max-width: 500px;
    }
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .specs-panel {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-alt);
        padding: 8px;
        border-bottom: 1px solid var(--border);
    }
    .page { padding: 20px 16px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .specs-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
}
