/* ========================================
   1. VARIABLES & RESET
   ======================================== */
:root {
	--primary-red: #dc3545;
	--primary-white: #ffffff;
	--primary-orange: #ff6b35;
	--text-dark: #333333;
	--text-light: #6c757d;
	--border-color: #dee2e6;
	--background-light: #f8f9fa;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--text-dark);
	background-color: var(--background-light);
}

/* ========================================
 2. NAVBAR - SECTION UNIQUE & CENTRALISÉE
 ======================================== */
.navbar {
	--bs-navbar-padding-y: 0.15rem;
	background-color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	border-bottom: 3px solid #ff6b6b;   /* ← trait rouge signature */
	padding: 0.15rem 0 !important;
	position: sticky;
	top: 0;
	z-index: 1000;
	min-height: 58px;
	/* hauteur réduite */
	display: flex;
	align-items: center;
}

.navbar .container-fluid {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	display: flex;
	align-items: center;
	min-height: 48px;	/* Synchro avec .navbar */
}

.navbar-brand {
	color: #333333 !important;
	font-weight: 700;
	font-size: 1.5rem;
	font-family: 'Poppins', sans-serif;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	text-decoration: none;
	transition: all 0.3s ease;
}

.navbar-brand:hover {
	color: #fff !important;
	transform: scale(1.05);
}

.navbar-brand img {
	height: clamp(50px, 7vw, 50px);
	/* Réduit pour cohérence */
	width: auto;
	transition: transform 0.3s ease;
}

.navbar-brand:hover img {
	transform: scale(1.05);
}

.cart-icon {
	position: relative;
	color: #333333;
	font-size: 1.3rem;
	text-decoration: none;
	padding: 0.5rem;
	border-radius: 50%;
	transition: all 0.3s ease;
	margin-top: 0.5rem;
}

.cart-icon:hover {
	color: #ff6b6b;
	background-color: rgba(255, 107, 107, 0.1);
	transform: scale(1.1);
}

.cart-count {
	position: absolute;
	top: -8px;
	right: -8px;
	background-color: var(--primary-orange);
	color: white;
	border-radius: 50%;
	padding: 2px 6px;
	font-size: 0.75rem;
	font-weight: 600;
}

.btn-outline-light {
	color: #333333;
	border-color: #333333;
	border-width: 2px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.btn-outline-light:hover {
	background-color: #ff6b6b;
	color: #ffffff;
	border-color: #ff6b6b !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-menu {
	border: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	margin-top: 0.5rem;
}

.dropdown-item {
	padding: 0.75rem 1rem;
	transition: all 0.3s ease;
	color: #333333;
}

.dropdown-item:hover {
	background-color: #ff6b6b;
	color: #333333;
}

/* ========================================
     3. LAYOUT & GRIDS
     ======================================== */
.tab-container {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin: 2rem 0;
	padding: 0 1rem;
}

.tab-btn {
	padding: 0.75rem 2rem;
	border: 2px solid var(--primary-red);
	background-color: transparent;
	color: var(--primary-red);
	font-weight: 600;
	font-size: 1.1rem;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
}

.tab-btn:hover {
	background-color: var(--primary-red);
	color: var(--primary-white);
	transform: translateY(-2px);
}

.tab-btn.active {
	background-color: var(--primary-red);
	color: var(--primary-white);
	box-shadow: 0 4px 6px rgba(220, 53, 69, 0.3);
}

.categories-container {
	display: none;
	animation: fadeIn 0.3s ease;
}

.categories-container.active {
	display: block;
}

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

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	padding: 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1.5rem;
	padding: 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

/* ========================================
     4. CARDS & IMAGES
     ======================================== */
.category-card,
.product-card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	cursor: pointer;
}

.category-card {
	padding: 2rem;
	text-align: center;
	border: 2px solid transparent;
}

.category-card:hover {
	transform: translateY(-5px);
	border-color: var(--primary-orange);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.category-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.category-name {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--text-dark);
}

/* Conteneurs d'images */
.product-image-container,
.category-image-container {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	border-radius: 12px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	transition: all 0.3s ease;
}

.product-image-container:hover,
.category-image-container:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-main-image,
.product-image,
.category-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-image-container:hover .product-main-image,
.product-image-container:hover .product-image,
.category-image-container:hover .category-image {
	transform: scale(1.05);
}

/* Overlays */
.image-overlay,
.product-overlay,
.category-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: all 0.3s ease;
	border-radius: 12px;
}

.product-image-container:hover .image-overlay,
.product-image-container:hover .product-overlay,
.category-image-container:hover .category-overlay {
	opacity: 1;
}

.image-zoom-icon,
.product-icon,
.category-icon {
	background: rgba(255, 255, 255, 0.9);
	color: var(--primary-red);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	transition: all 0.3s ease;
}

.image-zoom-icon:hover,
.product-icon:hover,
.category-icon:hover {
	background: var(--primary-red);
	color: white;
	transform: scale(1.1);
}

/* Placeholders */
.product-placeholder,
.category-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #6c757d;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 2px dashed #dee2e6;
	transition: all 0.3s ease;
}

.product-placeholder i,
.category-placeholder i {
	font-size: 3rem;
	margin-bottom: 0.5rem;
	opacity: 0.7;
}

.product-placeholder span {
	font-size: 0.9rem;
	font-weight: 500;
}

.product-image-container:hover .product-placeholder,
.category-image-container:hover .category-placeholder {
	background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
	border-color: var(--primary-red);
	color: var(--primary-red);
}

/* Ancien fallback image */
.product-image {
	background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 4rem;
}

/* ========================================
     5. PRODUIT & PANIER
     ======================================== */
.product-info {
	padding: 1rem;
}

.product-name {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-dark);
}

.product-price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--primary-red);
	margin-bottom: 0.5rem;
}

.total-price {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--primary-orange);
	background-color: rgba(255, 107, 53, 0.1);
	padding: 0.5rem 1rem;
	border-radius: 8px;
	border-left: 4px solid var(--primary-orange);
	margin-bottom: 1rem;
	transition: all 0.3s ease;
}

.product-detail {
	max-width: 800px;
	margin: 2rem auto;
	padding: 1rem;
}

.product-detail-card {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-selector {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 1.5rem 0;
}

.quantity-btn {
	width: 35px;
	height: 35px;
	border-radius: 50%;
	border: 2px solid var(--primary-red);
	background: white;
	color: var(--primary-red);
	font-size: 0.9rem;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.quantity-btn:hover {
	background: var(--primary-red);
	color: white;
	transform: scale(1.1);
}

.quantity-btn:active {
	transform: scale(0.95);
}

.quantity-btn-minus {
	border-color: #dc3545;
	color: #dc3545;
}

.quantity-btn-minus:hover {
	background: #dc3545;
	color: white;
}

.quantity-btn-plus {
	border-color: #28a745;
	color: #28a745;
}

.quantity-btn-plus:hover {
	background: #28a745;
	color: white;
}

.quantity-input {
	width: 80px;
	text-align: center;
	font-size: 1.2rem;
	font-weight: 600;
	border: 2px solid var(--border-color);
	border-radius: 8px;
	padding: 0.5rem;
}

.btn-primary-custom {
	background-color: var(--primary-orange);
	border: none;
	padding: 0.75rem 2rem;
	font-size: 1.1rem;
	font-weight: 600;
	border-radius: 50px;
	color: white;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-primary-custom:hover {
	background-color: #e85a28;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Panier */
.cart-table {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item {
	padding: 1.5rem 1rem;
	border-bottom: 2px solid #e9ecef;
	display: flex;
	align-items: center;
	gap: 1rem;
	transition: all 0.3s ease;
	position: relative;
}

.cart-item:not(:last-child)::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 1rem;
	right: 1rem;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, #dee2e6 20%, #dee2e6 80%, transparent 100%);
}

.cart-item:hover {
	background-color: rgba(255, 107, 53, 0.05);
	border-bottom-color: var(--primary-orange);
}

.cart-item-image {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cart-product-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cart-product-image:hover {
	transform: scale(1.05);
}

.cart-product-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
	font-size: 1.5rem;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 2px dashed #dee2e6;
}

.cart-item-name {
	flex: 1;
	font-weight: 600;
}

.cart-item-name h6 {
	color: var(--text-dark);
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.cart-item-price {
	color: var(--primary-red);
	font-weight: 600;
	font-size: 1.1rem;
}

.modal-product-image {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

.modal-product-placeholder {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 1px dashed #dee2e6;
	border-radius: 6px;
	font-size: 0.9rem;
}

.cart-summary {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	margin-top: 2rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.total-price {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--primary-red);
}

/* ========================================
     6. AUTH & ALERTS
     ======================================== */
.auth-container {
	max-width: 500px;
	margin: 4rem auto;
	padding: 1rem;
}

.auth-card {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
	border-color: var(--primary-orange);
	box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.alert-info-custom {
	background-color: #fff3cd;
	border-color: #ffc107;
	color: #856404;
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1rem;
}

.minimum-notice {
	background-color: #fff3cd;
	border-left: 4px solid var(--primary-orange);
	padding: 0.75rem;
	margin: 1rem 0;
	border-radius: 4px;
	color: #856404;
}

.empty-cart {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--text-light);
}

.confirmation-container {
	max-width: 600px;
	margin: 4rem auto;
	padding: 1rem;
	text-align: center;
}

.success-icon {
	font-size: 5rem;
	color: #28a745;
	margin-bottom: 1rem;
}

/* ========================================
     7. PAGINATION
     ======================================== */
.pagination {
	margin: 2rem 0;
}

.page-link {
	color: var(--primary-red);
	border-color: var(--border-color);
	padding: 0.5rem 0.75rem;
	font-weight: 500;
}

.page-link:hover {
	color: var(--primary-orange);
	background-color: #f8f9fa;
	border-color: var(--primary-orange);
}

.page-item.active .page-link {
	background-color: var(--primary-red);
	border-color: var(--primary-red);
	color: white;
}

.page-item.disabled .page-link {
	color: #6c757d;
	background-color: #fff;
	border-color: #dee2e6;
}

/* ========================================
     8. FOOTER
     ======================================== */
.footer {
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
	color: white;
	padding: 3rem 0 1.5rem;
	margin-top: 4rem;
}

.footer-brand img {
	filter: brightness(0) invert(1);
	transition: all 0.3s ease;
}

.footer-brand img:hover {
	transform: scale(1.05);
}

.footer h5,
.footer h6 {
	font-weight: 600;
	margin-bottom: 1rem;
}

.footer ul li {
	margin-bottom: 0.5rem;
}

.footer a {
	color: white;
	text-decoration: none;
	transition: all 0.3s ease;
}

.footer a:hover {
	color: #ff6b6b !important;
	transform: translateX(5px);
}

.social-links a {
	display: inline-block;
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	text-align: center;
	line-height: 40px;
	transition: all 0.3s ease;
	margin-right: 0.5rem;
	color: white;
}

.social-links a:hover {
	background-color: #ff6b6b;
	color: white !important;
	transform: translateY(-3px);
}

.footer hr {
	border-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
     9. MEDIA QUERIES
     ======================================== */
@media (max-width: 768px) {
	.navbar {
		--bs-navbar-padding-y: 0.1rem;
		padding: 0.1rem 0 !important;
		min-height: 75px;
	}

	.navbar .container-fluid {
		min-height: 70px;
		padding: 0 0.5rem;
	}

	.navbar-brand img {
		height: 54px;
	}

	.navbar-brand {
		font-size: 1.3rem;
		min-height: 50px;
	}

	.cart-icon {
		font-size: 1rem;
		padding: 0.2rem;
	}

	/* Le bouton hamburger (les 3 traits) */
	.navbar-toggler {
		border: none !important;                    /* ← plus de bordure */
		padding: 0.4rem 0.5rem !important;         /* ← un peu plus petit */
		background: transparent !important;
		box-shadow: none !important;
	}

	.navbar-toggler:focus {
		box-shadow: none !important;
		outline: none !important;
	}
    
    .navbar-toggler-icon {
		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23333333' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.8' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
		width: 30px !important;
		height: 36px !important;
		transition: all 0.3s ease;
		margin-top: 11px;
	}

	/* Animation douce au clic */
	.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff6b6b' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.8' d='M6 6L24 24M6 24L24 6'/%3e%3c/svg%3e") !important;
	}
    
    /* Quand le menu est ouvert → fond blanc, texte noir */
    .navbar-collapse {
        background-color: #ffffff !important;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 0.5rem;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    .navbar-nav .nav-link {
        color: #333333 !important;
        font-weight: 600;
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-nav .nav-link:hover {
        color: #ff6b6b !important;
        background-color: rgba(255, 107, 107, 0.1);
        border-radius: 8px;
    }

	.btn-outline-light {
		font-size: 0.85rem;
		padding: 0.25rem 0.6rem;
	}

	.category-grid,
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tab-btn {
		padding: 0.5rem 1.5rem;
		font-size: 1rem;
	}

	.cart-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
		padding: 1rem;
	}

	.cart-item-image {
		width: 60px;
		height: 60px;
		align-self: center;
	}

	.cart-item-name,
	.cart-item-price {
		text-align: center;
		width: 100%;
	}

	.quantity-selector {
		justify-content: center;
		margin: 0.5rem 0;
	}

	.quantity-btn {
		width: 40px;
		height: 40px;
		font-size: 1rem;
	}

	.quantity-input {
		width: 60px !important;
	}

	.product-image {
		height: 120px;
		font-size: 2.5rem;
	}

	.product-info {
		padding: 0.75rem;
	}

	.product-name {
		font-size: 0.95rem;
	}

	.product-price {
		font-size: 1rem;
	}

	.pagination {
		font-size: 0.9rem;
	}

	.page-link {
		padding: 0.375rem 0.5rem;
	}

	.footer {
		padding: 2rem 0 1rem;
		text-align: center;
	}

	.footer .row>div {
		margin-bottom: 2rem;
	}

	.social-links {
		justify-content: center;
		display: flex;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {

	.category-grid,
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1025px) {
	.product-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
