/* ============================================================
   AbidjanOnline — Global Stylesheet
   Design: Modern African — Green & Orange
   Fonts: Plus Jakarta Sans (display) + Inter (body)
   ============================================================ */

/* ── 1. Design Tokens ────────────────────────────────────── */
:root {
    --primary: #0B8A4B;
    --primary-light: #10A85C;
    --primary-dark: #066B39;
    --accent: #F5A623;
    --accent-light: #FFD080;
    --accent-dark: #D4891A;
    --terrain: #2E3192;
    --terrain-dark: #1C217A;
    --bg: #F9FAFB;
    --bg-alt: #F3F4F6;
    --surface: #FFFFFF;
    --surface-2: #f0fdf4;
    --text: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 8px 32px rgba(11, 138, 75, .22);
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-full: 9999px;
    --transition: .25s ease;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --gray-100: #F3F4F6;
    --gray-700: #374151;
    
    /* Legacy aliases (preserves admin/terrain/gestionnaire styles) */
    --primary-color: #0B8A4B;
    --secondary-color: #066B39;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --text-main: #111827;
    
    /* Premium popup specific */
    --green-primary: #0B8A4B;
    --green-light: #E8F5EE;
    --orange-primary: #F5A623;
    --orange-dark: #D4891A;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-500: #6B7280;
    --gray-900: #111827;
    --white: #FFFFFF;
}

/* ── 2. Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ── 3. Typography ───────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    margin: 0;
    line-height: 1.15;
}

a {
    color: inherit;
}

/* ── 4. Layout Utilities ─────────────────────────────────── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ── 5. Navbar ───────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    transition: box-shadow .3s;
}

.navbar.scrolled {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    height: 70px;
    object-fit: contain;
    margin: -10px 0;
}

/* Center links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-700, #374151);
    font-weight: 500;
    font-size: .925rem;
    transition: color .2s;
}

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

/* Right-side CTA group */
.nav-cta {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* Shared button styles used in navbar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6rem 1.5rem;
    border-radius: var(--r-full);
    font-weight: 600;
    font-size: .9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s ease;
    font-family: var(--font-body);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700, #374151);
}

.btn-ghost:hover {
    background: var(--gray-100, #F3F4F6);
}

.btn-nav-login {
    background: var(--primary);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(11, 138, 75, .3);
}

.btn-nav-login:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(11, 138, 75, .35);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(11, 138, 75, .3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(11, 138, 75, .35);
    transform: translateY(-1px);
}

.btn-orange {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 166, 35, .35);
}

.btn-orange:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

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

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

.btn-lg {
    padding: .875rem 2rem;
    font-size: 1rem;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.nav-hamburger span {
    width: 24px;
    height: 2.5px;
    background: var(--gray-700, #374151);
    border-radius: 2px;
    transition: all .3s;
    display: block;
}

/* Mobile slide panel */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--surface);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform .35s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.mobile-menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.mobile-menu-links a {
    display: block;
    padding: .75rem 1rem;
    border-radius: var(--r-sm);
    font-weight: 500;
    color: var(--gray-700, #374151);
    transition: background .2s;
    text-decoration: none;
}

.mobile-menu-links a:hover {
    background: var(--bg);
    color: var(--primary);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: .25rem 0;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1.25rem;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .nav-logo img {
        height: 50px;
    }
}

/* Legacy brand support */
.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text);
}

.brand-sub {
    font-family: var(--font-display);
    font-size: .52rem;
    font-style: italic;
    color: var(--primary);
}

/* ── 6. Footer ───────────────────────────────────────────── */
footer,
.site-footer {
    background: #111827;
    color: #9CA3AF;
    padding: 4rem 2rem 2rem;
    margin-top: 0;
    font-size: .875rem;
    font-family: var(--font-body);
}

footer strong {
    color: var(--primary);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    font-size: .9rem;
    color: #9CA3AF;
    margin-top: 1rem;
    max-width: 300px;
    line-height: 1.6;
}

.footer-socials {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    transition: all .2s;
    text-decoration: none;
}

.footer-socials a:hover {
    background: var(--primary);
    color: #fff;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.footer-col ul a {
    font-size: .875rem;
    color: #9CA3AF;
    text-decoration: none;
    transition: color .2s;
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    color: #6B7280;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #6B7280;
    text-decoration: none;
    transition: color .2s;
}

.footer-bottom-links a:hover {
    color: #9CA3AF;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ── 7. Buttons ──────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--primary);
    color: #fff !important;
    padding: .55rem 1.4rem;
    border-radius: var(--r-md);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 3px 12px rgba(196, 94, 0, .28);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Generic .btn (used by admin + gestionnaire pages) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-weight: 600;
    border: none;
    text-decoration: none;
    font-size: .85rem;
    font-family: var(--font-body);
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.btn.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(196, 94, 0, .28);
}

.btn.btn-primary:hover {
    background: var(--primary-dark);
    opacity: 1;
}

.btn-danger {
    background: #DC2626;
    color: #fff;
}

.btn-success {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 5px 12px;
    font-size: .78rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: .98rem;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

/* ── 8. Forms ────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control,
.form-input,
select,
textarea,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 16px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: all var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus,
.form-input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(196, 94, 0, .15);
}

textarea.form-control {
    resize: vertical;
    line-height: 1.6;
}

.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(220, 38, 38, .07);
    border: 1.5px solid #DC2626;
    border-radius: var(--r-sm);
    color: #991B1B;
    font-size: .88rem;
    margin-bottom: 16px;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(45, 106, 79, .07);
    border: 1.5px solid var(--accent);
    border-radius: var(--r-sm);
    color: #1A4230;
    font-size: .88rem;
    margin-bottom: 16px;
}

/* ── 9. Badges ───────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 700;
}

.badge-primary {
    background: rgba(196, 94, 0, .1);
    color: var(--primary);
}

.badge-success {
    background: rgba(45, 106, 79, .1);
    color: var(--accent);
}

.badge-danger {
    background: rgba(220, 38, 38, .1);
    color: #DC2626;
}

.badge-neutral {
    background: #F0ECE6;
    color: var(--text-muted);
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.badge-rejected {
    background: rgba(220, 38, 38, .08);
    color: #991B1B;
    border: 1px solid rgba(220, 38, 38, .2);
}

.badge-warning {
    background: #FEF3C7;
    color: #78350F;
    border: 1px solid #FCD34D;
}

.badge-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ── 10. Cards ───────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(196, 94, 0, .3);
}

.card-img {
    height: 180px;
    background: var(--surface-2);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.card-img .material-icons {
    font-size: 56px;
    color: var(--primary);
    opacity: .4;
}

.card-content {
    padding: 16px 18px 20px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .83rem;
    color: var(--text-muted);
    margin: 5px 0;
}

.card-meta .material-icons {
    font-size: 14px;
}

/* ── 11. Hero ────────────────────────────────────────────── */
.hero {
    /* margin-top: 64px; */
    min-height: 68vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 5%;
    background: linear-gradient(135deg, #0B8A4B 0%, #10A85C 55%, #2DD4AA 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .05;
    background-image: repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 0, transparent 50%);
    background-size: 12px 12px;
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    border-radius: 50px;
    padding: .35rem 1.1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
    position: relative;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 1rem;
    max-width: 700px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    position: relative;
}

.hero h1 em {
    font-style: italic;
    color: rgba(255, 255, 255, .9);
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .88);
    max-width: 520px;
    margin-bottom: 2.5rem;
    position: relative;
}

/* ── 12. Search Form ─────────────────────────────────────── */
.search-form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, .95);
    padding: 8px;
    border-radius: var(--r-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
    width: 100%;
    max-width: 760px;
    position: relative;
}

.search-form input,
.search-form select {
    border: 1.5px solid transparent;
    padding: 11px 16px;
    border-radius: var(--r-md);
    flex: 1;
    font-family: var(--font-body);
    font-size: .9rem;
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
}

.search-form input:focus,
.search-form select:focus {
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        border-radius: var(--r-md);
    }

    .search-form input,
    .search-form select {
        width: 100%;
    }
}

/* ── 13. Category Grid ───────────────────────────────────── */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 0 5%;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    padding: 20px 32px;
    border-radius: var(--r-lg);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    min-width: 120px;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: var(--surface-2);
}

.category-card .material-icons {
    font-size: 34px;
    color: var(--primary);
}

.category-card h3 {
    margin: 0;
    font-size: .88rem;
    font-weight: 700;
    font-family: var(--font-body);
    text-align: center;
    color: var(--text);
}

/* ── 14. Section Titles ──────────────────────────────────── */
.section-title {
    text-align: center;
    /* margin: 3.5rem 0 1.6rem; */
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 700;
    color: var(--text);
}

.section-title span,
.section-title em {
    color: var(--primary);
    font-style: normal;
}

/* ── 15. Grid Container ──────────────────────────────────── */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
    padding: 0 5%;
}

/* ── 16. Admin Layout (TopBar + Dropdowns) ──────────────── */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1A1208;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.admin-brand {
    display: flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
}

.admin-brand span {
    color: var(--primary);
}

.admin-nav-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.admin-nav-item,
.admin-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    border-radius: var(--r-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.admin-nav-item:hover,
.admin-dropdown-trigger:hover,
.admin-nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.admin-nav-item.active {
    border-bottom: 2px solid var(--primary);
    border-radius: 0;
}

.admin-nav-dropdown {
    position: relative;
    display: inline-block;
}

.admin-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 10px 0;
    z-index: 1001;
    border: 1px solid var(--border);
    animation: dropIn .2s ease-out;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.admin-nav-dropdown:hover .admin-dropdown-content {
    display: block;
}

.admin-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text);
    font-size: .88rem;
    font-weight: 500;
    transition: background .2s;
}

.admin-dropdown-content a:hover {
    background: var(--bg);
    color: var(--primary);
}

.admin-dropdown-content .material-icons {
    font-size: 18px;
    color: var(--text-muted);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

/* Admin main area */
.admin-page,
.admin-layout {
    margin-left: 0;
    margin-top: 64px;
    padding: 6px 5% 32px;
    min-height: calc(100vh - 64px);
    background: var(--bg);
}

/* Admin page header */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.admin-page-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

/* Admin stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

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

.stat-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

/* Pending alert */
.pending-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FEF3C7;
    border: 1.5px solid #F59E0B;
    border-radius: var(--r-md);
    padding: 12px 18px;
    font-size: .88rem;
    margin-bottom: 20px;
    color: #92400E;
}

/* Admin card */
.admin-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.admin-card h3 {
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-card h3 .card-icon {
    width: 28px;
    height: 28px;
    background: rgba(196, 94, 0, .1);
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 10px 14px;
    border-bottom: 2px solid var(--border);
    text-align: left;
    background: var(--bg);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    font-weight: 700;
}

.admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
    vertical-align: middle;
    color: var(--text);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

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

/* Drawer mobile */
.admin-drawer {
    position: fixed;
    top: 64px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 64px);
    background: #1A1208;
    z-index: 1100;
    transition: left .3s cubic-bezier(.4, 0, .2, 1);
    padding: 20px 0;
    overflow-y: auto;
}

.admin-drawer.open {
    left: 0;
}

.admin-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
}

.admin-drawer-overlay.open {
    display: block;
}

.admin-drawer .admin-nav-item {
    padding: 12px 24px;
    font-size: 1rem;
    border-left: 4px solid transparent;
}

.admin-drawer .admin-nav-item.active {
    border-left-color: var(--primary);
    background: rgba(196, 94, 0, .1);
    border-bottom: none;
}

.admin-drawer-section {
    padding: 20px 24px 8px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .3);
}

@media (max-width: 1024px) {
    .admin-nav-main {
        display: none;
    }

    .nav-hamburger {
        display: block !important;
    }

    .admin-header {
        padding: 0 20px;
    }
}

@media (min-width: 1025px) {
    .nav-hamburger {
        display: none !important;
    }
}

/* ── 17. Gestionnaire Layout ─────────────────────────────── */
.gest-header {
    background: linear-gradient(135deg, var(--accent) 0%, #1A4230 100%);
    border-radius: var(--r-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gest-header h1,
.gest-header h3 {
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 4px;
}

.gest-header p {
    color: rgba(255, 255, 255, .75);
    font-size: .88rem;
    margin: 0;
}

.gest-status-badge {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
}

/* ── 18. Terrain Layout ──────────────────────────────────── */
.terrain-body {
    background: linear-gradient(135deg, #1A1208 0%, #162447 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--font-body);
}

.terrain-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--r-xl);
    padding: 40px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}

.terrain-brand h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 4px;
}

.terrain-brand p {
    text-align: center;
    font-size: .75rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 28px;
}

.terrain-input {
    width: 100%;
    padding: 13px 18px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--r-md);
    color: #fff;
    font-size: .9rem;
    font-family: var(--font-body);
    outline: none;
    transition: all var(--transition);
}

.terrain-input:focus {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 0 0 3px rgba(224, 123, 42, .15);
}

.terrain-input::placeholder {
    color: rgba(255, 255, 255, .35);
}

.terrain-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: var(--r-md);
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 8px;
    box-shadow: 0 8px 20px rgba(196, 94, 0, .3);
}

.terrain-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(196, 94, 0, .4);
}

.terrain-error {
    background: rgba(220, 38, 38, .1);
    border: 1px solid rgba(220, 38, 38, .3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    margin-bottom: 16px;
    font-size: .85rem;
    text-align: center;
}

/* ── 19. Detail Page ─────────────────────────────────────── */
.detail-hero {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(26, 18, 8, .88) 100%),
        linear-gradient(135deg, #0B8A4B, #10A85C);
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 240px;
    margin-top: 64px;
}

.detail-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.detail-hero p {
    color: rgba(255, 255, 255, .82);
    font-size: .92rem;
    margin: 0;
}

.detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
}

.section-box {
    background: var(--surface);
    padding: 28px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.section-box h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 16px;
}

/* ── 20. Comments ────────────────────────────────────────── */
.comment-box {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    display: flex;
    gap: 12px;
}

.comment-box:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.comment-author {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.comment-text {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

.comment-date {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── 21. Preserved map/coord/horaires classes ──────────────── */
.map-section {
    position: relative;
}

#map {
    height: 420px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--border);
    overflow: hidden;
    cursor: crosshair;
}

.coord-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
}

.coord-box label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.coord-box input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Courier New', monospace;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color var(--transition);
    box-sizing: border-box;
}

.coord-box input:focus {
    border-color: var(--primary);
}

.horaires-grid {
    display: grid;
    grid-template-columns: 90px 110px 110px 60px;
    gap: 8px 10px;
    align-items: center;
    margin-top: 12px;
}

.horaires-grid .col-header {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    padding-bottom: 4px;
    border-bottom: 1.5px solid var(--border);
}

.horaires-grid label {
    font-weight: 600;
    font-size: .88rem;
}

.horaires-grid input[type="time"] {
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: .85rem;
    outline: none;
    color: var(--text);
    transition: border-color var(--transition);
}

.horaires-grid input[type="time"]:focus {
    border-color: var(--primary);
}

.horaires-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
    align-items: flex-start;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    width: 110px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-top: 2px;
}

.photo-gallery {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.photo-gallery img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    transition: transform var(--transition);
}

.photo-gallery img:hover {
    transform: scale(1.05);
}

.logo-preview {
    max-width: 130px;
    max-height: 130px;
    border-radius: var(--r-md);
    border: 2px solid var(--border);
    margin-top: 12px;
    object-fit: contain;
    padding: 8px;
    background: var(--bg);
}

.geocoder-wrap {
    position: relative;
    margin-bottom: 10px;
}

.geocoder-wrap input {
    width: 100%;
    padding: 10px 42px 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: .9rem;
    outline: none;
    transition: border-color var(--transition);
    box-sizing: border-box;
    color: var(--text);
}

.geocoder-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 94, 0, .1);
}

.geocoder-wrap .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

.btn-gps-active {
    animation: gpsPulse 1s infinite;
}

@keyframes gpsPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(196, 94, 0, .5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(196, 94, 0, 0);
    }
}

#dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--r-md);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

#dropzone:hover,
#dropzone.dragover {
    border-color: var(--primary);
    background: rgba(196, 94, 0, .04);
}

/* ── 22. Toast & Spinner ─────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--r-md);
    background: var(--text);
    color: #fff;
    font-size: .88rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    pointer-events: all;
    animation: slideIn .3s ease forwards;
    max-width: 340px;
}

.toast.success {
    background: var(--accent);
}

.toast.error {
    background: #DC2626;
}

.toast.info {
    background: var(--primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── 23. Responsive (768px) ──────────────────────────────── */
@media (max-width: 768px) {
    .hero {
        margin-top: 64px;
        min-height: 60vh;
    }

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

    .category-grid {
        gap: 10px;
    }

    .category-card {
        padding: 16px 20px;
        min-width: 100px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        padding: 0 4%;
    }

    .detail-hero {
        min-height: 180px;
    }

    footer {
        margin-top: 40px;
    }
}

/* =========================================================
   MEGA-MENU CATÉGORIES
   ========================================================= */

/* Déclencheur dans la nav */
.nav-links li.has-megamenu {
    position: static;
}

.nav-links li.has-megamenu>a::after {
    content: ' ▾';
    font-size: .7rem;
    opacity: .6;
}

/* Panneau mega-menu */
.megamenu {
    display: none;
    position: fixed;
    top: 72px;
    /* hauteur navbar */
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #0B8A4B;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
    z-index: 998;
    padding: 1.75rem 2rem;
}

.nav-links li.has-megamenu:hover .megamenu {
    display: block;
}

/* Grille 5 colonnes × 2 rangées */
.megamenu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* En-tête de colonne (catégorie) */
.megamenu-col a.megamenu-cat {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 700;
    font-size: .88rem;
    color: #111;
    text-decoration: none;
    margin-bottom: .55rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid #f0f0f0;
}

.megamenu-col a.megamenu-cat .material-icons {
    font-size: 1.05rem;
    color: #0B8A4B;
}

.megamenu-col a.megamenu-cat:hover {
    color: #0B8A4B;
}

/* Sous-catégories */
.megamenu-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-col ul li a {
    display: block;
    font-size: .82rem;
    color: #555;
    text-decoration: none;
    line-height: 1.9;
    padding-left: .2rem;
}

.megamenu-col ul li a:hover {
    color: #0B8A4B;
    padding-left: .5rem;
    transition: padding .15s;
}

/* =========================================================
   MOBILE — Accordéon catégories dans le menu slide
   ========================================================= */

.mobile-cat-section {
    margin-top: .75rem;
    border-top: 1px solid #f0f0f0;
    padding-top: .75rem;
}

.mobile-cat-section-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #999;
    padding: .25rem 1rem .5rem;
}

.mobile-cat-item {
    border-bottom: 1px solid #f5f5f5;
}

.mobile-cat-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: .6rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    color: #111;
    text-align: left;
}

.mobile-cat-toggle .cat-toggle-left {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.mobile-cat-toggle .material-icons {
    font-size: .95rem;
    color: #0B8A4B;
}

.mobile-cat-toggle .chevron {
    font-size: .8rem;
    color: #aaa;
    transition: transform .2s;
}

.mobile-cat-toggle.open .chevron {
    transform: rotate(180deg);
}

.mobile-cat-subs {
    display: none;
    padding: .25rem 1rem .5rem 2.5rem;
}

.mobile-cat-subs.open {
    display: block;
}

.mobile-cat-subs a {
    display: block;
    font-size: .83rem;
    color: #555;
    text-decoration: none;
    padding: .25rem 0;
}

.mobile-cat-subs a:hover {
    color: #0B8A4B;
}

/* ── 22. Leaflet Premium Popups & Markers ──────────────── */
.map-marker-pin {
    width: 38px;
    height: 38px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid white;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.35);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-marker-pin::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    bottom: -12px;
    left: -2px;
    transform: rotate(45deg);
    filter: blur(2px);
    z-index: -1;
}

.map-marker-pin i {
    color: white;
    font-size: 20px;
    transform: rotate(45deg);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.map-marker-pin:hover {
    transform: rotate(-45deg) translateY(-5px) scale(1.1);
    box-shadow: -4px 4px 15px rgba(0,0,0,0.4);
    z-index: 1000 !important;
}

.custom-premium-popup .leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.custom-premium-popup .leaflet-popup-content {
    margin: 0;
    width: 260px !important;
}

.premium-popup {
    font-family: var(--font-body);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.popup-img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.popup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-img .material-icons {
    font-size: 24px;
    color: var(--primary);
}

.popup-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popup-cat {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.popup-subcat {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.popup-title {
    padding: 12px 15px 5px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.popup-footer {
    padding: 10px 15px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map-status {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-open {
    color: var(--primary);
}

.status-closed {
    color: #DC2626;
}

.popup-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s;
}

.popup-link:hover {
    transform: translateX(3px);
    color: var(--accent-dark);
}

.custom-premium-popup .leaflet-popup-tip {
    background: var(--white);
}