/* ========== CHARTE GRAPHIQUE ========== */
:root {
  --nuit: #14100D;
  --cuir: #5A3A22;
  --bronze: #B07A3A;
  --or: #D9A441;
  --rouge: #8E1B1B;
  --parchemin: #F1E6D2;
  --titre: "Cinzel", Georgia, serif;
  --texte: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--texte);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--parchemin);
  background-color: var(--nuit);
}

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: var(--or);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

img {
  display: block;
  max-width: 100%;
}

/* ========== HEADER PARALLAX (base du cours) ========== */
.parallax {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background-image: url("../images/calques/fond.webp");
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed; /* le fond, le plus lointain, reste immobile */
}

.parallax__layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.parallax__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* Vitesses : plus le calque est loin, plus il "suit" le scroll */
.layer1 { z-index: 1; --parallax-speed: 0.5; }   /* fumée lointaine */
.layer2 {                                         /* rayons de lumière */
  z-index: 2;
  --parallax-speed: 0.45;
  mix-blend-mode: screen;
  opacity: 0.7;
}
.layer3 { z-index: 3; --parallax-speed: 0.4; }   /* titre */
.layer4 { z-index: 4; --parallax-speed: 0.25; }  /* personnage */
.layer5 {                                         /* braises */
  z-index: 5;
  --parallax-speed: 0.18;
  mix-blend-mode: screen;
}
.layer6 { z-index: 6; --parallax-speed: 0.1; }   /* poussière */
.layer7 { z-index: 7; --parallax-speed: 0; }     /* fumée proche */

/* Titre superposé */
.titre {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18vh;
  text-align: center;
}

.titre h1 {
  margin: 0;
}

.logo {
  width: min(80vw, 620px);
  height: auto;
  filter: drop-shadow(0 6px 25px rgba(20, 16, 13, 0.8));
}

.tagline {
  font-family: var(--titre);
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  letter-spacing: 0.25em;
  color: var(--parchemin);
  margin: 0.5rem 0 0;
  text-shadow: 0 2px 12px rgba(20, 16, 13, 0.9);
}

/* Personnage détouré : collé en bas, à droite */
.personnage img {
  position: absolute;
  right: 6%;
  bottom: 0;
  width: auto;
  height: 82%;
  object-fit: contain;
}

/* Menu */
.menu {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
}

.menu a {
  white-space: nowrap;
  color: var(--parchemin);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.menu a:hover {
  border-color: var(--or);
}

/* ========== À PROPOS ========== */
.apropos {
  padding: 6rem 1.5rem;
  background-color: var(--cuir);
}

.apropos__contenu {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 68rem;
  margin: 0 auto;
}

.apropos__affiche {
  flex: 0 0 auto;
  width: min(320px, 35%);
  min-width: 0;
  border-radius: 6px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  transform: rotate(-2deg);
}

.apropos__texte {
  flex: 1;
}

.apropos__texte h2 {
  text-align: left;
}

.apropos p {
  margin: 0 0 1.2rem;
  font-size: 1.1rem;
}

/* Survol 1 : le bouton rouge s'embrase */
.bouton {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  background-color: var(--rouge);
  color: var(--parchemin);
  font-family: var(--titre);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s;
}

.bouton:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(217, 164, 65, 0.8);
}

/* ========== VIDÉO ========== */
.video {
  position: relative;
  height: 70vh;
  overflow: hidden;
  background-color: var(--nuit);
}

.video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* L'extrait YouTube couvre toute la section, comme une vidéo de fond */
.video__youtube {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, calc(70vh * 16 / 9));
  height: max(70vh, calc(100vw * 9 / 16));
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.video__texte {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 3rem !important;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(transparent 55%, rgba(20, 16, 13, 0.85));
}

.video__texte p {
  margin: 0;
}

/* ========== GALERIES (flexbox) ========== */
.galerie {
  padding: 6rem 1.5rem;
  background-color: var(--nuit);
}

.galerie h2 {
  margin-bottom: 2.5rem;
}

.galerie__grille {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  max-width: 75rem;
  margin: 0 auto;
}

/* Galerie Scènes cultes : fond rouge sombre */
.galerie--cultes {
  background-color: #3A0E0E;
}

/* Galerie Personnages : cartes au format 3:4 */
.galerie--personnages {
  background-color: #2A1A10;
}

.galerie--personnages .galerie__grille {
  justify-content: center;
}

.carte {
  flex: 0 0 calc((100% - 2.4rem) / 3);
  background-color: var(--nuit);
  border: 1px solid rgba(176, 122, 58, 0.4);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.carte img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.carte h3 {
  font-size: 1.6rem;
  margin: 1rem 1.2rem 0;
}

.carte__acteur {
  margin: 0.2rem 1.2rem 0.5rem;
  color: var(--bronze);
  font-size: 0.9rem;
  font-weight: 600;
}

.carte p:last-child {
  margin: 0 1.2rem 1.4rem;
  font-size: 0.95rem;
}

/* Survol 2 : la carte se soulève avec une lueur rouge */
.carte:hover {
  transform: translateY(-8px);
  border-color: var(--or);
  box-shadow: 0 14px 35px rgba(142, 27, 27, 0.5);
}

/* Galerie Univers : 3 images par ligne, format 3:2 */
.photo {
  flex: 1 1 calc(33.333% - 1.2rem);
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.6);
  transition: transform 0.6s, filter 0.6s;
}

.photo {
  position: relative;
}

.photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 1rem 0.8rem;
  font-family: var(--titre);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--parchemin);
  background: linear-gradient(transparent, rgba(20, 16, 13, 0.85));
}

/* Survol 3 : l'image sort du passé (sépia vers couleurs) et zoome */
.photo:hover img {
  transform: scale(1.08);
  filter: sepia(0);
}

/* ========== FOOTER ========== */
.footer {
  background-color: #0B0907;
  color: #CBBFAA;
  padding: 4rem 1.5rem 2rem;
  border-top: 3px solid var(--bronze);
}

.footer__colonnes {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 75rem;
  margin: 0 auto;
}

.footer__colonnes > div {
  flex: 1 1 14rem;
}

.footer h3 {
  font-size: 1.3rem;
}

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

.footer li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer a {
  color: var(--parchemin);
}

.footer a:hover {
  color: var(--or);
}

.footer__copyright {
  max-width: 75rem;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(176, 122, 58, 0.3);
  font-size: 0.85rem;
  text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 950px) {
  .photo {
    flex-basis: calc(50% - 1.2rem);
  }

  .carte {
    flex-basis: calc((100% - 1.2rem) / 2);
  }

  .apropos__contenu {
    flex-direction: column;
    text-align: center;
  }

  .apropos__affiche {
    width: min(280px, 70%);
  }

  .apropos__texte h2 {
    text-align: center;
  }

  .titre {
    padding-top: 22vh;
  }
}

@media (max-width: 600px) {
  .parallax {
    background-attachment: scroll; /* l'iPhone gère mal le fond fixe */
  }

  .parallax__layer img {
    object-position: 40% bottom;
  }

  .personnage img {
    right: -12%;
    height: 50%;
  }

  .menu {
    left: 0;
    justify-content: center;
    gap: 0.9rem;
    padding: 1rem 0.5rem;
    font-size: 0.85rem;
  }

  .photo,
  .carte {
    flex-basis: 100%;
  }

  .apropos,
  .galerie {
    padding: 4rem 1.2rem;
  }

  .video {
    height: 50vh;
  }

  .video__youtube {
    width: max(100%, calc(50vh * 16 / 9));
    height: max(50vh, calc(100vw * 9 / 16));
  }
}
