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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #222222;
    background: #ffffff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

button {
    font-family: inherit;
}

ul, ol {
    list-style: none;
}
/**
 * LeBonResto Design System — Tokens
 * Canonical source of truth for all CSS variables.
 * Load this BEFORE layout.css, components.css, and page-specific CSS.
 *
 * Palette: Mediterranean warmth meets modern minimalism
 * Teal primary, warm neutrals, amber/terracotta accents
 */

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE (default)
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* — Brand — */
    --primary: #00635a;
    --primary-dark: #004d40;
    --primary-light: #e0f2f1;
    --primary-rgb: 0, 99, 90;

    /* — Accent — */
    --accent: #b45309;
    --accent-amber: #b45309;
    --accent-terra: #c2410c;
    --accent-olive: #65a30d;
    --accent-light: #fef3c7;

    /* — Semantic — */
    --success: #16a34a;
    --success-rgb: 22, 163, 74;
    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --danger: #dc2626;
    --danger-rgb: 220, 38, 38;
    --info: #0ea5e9;
    --info-rgb: 14, 165, 233;

    /* — Backgrounds (warm whites, never cold) — */
    --bg: #fafaf9;
    --bg-elevated: #ffffff;
    --bg-subtle: #f5f5f4;
    --bg-hover: #f0efed;
    --bg-active: #e7e5e4;

    /* — Text — */
    --text: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --text-inverse: #ffffff;

    /* — Borders — */
    --border: #e7e5e4;
    --border-light: #f5f5f4;
    --border-strong: #d6d3d1;

    /* — Grays (warm stone palette) — */
    --gray-50: #fafaf9;
    --gray-100: #f5f5f4;
    --gray-200: #e7e5e4;
    --gray-300: #d6d3d1;
    --gray-400: #a8a29e;
    --gray-500: #78716c;
    --gray-600: #57534e;
    --gray-700: #44403c;
    --gray-800: #292524;
    --gray-900: #1c1917;

    /* — Typography — */
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'DM Sans', -apple-system, sans-serif;
    --font-serif: 'DM Serif Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: 11px;
    --text-sm: 13px;
    --text-base: 15px;
    --text-md: 16px;
    --text-lg: 18px;
    --text-xl: 22px;
    --text-2xl: 28px;
    --text-3xl: 36px;
    --text-4xl: 48px;

    --leading-tight: 1.25;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;

    /* — Border Radius — */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* — Shadows (multi-layer, warm) — */
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(28, 25, 23, 0.07), 0 2px 4px -2px rgba(28, 25, 23, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(28, 25, 23, 0.08), 0 4px 10px -4px rgba(28, 25, 23, 0.04);
    --shadow-xl: 0 20px 40px -8px rgba(28, 25, 23, 0.12), 0 8px 16px -6px rgba(28, 25, 23, 0.06);
    --shadow-glow: 0 0 20px rgba(0, 99, 90, 0.15);

    /* — Spacing — */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* — Transition — */
    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* — Z-index — */
    --z-dropdown: 1000;
    --z-sticky: 1002;
    --z-header: 1003;
    --z-overlay: 10000;
    --z-modal: 10001;
    --z-toast: 10100;

    /* — Container — */
    --container-max: 1200px;
    --container-wide: 1400px;
    --container-narrow: 800px;
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: rgba(20, 184, 166, 0.12);
    --primary-rgb: 20, 184, 166;

    --bg: #0c0a09;
    --bg-elevated: #1c1917;
    --bg-subtle: #292524;
    --bg-hover: #292524;
    --bg-active: #44403c;

    --text: #fafaf9;
    --text-secondary: #d6d3d1;
    --text-muted: #78716c;
    --text-inverse: #1c1917;

    --border: #44403c;
    --border-light: #292524;
    --border-strong: #57534e;

    --gray-50: #1c1917;
    --gray-100: #292524;
    --gray-200: #44403c;
    --gray-300: #57534e;
    --gray-400: #78716c;
    --gray-500: #a8a29e;
    --gray-600: #d6d3d1;
    --gray-700: #e7e5e4;
    --gray-800: #f5f5f4;
    --gray-900: #fafaf9;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.35), 0 4px 10px -4px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   BASE TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: var(--leading-tight);
    color: var(--text);
}

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

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

::selection {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--text);
}

/* Focus ring */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scrollbar (subtle) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-400);
}
/* ═══════════════════════════════════════════════════════════════
   LeBonResto — Layout
   Structural elements: skip-link, page wrapper, containers,
   footer, mobile bottom nav, cookie banner, toast
   ═══════════════════════════════════════════════════════════════ */

/* ── Skip to Content ─────────────────────────────────────────── */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--text-inverse);
    padding: var(--space-3) var(--space-6);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 700;
    font-size: var(--text-sm);
    z-index: 100000;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
    color: var(--text-inverse);
    outline: 3px solid var(--warning);
    outline-offset: 2px;
}

/* ── Page Wrapper ────────────────────────────────────────────── */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-content {
    flex: 1;
}

/* ── Containers ──────────────────────────────────────────────── */
.container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 40px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 40px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
}

@media (max-width: 768px) {
    .container,
    .container-narrow {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .container,
    .container-narrow {
        padding: 0 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--space-12) 0 0;
    margin-top: auto;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.site-footer-grid {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
    gap: var(--space-8);
}

.site-footer-brand {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

.site-footer-desc {
    color: var(--gray-400);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    margin: 0;
    max-width: 280px;
}

.site-footer-heading {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-300);
    margin-bottom: var(--space-4);
}

.site-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site-footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
    display: inline-block;
    padding: 2px 0;
}

.site-footer-links a:hover {
    color: #ffffff;
}

/* Newsletter */
.site-footer-nl {
    margin-top: var(--space-2);
}

.site-footer-nl-form {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.site-footer-nl-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-700);
    border-radius: var(--radius-sm);
    background: var(--gray-800);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-width: 0;
}

.site-footer-nl-input::placeholder {
    color: var(--gray-500);
}

.site-footer-nl-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.site-footer-nl-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
}

.site-footer-nl-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.site-footer-nl-msg {
    font-size: 12px;
    margin: var(--space-2) 0 0;
    min-height: 18px;
}

/* Footer bottom bar */
.site-footer-bottom {
    margin-top: var(--space-8);
    padding: var(--space-5) 40px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    max-width: var(--container-wide);
    margin-left: auto;
    margin-right: auto;
}

/* Footer responsive */
@media (max-width: 768px) {
    .site-footer {
        padding: var(--space-8) 0 0;
    }
    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
        padding: 0 20px;
    }
    .site-footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
    .site-footer-bottom {
        padding: var(--space-4) 20px;
    }
}

@media (max-width: 480px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
        padding: 0 14px;
    }
    .site-footer-bottom {
        padding: var(--space-4) 14px;
    }
}

/* Footer dark mode — footer is already dark, but in dark theme
   the gray palette inverts, so we override explicitly */
[data-theme="dark"] .site-footer {
    background: #0c0a09;
    border-top: 1px solid #292524;
}

[data-theme="dark"] .site-footer-brand {
    color: var(--gray-900);
}

[data-theme="dark"] .site-footer-desc,
[data-theme="dark"] .site-footer-links a {
    color: var(--gray-500);
}

[data-theme="dark"] .site-footer-links a:hover {
    color: var(--gray-900);
}

[data-theme="dark"] .site-footer-heading {
    color: var(--gray-600);
}

[data-theme="dark"] .site-footer-nl-input {
    background: #1c1917;
    border-color: #44403c;
    color: var(--gray-900);
}

[data-theme="dark"] .site-footer-bottom {
    border-color: #292524;
    color: var(--gray-400);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-dropdown);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: none;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06), 0 -8px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .mobile-bottom-nav { display: flex; }
    body { padding-bottom: 68px; }
}

/* Touch targets min 44px (WCAG 2.1) */
.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 16px;
    min-height: 52px;
    min-width: 60px;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    border-radius: 10px;
    position: relative;
}

/* Indicateur actif : barre en haut */
.mobile-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--primary);
    border-radius: 0 0 2px 2px;
}

.mobile-bottom-nav-item i {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item.active {
    color: var(--primary);
}

.mobile-bottom-nav-item.active i {
    transform: scale(1.1);
}

[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(28, 25, 23, 0.96);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.06), 0 -8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mobile-bottom-nav-item {
    color: var(--text-muted);
}

[data-theme="dark"] .mobile-bottom-nav-item:hover,
[data-theme="dark"] .mobile-bottom-nav-item.active {
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════════════════════ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-900);
    color: var(--text-inverse);
    padding: var(--space-4) var(--space-6);
    z-index: 9998;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    will-change: transform;
    transition: transform 0.3s ease;
    pointer-events: none;
}
.cookie-banner.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

/* Sur mobile : placer au-dessus de la bottom nav */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: calc(56px + env(safe-area-inset-bottom, 0px));
        border-radius: 12px 12px 0 0;
        padding-bottom: var(--space-4);
    }
}

.cookie-banner-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    font-size: var(--text-sm);
    flex: 1;
    min-width: 200px;
}

.cookie-banner a {
    color: #4dd8cf;
    text-decoration: underline;
}

.cookie-banner .btn-outline {
    border-color: #4dd8cf;
    color: #4dd8cf;
}

.cookie-banner .btn-outline:hover {
    background: #4dd8cf;
    color: #0f2b28;
}

/* ═══════════════════════════════════════════════════════════════
   LOYALTY TOAST
   ═══════════════════════════════════════════════════════════════ */
.loyalty-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    z-index: 9999;
    max-width: 400px;
    margin-left: auto;
    animation: slideInRight 0.5s ease;
}

@media (max-width: 768px) {
    .loyalty-toast {
        /* Au-dessus de la bottom nav (68px) + marge */
        bottom: calc(68px + env(safe-area-inset-bottom, 0px) + 8px);
        right: 12px;
        left: 12px;
    }
}

.loyalty-toast-inner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-inverse);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-xl);
}

.loyalty-toast-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.loyalty-toast-close {
    background: none;
    border: none;
    color: var(--text-inverse);
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    padding: 4px;
}

.loyalty-toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
/** LeBonResto — Header Styles */

/* ═══════════════════════════════════════════════════════════════════ */
/* HEADER                                                             */
/* ═══════════════════════════════════════════════════════════════════ */
.thefork-header {
    background: var(--bg-elevated);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Logo */
.header-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-svg { flex-shrink: 0; }
.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.3px;
}
.logo-text-accent { color: var(--primary); }

/* Navigation centrale */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}
.nav-link i { font-size: 13px; }
.nav-link:hover { color: var(--primary); background: #f0fdf4; }
.nav-link.active { color: var(--primary); background: #f0fdf4; font-weight: 600; }

/* Actions droite */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Bouton connexion (non connecté) */
.header-login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.header-login-btn:hover { background: #004d46; }

/* ═══════════════════════════════════════════════════════════════════ */
/* WIDGET FIDÉLITÉ                                                    */
/* ═══════════════════════════════════════════════════════════════════ */
.loyalty-widget {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    color: #92400e;
    transition: all 0.2s;
}
.loyalty-widget:hover { background: #fde68a; }
.loyalty-icon { font-size: 14px; }
.loyalty-points { font-weight: 700; }

/* Dropdown fidélité */
.dropdown-loyalty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}
.loyalty-badge-mini { font-size: 12px; font-weight: 600; color: var(--primary); }
.loyalty-points-mini {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* USER MENU                                                          */
/* ═══════════════════════════════════════════════════════════════════ */
.user-menu { position: relative; }
/* Touch target 44px minimum pour le bouton user */
.user-trigger { cursor: pointer; background: none; border: none; padding: 4px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #00897b);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: box-shadow 0.2s;
}
.user-trigger:hover .user-avatar { box-shadow: 0 0 0 3px rgba(0,99,90,0.2); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 240px;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 1000;
}
.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header { padding: 16px; border-bottom: 1px solid #f0f0f0; }
.dropdown-header strong { display: block; font-size: 15px; }
.dropdown-header span { font-size: 13px; color: #666; }

.dropdown-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
    text-decoration: none;
}
.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item i { width: 18px; text-align: center; color: var(--gray-500); font-size: 13px; }

.dropdown-admin { color: #8b5cf6; }
.dropdown-admin i { color: #8b5cf6; }
.dropdown-logout { color: var(--danger); }
.dropdown-logout i { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════ */
/* CONCIERGE NAVBAR BUTTON                                             */
/* ═══════════════════════════════════════════════════════════════════ */
.ccm-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: 1.5px solid var(--primary);
    border-radius: 20px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ccm-nav-btn:hover {
    background: var(--primary);
    color: #fff;
}
.ccm-nav-icon {
    font-size: 16px;
    line-height: 1;
}
.ccm-nav-label {
    font-size: 13px;
}
body.dark-mode .ccm-nav-btn {
    border-color: #5eead4;
    color: #5eead4;
}
body.dark-mode .ccm-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                         */
/* ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .header-container { padding: 0 12px; gap: 8px; }
    .logo-svg { width: 30px; height: 30px; }
    .logo-text { font-size: 17px; }
    .loyalty-widget { display: none; }
    .ccm-nav-btn { display: none; }
    .notif-panel { width: calc(100vw - 24px); right: -60px; max-width: 360px; }
    .user-dropdown { min-width: 220px; right: 0; max-width: calc(100vw - 24px); }
}
@media (max-width: 480px) {
    .header-container { gap: 4px; }
    .logo-text { font-size: 15px; }
    .loyalty-widget { display: none; }
    .notif-panel { right: -80px; width: calc(100vw - 16px); }
    .header-login-btn span { display: none; }
    .header-login-btn { padding: 8px 10px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-link span { display: none; }
    .nav-link { padding: 8px 12px; }
}

/* ═══════════════════════════════════════════════════════════════════ */
/* AUTH MODAL */
/* ═══════════════════════════════════════════════════════════════════ */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.auth-overlay.show { opacity: 1; visibility: visible; }

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-elevated);
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.auth-modal.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-close:hover { background: #e0e0e0; }

.auth-modal-logo { text-align: center; font-size: 48px; margin-bottom: 24px; }

.auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: #666; margin-bottom: 24px; font-size: 14px; }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    cursor: pointer;
    transition: color .2s;
}
.auth-back:hover { color: #00635a; }
.auth-back i { font-size: 12px; }

.auth-form-group { margin-bottom: 16px; }
.auth-form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.auth-form-group label .required { color: var(--danger); }
.auth-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border 0.2s;
}
.auth-form-group input:focus { border-color: var(--primary); }
.auth-form-group input:focus:not(:focus-visible) { outline: none; }

.auth-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.password-field { position: relative; }
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
}

.auth-forgot {
    display: block;
    text-align: right;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 16px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin-bottom: 10px;
}
.auth-btn-primary { background: var(--primary); color: white; }
.auth-btn-primary:hover { background: #004d46; }

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}
.auth-divider span { padding: 0 12px; }

.auth-btn-social {
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-btn-facebook { border: 1px solid #1877f2; color: #1877f2; }
.auth-btn-google { border: 1px solid #ddd; color: #333; }

.auth-message { padding: 12px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: none; }
.auth-message.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.auth-message.show { display: block; }

/* Header icon buttons — min 44px touch target */
.header-icon-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #555; font-size: 18px; transition: all 0.2s; }
.header-icon-btn:hover { background: #f0fdf4; color: var(--primary); }

/* Notifications bell — min 44px touch target */
.notif-bell { position: relative; }
.notif-bell-btn { background: none; border: none; cursor: pointer; font-size: 20px; color: #555; position: relative; padding: 12px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.notif-bell-btn:hover { color: var(--primary); }
.notif-badge { position: absolute; top: 4px; right: 4px; background: var(--danger); color: white; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.notif-panel { position: absolute; top: calc(100% + 10px); right: 0; background: var(--bg-elevated); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); width: 320px; max-height: 400px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s; z-index: 1001; }
.notif-bell.open .notif-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.notif-panel-header strong { font-size: 15px; }
.notif-mark-read { background: none; border: none; color: var(--primary); font-size: 12px; cursor: pointer; font-weight: 600; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-empty { text-align: center; color: var(--gray-400); padding: 24px; font-size: 14px; }
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.notif-item.unread { background: #f0fdf4; }
.notif-item-icon { width: 32px; height: 32px; border-radius: 50%; background: #e0f2fe; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.notif-item-body { flex: 1; }
.notif-item-title { font-weight: 600; color: var(--gray-900); }
.notif-item-time { color: var(--gray-400); font-size: 11px; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════ */
/* MOBILE TOUCH & OVERFLOW FIXES                                      */
/* ═══════════════════════════════════════════════════════════════════ */

/* Notif panel : évite le débordement horizontal sur petits écrans */
@media (max-width: 480px) {
    .notif-panel {
        width: calc(100vw - 16px);
        right: -8px;
        left: auto;
    }
}

/* msg-bell : touch target 44px */
.msg-bell {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/**
 * LeBonResto Components
 * Shared UI components using design tokens.
 * Requires tokens.css to be loaded first.
 */

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-base);
    text-align: center;
    text-decoration: none;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    line-height: 1.4;
    min-height: 44px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--text-inverse);
}

.btn-secondary:hover {
    background: var(--gray-700);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 36px;
    font-size: var(--text-md);
    border-radius: var(--radius-lg);
}

.btn-pill {
    border-radius: var(--radius-full);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ═══ CARDS ═══ */
.card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-body {
    padding: var(--space-6);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
}

/* ═══ ALERTS ═══ */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-5);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.alert-success {
    background: rgba(var(--success-rgb), 0.08);
    color: var(--success);
    border: 1px solid rgba(var(--success-rgb), 0.2);
}

.alert-error {
    background: rgba(var(--danger-rgb), 0.08);
    color: var(--danger);
    border: 1px solid rgba(var(--danger-rgb), 0.2);
}

.alert-warning {
    background: rgba(var(--warning-rgb), 0.08);
    color: var(--warning);
    border: 1px solid rgba(var(--warning-rgb), 0.2);
}

.alert-info {
    background: rgba(var(--info-rgb), 0.08);
    color: var(--info);
    border: 1px solid rgba(var(--info-rgb), 0.2);
}

/* ═══ FORMS ═══ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text);
    background: var(--bg-elevated);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.form-control:focus:not(:focus-visible) {
    outline: none;
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ═══ BADGES ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
}

.badge-primary {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(var(--success-rgb), 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(var(--warning-rgb), 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
}

/* ═══ PILLS / TAGS ═══ */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.pill:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.pill.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}

/* ═══ TABLES ═══ */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

.table tr:hover td {
    background: var(--bg-hover);
}

/* ═══ DIVIDER ═══ */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-6) 0;
}

/* ═══ UTILITIES ═══ */
.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }
.mt-5 { margin-top: var(--space-10); }

.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }
.mb-5 { margin-bottom: var(--space-10); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.gap-1 { gap: var(--space-2); }
.gap-2 { gap: var(--space-4); }
.gap-3 { gap: var(--space-6); }
.gap-4 { gap: var(--space-8); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* ═══ BADGE NOUVEAU ═══ */
/* Used on restaurant cards for items created < 30 days ago */
.badge-nouveau {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #00635a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    z-index: 3;
    pointer-events: none;
}

/* Price range display */
.price-range { color: var(--primary, #0d9488); font-weight: 600; cursor: default; }
