* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  background: #000;
  height: 100vh;
  font-family: 'Merriweather', serif;
  color: #ffd700;
}

#container {
  position: fixed;
  inset: 0;
}

#bg-image,
#bg-zoomed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
  pointer-events: none;      /* bloque le clic droit sur le fond */
  -webkit-user-drag: none;   /* bloque le glisser-déposer */
  user-select: none;
}

#bg-zoomed {
  opacity: 0;
  pointer-events: none;
}

@keyframes halo-pulse {
  0%   { text-shadow:
    0 0 2px   rgba(255, 255, 255, 0.5),   /* liseré blanc fin */
    0 0 8px   rgba(255, 255, 255, 0.2),   /* halo blanc doux */
    2px  3px  12px rgba(0, 0, 0, 0.95),   /* ombre portée basse */
    -1px -1px 8px  rgba(0, 0, 0, 0.8); } /* contre-ombre */
  50%  { text-shadow:
    0 0 3px   rgba(255, 255, 255, 0.9),   /* liseré blanc éclatant */
    0 0 14px  rgba(255, 255, 255, 0.35),  /* halo blanc plus large */
    3px  5px  20px rgba(0, 0, 0, 0.95),   /* ombre plus profonde */
    -2px -2px 12px rgba(0, 0, 0, 0.85); }
  100% { text-shadow:
    0 0 2px   rgba(255, 255, 255, 0.5),
    0 0 8px   rgba(255, 255, 255, 0.2),
    2px  3px  12px rgba(0, 0, 0, 0.95),
    -1px -1px 8px  rgba(0, 0, 0, 0.8); }
}

#artist-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-size: 5.5vw;
  color: #ffd700;
  opacity: 0;
  transition: opacity 2s ease;
  z-index: 10;
  animation: halo-pulse 3.5s ease-in-out infinite;
}

/* Hotspots */
.hotspot {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.2px;
  cursor: pointer;
  opacity: 0;
  /* opacity/visibility instantanés, seul le scale au hover est animé */
  transition: opacity 0.15s ease, visibility 0.15s ease, background 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(12px);
  border: 3px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  z-index: 15;
  pointer-events: auto;
}

.hotspot:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

/* Accueil et Contact sont centrés avec translateX(-50%)
   → on doit combiner les deux transforms pour ne pas écraser le centrage */
#hotspot-accueil:hover,
#hotspot-contact:hover {
  transform: translateX(-50%) scale(1.15);
}

#hotspot-accueil     { top: 8%; left: 50%; transform: translateX(-50%); }
#hotspot-sculptures  { top: 23%; left: 25%; }
#hotspot-peintures   { top: 23%; right: 25%; }
#hotspot-expos       { top: 60%; left: 25%; }
#hotspot-textes      { top: 60%; right: 25%; }
#hotspot-contact     { top: 70%; left: 50%; transform: translateX(-50%); }

#watermark {
  position: absolute;
  bottom: 25px;
  right: 35px;
  color: rgba(255, 255, 255, 0.35);
  opacity: 0;
  transition: opacity 1.5s;
  z-index: 10;
}

#watermark.visible {
  opacity: 1;
}

/* Bouton Retour haut gauche */
#back-home {
  position: fixed;
  top: 40px;
  left: 40px;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
}

#back-home.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-home img {
  width: 30px;
  height: 30px;
}

/* Pages internes – padding haut augmenté pour éviter la troncature */
.content-page {
  position: absolute;
  inset: 8vh 5vw;
  background: rgba(0, 0, 0, 0.45);                             /*opacité*/
  border-radius: 30px;
  padding: 4vh 6vw 6vh 6vw;
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 50;
  backdrop-filter: blur(0px);     /*flou*/
  overflow-y: auto;
  max-width: 90%;
  margin: 0 auto;
}
/* Modal texte (2ème niveau) – transparence différente */
#text-modal {
  position: absolute;
  inset: 8vh 5vw;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 30px;
  padding: 4vh 6vw 4vh 6vw;  /* padding haut réduit */
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 0;
  transition: opacity 0.6s ease;  /* fondu d'apparition après le zoom */
  z-index: 51;
  backdrop-filter: none;             /* pas de flou : évite de voir les couches inférieures */
  overflow-y: auto;
  max-width: 90%;
  margin: 0 auto;
}

/* Visibilité */

.content-page.visible,
#text-modal.visible {
  display: flex !important;
  opacity: 1 !important;
}

/* Quand le modal texte est ouvert : masquer les content-pages
   pour qu'elles ne transparaissent pas derrière le modal */
#container.modal-open .content-page {
  display: none !important;
}

/* Titres – marge supérieure ajoutée */
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5vw;
  color: #ffd700;
  margin-top: 1vh;
  margin-bottom: 4vh;
  text-align: center;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

/* Photo Accueil */
.page-photo {
  max-width: 85%;
  height: auto;
  border-radius: 15px;
  margin: 3vh 0 5vh 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* Contenu texte */
.page-content {
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: justify;
  color: #ffd700;
  max-width: 100%;
  padding: 0 2rem;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.text-list {
  list-style: none;
  width: 100%;
  max-width: 100%;
}

/* Liste textes – espace réduit */
.text-item {
  margin: 0.8vh 0;
  padding: 2vh 3vw;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.5s;
  width: 100%;
}

.text-item:hover {
  background: rgba(255, 215, 0, 0.15) !important;
  transform: translateX(20px);
}

.text-link {
  font-family: 'Playfair Display', serif;
  font-size: 1.6vw;
  color: #ffd700;
}

.text-author {
  font-size: 1.1vw;
  color: #ccc;
  margin-top: 1vh;
}

/* Modal texte */
#modal-close {
  display: none;
}

#modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5vw;
  color: #ffd700;
  margin-top: 1vh;
  margin-bottom: 1.5vh;
  text-align: center;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.5), 0 0 10px rgba(0, 0, 0, 0.95);
}

#modal-author {
  font-size: 2vw;
  font-style: italic;
  color: #e8e8e8;
  margin-bottom: 2vh;
  text-align: center;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
}

#modal-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #ffd700;
  width: 100%;
  padding: 0 2rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.95);
  text-align: justify;
  hyphens: auto;           /* césure auto — évite les grands espaces inter-mots */
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

#modal-content p {
  margin-bottom: 0.8em;  /* réduit — plus de sauts de ligne géants */
}

/* Listes jolies dans les pages et le modal texte */
.page-content ul,
#modal-content ul,
.page-content ol,
#modal-content ol {
  padding-left: 2.8rem;       /* décalage global des puces – ajuste 2.5rem à 4rem selon tes goûts */
  margin: 1.5rem 0;           /* espace haut/bas autour de la liste */
  list-style-position: outside; /* puces à l'extérieur du bloc texte */
}

.page-content li,
#modal-content li {
  margin-bottom: 0.3rem;      /* espace vertical entre chaque puce */
  padding-left: 0.6rem;       /* petit espace entre puce et texte */
  line-height: 1.35;          /* resserré pour les puces multi-lignes */
}

/* Puces personnalisées dorées */
.page-content ul li::marker,
#modal-content ul li::marker {
  color: #ffd700;             /* couleur dorée pour les puces */
  font-size: 1.4rem;          /* puces un peu plus grosses */
  content: "•";               /* puce pleine ronde */
}

/* ===== FORMULAIRE DE CONTACT ===== */
.form-group {
  margin-bottom: 1.8vh;
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 215, 0, 0.75);
  border-radius: 12px;
  padding: 1.2vh 1.2vw;
  color: #ffd700;
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
  box-sizing: border-box;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 215, 0, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255, 215, 0, 0.8);
  background: rgba(255, 255, 255, 0.12);
}

#cf-submit {
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 50px;
  color: #ffd700;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 1.5px;
  padding: 1.2vh 3vw;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#cf-submit:hover {
  background: rgba(255, 215, 0, 0.25);
  transform: scale(1.05);
}

#cf-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#cf-feedback {
  font-size: 0.95rem;
  color: #e8e8e8;
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
}

#cf-feedback.success { color: #90ee90; }
#cf-feedback.error   { color: #ff7070; }
