:root {
  /* Variables de couleurs strictes */
  --midnight-blue: #0A1128; 
  --sand-white: #F4F1EA;
  --text-light: #E0E0E0;
  --text-dark: #1A1A1A;
}

/* Reset & Typographie de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Transition de page douce au chargement */
body {
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Thèmes Spécifiques --- */
body.portfolio-theme {
  background-color: var(--midnight-blue);
  color: var(--text-light);
}

body.shop-theme {
  background-color: var(--sand-white);
  color: var(--text-dark);
}

/* --- Navigation --- */
header {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  color: inherit;
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* --- Grille Géométrique (Portfolio) --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.grid-item {
  width: 100%;
  aspect-ratio: 16 / 9; /* Contrainte géométrique stricte */
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.grid-item img, .grid-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recadrage uniforme des miniatures */
  transition: transform 0.3s ease;
}

.grid-item:hover img {
  transform: scale(1.05);
}

/* --- UI Boutique --- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
  padding: 4rem 2rem;
}

.product-card {
  text-align: center;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.btn-buy {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  background-color: var(--text-dark);
  color: var(--sand-white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.3s ease;
}

.btn-buy:hover {
  background-color: #333;
}

/* --- Lightbox Modal --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 17, 40, 0.95);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain; /* Ratio original préservé au clic */
}