.galeries-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 2rem;
  margin-top: 2rem;
  width: 80vw;
}

.galeries-sidebar {
  background: #f7f7f7;
  padding: 1.2rem;
  border-radius: 8px;
}

.galeries-sidebar h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.galeries-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.galeries-sidebar li + li {
  margin-top: .4rem;
}

.galeries-sidebar a {
  display: block;
  padding: .35rem .5rem;
  text-decoration: none;
  border-radius: 4px;
}

.galeries-sidebar li.active a {
  font-weight: bold;
  background: #ddd;
}

.galeries-content h2 {
  margin-top: 0;
}

.galerie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.galerie-item {
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.galerie-item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .galeries-layout {
    grid-template-columns: 1fr;
  }
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.lightbox.active {
  display: flex;
}



.lightbox-img {
  width: auto !important;
  height: auto !important;
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255,255,255,.2);
  animation: fade-in 0.3s ease;
}



.lightbox-close {
  position: fixed;
  top: 20px;
  right: 40px;
  font-size: 48px;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

/* Animation fade-in */
.lightbox-img {
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* Curseur */
.galerie-thumb {
  cursor: pointer;
}



.galeries-layout {
  display: grid;
  grid-template-columns: 260px 1fr;   /* menu à gauche, photos à droite */
  gap: 2rem;
  margin: 2rem auto;                  /* centre le bloc */
  width: 80vw;                        /* 80% de la largeur de l'écran */
  max-width: 1200px;                  /* optionnel, pour éviter trop large sur grands écrans */
}



/* Conteneur commun */
.galerie-item {
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  position: relative;
}


/* Paysage : ratio plutôt large */
.galerie-item-landscape {
  aspect-ratio: 4 / 3;
}

/* Portrait : plus haut que large */
.galerie-item-portrait {
  aspect-ratio: 3 / 4;
}

/* Carré */
.galerie-item-square {
  aspect-ratio: 1 / 1;
}

/* Toutes les images remplissent leur cadre */
/* Toutes les images remplissent leur cadre et sont centrées */
/* Toutes les images remplissent leur cadre et sont centrées */
.galerie-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;  /* centrage horizontal + vertical */
  display: block;
  cursor: pointer;
}

/* === AMÉLIORATIONS MENU GAUCHE === */

/* + Largeur du menu */
.galeries-layout {
  /* ancien : minmax(200px, 240px) */   
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: start; /* optionnel mais propre */
}

/* Style général du panneau */
.galeries-sidebar {
  background: #fafafa;
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  position: sticky;
}

/* Titres */
.galeries-sidebar h2,
.galeries-sidebar h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Liens des catégories */
.galeries-sidebar a {
  display: block;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  white-space: nowrap;        /* ⚠️ empêche le retour à la ligne */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actif */
.galeries-sidebar li.active a {
  font-weight: 700;
  background: #e2e2e2;
  color: #000;
}

/* Hover */
.galeries-sidebar a:hover {
  background: #ddd;
  transition: background 0.15s ease-in-out;
}

/* Sous-menu dates */
.galeries-dates {
  margin-top: 1rem;
  padding-top: .5rem;
  border-top: 1px solid #ddd;
}

.galeries-dates li + li {
  margin-top: .35rem;
}

.galeries-dates a {
  font-size: 0.9rem;
  padding-left: .8rem;
}

.galeries-dates li.active a {
  background: #ccc;
  font-weight: 600;
}

@media (max-width: 768px) {
  .galeries-layout {
    grid-template-columns: 1fr;
    width: 100vw;
    margin: 1rem 0;
  }
}
