/* Déposez votre fichier Caslon Ionic Regular dans fonts/ puis adaptez son nom ci-dessous. */
/* Déposez CaslonIonic-Regular.woff2 dans le dossier fonts/. */
@font-face {
  font-family: "Caslon Ionic";
  src: url("fonts/CaslonIonic-Regular.woff2") format("woff2"),
       url("fonts/CaslonIonic-Regular.otf") format("opentype"); /* Secours */
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #af73ff; /* Servira de couleur par défaut si le JS est désactivé */
}

* { box-sizing: border-box; }

html, body { 
  min-height: 100%; 
  height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Caslon Ionic", "Iowan Old Style", "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.1;
  position: relative;
}

.home {
  min-height: 100svh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2; /* Place le texte au-dessus de l'image */
}

/* Titre au centre exact de l'écran */
.identity {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}

/* Image d'arrière-plan au centre exact */
.hover-image-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1; /* Derrière le texte */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.hover-image-container img {
  width: min(500px, 80vw);
  height: auto;
  display: block;
}

/* Affiche l'image lors du survol de h1 */
.identity h1:hover ~ .hover-image-container,
.home:has(h1:hover) .hover-image-container {
  opacity: 1;
  visibility: visible;
}

h1, p { margin: 0; }

h1 {
  font-size: clamp(0.9rem, 1.3vw, 1.2rem);
  font-weight: inherit;
  line-height: 1.1;
  letter-spacing: 1.5em;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
}

/* Bloc d'informations composé en bas de page */
.bottom-info {
  margin-top: auto;
  max-width: 100%;
  font-size: clamp(0.9rem, 1.3vw, 1.2rem);
  font-style: normal;
  line-height: 1.1;
  letter-spacing: 0em;
}

.names {
  letter-spacing: 0em;
}

a {
  color: inherit;
  text-decoration: none;
  border: 0;
}

a:visited,
a:hover,
a:focus-visible,
a:active {
  text-decoration: none;
}

a:hover, a:focus-visible { 
  color: #6e6e6e; 
}

/* Adaptation smartphone */
@media (max-width: 560px) {
  .home { 
    padding: 1.2rem; 
  }

  /* Réduction de l'espacement des lettres de "UNION STUDIO" */
  h1 {
    font-size: 0.9rem;
    letter-spacing: 1em; /* Réduit drastiquement l'espacement de 1.5em à 0.2em */
  }

  /* Réduction légère de la taille de police globale en bas */
  .bottom-info, 
  .names { 
    font-size: 0.9rem; 
  }

  .bottom-info span { 
    display: inline; 
  }

  /* Redimensionnement de l'image rotative pour les petits écrans */
  .hover-image-container img {
    width: min(400px, 80vw);
  }
}