/* Éléments généraux */
body {
  margin: 0;
  font-family: 'Times New Roman', 'Helvetica Neue', 'Montserrat', sans-serif;
  background: #fff;
  color: #222;
}

h1, h2 {
  font-weight: normal;
  font-size: 1.3em;
}

h3 {
  font-weight: normal;
  font-size: 0.9em;
  color: black;
  margin: 11px 0 8px;
}

hr {
  border: none;
  height: 2px;
  background-color: #eee;
}

p {
  font-size: 0.9em;
}

/* Menu de navigation, version bureau */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;
  padding-top: 50px;
  background: white;
  border-right: 1px solid #eee;
  display: block;
}

.sidebar ul {
  list-style: none;
  padding: 0 15px;
}

.sidebar li {
  margin: 20px 26px;
}

.sidebar a {
  text-decoration: none;
  color: #393931;
  font-size: 0.9em;
}

.sidebar a:hover {
  font-weight: bold;
}

.sidebar ul li:first-child a {
  font-size: 1.8em;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.sidebar ul li:first-child {
  margin-bottom: 3.5em;
}

.active {
  font-weight: bold;
}

/* Menu de navigation, version mobile */
.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  background: white;
}

.logo {
  font-size: 20px;
}

.logo a {
  text-decoration: none;
  color: black;
}

.menu-toggle {
  font-size: 28px;
  font-family: Arial, sans-serif;
  background: none;
  border: none;
  cursor: pointer;
  color: grey;
}

.menu-icon {
  width: 30px;
  height: 30px;
  color: black;
}

.mobile-nav {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  background: white;
  display: none;
  flex-direction: column;
  border-top: 1px solid #eee;
  z-index: 1000; 
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  border-bottom: 1px solid #eee;
}

.mobile-nav a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #222;
  font-weight: 500;
}

/* Page d'accueil */
.hero {
  margin-left: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 60px 30px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
	transition: background-image 1s ease;
}

/* Page d'accueil - Éléméents cachés par défaut (bureau) */
#accueil.hero h1,
#accueil.hero a {
  display: none;
}

/* Page d'accueil - Tablettes et mobiles */
@media (max-width: 1024px) {
  .hero {
    background-image: url('../webp/accueil-mobile.webp');
  }
	#accueil.hero h1,
  #accueil.hero a {
    display: block; /* ou inline-block selon ton design */
  }
}

#accueil h1 {
  font-size: 50px;
}

#accueil a {
  font-size: 19px;
  border: 1px solid white;
  border-radius: 5px;
  width:150px;
  padding:5px;
  margin:0 auto;
  margin-bottom: 20px;
  color:white;
  text-decoration: none;
}

#accueil a:hover {
  color:black;
  background-color: white;
}

/* Section */
section {
  padding: 60px 30px 0px;
  margin-left: 200px;
}

/* Pages principales, espacements des éléments */
section.first-gallery {
  padding: 55px 30px 0px;
}

section.next-gallery {
  padding: 10px 30px 0px;
}

section.last-gallery {
  padding: 10px 30px 10px;
}

/* Pages principales, grille à une seule colonne */
.grid-wrapper.single-column {
  max-width: 650px;
  margin: 0 auto;
}

.grid.single-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grid.single-column a:has(img) {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}

.grid.single-column img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

/* Pages principales, grille à plusieurs colonnes */
.grid-wrapper.multi-columns {
  max-width: 650px;
  margin: 0 auto;
}

.grid.multi-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /*changer la valeur ici pour passer de 2 à 3 colonnes */
  gap: 20px;
  margin-top:20px;
}

.grid.multi-columns a:has(img) {
  aspect-ratio: 1 / 1;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: block;
}

.grid.multi-columns img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

/* Pages principales, texte de description */
.galerie-info {
  max-width: 650px;
  text-align:justify;
  margin: 0 auto;
  padding:5px;
}

/* Pages principales, bouton "lire plus" pour les descriptions superieures à trois lignes */
.read-more-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 5px;
}

.read-more-text.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.read-more-btn-container {
  text-align: right;
  height:auto;
}

.read-more-btn {
  background: none;
  border: none;
  color: #0077cc;
  cursor: pointer;
  font-size: 0.7em;
  padding: 0;
  margin-bottom: 5px;
}

/* Pages principales, mentions légales pied de page */
.pied-page {
  max-width: 650px;
  text-align:right;
  margin: 30px auto 0;
  padding:5px;
  font-size: 0.9em;
}

/* Pages "galerie" */
.simple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 60px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.simple-grid .grid-item a {
  display: block;
  overflow: hidden;
  position: relative;
}

.simple-grid .grid-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

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

.gallery-title {
  max-width: 1200px;
  text-align:left;
  margin: 30px auto 0;
  padding:5px;
}

.gallery-title hr {
  margin-bottom: 25px;
}

/* Pages "galerie", mentions légales pied de page */
.page-galerie .pied-page {
  max-width: 1200px;
  text-align:right;
  margin: 30px auto 0;
  padding:5px;
  font-size: 0.9em;
}

/* Légende des images au survol, pour l'ensemble des pages */
.grid a[data-series]::after,
.simple-grid .grid-item a[data-series]::after {
  content: attr(data-series);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  color: #000;
  font-size: 0.9em;
  padding: 8px 10px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: left;
}

.grid a[data-series]:hover::after,
.simple-grid .grid-item a[data-series]:hover::after {
  opacity: 1;
}

/* Page "dessins.html", masquer les <a> sans balise <img> */
.grid a:not(:has(img)) {
  display: none;
}

/* Bouton "retour en haut" */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 25px;
  background-color: #555;
  border: none;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  display: none;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

#backToTop svg {
  display: block;
}

#backToTop:hover {
  background-color: #333;
}

.chevron-icon {
  transition: transform 0.3s ease;
}

#backToTop:hover .chevron-icon {
  transform: translateY(-3px);
}

/* Page contact */
.contact-container {
  text-align: center;
  margin: 90px auto;
}

.letter-icon {
  font-size: 60px;
  color: #0078D7;
  margin: 40px;
}

.letter-icon a {
  text-decoration: none;
}

.letter-icon:hover {
  transform: scale(1.08); 
}

a.mail-link {
  font-size: 1em;
  color: #333;
  border: 1px solid #cfcfcf;
  padding: 16px;
  border-radius: 8px;
  background: white;
}

a.mail-link:hover {
  text-decoration: underline !important;
}

/* Fancybox */
.fancybox__backdrop {
  background-color: rgba(255, 255, 255, 0.8);
}

.fancybox__container {
  background-color: #fff !important;
  box-shadow: 0 0 30px rgba(0,0,0,0.1);
  border-radius: 8px;
}

.fancybox__caption {
  font-family: 'Times New Roman', sans-serif;
  font-size: 15px;
  color: #333;
}

.fancybox__counter span {
  text-shadow: none !important;
  color: black !important;
}

.carousel__button svg {
  filter: 
    drop-shadow(1px 0 white)
    drop-shadow(-1px 0 white)
    drop-shadow(0 1px white)
    drop-shadow(0 -1px white) !important;
  stroke: black !important;
  stroke-width: 2px !important;
}

.fancybox__toolbar {
  background: transparent !important;
  box-shadow: none !important;
}

/* Affichage adaptatif */

@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  section, .hero { margin-left: 0; }
  .mobile-nav.active { display: flex; }
  section.first-gallery { padding: 10px 30px 0px; }
  .fancybox__caption { font-size: 12px; text-align: justify; }
}

@media (max-width: 900px) {
  .simple-grid { gap: 20px; }
  section { padding: 20px 30px 0; }
}

@media (max-width: 1024px) {
  #backToTop { display: none !important; }
}

@media (max-width: 1600px) {
  .page-galerie #backToTop { display: none !important; }
}