﻿/* ------------------------------------------------------------------
   Design system CashSystem Suite (FINAL CLEAN)
------------------------------------------------------------------- */
:root {
    --cs-primary: #12D6A7;
    --cs-primary-dark: #0CB58C;
    --cs-bg-page: #F5F7FB;
    --cs-text-main: #111827;
    --cs-text-muted: #6B7280;
    --cs-border-subtle: #E5E7EB;
    --cs-table-free: #3B82F6;
    --cs-table-busy: #FBBF24;
    --cs-table-ready: #10B981;
    --cs-danger: #EF4444;
    --cs-accent: #A62B62;
    --accent-mauve: #D64B7F;
    --topbar-height: 60px;
    --topbar-bg: #16161f;
}

/* ------------------------------------------------------------------
   Global
------------------------------------------------------------------- */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;
    background: var(--cs-bg-page);
    color: var(--cs-text-main);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
}

#app, .app, main {
    height: 100%;
}

a, .btn-link {
    color: var(--cs-primary-dark);
    text-decoration: none;
}

    a:hover, .btn-link:hover {
        color: var(--cs-primary);
        text-decoration: underline;
    }

.content {
    padding-top: 0;
}

h1:focus {
    outline: none;
}

/* Validations */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Boutons Bootstrap re-thémés */
.btn-primary {
    color: #fff;
    background-color: var(--cs-primary);
    border-color: var(--cs-primary-dark);
}

    .btn-primary:hover {
        background-color: var(--cs-primary-dark);
        border-color: var(--cs-primary-dark);
    }

.btn-success {
    background-color: var(--cs-table-ready);
    border-color: #059669;
    color: #fff;
}

    .btn-success:hover {
        background-color: #059669;
        border-color: #047857;
    }

.btn-warning {
    background-color: var(--cs-table-busy);
    border-color: #F59E0B;
    color: #111827;
}

    .btn-warning:hover {
        background-color: #F59E0B;
        border-color: #D97706;
        color: #111827;
    }

.btn-danger {
    background-color: var(--cs-danger);
    border-color: #B91C1C;
    color: #fff;
}

    .btn-danger:hover {
        background-color: #B91C1C;
        border-color: #991B1B;
        color: #fff;
    }

/* Blazor error */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: #fff;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* ------------------------------------------------------------------
   NAV / SIDEBAR (si tu veux masquer la sidebar partout)
------------------------------------------------------------------- */
.page {
    min-height: 100vh;
}

.sidebar {
    display: none !important;
}

.navbar-dark {
    background: transparent;
    border-bottom: none;
}

.navbar-brand {
    padding: 18px 12px;
}

    .navbar-brand img {
        display: block;
        max-height: 40px;
        margin: 0 auto;
    }

.nav-scrollable {
    padding-top: 8px;
}

.nav .nav-link {
    color: rgba(255,255,255,.7);
    border-radius: 999px;
    padding: 8px 14px;
    margin: 4px 6px;
    font-size: .95rem;
    position: relative;
}

    .nav .nav-link:hover {
        color: #fff;
        background-color: rgba(255,255,255,.06);
    }

    .nav .nav-link.active {
        color: #fff;
        background-color: rgba(255,255,255,.08);
        font-weight: 600;
    }

        .nav .nav-link.active::before {
            content: "";
            position: absolute;
            left: 6px;
            top: 8px;
            bottom: 8px;
            width: 3px;
            border-radius: 999px;
            background: var(--cs-primary);
        }

/* ------------------------------------------------------------------
   FORMS
------------------------------------------------------------------- */
.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--cs-text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

input[readonly] {
    opacity: .75;
    cursor: default;
}

/* ------------------------------------------------------------------
   TOPBAR - PREMIUM DARK
------------------------------------------------------------------- */
.topbar {
    margin: 5px 5px 0 5px;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    color: #fff;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    /* ✅ Premium Dark gradient */
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05), inset 0 -1px 0 rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.04);
}

    /* ✅ Ligne accent en haut */
    .topbar::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(166,43,98,0.6) 50%, transparent 100%);
    }

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ✅ Logo avec glow */
.topbar-logo {
    height: 50px;
    max-height: 100%;
    width: auto;
    object-fit: contain;
    margin-left: 1px;
    filter: drop-shadow(0 0 8px rgba(166,43,98,0.3));
}

/* Si c'est un div logo (pas une image) */
.topbar-logo-box {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #a62b62, #d64b7f);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(166,43,98,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.topbar-title-simple {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .3px;
    margin-left: 6px;
    white-space: nowrap;
}

/* ✅ Pills */
.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: #9ca3af;
    font-size: .9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
}

button.topbar-pill {
    cursor: pointer;
    outline: none;
}

    button.topbar-pill:hover {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.12);
        color: #fff;
        transform: translateY(-1px);
    }

/* ✅ Zones (badges) */
.topbar-badge {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: #9ca3af;
    font-size: .85rem;
    transition: all 0.15s ease;
}

button.topbar-badge {
    cursor: pointer;
    outline: none;
}

    button.topbar-badge:hover {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.12);
        color: #fff;
        transform: translateY(-1px);
    }

/* ✅ Zone active avec glow accent */
.topbar-area-badge-active {
    position: relative;
    background: rgba(166,43,98,0.15) !important;
    border: 1px solid rgba(166,43,98,0.4) !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(166,43,98,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ✅ Stats pill */
.topbar-stats {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    color: #9ca3af;
    font-size: .85rem;
}

/* ✅ Clock */
.topbar-clock {
    font-weight: 600;
    font-size: .9rem;
    color: #6b7280;
    margin-left: 6px;
}

/* ✅ ÉDITION OFF/ON */
.topbar-edit-badge,
.topbar-edit-off,
.topbar-edit-on {
    color: #d1d5db !important;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .85rem;
    transition: all 0.15s ease;
}

.topbar-edit-off {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d1d5db !important;
}

    .topbar-edit-off:hover {
        border-color: rgba(166,43,98,0.4);
        color: #fff !important;
    }

.topbar-edit-on {
    background: rgba(166,43,98,0.3);
    border: 1px solid rgba(166,43,98,0.5);
    color: #fff !important;
    box-shadow: 0 0 15px rgba(166,43,98,0.25);
}

/* Bouton retour "Plan de salle" */
.btn-outline-accent {
    border-radius: 999px;
    border: 2px solid var(--cs-accent);
    color: #fff;
    background: transparent;
    padding: 4px 18px;
    font-weight: 500;
}

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

/* Palette décors */
.decor-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.decor-choice {
    border: none;
    background: transparent;
    padding: 2px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease,transform .12s ease;
}

.decor-choice-icon {
    display: block;
    width: 26px;
    height: 26px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.20);
}

.decor-choice:hover .decor-choice-icon {
    transform: translateY(-1px);
}

.decor-choice-active .decor-choice-icon {
    box-shadow: 0 0 0 2px var(--cs-accent);
}

.decor-icon-plant {
    background-image: url("/images/decor/plant.png");
}

.decor-icon-bar {
    background-image: url("/images/decor/bar.png");
}

.decor-icon-cashdesk {
    background-image: url("/images/decor/cashdesk.png");
}

.decor-icon-wall {
    background-image: url("/images/decor/wall.png");
}

/* ------------------------------------------------------------------
   FLOORPLAN (FINAL)
------------------------------------------------------------------- */
.floorplan-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fond global optionnel (si tu utilises plan.png) */
.app-background {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f5f1e8;
    background-image: url("plan.png");
    background-repeat: repeat;
    background-size: 480px 480px;
    background-position: center;
}

.app-shell {
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Empêcher le zoom accidentel sur tablette */
input, select, textarea, button {
    font-size: 16px !important; /* iOS ne zoom pas si >= 16px */
}

/* Désactiver le double-tap zoom */
* {
    touch-action: manipulation;
}

/* ✅ FOND INCHANGÉ */
.floorplan-container {
    position: relative;
    min-height: calc(100vh - 80px);
    padding: 2.5rem 3rem 3rem;
    border-radius: 24px;
    background: radial-gradient(circle at top left,#f9fafb,#e5e7eb);
    overflow: hidden;
    touch-action: none;
    border: none;
    box-shadow: none;
}

/* ------------------------------------------------------------------
   TABLES - STYLE A AMÉLIORÉ
------------------------------------------------------------------- */
.floorplan-table-card {
    position: absolute;
    border: none;
    border-radius: 14px;
    padding: .6rem .8rem;
    min-width: 100px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease-out, box-shadow .15s ease-out, background .15s;
}

/* ✅ Table LIBRE - Blanc élégant */
.floorplan-table-free {
    background: white;
    color: #374151;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.04);
}

    .floorplan-table-free:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
    }

/* ✅ Table OCCUPÉE / EN PRÉPARATION - Orange dégradé */
.floorplan-table-busy {
    background: linear-gradient(135deg, #ff9f43 0%, #ee7a30 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(238,122,48,0.35), 0 2px 6px rgba(238,122,48,0.2), inset 0 1px 0 rgba(255,255,255,0.25);
}

    .floorplan-table-busy:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(238,122,48,0.45), 0 4px 10px rgba(238,122,48,0.25);
    }

/* ✅ Table PRÊTE À SERVIR - Vert vif */
.floorplan-table-ready {
    background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(32,191,107,0.35), 0 2px 6px rgba(32,191,107,0.2), inset 0 1px 0 rgba(255,255,255,0.25);
}

    .floorplan-table-ready:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(32,191,107,0.45), 0 4px 10px rgba(32,191,107,0.25);
    }

/* ✅ Table SERVIE - Vert clair calme */
.floorplan-table-served {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    color: #2d6a4f;
    box-shadow: 0 4px 12px rgba(136,216,176,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
}

    .floorplan-table-served:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(136,216,176,0.35);
    }

/* ✅ Animation pulsation améliorée */
.floorplan-table-pulse {
    animation: tablePulseNew 2s ease-in-out infinite;
}

@keyframes tablePulseNew {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* ✅ Animation spéciale pour tables prêtes (plus visible) */
.floorplan-table-ready.floorplan-table-pulse {
    animation: readyPulse 1.5s ease-in-out infinite;
}

@keyframes readyPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 20px rgba(32,191,107,0.35);
    }

    50% {
        transform: translateY(-4px);
        box-shadow: 0 14px 32px rgba(32,191,107,0.5);
    }
}

/* Text */
.floorplan-table-name {
    font-weight: 600;
    font-size: 1rem;
}

.floorplan-table-status-small {
    font-size: .8rem;
    opacity: .9;
    margin-top: 2px;
}

.floorplan-table-body {
    margin-top: .4rem;
    font-size: .86rem;
}

.floorplan-table-capacity {
    opacity: .9;
}

.floorplan-table-status {
    font-size: .8rem;
    opacity: .95;
}

/* ✅ Badge commande amélioré */
.floorplan-order-badge,
.floorplan-table-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Badge sur table libre */
.floorplan-table-free .floorplan-order-badge,
.floorplan-table-free .floorplan-table-badge {
    background: #ee7a30;
    color: white;
}

/* Formes */
.floorplan-table-rect {
    border-radius: 14px;
}

.floorplan-table-round {
    border-radius: 999px;
    min-width: 70px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floorplan-table-highstool {
    border-radius: 10px;
    min-width: 50px;
    min-height: 50px;
    padding: .4rem;
    font-size: .75rem;
}

.floorplan-table-resize-handle {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,.8);
    background: rgba(15,23,42,.3);
    cursor: se-resize;
}

/* ------------------------------------------------------------------
   DÉCORS AMÉLIORÉS
------------------------------------------------------------------- */
.floorplan-decor {
    position: absolute;
    border-radius: 8px;
    background: rgba(15,23,42,.08);
    border: 1px solid rgba(15,23,42,.25);
    box-shadow: 0 8px 20px rgba(15,23,42,.25);
    cursor: move;
}

/* ✅ Murs */
.floorplan-decor-rect {
    background: linear-gradient(135deg, #c5d0e6 0%, #b8c5db 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.5);
}

.floorplan-decor-circle {
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%,#fff,#94a3b8);
}

/* ✅ Portes */
.floorplan-decor-door {
    border-radius: 6px;
    background: linear-gradient(180deg, #a67c52 0%, #8b6543 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

    .floorplan-decor-door::after {
        content: "";
        position: absolute;
        right: 8px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #2d2d2d;
        transform: translateY(-50%);
    }

.floorplan-decor-selected {
    box-shadow: 0 0 0 2px var(--cs-accent),0 10px 26px rgba(15,23,42,.35);
}

.floorplan-decor-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #111827;
    bottom: -6px;
    right: -6px;
    box-shadow: 0 0 0 2px rgba(15,23,42,.4);
    cursor: se-resize;
}

.floorplan-decor-icon {
    display: block;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.floorplan-decor-label {
    font-weight: 500;
    font-size: .75rem;
}

/* ✅ Plantes */
.floorplan-decor-plant {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.4);
    box-shadow: 0 4px 12px rgba(34,197,94,0.1);
}

.floorplan-decor-bar {
    background: rgba(59,130,246,.08);
    border-color: rgba(59,130,246,.7);
}

.floorplan-decor-wall {
    background: rgba(15,23,42,.08);
    border-style: solid;
}

.floorplan-decor-cashdesk {
    background: rgba(250,204,21,.14);
    border-color: rgba(250,204,21,.8);
}

/* ------------------------------------------------------------------
   ORDER / TABLEORDER
------------------------------------------------------------------- */
.order-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 260px minmax(0,1.4fr) 360px;
    gap: 1.5rem;
    padding: 1rem 3rem 1rem;
    overflow: hidden;
    height: calc(100vh - var(--topbar-height) - 1rem);
    max-height: calc(100vh - var(--topbar-height) - 1rem);
}

.order-panel {
    background: #fff;
    border-radius: 22px;
    padding: 1.3rem 1.3rem 1.4rem;
    box-shadow: 0 18px 40px rgba(15,23,42,.08);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.order-panel-right {
    display: flex;
    flex-direction: column;
}

.order-panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 8px;
}

.order-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.order-meta {
    font-size: .85rem;
    color: #6b7280;
}

.order-total-line {
    font-size: 1.2rem;
    font-weight: 600;
}

.order-actions {
    margin-top: auto;
    padding-top: 12px;
    flex-shrink: 0;
    background: #fff;
}

    .order-actions .btn {
        border-radius: 999px;
        padding-block: .7rem;
        font-weight: 500;
    }

.order-layout > .order-panel:first-child {
    overflow-y: auto;
}

/* Supprime le cadre blanc derrière les produits (colonne du milieu si besoin) */
.order-layout > .order-panel:nth-child(2) {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow-y: auto;
}

.order-layout > .order-panel:last-child {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Liste */
.list-group-item {
    border-radius: 12px !important;
    margin-bottom: .9rem;
}

/* ------------------------------------------------------------------
   PRODUITS (boutons)
------------------------------------------------------------------- */
.product-btn {
    border-radius: 18px;
    border: 2px solid transparent !important;
    padding: .8rem .9rem;
    font-size: .9rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .15rem;
    background-color: #fff !important;
    box-shadow: 0 10px 24px rgba(214,75,127,.08);
    transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .12s, border-color .12s;
    outline: none !important;
    background-image: none !important;
}

    .product-btn .fw-bold {
        font-size: .95rem;
        color: var(--cs-accent);
    }

    /* Hover mauve */
    .product-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(214,75,127,.20);
        background-color: var(--cs-accent) !important;
        border-color: var(--cs-accent) !important;
    }

        .product-btn:hover .fw-bold,
        .product-btn:hover .price {
            color: #fff !important;
        }

    /* Sélectionné mauve fixe */
    .product-btn.active {
        background-color: var(--cs-accent) !important;
        border-color: var(--cs-accent) !important;
    }

        .product-btn.active .fw-bold,
        .product-btn.active .price {
            color: #fff !important;
        }

    /* Focus (supprime le bleu Bootstrap) */
    .product-btn:focus,
    .product-btn:focus-visible {
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(214,75,127,.35) !important;
    }

/* ------------------------------------------------------------------
   SOUS-CATÉGORIES
------------------------------------------------------------------- */
.subcategory-chip {
    position: relative;
    overflow: hidden;
    background-color: transparent !important;
    border: 2px solid transparent !important;
    color: var(--cs-text-main) !important;
    border-radius: 999px;
    padding: 6px 14px;
    min-width: 90px;
    font-size: .9rem;
    transition: background-color .25s ease,color .2s ease,transform .15s ease,border-color .2s ease,box-shadow .2s ease;
}

    .subcategory-chip:not(.subcategory-chip-active):hover {
        background-color: rgba(214,75,127,.08) !important;
        transform: translateY(-1px);
    }

.subcategory-chip-active {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    background-color: transparent !important;
    border: 2px solid var(--accent-mauve) !important;
    outline: none !important;
    transform: translateY(-1px);
}

    .subcategory-chip-active,
    .subcategory-chip-active * {
        position: relative;
        z-index: 1;
        color: var(--cs-text-main) !important;
        -webkit-text-fill-color: var(--cs-text-main) !important;
    }

/* ------------------------------------------------------------------
   CATEGORIES (colonne gauche)
------------------------------------------------------------------- */
@keyframes mauveGlow {
    0% {
        box-shadow: 0 0 0 rgba(214,75,127,.15),0 8px 20px rgba(0,0,0,.35);
    }

    50% {
        box-shadow: 0 0 16px 3px rgba(214,75,127,.55),0 14px 32px rgba(0,0,0,.55);
    }

    100% {
        box-shadow: 0 0 0 rgba(214,75,127,.15),0 8px 20px rgba(0,0,0,.35);
    }
}

.order-layout > .order-panel:first-child .list-group-item {
    border-radius: 999px !important;
    border: 0 !important;
    background-color: transparent !important;
    color: var(--cs-text-main) !important;
    font-weight: 500;
    padding: 8px 14px;
    transition: background-color .2s ease, color .2s ease, transform .15s ease;
}

    .order-layout > .order-panel:first-child .list-group-item:not(.active):hover {
        background-color: rgba(214,75,127,.08) !important;
        transform: translateY(-1px);
    }

    .order-layout > .order-panel:first-child .list-group-item.active {
        border-radius: 999px;
        border: 2px solid var(--cs-accent) !important;
        background-color: rgba(214,75,127,.08) !important;
        color: var(--cs-text-main) !important;
    }

/* ------------------------------------------------------------------
   PAYTABLE
------------------------------------------------------------------- */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
    gap: 24px;
    margin-top: 8px;
}

.checkout-total {
    font-weight: 700;
    letter-spacing: .03em;
}

.checkout-pay-buttons .btn-lg {
    padding-top: .9rem;
    padding-bottom: .9rem;
    font-size: 1.1rem;
}

/* ------------------------------------------------------------------
   AUTH / LOGIN / DASHBOARD
------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--topbar-bg);
}

.auth-card {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-logo {
    width: 100px;
    max-width: 80vw;
    height: auto;
    margin-bottom: 6px;
    user-select: none;
    -webkit-user-drag: none;
}

.auth-title {
    color: #fff;
    margin: 0 0 6px 0;
    font-weight: 600;
}

.auth-fields {
    width: 860px;
    max-width: 92vw;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 28px 32px;
    backdrop-filter: blur(10px);
}

    .auth-fields .form-control {
        background: rgba(0,0,0,.25);
        border: 1px solid rgba(255,255,255,.10);
        color: #fff;
        width: 100%;
    }

        .auth-fields .form-control::placeholder {
            color: rgba(255,255,255,.55);
        }

        .auth-fields .form-control:focus {
            border-color: rgba(255,255,255,.25);
            box-shadow: none;
            outline: none;
        }

    .auth-fields .auth-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        align-items: start;
    }

.auth-hint {
    width: 100%;
    color: rgba(255,255,255,.65);
    font-size: .8rem;
    margin-top: 2px;
}

/* LOGIN */
.login-page {
    min-height: 100vh;
    background: var(--topbar-bg,#0f172a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.login-logo {
    width: 150px;
    max-width: 80%;
    margin-bottom: 8px;
}

.login-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-error {
    width: 320px;
}

.login-fields-card {
    width: 360px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
}

    .login-fields-card .form-control {
        background: rgba(0,0,0,.35);
        border: 1px solid rgba(255,255,255,.12);
        color: #fff;
    }

        .login-fields-card .form-control::placeholder {
            color: rgba(255,255,255,.55);
        }

        .login-fields-card .form-control:focus {
            background: rgba(0,0,0,.45);
            border-color: rgba(255,255,255,.22);
            box-shadow: none;
            color: #fff;
        }

.login-btn {
    width: 320px;
}

/* DASHBOARD */
.dash-page {
    height: 100vh;
    background: var(--topbar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}

.dash-container {
    width: 100%;
    max-width: 980px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1vh;
}

.dash-logo {
    width: clamp(60px, 10vh, 140px);
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.dash-title {
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: clamp(1rem, 2.5vh, 1.8rem);
}

.dash-subtitle {
    color: rgba(255,255,255,.70);
    margin-bottom: 0.5vh;
    font-size: clamp(0.8rem, 1.8vh, 1rem);
}

.dash-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(6px, 1.2vh, 14px);
    flex: 1;
    max-height: 65vh;
}

.dash-tile {
    text-align: left;
    border: none;
    border-radius: 12px;
    padding: clamp(8px, 1.5vh, 18px);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.dash-tile-icon {
    font-size: clamp(16px, 2.5vh, 28px);
    margin-bottom: clamp(2px, 0.5vh, 10px);
}

.dash-tile-title {
    font-size: clamp(0.75rem, 1.6vh, 1.05rem);
    font-weight: 700;
}

.dash-tile-desc {
    margin-top: clamp(2px, 0.5vh, 6px);
    font-size: clamp(0.65rem, 1.3vh, 0.9rem);
    color: rgba(255,255,255,.70);
}

.dash-logout {
    margin-top: 1vh;
    width: 280px;
    border-radius: 999px;
    font-size: clamp(0.8rem, 1.5vh, 1rem);
    padding: clamp(6px, 1vh, 12px) 24px;
}

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

.pos-page {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Cacher les scrollbars mais garder le scroll */
.order-panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    /* Firefox */
    scrollbar-width: none;
    /* IE/Edge */
    -ms-overflow-style: none;
    /* ✅ AJOUTS POUR TABLETTES */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

    /* Chrome, Safari, Opera */
    .order-panel-scroll::-webkit-scrollbar {
        display: none;
    }

/* Aussi pour le panel entier si besoin */
.order-panel {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .order-panel::-webkit-scrollbar {
        display: none;
    }


/* Bouton suppression décor */
.floorplan-decor-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 0 4px;
    font-size: 0.7rem;
    line-height: 1;
    z-index: 10;
    opacity: 0.7;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
}

    .floorplan-decor-delete:hover {
        opacity: 1;
        background-color: #dc3545;
        color: white;
    }

/* Mini player YouTube */
.youtube-mini-player {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.youtube-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #2d2d44;
    color: white;
    font-size: 0.85rem;
}

.youtube-mini-player iframe {
    flex: 1;
}

/* ==================== 
    
    PAIEMENTS ==================== */
.modal-backdrop-history {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-payment-history {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header-history {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

    .modal-header-history h4 {
        margin: 0;
        font-size: 1.3rem;
    }

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
}

    .btn-close-modal:hover {
        color: #000;
    }

.modal-filters {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .filter-group label {
        font-weight: 600;
        color: #555;
        font-size: 0.9rem;
    }

    .filter-group button {
        padding: 6px 12px;
        border: 1px solid #ddd;
        background: white;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85rem;
    }

        .filter-group button:hover {
            background: #e9ecef;
        }

        .filter-group button.active {
            background: #4a90d9;
            color: white;
            border-color: #4a90d9;
        }

.modal-body-history {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.loading-history, .empty-state-history {
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 1.1rem;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
}

    .payment-table th {
        background: #f8f9fa;
        padding: 12px 16px;
        text-align: left;
        font-weight: 600;
        border-bottom: 2px solid #e0e0e0;
        position: sticky;
        top: 0;
    }

    .payment-table td {
        padding: 12px 16px;
        border-bottom: 1px solid #eee;
    }

    .payment-table tr:hover {
        background: #f8f9fa;
    }

    .payment-table .amount {
        font-weight: 600;
        font-family: monospace;
        font-size: 1.05rem;
    }

.payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
}

.actions-cell {
    display: flex;
    gap: 8px;
}

.btn-action-history {
    padding: 6px 10px;
    border: none;
    background: #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

    .btn-action-history:hover {
        background: #dee2e6;
    }

.btn-danger-action:hover {
    background: #f8d7da;
}

.modal-footer-history {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.total-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.total-amount-history {
    font-size: 1.4rem;
    font-weight: 700;
    color: #28a745;
}

.payment-count {
    color: #888;
    font-size: 0.9rem;
}

/* Modal détail */
.modal-payment-detail, .modal-cancel-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    z-index: 1150;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-body-detail {
    padding: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.items-list-detail {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.item-row-detail {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.modal-footer-detail {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.manager-code-input {
    margin-top: 16px;
}

    .manager-code-input label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .manager-code-input input {
        width: 100%;
        padding: 12px;
        font-size: 1.1rem;
        border: 2px solid #ddd;
        border-radius: 8px;
        text-align: center;
    }

.error-message-history {
    margin-top: 12px;
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
}

/* ==================== POPUP SERVICE ==================== */
.serve-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
}

.serve-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 2001;
    overflow: hidden;
    animation: popupSlideIn 0.2s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.serve-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-close-popup {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
}

    .btn-close-popup:hover {
        background: rgba(255,255,255,0.3);
    }

.serve-popup-body {
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.serve-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

    .serve-popup-item:hover {
        background: #e9ecef;
    }

    .serve-popup-item.selected {
        background: #d4edda;
        border-color: #20bf6b;
    }

.serve-checkbox {
    font-size: 1.3rem;
    color: #20bf6b;
}

.serve-item-qty {
    font-weight: 600;
    color: #555;
    min-width: 35px;
}

.serve-item-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.serve-item-notes {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.serve-popup-footer {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

    .serve-popup-footer .btn {
        flex: 1;
        padding: 12px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .serve-popup-footer .btn-success {
        background: linear-gradient(135deg, #26de81, #20bf6b);
        border: none;
        color: white;
    }

    .serve-popup-footer .btn-secondary {
        background: #6c757d;
        border: none;
        color: white;
    }

    .serve-popup-footer .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ------------------------------------------------------------------
   CATALOGUE DÉCORS - OVERLAY SIDEBAR
------------------------------------------------------------------- */

/* Backdrop semi-transparent */
.decor-catalog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Sidebar */
.decor-catalog-sidebar {
    position: fixed;
    top: 70px;
    right: 0;
    width: 320px;
    height: calc(100vh - 80px);
    background: linear-gradient(180deg, #1f1f35 0%, #16162a 100%);
    border-radius: 20px 0 0 20px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

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

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

/* Header */
.decor-catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

    .decor-catalog-header h3 {
        color: white;
        font-size: 1.15rem;
        font-weight: 600;
        margin: 0;
    }

.btn-close-catalog {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-close-catalog:hover {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
    }

/* Tabs */
.decor-catalog-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.decor-tab {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .decor-tab:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .decor-tab.active {
        background: rgba(166, 43, 98, 0.25);
        border-color: rgba(166, 43, 98, 0.5);
        color: white;
    }

/* Items grid */
.decor-catalog-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

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

.decor-catalog-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .decor-catalog-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(166, 43, 98, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    .decor-catalog-item:active {
        transform: scale(0.95);
    }

.decor-catalog-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.decor-catalog-name {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 500;
}

/* Footer */
.decor-catalog-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

    .decor-catalog-footer small {
        color: #6b7280;
        font-size: 0.75rem;
    }

/* Scrollbar */
.decor-catalog-items::-webkit-scrollbar {
    width: 6px;
}

.decor-catalog-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.decor-catalog-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

    .decor-catalog-items::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.2);
    }

/* Bouton Décors dans TopBar */
.topbar-decor-btn {
    background: rgba(166, 43, 98, 0.15) !important;
    border: 1px solid rgba(166, 43, 98, 0.4) !important;
    color: white !important;
}

    .topbar-decor-btn:hover {
        background: rgba(166, 43, 98, 0.25) !important;
        border-color: rgba(166, 43, 98, 0.6) !important;
    }

/* ------------------------------------------------------------------
   NOUVEAUX STYLES DÉCORS
------------------------------------------------------------------- */

/* Plante avec emoji */
.floorplan-decor-plant-emoji {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

    .floorplan-decor-plant-emoji::after {
        content: "";
        width: 70%;
        height: 18px;
        background: linear-gradient(180deg, #a16207 0%, #854d0e 100%);
        border-radius: 3px 3px 8px 8px;
        box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15), 0 4px 8px rgba(0, 0, 0, 0.2);
        position: absolute;
        bottom: 0;
    }

    .floorplan-decor-plant-emoji::before {
        content: "";
        width: 80%;
        height: 6px;
        background: linear-gradient(180deg, #92400e, #78350f);
        border-radius: 3px;
        position: absolute;
        bottom: 15px;
    }

.decor-emoji-display {
    font-size: 32px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: plantSway 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
}

@keyframes plantSway {
    0%, 100% {
        transform: rotate(-2deg);
    }

    50% {
        transform: rotate(2deg);
    }
}

/* Emoji générique */
.floorplan-decor-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

    .floorplan-decor-emoji .decor-emoji-display {
        animation: none;
        margin-bottom: 0;
    }

/* Porte réaliste */
.floorplan-decor-door {
    background: linear-gradient(180deg, #b45309 0%, #92400e 40%, #78350f 100%);
    border-radius: 6px 6px 0 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 2px 0 4px rgba(255, 255, 255, 0.1), inset -2px 0 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

    .floorplan-decor-door::before {
        content: "";
        position: absolute;
        top: 12%;
        left: 15%;
        right: 15%;
        bottom: 40%;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.15));
        border: 2px solid rgba(0, 0, 0, 0.15);
        border-radius: 3px;
    }

    .floorplan-decor-door::after {
        content: "";
        position: absolute;
        right: 10px;
        top: 52%;
        width: 8px;
        height: 18px;
        background: linear-gradient(180deg, #fbbf24, #d97706);
        border-radius: 2px;
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    }

/* Porte vitrée */
.floorplan-decor-door-glass {
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
}

    .floorplan-decor-door-glass::before {
        content: "";
        position: absolute;
        top: 10%;
        left: 12%;
        right: 12%;
        bottom: 20%;
        background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(96, 165, 250, 0.2));
        border: 2px solid rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

    .floorplan-decor-door-glass::after {
        content: "";
        position: absolute;
        right: 10px;
        top: 55%;
        width: 6px;
        height: 12px;
        background: #94a3b8;
        border-radius: 2px;
    }

/* Mur briques */
.floorplan-decor-wall-brick {
    background: repeating-linear-gradient( 0deg, transparent, transparent 8px, rgba(0, 0, 0, 0.1) 8px, rgba(0, 0, 0, 0.1) 9px ), linear-gradient(180deg, #b45309 0%, #92400e 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Fenêtre */
.floorplan-decor-window {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.5), rgba(96, 165, 250, 0.3));
    border: 4px solid #6b7280;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
}

    .floorplan-decor-window::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 3px;
        background: #6b7280;
        transform: translateY(-50%);
    }

    .floorplan-decor-window::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #6b7280;
        transform: translateX(-50%);
    }

/* Escalier */
.floorplan-decor-stairs {
    background: repeating-linear-gradient( 0deg, #6b7280 0px, #6b7280 10px, #4b5563 10px, #4b5563 16px );
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Bar / Comptoir */
.floorplan-decor-bar {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

    .floorplan-decor-bar::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 8px;
        background: linear-gradient(180deg, #374151, #1f2937);
        border-radius: 10px 10px 0 0;
    }

    .floorplan-decor-bar::after {
        content: "🍷🍸🥃";
        position: absolute;
        top: -15px;
        right: 15px;
        font-size: 14px;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    }

/* Caisse */
.floorplan-decor-cashdesk {
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

    .floorplan-decor-cashdesk::before {
        content: "";
        width: 70%;
        height: 14px;
        background: #22c55e;
        border-radius: 3px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(34, 197, 94, 0.3);
    }

    .floorplan-decor-cashdesk::after {
        content: "💳";
        font-size: 18px;
    }

/* Banquette */
.floorplan-decor-banquette {
    background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 3px 6px rgba(255, 255, 255, 0.1);
    position: relative;
}

    .floorplan-decor-banquette::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 0;
        right: 0;
        height: 14px;
        background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
        border-radius: 5px 5px 0 0;
    }

/* Cuisine */
.floorplan-decor-kitchen {
    background: linear-gradient(180deg, #e5e7eb 0%, #9ca3af 100%);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* ------------------------------------------------------------------
   MODAL MISE À JOUR
------------------------------------------------------------------- */

/* Badge dans TopBar */
.topbar-update-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid rgba(251, 191, 36, 0.5) !important;
    color: white !important;
    animation: updatePulse 2s ease-in-out infinite;
}

@keyframes updatePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

.topbar-update-badge:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    transform: scale(1.05);
}

/* Backdrop */
.update-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1200;
    animation: fadeIn 0.2s ease;
}

/* Modal */
.update-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    background: linear-gradient(180deg, #1f1f35 0%, #16162a 100%);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    z-index: 1210;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Header */
.update-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

    .update-modal-header span {
        font-size: 1.2rem;
        font-weight: 600;
        color: white;
    }

.btn-close-update {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-close-update:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }

/* Body */
.update-modal-body {
    padding: 24px;
}

/* Version info */
.update-version-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.update-version-row {
    text-align: center;
}

.update-label {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

.update-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.update-current {
    color: #9ca3af;
}

.update-new {
    color: #22c55e;
}

.update-arrow {
    font-size: 1.5rem;
    color: #22c55e;
}

/* Release notes */
.update-notes {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

    .update-notes h5 {
        color: white;
        font-size: 0.95rem;
        margin: 0 0 10px 0;
    }

    .update-notes p {
        color: #d1d5db;
        font-size: 0.9rem;
        margin: 0;
        line-height: 1.5;
    }

/* Progress bar */
.update-progress {
    margin-top: 20px;
}

.update-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.update-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.update-progress-text {
    display: block;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Error */
.update-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fca5a5;
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Footer */
.update-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

    .update-modal-footer .btn {
        flex: 1;
        padding: 14px 20px;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.95rem;
        transition: all 0.15s ease;
    }

    .update-modal-footer .btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #d1d5db;
    }

        .update-modal-footer .btn-secondary:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.15);
            color: white;
        }

    .update-modal-footer .btn-success {
        background: linear-gradient(135deg, #22c55e, #16a34a);
        border: none;
        color: white;
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    }

        .update-modal-footer .btn-success:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
        }

    .update-modal-footer .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.sortable-ghost {
    opacity: 0.4;
    background: #d4edda !important;
}

.drag-handle {
    cursor: grab;
    padding: 4px 8px;
    color: #999;
    font-size: 1.2rem;
}

    .drag-handle:active {
        cursor: grabbing;
    }

input.title-case {
    text-transform: capitalize;
}


/* ========== MODE MARKET ========== */
.market-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    padding: 12px;
    box-sizing: border-box;
    height: calc(100vh - var(--topbar-height) - 24px);
    max-height: calc(100vh - var(--topbar-height) - 24px);
    overflow: hidden;
}

.market-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.market-categories-bar {
    overflow: visible;
    padding: 6px 0 14px 0;
}

    .market-categories-bar::-webkit-scrollbar {
        display: none;
    }

.market-categories-track {
    display: flex;
    flex-wrap: wrap !important;
    gap: 14px 18px; /* vertical horizontal */
    width: 100%;
    align-items: center;
}

    .market-categories-track .subcategory-chip {
        background: rgba(255,255,255,0.72) !important;
        border: 1px solid rgba(255,255,255,0.55) !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    }

        .market-categories-track .subcategory-chip:hover {
            background: rgba(255,255,255,0.96) !important;
            border-color: rgba(166,43,98,0.12) !important;
            transform: translateY(-1px);
        }

        .market-categories-track .subcategory-chip.subcategory-chip-active {
            background: rgba(255,255,255,0.95) !important;
            border: 2px solid var(--accent-mauve) !important;
            color: #111827 !important;
            box-shadow: 0 6px 16px rgba(214,75,127,0.10);
        }

.market-categories-track {
    display: flex;
    flex-wrap: wrap !important;
    gap: 12px;
    width: 100%;
    align-items: center;
}


    .market-categories-track .subcategory-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

        .market-categories-track .subcategory-chip:hover {
            background: rgba(255,255,255,0.96) !important;
            border-color: rgba(166,43,98,0.12) !important;
            transform: translateY(-1px);
        }

        .market-categories-track .subcategory-chip.subcategory-chip-active {
            background: rgba(255,255,255,0.95) !important;
            border: 2px solid var(--accent-mauve) !important;
            color: #111827 !important;
            box-shadow: 0 6px 16px rgba(214,75,127,0.10);
        }

.market-category-chip-active {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    background-color: transparent !important;
    border: 2px solid var(--accent-mauve) !important;
    outline: none !important;
    transform: translateY(-1px);
}

    .market-category-chip-active,
    .market-category-chip-active * {
        position: relative;
        z-index: 1;
        color: var(--cs-text-main) !important;
        -webkit-text-fill-color: var(--cs-text-main) !important;
    }

.market-products-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 8px 24px 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* fondu haut / bas pour éviter l’effet “coupé net” */
    -webkit-mask-image: linear-gradient( to bottom, transparent 0px, black 18px, black calc(100% - 18px), transparent 100% );
    mask-image: linear-gradient( to bottom, transparent 0px, black 18px, black calc(100% - 18px), transparent 100% );
}

    .market-products-scroll::-webkit-scrollbar {
        display: none;
    }

.market-grid,
.market-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: flex-start;
}

    .market-grid > *,
    .market-products-grid > *,
    .market-product-col {
        flex: 0 0 210px;
        width: 210px;
    }

        .market-grid .product-btn,
        .market-products-grid .product-btn,
        .market-product-col .product-btn {
            min-height: 84px;
        }

.market-product-barcode {
    display: none !important;
}

.market-layout > .order-panel {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Pulse pour les dots pendant la recherche */
.dot-searching {
    animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.4);
    }
}

/* Points de suspension animés */
.searching-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }
}

/* Spinner sur le bouton */
.btn-searching {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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