/**
 * Chiffrex Eau : feuille de style commune du réseau Chiffrex (identité visuelle kit v1), accent Eau = bleu
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Identité visuelle Chiffrex (kit v1, octobre 2026) : encre, papier, une couleur d'accent par site */
    --ink: #0F1A2B;
    --paper: #F6F4EF;
    --sand: #EFECE4;
    --rule: #C9C3B4;
    --field: #CFC9BB;

    /* Eau : bleu. Le texte bleu sur fond clair utilise --accent-text (contraste AA). */
    --accent: #2E86DE;
    --accent-text: #1D6BBF;
    --chiffrex-blue: #1E3FE0;
    --chiffrex-blue-light: #6B85FF;

    /* Couleurs des sites du réseau (bandeau) */
    --net-carburants: #F59E0B;
    --net-salaires: #0E9F6E;
    --net-delinquance: #7C3AAD;
    --net-loyers: #E2543A;
    --net-controle-technique: #0891B2;
    --net-eau: #2E86DE;
    --net-sante: #DB2777;
    --net-electrique: #65A30D;
    --net-elections: #4A5568;

    /* Teintes héritées du thème précédent (focus, ombres) */
    --h-primary: 202;
    --s-primary: 78%;
    --l-primary: 12%;

    --primary: var(--ink);
    --primary-dark: #0A1220;
    --primary-light: #2A3547;

    --h-secondary: 29;
    --secondary: var(--ink);
    --secondary-dark: #0A1220;

    --background: var(--paper);
    --background-alt: var(--sand);
    --background-light: #FFFFFF;

    --surface: #FFFFFF;
    --surface-light: #FFFFFF;

    --text: var(--ink);
    --text-muted: #4A5568;
    --text-dark: #333F52;

    --border: #E2DDD1;
    --border-light: #ECE8DD;

    --bg-secondary: var(--sand);

    /* Carburants : repères de couleur des types de carburant (graphiques, pastilles), inchangés */
    --gazole: #E7E514;
    --sp95: #004524;
    --sp98: #004926;
    --e10: #56BA48;
    --e85: #28C0D5;
    --gplc: #196B91;

    /* Ombres : à plat, la bordure fait le travail */
    --shadow-sm: 0 1px 2px rgba(15, 26, 43, 0.05);
    --shadow: 0 2px 6px rgba(15, 26, 43, 0.06);
    --shadow-lg: 0 6px 16px rgba(15, 26, 43, 0.08);
    --shadow-xl: 0 10px 24px rgba(15, 26, 43, 0.1);
    --shadow-primary: 0 2px 6px rgba(15, 26, 43, 0.18);

    --gradient-primary: var(--primary);
    --gradient-accent: var(--secondary);
    --gradient-mesh: none;
    --gradient-glass: var(--surface);

    /* Polices : Host Grotesk (titres, chiffres), Inter (texte), JetBrains Mono (surtitres, sources, métadonnées) */
    --font-ui: 'Inter', system-ui, 'Segoe UI', sans-serif;
    --font-display: 'Host Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    --glass-blur: none;
    --glass-border: 1px solid var(--border);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2.25rem;
    --spacing-2xl: 4rem;

    /* Rayons : 10-12 px (boutons, champs), 16-20 px (cartes), 24 px (grands blocs) */
    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    background-image: var(--gradient-mesh);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.035em;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* ========================================
   Animations & Transitions
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(14, 165, 233, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) forwards;
}

.animate-fade-up {
    animation: fadeUp var(--transition-slow) forwards;
}

/* ========================================
   Container
   ======================================== */
.container {
    width: 100%;
    max-width: 1248px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    animation: fadeIn var(--transition-slow) ease-out;
}

/* ========================================
   Bandeau réseau, bandeau d'annonce, en-tête
   ======================================== */
.cx-network {
    background: var(--ink);
}
.cx-network-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 22px;
    row-gap: 2px;
    animation: none;
}
.cx-network-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 500;
    color: #C9D0DC;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.cx-network-link:hover {
    color: #fff;
}
.cx-network-link[aria-current="page"] {
    color: #fff;
    font-weight: 700;
    border-bottom-color: #fff;
}
.cx-network-home {
    margin-right: 6px;
}
.cx-network-pill {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
    flex-shrink: 0;
}

/* Bandeau d'annonce (soutien ou application mobile) */
.cx-promo {
    background: var(--sand);
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.cx-promo-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: center;
    animation: none;
}
.cx-promo a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 3px 10px;
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    text-decoration: none;
}
.cx-promo a:hover {
    background: var(--ink);
    color: #fff;
}

/* En-tête */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

body.menu-open .navbar {
    z-index: 1000;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 14px;
    padding-bottom: 14px;
    overflow: visible;
    animation: none;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.navbar-brand img {
    display: block;
    height: 24px;
    width: auto;
}

.navbar-center {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px 18px;
    margin-left: auto;
    min-width: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--ink);
    border-bottom-color: var(--accent);
}
.nav-link[aria-current="page"] {
    font-weight: 700;
    border-bottom-color: var(--ink);
}
.nav-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .06em;
    color: var(--ink);
}
.nav-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D92D20;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    overflow: visible;
}

.nav-auth {
    position: relative;
    flex-shrink: 0;
}

.nav-search-container {
    position: relative;
    width: 124px;
    z-index: 10;
    flex-shrink: 1;
    min-width: 100px;
}
.nav-search-container input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    background: #fff;
    border: 1.5px solid var(--field);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.4;
}
.nav-search-container input::placeholder {
    color: #6B7280;
}
.nav-search-container input:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(30, 63, 224, .25);
    outline: none;
}
.nav-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

/* Liste de suggestions de l'en-tête */
.nav-search-container .autocomplete-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 320px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}
.nav-search-container .autocomplete-results.active {
    display: block;
}

.navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
}
.hamburger-svg line {
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}
.navbar-toggle.active .top-line {
    transform: translateY(6px) rotate(45deg);
}
.navbar-toggle.active .mid-line {
    opacity: 0;
}
.navbar-toggle.active .bot-line {
    transform: translateY(-6px) rotate(-45deg);
}

/* Boutons de l'en-tête : Chiffrex+ (contour) et Connexion (plein) */
.nav-btn-auth,
.nav-btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--radius);
    border: 1.5px solid var(--ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.nav-btn-auth {
    background: var(--ink);
    color: #fff !important;
}
.nav-btn-auth:hover {
    background: #1d2a40;
    color: #fff;
}
.nav-btn-premium {
    background: transparent;
    color: var(--ink) !important;
}
.nav-btn-premium:hover {
    background: var(--ink);
    color: #fff !important;
}

/* ========================================
   Menu mobile
   ======================================== */
/* En dessous de 1280 px, le menu complet (6 liens + recherche + Chiffrex+ + compte) ne tient plus
   sur une ligne : le burger prend le relais. */
@media (max-width: 1280px) {
    .navbar-center {
        display: none !important;
    }

    .nav-search-container,
    .nav-auth,
    .nav-btn-premium {
        display: none !important;
    }

    .navbar-toggle {
        display: flex !important;
    }
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 1100;
    padding: 0;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 1281px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    min-height: 100%;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xl);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: 14px var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-brand {
    flex: 1;
    min-width: 0;
}

.mobile-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1.5px solid var(--ink);
    background: transparent;
    color: var(--ink);
    flex-shrink: 0;
    cursor: pointer;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-auth {
    margin-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .mobile-menu-header {
        padding: 12px var(--spacing-md);
    }

    .mobile-menu-inner {
        padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
    }

    .mobile-link {
        font-size: 1.25rem;
    }

    .mobile-menu-close {
        width: 40px;
        height: 40px;
    }
}

.nav-pill-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--ink);
    color: #fff;
}

/* ========================================
   Badge Chiffrex+ (unifié, tout le site)
   ======================================== */
.badge-plus {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--text);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    line-height: 1.4;
}

.badge-plus-sm {
    font-size: 0.6rem;
    padding: 1px 7px;
}

/* Petit cadenas sobre pour signaler le contenu Chiffrex+ dans un espace
   restreint (ex: boutons de filtre), sans répéter le badge complet. */
.premium-lock {
    display: inline-flex;
    vertical-align: -2px;
    width: 12px;
    height: 12px;
    margin-left: 3px;
    opacity: 0.6;
}

/* User Badge Styles (Shared) */
.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    background: var(--background-alt);
    border-radius: var(--radius-full);
    text-decoration: none;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    max-width: 200px;
    white-space: nowrap;
}

.user-badge:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.city-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.city-chip:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.city-chip .city-icon {
    font-size: 1.2rem;
}

/* ========================================
   Maillage SEO (Recherche par localisation)
   ======================================== */
.mesh-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.mesh-subtitle {
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    font-size: 0.95rem;
}

.mesh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.mesh-col-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.mesh-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mesh-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.mesh-chip:hover {
    background: var(--text);
    border-color: var(--text);
    color: white;
}

.mesh-chip-cp {
    color: var(--text-muted);
    font-weight: 500;
}

.mesh-chip:hover .mesh-chip-cp {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   SEO Content Blocks
   ======================================== */
.seo-block {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.seo-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.seo-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

.seo-text {
    margin-bottom: var(--spacing-sm);
    line-height: 1.65;
    color: var(--text-dark);
    max-width: 760px;
}

.seo-tags {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.seo-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.seo-feature {
    padding: var(--spacing-md);
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.seo-feature h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-feature p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.seo-feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-color, var(--text-dark));
    flex-shrink: 0;
}

/* Empty State */
.favorites-empty-state {
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-muted);
}

.favorites-empty-state p {
    margin-bottom: 4px;
}

.favorites-empty-state .text-sm {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Add a fade to horizontal scroll */
.favorites-scroll {
    position: relative;
}

.favorites-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-primary));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.user-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--radius-lg);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    background: #1d2a40;
    border-color: #1d2a40;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.btn-outline:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn-sm {
    padding: 7px 13px;
    font-size: 0.875rem;
    border-radius: var(--radius);
}

.btn-lg {
    padding: 15px 24px;
    font-size: 1.0625rem;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-xl) 0;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: left;
    background: none;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    transition: padding-bottom 0.2s ease;
}
.hero:has(.hero-search .autocomplete-results.active) {
    /* Réserve la place de la liste de suggestions pour ne pas recouvrir le bloc suivant */
    padding-bottom: calc(40px + clamp(140px, 26vh, 240px));
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 40px;
    align-items: start;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Surtitre : carré de couleur + mono en capitales */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.eyebrow::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--accent);
    flex-shrink: 0;
}

/* Grand titre : se termine par un point de la couleur du site */
.hero h1 {
    font-size: clamp(2.75rem, 6.4vw, 5.75rem);
    font-weight: 800;
    line-height: .97;
    letter-spacing: -0.04em;
    color: var(--text);
    text-wrap: balance;
    margin: 0;
}
.dot {
    color: var(--accent);
}
.hero-content > p {
    font-size: clamp(1.0625rem, 2.4vw, 1.1875rem);
    color: var(--text-dark);
    max-width: 560px;
    margin: 0;
    line-height: 1.5;
}
.hero-search {
    max-width: 640px;
    margin: 0;
}
.hero-search .search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (min-width: 640px) {
    .hero-search .search-form {
        flex-direction: row;
    }
}
.hero-search .search-input-wrapper {
    position: relative;
    flex: 1;
    z-index: 5;
}
.hero-search input {
    width: 100%;
    padding: 15px 18px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1.0625rem;
    color: var(--text);
    box-shadow: none;
}
.hero-search input::placeholder {
    color: #6B7280;
}
.hero-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 63, 224, .25);
}
.hero-search .btn {
    padding: 15px 24px;
    font-size: 1.0625rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-actions .btn {
    padding: 12px 18px;
    font-size: 1rem;
}

/* Liste de suggestions du hero */
.hero-search .autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: min(300px, 45vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: none;
    z-index: 30;
}
.hero-search .autocomplete-results.active {
    display: block;
}
.autocomplete-item {
    padding: 1rem var(--spacing-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
    text-align: left;
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--background-alt);
}
.autocomplete-item .city-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}
.autocomplete-item .city-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Carte « Prix moyens nationaux » du hero */
.price-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
}
.price-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.price-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.price-panel .price-panel-note {
    margin-top: 14px;
    max-width: none;
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* Surtitres et titres de section */
.latest-blog-spotlight {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fff;
}

.latest-blog-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.latest-blog-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-dark);
    font-weight: 700;
}

.latest-blog-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.latest-blog-title {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    margin-bottom: var(--spacing-sm);
}

.latest-blog-title a {
    color: var(--text);
}

.latest-blog-summary {
    color: var(--text-muted);
    max-width: 820px;
    margin-bottom: var(--spacing-md);
}

.latest-blog-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ========================================
   Stats Grid (prix moyens nationaux)
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 0;
}
.stat-card {
    background: #FBFAF7;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 14px 14px 12px;
    text-align: left;
    position: relative;
    min-width: 0;
}
.stat-card .fuel-name {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.stat-card .fuel-name::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.stat-card .fuel-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.stat-card .fuel-price {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.4vw, 1.75rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1;
    white-space: nowrap;
}
.stat-card .fuel-unit {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.stat-card.gazole .fuel-name::before { background: var(--gazole); box-shadow: 0 0 0 1px rgba(15, 26, 43, .25); }
.stat-card.sp95 .fuel-name::before { background: var(--sp95); }
.stat-card.sp98 .fuel-name::before { background: var(--sp98); }
.stat-card.e10 .fuel-name::before { background: var(--e10); }
.stat-card.e85 .fuel-name::before { background: var(--e85); }
.stat-card.gplc .fuel-name::before { background: var(--gplc); }

/* ========================================
   Fuel Trend Indicators (J-7 / J-30)
   ======================================== */
.fuel-trends {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}
.fuel-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    background: var(--sand);
    color: var(--text-dark);
    white-space: nowrap;
    cursor: default;
}
.fuel-trend.trend-up,
.fuel-trend.trend-down {
    color: var(--text-dark);
}
.trend-arrow {
    font-size: 0.65rem;
    line-height: 1;
}
.trend-pct {
    font-weight: 500;
}
.trend-label {
    margin-left: auto;
    color: var(--text-muted);
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

/* ========================================
   Station Cards
   ======================================== */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--spacing-lg);
}

.station-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: calc(var(--spacing-md) + 2px);
    transition: border-color var(--transition-fast);
    position: relative;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.station-card:hover {
    border-color: var(--text);
    box-shadow: none;
    transform: none;
}

.station-header {
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

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

.btn-favorite {
    background: white;
    border: 1px solid var(--border-light);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}

.btn-favorite:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}

.btn-favorite.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-favorite svg {
    width: 18px;
    height: 18px;
}

.btn-favorite-lg {
    width: 48px;
    height: 48px;
}

.btn-favorite-lg svg {
    width: 24px;
    height: 24px;
}

@keyframes favoritePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.btn-favorite.active svg {
    animation: favoritePop 0.3s ease-out;
    fill: currentColor;
}

.station-name {
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 4px;
}

.station-name a {
    color: inherit;
    text-decoration: none;
}

.station-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.station-location svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.station-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.price-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--background-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.price-tag:hover {
    background: white;
    border-color: var(--border);
}

.price-name {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--fuel-color, var(--text-dark));
    letter-spacing: 0.02em;
}

.price-tag-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.price-alert-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.28);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
}

.price-card-alert {
    margin-bottom: 6px;
}

.price-tag-right {
    text-align: right;
}

.price-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-display);
    line-height: 1;
}

.price-date {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
    opacity: 0.8;
}

.badge-24h {
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.65rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.no-prices {
    color: var(--text-muted);
    font-style: italic;
}

.station-distance {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.station-distance svg {
    width: 14px;
    height: 14px;
}

.station-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--spacing-sm);
}


.station-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.station-address {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.station-address svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.price-card {
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--fuel-color, var(--primary));
}

.price-card .fuel-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.price-card .fuel-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.price-card .fuel-date {
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-top: var(--spacing-xs);
}

.price-card.gazole::before {
    background: var(--gazole);
}

.price-card.sp95::before {
    background: var(--sp95);
}

.price-card.sp98::before {
    background: var(--sp98);
}

.price-card.e10::before {
    background: var(--e10);
}

.price-card.e85::before {
    background: var(--e85);
}

.price-card.gplc::before {
    background: var(--gplc);
}


/* ========================================
   Map
   ======================================== */
.map-container {
    height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-container-full {
    height: calc(100vh - 200px);
}

/* ========================================
   Services List
   ======================================== */
.services-section {
    margin-top: var(--spacing-xl);
}

.services-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ========================================
   Search Results
   ======================================== */
.search-header {
    margin-bottom: var(--spacing-xl);
}

.search-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
}

.search-meta {
    color: var(--text-muted);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   Itinerary Page
   ======================================== */
.itinerary-form {
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.itinerary-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: var(--spacing-md);
    align-items: end;
}

@media (max-width: 768px) {
    .itinerary-inputs {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.form-input::placeholder {
    color: var(--text-dark);
}

.arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.arrow-icon svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--ink);
    color: #C9D0DC;
    margin-top: var(--spacing-2xl);
    padding: 56px 0 28px;
}

.footer .container {
    animation: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(130px, 1fr));
    gap: 40px 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 360px;
}

.footer-logo {
    display: inline-flex;
}
.footer-logo img {
    display: block;
    height: 28px;
    width: auto;
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #C9D0DC;
}
.footer-tagline strong {
    color: #fff;
    font-weight: 600;
}

.footer-apps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.footer-apps a {
    display: inline-flex;
    width: 130px;
}
.footer-apps img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.footer-links h4 {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    color: #fff;
    margin-bottom: 12px;
}
.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.footer-links a {
    font-size: 0.9375rem;
    color: #C9D0DC;
    text-decoration: none;
}
.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #2A3547;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: #C9D0DC;
}
.footer-bottom p {
    margin: 0;
}
.footer-bottom a {
    color: #C9D0DC;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-bottom a:hover {
    color: #fff;
}

@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 520px) {
    .footer {
        padding-top: 40px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   User Badge
   ======================================== */
.user-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--surface);
    border-radius: var(--radius-full);
    color: var(--text);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========================================
   404 Page
   ======================================== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--spacing-md);
}

.error-message {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
}

/* ========================================
   Loading States
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-light) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   Station Detail Page
   ======================================== */
.station-detail {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.station-detail > div {
    min-width: 0;
}

@media (max-width: 1100px) {
    .station-detail {
        grid-template-columns: 1fr 300px;
        gap: var(--spacing-lg);
    }
}

@media (max-width: 1024px) {
    .station-detail {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .station-info-panel {
        position: static !important; /* Desactiver le sticky sur mobile */
    }
}

.station-info-panel {
    background: white;
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-xl);
    position: relative;
    min-width: 0;
}

.station-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    min-width: 0;
}

.station-header-main {
    min-width: 0;
    flex: 1 1 auto;
}

.station-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    max-width: 100%;
    color: var(--text);

.station-title span {
    min-width: 0;
    overflow-wrap: anywhere;
}
}

.station-address {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 640px) {
    .station-header {
        flex-direction: column;
    }

    .station-header .badge-24h {
        position: static;
        align-self: flex-start;
        margin-top: -2px;
        margin-bottom: var(--spacing-sm);
    }

    .station-info-panel {
        padding: var(--spacing-lg);
    }

    .station-title {
        font-size: 1.5rem;
    }

    .station-address {
        font-size: 0.95rem;
    }
}

.station-address svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

@media (max-width: 480px) {
    .price-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-md);
    }
}

.price-card {
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--gradient-glass);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--fuel-color, var(--primary));
    transition: height var(--transition-slow);
}

.price-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, hsla(var(--h-primary), 100%, 80%, 0.1) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: hsla(var(--h-primary), var(--s-primary), 60%, 0.3);
}

.price-card:hover::before {
    height: 6px;
}

.price-card:hover::after {
    opacity: 1;
}

.price-card.gazole {
    --fuel-color: var(--gazole);
    border-top-color: rgba(37, 99, 235, 0.2);
}

.price-card.sp95 {
    --fuel-color: var(--sp95);
    border-top-color: rgba(22, 163, 74, 0.2);
}

.price-card.sp98 {
    --fuel-color: var(--sp98);
    border-top-color: rgba(202, 138, 4, 0.2);
}

.price-card.e10 {
    --fuel-color: var(--e10);
    border-top-color: rgba(234, 88, 12, 0.2);
}

.price-card.e85 {
    --fuel-color: var(--e85);
    border-top-color: rgba(147, 51, 234, 0.2);
}

.price-card.gplc {
    --fuel-color: var(--gplc);
    border-top-color: rgba(219, 39, 119, 0.2);
}

.price-card .fuel-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
}

.price-card .fuel-price {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--font-display);
    line-height: 1.1;
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
}

.price-card .fuel-date {
    font-size: 0.75rem;
    color: var(--text-dark);
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.services-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

.services-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
}

.station-horaires-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    word-wrap: break-word;
    white-space: pre-line;
    line-height: 1.5;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.service-tag {
    background: var(--background-alt);
    color: var(--text-muted);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.chart-container {
    margin-top: var(--spacing-2xl);
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    width: 100%;
    overflow-x: hidden;
}

.chart-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Indicateur de chargement des graphiques */
.chart-wrapper.is-loading canvas { opacity: .35; transition: opacity .15s; }
.chart-wrapper.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--line, #E2DDD1);
    border-top-color: var(--ink, #0F1A2B);
    border-radius: 50%;
    animation: chart-spin .8s linear infinite;
    pointer-events: none;
}
@keyframes chart-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chart-wrapper.is-loading::after { animation-duration: 2s; } }

@media (max-width: 768px) {
    .chart-container {
        padding: var(--spacing-md);
    }
    .chart-wrapper {
        height: 300px;
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.chart-filter {
    background: white;
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition);
}

.chart-filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   Forecast Promo Block
   ======================================== */
.forecast-promo {
    margin-top: var(--spacing-lg);
    margin-bottom: calc(var(--spacing-2xl) + var(--spacing-sm));
    background: #fff;
    padding: var(--spacing-xl);
    border-radius: 20px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .forecast-promo {
        margin-top: var(--spacing-md);
        margin-bottom: var(--spacing-2xl);
        padding: var(--spacing-lg);
    }
}

/* ========================================
   Ranking Table
   ======================================== */
.ranking-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9375rem;
}

.ranking-table thead th {
    background: var(--background-alt);
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.ranking-table thead th.col-rank {
    width: 60px;
    text-align: center;
}

.ranking-table thead th.col-price {
    text-align: right;
}

.ranking-row {
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

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

.ranking-row:hover {
    background: hsla(var(--h-primary), var(--s-primary), 97%, 1);
}

.ranking-row.rank-top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08) 0%, transparent 100%);
}

.ranking-row.rank-top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.08) 0%, transparent 100%);
}

.ranking-row.rank-top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.08) 0%, transparent 100%);
}

.ranking-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    vertical-align: middle;
}

.rank-num {
    text-align: center;
    font-size: 1.1rem;
    white-space: nowrap;
    width: 60px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 6px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.rank-address a {
    color: var(--text);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.rank-address a:hover {
    color: var(--primary-light);
}

.rank-city {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.dept-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.rank-price {
    text-align: right;
    font-family: var(--font-display);
    font-size: 1rem;
    white-space: nowrap;
    color: var(--text);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: hsla(var(--h-primary), var(--s-primary), 97%, 1);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
    user-select: none;
}

@media (max-width: 640px) {
    .ranking-table .rank-city {
        display: none;
    }

    .ranking-table .rank-dept {
        display: none;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .navbar-search {
        display: none;
    }

    .navbar-nav {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content > p {
        font-size: 1.0625rem;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {

    .navbar,
    .footer,
    .mobile-menu {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .station-card,
    .price-card,
    .stat-card {
        background: white;
        border: 1px solid #ccc;
    }
}

/* ========================================
   Station Forecast Badges & Section
   ======================================== */
.fuel-forecast-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: var(--spacing-sm);
    padding: 5px 8px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    transition: transform var(--transition-fast);
}

.fuel-forecast-badge:hover {
    transform: scale(1.03);
}

.fuel-forecast-badge.up {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.fuel-forecast-badge.down {
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.fuel-forecast-badge.flat {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.fc-badge-pct {
    font-family: var(--font-display);
    font-weight: 700;
}

/* Station Forecast Section */
.station-forecast-section {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-lg);
}

.station-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.related-blog-section {
    margin-top: var(--spacing-xl);
}

.related-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
}

.related-blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.related-blog-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.related-blog-title {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.35;
}

.related-blog-title a {
    color: var(--text);
}

.related-blog-summary {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

/* ========================================
   Blog Pages
   ======================================== */
.blog-list-hero {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: linear-gradient(125deg, hsla(0, 0%, 100%, 0.94), hsla(48, 20%, 92%, 0.9));
    box-shadow: var(--shadow-sm);
}

.blog-list-kicker {
    display: inline-block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--primary-dark);
}

.blog-list-hero h1 {
    margin-bottom: var(--spacing-sm);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.06;
}

.blog-list-hero p {
    max-width: 760px;
    color: var(--text-muted);
}

.blog-featured-card {
    display: flex;
    align-items: stretch;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.blog-featured-image {
    flex: 0 0 42%;
    min-height: 220px;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-featured-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-lg);
}

.blog-featured-meta {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: var(--spacing-sm);
}

.blog-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: hsla(var(--h-primary), var(--s-primary), 45%, 0.12);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-featured-content h2 {
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.2;
}

.blog-featured-content h2 a {
    color: var(--text);
}

.blog-featured-content p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.blog-featured-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.blog-grid-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.blog-grid-image {
    aspect-ratio: 16 / 9;
    background: var(--background);
}

.blog-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-grid-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--spacing-md);
    height: 100%;
}

.blog-grid-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.blog-grid-content h3 {
    font-size: 1.1rem;
    line-height: 1.3;
}

.blog-grid-content h3 a {
    color: var(--text);
}

.blog-grid-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: auto;
}

.article-page-shell {
    max-width: 980px;
}

.blog-article-shell {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
}

.blog-article-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.blog-article-meta-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.blog-article-title {
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.08;
    margin-bottom: var(--spacing-sm);
}

.blog-article-summary {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.06rem;
}

.blog-article-cover {
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.blog-article-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.blog-article-content {
    font-size: 1.06rem;
    line-height: 1.75;
    color: var(--text-dark);
    max-width: 760px;
    margin: 0 auto;
}

.blog-article-content h2 {
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.65rem;
}

.blog-article-content h3 {
    margin-top: 1.6rem;
    margin-bottom: 0.7rem;
    color: var(--text);
    font-size: 1.25rem;
}

.blog-article-content p {
    margin-bottom: 1.2rem;
}

.blog-article-content ul,
.blog-article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.25rem;
}

.blog-article-content blockquote {
    border-left: 4px solid var(--primary);
    color: var(--text-muted);
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
}

.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    font-size: 0.92rem;
    line-height: 1.5;
    background: var(--background-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.blog-article-content table th {
    background: var(--primary);
    color: white;
    font-weight: 700;
    text-align: left;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--primary-dark);
}

.blog-article-content table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
}

.blog-article-content table tr:nth-child(even) {
    background: var(--background);
}

.blog-article-content table tr:hover {
    background: hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.05);
}

.blog-article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-article-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.blog-article-footer p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.blog-article-share {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.blog-related-section {
    margin-top: var(--spacing-xl);
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.blog-pagination a:hover {
    border-color: var(--text);
}

.blog-pagination span.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.blog-pagination span.disabled {
    color: var(--text-muted);
    opacity: 0.5;
}

@media (max-width: 640px) {
    .blog-list-hero,
    .blog-article-shell {
        padding: var(--spacing-lg);
    }

    .blog-article-meta-row {
        justify-content: center;
    }

    .blog-featured-card {
        flex-direction: column;
    }

    .blog-featured-image {
        flex: 0 0 auto;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

.station-forecast-card {
    background: white;
    border-radius: var(--radius);
    padding: 14px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.station-forecast-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.sfc-header {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 10px;
    color: var(--text);
}

.sfc-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sfc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}

.sfc-horizon {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 32px;
}

.sfc-price {
    font-weight: 700;
    font-family: var(--font-display);
    flex: 1;
}

.sfc-price.up {
    color: #dc2626;
}

.sfc-price.down {
    color: #16a34a;
}

.sfc-price.flat {
    color: #64748b;
}

.sfc-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.sfc-change.up {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.sfc-change.down {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.sfc-change.flat {
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
}

.sfc-conf {
    font-size: 0.75rem;
    cursor: help;
}

@media (max-width: 768px) {
    .station-forecast-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .station-forecast-grid {
        grid-template-columns: 1fr;
    }
}

.station-ruptures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-sm);
}

@media (max-width: 480px) {
    .station-ruptures-grid {
        grid-template-columns: 1fr;
    }
}
.ad-unit-wrapper {
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    display: block; /* Supprimé flex pour éviter l'erreur availableWidth=0 */
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

/* Masquer si AdSense ne trouve pas de pub */
.ad-unit-wrapper:has(ins[data-ad-status="unfilled"]) {
    display: none !important;
}

.ad-unit-wrapper:hover {
    box-shadow: var(--shadow-sm);
}

.ad-unit-wrapper .ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.1em;
    font-weight: 700;
    opacity: 0.6;
    user-select: none;
}

.ad-unit-wrapper .ad-content {
    width: 100%;
    min-height: 90px;
    margin: 0 auto;
}

/* Formats spécifiques pour éviter le CLS */
.ad-unit-wrapper.ad-horizontal { min-height: 120px; }
.ad-unit-wrapper.ad-rectangle { min-height: 280px; }
.ad-unit-wrapper.ad-leaderboard { min-height: 110px; }
.ad-unit-wrapper.ad-in-article { min-height: 380px; }

/* Supprimer le label pour les bannières très fines si besoin */
@media (max-width: 480px) {
    .ad-unit-wrapper {
        margin: var(--spacing-xl) 0;
        padding: var(--spacing-xs);
        border-radius: var(--radius-md);
    }
}

/* Utilitaires de marge */
.margin-v-lg { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.margin-v-xl { margin-top: var(--spacing-xl); margin-bottom: var(--spacing-xl); }
.margin-v-2xl { margin-top: var(--spacing-2xl); margin-bottom: var(--spacing-2xl); }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.removing {
    animation: toastSlideOut 0.3s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid var(--primary); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ========================================
   Favorites Section (Homepage & Dashboard)
   ======================================== */
.favorites-section {
    margin-bottom: var(--spacing-2xl);
    animation: fadeUp var(--transition-slow) forwards;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.favorites-header .section-title {
    margin-bottom: 0;
}

.favorites-scroll {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    padding: var(--spacing-sm) 0 var(--spacing-xl);
    margin: 0 calc(var(--spacing-lg) * -1);
    padding: 0 var(--spacing-lg);
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.favorites-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.favorites-scroll .station-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .favorites-scroll .station-card {
        flex: 0 0 280px;
    }
}

.city-favorites-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.city-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-dark);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.city-chip .city-icon {
    font-size: 1.2rem;
}

.city-chip:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.favorites-empty {
    padding: var(--spacing-xl);
    text-align: center;
    background: var(--surface-light);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}


/* ========================================
   Accueil (nouvelle DA)
   ======================================== */
.home-section {
    padding: 48px 0;
}
.home-band {
    background: var(--sand);
    padding: 56px 0;
    margin-top: var(--spacing-2xl);
}
.home-band > .container {
    animation: none;
}

/* KPI : trait de couleur, chiffre en Host Grotesk 800, libellé */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.kpi {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
}
.kpi-bar {
    display: block;
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
    margin-bottom: 12px;
}
.kpi-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
}
.kpi-label {
    margin-top: 8px;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* Graphique + stations les moins chères */
.home-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.home-split > * {
    min-width: 0;
}
.home-split .chart-container {
    margin-top: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}
.chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.chart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chart-header {
    flex-wrap: wrap;
    gap: 12px;
}
.chart-filter {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.chart-filter:hover {
    border-color: var(--ink);
}
.chart-filter.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.rank-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}
.rank-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.rank-panel-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.rank-panel-head a {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rank-panel-head a:hover {
    color: var(--chiffrex-blue);
}
.rank-list {
    list-style: none;
}
.rank-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.rank-n {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.rank-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.2;
}
.rank-name a {
    color: inherit;
}
.rank-name a:hover {
    text-decoration: underline;
}
.rank-city {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.rank-price {
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text);
    white-space: nowrap;
}
.rank-price small {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Outils Carburants */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.tool-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px 22px;
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition-fast);
}
.tool-card:hover {
    border-color: var(--ink);
    color: var(--text);
}
.tool-card .kpi-bar {
    margin-bottom: 8px;
}
.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.tool-card p {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Par ville ou département */
.chip-group + .chip-group {
    margin-top: 24px;
}
.chip-group-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition-fast);
}
.chip:hover {
    border-color: var(--ink);
    color: var(--text);
}
.chip small {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .home-split {
        grid-template-columns: 1fr;
    }
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .kpi-row,
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .home-section {
        padding: 32px 0;
    }
    .home-band {
        padding: 40px 0;
    }
    .rank-item {
        grid-template-columns: 24px minmax(0, 1fr) auto;
    }
    .rank-item .rank-price:last-child {
        grid-column: 2 / -1;
        text-align: left;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible au clavier (accessibilité) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--chiffrex-blue);
    outline-offset: 2px;
}

/* Badge du compte : le pseudo est tronqué pour ne pas faire passer l'en-tête sur deux lignes */
.navbar .user-badge { max-width: 170px; }
.navbar .user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
