/* Styles pour la page Panier */

/* Navigation avec compteur panier */
.cart-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-count {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 0.3s ease-in-out;
}

.cart-count.hidden {
    display: none;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Section panier */
.cart-section {
    padding: 60px 0;
    min-height: 60vh;
    background: #f8f9fa;
}

/* Panier vide */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.empty-cart-content i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 30px;
}

.empty-cart-content h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.empty-cart-content p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Contenu du panier */
.cart-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.cart-header h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Articles du panier */
.cart-items {
    margin-bottom: 40px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    margin-bottom: 15px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.cart-item-details h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.cart-item-size {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.cart-item-ingredients {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e74c3c;
}

/* Contrôles de quantité */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.quantity-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.remove-item:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Résumé du panier */
.cart-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #dee2e6;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e74c3c;
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
    margin-top: 15px;
}

.summary-note {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

/* Actions du panier */
.cart-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-order {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-order small {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Informations de commande */
.order-info {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid #28a745;
}

.order-info h4 {
    font-size: 1.3rem;
    color: #155724;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-info ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.order-info li {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: #155724;
}

.delivery-reminder {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #c3e6cb;
}

.delivery-reminder i {
    font-size: 1.5rem;
    color: #28a745;
    margin-top: 2px;
}

.delivery-reminder strong {
    color: #155724;
    font-size: 1.1rem;
}

.delivery-reminder p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-content {
        padding: 20px;
    }
    
    .cart-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .cart-item {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
        grid-row: 1 / 3;
    }
    
    .cart-item-details {
        grid-column: 2;
    }
    
    .cart-item-price {
        grid-column: 1 / 3;
        text-align: center;
        font-size: 1.2rem;
    }
    
    .quantity-controls {
        grid-column: 1 / 3;
        justify-self: center;
    }
    
    .remove-item {
        grid-column: 1 / 3;
        justify-self: center;
    }
    
    .cart-actions {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .order-info {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .empty-cart {
        padding: 40px 15px;
    }
    
    .empty-cart-content i {
        font-size: 3rem;
    }
    
    .empty-cart-content h3 {
        font-size: 1.5rem;
    }
    
    .cart-content {
        padding: 15px;
    }
    
    .cart-header h3 {
        font-size: 1.4rem;
    }
    
    .cart-item {
        padding: 15px;
    }
    
    .cart-summary {
        padding: 20px;
    }
    
    .summary-row {
        font-size: 1rem;
    }
    
    .summary-row.total {
        font-size: 1.2rem;
    }
}

/* Animation pour l'ajout d'articles */
.cart-item-enter {
    animation: slideInUp 0.3s ease-out;
}

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

/* Animation pour la suppression d'articles */
.cart-item-exit {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}