/* Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #1a1a2e;
    color: white;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .navbar-links a {
        color: #ccc;
        text-decoration: none;
    }

        .navbar-links a:hover {
            color: white;
        }

.navbar-user {
    color: #aaa;
    font-size: 0.875rem;
}

.content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

.auth-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

    .auth-card h2 {
        margin-bottom: 1.5rem;
    }

.auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.875rem;
        font-weight: 500;
    }

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Buttons */
.btn-primary {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

    .btn-primary:hover {
        background: #4338ca;
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-logout {
    background: transparent;
    color: #ccc;
    border: 1px solid #555;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    z-index: 1000;
}

/* Produits */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.produit-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

    .produit-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

.produit-info {
    padding: 1rem;
}

.produit-footer {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
}

.prix {
    font-weight: 600;
    color: #4f46e5;
    font-size: 1.1rem;
}

.stock {
    color: #6b7280;
    font-size: 0.875rem;
}

.produit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Panier */
.panier-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

    .panier-table th, .panier-table td {
        padding: 0.75rem;
        text-align: left;
        border-bottom: 1px solid #e5e7eb;
    }

    .panier-table th {
        background: #f9fafb;
        font-weight: 600;
    }

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .qty-control button {
        width: 28px;
        height: 28px;
        border: 1px solid #ddd;
        background: white;
        cursor: pointer;
        border-radius: 4px;
    }

.panier-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
}

/* Commandes */
.commandes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.commande-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.commande-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    font-weight: 500;
}

.commande-lignes {
    padding: 0.5rem 1rem;
}

.commande-ligne {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.commande-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.statut {
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
}

.statut-enattente {
    background: #fef3c7;
    color: #92400e;
}

.statut-confirmee {
    background: #dbeafe;
    color: #1e40af;
}

.statut-expediee {
    background: #d1fae5;
    color: #065f46;
}

.statut-livree {
    background: #dcfce7;
    color: #166534;
}

.statut-annulee {
    background: #fee2e2;
    color: #991b1b;
}
