/* danian.be : Sommet, la mascotte 3D (1er novembre 2026). Trois apparitions discrètes : à côté du bouton du héros,
   par-dessus la première carte des démos, au-dessus du titre du contact. Même courbe que le reste (--dm-sortie). */
.dm-sommet { display: block; width: auto; pointer-events: auto; user-select: none; -webkit-user-drag: none; transform-origin: 50% 100%; }
@media (hover: hover) {
  .dm-sommet { transition: rotate .6s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)), translate .6s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)); }
  .dm-sommet:hover { rotate: -5deg; translate: 0 -3px; }
}

/* 1. Héros : il se tient à droite du bouton, les pieds sur la même ligne. */
html body .dm-hero-centre .v-actions { position: relative; }
html body .dm-sommet--hero { position: absolute; left: calc(100% + 14px); bottom: -2px; height: 74px; }
/* Téléphone : pas de Sommet dans le héros, celui qui marche attend déjà en bas de l'écran. */
@media (width < 700px) { html body .dm-sommet--hero { display: none; } }

/* 2. Démos : il dépasse du bord haut de la première carte, les mains posées dessus. */
html body .dm-pile__coucou { position: absolute; z-index: 2; right: 9%; bottom: calc(100% - 10px); height: 108px; width: 166px; overflow: hidden; pointer-events: none; }
html body .dm-pile__coucou img { display: block; height: 100%; width: auto; margin-left: auto; pointer-events: auto; }
@media (width < 900px) { html body .dm-pile__coucou { right: 7%; height: 70px; width: 108px; bottom: calc(100% - 7px); } }

/* 3. Contact : il salue au-dessus du titre, sur un léger halo (le fond est de sa couleur). */
html body .dm-contact-sommet { position: relative; justify-self: start; margin-bottom: -4px; }
html body .dm-contact-sommet::before {
  content: ""; position: absolute; inset: -18% -28% -6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 155, 255, .30), rgba(110, 155, 255, .10) 55%, rgba(110, 155, 255, 0));
}
html body .dm-sommet--contact { height: 138px; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .22)); }
@media (width < 900px) { html body .dm-sommet--contact { height: 104px; } }

/* Entrées, une fois (préparées par dm-sommet.js ; sans script, il est simplement là). */
@media (prefers-reduced-motion: no-preference) {
  html body .dm-sommet--hero { animation: dm-sommet-monte 1.1s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)) .95s backwards; }
  html.dm-sommet-pret .dm-pile__coucou img { translate: 0 105%; transition: translate 1.1s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)); }
  html.dm-sommet-pret .dm-pile__coucou.est-vu img { translate: 0 0; transition-delay: .18s; }
  html.dm-sommet-pret .dm-pile__coucou.est-vu.est-cache img { translate: 0 105%; transition-delay: 0s; transition-duration: .6s; }
  html.dm-sommet-pret .dm-contact-sommet:not(.est-vu) { opacity: 0; translate: 0 34px; }
  html.dm-sommet-pret .dm-contact-sommet { transition: opacity .8s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)), translate 1.1s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)); }
}
@keyframes dm-sommet-monte { 0% { opacity: 0; translate: 0 18px; } }

/* Place pour sa tête au-dessus de la première carte. */
html body .dm-pile:has(.dm-pile__coucou) .dm-pile__tete { margin-bottom: clamp(72px, 7vw, 96px); }

/* La marche : 6 images dans une seule bande, choisies par dm-sommet.js selon le défilement. */
html body .dm-pile__marche { display: none; position: absolute; z-index: 3; left: 0; bottom: calc(100% - 4px); height: 104px; aspect-ratio: 223 / 220; pointer-events: none; transform-origin: 50% 100%; will-change: transform; background: 0 0 / 600% 100% no-repeat; }
html.dm-marche-pret .dm-pile__marche { display: block; background-image: url(/assets/sommet-marche.webp?v=1); }
/* Mode marche : tout est piloté par le défilement, sans transition (fluide dans les deux sens). */
html.dm-marche-pret .dm-pile__coucou img { transition: none !important; }
/* Le saut sort de l'écran à droite sans créer de défilement horizontal. */
html body .dm-pile { overflow-x: clip; }
@media (width < 900px) { html body .dm-pile__marche { height: 68px; bottom: calc(100% - 3px); } }
/* Le Sommet du héros s'en va quand celui des démos se met en marche. */
html body .dm-sommet--hero { transition: opacity .35s ease, translate .6s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)), rotate .6s var(--dm-sortie, cubic-bezier(.16, 1, .3, 1)); }
html body .dm-sommet--hero.est-parti { opacity: 0; translate: 16px 0; pointer-events: none; }

/* Sommet v7 (fidèle au logo). Toute la scène est posée par dm-sommet-7.js, il ne disparaît jamais et chaque
   geste se joue à sa propre vitesse :
   1. il attend dans l'écran de la première démo ; il saute hors de l'écran et s'assoit sur le bord de la carte ;
   2. la tyrolienne part d'une attache sur le bord de la carte, la poignée l'attend à côté de lui ;
   3. quand la pile de démos remonte, il attrape la poignée et descend toute la page jusqu'au contact. */
/* Sans animation : simplement assis sur le bord de la première carte. */
html body .dm-pile__assis { --h: 106px; position: absolute; z-index: 4; left: 0; bottom: calc(100% - var(--h) * 0.295); height: var(--h); aspect-ratio: 424 / 431; pointer-events: none; background: url(/assets/sommet-assis-2.webp?v=1) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(5, 8, 11, .28)); }
@media (width < 900px) { html body .dm-pile__assis { --h: 69px; } }
html.dm-assis-pret .dm-pile__coucou { display: none; }
/* Dans l'écran : il vit dans la capture du site (rognée par la fenêtre). */
html body .dm-pile__photo:has(> .dm-sommet-dedans) { position: relative; }
html body .dm-sommet-dedans { --h: 102px; position: absolute; z-index: 2; left: 0; top: 0; height: var(--h); aspect-ratio: 303 / 300; pointer-events: none; transform-origin: 50% 100%; background: url(/assets/sommet-salut-2.webp?v=1) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 5px 6px rgba(5, 8, 11, .35)); will-change: transform; }
@media (width < 900px) { html body .dm-sommet-dedans { --h: 66px; } }
/* Le saut : la même pose, juste au-dessus du bord haut de la fenêtre (la boîte s'arrête à ce bord), puis assis. */
html body .dm-saut { --hi: 102px; --ha: 106px; position: absolute; z-index: 3; left: 0; top: 0; overflow: hidden; pointer-events: none; }
html body .dm-saut > span { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; will-change: transform, opacity; }
html body .dm-saut__debout { height: var(--hi); aspect-ratio: 303 / 300; transform-origin: 50% 100%; background: url(/assets/sommet-salut-2.webp?v=1) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(5, 8, 11, .3)); }
html body .dm-saut__assis { height: var(--ha); aspect-ratio: 424 / 431; transform-origin: 50% 70.5%; background: url(/assets/sommet-assis-2.webp?v=1) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(5, 8, 11, .28)); }
@media (width < 900px) {
  html body .dm-saut { --hi: 66px; --ha: 69px; }
  /* Téléphone : le numéro de la carte se décale un peu, le câble de la tyrolienne passe à sa droite. */
  html.dm-tyro-pret body .dm-pile__num { right: 48px; }
}
/* Calque au-dessus des cartes (sous le menu) : la sortie du cadre, l'assis, la tyrolienne. */
html body .dm-tyro { position: fixed; inset: 0; z-index: 19; pointer-events: none; overflow: hidden; contain: layout paint; }
html body .dm-tyro > * { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; will-change: transform; }
/* Une sonde de la hauteur « petit écran » : stable quand la barre d'adresse du téléphone se replie. */
html body .dm-tyro__sonde { width: 0; height: 100vh; height: 100svh; }
html body .dm-tyro__cable, html body .dm-tyro__poignee { overflow: visible; }
html body .dm-tyro__poignee { width: 1px; height: 1px; }
html body .dm-tyro__assis { --h: 106px; height: var(--h); aspect-ratio: 424 / 431; transform-origin: 50% 70.5%; background: url(/assets/sommet-assis-2.webp?v=1) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 6px 8px rgba(5, 8, 11, .28)); }
/* Sur la tyrolienne : il pend sous la poignée, une poulie roule sur le câble (dessinée en vecteur). */
html body .dm-tyro__rider { --h: 135px; height: var(--h); aspect-ratio: 395 / 554; transform-origin: 58.5% 7.6%; }
html body .dm-tyro__pendu { position: absolute; inset: 0; transform-origin: 58.5% 7.6%; animation: dm-tyro-balance 2.8s ease-in-out infinite alternate; }
html body .dm-tyro__corps { position: absolute; inset: 0; background: url(/assets/sommet-tyrolienne-2.webp?v=1) 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 8px 9px rgba(5, 8, 11, .28)); }
html body .dm-tyro__roue, html body .dm-tyro__moyeu { position: absolute; left: calc(58.5% - var(--h) * .08); top: calc(7.6% - var(--h) * .08); width: calc(var(--h) * .16); height: calc(var(--h) * .16); }
html body .dm-tyro__roue svg, html body .dm-tyro__moyeu svg { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes dm-tyro-balance { from { rotate: -1.4deg; } to { rotate: 1.4deg; } }
html body .dm-tyro__salut { --h: 102px; height: var(--h); aspect-ratio: 303 / 300; transform-origin: 50% 100%; background: url(/assets/sommet-salut-2.webp?v=1) 0 0 / 100% 100% no-repeat; }
@media (width < 900px) {
  html body .dm-tyro__assis { --h: 69px; }
  html body .dm-tyro__rider { --h: 88px; }
  html body .dm-tyro__salut { --h: 66px; }
}
/* La tyrolienne : une corde de chanvre, couleur bois clair, de l'attache sur le bord de la pile jusqu'au contact.
   Posée sur la page pendant la descente ; sa copie fixe (dans le calque) la montre tant que la pile est immobile.
   Les épaisseurs sont réglées par dm-sommet-7.js. */
html body .dm-cable { position: absolute; left: 0; top: 0; z-index: 18; pointer-events: none; overflow: visible; opacity: 0; }
html body :is(.dm-cable, .dm-tyro__cable) path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
html body :is(.dm-cable, .dm-tyro__cable) .ombre { stroke: rgba(40, 28, 8, .13); transform: translate(2.5px, 6px); }
html body :is(.dm-cable, .dm-tyro__cable) .bord { stroke: #9b7a4c; }
html body :is(.dm-cable, .dm-tyro__cable) .corps { stroke: #e2caa2; }
html body :is(.dm-cable, .dm-tyro__cable) .torsion { stroke: rgba(128, 94, 50, .55); stroke-linecap: butt; }
html body :is(.dm-cable, .dm-tyro__cable) .reflet { stroke: rgba(255, 249, 235, .78); }
/* Au contact, c'est lui qui arrive par la tyrolienne : l'image n'apparaît qu'une fois qu'il s'y est posé. */
html.dm-tyro-pret .dm-sommet--contact { visibility: hidden; }
html.dm-tyro-pret.dm-tyro-arrive .dm-sommet--contact { visibility: visible; }
