/* ===========================================
   Carburants Ardennes - Styles
   Design moderne avec mode jour/nuit
   =========================================== */

/* === THEME VARIABLES === */
:root {
    /* Primary palette — Vert forêt (logo) */
    --primary: #1a4a1a;
    --primary-dark: #0f2d0f;
    --primary-light: #dcfce7;
    --primary-rgb: 26, 74, 26;

    /* Semantic colors */
    --secondary: #c8960a;
    --danger: #dc2626;
    --warning: #f59e0b;

    /* Fuel accent colors */
    --fuel-gazole: #ca8a04;
    --fuel-sp95:   #16a34a;
    --fuel-sp98:   #14532d;
    --fuel-e85:    #2563eb;
    --fuel-gplc:   #172554;

    /* Surfaces */
    --bg: #f4f9f4;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;

    /* Text */
    --text: #1a2e1a;
    --text-secondary: #4a6a4a;
    --text-muted: #86a086;

    /* Borders */
    --border: #d4e8d4;
    --border-hover: #b8d4b8;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.03);

    /* Layout */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;

    /* Header/Footer */
    --header-bg: rgba(255,255,255,0.95);
    --header-border: #c8960a;
    --footer-bg: #0f2d0f;
    --footer-text: #a3d4a3;
    --footer-heading: #f0fdf4;
    --footer-link: #6abf6a;
    --footer-border: #1a4a1a;

    /* Table */
    --table-hover: #f0fdf0;
    --table-stripe: #f7fef7;

    color-scheme: light;
}

/* === DARK MODE === */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #1e3a5f;
    --primary-rgb: 96, 165, 250;

    --secondary: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;

    --fuel-gazole: #fbbf24;
    --fuel-sp95:   #4ade80;
    --fuel-sp98:   #86efac;
    --fuel-e85:    #60a5fa;
    --fuel-gplc:   #93c5fd;

    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-elevated: #334155;

    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border: #334155;
    --border-hover: #475569;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);

    --header-bg: rgba(30,41,59,0.9);
    --header-border: #334155;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --footer-heading: #e2e8f0;
    --footer-link: #64748b;
    --footer-border: #1e293b;

    --table-hover: #1e3a5f;
    --table-stripe: #1a2536;

    color-scheme: dark;
}

/* === TRANSITIONS for theme switch === */
body, .site-header, .site-footer, .stat-card, .table-section,
.seo-text, .price-card, .station-header, .map-section,
.cheapest-item, .admin-card, .filters-bar select,
.leaflet-popup-content-wrapper {
    transition: background-color 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease;
}

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

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }

h1, h2, h3 { letter-spacing: -0.02em; color: var(--text); }

/* Focus & Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Loading spinner */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}
.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }

/* === HEADER === */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: clamp(64px, 14vw, 130px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo:hover .logo-img { transform: scale(1.07); }
.logo-icon { font-size: 1.4rem; }
.logo-img { height: clamp(44px, 12vw, 150px); width: auto; max-width: none; display: block; transition: transform 0.2s ease; }

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

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.80rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text);
    transition: background var(--transition), border-color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.theme-toggle:hover {
    background: var(--bg);
    border-color: var(--border-hover);
}

/* === STATS BANNER (Cheapest prices) === */
.stats-summary {
    text-align: center;
    padding: 16px 0 4px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0 12px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: var(--text);
    display: block;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: var(--text);
}

.stat-card--gazole { border-top-color: var(--fuel-gazole); }
.stat-card--sp95   { border-top-color: var(--fuel-sp95); }
.stat-card--sp98   { border-top-color: var(--fuel-sp98); }
.stat-card--e85    { border-top-color: var(--fuel-e85); }
.stat-card--gplc   { border-top-color: var(--fuel-gplc); }

.stat-card--gazole .stat-value { color: var(--fuel-gazole); }
.stat-card--sp95 .stat-value   { color: var(--fuel-sp95); }
.stat-card--sp98 .stat-value   { color: var(--fuel-sp98); }
.stat-card--e85 .stat-value    { color: var(--fuel-e85); }
.stat-card--gplc .stat-value   { color: var(--fuel-gplc); }

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-station {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

/* === MAP === */
.map-section { margin: 28px 0; }

.map-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.map-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

#map {
    height: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 1;
    border: 1px solid var(--border);
    overflow: hidden;
}

.leaflet-popup-content { min-width: 220px; }
.leaflet-popup-content h3 { font-size: 1rem; margin-bottom: 6px; color: var(--primary); }
.leaflet-popup-content .popup-brand { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.leaflet-popup-content .popup-prices { list-style: none; padding: 0; }
.leaflet-popup-content .popup-prices li {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.leaflet-popup-content .popup-prices li:last-child { border-bottom: none; }
.leaflet-popup-content .popup-prices .price-value { font-weight: 600; }
.popup-update { font-size: 0.75rem; color: var(--text-secondary); margin-top: 6px; }
.popup-link { display: inline-block; margin-top: 8px; font-size: 0.85rem; }

/* Leaflet dark mode */
[data-theme="dark"] .leaflet-control-zoom a {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
    background: var(--bg-card);
    color: var(--text);
}
[data-theme="dark"] .leaflet-popup-content h3 { color: var(--primary); }
[data-theme="dark"] .leaflet-popup-close-button { color: var(--text-secondary) !important; }

/* === TABLE === */
.table-section {
    margin: 32px 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.table-section h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters-bar select, .filters-bar input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
}
.filters-bar select:focus, .filters-bar input:focus {
    border-color: var(--primary);
}

table.dataTable { width: 100% !important; }

table.dataTable thead th {
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--border);
}

table.dataTable tbody td {
    font-size: 0.9rem;
    padding: 10px 8px;
    vertical-align: middle;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

table.dataTable tbody tr:hover { background: var(--table-hover); }

.price-cell { font-weight: 600; text-align: center; white-space: nowrap; }
.price-cell.best { color: var(--secondary); font-weight: 700; }
.price-cell.na { color: var(--text-muted); }
/* En-têtes colonnes carburant */
td.td-gazole { color: var(--fuel-gazole) !important; background: rgba(202,138,4,0.07); }
td.td-sp95   { color: var(--fuel-sp95)   !important; background: rgba(22,163,74,0.07); }
td.td-sp98   { color: var(--fuel-sp98)   !important; background: rgba(20,83,45,0.07); }
td.td-e85    { color: var(--fuel-e85)    !important; background: rgba(37,99,235,0.07); }
td.td-gplc   { color: var(--fuel-gplc)   !important; background: rgba(23,37,84,0.07); }
#stationsTable thead th.th-gazole { color: var(--fuel-gazole) !important; background: rgba(202,138,4,0.18) !important; font-weight: 700; }
#stationsTable thead th.th-sp95   { color: var(--fuel-sp95)   !important; background: rgba(22,163,74,0.18)  !important; font-weight: 700; }
#stationsTable thead th.th-sp98   { color: var(--fuel-sp98)   !important; background: rgba(20,83,45,0.18)   !important; font-weight: 700; }
#stationsTable thead th.th-e85    { color: var(--fuel-e85)    !important; background: rgba(37,99,235,0.18)  !important; font-weight: 700; }
#stationsTable thead th.th-gplc   { color: var(--fuel-gplc)   !important; background: rgba(23,37,84,0.18)   !important; font-weight: 700; }

.price-inline { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rupture-tag { font-size: 0.85em; line-height: 1; cursor: help; flex-shrink: 0; }

/* DataTables dark mode overrides */
[data-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .dataTables_wrapper .dataTables_length label,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter label {
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-elevated) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* === AD SLOTS === */
.ad-slot {
    margin: 24px 0;
    text-align: center;
    min-height: 90px;
}

/* === FUEL PAGES === */
.fuel-page h1 { font-size: 1.75rem; margin-bottom: 8px; }
.fuel-page .fuel-description { color: var(--text-secondary); margin-bottom: 24px; }

.cheapest-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.cheapest-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    border: none;
    cursor: pointer;
}
.cheapest-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.cheapest-item:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

.cheapest-rank {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.cheapest-rank.gold { background: #f59e0b; }
.cheapest-rank.silver { background: #94a3b8; }
.cheapest-rank.bronze { background: #a1887f; }

.cheapest-info { flex: 1; }
.cheapest-info .station-name { font-weight: 600; color: var(--text); }
.cheapest-info .station-city { font-size: 0.85rem; color: var(--text-secondary); }

.cheapest-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.fuel-sections { display: grid; gap: 32px; }
.fuel-section h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

/* === STATION DETAIL === */
.station-detail { margin: 24px 0; }

.station-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.station-header h1 { font-size: 1.5rem; margin-bottom: 4px; }
.station-header .station-address { color: var(--text-secondary); }

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.price-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    border-top: 3px solid var(--border);
}
.price-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.price-card .fuel-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.price-card .fuel-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

.price-card .fuel-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

#stationMap {
    height: 300px;
    border-radius: var(--radius);
    margin: 24px 0;
    border: 1px solid var(--border);
    overflow: hidden;
}

/* === CITY PAGES === */
.city-page h1 { font-size: 1.75rem; margin-bottom: 16px; }

/* === BREADCRUMB === */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 4px; }

/* === SEO TEXT === */
.seo-text {
    margin: 32px 0;
    padding: 28px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}
.seo-text h2 { color: var(--text); font-size: 1.2rem; margin-bottom: 12px; }

/* === CHEAPEST MULTI-STATIONS === */
.stat-station--multi {
    border-top: 1px solid var(--border);
    padding-top: 6px;
    margin-top: 6px;
}
.stat-station--multi:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}
.stat-station--multi a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}
.stat-station--multi a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* === BRENT WIDGET === */
.brent-section {
    margin: 32px 0;
    padding: 28px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 4px solid #f59e0b;
}
.brent-header {
    margin-bottom: 20px;
}
.brent-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px 0;
}
.brent-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}
.tradingview-widget-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: 100%;
}
.tradingview-widget-container__widget {
    height: 100% !important;
    width: 100% !important;
}

/* === FOOTER === */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 { color: var(--footer-heading); margin-bottom: 14px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: var(--footer-link); font-size: 0.9rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--footer-heading); text-decoration: none; }
.footer-source { margin-top: 12px; font-size: 0.85rem; }

.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--footer-link);
}

/* === 404 === */
.page-404 {
    text-align: center;
    padding: 80px 0;
}
.page-404 h1 { font-size: 4rem; color: var(--primary); }
.page-404 p { font-size: 1.2rem; color: var(--text-secondary); margin: 16px 0; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-bar { height: 64px; }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    #map { height: 350px; }

    .stats-banner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card { padding: 18px 16px; }
    .stat-value { font-size: 1.6rem; }

    .filters-bar { flex-direction: column; }

    .table-section { padding: 14px; }
    .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    #stationsTable { min-width: 600px; }

    .cheapest-item { flex-direction: column; text-align: center; }

    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .prices-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; }
}

/* === FRESHNESS BADGE === */
.freshness { font-size: 0.7rem; vertical-align: middle; margin-left: 2px; }

.freshness-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* === ADMIN MESSAGE CARD === */
.admin-message-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--header-border);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}
.admin-message-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.admin-message-body strong { display: block; margin-bottom: 4px; color: var(--text); }
.admin-message-body p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.admin-message-body a { color: var(--secondary); }
.admin-message-body a:hover { text-decoration: underline; }

/* === FRESHNESS STATS === */
.freshness-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 12px 0 20px;
}
.freshness-stats span { white-space: nowrap; }
.freshness-stats strong { color: var(--text); }

/* === VISIT STATS BANNER === */
.visit-stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0 12px;
}

.visit-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid #667eea;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: var(--text);
    display: block;
}

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

.visit-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.visit-card-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #667eea;
}

[data-theme="dark"] .visit-card-value {
    color: #a78bfa;
}

@media (max-width: 720px) {
    .visit-stats-banner {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .visit-card {
        padding: 18px 16px;
    }
}

/* === ALERTS === */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
[data-theme="dark"] .alert-success { background: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .alert-danger  { background: #450a0a; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .alert-info    { background: #172554; color: #93c5fd; border-color: #1e40af; }

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fef2f2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .badge-success { background: #052e16; color: #86efac; }
[data-theme="dark"] .badge-danger  { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .badge-warning { background: #451a03; color: #fcd34d; }

/* === REPORT SECTION === */
.report-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin: 24px 0;
}
.report-section h2 { font-size: 1.2rem; margin-bottom: 8px; }
.report-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }

.report-form .report-fields {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.report-form select,
.report-form input[type="number"] {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    min-width: 160px;
}
.report-form select:focus,
.report-form input:focus {
    border-color: var(--primary);
    outline: none;
}

.recent-reports { margin-top: 20px; }
.recent-reports h3 { font-size: 1rem; margin-bottom: 10px; color: var(--text-secondary); }
.recent-reports ul { list-style: none; }
.recent-reports li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    flex-wrap: wrap;
}
.recent-reports li:last-child { border-bottom: none; }
.report-fuel { font-weight: 600; min-width: 60px; }
.report-price { font-weight: 700; color: var(--primary); min-width: 80px; }
.report-date { color: var(--text-secondary); font-size: 0.8rem; }

/* === MARQUEURS CARTE === */
.map-pin-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.map-pin { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid rgba(0,0,0,0.25); flex-shrink: 0; }
.map-pin--green  { background: #16a34a; }
.map-pin--orange { background: #f97316; }
.map-pin--red    { background: #dc2626; }
.map-pin-outage  { display: flex; align-items: center; gap: 3px; font-size: 0.7rem; background: #fef08a; border: 1px solid #ca8a04; border-radius: 4px; padding: 1px 4px; white-space: nowrap; color: #78350f; font-weight: 600; line-height: 1.4; }
.map-pin-outage span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.popup-outage { color: #d97706; font-size: 0.85rem; font-weight: 600; margin: 4px 0; }

/* === RUPTURES === */
.outages-section { margin: 20px 0; }
.outages-section h3 { font-size: 1rem; margin-bottom: 10px; color: var(--text-secondary); }
.outages-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.outage-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; flex-wrap: wrap; }
.outage-definitive { background: rgba(220,38,38,0.1); border-left: 3px solid #dc2626; }
.outage-temporaire { background: rgba(234,179,8,0.1); border-left: 3px solid #eab308; }
.outage-fuel { font-weight: 700; min-width: 50px; }
.outage-badge { font-weight: 600; }
.outage-date { color: var(--text-secondary); font-size: 0.82rem; margin-left: auto; }

/* === ADMIN EXTRAS === */
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-success { background: #16a34a; color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
