/* ===== Font brand (H1) ===== */
@font-face {
  font-family: "Rizado Script";
  src: url("typo/Colatin.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== Tokens ===== */
:root {
  --bg: #342620;
  --fg: #fde9c8;
  --muted: #9cc3fb;
  --accent: #e25e86;
  --panel-w: 100vw;
  --panel-h: 100vh;
  --g: clamp(20px, 4vw, 48px);
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  overflow: hidden;
}

/* ===== Structure ===== */
.wrap {
  height: 100dvh;
  overflow: hidden;
  position: relative;
  z-index: 3; /* au-dessus de tout */
}
.scroller {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.panel {
  position: relative; /* important pour positionner .txt à l’intérieur */
  flex: 0 0 var(--panel-w);
  height: var(--panel-h);
  scroll-snap-align: start;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ===== Accueil ===== */
.home {
  display: flex;
  justify-content: flex-start;
  padding-left: 10vw;
  align-items: center;
}
.home h1 {
  font-family: "Rizado Script", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: clamp(80px, 14vw, 200px);
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0;
  margin-top: -5vh;
  color: var(--fg);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Menu ===== */
.menu {
  position: absolute;
  top: 30px;
  left: 40px;
  z-index: 10;
}
.contact-btn {
  display: inline-block;
  background: transparent;
  color: var(--fg);
  font-size: 1rem;
  border: 1px solid var(--fg);
  border-radius: 30px;
  padding: 8px 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.contact-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* mini serge */
#p0 .familier {
  position: absolute;
  bottom: 23%;
  right: 7.5%;
  width: 300px;
  z-index: 3;
  animation: float 3.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ===== Texte dans panneaux ===== */
.panel .txt {
  position: absolute; /* reste en absolu pour utiliser --top/--left, etc. */
  z-index: 2; /* au-dessus du masque ::before (z-index:0) */
  max-width: min(44ch, 48vw);
  padding: clamp(12px, 2.4vw, 28px);

  /* offsets pilotés par variables */
  top: var(--top, auto);
  right: var(--right, auto);
  bottom: var(--bottom, auto);
  left: var(--left, auto);

  /* helper de centrage fin par variables (n’écrase plus l’anim) */
  transform: translate(var(--tx, 0), var(--ty, 0)); /* <= direct */
}
#p1 {
  --ty: 25vh;
}
#p2 {
  --ty: -30%;
  --tx: 11vw;
}
#p3 {
  --ty: 25%;
  --tx: -10%; /* vers la gauche */
}
#p4 {
  --ty: -35%;
  --tx: 10%; /* vers la gauche */
}
#p6 {
  --ty: -60%;
  --tx: 10%; /* vers la gauche */
}
#p7 {
  --ty: 7%;
  --tx: 10%; /* vers la gauche */
}
#p8 {
  --ty: 7%;
  --tx: 12%; /* vers la gauche */
}

/* Typo contenus */
.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}
h2 {
  margin: 0.4em 0 0.4em;
  font-size: 4vw;
  line-height: 1.01;
  font-family: "Rizado Script", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-weight: 50;
  letter-spacing: 3px;
}

#p0 h2 {
  font-size: 6vw;
  color: var(--muted);
}
#p0 p {
  color: var(--accent);
}

p {
  margin: 0.2em 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
}
p1 {
  display: block;
  position: absolute; /* pour placement libre */
  color: var(--fg);
  font-size: 1.9vh;
  line-height: 1.5;
  font-weight: 300;
  max-width: 55ch;
  opacity: 0.9;
  transition: all 0.3s ease;
}

/* — P0 — */
#p0 p1 {
  top: 75vh;
  left: 10vw;
  width: 28vw;
  text-align: left;
}

/* — P1 — */
#p1 p1:nth-of-type(1) {
  top: -55vh; /* position verticale */
  left: -24vw; /* position horizontale */
  width: clamp(40ch, 20vw, 60ch);
}

#p1 p1:nth-of-type(2) {
  top: -55vh;
  left: 55vw;
  width: 15vw;
  text-align: right;
}

/* — P2 — */
#p2 p1 {
  top: 75vh;
  left: -50vw;
  width: 25vw;
  text-align: left;
}

/* — P3 — */
#p3 p1:nth-of-type(1) {
  top: -15vh;
  left: -5vw;
  width: 25vw;
}

#p3 p1:nth-of-type(2) {
  top: -5vh;
  left: 58vw;
  width: 27vw;
}

/* — P4 — */
#p4 p1 {
  top: 50vh;
  right: 46vw;
  width: 15vw;
  text-align: right;
}

/* — P5 — */
#p5 p1:nth-of-type(1) {
  top: 40vh;
  left: 1vw;
  width: 25vw;
}

#p5 p1:nth-of-type(2) {
  top: 20vh;
  left: 80vw;
  width: 15vw;
}

/* — P6 — */
#p6 p1 {
  top: 37vh;
  right: 2vw;
  width: 17vw;
  text-align: right;
}

/* — P7 — */
#p7 p1:nth-of-type(1) {
  top: 40vh;
  left: 2vw;
  width: 15vw;
}
#p7 p1:nth-of-type(2) {
  top: 30vh;
  left: 70vw;
  width: 15vw;
}

/* — P8 — */
#p8 p1 {
  top: 30vh;
  right: 63vw;
  width: 15vw;
  text-align: left;
}

/* ===== Frises (masques) — sans coloration imposée ===== */
.bg0,
.bg1,
.bg2,
.bg3,
.bg4,
.bg5,
.bg6,
.bg7,
.bg8 {
  position: relative;
  background: none;
  overflow: hidden;
}
.bg0::before,
.bg1::before,
.bg2::before,
.bg3::before,
.bg4::before,
.bg5::before,
.bg6::before,
.bg7::before,
.bg8::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #fff;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-position: center;
  mask-position: center;
  z-index: 0;
  pointer-events: none;
}
/* masque spécifique */
.bg0::before {
  -webkit-mask-image: url("img/fond/fond0.png");
  mask-image: url("img/fond/fond0.png");
}
.bg1::before {
  -webkit-mask-image: url("img/fond/fond1.png");
  mask-image: url("img/fond/fond1.png");
}
.bg2::before {
  -webkit-mask-image: url("img/fond/fond2.png");
  mask-image: url("img/fond/fond2.png");
}
.bg3::before {
  -webkit-mask-image: url("img/fond/fond3.png");
  mask-image: url("img/fond/fond3.png");
}
.bg4::before {
  -webkit-mask-image: url("img/fond/fond4.png");
  mask-image: url("img/fond/fond4.png");
}
.bg5::before {
  -webkit-mask-image: url("img/fond/fond5.png");
  mask-image: url("img/fond/fond5.png");
}
.bg6::before {
  -webkit-mask-image: url("img/fond/fond6.png");
  mask-image: url("img/fond/fond6.png");
}
.bg7::before {
  -webkit-mask-image: url("img/fond/fond7.png");
  mask-image: url("img/fond/fond7.png");
}
.bg8::before {
  -webkit-mask-image: url("img/fond/fond8.png");
  mask-image: url("img/fond/fond8.png");
}

/* (Supprimé l’ancien override .bgX .txt { position: relative }) */

/* ===== Barre de progression / Dots ===== */
.progress {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #85b3e7;
}
.bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7f9cff);
}
.dots {
  position: fixed;
  right: 14px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  gap: 10px;
  z-index: 9999; /* au-dessus de tout */
  pointer-events: auto;
}
.dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #45444b;
  cursor: pointer;
}
.dots button[aria-current="true"] {
  background: var(--accent);
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .scroller {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
  }
  .panel {
    height: auto;
    min-height: 100dvh;
    padding: calc(var(--g) * 1.2);
  }
  .panel .txt {
    position: static; /* sur mobile, on repasse en flux normal */
    max-width: none;
    background: transparent;
    backdrop-filter: none;
    transform: none; /* ignore --tx/--ty sur mobile */
    text-align: left;
  }
  .home {
    justify-content: flex-start;
    align-items: flex-end;
    padding: 20vh 8vw;
  }
  .home h1 {
    font-size: 16vw;
  }
  .dots {
    display: none;
  }
}

/* =============================== */
/* Animations – Page à panneaux    */
/* =============================== */
@media (prefers-reduced-motion: reduce) {
  .wrap * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* H1 in */
.wrap .home h1 {
  opacity: 0;
  transform: translateY(10px);
  animation: homeTitleIn 600ms ease forwards 120ms;
}
@keyframes homeTitleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* .txt in — n’anime plus transform directement pour ne pas écraser la position */
.wrap .panel .txt {
  opacity: 0;
  /* variable d’anim ajoutée au translate Y si tu veux un léger slide :
     décommente la ligne transform si tu veux cumuler — ici on évite l’écrasement.
  */
  /* --txt-anim-ty: 8px; transform: translate(var(--tx), calc(var(--ty) + var(--txt-anim-ty))); */
  animation: panelTxtFade 600ms ease-out forwards 200ms;
}
@keyframes panelTxtFade {
  to {
    opacity: 1;
  }
}

/* dots */
.wrap .dots button {
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.wrap .dots button:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}
.wrap .dots button[aria-current="true"] {
  animation: dotPulse 900ms ease-out infinite alternate;
}
@keyframes dotPulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.15);
  }
}

/* bouton contact */

/* bouton contact */
/* Conteneur du menu — aligne les boutons verticalement */
.menu {
  display: flex;
  flex-direction: column; /* empile verticalement */
  gap: 1rem; /* espace entre les boutons */
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.wrap .contact-btn {
  transition: transform 180ms ease, box-shadow 220ms ease, background 220ms ease,
    border-color 220ms ease, color 220ms ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .wrap .contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  }
}
.wrap .contact-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* progress */
.wrap .progress .bar {
  transition: width 160ms linear, box-shadow 160ms ease;
}

/* ===== Landing : intro courte ===== */
.hero-intro {
  margin-top: 10rem;
  max-width: min(68ch, 90vw);
}
.hero-eyebrow {
  font-size: clamp(16px, 2.2vh, 22px);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 0.4rem 0;
}
.hero-tag {
  font-size: clamp(20px, 3vh, 28px);
  line-height: 1.25;
  margin: 0;
  color: var(--fg) !important;
  font-weight: 600;
}
