/* --- DESIGN SYSTEM VARIANCE (Client) --- */
:root {
    --brand-primary: #3B82F6;
    /* Bleu Variance */
    --brand-dark: #0F172A;
    --brand-accent: #F59E0B;
    /* Orange */
    --brand-success: #10B981;
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-500: #64748B;
    --slate-800: #1E293B;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--slate-800);
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* --- NAVBAR --- */
.navbar-glass {
    background: rgba(255, 255, 255, 0.85);
    /* Plus de transparence */
    backdrop-filter: blur(16px);
    /* Flou plus prononcé "Apple-like" */
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    /* Ombre très subtile */
}

.logo-box {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #4F46E5 100%);
    border-radius: 10px;
    /* Arrondi un peu plus doux */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
    /* Glow subtil */
}

/* --- HERO SECTION --- */
.hero-client {
    position: relative;
    padding-top: 180px;
    /* Plus d'espace */
    padding-bottom: 120px;
    background-color: var(--slate-50);
    overflow: hidden;
}

/* Image de fond Hero */
.hero-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1560066984-138dadb4c035?q=80&w=1974&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    z-index: 0;
    opacity: 0.9;
}

/* --- SEARCH BAR (Le coeur de la page) --- */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
    /* Ombre plus profonde et diffuse */
    padding: 0.75rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-container:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 35px 60px -15px rgba(15, 23, 42, 0.2);
}

.search-input-group {
    flex: 1;
    position: relative;
    padding: 0.5rem 1.25rem;
    border-right: 1px solid var(--slate-200);
}

.search-input-group:last-of-type {
    border-right: none;
}

.search-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-field {
    border: none;
    width: 100%;
    font-weight: 600;
    color: var(--slate-800);
    outline: none;
    font-size: 1.1rem;
    /* Texte un peu plus grand */
    background: transparent;
    padding: 0;
}

.search-field::placeholder {
    color: var(--slate-400);
    font-weight: 500;
}

.btn-search {
    background-color: var(--brand-primary);
    color: white;
    font-weight: 700;
    padding: 1rem 2.5rem;
    /* Bouton plus imposant */
    border-radius: 1rem;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.btn-search:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.5);
}

/* --- CATEGORIES --- */
.category-item {
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-icon {
    width: 88px;
    height: 88px;
    background-color: white;
    border-radius: 24px;
    /* Squircle (Carré arrondi) au lieu de rond pour plus de modernité */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    /* Prêt pour le hover */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--slate-500);
}

.category-item:hover .category-icon {
    transform: translateY(-8px);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.15);
}

.category-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--slate-800);
    transition: color 0.2s;
}

.category-item:hover .category-label {
    color: var(--brand-primary);
}

/* --- SALON CARDS --- */
.salon-card {
    border: 1px solid var(--slate-100);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    height: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.salon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.salon-img-container {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.salon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.salon-card:hover .salon-img {
    transform: scale(1.1);
}

.badge-promo {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(16, 185, 129, 0.9);
    /* Transparence légère */
    backdrop-filter: blur(4px);
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.rating-badge {
    background-color: var(--brand-dark);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* --- PROFILE PAGE SPECIFIC --- */

/* Gallery Grid */
.gallery-img {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-img:hover {
    filter: brightness(0.9);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gallery-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Service Items */
.service-item {
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.service-item:hover {
    background-color: var(--slate-50);
}

.btn-add {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.service-item:hover .btn-add {
    opacity: 1;
    transform: translateX(0);
}

/* Utilities */
.object-fit-cover {
    object-fit: cover;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.shadow-custom-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-brand {
    background-color: var(--brand-primary);
    color: white;
    font-weight: 700;
    transition: all 0.2s;
    border: none;
}

.btn-brand:hover {
    background-color: #2563EB;
    color: white;
    transform: translateY(-1px);
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .hero-bg-image {
        display: none;
    }

    .hero-client {
        padding-top: 120px;
        padding-bottom: 60px;
        text-align: center;
    }

    .search-container {
        flex-direction: column;
        padding: 1.25rem;
        gap: 1rem;
    }

    .search-input-group {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--slate-100);
        padding: 0.5rem 0;
    }

    .search-input-group:last-of-type {
        border-bottom: none;
    }

    .btn-search {
        width: 100%;
    }
}

/* --- SKELETON LOADING --- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    pointer-events: none;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 0.25rem;
}

.skeleton-circle {
    border-radius: 50%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* --- ACTIVITY FEED --- */
.activity-feed-item {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid #E2E8F0;
}

.activity-feed-item:last-child {
    border-left-color: transparent;
}

.activity-dot {
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #E2E8F0;
}

/* --- PLANNING ACCIDENTS --- */
.appt-accident {
    background-color: #FEF2F2;
    border-color: #EF4444;
    color: #991B1B;
    background-image: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.1) 0px, rgba(239, 68, 68, 0.1) 10px, transparent 10px, transparent 20px);
}

/* --- MANAGER LAYOUT --- */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #E2E8F0;
    background: white;
    z-index: 1000;
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
}

.nav-link-pro {
    color: #64748B;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
    text-decoration: none;
}

.nav-link-pro:hover,
.nav-link-pro.active {
    background-color: #EFF6FF;
    color: var(--brand-primary);
}

.nav-link-pro svg {
    width: 20px;
    height: 20px;
}

/* --- UI COMPONENTS (Manager) --- */
.toggle-switch {
    width: 48px;
    height: 24px;
    background: #E2E8F0;
    border-radius: 99px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--brand-success);
}

.toggle-knob {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(24px);
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.2s;
}

/* --- POS (POINT OF SALE) --- */
.pos-layout {
    height: 100vh;
    overflow: hidden;
    background-color: #F1F5F9;
}

.pos-grid-container {
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.pos-ticket-sidebar {
    height: 100vh;
    background: white;
    border-left: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
}

.pos-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    /* Touch optimization */
}

.pos-card:active {
    transform: scale(0.96);
}

.pos-card.selected {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary);
}

.pos-category-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    background: white;
    border: 1px solid #E2E8F0;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-category-btn.active {
    background: var(--brand-dark);
    color: white;
    border-color: var(--brand-dark);
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #F1F5F9;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    /* --- REVIEW PAGE --- */
    .star-rating-container {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .star-input {
        cursor: pointer;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        color: #E2E8F0;
    }

    .star-input:hover,
    .star-input.active {
        color: #F59E0B;
        transform: scale(1.2);
    }

    .tip-btn {
        border: 1px solid #E2E8F0;
        background: white;
        border-radius: 99px;
        padding: 0.5rem 1rem;
        font-weight: 600;
        transition: all 0.2s;
        color: var(--slate-800);
    }

    .tip-btn:hover,
    .tip-btn.active {
        background: var(--brand-dark);
        color: white;
        border-color: var(--brand-dark);
        transform: translateY(-2px);
    }