/* ============================================================
   TELNET BEYNOST — Animations & Extras CSS
   Complément du fichier style.css principal
   ============================================================ */

/* ──────────────── ANIMATIONS D'ENTRÉE ──────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .65s cubic-bezier(.4,0,.2,1), transform .65s cubic-bezier(.4,0,.2,1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: .1s; }
.animate-on-scroll.delay-2 { transition-delay: .2s; }
.animate-on-scroll.delay-3 { transition-delay: .3s; }
.animate-on-scroll.delay-4 { transition-delay: .4s; }

/* ──────────────── LOADING OVERLAY ──────────────── */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy-950);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
  transition: opacity .5s ease, visibility .5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  display: flex; align-items: center; gap: 12px;
}
.loader-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: white;
  animation: pulseLoader 1.2s ease-in-out infinite;
}
@keyframes pulseLoader {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6,182,212,.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(6,182,212,0); }
}
.loader-name {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.4rem;
  color: white; letter-spacing: -.02em;
}
.loader-bar {
  width: 200px; height: 3px; background: rgba(255,255,255,.1);
  border-radius: 9999px; overflow: hidden;
}
.loader-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #06b6d4);
  border-radius: 9999px;
  animation: loadingBar 1.8s ease-in-out forwards;
}
@keyframes loadingBar {
  0% { width: 0; }
  60% { width: 80%; }
  100% { width: 100%; }
}

/* ──────────────── NOTIFICATION TOAST ──────────────── */
.toast {
  position: fixed; bottom: 80px; right: 28px; z-index: 9998;
  background: var(--white); border-radius: 12px; padding: 16px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 12px;
  max-width: 340px; border-left: 4px solid #22c55e;
  transform: translateX(120%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: #ef4444; }
.toast__icon { font-size: 1.3rem; }
.toast.success .toast__icon { color: #22c55e; }
.toast.error .toast__icon { color: #ef4444; }
.toast__msg { font-size: .9rem; font-weight: 500; color: #1e293b; }
.toast__close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: #94a3b8; font-size: .85rem; padding: 2px;
}

/* ──────────────── MICRO-INTERACTIONS ──────────────── */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.btn:hover::after { transform: translateX(100%); }

/* Focus visible (accessibilité) */
:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ──────────────── SKIP LINK (ACCESSIBILITÉ) ──────────────── */
.skip-link {
  position: absolute; top: -40px; left: 16px; z-index: 10000;
  background: #1d4ed8; color: white;
  padding: 8px 16px; border-radius: 0 0 8px 8px;
  font-weight: 600; font-size: .9rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ──────────────── SCROLL PROGRESS BAR ──────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, #1d4ed8, #06b6d4);
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(6,182,212,.5);
}

/* ──────────────── MODAL OVERLAY ──────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(6,13,31,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: white; border-radius: 20px; padding: 40px;
  max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: scale(.92) translateY(20px);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

/* ──────────────── COOKIE BANNER ──────────────── */
.cookie-banner {
  position: fixed; bottom: 24px; left: 24px; right: 24px; z-index: 998;
  background: #0a1628; color: white;
  border-radius: 16px; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.08);
  transform: translateY(120%);
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  max-width: 900px; margin: 0 auto;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { font-size: .88rem; color: rgba(255,255,255,.7); }
.cookie-banner a { color: #22d3ee; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  padding: 9px 18px; border-radius: 999px; font-size: .85rem;
  font-weight: 600; cursor: pointer; transition: all .25s ease;
}
.cookie-btn--accept {
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  color: white; border: none;
}
.cookie-btn--accept:hover { opacity: .9; }
.cookie-btn--reject {
  background: transparent; border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.6);
}
.cookie-btn--reject:hover { border-color: rgba(255,255,255,.4); color: white; }

@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; left: 12px; right: 12px; bottom: 12px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* ──────────────── HIGHLIGHTS TEXTE ──────────────── */
mark {
  background: linear-gradient(135deg, rgba(6,182,212,.15), rgba(59,130,246,.15));
  color: inherit; border-radius: 3px; padding: 1px 4px;
}

/* ──────────────── CHIP / TAG ──────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.chip--green { background: #dcfce7; color: #16a34a; }
.chip--blue { background: #dbeafe; color: #1d4ed8; }
.chip--orange { background: #ffedd5; color: #ea580c; }
