/*
 * Repères pédagogiques sur les illustrations du stage au rucher.
 * Chaque mouvement correspond à une information (trajet, organe, zone d’un
 * cadre…) ; aucune particule décorative ni ressource externe n’est utilisée.
 */

.rucher-guide-visual{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:inherit;
}

.rucher-guide-visual>img{
  display:block;
  width:100%;
  height:auto;
}

.rucher-guide-motion{
  position:absolute;
  z-index:2;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  user-select:none;
}

.rucher-guide-cue,
.rucher-guide-trail{
  position:absolute;
  left:var(--cue-x,50%);
  top:var(--cue-y,50%);
  color:var(--rucher-cue,#f4be42);
}

.rucher-guide-cue{
  display:grid;
  place-items:center;
  width:1px;
  height:1px;
  animation-delay:var(--cue-delay,0s);
}

.rucher-guide-cue__dot{
  position:absolute;
  top:0;
  left:0;
  translate:-50% -50%;
  width:clamp(12px,2vw,19px);
  height:clamp(12px,2vw,19px);
  border:2px solid #fff8df;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 0 3px color-mix(in srgb,currentColor 38%,transparent),0 2px 5px #10271980;
}

.rucher-guide-cue__label{
  position:absolute;
  top:calc(100% + 8px);
  left:50%;
  max-width:min(12rem,40vw);
  transform:translateX(-50%);
  padding:.2rem .42rem;
  border:1px solid #e9c569;
  border-radius:.45rem;
  background:#fff8e4eF;
  box-shadow:0 1px 3px #18312140;
  color:#20452f;
  font:700 clamp(.61rem,1.3vw,.78rem)/1.15 Georgia,"Times New Roman",serif;
  text-align:center;
  text-wrap:balance;
  white-space:nowrap;
}

.rucher-guide-cue[data-side="left"] .rucher-guide-cue__label{
  right:calc(100% + 8px);
  left:auto;
  top:50%;
  transform:translateY(-50%);
}

.rucher-guide-cue[data-side="right"] .rucher-guide-cue__label{
  left:calc(100% + 8px);
  top:50%;
  transform:translateY(-50%);
}

.rucher-guide-cue[data-shape="region"],
.rucher-guide-cue[data-shape="line"]{
  display:block;
  width:var(--cue-width,24%);
  height:var(--cue-height,16%);
  transform:translate(-50%,-50%);
  border:2px solid currentColor;
  border-radius:clamp(.4rem,1.1vw,.85rem);
  background:color-mix(in srgb,currentColor 14%,transparent);
  box-shadow:0 0 0 3px #fff8de75,inset 0 0 18px color-mix(in srgb,currentColor 18%,transparent);
}

.rucher-guide-cue[data-shape="region"] .rucher-guide-cue__dot,
.rucher-guide-cue[data-shape="line"] .rucher-guide-cue__dot{display:none}

.rucher-guide-cue[data-shape="region"] .rucher-guide-cue__label{
  top:calc(100% + 5px);
}

.rucher-guide-cue[data-shape="line"]{
  width:var(--cue-width,2px);
  height:var(--cue-height,45%);
  border-width:0 2px;
  border-radius:0;
  background:linear-gradient(to bottom,currentColor 0 46%,transparent 46% 55%,currentColor 55% 100%);
  box-shadow:0 0 0 1px #fff8de80,0 0 10px color-mix(in srgb,currentColor 60%,transparent);
}

.rucher-guide-cue[data-shape="line"] .rucher-guide-cue__label{
  top:50%;
  left:calc(100% + 8px);
  transform:translateY(-50%);
}

.rucher-guide-cue[data-tone="green"],
.rucher-guide-trail[data-tone="green"]{--rucher-cue:#3d7d4c}
.rucher-guide-cue[data-tone="gold"],
.rucher-guide-trail[data-tone="gold"]{--rucher-cue:#dfa522}
.rucher-guide-cue[data-tone="amber"],
.rucher-guide-trail[data-tone="amber"]{--rucher-cue:#c86e28}
.rucher-guide-cue[data-tone="pollen"],
.rucher-guide-trail[data-tone="pollen"]{--rucher-cue:#b88b1d}

.rucher-guide-trail{
  width:var(--trail-width,20%);
  height:4px;
  transform:translateY(-50%) rotate(var(--trail-angle,0deg));
  transform-origin:left center;
  border-radius:99px;
  background:repeating-linear-gradient(90deg,currentColor 0 7px,transparent 7px 12px);
  filter:drop-shadow(0 1px 1px #16311c80);
  animation-delay:var(--cue-delay,0s);
}

.rucher-guide-trail::after{
  position:absolute;
  top:50%;
  left:0;
  width:8px;
  height:8px;
  border:2px solid #fff8df;
  border-radius:50%;
  background:currentColor;
  content:"";
  transform:translate(-50%,-50%);
  box-shadow:0 0 0 2px color-mix(in srgb,currentColor 30%,transparent);
}

/* A1 : le déplacement s'éclaire seulement le long de l'allée utile. */
.rucher-guide-motion--orientation .rucher-guide-trail{animation:rucher-guide-trail-walk 3.8s ease-in-out 2 both}
.rucher-guide-motion--orientation .rucher-guide-cue__dot{animation:rucher-guide-marker-breathe 2.4s ease-in-out 2 both}

/* A2-A3 : les pulsations isolent les différences à comparer, pas la scène entière. */
.rucher-guide-motion--colony .rucher-guide-cue__dot,
.rucher-guide-motion--anatomy .rucher-guide-cue__dot{animation:rucher-guide-marker-breathe 2.2s ease-in-out 2 both}
.rucher-guide-motion--anatomy .rucher-guide-cue[data-cue="pollen"] .rucher-guide-cue__dot{animation-name:rucher-guide-pollen-focus}

/* A4-A5 : contours lents autour des équipements ou zones à lire. */
.rucher-guide-motion--preparation .rucher-guide-cue,
.rucher-guide-motion--frame .rucher-guide-cue[data-shape="region"]{animation:rucher-guide-region-read 2.6s ease-in-out 2 both}

/* A6 : le point traverse chaque segment du trajet du miel. */
.rucher-guide-motion--miellerie .rucher-guide-trail::after{animation:rucher-guide-honey-travel 2.6s ease-in-out 2 both}
.rucher-guide-motion--miellerie .rucher-guide-cue__dot{animation:rucher-guide-marker-breathe 2.5s ease-in-out 2 both}

/* A7 : la ligne reste l'axe de mèche ; la zone de cire se remplit doucement. */
.rucher-guide-motion--wax .rucher-guide-cue[data-cue="wick"]{animation:rucher-guide-wick-align 2.5s ease-in-out 2 both}
.rucher-guide-motion--wax .rucher-guide-cue[data-cue="wax-fill"]::after{
  position:absolute;
  z-index:-1;
  right:2px;
  bottom:2px;
  left:2px;
  height:0;
  border-radius:inherit;
  background:#e6b64d8c;
  content:"";
  animation:rucher-guide-wax-settle 2.9s ease-out 1 both .45s;
}

/* A8 : les coches apparaissent successivement pour matérialiser la synthèse. */
.rucher-guide-motion--notebook .rucher-guide-cue__dot::after{
  color:#fff8df;
  content:"✓";
  font:bold 12px/15px system-ui,sans-serif;
}
.rucher-guide-motion--notebook .rucher-guide-cue__dot{animation:rucher-guide-check-in .68s ease-out 1 both}

@keyframes rucher-guide-trail-walk{
  0%,15%{opacity:.3;background-position:0 0}
  48%,100%{opacity:1;background-position:24px 0}
}
@keyframes rucher-guide-marker-breathe{
  0%,100%{transform:scale(1);box-shadow:0 0 0 3px color-mix(in srgb,currentColor 38%,transparent),0 2px 5px #10271980}
  50%{transform:scale(1.18);box-shadow:0 0 0 8px color-mix(in srgb,currentColor 16%,transparent),0 2px 5px #10271980}
}
@keyframes rucher-guide-pollen-focus{
  0%,100%{transform:scale(1);filter:none}
  50%{transform:scale(1.25);filter:brightness(1.16);}
}
@keyframes rucher-guide-region-read{
  0%,100%{opacity:.66;box-shadow:0 0 0 3px #fff8de75,inset 0 0 18px color-mix(in srgb,currentColor 18%,transparent)}
  50%{opacity:1;box-shadow:0 0 0 6px #fff8de9a,inset 0 0 25px color-mix(in srgb,currentColor 27%,transparent)}
}
@keyframes rucher-guide-honey-travel{
  0%{left:0;opacity:0}
  12%{opacity:1}
  88%{opacity:1}
  100%{left:100%;opacity:0}
}
@keyframes rucher-guide-wick-align{
  0%,100%{opacity:.65;filter:none}
  50%{opacity:1;filter:drop-shadow(0 0 5px #f5d66b)}
}
@keyframes rucher-guide-wax-settle{
  from{height:0;opacity:.25}
  to{height:calc(100% - 4px);opacity:1}
}
@keyframes rucher-guide-check-in{
  0%{transform:scale(.45);opacity:0}
  72%{transform:scale(1.18);opacity:1}
  100%{transform:scale(1);opacity:1}
}

@media (prefers-reduced-motion:reduce){
  .rucher-guide-motion *,
  .rucher-guide-motion *::before,
  .rucher-guide-motion *::after{
    animation:none!important;
    transition:none!important;
  }
  .rucher-guide-motion--wax .rucher-guide-cue[data-cue="wax-fill"]::after{height:calc(100% - 4px);opacity:.78}
  .rucher-guide-trail::after{left:50%;opacity:1}
}

@media (max-width:560px){
  .rucher-guide-cue__label{max-width:8.6rem;font-size:.58rem;white-space:normal}
  .rucher-guide-cue[data-side="left"] .rucher-guide-cue__label,
  .rucher-guide-cue[data-side="right"] .rucher-guide-cue__label{top:calc(100% + 7px);left:50%;right:auto;transform:translateX(-50%)}
}
