/* =========================================
   VARIABLES & GLOBAL
   ========================================= */
:root {
	--primary-blue: #005b96;
	--bg-sand: #fdfbf7;
	--text-main: #333;
	--text-light: #555;
	--text-muted: #999;
}

body {
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	margin: 0;
	background-color: var(--bg-sand);
	color: var(--text-main);
	-webkit-font-smoothing: antialiased;
}

a {
	text-decoration: none;
	color: inherit;
}

/* =========================================
   HEADER & NAVIGATION (Logo Izquierda - Menú Derecha)
   ========================================= */
header.main-header {
	background: white;
	padding: 1.2rem 3rem;
	margin-bottom: 2rem;
	box-shadow: 0 2px 10px rgba(0,0,0,0.02);
	display: flex;
	justify-content: space-between; /* Logo a un extremo, menú al otro */
	align-items: center;
}

/* Contenedor del Logo (Izquierda) */
.brand-container {
	display: flex;
	align-items: center;
	gap: 15px;
	/* No necesitamos 'order' */
}

.profile-img {
	width: 50px; /* Tamaño discreto */
	height: 50px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--primary-blue);
	padding: 2px;
}

.brand-name {
	font-size: 1.4rem;
	color: var(--primary-blue);
	text-transform: uppercase;
	letter-spacing: 2px;
	font-weight: 700;
	text-decoration: none;
}

/* Menú de Navegación (Derecha) */
.main-nav {
	display: flex;
	gap: 30px;
}

.nav-link {
	text-decoration: none;
	color: var(--text-light);
	text-transform: uppercase;
	font-size: 0.85rem;
	letter-spacing: 1px;
	font-weight: 600;
	transition: color 0.3s;
	position: relative;
}

.nav-link:hover {
	color: var(--primary-blue);
}

/* Subrayado animado */
.nav-link::after {
	content: '';
	position: absolute;
	width: 0;
	height: 1px;
	bottom: -4px;
	left: 0;
	background-color: var(--primary-blue);
	transition: width 0.3s;
}

.nav-link:hover::after {
	width: 100%;
}

/* =========================================
   RESPONSIVE HEADER (MÓVIL)
   ========================================= */
@media (max-width: 850px) {
	header.main-header {
		flex-direction: column; /* Apila verticalmente */
		gap: 15px;
		padding: 1.5rem 1rem;
	}
	
	.brand-container {
		flex-direction: column; /* Logo arriba, nombre abajo */
		gap: 10px;
	}

	.main-nav {
		flex-wrap: wrap; /* Permite que los links bajen si no caben */
		justify-content: center;
		gap: 15px;
		margin-top: 10px;
	}
	
	.nav-link {
		font-size: 0.8rem;
	}
}

/* =========================================
   RESPONSIVE HEADER (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
	header.main-header {
		flex-direction: column-reverse; /* Menú abajo, Logo arriba */
		gap: 20px;
		padding: 1.5rem 1rem;
	}
	
	.main-nav {
		flex-wrap: wrap;
		justify-content: center;
		gap: 15px;
	}
	
	.brand-container {
		flex-direction: column;
	}
}
/* =========================================
   PAGE D'ACCUEIL (GRILLE & CARTES)
   ========================================= */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	padding-bottom: 50px;
}

.card {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: block;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.media-wrapper {
	position: relative;
	padding-top: 100%; /* Ratio Carré 1:1 */
	overflow: hidden;
	background-color: #eee;
}

.media-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.card:hover .media-content {
	transform: scale(1.03);
}

.video-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(0,0,0,0.6);
	color: white;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.7rem;
	font-weight: bold;
	z-index: 2;
}

.card-body {
	padding: 1.5rem;
}

.card-caption {
	font-size: 0.9rem;
	color: var(--text-light);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 10px;
	line-height: 1.5;
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 40px 0;
	padding-bottom: 40px;
}

.page-link {
	padding: 10px 15px;
	background: white;
	border: 1px solid #ddd;
	color: var(--primary-blue);
	border-radius: 4px;
	transition: all 0.2s;
}

.page-link:hover {
	background: var(--primary-blue);
	color: white;
	border-color: var(--primary-blue);
}

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

.page-link.disabled {
	color: #ccc;
	pointer-events: none;
	border-color: #eee;
}

/* =========================================
   PAGE DE DÉTAIL (LAYOUT PRODUIT)
   ========================================= */
.product-wrapper {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px;
	display: grid;
	/* 3 Colonnes : Miniatures | Principal | Infos */
	grid-template-columns: 100px 1fr 400px;
	gap: 40px;
	align-items: start;
}

/* Colonne 1 : Miniatures */
.thumbs-column {
	display: flex;
	flex-direction: column;
	gap: 15px;
	max-height: 80vh;
	overflow-y: auto;
	padding-right: 5px;
	scrollbar-width: thin;
	scrollbar-color: #ddd transparent;
}

.thumb-item {
	width: 100%;
	aspect-ratio: 1/1;
	cursor: pointer;
	border: 2px solid transparent;
	opacity: 0.6;
	position: relative;
	border-radius: 4px;
	overflow: hidden;
	background: #eee;
	transition: opacity 0.2s, border-color 0.2s;
}

.thumb-item img, 
.thumb-item video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.thumb-item:hover, 
.thumb-item.active {
	opacity: 1;
}

.thumb-item.active {
	border-color: var(--primary-blue);
}

.play-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.play-overlay::after {
	content: '▶';
	color: white;
	font-size: 1.2rem;
}

/* Colonne 2 : Scène Principale */
.main-stage {
	position: relative;
	background: white;
	border-radius: 4px;
	height: 80vh;
	max-height: 800px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 5px 20px rgba(0,0,0,0.05);
	overflow: hidden;
}

#main-visual {
	width: 100%;
	height: 100%;
	object-fit: contain; /* L'image entière est visible */
	display: block;
}

/* Colonne 3 : Infos */
.info-column {
	position: sticky;
	top: 40px;
}

.product-date {
	color: var(--text-muted);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 15px;
	display: block;
}

.product-title {
	font-size: 1.8rem;
	font-weight: 300;
	color: var(--primary-blue);
	margin: 0 0 20px 0;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.product-desc {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text-light);
	white-space: pre-line; /* Respecte les retours à la ligne */
	margin-bottom: 40px;
}

.btn-instagram {
	display: inline-block;
	background: var(--primary-blue);
	color: white;
	padding: 18px 40px;
	text-decoration: none;
	text-transform: uppercase;
	font-weight: bold;
	letter-spacing: 1px;
	font-size: 0.9rem;
	transition: background 0.3s;
	border-radius: 2px;
}

.btn-instagram:hover {
	background: #004070;
}

/* =========================================
   RESPONSIVE (TABLETTES & MOBILES)
   ========================================= */
@media (max-width: 1024px) {
	/* Layout Détail */
	.product-wrapper {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 20px;
	}
	
	.main-stage {
		order: 1;
		height: 500px;
	}
	
	.thumbs-column {
		order: 2;
		flex-direction: row; /* Miniatures horizontales */
		overflow-x: auto;
		height: auto;
		max-height: none;
		padding-bottom: 10px;
	}
	
	.thumb-item {
		width: 80px;
		flex-shrink: 0;
	}
	
	.info-column {
		order: 3;
		position: static;
	}
	
	/* Nav */
	.nav-bar {
		padding: 15px 20px;
	}
}

/* =========================================
   FIX MOBILE : PAGINATION
   ========================================= */
@media (max-width: 600px) {
	.pagination {
		/* Permet aux boutons de passer à la ligne si manque de place */
		flex-wrap: wrap; 
		gap: 8px; /* Réduit l'espace entre les boutons */
		padding: 0 10px 40px 10px;
	}

	.page-link {
		/* Boutons un peu plus compacts */
		padding: 8px 12px; 
		font-size: 0.85rem;
		/* Empêche les boutons de s'écraser */
		flex: 0 0 auto; 
	}
}