/* css/pages/floor-plan.css - Styles pour le plan de salle avec thème sombre */

/* Layout principal */
.floor-plan-page {
    display: flex;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Layout avec sidebar de réservations */
.floor-plan-page {
    display: flex;
    height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Panel des réservations */
.reservations-panel {
    width: 350px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.reservations-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

.reservations-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.reservations-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: var(--bg-card);
    border: none;
    border-radius: 4px;
    padding: 0.3rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.reservations-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Catégories de réservations */
.reservation-category {
    margin-bottom: 1.5rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px 8px 0 0;
    border-left: 4px solid var(--primary);
    margin-bottom: 0.5rem;
}

.category-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.category-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.empty-category {
    padding: 1rem;
    text-align: center;
    color: var(--text-tertiary);
    font-style: italic;
    font-size: 0.9rem;
}

/* Items de réservation */
.reservation-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.reservation-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reservation-item.dragging {
    opacity: 0.6;
    cursor: grabbing;
    transform: scale(0.95);
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reservation-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.reservation-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.reservation-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.reservation-covers {
    color: var(--text-primary);
    font-weight: 500;
}

.reservation-table {
    color: var(--text-tertiary);
}

.reservation-notes {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

/* Status colors for reservations */
.reservation-item.status-late {
    border-left: 4px solid #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.reservation-item.status-imminent {
    border-left: 4px solid #fd7e14;
    background: rgba(253, 126, 20, 0.05);
}

.reservation-item.status-upcoming {
    border-left: 4px solid #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.reservation-item.status-unassigned {
    border-left: 4px solid #6c757d;
    background: rgba(108, 117, 125, 0.05);
}

.reservation-item.status-no-show {
    border-left: 4px solid #495057;
    background: rgba(73, 80, 87, 0.05);
    opacity: 0.7;
    text-decoration: line-through;
}

/* Informations client enrichies */
.reservation-client-info {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
    line-height: 1.3;
}

.reservation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.reservation-tags .tag {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--accent-color);
    color: var(--text-on-accent);
    border-radius: 0.75rem;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.reservation-allergies {
    font-size: 0.75rem;
    color: #ff6b6b;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 0.25rem;
    border-left: 3px solid #ff6b6b;
    font-weight: 500;
}

/* Plan de salle principal */
.floor-plan-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.floor-plan-header {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.floor-plan-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.room-selector {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.floor-plan-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem;
    border-radius: 6px;
    background: rgba(var(--primary-rgb), 0.04);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}

/* Material Icons */
.material-icons {
    font-size: 18px;
    line-height: 1;
}

.control-btn .material-icons {
    font-size: 14px;
}

.btn-icon .material-icons {
    font-size: 16px;
}

.zoom-controls .btn-icon {
    width: 24px;
    height: 24px;
    padding: 0.2rem;
}

.zoom-controls .btn-icon .material-icons {
    font-size: 12px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8rem;
    font-weight: 500;
    height: 32px;
    min-width: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
}

.control-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.control-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.control-btn.edit-only {
    transition: opacity 0.3s ease;
}

.control-btn.danger {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.control-btn.danger:hover {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}


.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.2rem;
    height: 32px;
}

.zoom-level {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

/* Canvas du plan de salle */
.floor-plan-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden; /* Pas de scroll, navigation via zoom/pan uniquement */
    background: var(--bg-primary); /* Même couleur que le canvas pour continuité visuelle */
    border-radius: 8px;
    margin: 1rem;
    border: 1px solid var(--border-color);
    height: calc(100vh - 140px); /* Hauteur optimisée avec header plus compact */
}

.floor-plan-canvas {
    width: 3000px;  /* Espace beaucoup plus grand pour les tables */
    height: 2000px; /* Hauteur étendue pour plus de tables */
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 2px 2px, var(--border-light) 1px, transparent 0);
    background-size: 40px 40px;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    /* Grand espace virtuel pour 100+ couverts */
}

.floor-plan-canvas.edit-mode {
    cursor: crosshair;
}

/* Tables */
.table {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 60px;
    min-height: 60px;
}

.table:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.table.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.3);
}

.table.drop-target {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
    transform: scale(1.1);
}

/* Indicateurs de chevauchement (remplace la fusion automatique) */
.table.overlapping {
    border: 4px solid #ff9800 !important;
    background: rgba(255, 152, 0, 0.2) !important;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.8) !important;
    transform: scale(1.05) !important;
    animation: overlapping-pulse 2s ease-in-out infinite;
}

.table.overlapping-persistent {
    border: 2px solid var(--warning, #ff9800);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
    background: rgba(255, 152, 0, 0.1);
}

@keyframes overlapping-pulse {
    0% { 
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
        border-color: #ff9800;
        transform: scale(1.05);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 152, 0, 1);
        border-color: #ff6f00;
        transform: scale(1.07);
    }
    100% { 
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
        border-color: #ff9800;
        transform: scale(1.05);
    }
}

/* Élément d'accessibilité pour les chevauchements */
#overlap-warning {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Formes de tables */
.table-rectangle {
    border-radius: 8px;
}

.table-square {
    border-radius: 8px;
}

.table-circle {
    border-radius: 50%;
}

.table-oval {
    border-radius: 50px;
}

/* Status des tables */
.table-available {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #28a745;
}

.table-reserved {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    color: #007bff;
}

.table-occupied {
    background: rgba(253, 126, 20, 0.1);
    border-color: #fd7e14;
    color: #fd7e14;
}

.table-cleaning {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
    color: #17a2b8;
}

.table-unavailable {
    background: rgba(108, 117, 125, 0.1);
    border-color: #6c757d;
    color: #6c757d;
    opacity: 0.6;
}

/* Contenu des tables */
.table-content {
    text-align: center;
    line-height: 1.2;
}

.table-number {
    font-weight: 700;
    font-size: 1.2rem;
}

.table-capacity {
    font-size: 0.8rem;
    opacity: 0.8;
}

.table-reservation {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Edit overlay */
.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.edit-tools {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 300px;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tool-group select,
.tool-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tool-group select:focus,
.tool-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Version tablette - texte court */
@media (max-width: 1200px) and (min-width: 1025px) {
    .control-btn.edit-only span {
        font-size: 0.75rem;
    }
}

/* Responsive design */
@media (max-width: 1024px) {
    .reservations-panel {
        width: 300px;
    }
    
    .floor-plan-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .floor-plan-controls {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .control-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        height: 28px;
        gap: 0.2rem;
        min-width: 28px;
    }
    
    .control-btn .material-icons {
        font-size: 12px;
    }
    
    .control-btn span {
        display: none; /* Masquer le texte sur mobile */
    }
    
    /* Groupe de contrôles compact sur mobile */
    .control-group {
        padding: 0.15rem;
        gap: 0.2rem;
    }
    
    .control-group .control-btn {
        justify-content: center;
        width: 28px;
        padding: 0.3rem;
    }
}

@media (max-width: 768px) {
    .floor-plan-page {
        flex-direction: column;
    }
    
    .reservations-panel {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .floor-plan-header {
        padding: 1rem;
    }
    
    .control-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.table-late {
    animation: pulse 2s infinite;
}


/* Styles pour tables connectées magnétiquement */
.table.connected {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.table.connected .table-capacity {
    color: rgba(34, 197, 94, 1);
    font-weight: 600;
}

.table.connected .table-number {
    color: rgba(34, 197, 94, 1);
}

/* Poignées de redimensionnement */
.table-resize-handles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(59, 130, 246, 0.8);
    border: 1px solid white;
    border-radius: 50%;
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.table:hover .resize-handle,
.table.selected .resize-handle {
    opacity: 1;
}

.resize-handle:hover {
    background: rgba(59, 130, 246, 1);
    transform: scale(1.2);
}

.resize-se {
    bottom: -4px;
    right: -4px;
    cursor: se-resize;
}

.resize-sw {
    bottom: -4px;
    left: -4px;
    cursor: sw-resize;
}

.resize-ne {
    top: -4px;
    right: -4px;
    cursor: ne-resize;
}

.resize-nw {
    top: -4px;
    left: -4px;
    cursor: nw-resize;
}

/* Scrollbar styling for dark theme */
.reservations-content::-webkit-scrollbar {
    width: 6px;
}

.reservations-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.reservations-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.reservations-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Table Modal */
.table-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.modal-options button {
    justify-self: stretch;
    width: 100%;
}

/* === TABLE ASSIGNMENT SYSTEM === */

/* Reservation selection */
.reservation-item.selected {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.reservation-item.selected .reservation-name,
.reservation-item.selected .reservation-time,
.reservation-item.selected .reservation-covers,
.reservation-item.selected .reservation-table {
    color: white !important;
}

/* Table assignment mode */
.table.assignment-mode {
    transition: all 0.2s ease;
    border-width: 2px;
}

.table.assignment-mode:hover {
    border-color: var(--primary) !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.table.selected-for-assignment {
    border: 4px solid #ff9500 !important;
    background: rgba(255, 149, 0, 0.3) !important;
    box-shadow: 
        0 0 0 2px rgba(255, 149, 0, 0.6),
        0 0 15px rgba(255, 149, 0, 0.4) !important;
    transform: scale(1.05);
    animation: selectedTablePulse 2s ease-in-out infinite;
}

@keyframes selectedTablePulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.6), 0 0 15px rgba(255, 149, 0, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.8), 0 0 25px rgba(255, 149, 0, 0.6); }
}

.table.selected-for-assignment::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff9500;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Assignment UI */
.assignment-ui {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    min-width: 300px;
    z-index: 1000;
    display: none;
}

.assignment-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.assignment-header p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.assignment-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.assignment-actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assignment-actions .btn-primary {
    background: var(--primary);
    color: white;
}

.assignment-actions .btn-primary:hover:not(:disabled) {
    background: var(--primary-dark, #1976d2);
    transform: translateY(-1px);
}

.assignment-actions .btn-primary:disabled {
    background: var(--border-color);
    color: var(--text-disabled);
    cursor: not-allowed;
}

.assignment-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.assignment-actions .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

/* === BOUTONS D'ARRIVÉE === */
.arrival-controls {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

.arrival-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.arrival-btn .material-icons {
    font-size: 14px;
    pointer-events: none;
}

.arrival-yes {
    background: var(--success);
    color: white;
}

.arrival-yes:hover {
    background: var(--success-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.4);
}

.arrival-no {
    background: var(--error);
    color: white;
}

.arrival-no:hover {
    background: var(--error-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

/* Statut d'arrivée confirmée */
.arrival-status {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 100;
}

.arrived-icon {
    width: 24px;
    height: 24px;
    background: var(--info);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 8px rgba(14, 165, 233, 0.6);
    }
    100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

/* Nouvelles couleurs pour tables avec clients arrivés */
.table.table-arrived {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--info);
    border-width: 2px;
}

.table-arrived .table-content {
    color: var(--info);
}

.table-arrived .table-number {
    font-weight: 600;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .assignment-ui {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
    
    .assignment-actions {
        flex-direction: column;
    }
    
    .arrival-controls {
        top: -6px;
        right: -6px;
        gap: 3px;
    }
    
    .arrival-btn {
        width: 20px;
        height: 20px;
    }
    
    .arrival-btn .material-icons {
        font-size: 12px;
    }
}