/* assets/css/style.css - SOBER MINIMALIST & ADMIN STYLES */
@import url('https://fonts.googleapis.com/css2?family=Spline+Sans:wght@300;400;500;600&display=swap');

/* User Avatar Dropdown */
.user-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
    user-select: none;
}

.user-avatar:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    width: 200px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 8px 0;
    z-index: 1001;
}

.user-dropdown-menu.show {
    display: flex;
}

.user-dropdown-menu a {
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.user-dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--accent);
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

:root {
    --primary: #1e1e1e;
    /* Very Dark Grey */
    --secondary: #4a4a4a;
    /* Dark Grey */
    --accent: #12295e;
    /* Navy Blue (Slate 900) */
    /* Professional Navy Blue */
    --accent-hover: #1e293b;
    --bg-body: #ffffff;
    --bg-light: #f8f9fa;
    --border: #e2e8f0;
    --text-main: #333333;
    --text-muted: #666666;

    --radius: 6px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Spline Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
    margin-top: 100px;
}

@media (max-width: 768px) {
    body {
        margin-top: 80px;
    }
}

/* === UTILS === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* === LAYOUT === */
section {
    padding: 40px 0;
    /* Reduced from 60px */
}

section.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: var(--primary);
    /* Fallback */
    padding: 0;
    position: relative;
    background-size: cover;
    background-position: center;
}

section.page-header {
    min-height: 40vh;
    /* Smaller height for subpages */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: var(--primary);
    padding: 0;
    position: relative;
    background-size: cover;
    background-position: center;
}

section.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

/* === CONTACT & INFO GRIDS === */
.info-grid,
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.phone-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.icon-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.icon-box i {
    font-size: 1.2rem;
    color: var(--accent);
    background: #e0e7ff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === FORM AUTH === */
.form-container {
    max-width: 450px;
    width: 90%;
    margin: 80px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

/* === HEADER === */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
}


.header-index {
    z-index: 1000;
}

nav {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 90px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    padding: 10px 20px;
    background: var(--accent);
    color: white !important;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

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

.btn-secondary {
    background: white;
    color: black !important;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* === VALUES GRID (Explicit 3 columns) === */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* === SERVICES & CARDS === */
.services-grid,
.dashboard-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card,
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    /* Reduced from 25px */
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.service-card:hover,
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.service-card img {
    width: 100%;
    height: 140px;
    /* Reduced from 180px */
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.service-card h3 {
    margin: 10px 0;
    color: var(--primary);
}

/* === FORMS === */
input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-top: 5px;
    margin-bottom: 15px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 89, 217, 0.1);
}

label {
    font-weight: 500;
    color: var(--secondary);
    font-size: 0.9rem;
}

/* === FOOTER (Style "d'avant" - Simple Dark) === */
footer {
    background: #111;
    color: #ccc;
    padding: 50px 0 20px;
    margin-top: auto;
    font-size: 0.9rem;
}

footer h3,
footer h4 {
    color: white;
    margin-bottom: 20px;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

footer a:hover {
    color: white;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 10px;
}

footer i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* === UTILS === */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.elfsight-widget-container {
    width: 100%;
    min-height: 600px;
    border: none;
    overflow: hidden;
}

/* === ADMIN STYLES === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    /* Default Sidebar Width */
    gap: 0;
    min-height: calc(100vh - 71px);
    /* Header height approx */
    transition: grid-template-columns 0.3s ease;
}

/* Sidebar */
.sidebar {
    background: #f1f5f9;
    padding: 20px;
    border-right: 1px solid var(--border);
    height: 100%;
    transition: width 0.3s ease;
}

.sidebar h3 {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.sidebar ul {
    list-style: none;
}

.sidebar li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 5px;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar li a:hover,
.sidebar li a.active {
    background: white;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.sidebar li a i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Main Content Admin */
.main-content {
    padding: 30px;
    background: white;
    overflow-y: auto;
}

/* Tables Admin */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

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

tr:hover {
    background: #fdfdfd;
}

/* Sidebar Collapsed State */
.dashboard-grid.collapsed {
    grid-template-columns: 70px 1fr;
}

.dashboard-grid.collapsed .sidebar {
    padding: 20px 10px;
    text-align: center;
}

.dashboard-grid.collapsed .sidebar h3,
.dashboard-grid.collapsed .sidebar span {
    display: none;
}

.dashboard-grid.collapsed .sidebar li a {
    justify-content: center;
    padding: 12px 0;
}

.dashboard-grid.collapsed .sidebar li a i {
    margin-right: 0;
    font-size: 1.2rem;
}

/* Fixed Devis Button */
.appointment-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.appointment-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.fixed-devis-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
}

.fixed-devis-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* === SEARCH BAR === */
.search-bar-container {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    margin: 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.search-clear:hover {
    background: #cbd5e1;
    color: #334155;
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 20px;
}

.no-results-message i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
}

/* Mobile */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix Info Pratiques cards overflow AND Dashboard/Contact */
    .dashboard-grid,
    .info-grid,
    .about-grid,
    .values-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        width: 100%;
        max-width: 100%;
    }

    .service-card,
    .card {
        max-width: 100% !important;
        /* Prevent cards from being wider than screen */
        margin-left: auto;
        margin-right: auto;
    }

    .card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    table {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Make all images responsive */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Hero Section */
    section.hero h1 {
        font-size: 2.5rem !important;
    }

    section.hero p {
        font-size: 1rem !important;
    }

    section.hero {
        min-height: 60vh !important;
        padding: 40px 20px !important;
    }

    /* Page Header */
    section.page-header {
        min-height: 30vh !important;
    }

    section.page-header h1 {
        font-size: 2rem !important;
    }

    /* Navigation */
    nav {
        height: 80px !important;
        padding: 0 15px !important;
    }

    .logo img {
        height: 60px !important;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        gap: 10px;
    }

    .nav-links.active li {
        width: 100%;
    }

    .nav-links.active a {
        display: block;
        padding: 12px 15px;
        border-radius: 6px;
        transition: background 0.2s;
    }

    .nav-links.active a:hover {
        background: #f8f9fa;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    /* User Dropdown on Mobile */
    .user-dropdown-container {
        position: relative;
    }

    .user-dropdown-menu {
        position: absolute;
        right: 0;
        top: 50px;
        width: 200px;
    }

    .main-content {
        padding: 15px !important;
    }
}

/* === CLIENT MENU (Mobile Drawer) === */
.client-menu-toggle {
    width: 90px;
    height: 45px;
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 25px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-weight: 600;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.client-menu-toggle:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.client-menu-close {
    display: none;
    /* Hidden on desktop */
}

.client-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
}

.client-sidebar-overlay.active {
    display: block;
}

/* Mobile Client Sidebar Overrides */
@media (max-width: 768px) {
    .client-menu-toggle {
        display: flex;
        /* Show toggle */
    }

    .client-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        /* Hidden off-screen */
        width: 260px;
        height: 100vh;
        background: white;
        z-index: 999;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        display: block !important;
        /* Force block in case other styles hide it */
    }

    .client-sidebar.active {
        left: 0;
        /* Slide in */
    }

    .client-sidebar-container {
        padding-top: 80px;
    }

    .client-menu-close {
        display: block;
        position: absolute;
        top: 100px;
        right: 15px;
        background: transparent;
        border: none;
        color: var(--secondary);
        font-size: 1.5rem;
        cursor: pointer;
    }
}


/* Cards & Grids */
.card-grid,
.services-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
}

.service-card {
    min-width: 100% !important;
}

.main-content {
    padding: 15px !important;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
    padding: 25px;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    justify-content: center;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-text h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.cookie-text p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.btn-accept {
    background: var(--accent);
    color: white;
}

.btn-accept:hover {
    background: #e8e9ed;
    color: var(--accent);
}

.btn-decline {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-decline:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .cookie-actions {
        width: 100%;
    }

    .btn-cookie {
        flex: 1;
        text-align: center;
    }
}
/* === BOOKING & GUEST NOTICE === */
.guest-notice-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 5px solid #0ea5e9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    align-items: start;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1);
    animation: fadeIn 0.4s ease-out;
}

.guest-notice-icon {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #0ea5e9;
    font-size: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.guest-notice-content h3 {
    margin: 0 0 8px 0;
    color: #0c4a6e;
    font-size: 1.2rem;
}

.guest-notice-content p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
}

.guest-notice-actions {
    margin-top: 15px;
    display: flex;
    gap: 20px;
}

.guest-notice-link {
    font-weight: 600;
    color: #0284c7;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.guest-notice-link:hover {
    color: #0369a1;
    transform: translateX(3px);
}

/* Mobile Adjustments for Guest Notice */
@media (max-width: 600px) {
    .guest-notice-card {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .guest-notice-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .guest-notice-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .guest-notice-link {
        background: white;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #e0f2fe;
    }
}

/* Booking Form Mobile Tweaks */
@media (max-width: 768px) {
    .vehicle-select-grid, 
    .service-select-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .slots-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    
    .step-badge {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .form-row-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .vehicle-select-grid, 
    .service-select-grid {
        grid-template-columns: 1fr !important;
    }
    
    .slots-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

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