:root {
    --primary: #1e2a38;
    --primary-light: #2a3a4d;
    --primary-dark: #141c26;
    --accent: #c8a96e;
    --bg: #f8f9fa;
    --text: #212529;
    --muted: #6c757d;
    --border: #dee2e6;
    --card-shadow: 0 1px 3px rgba(30, 42, 56, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-dark {
    background: var(--primary) !important;
}

.navbar-brand, .nav-link {
    color: rgba(255,255,255,0.9) !important;
}

.nav-link:hover { color: #fff !important; }

.btn-nav-register {
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 4px 12px !important;
    margin-left: 4px;
}

.btn-nav-prestataire {
    background: var(--accent);
    color: var(--primary) !important;
    border-radius: 6px;
    padding: 4px 12px !important;
    font-weight: 600;
}

.btn-nav-prestataire:hover {
    background: #d4b87a !important;
    color: var(--primary) !important;
}

/* Buttons */
.btn-primary, .btn-primary-custom {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover, .btn-primary-custom:hover,
.btn-primary:focus, .btn-primary-custom:focus {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
}

.btn-outline-primary-custom {
    color: var(--primary);
    border-color: var(--primary);
}

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

.text-primary-custom { color: var(--primary) !important; }

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

/* Hero search */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 3rem 0;
}

.hero-section h1 { font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.25rem); }

.search-box {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-box input, .search-box select {
    border: 1px solid var(--border);
    border-radius: 8px;
}

.btn-near-me {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.btn-near-me:hover { background: #d4b87a; color: var(--primary); }

/* Cards */
.prestataire-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.prestataire-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 42, 56, 0.12);
}

.card-img-top-wrap {
    display: block;
    height: 140px;
    overflow: hidden;
    background: #eee;
}

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

.card-link { color: var(--primary); font-weight: 600; }

.badge-cat {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    font-size: 0.7rem;
}

/* Category grid */
.cat-grid .cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.75rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cat-grid .cat-item:hover {
    border-color: var(--primary);
    box-shadow: var(--card-shadow);
    color: var(--primary);
}

.cat-grid .cat-item i { font-size: 1.75rem; color: var(--primary); margin-bottom: 0.5rem; }

/* Prestataire detail */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0.25rem;
}

.contact-btn-call { background: var(--primary); color: #fff; }
.contact-btn-call-white:hover { color: #fff !important}
.contact-btn-email-white:hover { color: #fff !important}
.contact-btn-wa { background: #25d366; color: #fff; }
.contact-btn-email { background: #555; color: #fff; }
.contact-btn-web { background: var(--accent); color: var(--primary); }
.contact-btn-social { background: #eee; color: var(--primary); }

.contact-btn:hover { opacity: 0.9; color: inherit; }

.gallery-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* GPS picker - ultra simple */
.gps-section {
    background: #fff;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.gps-big-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.gps-big-btn:hover { background: var(--primary-light); }

.gps-big-btn i { font-size: 1.5rem; }

.gps-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.gps-status.success { background: #d1e7dd; color: #0f5132; }
.gps-status.error { background: #f8d7da; color: #842029; }
.gps-status.info { background: #e2e3e5; color: #41464b; }

.map-preview {
    height: 200px;
    border-radius: 8px;
    background: #e9ecef;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.map-preview iframe { width: 100%; height: 100%; border: 0; }

/* Admin */
.admin-sidebar {
    background: var(--primary);
    min-height: 100vh;
    color: #fff;
    width: 240px;
    flex-shrink: 0;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin: 2px 8px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
}

.admin-layout { display: flex; min-height: 100vh; }
.admin-content { flex: 1; padding: 1.5rem; background: var(--bg); }

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.stat-card .stat-num { font-size: 2rem; font-weight: 700; color: var(--primary); }

.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    margin-top: 3rem;
}

.site-footer h5 { color: #fff; }

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 42, 56, 0.15);
}

.form-label { font-weight: 500; font-size: 0.9rem; }

/* Search results live */
.search-results-live {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results-live.show { display: block; }

.search-results-live a {
    display: block;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #f0f0f0;
}

.search-results-live a:hover { background: #f8f9fa; }

/* Pagination */
.page-link { color: var(--primary); }
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Status badges prestataire */
.status-pending { background: #ffc107; color: #000; }
.status-active { background: #198754; color: #fff; }
.status-hidden { background: #6c757d; color: #fff; }
.status-inactive { background: #fd7e14; color: #fff; }
.status-deactivated { background: #dc3545; color: #fff; }
.status-approved { background: #198754; color: #fff; }
.status-rejected { background: #dc3545; color: #fff; }

/* Responsive perf: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .prestataire-card { transition: none; }
}

@media (max-width: 768px) {
    .hero-section { padding: 2rem 0; }
    .admin-sidebar { width: 100%; min-height: auto; }
    .admin-layout { flex-direction: column; }
}
