/* Gorille déboucheur – tuyau de progression (v1.0, 11/2026)
COMPOSANT GORILLE – CSS  (à copier dans le thème, ex. assets/css/gorille.css)
     Tuyau 2D rouge et noir en aplats (aucun dégradé), contours épais, angles droits.
     5 affichages, choisis par le script selon la place libre : gp--full (tuyau droit + étiquettes),
     gp--snake (tuyau en serpent, étiquettes dans les boucles), gp--mini (petit tuyau au milieu à gauche),
     gp--badge (pastille ronde en bas à gauche), gp--strip (serpent horizontal en bas, sur téléphone),
     gp--bar (simple barre horizontale).
*/
.gp{--gp-red:#e0242e;--gp-ink:#111111;--gp-white:#ffffff;--gp-pipe:#232326;--gp-water:#a9d9ff;--gp-cta:var(--clr-red,#e63946);
  --gp-title:"Archivo","Helvetica Neue",Arial,sans-serif;
  position:fixed;z-index:900;left:calc(14px + env(safe-area-inset-left,0px));top:16vh;height:62vh;width:76px;
  opacity:0;transform:translateX(-24px);transition:opacity .35s ease,transform .35s ease;pointer-events:none}
.gp *,.gp *::before,.gp *::after{box-sizing:border-box}
.gp--show{opacity:1;transform:none}
.gp--show .gp-pusher,.gp--show .gp-bubble,.gp--show .gp-end{pointer-events:auto}
.gp--tuck{opacity:0!important}
.gp--tuck *{pointer-events:none!important}

/* Le tuyau : noir uni, contour noir épais */
.gp-pipe{position:absolute;left:50%;top:0;bottom:0;width:46px;margin-left:-23px;border:3px solid var(--gp-ink);border-radius:0;overflow:hidden;background:var(--gp-pipe);box-shadow:0 0 0 2px var(--gp-white)}
/* L'eau retenue derrière le bouchon : bleu clair uni + quelques bulles */
.gp-fill{position:absolute;inset:0;transform:translateY(-100%);will-change:transform;
  background:
    radial-gradient(circle at 30% 22%,#ffffff 0 2px,transparent 2.6px) 0 0/100% 46px,
    radial-gradient(circle at 68% 64%,#ffffff 0 1.5px,transparent 2.1px) 0 0/100% 62px,
    var(--gp-water)}

/* Colliers rouges rivetés aux deux bouts */
.gp-collar{position:absolute;z-index:1;left:50%;width:64px;height:17px;margin-left:-32px;border:3px solid var(--gp-ink);border-radius:0;box-shadow:0 0 0 2px var(--gp-white);
  background:
    radial-gradient(circle at 14% 50%,#c9cacd 0 1.6px,var(--gp-ink) 1.7px 3px,transparent 3.2px),
    radial-gradient(circle at 50% 50%,#c9cacd 0 1.6px,var(--gp-ink) 1.7px 3px,transparent 3.2px),
    radial-gradient(circle at 86% 50%,#c9cacd 0 1.6px,var(--gp-ink) 1.7px 3px,transparent 3.2px),
    var(--gp-red)}
.gp-collar--a{top:-8px}
.gp-collar--b{bottom:-8px}

/* Repères de sections : petits colliers, gris puis rouges une fois dépassés */
.gp-mark{position:absolute;z-index:1;left:50%;width:56px;height:11px;margin:-5px 0 0 -28px;border:3px solid var(--gp-ink);border-radius:0;background:#6a6b70;transition:background-color .3s}
.gp-mark--on{background:var(--gp-red)}
.gp-mark i{display:none;position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:4px 8px;border:2px solid var(--gp-ink);border-radius:0;background:var(--gp-white);color:#6b6b6b;font-style:normal;font-weight:700;font-size:11px;line-height:1;white-space:nowrap;transition:color .3s}
.gp-mark--on i{color:var(--gp-red)}
.gp--full .gp-mark i{display:block}

/* Le gorille et le bouchon (images détourées de l'illustration) */
.gp-pusher{position:absolute;z-index:2;left:0;top:0;width:76px;display:flex;flex-direction:column;align-items:center;padding:0;border:0;background:none;cursor:pointer;will-change:transform;-webkit-tap-highlight-color:transparent}
.gp-end:focus-visible{outline:3px solid var(--gp-ink);outline-offset:3px}
.gp-end:focus-visible{outline:3px solid var(--gp-ink);outline-offset:3px}
.gp-pusher:focus-visible{outline:3px solid var(--gp-red);outline-offset:3px;border-radius:0}
.gp-gorilla{display:block;flex:none;width:92px;height:97px;transition:transform .2s}
.gp-plug{display:block;flex:none;width:44px;height:42px;margin-top:-9px}
.gp-gorilla img,.gp-plug img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff)}
.gp-pusher:hover .gp-gorilla{transform:scale(1.07)}
.gp--push .gp-gorilla{animation:gp-shove .25s ease}
.gp--popped .gp-plug{animation:gp-pop .7s cubic-bezier(.3,1.4,.6,1) forwards}
.gp--popped .gp-gorilla{animation:gp-cheer .8s ease 2}
.gp--point .gp-gorilla{animation:gp-point 1s ease 3}

/* L'arrivée : la pastille « € », cliquable */
.gp-end{position:absolute;padding:0;cursor:pointer;font-family:inherit;left:50%;bottom:-52px;width:34px;height:34px;margin-left:-17px;display:flex;align-items:center;justify-content:center;border:3px dashed var(--gp-red);border-radius:50%;background:var(--gp-white);color:var(--gp-red);font-weight:800;font-size:15px;line-height:1;transition:background-color .3s,color .3s}
.gp--popped .gp-end{border-style:solid;border-color:var(--gp-ink);background:var(--gp-red);color:var(--gp-white);animation:gp-bounce .6s ease 2}

/* La bulle */
.gp-bubble{position:absolute;z-index:3;left:calc(100% + 18px);bottom:calc(100% - var(--gp-y,0px) - 84px);width:252px;padding:14px 16px 16px;border:3px solid var(--gp-ink);border-radius:0;background:var(--gp-white);color:var(--gp-ink);box-shadow:5px 5px 0 var(--gp-red);animation:gp-in .35s ease}
.gp-bubble::after{content:"";position:absolute;left:-10px;bottom:30px;width:15px;height:15px;background:var(--gp-white);border-left:3px solid var(--gp-ink);border-bottom:3px solid var(--gp-ink);transform:rotate(45deg)}
.gp-bubble[hidden]{display:none}
.gp-bubble-txt{margin:0 20px 12px 0;font-family:var(--gp-title);font-weight:800;font-size:16px;line-height:1.3}
.gp-bubble-txt b{display:block;color:var(--gp-red);font-size:18px}
.gp-bubble-cta{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border:3px solid var(--gp-ink);border-radius:0;background:var(--gp-cta);color:var(--gp-white)!important;font-weight:700;font-size:15px;text-decoration:none;transition:filter .2s}
.gp-bubble-cta:hover{filter:brightness(.93)}
.gp-bubble-cta:focus-visible,.gp-bubble-x:focus-visible{outline:3px solid var(--gp-red);outline-offset:2px}
.gp-bubble-x{position:absolute;top:2px;right:4px;width:32px;height:32px;padding:0;border:0;background:none;color:#6b6b6b;font-size:22px;line-height:1;cursor:pointer}
.gp-bubble-x:hover{color:var(--gp-ink)}

@keyframes gp-shove{50%{transform:translateY(4px) scaleY(.94)}}
@keyframes gp-shove-x{50%{transform:translateX(4px) scaleX(.94)}}
@keyframes gp-pop{0%{transform:none;opacity:1}40%{transform:translateY(34px) rotate(90deg) scale(1.2)}100%{transform:translateY(96px) rotate(260deg) scale(.4);opacity:0}}
@keyframes gp-pop-x{0%{transform:none;opacity:1}40%{transform:translate(26px,-16px) rotate(90deg) scale(1.2)}100%{transform:translate(64px,-44px) rotate(260deg) scale(.4);opacity:0}}
@keyframes gp-cheer{30%{transform:translateY(-8px) rotate(-6deg)}60%{transform:translateY(-4px) rotate(6deg)}}
@keyframes gp-point{50%{transform:translateY(-10px)}}
@keyframes gp-bounce{50%{transform:scale(1.25)}}
@keyframes gp-in{from{opacity:0;transform:translateY(6px) scale(.95)}}

/* --- Affichage « serpent » : pour les marges d'environ 100 px. Le tuyau zigzague dans une colonne
       de 84 px ; chaque boucle correspond à une section et contient son nom. --- */
.gp-snake,.gp-snake-labels,.gp-now{display:none}
.gp.gp--snake{left:calc(8px + env(safe-area-inset-left,0px));top:50%;width:84px;transform:translate(-24px,-50%)}
.gp.gp--snake.gp--show{transform:translate(0,-50%)}
.gp--snake .gp-pipe,.gp--snake .gp-collar,.gp--snake .gp-marks{display:none}
.gp--snake .gp-snake{display:block;position:absolute;left:0;top:0;overflow:visible}
.gp-snake path{fill:none;stroke-linecap:square;stroke-linejoin:miter}
.gp-s-halo{stroke:var(--gp-white);stroke-width:18}
.gp-s-out{stroke:var(--gp-ink);stroke-width:14}
.gp-s-body{stroke:#3d3e43;stroke-width:8}
.gp-snake .gp-s-water{stroke:var(--gp-water);stroke-width:8;stroke-linecap:butt}
.gp-s-cap{fill:var(--gp-red);stroke:var(--gp-ink);stroke-width:2.5}
.gp--snake .gp-snake-labels{display:block;position:absolute;inset:0;pointer-events:none}
.gp-s-lab{position:absolute;display:flex;align-items:flex-start;color:#7d7d7d;font-weight:700;font-size:10px;line-height:1.15;transition:color .3s}
.gp-s-lab span{padding:1px 3px;border-radius:0;background:var(--gp-white)}
.gp-s-lab--l{justify-content:flex-end;text-align:right}
.gp-s-lab--on{color:var(--gp-ink)}
.gp-s-lab--cur{color:var(--gp-red)}
.gp--snake .gp-pusher{display:block;width:0;height:0}
.gp--snake .gp-gorilla{position:absolute;left:-21px;top:-52px;width:42px;height:56px;margin:0}
.gp--snake .gp-plug{position:absolute;left:-13px;top:-12px;width:26px;height:25px;margin:0}
.gp--snake .gp-end{bottom:auto;margin:0;width:26px;height:26px;border-width:2.5px;font-size:12px}
.gp--snake .gp-bubble{left:calc(100% + 14px);bottom:calc(100% - var(--gp-y,0px) - 30px)}

/* --- Affichage « strip » (téléphone) : serpent horizontal dans une bande blanche collée au-dessus
       de la barre fixe du site. Le trait ondule au-dessus puis au-dessous d'une ligne de noms de sections. --- */
.gp.gp--strip{left:0;right:0;top:auto;bottom:var(--gp-bar,0px);width:auto;height:54px;border-top:1px solid #e2e2e2;background:var(--gp-white);transform:translateY(28px)}
.gp.gp--strip.gp--show{transform:none}
.gp--strip .gp-pipe,.gp--strip .gp-collar,.gp--strip .gp-marks,.gp--strip .gp-end,.gp--strip .gp-s-cap,.gp--strip .gp-s-halo{display:none}
.gp--strip .gp-snake{display:block;position:absolute;left:0;top:0;overflow:visible}
.gp--strip .gp-snake-labels{display:block;position:absolute;inset:0;pointer-events:none}
.gp--strip .gp-s-lab{justify-content:center;align-items:center;text-align:center;font-size:10px;line-height:1.05;letter-spacing:-.01em}
.gp--strip .gp-s-lab span{padding:0;background:none}
.gp--strip .gp-pusher{display:block;width:0;height:0}
.gp--strip .gp-gorilla{position:absolute;left:-15px;top:-39px;width:30px;height:40px;margin:0}
.gp--strip .gp-plug{position:absolute;left:-9px;top:-9px;width:18px;height:18px;margin:0}
.gp--strip.gp--popped .gp-plug{animation-name:gp-pop-x}
.gp--strip .gp-bubble{left:12px;right:12px;bottom:calc(100% + 74px);width:auto;padding:12px 14px 14px}
.gp--strip .gp-bubble::after{display:none}
.gp--strip .gp-bubble-txt{margin-bottom:10px;font-size:15px}
/* sur téléphone uniquement : les noms de sections sont cliquables */
.gp--strip.gp--show .gp-s-lab{pointer-events:auto;cursor:pointer}

/* --- Affichage « mini » : petit tuyau au milieu à gauche + nom de la section en cours --- */
.gp.gp--mini{top:calc(50% - 115px);bottom:auto;height:230px;width:58px}
.gp--mini .gp-now{display:block;position:absolute;left:calc(100% + 2px);top:34px;padding:4px 7px;border:2px solid var(--gp-ink);border-radius:0;background:var(--gp-white);color:var(--gp-red);font-weight:700;font-size:11px;line-height:1;white-space:nowrap}
.gp--mini .gp-now:empty{display:none}
.gp--mini .gp-pipe{width:30px;margin-left:-15px}
.gp--mini .gp-collar{width:44px;height:14px;margin-left:-22px;
  background:
    radial-gradient(circle at 22% 50%,#c9cacd 0 1.3px,var(--gp-ink) 1.4px 2.5px,transparent 2.7px),
    radial-gradient(circle at 78% 50%,#c9cacd 0 1.3px,var(--gp-ink) 1.4px 2.5px,transparent 2.7px),
    var(--gp-red)}
.gp--mini .gp-collar--a{top:-7px}
.gp--mini .gp-collar--b{bottom:-7px}
.gp--mini .gp-marks,.gp--mini .gp-end{display:none}
.gp--mini .gp-pusher{width:58px}
.gp--mini .gp-gorilla{width:54px;height:72px}
.gp--mini .gp-plug{width:36px;height:35px;margin-top:-10px}

/* --- Affichage « pastille » : rond en bas à gauche, l'anneau rouge se remplit avec la lecture --- */
.gp.gp--badge{top:auto;bottom:calc(18px + env(safe-area-inset-bottom,0px));height:74px;width:74px}
.gp--badge .gp-pipe,.gp--badge .gp-collar,.gp--badge .gp-marks,.gp--badge .gp-plug{display:none}
.gp--badge .gp-pusher{width:74px;height:74px;justify-content:center;border:3px solid var(--gp-ink);border-radius:50%;box-shadow:0 0 0 2px var(--gp-white);
  background:
    radial-gradient(closest-side,var(--gp-white) 0 calc(100% - 9px),var(--gp-ink) calc(100% - 9px) calc(100% - 6.5px),transparent calc(100% - 6.5px)),
    conic-gradient(var(--gp-red) calc(var(--gp-p,0) * 1turn),#d6d6d6 0)}
.gp--badge .gp-end:focus-visible{outline:3px solid var(--gp-ink);outline-offset:3px}
.gp-pusher:focus-visible{border-radius:50%}
.gp--badge .gp-gorilla{width:38px;height:51px;margin:0}
.gp--badge .gp-end{left:auto;right:-9px;bottom:auto;top:-9px;width:28px;height:28px;margin:0;border-width:2.5px;font-size:12px}

.gp--mini .gp-bubble,.gp--badge .gp-bubble{left:calc(100% + 16px);bottom:2px;width:min(252px,calc(100vw - 120px))}
.gp--mini .gp-bubble::after,.gp--badge .gp-bubble::after{bottom:22px}
/* sur téléphone, mini et pastille se placent au-dessus de la barre fixe du site */
.gp.gp--lift{top:auto;bottom:calc(var(--gp-bottom,74px) + 4px)}

/* --- Affichage « barre » : tuyau horizontal au-dessus de la barre fixe (téléphone) --- */
.gp.gp--bar{left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));top:auto;bottom:var(--gp-bottom,74px);width:auto;height:56px;transform:translateY(20px)}
.gp.gp--bar.gp--show{transform:none}
.gp--bar .gp-pipe{left:0;right:46px;top:50%;bottom:auto;width:auto;height:28px;margin:-14px 0 0}
.gp--bar .gp-fill{transform:translateX(-100%);
  background:
    radial-gradient(circle at 22% 32%,#ffffff 0 1.8px,transparent 2.4px) 0 0/46px 100%,
    radial-gradient(circle at 64% 66%,#ffffff 0 1.4px,transparent 2px) 0 0/62px 100%,
    var(--gp-water)}
.gp--bar .gp-collar{left:auto;top:50%;bottom:auto;width:14px;height:42px;margin:-21px 0 0;
  background:
    radial-gradient(circle at 50% 16%,#c9cacd 0 1.4px,var(--gp-ink) 1.5px 2.8px,transparent 3px),
    radial-gradient(circle at 50% 50%,#c9cacd 0 1.4px,var(--gp-ink) 1.5px 2.8px,transparent 3px),
    radial-gradient(circle at 50% 84%,#c9cacd 0 1.4px,var(--gp-ink) 1.5px 2.8px,transparent 3px),
    var(--gp-red)}
.gp--bar .gp-collar--a{left:-6px}
.gp--bar .gp-collar--b{right:40px}
.gp--bar .gp-mark{top:50%;left:0;width:10px;height:36px;margin:-18px 0 0 -5px}
.gp--bar .gp-pusher{flex-direction:row;width:auto;height:56px}
.gp--bar .gp-gorilla{width:42px;height:56px}
.gp--bar .gp-plug{width:36px;height:35px;margin:14px 0 0 -6px}
.gp--bar.gp--push .gp-gorilla{animation-name:gp-shove-x}
.gp--bar.gp--popped .gp-plug{animation-name:gp-pop-x}
.gp--bar .gp-end{left:auto;right:0;bottom:auto;top:50%;margin:-17px 0 0}
.gp--bar .gp-bubble{left:0;right:4px;bottom:calc(100% + 12px);width:auto;padding:12px 14px 14px}
.gp--bar .gp-bubble::after{display:none}
.gp--bar .gp-bubble-txt,.gp--lift .gp-bubble-txt{margin-bottom:10px;font-size:15px}

/* =====================  STYLES AU CHOIX (réglage « theme »)  =====================
   'line'  : épuré (par défaut) : le tuyau est un simple trait qui se colore en rouge
   'flat'  : aplats et contours noirs épais (règles de base, ci-dessus)                 */

/* --- Épuré --- */
.gp-t-line.gp--full{left:calc(20px + env(safe-area-inset-left,0px))}
.gp-t-line.gp--full .gp-bubble{left:calc(100% + 22px)}
/* pastille épurée : anneau fin gris qui se colore en rouge, sans contour noir */
.gp-t-line.gp--badge .gp-pusher{border:0;box-shadow:0 0 0 2px var(--gp-white),0 6px 18px rgba(17,17,17,.16);
  background:
    radial-gradient(closest-side,var(--gp-white) 0 calc(100% - 4px),transparent calc(100% - 4px)),
    conic-gradient(var(--gp-red) calc(var(--gp-p,0) * 1turn),#cfcfcf 0)}
.gp-t-line.gp--badge .gp-gorilla{width:42px;height:56px;margin:6px 0 0}
.gp-t-line.gp--badge .gp-end{top:-6px;right:-6px;width:24px;height:24px;border-width:2px;font-size:11px}
.gp-t-line .gp-pipe{width:6px;margin-left:-3px;border:0;box-shadow:0 0 0 2px var(--gp-white);background:#cfcfcf}
.gp-t-line.gp--bar .gp-pipe{width:auto;height:6px;margin:-3px 0 0}
.gp-t-line .gp-fill,.gp-t-line.gp--bar .gp-fill{background:var(--gp-red)}
.gp-t-line .gp-collar{display:none}
.gp-t-line .gp-mark,.gp-t-line.gp--bar .gp-mark{width:14px;height:14px;margin:-7px 0 0 -7px;border:3px solid var(--gp-white);background:#a9a9a9}
.gp-t-line .gp-mark--on,.gp-t-line.gp--bar .gp-mark--on{background:var(--gp-red)}
.gp-t-line .gp-mark i{left:calc(100% + 46px);padding:2px 4px;border:0;font-size:12px}
.gp-t-line .gp-now{border:0;box-shadow:0 2px 10px rgba(17,17,17,.14)}
.gp-t-line .gp-bubble{border:1px solid rgba(17,17,17,.12);box-shadow:0 14px 36px rgba(17,17,17,.18)}
.gp-t-line .gp-bubble::after{border-left-width:1px;border-bottom-width:1px;border-color:rgba(17,17,17,.12);left:-8px}
.gp-t-line .gp-bubble-cta{border:0}
.gp-t-line .gp-end{border:2px solid var(--gp-red)}
.gp-t-line .gp-s-halo{stroke-width:8}
.gp-t-line .gp-s-out{stroke:none}
.gp-t-line .gp-s-body{stroke:#cfcfcf;stroke-width:4}
.gp-t-line .gp-snake .gp-s-water{stroke:var(--gp-red);stroke-width:4}
.gp-t-line .gp-s-cap{stroke:none}

@media (prefers-reduced-motion:reduce){
  .gp,.gp *{animation:none!important;transition:none!important}
  .gp--popped .gp-plug{opacity:0}
}
@media print{.gp{display:none}}
