body {
    font-family: sans-serif, Verdana, Arial, Helvetica;
    font-weight: normal;
	margin-top: 0;
	}

h1 {
    font-size: 40px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    color: #329A1E;
    }


.header {
    margin-left: auto;
    margin-right: auto;
    max-width:900px;
	background-color:#fff;
	}

.menu {
    text-align: center;
    padding-top: 12px;
    padding-bottom: 0;
	background-color: #cdab5a;
    margin-top: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right:auto;
    }

.menu p {
    font-family: sans-serif, Verdana, Arial, Helvetica;
    font-size: 1.1rem;
	line-height:1.3rem;
    font-weight: normal;
    text-align: center;
    color: #fff;
    margin-top: 0;
    }

.menu img {
    max-width: 36px;
    }

.menu a {
    color: #2a4dfc;
	line-height:24px;
    }
.menu a:visited {    
	color: #2a4dfc; 
	background-color: #cdab5a;
	}
.menu a:hover {    
	color:yellow;
    background-color: blue;
	}
.menu a:active {    
	color:red;
	}



.pied {
    text-align: center;
    padding: 12px 4px 10px 4px;
	background-color: #cdab5a;
    margin-bottom: 0;
    max-width: 100%;
	line-height:24px;
	margin-left: auto;
	margin-right: auto;
    }

.pied a {
    color: #2a4dfc;
	line-height:24px;
    }
.pied a:visited {    
	color: #2a4dfc; 
	background-color: #cdab5a;
	}
.pied a:hover {    
	color:yellow;
    background-color: blue;
	}
.pied a:active {    
	color:red;
	}

a {
	text-decoration: none; 
	color: #57a7d7; 
	/*color: #fff; */
	font-weight: 600;
	}
a:visited {    /* lien pointant sur une page déjà visitée  */
	/*background-color: #fff;*/
	color: #fff; 
	}
a:hover {    /* dans l'ordre   */
	background-color: #fff; 
	color:blue;
	}
a:active {    
	background-color: #fff; 
	color:red;
	}


/*  ********************************* DEBUT COLONNES *******************   */
.sept_colonnes {
	display: grid;
	grid-gap: 10px;
	align-content: center;
    text-align: center;
	}
.col_1_7 {
  grid-column: 1;
	}
.col_2_7 {
  grid-column: 2;
	}
.col_3_7 {
  grid-column: 3;
	}
.col_4_7 {
  grid-column: 4;
	}
.col_5_7 {
  grid-column: 5;
	}
.col_6_7 {
  grid-column: 6;
	}
.col_7_7 {
  grid-column: 7;
	}

.trois_colonnes {
	display: grid;
	grid-gap: 20px;
	/*vertical-align: middle;*/
    /*align-items: center;*/
	}
.col_1_3 {
    grid-column: 1;
    }
.col_2_3 {
    grid-column: 2;
    }
.col_3_3 {
    grid-column: 3;
    }



/* CONTEXTE DE LA GRILLE DES MINIATURES */
.gallery-grid {
  display: grid;
  /* Aligne intelligemment les éléments sur une ligne de base commune */
  /*   grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));  */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-items: end; /* Aligne le bas de toutes les miniatures pour un effet régulier */
  gap: 20px;
  /*padding: 20px;*/
  /*   max-width: 1200px;   */
  max-width: 1600px;
  margin: 0 auto;
} 



/* LA ZONE DE LA VIGNETTE */
.thumb-link {
  display: block;
  width: 100%;
  /* SUPPRESSION de aspect-ratio: 4/3 pour libérer la forme naturelle */
  height: auto; 
  overflow: hidden;
  /*border-radius: 6px;  */
  /*border-radius: 10px;*/
  /*   box-shadow: 0 4px 10px rgba(0,0,0,0.12);   */
  /*transition: transform 0.2s, box-shadow 0.2s;*/
  transition: transform 0.3s;
}

.thumb-link:hover {
  /*   transform: scale(1.04);   */
  transform: scale(1.14);
  /*box-shadow: 0 6px 15px rgba(0,0,0,0.2);*/
    opacity: 0.5;
}

/* L'IMAGE MINIATURE */
.thumb-link img {
  width: 100%;
  height: auto; /* L'image dicte elle-même sa hauteur au navigateur */
  /*max-height: 200px; /* Sécurité : empêche une photo verticale géante de déformer la grille */
  max-height: 220px; /* Sécurité : empêche une photo verticale géante de déformer la grille */
  object-fit: contain; /* Affiche 100% de la miniature sans jamais rien couper */
  /*  background: #f7f7f7; /* Optionnel : fond très clair si l'image a des dimensions exotiques */
  display: block;
	/*background-color: #fff; */
}




/* MODE PLEIN ÉCRAN */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /*background: rgba(0, 0, 0, 1); /* Fond noir légèrement plus opaque pour masquer le site */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
    background-color: #000;
}

.lightbox-overlay:target {
  display: flex;
}

.close-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: zoom-out;
  z-index: 1;
}

/* BLOC CENTRAL */
.lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /*width: 95vw;
  height: 95vh;*/
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* 1. BLOC DE MÉDIAS OPTIMISÉ POUR LE PLEIN ÉCRAN */
.media-box {
  position: relative; /* Permet à la légende de se caler par-dessus */
  display: flex;
  align-items: center;
  justify-content: center;
  /*width: 98vw;  /* Reprend 98% de la largeur de l'écran */
  /*height: 98vh; /* Reprend 98% de la hauteur de l'écran */
  width: 100%;  
  height: 100%; 
}

/* La photo récupère sa taille maximale absolue */
.media-box img {
  width: 98vw;  /* Reprend 98% de la largeur de l'écran */
  height: 98vh; /* Reprend 98% de la hauteur de l'écran */
  /*width: 100%;
  height: 100%;*/
  object-fit: contain; /* Remplit l'écran au maximum sans aucune déformation */
  /*border-radius: 6px;  */
  border-radius: 18px;
  /*box-shadow: 0 10px 40px rgba(0,0,0,0.6);*/
  display: block;
    
}

/* 2. LA LÉGENDE EN INCRUSTATION (PAR-DESSUS LA PHOTO) */
.lightbox-caption {
  position: absolute;
  bottom: 0; /* Se colle tout en bas de la zone de la photo */
  left: 50%;
  /*transform: translateX(-50%); /* Centre parfaitement le texte */
  transform: translateX(-50%); /* Centre parfaitement le texte */
  width: auto;
  max-width: 80%; /* Évite que le texte ne touche les bords ou les flèches */
  /*margin: 0 0 20px 0; /* Décale légèrement le texte vers le haut pour l'esthétique */
  margin: 0 0 12px 0; /* Décale légèrement le texte vers le haut pour l'esthétique */
  padding: 6px 25px;
  background: rgba(15, 15, 15, 0.75); /* Fond noir transparent très élégant */
  color: #ffffff;
  font-family: sans-serif;
  font-size: 1.1rem;
  text-align: center;
  border-radius: 30px; /* Forme de pilule arrondie moderne */
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); /* Floute légèrement la photo à l'arrière du texte */
  z-index: 5; /* Passe devant l'image */
}

/* Ajustements pour les écrans de smartphones */
@media (max-width: 768px) {
  .media-box {
    width: 98vw;  /* Encore plus grand sur mobile */
    height: 95vh;
  }
  .lightbox-caption {
    font-size: 0.9rem;
    padding: 8px 18px;
    bottom: 40px; /* Remonte un peu pour éviter les barres de navigation des téléphones */
    max-width: 90%;
  }
}

/* BOUTONS (CROIX ET FLÈCHES) */
.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 1);
  /*font-size: 3.5rem;*/
  font-size: 6rem;
  text-decoration: none;
  line-height: 1;
  background: rgba(0, 0, 0, 0.5);
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  z-index: 20;
}



.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3.5rem;
  text-decoration: none;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  user-select: none;
  transition: background 0.2s;
  z-index: 10;
}

.nav-arrow:hover { background: rgba(0, 0, 0, 0.8); }
.prev { left: 20px; }
.next { right: 20px; }

@media (max-width: 768px) {
  .close-button { top: 10px; right: 10px; width: 45px; height: 45px; font-size: 2.5rem; }
  .nav-arrow { font-size: 2.5rem; padding: 10px 15px; }
  .prev { left: 10px; }
  .next { right: 10px; }
  .lightbox-caption { font-size: 0.95rem; }
  .media-box img { max-height: 73vh; }
}

