/* ===================================================
   DevWebPro — Finitions premium, version légère
   Fil conducteur : « l'ascension », comme les barres du logo.
   Uniquement des animations jouées une fois (transform /
   opacity / clip-path), rien de calculé pendant le défilement.
   =================================================== */

:root {
  --dwp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dwp-ease-io: cubic-bezier(0.77, 0, 0.18, 1);
}

/* ---------------------------------------------------
   1. BANNIÈRE : PILIERS DU LOGO
   Chaque palier foncé a la hauteur du pilier précédent,
   comme dans le logo. Ils montent une fois, puis restent figés.
   --------------------------------------------------- */
.dwp-hero-fx {
  --pw: clamp(62px, 7.2vw, 124px);
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.dwp-pillar {
  position: absolute;
  bottom: -16%;
  width: var(--pw);
  border-radius: 999px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.07) 45%,
    rgba(255, 255, 255, 0.02) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.dwp-pillar span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--seg, 0%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 20, 128, 0.32) 0%, rgba(38, 20, 128, 0.05) 100%);
}
.dwp-pillar--1 { right: calc(3.5% + var(--pw) * 2.36); height: 40%; }
.dwp-pillar--2 { right: calc(3.5% + var(--pw) * 1.18); height: 66%; --seg: 60%; }
.dwp-pillar--3 { right: 3.5%;                          height: 94%; --seg: 70%; }

/* Jouées dès le premier affichage, sans attendre aucun script. */
.dwp-pillar { animation: dwpPillarRise 1.6s var(--dwp-ease-out) both; }
.dwp-pillar--1 { animation-delay: 0.12s; }
.dwp-pillar--2 { animation-delay: 0.26s; }
.dwp-pillar--3 { animation-delay: 0.4s; }
@keyframes dwpPillarRise {
  from { transform: translateY(115%); }
}

@media (max-width: 860px) {
  .dwp-hero-fx { --pw: clamp(44px, 12vw, 70px); }
  .dwp-pillar { opacity: 0.7; }
  .dwp-pillar--1 { height: 26%; }
  .dwp-pillar--2 { height: 40%; }
  .dwp-pillar--3 { height: 56%; }
}

/* ---------------------------------------------------
   2. ENTRÉE DE LA BANNIÈRE
   --------------------------------------------------- */
.hero-content > *,
.page-header h1,
.page-header h1 + p {
  animation: dwpRiseIn 0.9s var(--dwp-ease-out) both;
}
.hero-content > *:nth-child(2) { animation-delay: 0.07s; }
.hero-content > *:nth-child(3) { animation-delay: 0.14s; }
.hero-content > *:nth-child(4) { animation-delay: 0.21s; }
.page-header h1 + p { animation-delay: 0.08s; }

@keyframes dwpRiseIn {
  from { opacity: 0; transform: translateY(22px); }
}

/* ---------------------------------------------------
   3. APPARITIONS AU DÉFILEMENT (classes posées par premium.js,
   uniquement sur les éléments encore hors écran)
   --------------------------------------------------- */
.dwp-split .dwp-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.04em 0.14em;
  margin: 0 -0.04em -0.14em;
}
.dwp-split .dwp-wi {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--dwp-ease-out);
  transition-delay: calc(var(--wi, 0) * 45ms);
}
.dwp-split.dwp-in .dwp-wi { transform: none; }

.dwp-r {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--dwp-ease-out), transform 0.9s var(--dwp-ease-out);
  transition-delay: calc(var(--rd, 0) * 80ms);
}
.dwp-r.dwp-in { opacity: 1; transform: none; }

.dwp-img {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.1s var(--dwp-ease-io);
  transition-delay: calc(var(--rd, 0) * 100ms);
}
.dwp-img.dwp-in { clip-path: inset(0 0 0 0); }

/* ---------------------------------------------------
   4. FILIGRANES TYPOGRAPHIQUES (statiques)
   --------------------------------------------------- */
[data-watermark] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
[data-watermark]::before {
  content: attr(data-watermark);
  content: attr(data-watermark) / "";   /* ignoré par les lecteurs d'écran */
  position: absolute;
  top: clamp(4px, 1.2vw, 18px);
  left: 50%;
  z-index: -1;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3.5rem, 10vw, 10rem);
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(93, 78, 196, 0.085);
  pointer-events: none;
  user-select: none;
}
.section--light[data-watermark]::before {
  -webkit-text-stroke-color: rgba(93, 78, 196, 0.11);
}

/* Signature du footer : le nom en très grand, coupé en bas */
.site-footer[data-watermark] {
  padding-bottom: clamp(70px, 11vw, 170px);
}
.site-footer[data-watermark]::before {
  top: auto;
  bottom: clamp(-60px, -3.5vw, -20px);
  font-size: clamp(5.5rem, 19vw, 19rem);
  -webkit-text-stroke: 1.5px rgba(93, 78, 196, 0.16);
}

/* Marque du logo en filigrane dans les bandeaux d'appel à l'action */
.cta-section::after {
  content: '';
  position: absolute;
  right: clamp(-40px, 4vw, 80px);
  bottom: -30px;
  width: clamp(180px, 22vw, 300px);
  aspect-ratio: 1 / 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 55 59'%3E%3Cg fill='none' stroke='white' stroke-width='1' stroke-opacity='0.24'%3E%3Crect x='6' y='41' width='16' height='20' rx='8'/%3E%3Crect x='24' y='25' width='16' height='36' rx='8'/%3E%3Crect x='24' y='41' width='16' height='20' rx='8'/%3E%3Crect x='41' y='6' width='16' height='55' rx='8'/%3E%3Crect x='41' y='25' width='16' height='36' rx='8'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
  z-index: 0;
}
.cta-section > .container,
.hero > .container {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------
   5. MOUVEMENT RÉDUIT ET IMPRESSION
   --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .dwp-pillar,
  .hero-content > *,
  .page-header h1,
  .page-header h1 + p { animation: none !important; }
}
@media print {
  .dwp-hero-fx, [data-watermark]::before, .cta-section::after { display: none !important; }
}
