/**
 * O'BLOC Restaurant Manager - Styles POS
 * Design moderne type application SaaS
 */

/* Reset et base */
* {
    box-sizing: border-box;
}

body.obloc-app {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1a;
    color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #ff006e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff3388;
}

/* Header */
.obloc-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.obloc-logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff006e 0%, #00f5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.obloc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.obloc-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.obloc-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.obloc-time {
    color: #8892b0;
    font-size: 14px;
}

.obloc-user-name {
    font-weight: 600;
    color: #ccd6f6;
}

.obloc-logout {
    background: rgba(255, 0, 110, 0.1);
    color: #ff006e;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.obloc-logout:hover {
    background: rgba(255, 0, 110, 0.2);
}

/* Layout principal */
.obloc-container {
    display: flex;
    height: calc(100vh - 64px);
    margin-top: 64px;
}

/* Sidebar */
.obloc-sidebar {
    width: 320px;
    background: #1a1a2e;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.obloc-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obloc-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #ccd6f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.obloc-badge {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.obloc-orders-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Carte de commande */
.obloc-order-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.obloc-order-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 245, 255, 0.3);
    transform: translateX(4px);
}

.obloc-order-card.active {
    background: rgba(255, 0, 110, 0.1);
    border-color: #ff006e;
}

.obloc-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.obloc-order-id {
    font-size: 18px;
    font-weight: 700;
    color: #ff006e;
}

.obloc-order-time {
    font-size: 12px;
    color: #8892b0;
}

.obloc-order-table {
    font-size: 14px;
    color: #ccd6f6;
    margin-bottom: 4px;
}

.obloc-order-items {
    font-size: 12px;
    color: #8892b0;
}

.obloc-order-total {
    font-size: 16px;
    font-weight: 700;
    color: #00ff88;
    margin-top: 8px;
}

/* Zone principale */
.obloc-main {
    flex: 1;
    background: #0f0f1a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.obloc-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.obloc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8892b0;
}

.obloc-empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Détails de commande */
.obloc-order-details {
    max-width: 800px;
    margin: 0 auto;
}

.obloc-order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.obloc-order-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ccd6f6;
    margin: 0 0 8px 0;
}

.obloc-order-info p {
    color: #8892b0;
    margin: 0;
}

.obloc-order-total-big {
    text-align: right;
}

.obloc-order-total-big .amount {
    font-size: 36px;
    font-weight: 800;
    color: #00ff88;
}

.obloc-order-total-big .label {
    font-size: 14px;
    color: #8892b0;
}

/* Liste des articles */
.obloc-items-list {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.obloc-items-list h3 {
    font-size: 14px;
    font-weight: 700;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
}

.obloc-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obloc-item:last-child {
    border-bottom: none;
}

.obloc-item-qty {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 16px;
}

.obloc-item-info {
    flex: 1;
}

.obloc-item-name {
    font-weight: 600;
    color: #ccd6f6;
    margin-bottom: 4px;
}

.obloc-item-price {
    font-size: 13px;
    color: #8892b0;
}

.obloc-item-total {
    font-weight: 700;
    color: #ccd6f6;
    font-size: 16px;
}

/* Actions */
.obloc-actions {
    display: flex;
    gap: 12px;
    padding: 24px;
    background: #1a1a2e;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.obloc-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.obloc-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: white;
}

.obloc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 110, 0.3);
}

.obloc-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccd6f6;
}

.obloc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.obloc-btn-danger {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
}

.obloc-btn-danger:hover {
    background: rgba(255, 0, 0, 0.2);
}

/* Interface Serveur - Grille de produits */
.obloc-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px;
}

.obloc-product-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.obloc-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.obloc-product-image {
    height: 120px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #8892b0;
}

.obloc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.obloc-product-info {
    padding: 12px;
}

.obloc-product-name {
    font-weight: 600;
    color: #ccd6f6;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obloc-product-price {
    font-weight: 700;
    color: #00ff88;
    font-size: 16px;
}

/* Panier */
.obloc-cart {
    width: 380px;
    background: #1a1a2e;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.obloc-cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obloc-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ccd6f6;
}

.obloc-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.obloc-cart-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 8px;
}

.obloc-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.obloc-cart-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ccd6f6;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.obloc-cart-item-qty button:hover {
    background: rgba(255, 0, 110, 0.3);
}

.obloc-cart-item-qty span {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.obloc-cart-item-info {
    flex: 1;
}

.obloc-cart-item-name {
    font-weight: 600;
    color: #ccd6f6;
    font-size: 14px;
}

.obloc-cart-item-price {
    font-size: 12px;
    color: #8892b0;
}

.obloc-cart-item-total {
    font-weight: 700;
    color: #00ff88;
}

.obloc-cart-item-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.obloc-cart-item-remove:hover {
    opacity: 1;
}

.obloc-cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0f0f1a;
}

.obloc-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.obloc-cart-total span {
    color: #8892b0;
}

.obloc-cart-total strong {
    font-size: 24px;
    color: #00ff88;
}

/* Formulaires */
.obloc-form-group {
    margin-bottom: 16px;
}

.obloc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #8892b0;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.obloc-form-group input,
.obloc-form-group select,
.obloc-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ccd6f6;
    font-size: 15px;
    transition: all 0.3s;
}

.obloc-form-group input:focus,
.obloc-form-group select:focus,
.obloc-form-group textarea:focus {
    outline: none;
    border-color: #ff006e;
    background: rgba(255, 255, 255, 0.08);
}

.obloc-form-group input::placeholder {
    color: #5a6680;
}

/* Onglets */
.obloc-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
}

.obloc-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: #8892b0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.obloc-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccd6f6;
}

.obloc-tab.active {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: white;
}

/* Dashboard Admin */
.obloc-dashboard {
    padding: 24px;
}

.obloc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.obloc-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.obloc-stat-card:hover {
    border-color: rgba(0, 245, 255, 0.2);
    transform: translateY(-2px);
}

.obloc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.obloc-stat-icon.pink {
    background: rgba(255, 0, 110, 0.1);
    color: #ff006e;
}

.obloc-stat-icon.cyan {
    background: rgba(0, 245, 255, 0.1);
    color: #00f5ff;
}

.obloc-stat-icon.green {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.obloc-stat-icon.purple {
    background: rgba(131, 56, 236, 0.1);
    color: #8338ec;
}

.obloc-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #ccd6f6;
    margin-bottom: 4px;
}

.obloc-stat-label {
    font-size: 14px;
    color: #8892b0;
}

/* Tableaux */
.obloc-table {
    width: 100%;
    border-collapse: collapse;
}

.obloc-table th,
.obloc-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obloc-table th {
    font-size: 12px;
    font-weight: 700;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.obloc-table td {
    color: #ccd6f6;
}

.obloc-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status badges */
.obloc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.obloc-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.obloc-status-badge.en_attente {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.obloc-status-badge.en_attente::before {
    background: #ffc107;
}

.obloc-status-badge.payee {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.obloc-status-badge.payee::before {
    background: #00ff88;
}

.obloc-status-badge.annulee {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.obloc-status-badge.annulee::before {
    background: #ff4444;
}

/* Menu Public */
.obloc-public-menu {
    min-height: 100vh;
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
}

.obloc-public-header {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    padding: 40px 20px;
    text-align: center;
}

.obloc-public-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    color: white;
}

.obloc-public-header p {
    margin: 8px 0 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.obloc-menu-section {
    padding: 24px 20px;
}

.obloc-menu-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ccd6f6;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #ff006e;
    display: inline-block;
}

.obloc-menu-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

.obloc-menu-item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-right: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.obloc-menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.obloc-menu-item-info {
    flex: 1;
}

.obloc-menu-item-name {
    font-weight: 700;
    color: #ccd6f6;
    font-size: 16px;
    margin-bottom: 4px;
}

.obloc-menu-item-desc {
    font-size: 13px;
    color: #8892b0;
    line-height: 1.4;
}

.obloc-menu-item-price {
    font-weight: 800;
    color: #00ff88;
    font-size: 18px;
}

/* QR Code flottant */
.obloc-qr-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.obloc-qr-float img {
    width: 100px;
    height: 100px;
}

/* Modal */
.obloc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.obloc-modal-content {
    background: #1a1a2e;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.obloc-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obloc-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ccd6f6;
}

.obloc-modal-body {
    padding: 24px;
}

.obloc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 1024px) {
    .obloc-sidebar {
        width: 280px;
    }
    
    .obloc-cart {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .obloc-container {
        flex-direction: column;
    }
    
    .obloc-sidebar,
    .obloc-cart {
        width: 100%;
        height: 40vh;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .obloc-products-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 12px;
    }
    
    .obloc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .obloc-actions {
        flex-direction: column;
    }
    
    .obloc-btn {
        width: 100%;
    }
}

/* Impression ticket */
@media print {
    body * {
        visibility: hidden;
    }
    
    .obloc-ticket,
    .obloc-ticket * {
        visibility: visible;
    }
    
    .obloc-ticket {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 10mm;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        color: black;
        background: white;
    }
    
    .obloc-header,
    .obloc-sidebar,
    .obloc-actions,
    .obloc-cart {
        display: none !important;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.obloc-animate-in {
    animation: slideIn 0.3s ease-out;
}

/* Loader */
.obloc-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ff006e;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.obloc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a2e;
    color: #ccd6f6;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
}

.obloc-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.obloc-toast.success {
    border-left: 4px solid #00ff88;
}

.obloc-toast.error {
    border-left: 4px solid #ff4444;
}