/**
 * Styles pour le composant ReservationsList
 * Organisation par sections avec codes couleur
 */

/* === EN-TÊTE === */
.reservations-header {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-subtle);
}

.reservations-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.reservations-filters {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.filter-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-alpha);
}

/* === SECTIONS === */
.reservations-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reservation-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s ease;
}

/* Section urgente (retards) */
.section-urgent {
    border-color: var(--danger);
    box-shadow: 0 0 10px var(--danger-alpha);
}

.section-urgent .section-header {
    background: var(--danger);
    color: white;
}

.section-urgent .section-header h3::before {
    content: "🚨 ";
}

/* Section non attribuées */
.section-unassigned {
    border-color: var(--warning);
    background: var(--warning-bg);
}

.section-unassigned .section-header {
    background: var(--warning);
    color: var(--text-primary);
}

.section-unassigned .section-header h3::before {
    content: "⚠️ ";
}

/* En-tête de section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

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

.section-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.section-urgent .section-count {
    background: rgba(255, 255, 255, 0.2);
}

.section-unassigned .section-count {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

/* Contenu de section */
.section-content {
    padding: 1rem;
}

.empty-section {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

/* === CARTES DE RÉSERVATION === */
.reservation-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.reservation-card:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
    transform: translateY(-2px);
}

.reservation-card:last-child {
    margin-bottom: 0;
}

/* En-tête de carte */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.client-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-phone {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.phone-urgent {
    color: var(--danger) !important;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

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

.vip-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.reservation-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    text-align: right;
}

.time-info {
    font-weight: 600;
    color: var(--text-primary);
}

.party-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Corps de carte */
.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-info {
    font-weight: 500;
    color: var(--text-primary);
}

.no-table {
    color: var(--warning);
    font-weight: 600;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.6; }
}

.special-requests,
.allergies {
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--info);
}

.special-requests {
    background: var(--info-bg);
    color: var(--info-text);
}

.allergies {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-left-color: var(--warning);
}

/* Actions de carte */
.card-actions {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}

.card-actions .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: var(--danger-dark);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.btn-warning:hover {
    background: var(--warning-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--bg-quaternary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

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

.btn-light:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .reservations-header {
        padding: 1rem 0.5rem;
    }
    
    .reservations-title {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .reservations-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .reservation-info {
        align-items: flex-start;
        text-align: left;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .reservations-sections {
        gap: 1rem;
    }
    
    .section-header {
        padding: 0.75rem 1rem;
    }
    
    .section-content {
        padding: 0.75rem;
    }
    
    .card-header,
    .card-body,
    .card-actions {
        padding: 0.75rem;
    }
    
    .client-name {
        font-size: 1rem;
    }
    
    .reservations-title h1 {
        font-size: 1.5rem;
    }
}

/* === ANIMATIONS === */
.reservation-card {
    animation: slideIn 0.3s ease-out;
}

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

/* Section collapse/expand */
.section-header {
    cursor: pointer;
}

.section-content.collapsed {
    display: none;
}

/* Loading state */
.section-content.loading {
    position: relative;
    min-height: 100px;
}

.section-content.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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