/* Styles pour les sidebars et menu mobile - VERSION CORRIGÉE */

/* Menu Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-mobile.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.mobile-logo img {
    height: 40px;
}

.nav-menu-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-mobile li {
    border-bottom: 1px solid var(--border-color);
}

.nav-menu-mobile li:last-child {
    border-bottom: none;
}

.nav-link-mobile {
    display: block;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.nav-link-mobile:hover {
    background-color: var(--primary-color);
    color: white;
}

.mobile-menu-footer {
    padding: 1rem;
    background-color: #f8f9fa;
}

.mobile-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-phone,
.mobile-whatsapp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-phone:hover {
    background-color: var(--primary-color);
    color: white;
}

.mobile-whatsapp:hover {
    background-color: #25d366;
    color: white;
}

/* Sidebars */
.cart-sidebar,
.favorites-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.show,
.favorites-sidebar.show {
    right: 0;
}

.cart-header,
.favorites-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
}

.cart-header h3,
.favorites-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-cart,
.close-favorites {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.close-cart:hover,
.close-favorites:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cart-content,
.favorites-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.empty-cart,
.empty-favorites {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

.cart-item,
.favorite-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child,
.favorite-item:last-child {
    border-bottom: none;
}

.cart-item-image,
.favorite-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img,
.favorite-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details,
.favorite-item-details {
    flex: 1;
}

.cart-item-details h4,
.favorite-item-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.variant {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 0.5rem 0;
}

.cart-item-price,
.favorite-item-price {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-dark);
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-item:hover {
    background: #c82333;
}

.favorite-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.cart-total {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification-error {
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification-info {
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.notification i {
    font-size: 1.2rem;
}

/* Popup de commande */
.order-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.order-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.order-popup {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.order-popup-overlay.show .order-popup {
    transform: scale(1);
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.popup-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.popup-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.payment-method:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 0, 128, 0.05);
}

.payment-method input[type="radio"] {
    display: none;
}

.payment-method input[type="radio"]:checked + .payment-icon + .payment-name {
    color: var(--primary-color);
    font-weight: 600;
}

.payment-method:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background-color: rgba(0, 0, 128, 0.1);
}

.payment-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.payment-name {
    font-size: 0.9rem;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.order-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.order-summary h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

.order-item-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

.order-item-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.order-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
    text-align: center;
}

.order-total h4 {
    margin: 0;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .cart-sidebar,
    .favorites-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .popup-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .order-popup {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .popup-header {
        padding: 1rem;
    }
    
    .popup-content {
        padding: 1rem;
    }
    
    .cart-item,
    .favorite-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cart-item-image,
    .favorite-item-image {
        width: 100%;
        height: 120px;
    }
}

/* Variables CSS */
:root {
    --primary-color: #000080;
    --primary-dark: #000060;
    --secondary-color: #FF0000;
    --text-color: #333;
    --border-color: #e1e5e9;
    --success-color: #28a745;
    --error-color: #dc3545;
    --info-color: #17a2b8;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Utilitaires */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

