/* ==========================================================================
   Page Organisateurs — héros « salle de contrôle, le soir J » (#orl-live.olv)
   Le vrai back-office en grand (perspective), et autour, la soirée qui vit en direct :
   notifications (réservations, billets, acomptes, check-ins), CA qui grimpe avec sa
   courbe, tables qui se remplissent, téléphone terrain qui valide des QR.
   Piloté par js/orga-live.js. Uniquement transform/opacity (fluide sur mobile).
   ========================================================================== */
.olv { position: relative; margin-top: clamp(2.6rem, 5vw, 4rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.olv-stage { position: relative; perspective: 1800px; }

/* Back-office */
.olv-desk {
  position: relative;
  width: 88%;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0e0e0d;
  border: 1px solid rgba(245, 244, 241, 0.14);
  box-shadow: 0 60px 140px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 80px -40px rgba(198, 166, 106, 0.35);
  transform: rotateX(calc(14deg - var(--olv-in, 0) * 14deg)) scale(calc(0.94 + var(--olv-in, 0) * 0.06));
  transform-origin: 50% 0;
  will-change: transform;
}
.olv-desk img { display: block; width: 100%; height: auto; }
.olv-bar { position: relative; display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #161615; border-bottom: 1px solid rgba(245, 244, 241, 0.08); }
.olv-bar > span { width: 11px; height: 11px; border-radius: 50%; background: #3a3a39; }
.olv-bar > span:nth-child(1) { background: #e0605a; } .olv-bar > span:nth-child(2) { background: #e2b14a; } .olv-bar > span:nth-child(3) { background: #5fb98a; }
.olv-bar > i { position: absolute; left: 50%; transform: translateX(-50%); padding: 4px 18px; border-radius: 8px; background: rgba(245, 244, 241, 0.06); color: #8e8e93; font-style: normal; font-size: 12px; font-weight: 600; }
.olv-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: rgba(224, 96, 90, 0.14); color: #ffb4ad; font-style: normal; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.olv-live b { width: 7px; height: 7px; border-radius: 50%; background: #ff5a4f; animation: olvBlink 1.2s ease-in-out infinite; }
#olv-clock { font-variant-numeric: tabular-nums; color: #fff; }
@keyframes olvBlink { 50% { opacity: 0.25; } }

/* Flux d'événements en direct (à droite) */
.olv-feed { position: absolute; z-index: 3; top: 9%; right: 0; width: min(340px, 34%); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.olv-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #171716;
  border: 1px solid rgba(245, 244, 241, 0.12);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.8);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
/* Barre de couleur à gauche selon le type */
.olv-toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--olv-c, #c6a66a); }
/* Lueur à l'arrivée, puis disparaît */
.olv-toast::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--olv-c, #c6a66a); opacity: 0; pointer-events: none; }
.olv-toast.is-new { animation: olvToastIn 0.7s cubic-bezier(0.18, 1.25, 0.4, 1) both; }
.olv-toast.is-new::after { animation: olvToastGlow 1.6s ease-out both; }
@keyframes olvToastIn { from { opacity: 0; transform: translateX(46px) scale(0.92); } }
@keyframes olvToastGlow { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
.olv-toast.is-dim { opacity: 0.5; }
.olv-toast.is-out { opacity: 0; transform: translateY(14px) scale(0.94); }
.olv-toast[data-k="res"] { --olv-c: #c6a66a; }
.olv-toast[data-k="tic"] { --olv-c: #8c9bff; }
.olv-toast[data-k="pay"] { --olv-c: #5fb98a; }
.olv-toast[data-k="chk"] { --olv-c: #5fb98a; }
.olv-toast[data-k="gst"] { --olv-c: #e58a4e; }
.olv-toast-ico { position: relative; display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; color: var(--olv-c); background: color-mix(in srgb, var(--olv-c) 16%, transparent); }
.olv-toast-ico svg { width: 19px; height: 19px; }
.olv-toast-txt { flex: 1; min-width: 0; }
.olv-toast-head { display: flex; align-items: baseline; gap: 8px; }
.olv-toast-txt b { color: #f5f4f1; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.olv-toast-txt small { color: #6f6f74; font-size: 11px; font-weight: 600; white-space: nowrap; }
.olv-toast-txt > span:last-child { display: block; margin-top: 1px; color: #8e8e93; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olv-toast-amt { flex: none; padding: 5px 9px; border-radius: 999px; background: rgba(95, 185, 138, 0.14); color: #9fe0b5; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Montant qui s'envole de la notification vers le compteur */
.olv-fly { position: absolute; z-index: 6; left: 0; top: 0; padding: 6px 11px; border-radius: 999px; background: #c6a66a; color: #160f03; font-size: 13px; font-weight: 800; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 30px rgba(198, 166, 106, 0.45); }
.olv-fly--chk { background: #5fb98a; color: #082014; box-shadow: 0 10px 30px rgba(95, 185, 138, 0.45); }

/* Carte KPI (en bas à gauche) */
.olv-kpi {
  position: absolute;
  z-index: 3;
  left: -1%;
  bottom: -9%;
  width: min(330px, 36%);
  padding: 18px 20px 16px;
  border-radius: 20px;
  background: #121211;
  border: 1px solid rgba(245, 244, 241, 0.12);
  box-shadow: 0 40px 90px -16px rgba(0, 0, 0, 0.9);
  text-align: left;
}
.olv-kpi::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 1px rgba(198, 166, 106, 0.7), 0 0 50px rgba(198, 166, 106, 0.35); opacity: 0; pointer-events: none; }
.olv-kpi.is-hit::after { animation: olvHit 1.1s ease-out; }
.olv-kpi.is-hit-chk::after { box-shadow: 0 0 0 1px rgba(95, 185, 138, 0.7), 0 0 50px rgba(95, 185, 138, 0.3); animation: olvHit 1.1s ease-out; }
@keyframes olvHit { 0% { opacity: 1; } 100% { opacity: 0; } }
.olv-kpi-label { color: #8e8e93; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.olv-ca { display: block; margin: 4px 0 2px; color: #f5f4f1; font-size: clamp(30px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.olv-ca { transform-origin: left center; }
.olv-ca.is-bump { animation: olvBump 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes olvBump { 25% { color: #e8d5a8; transform: scale(1.06); } }
.olv-num-bump { display: inline-block; animation: olvBump 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.olv-spark { display: block; width: 100%; height: 48px; margin: 4px 0 12px; overflow: visible; }
.olv-spark-area { fill: url(#olvSparkFill); }
.olv-spark-line { fill: none; stroke: #c6a66a; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.olv-spark-area { transition: opacity 0.4s; }
.olv-spark-wrap { position: relative; margin: 4px 0 12px; }
.olv-spark-wrap .olv-spark { margin: 0; }
.olv-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #e8d5a8; box-shadow: 0 0 10px rgba(232, 213, 168, 0.9); transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.olv-dot i { position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid #e8d5a8; opacity: 0; }
.olv-kpi.is-hit .olv-dot i { animation: olvRing 1s ease-out; }
@keyframes olvRing { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }
.olv-kpi-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; padding-top: 12px; border-top: 1px solid rgba(245, 244, 241, 0.08); }
.olv-kpi-row span { display: block; color: #8e8e93; font-size: 11.5px; font-weight: 700; }
.olv-kpi-row b { display: block; margin-top: 2px; white-space: nowrap; color: #f5f4f1; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.olv-meter { display: block; height: 4px; margin-top: 7px; border-radius: 4px; background: rgba(245, 244, 241, 0.1); overflow: hidden; }
.olv-meter i { display: block; height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(90deg, #c6a66a, #e8d5a8); transform-origin: left; transform: scaleX(0.7); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Téléphone terrain (en bas à droite) : validation de QR */
.olv-phone { position: absolute; z-index: 4; right: 3%; bottom: -14%; width: min(180px, 17%); margin: 0; container-type: inline-size; transform: rotate(4deg); }
.olv-phone .orl-iphone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.olv-scan { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(13, 43, 25, 0.86); opacity: 0; transition: opacity 0.35s; }
.olv-scan i { position: absolute; left: 12%; right: 12%; height: 2px; top: 30%; background: #7fcf9a; box-shadow: 0 0 14px 3px rgba(127, 207, 154, 0.6); opacity: 0; }
.olv-scan b { display: grid; place-items: center; width: 34cqw; height: 34cqw; border-radius: 50%; background: #7fcf9a; color: #0b2414; font-size: 18cqw; transform: scale(0.4); transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.olv-scan.is-on { opacity: 1; }
.olv-scan.is-on i { animation: olvLaser 0.6s ease-in-out 2 alternate; }
.olv-scan.is-on b { transform: scale(1); }
@keyframes olvLaser { from { top: 25%; opacity: 1; } to { top: 75%; opacity: 1; } }

/* Entrée en scène : back-office, puis compteur, notifications et téléphone */
.olv:not(.is-in) .olv-kpi, .olv:not(.is-in) .olv-phone, .olv:not(.is-in) .olv-feed { opacity: 0; }
.olv.is-in .olv-kpi { animation: olvUpIn 0.9s 0.25s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.olv.is-in .olv-feed { animation: olvFadeIn 0.6s 0.45s ease both; }
.olv.is-in .olv-phone { animation: olvPhoneIn 1s 0.6s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
@keyframes olvUpIn { from { opacity: 0; transform: translateY(40px); } }
@keyframes olvFadeIn { from { opacity: 0; } }
@keyframes olvPhoneIn { from { opacity: 0; transform: translateY(60px) rotate(10deg); } }

/* Hors écran : on fige tout */
.olv.is-off * { animation-play-state: paused !important; }

/* Tablette / mobile */
@media (max-width: 900px) {
  .olv-desk { width: 100%; transform: none; }
  .olv-feed { position: relative; top: auto; right: auto; width: 100%; margin-top: -40px; padding: 0 10px; }
  .olv-feed .olv-toast:nth-child(n+3) { display: none; }
  .olv-kpi { position: relative; left: auto; bottom: auto; width: 100%; margin-top: 12px; }
  .olv-phone { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .olv-desk { transform: none; }
  .olv-toast, .olv-toast::after, .olv-live b, .olv-kpi, .olv-feed, .olv-phone { animation: none !important; opacity: 1; }
}

/* Titre du héros : même langage que l'accueil (capitales + italique doré) */
.orl .orl-hero .orl-title { max-width: 18ch; font-family: Rubik, Montserrat, sans-serif; font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: 0.95; letter-spacing: -0.035em; text-transform: uppercase; }
.orl .orl-hero .orl-title .orl-gold { margin-top: 0.08em; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: -0.01em; text-transform: none; color: #c6a66a; background: none; -webkit-text-fill-color: currentColor; }
.olv-kpi-row b span { display: inline; color: inherit; font-size: inherit; font-weight: inherit; }
@media (max-width: 900px) {
  .olv-bar > i { display: none; }
}

/* ==========================================================================
   Ouverture du héros (~2 s) : la lumière s'allume, le badge sort du flou, les lignes
   du titre se dévoilent, un reflet traverse « pensé pour la nuit. », puis texte,
   boutons (éclat sur le doré), arguments un par un, et enfin le back-office monte.
   Uniquement CSS au chargement (aucun flash : les éléments démarrent masqués).
   ========================================================================== */
.orl-hero .orl-hero-glow { animation: orlGlow 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes orlGlow { from { opacity: 0; transform: translateX(-50%) scale(0.5); } }

/* Faisceau qui balaie le haut de la section */
.orl-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: 46vw;
  max-width: 620px;
  height: 120%;
  background: linear-gradient(180deg, rgba(232, 213, 168, 0.13), transparent 70%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
  pointer-events: none;
  animation: orlBeam 2.4s 0.1s cubic-bezier(0.3, 0.6, 0.2, 1) both;
}
@keyframes orlBeam {
  0% { opacity: 0; transform: translateX(-50%) rotate(-38deg); }
  25% { opacity: 1; }
  100% { opacity: 0.55; transform: translateX(-50%) rotate(0deg); }
}
.orl-hero-head, .olv { position: relative; z-index: 1; }

.orl-hero .orl-badge { animation: orlBlurDrop 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes orlBlurDrop { from { opacity: 0; transform: translateY(-18px); filter: blur(8px); } }

/* Lignes du titre : dévoilées par un masque qui remonte */
.orl-hero .orl-title-line { animation: orlLineIn 1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.orl-hero .orl-title-line:nth-child(1) { animation-delay: 0.38s; }
.orl-hero .orl-title-line:nth-child(2) { animation-delay: 0.62s; }
@keyframes orlLineIn {
  from { opacity: 0; transform: translateY(0.5em); clip-path: inset(-30% -5% 100% -5%); }
  40% { opacity: 1; }
  to { opacity: 1; transform: none; clip-path: inset(-30% -5% -30% -5%); }
}
/* Reflet qui traverse la ligne dorée une fois dévoilée */
.orl .orl-hero .orl-title .orl-gold {
  background: linear-gradient(100deg, #c6a66a 0%, #c6a66a 42%, #fff4d9 50%, #c6a66a 58%, #c6a66a 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: orlLineIn 1s 0.62s cubic-bezier(0.16, 1, 0.3, 1) both, orlSheen 1.4s 1.35s ease-in-out both;
}
@keyframes orlSheen { from { background-position: 100% 0; } to { background-position: 0 0; } }

.orl-hero .orl-lead { animation: orlUp 0.9s 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes orlUp { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } }

.orl-hero .orl-ctas .orl-btn { animation: orlPop 0.8s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.orl-hero .orl-ctas .orl-btn:nth-child(1) { animation-delay: 1.15s; }
.orl-hero .orl-ctas .orl-btn:nth-child(2) { animation-delay: 1.27s; }
@keyframes orlPop { from { opacity: 0; transform: translateY(14px) scale(0.9); } }
/* Éclat qui traverse le bouton doré */
.orl-hero .orl-btn--gold { position: relative; overflow: hidden; }
.orl-hero .orl-btn--gold::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: orlShine 1s 1.75s ease-in-out both;
}
@keyframes orlShine { from { left: -60%; } to { left: 130%; } }

.orl-hero .orl-trust li { animation: orlUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.orl-hero .orl-trust li:nth-child(1) { animation-delay: 1.45s; }
.orl-hero .orl-trust li:nth-child(2) { animation-delay: 1.57s; }
.orl-hero .orl-trust li:nth-child(3) { animation-delay: 1.69s; }

/* Le back-office monte en dernier */
.orl-hero .olv-stage { animation: orlStageIn 1.3s 1.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes orlStageIn { from { opacity: 0; transform: translateY(90px) scale(0.97); } }

@media (prefers-reduced-motion: reduce) {
  .orl-hero::before, .orl-hero .orl-hero-glow, .orl-hero .orl-badge, .orl-hero .orl-title-line,
  .orl .orl-hero .orl-title .orl-gold, .orl-hero .orl-lead, .orl-hero .orl-ctas .orl-btn,
  .orl-hero .orl-btn--gold::after, .orl-hero .orl-trust li, .orl-hero .olv-stage { animation: none !important; }
  .orl .orl-hero .orl-title .orl-gold { color: #c6a66a; -webkit-text-fill-color: #c6a66a; background: none; }
}
