/* fonts */
@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:wght@300;600&display=swap');

/* Variables de couleurs */
:root {
  --color-bgn: #ffffff;
  --color-accent: #000000;
  --color-placeholder: #EDEDED;
  --color-placeholder-anim: red; /* pour quand il faudra faire l'animation pulsating sur le placeholder */
  --image-gap: 20px;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Existing Styles */

body {
  background-color: var(--color-bgn);
  margin: 0px;
  padding: 0px;
  text-align: center;
  font-family: 'Host Grotesk', sans-serif;
}

a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Liens du texte : au survol, le soulignement monte et remplit le lien en noir, texte en blanc */
#infosDesktop a,
#infosMobile a {
  text-decoration: none;
  background: linear-gradient(var(--color-accent), var(--color-accent)) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  #infosDesktop a:hover,
  #infosMobile a:hover {
    background-size: 100% 100%;
    color: var(--color-bgn);
  }
}

@media (prefers-reduced-motion: reduce) {
  #infosDesktop a,
  #infosMobile a {
    transition: none;
  }
}

.galleryPicture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
  position: relative; /* passe au-dessus de l'aperçu */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.galleryPicture.loaded {
  opacity: 1;
}

/* Aperçu flou (version 600 px, ~40 Ko) affiché le temps que la vraie photo arrive */
.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.1); /* cache les bords transparents du flou */
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-color: var(--color-placeholder);
  margin-bottom: var(--image-gap);
}

/* <picture> (WebP + JPEG de secours) ne crée pas de boîte : la photo se dimensionne sur le cadre */
.image-wrapper picture {
  display: contents;
}

p {
  margin-bottom: 32px;
}


#imageContainer {
  display: block;
  text-align: right;
  width: 70vw;
  padding-top: 8vh;
  padding-bottom: 250px;
  padding-right: 30px;
  margin-left: auto;
  margin-right: 0px;
}

#logo {
  padding-left: 30px;
  padding-top: 30px;
  position: fixed;
  top: 0;
  left: 0;
  width: 38vw;
  z-index: 1000;
}


#infosDesktop {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 250px;
  color: var(--color-accent);
  text-align: left;
  padding: 20px;
  font-size: 18px;
  line-height: 1.35;
  z-index: 999;
  text-transform: uppercase;
  opacity: 1;
}

#infosMobile {
  display: none;
}

#links {
  font-weight: 600;
}

#end {
  background-color: var(--color-placeholder);
}

/* BREAKPOINT TABLETTE */
@media only screen and (max-width: 1000px) {

  #logo {
    width: 327px;
  }

  #infosDesktop {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 160px;
    color: var(--color-accent);
    text-align: left;
    padding: 20px;
    font-size: 12px;
    line-height: 1.3;
    z-index: 999;
    text-transform: uppercase;
  }

  #infosMobile {
    display: none;
  }
}



/* BREAKPOINT MOBILE */
@media only screen and (max-width: 710px) {
  #logo {
    padding-left: 14px;
    padding-top: 28px;
    width: 300px;
  }

  body {
    margin: 0px;
    padding: 0px;
  }

  p {
    margin-bottom: 12px;
  }


  #infosMobile {
    text-align: left;
    display: inline-block;
    margin: 16px;
    padding-right: 40px;
    margin-top: 280px;
    margin-bottom: 40px;
    color: var(--color-accent);
    font-size: 13px;
    line-height: 1.4;
    z-index: 999;
    text-transform: uppercase;
    }

  #infosDesktop {
    display: none;
  }

  #imageContainer {
    display: block;
    text-align: left;
    width: 100vw;
    padding-top: 0px;
    padding-bottom: 250px;
    padding-right: 0px;
    margin-left: 0;
    margin-right: 0px;
  }

}

/* VUE PLEIN ÉCRAN (touche F) : une photo à la fois, entière, la plus grande possible,
   sur fond noir, transition « dissolve » entre les photos (assets/js/fullview.js) */
html.full-view {
  overflow: hidden;
  background-color: #000000;
}

.full-view body {
  background-color: #000000;
}

.full-view #logo,
.full-view #infosDesktop,
.full-view #infosMobile {
  display: none;
}

.full-view .image-wrapper {
  display: none;
  position: fixed;
  inset: 0;
  width: auto;
  aspect-ratio: auto !important; /* remplace le ratio posé en ligne par index.php */
  margin: 0;
  background-color: transparent;
}

.full-view .image-wrapper.is-current {
  display: block;
}

.full-view .preview {
  display: none;
}

.full-view .galleryPicture {
  object-fit: contain;
  opacity: 1; /* la photo est déjà chargée quand elle s'affiche */
  transition: none; /* pas de fondu d'opacité : la transition est le « dissolve » (assets/js/dissolve.js) */
}

/* MENU DU CLIC DROIT SUR UNE PHOTO (assets/js/photo-menu.js) */
#photoMenu {
  position: fixed;
  z-index: 2000;
  background-color: var(--color-bgn);
  border: 1px solid var(--color-accent);
}

#photoMenu[hidden] {
  display: none;
}

#photoMenu button {
  display: block;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--color-accent);
  font: 600 12px/1.3 'Host Grotesk', sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

#photoMenu button:hover {
  background-color: var(--color-accent);
  color: var(--color-bgn);
}
