* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Georgia', serif; scroll-behavior: smooth; }

.chapitre {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.chapitre::before {
  content: "";
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.45);
}

.contenu {
  position: relative;
  max-width: 700px;
  padding: 2rem;
  z-index: 2;
  opacity: 0;
}

.contenu.visible {
  opacity: 1;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.2rem; margin-bottom: 1rem; }
p { font-size: 1.3rem; line-height: 1.6; }
.signature { margin-top: 2rem; font-style: italic; }

#toggleMusic {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  padding: 10px 15px;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,0.8);
  cursor: pointer;
}

/* L'image HTML est cachée sur ordinateur */
.photo-mobile {
  display: none;
}

/* Présentation dédiée aux téléphones */
@media (max-width: 600px) {
  .chapitre {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem 1rem 5rem;
    background-image: none !important;
    background-color: #111;
    background-attachment: scroll;
  }

  /* Supprime le voile destiné aux images de fond desktop */
  .chapitre::before {
    display: none;
  }

  .photo-mobile {
    display: block;
    width: min(100%, 430px);
    max-height: 48vh;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  }

  .contenu {
    width: min(100%, 430px);
    padding: 0.4rem 0.5rem;
    opacity: 0;
  }

  h1 {
    font-size: 2.15rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  p {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 0.9rem;
  }

  #toggleMusic {
    bottom: 14px;
    right: 14px;
    padding: 9px 12px;
  }
}