/* Design System & Styling PlainPlate (Premium Gastronomy, Safe Place & RGAA) */

:root {
    --bg-dark: #07090e;
    --bg-card: rgba(16, 22, 34, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1; /* Slate-300 pour un contraste conforme RGAA */
    --text-muted: #94a3b8;
    --accent: #d97706; /* Or/Cuivre Gastronomique */
    --accent-hover: #b45309;
    --success: #10b981;
    --warning: #f59e0b;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --glass-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.7);
    --ubereats: #06c167;
    --deliveroo: #00cdbc;
    --thefork: #5ece3f;
    --btn-glass-bg: rgba(255, 255, 255, 0.06);
    --btn-glass-border: rgba(255, 255, 255, 0.12);
    --btn-glass-hover: rgba(255, 255, 255, 0.15);
    --bg-navbar: rgba(8, 10, 16, 0.95);
    --input-bg: rgba(255, 255, 255, 0.03);
    --scrollbar-thumb: rgba(255, 255, 255, 0.12);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);
    --bg-resto-card: linear-gradient(135deg, rgba(20, 26, 38, 0.7) 0%, rgba(12, 17, 26, 0.9) 100%);
    --bg-resto-card-hover: rgba(255, 255, 255, 0.03);
    --text-resto-title: #ffffff;
    color-scheme: dark;
    --glass-bg: rgba(30, 30, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(14px) saturate(180%);
    --glow-gold: 0 0 18px rgba(212, 175, 55, 0.22);
    --search-bg: rgba(40, 40, 40, 0.6);
    --search-bg-focus: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] {
    --bg-dark: #fcfbfa; /* Blanc ivoire gastronomique chaud */
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: rgba(7, 9, 14, 0.08);
    --text-primary: #0f172a; /* Slate-900 */
    --text-secondary: #1e293b; /* Slate-800 pour un contraste accru */
    --text-muted: #475569; /* Slate-600 pour le respect du contraste RGAA */
    --accent: #b45309; /* Cuivre chaud plus contrasté pour le mode clair */
    --accent-hover: #78350f;
    --glass-shadow: 0 16px 40px 0 rgba(15, 23, 42, 0.08);
    --btn-glass-bg: rgba(15, 23, 42, 0.05);
    --btn-glass-border: rgba(15, 23, 42, 0.1);
    --btn-glass-hover: rgba(15, 23, 42, 0.08);
    --bg-navbar: rgba(252, 251, 250, 0.95);
    --input-bg: rgba(15, 23, 42, 0.02);
    --scrollbar-thumb: rgba(15, 23, 42, 0.12);
    --scrollbar-thumb-hover: rgba(15, 23, 42, 0.25);
    --bg-resto-card: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(240, 238, 233, 0.9) 100%);
    --bg-resto-card-hover: rgba(15, 23, 42, 0.04);
    --text-resto-title: #0f172a;
    color-scheme: light;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.06);
    --glass-blur: blur(14px) saturate(180%);
    --glow-gold: 0 0 18px rgba(212, 175, 55, 0.35);
    --search-bg: rgba(255, 255, 255, 0.6);
    --search-bg-focus: rgba(255, 255, 255, 0.8);
}

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

/* Remplacement de la police par défaut */
body, button, input, select, textarea {
    font-family: 'Outfit', sans-serif !important;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typographie Gastronomique Serif pour les titres */
h1, h2, h3, h4, .btn-back, .btn-propose, .filter-header-flex h3, .pending-vote-title {
    font-family: var(--font-serif);
}

/* Accessibilité : Focus visible pour navigation au clavier */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Personnalisation de la Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Modern standard scrollbar styles for cross-browser support */
@supports (scrollbar-color: auto) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--scrollbar-thumb) transparent;
    }
}

/* Navbar / Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: var(--bg-navbar);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    color: var(--accent);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.tagline {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    font-family: var(--font-sans);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Layout Principal */
.app-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 65px);
    position: relative;
}

/* Panneau latéral Sidebar */
.sidebar {
    width: 390px;
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border-right: 1px solid var(--glass-border) !important;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 999;
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.expanded {
    width: 680px;
}

/* Vues de la Sidebar */
.sidebar-view {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.sidebar-view.hidden, .hidden {
    display: none !important;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Barre de recherche premium */
/* Barre de recherche */
.search-container {
    background: var(--search-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
}

.search-box-container {
    position: relative;
    width: 100%;
}

.search-box-container input {
    width: 100%;
    background: var(--search-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    transition: all 0.25s ease;
}

.search-box-container input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--search-bg-focus) !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Section Filtres Toggles Multicritères */
.filter-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.3rem;
}

.filter-header-flex h3 {
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: color 0.2s ease;
}

.btn-reset:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Sélecteurs à 3 états (Tri-state segment controls) */
.tristate-filters-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.tristate-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tristate-label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
}

.segmented-control {
    display: flex;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 2px;
    border-radius: 20px;
    width: 220px;
    position: relative;
    user-select: none;
    backdrop-filter: blur(4px);
}

.segment-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 0.4rem 0;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    border-radius: 18px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.segment-btn:hover {
    color: var(--text-primary);
}

/* Boutons actifs selon l'état (-1: Exclure, 0: Tous, 1: Exiger) */
.segment-btn.active[data-state="-1"] {
    background: #ef4444; /* Rouge d'exclusion */
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.segment-btn.active[data-state="0"] {
    background: var(--text-muted); /* Gris neutre */
    color: var(--bg-dark) !important;
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.25);
}

.segment-btn.active[data-state="1"] {
    background: var(--success); /* Vert d'inclusion */
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Boutons segmentés du formulaire de verdict (sans choix par défaut) */
.segmented-control-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.4rem;
}

.segment-btn-form {
    flex: 1;
    min-width: 100px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    padding: 0.65rem 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    outline: none;
}

.segment-btn-form:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.segment-btn-form.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

[data-theme="light"] .segment-btn-form.active {
    color: #ffffff !important;
}

/* Liste des restaurants */
.restaurant-list-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 200px;
}

.restaurant-list-container h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.3rem;
}

.restaurant-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-y: auto;
    flex: 1;
}

.list-placeholder {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding: 2.5rem 0;
    font-style: italic;
}

/* Card Gastronomique Premium avec liseré or discret */
.restaurant-card {
    background: var(--bg-resto-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease !important;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.restaurant-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent); /* Liseré cuivré or signature PlainPlate */
    transition: background-color 0.25s ease, width 0.25s ease;
}

.restaurant-card:hover {
    background: var(--bg-resto-card-hover);
    border-color: rgba(217, 119, 6, 0.4);
    transform: translateY(-3px) scale(1.01) !important;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.1);
}

.restaurant-card:hover::before {
    width: 6px;
    background: var(--accent-hover);
}

/* Établissements Certifiés (Effet lumineux Or) */
.restaurant-card.certified {
    box-shadow: var(--glow-gold) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* Style de co-modération pour les restaurants pending (en vote / grisé / pointillé) */
.restaurant-card.pending {
    opacity: 0.85;
    border: 1px dashed rgba(245, 158, 11, 0.4);
    background: var(--bg-resto-card);
}

.restaurant-card.pending::before {
    background: var(--warning); /* Liseré orange warning pour les adresses en attente */
}

.restaurant-card.pending:hover {
    opacity: 0.95;
    border-color: rgba(245, 158, 11, 0.7);
}

.restaurant-card h4 {
    font-size: 1.32rem;
    font-weight: 600;
    color: var(--text-resto-title);
    font-family: var(--font-serif); /* Serif littéraire & gastronomique premium */
    letter-spacing: -0.01em;
}

.restaurant-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.5rem;
}

.restaurant-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: var(--font-sans);
}

.tag-verified {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.tag-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.tag-type {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.vote-badge-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vote-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* VUE DÉTAIL RESTAURANT */
.detail-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn-back {
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
}

.btn-expand-toggle {
    padding: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.detail-header h2 {
    font-size: 1.9rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    text-align: left;
    color: #ffffff;
    line-height: 1.2;
}

.detail-address {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* BANDEAU ET BLOC DE VOTE DE CO-MODÉRATION (IdeasAndBugs) */
.pending-alert {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.pending-alert-icon {
    color: var(--warning);
    margin-top: 0.1rem;
}

.pending-alert-text strong {
    display: block;
    font-size: 0.88rem;
    color: #d97706;
    font-weight: 700;
}

.pending-alert-text p {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.35;
    margin-top: 0.15rem;
}

/* Boîte de vote communautaire large */
.pending-vote-card {
    background: rgba(245, 158, 11, 0.03);
    border: 1px dashed rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pending-vote-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--warning);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.3rem;
}

.pending-vote-actions {
    display: flex;
    gap: 0.85rem;
}

.btn-vote-action {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-vote-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-vote-up:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.btn-vote-down:hover {
    background: rgba(244, 63, 94, 0.1);
    border-color: #f43f5e;
    color: #f43f5e;
}

.pending-vote-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Layout Grid dynamique en Sidebar élargie */
.sidebar-view-details-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar.expanded .sidebar-view-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.details-layout-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stats-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 700;
    color: var(--accent);
}

.detail-proof-box {
    margin-top: 0.75rem;
    background: rgba(217, 119, 6, 0.04);
    border: 1px dashed rgba(217, 119, 6, 0.25);
    border-radius: 12px;
    padding: 0.95rem;
}

.detail-proof-box h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.detail-proof-box p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Boutons d'affiliation translucides premium ("Moins verts") */
.detail-actions-layout {
    display: flex;
    flex-direction: column;
}

.detail-actions-buttons {
    display: flex;
    gap: 0.75rem;
}

.detail-actions-buttons .btn-affil {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.88rem;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.detail-actions-buttons .btn-affil:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.detail-actions-buttons .btn-ubereats {
    background: rgba(6, 193, 103, 0.07) !important;
    border: 1px solid rgba(6, 193, 103, 0.35) !important;
    color: var(--ubereats) !important;
}

.detail-actions-buttons .btn-ubereats:hover {
    background: rgba(6, 193, 103, 0.15) !important;
    border-color: rgba(6, 193, 103, 0.6) !important;
}

.detail-actions-buttons .btn-deliveroo {
    background: rgba(0, 205, 188, 0.07) !important;
    border: 1px solid rgba(0, 205, 188, 0.35) !important;
    color: var(--deliveroo) !important;
}

.detail-actions-buttons .btn-deliveroo:hover {
    background: rgba(0, 205, 188, 0.15) !important;
    border-color: rgba(0, 205, 188, 0.6) !important;
}

.detail-actions-buttons .btn-thefork {
    background: rgba(94, 206, 63, 0.07) !important;
    border: 1px solid rgba(94, 206, 63, 0.35) !important;
    color: var(--thefork) !important;
}

.detail-actions-buttons .btn-thefork:hover {
    background: rgba(94, 206, 63, 0.15) !important;
    border-color: rgba(94, 206, 63, 0.6) !important;
}

.comments-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comments-section-header h3 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.1rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 290px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.sidebar.expanded .comments-list {
    max-height: 480px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.comment-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.3rem;
}

.comment-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 7px;
}

/* Carte & MapLibre custom */
#map-container {
    flex: 1;
    position: relative;
    height: 100%;
}

#map {
    height: 100%;
    width: 100%;
    background-color: #07090e;
    transition: filter 0.3s ease;
    /* Teinte cuivre premium en mode sombre */
    filter: saturate(0.9) sepia(0.15) hue-rotate(345deg) contrast(1.02);
}

/* Teinte ivoire papier premium en mode clair */
html[data-theme="light"] #map {
    filter: sepia(0.25) saturate(0.8) contrast(1.02);
    background-color: #fcfbfa;
}

/* Popups MapLibre Gastronomiques */
.maplibregl-popup-content {
    background: var(--bg-dark) !important;
    backdrop-filter: blur(16px);
    color: var(--text-primary) !important;
    border: 1px solid rgba(217, 119, 6, 0.25);
    box-shadow: var(--glass-shadow) !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    width: 340px !important;
    max-width: 90vw !important;
}

.maplibregl-popup-tip {
    border-top-color: var(--bg-dark) !important;
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.popup-details h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-serif);
}

.popup-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.popup-proof {
    font-size: 0.78rem;
    background: rgba(217, 119, 6, 0.05);
    padding: 0.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    color: var(--text-primary);
    line-height: 1.35;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.btn-affil {
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn-ubereats {
    background-color: var(--ubereats);
    color: #fff !important;
}
.btn-deliveroo {
    background-color: var(--deliveroo);
    color: #fff !important;
}
.btn-thefork {
    background-color: var(--thefork);
    color: #fff !important;
}

.popup-vote-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.popup-vote-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.popup-vote-buttons {
    display: flex;
    gap: 0.35rem;
}

.vote-btn-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: 5px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.vote-btn-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Boutons généraux */
.btn {
    font-family: var(--font-sans);
    padding: 0.55rem 1.10rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-link {
    background: none;
    color: var(--text-secondary);
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

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

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: auto;
    text-align: center;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

/* Modals */
.modal-content {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
    padding: 2.25rem;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.modal-content.large {
    max-width: 720px;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* FAQ Body */
.faq-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

.faq-body h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.faq-body p {
    color: var(--text-secondary);
}

/* Formulaires */
.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea, .form-group select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-group select option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}

.form-group textarea {
    resize: vertical;
    min-height: 75px;
}

.row-fields {
    flex-direction: row;
    gap: 0.75rem;
}

.field-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.captcha-container {
    align-items: center;
    margin-top: 1rem;
    width: 100%;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Toast alert conforme RGAA (live role) */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-dark);
    border: 1px solid rgba(217, 119, 6, 0.3);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    z-index: 3000;
    transform: translateY(150%);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.88rem;
    font-weight: 600;
}

.toast.show {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .navbar .tagline {
        display: none;
    }
    .navbar h1 {
        font-size: 1.35rem;
    }
    .app-container {
        flex-direction: column-reverse;
    }
    .sidebar {
        width: 100% !important;
        height: 48vh;
        border-right: none;
        border-top: 1px solid var(--border-color);
        padding: 1rem;
    }
    #map-container {
        height: 52vh;
    }
}

@media (max-width: 480px) {
    .detail-actions-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================
   SWITCH CONSENTEMENT FAQ (iOS-like glassmorphism)
   ========================================== */
.consent-section {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
}

.consent-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.95rem 1.25rem;
    border-radius: 14px;
    backdrop-filter: blur(10px);
}

.consent-container span {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

/* Switch container */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: #f8fafc;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

input:checked + .slider {
    background-color: var(--accent);
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 10px rgba(217, 119, 6, 0.3);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

/* Round sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Accessibilité focus visible pour le switch */
.switch input:focus-visible + .slider {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ==========================================
   MARQUEURS DE CONFIANCE (MAPLIBRE GL) & TAGS
   ========================================== */

/* Niveau 1 : Certifié (Or) */
.marker-confidence-1 {
    border: 2px solid #ffffff !important;
    background-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.75);
}
.marker-confidence-1.marker-vegan {
    background-color: var(--success) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.75);
}
.tag-confidence-1 {
    background: rgba(217, 119, 6, 0.15) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(217, 119, 6, 0.3) !important;
}

/* Niveau 2 : Probable (Argent) */
.marker-confidence-2 {
    border: 2px solid #ffffff !important;
    background-color: #94a3b8 !important;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.65);
}
.tag-confidence-2 {
    background: rgba(148, 163, 184, 0.15) !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

/* Niveau 3 : À valider (Bronze / Gris dépoli) */
.marker-confidence-3 {
    border: 2px dashed var(--text-muted) !important;
    background-color: rgba(148, 163, 184, 0.25) !important;
    box-shadow: none !important;
}
.tag-confidence-3 {
    background: rgba(148, 163, 184, 0.08) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
}

/* ==========================================
   FORMULAIRE EN ÉTAPES (MULTI-STEP FORM)
   ========================================== */
.form-step {
    display: none;
}
.form-step-active {
    display: block;
}

/* ==========================================
   SWITCHER DE VUE MOBILE
   ========================================== */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: inline-flex !important;
    }
    
    /* Basculement mobile : Sidebar / Carte */
    .sidebar.mobile-hide {
        display: none !important;
    }
    
    #map-container.mobile-hide {
        display: none !important;
    }
}

/* ==========================================
   BARRE DE LOGOS D'AFFILIATION ÉPURÉS
   ========================================== */
.popup-actions-row {
    display: flex;
    gap: 0.65rem;
    margin-top: 0.35rem;
    width: 100%;
}

.btn-affil-logo {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-affil-logo:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-affil-logo svg {
    flex-shrink: 0;
}

/* ==========================================
   LÉGENDE DE LA CARTE (MAP LEGEND)
   ========================================== */
.map-legend {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    padding: 1rem;
    border-radius: 12px;
    z-index: 1000;
    width: 210px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    pointer-events: none; /* Ne pas gêner les clics sous-jacents sur la carte */
}

.map-legend h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
    margin-bottom: 0.2rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Responsive mobile : masquer la légende si l'écran est trop petit ou l'adapter */
@media (max-width: 768px) {
    .map-legend {
        bottom: 1rem;
        left: 1rem;
        padding: 0.75rem;
        width: 180px;
        font-size: 0.75rem;
    }
    .map-legend h4 {
        font-size: 0.75rem;
    }
}

/* ==========================================
   FICHE DE CONSULTATION PREMIUM (STYLE MAPS)
   ========================================== */
.detail-cover-image {
    height: 180px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

/* Fallback image cover élégante */
.detail-cover-image::before {
    content: "🍽️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.15;
}

.detail-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(7, 9, 14, 0.4) 0%, rgba(7, 9, 14, 0) 50%, rgba(7, 9, 14, 0.85) 100%);
    pointer-events: none;
}

/* Boutons flottants */
.btn-back-floating, .btn-expand-floating, .btn-close-floating {
    position: absolute;
    top: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--btn-glass-border);
    background: rgba(8, 10, 16, 0.75);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.btn-back-floating { left: 1rem; }
.btn-expand-floating { right: 4.25rem; }
.btn-close-floating { right: 1rem; }

.btn-back-floating:hover, .btn-expand-floating:hover, .btn-close-floating:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

.detail-main-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-header-section h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.detail-meta-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.detail-category-label {
    font-weight: 600;
    color: var(--accent);
}

.detail-separator {
    opacity: 0.4;
}

/* Barre d'actions rapides (Quick Actions) */
.quick-actions-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 0;
    margin: 0.5rem 0;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s ease;
}

.action-item:hover {
    color: var(--accent);
}

.action-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--btn-glass-bg);
    border: 1px solid var(--btn-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.action-item:hover .action-icon-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Infos Pratiques en liste */
.info-row-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.5rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.info-row-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Statistiques de Transparence V2 (Barres de progression) */
.stats-panel-v2 {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.stat-progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-progress-label strong {
    color: var(--text-primary);
}

.progress-bar-bg {
    height: 6px;
    background: var(--btn-glass-bg);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   PAGE DÉDIÉE DE PROPOSITION (PROPOSE.HTML)
   ========================================== */
.propose-main-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.propose-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 2rem;
}

.propose-progress-steps {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.step-indicator {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 0.5rem;
}

.step-indicator.active {
    color: var(--accent);
}

.step-indicator.active::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.propose-step-pane h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.step-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Badge de coordonnées */
.coords-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    width: 100%;
}

.coords-badge.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

.coords-badge.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
}

/* Mini-carte de proposition */
.mini-map-card {
    height: 250px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 1.25rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

#mini-map {
    width: 100%;
    height: 100%;
}

@media (max-width: 600px) {
    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}


/* ==========================================
   LÉGENDE DE LA CARTE (MAP LEGEND)
   ========================================== */
.map-legend {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    padding: 1rem;
    border-radius: 12px;
    z-index: 1000;
    width: 210px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    pointer-events: none; /* Ne pas gêner les clics sous-jacents sur la carte */
}

.map-legend h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
    margin-bottom: 0.2rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Responsive mobile : masquer la légende si l'écran est trop petit ou l'adapter */
@media (max-width: 768px) {
    .map-legend {
        bottom: 1rem;
        left: 1rem;
        padding: 0.75rem;
        width: 180px;
        font-size: 0.75rem;
    }
    .map-legend h4 {
        font-size: 0.75rem;
    }
}

/* Agrandissement du bouton fermer (close button) des popups cartographiques MapLibre */
.maplibregl-popup-close-button {
    font-size: 1.5rem !important;
    padding: 8px 12px !important;
    color: var(--text-muted) !important;
    background: none !important;
    border: none !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
    border-top-right-radius: 12px;
    line-height: 1;
    cursor: pointer;
}

.maplibregl-popup-close-button:hover {
    color: var(--text-primary) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Thème clair spécifique pour le survol de la croix close */
[data-theme="light"] .maplibregl-popup-close-button:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* --- STYLES COMPOSANTS GOOGLE MAPS DETAILED VIEW --- */

/* Galerie Photo / Carrousel */
.photo-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: opacity 0.3s ease;
}

.slider-photo.active {
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.slider-btn:hover {
    background: var(--accent);
}

.prev-photo {
    left: 1rem;
}

.next-photo {
    right: 1rem;
}

/* Liens de contact */
.contact-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s ease;
    word-break: break-all;
}

.contact-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Accordéon Horaires d'ouverture */
.hours-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.hours-status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hours-status-badge.open {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.hours-status-badge.closed {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.hours-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.hours-dropdown-content {
    margin-top: 0.6rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hours-row-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hours-row-item.today {
    color: var(--text-primary);
    font-weight: 700;
}

/* Badges Métadonnées dans l'en-tête */
.detail-price-label {
    font-weight: 700;
    color: var(--success);
    font-size: 0.85rem;
}

.detail-rating-label {
    font-weight: 700;
    color: #f59e0b;
    font-size: 0.85rem;
}

/* Onglets pour la modale FAQ & Légal */
.modal-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 4px 4px 0 0;
    font-family: var(--font-sans);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
