/* === PARAMETRES GLOBAUX === */
:root {
    /* Couleurs Thème Sombre */
    --bg-dark: #0F172A; /* Fond principal */
    --bg-panel: #1E293B; /* Fond des panneaux */
    --bg-hover: #334155;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    --primary: #3B82F6; /* Bleu vibrant */
    --primary-hover: #2563EB;
    
    --accent: #F59E0B; /* Orange restaurant */
    --accent-rgb: 245, 158, 11;
    --accent-hover: #D97706;
    
    --success: #10B981;
    --success-hover: #059669;
    
    --danger: #EF4444;
    --danger-hover: #DC2626;

    --border-color: #334155;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* Empêche le scroll global */
    height: 100vh;
    /* user-select: none;  Retiré pour éviter les blocages de saisie Electron */
}

input, textarea, select, [contenteditable="true"] {
    user-select: text !important;
    pointer-events: auto !important;
}

h1, h2, h3, h4 {
    font-weight: 600;
}

/* === LAYOUT === */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar {
    width: 250px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

/* Badge Employé Sidebar */
.employee-badge {
    margin-top: auto;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.employee-badge:hover {
    background: rgba(255,255,255,0.08);
}
.employee-badge i {
    font-size: 1.4rem;
    color: var(--accent);
}
.employee-badge .emp-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.employee-badge .emp-info span {
    font-size: 0.9rem;
    font-weight: 600;
}
.employee-badge .emp-info small {
    font-size: 0.7rem;
    color: var(--success);
}
.employee-badge .logout-icon {
    font-size: 1rem !important;
    opacity: 0.3;
    color: var(--danger) !important;
}
.employee-badge:hover .logout-icon {
    opacity: 1;
}


.item-card.low-stock-warning {
    border-left: 4px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 30px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

#app-logo {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
}

/* --- PANNEAU RÉDUCTION --- */
.btn-discount-preset {
    flex: 1;
    padding: 12px;
    background-color: #2d3748;
    color: #94a3b8;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-discount-preset:hover {
    background-color: #3b82f633;
    color: white;
}

.btn-discount-preset.active {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #2563eb;
}

.discount-line #btn-apply-discount {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-payment-method {
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn-payment-method:hover {
    background-color: var(--bg-hover) !important;
}

.btn-payment-method.active {
    background-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}


.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: var(--border-radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.05rem;
    font-weight: 500;
}

.nav-links li:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

.nav-links li.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
}

.view {
    display: none;
    height: 100%;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.view.active-view {
    display: flex;
    flex-direction: column;
}

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

/* === BOUTONS ET INPUTS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:active {
    transform: scale(0.98);
}

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

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

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

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

.btn-icon {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover { background-color: rgba(255,255,255,0.1); }
.btn-icon.btn-danger { color: #EF4444; }
.btn-icon.btn-danger:hover { background-color: rgba(239, 68, 68, 0.1); color: #F87171; }

.input-field {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    user-select: text !important;
    pointer-events: auto !important;
}
.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: var(--bg-hover);
}
.badge.danger { background-color: rgba(239, 68, 68, 0.2); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.5); }
.badge.success { background-color: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.5); }
.badge.warning { background-color: rgba(245, 158, 11, 0.2); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.5); }

/* Badge de stock permanent sur les produits */
.stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: var(--success);
    border: 1px solid var(--success);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: none; /* Ne bloque pas le clic sur la carte */
}
.stock-badge.danger {
    color: var(--danger);
    border-color: var(--danger);
}

/* --- VUE 1 : CAISSE (POS) --- */
#pos-view {
    flex-direction: row; /* Grille produits à gauche, panier à droite */
}

/* Zone Produits */
.products-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    overflow-y: auto;
}

.categories-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
}
.categories-nav::-webkit-scrollbar { display: none; } /* Chrome */

.category-btn {
    padding: 12px 24px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover {
    background-color: var(--bg-hover);
}

.category-btn.active {
    background-color: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    align-content: flex-start;
}

.product-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.product-img {
    height: 120px;
    background-color: #2D3748; /* Placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    position: relative; /* Indispensable pour le badge absolute */
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.product-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Zone Panier (Right Sidebar) */
.cart-section {
    width: 400px;
    background-color: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multiplier-section {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.multiplier-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#numpad-multiplier {
    font-size: 1.5rem;
    color: var(--accent);
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.numpad-btn {
    padding: 8px 6px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.numpad-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.numpad-btn:active {
    transform: translateY(0);
}

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

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

.numpad-btn.secondary:hover {
    background-color: var(--text-muted);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-cart-msg {
    color: var(--text-muted);
    text-align: center;
    margin-top: 40px;
    font-style: italic;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-dark);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
}

.cart-item-name { font-weight: 600; font-size: 0.95rem;}
.cart-item-price-unit { color: var(--text-muted); font-size: 0.85rem;}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-panel);
    border-radius: 20px;
    padding: 4px;
}

.btn-qty {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-hover);
    color: white;
    cursor: pointer;
    font-weight: bold;
}
.btn-qty:hover { background-color: var(--primary); }

.qty-val { font-weight: 600; width: 20px; text-align: center; }

.cart-item-total { font-weight: 700; text-align: right; }

.cart-summary {
    padding: 24px;
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.total-line {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}

.cart-actions {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-actions button {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

/* --- VUES CLIENTS / HISTORIQUE (Structure générale) --- */
.view-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clients-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar Clients */
.clients-sidebar {
    width: 320px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.client-item {
    padding: 16px;
    border-radius: var(--border-radius);
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-item:hover, .client-item.active {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
}

.client-item-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.client-item-balance {
    color: var(--danger);
    font-weight: 700;
}

.client-details {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.placeholder-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 100px;
    font-size: 1.2rem;
}

.client-info-card {
    background-color: var(--bg-panel);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.client-header h3 {
    font-size: 1.8rem;
}

.client-actions {
    margin-bottom: 24px;
}

.pending-invoices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* History view */
.history-list {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Historique & Listes (Look Premium) */
.history-item {
    background: linear-gradient(145deg, var(--bg-panel), rgba(30, 41, 59, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.history-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.15);
}

.history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.history-item:hover::before {
    background-color: var(--primary);
}

.history-item.selected {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), var(--bg-panel));
    box-shadow: 0 0 0 1px var(--primary);
}

.history-item.selected::before {
    background-color: var(--primary);
}

.history-info {
    flex: 1;
}

.history-info strong {
    font-size: 1.15rem;
    color: var(--text-color);
    display: block;
    margin-bottom: 6px;
}

.history-info small {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.history-amount {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 20000; /* Plus haut que tout */
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-panel);
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer;
}
.close-modal:hover { color: white; }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.text-center { text-align: center; }
.justify-between { justify-content: space-between; }
.mt-2 { margin-top: 8px; }

.checkout-total {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.payment-methods {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.payment-method-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-main);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
}

.payment-method-btn.selected {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Cache helper */
.hidden { display: none !important; }

/* Invoices PDF Template (Cache par défaut) */
#invoice-template {
    width: 190mm;
    background: white;
    color: black;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

#invoice-template * {
    color: black !important; /* Force le noir pour l'impression */
}

.invoice-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #eee;
}

.invoice-total-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.invoice-footer {
    margin-top: 50px;
    text-align: center;
    font-size: 0.8rem;
    color: #666 !important;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* === DASHBOARD === */
#dashboard-view {
    padding: 30px;
    gap: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.dash-summary-cards {
    display: flex;
    gap: 20px;
}

.summary-card {
    background: var(--bg-dark);
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
}

.summary-card i {
    font-size: 1.8rem;
}

.summary-card h2 {
    font-size: 1.6rem;
    margin-top: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    flex: 1;
}

.dash-card {
    background: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.dash-card h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.method-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 0.95rem;
}
.method-stat i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}
.method-stat small {
    margin-left: auto;
    opacity: 0.5;
}

#dashboard-timer {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-top: 5px;
}

/* === EFFET SAKURA (GÉRANT) === */
.sakura {
    position: fixed;
    top: -10px;
    background: #ffb7c5; /* Rose cerisier */
    border-radius: 100% 0 100% 0; /* Forme de pétale */
    pointer-events: none;
    z-index: 9999;
    animation: sakura-fall linear forwards;
    box-shadow: 0 0 5px rgba(255, 183, 197, 0.5);
}

@keyframes sakura-fall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(105vh) rotate(720deg) translateX(100px);
        opacity: 0;
    }
}


/* === PREMIUM LANDING PAGE === */
.landing-logo-container {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.landing-logo {
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.5));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.landing-logo:hover {
    transform: rotate(5deg) scale(1.05);
}

.enterprise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.enterprise-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
}

.enterprise-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.enterprise-card:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.enterprise-card:hover::after {
    opacity: 1;
}

.enterprise-card i {
    font-size: 2.8rem;
    color: var(--primary);
    transition: all 0.3s ease;
    z-index: 1;
}

.enterprise-card:hover i {
    transform: scale(1.15) rotate(-5deg);
    color: var(--text-main);
}

.enterprise-card h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
    margin-top: 5px;
    z-index: 1;
}

.enterprise-card .card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.65rem;
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* === ISOLATION PAGE D'ACCUEIL === */
body.landing-mode {
    background: var(--bg-dark) !important;
}

body.landing-mode .sidebar, 
body.landing-mode .main-content {
    display: none !important;
}

body.landing-mode .app-container {
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
}

body.landing-mode #modal-select-enterprise {
    background: var(--bg-dark);
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100; /* Moins haut que les autres modales pour laisser passer les prompts */
    backdrop-filter: none;
    align-items: center;
    justify-content: center;
}

body.landing-mode #modal-select-enterprise .modal-content {
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(59,130,246,0.2);
    background: var(--bg-panel); /* Fond solide par défaut si le gradient inline échoue */
}
