/* Sept Tools — Styles Globe partenaires (Bloc 269)
   Préfixe ng- pour éviter tout conflit avec le reste du site.
   Charte : rouge #C41E3A, noir #0A0A0A, blanc #FAFAFA */

:root {
  --ng-red: #C41E3A;
  --ng-grey-3: #6B6B72;
  --ng-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ Bouton flottant ============ */
.ng-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: #0A0A0A;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(10,10,10,0.04), 0 8px 24px rgba(10,10,10,0.06);
  transition: transform 0.4s var(--ng-ease-soft), box-shadow 0.4s var(--ng-ease-soft), border-color 0.3s var(--ng-ease-soft), background 0.3s var(--ng-ease-soft);
  appearance: none;
  text-decoration: none;
}
.ng-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(196,30,58,0.35);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 2px rgba(10,10,10,0.06), 0 14px 36px rgba(196,30,58,0.18);
}
.ng-btn .ng-mini-globe {
  width: 22px; height: 22px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 35% 35%, #2a2a30 0%, #0a0a0a 70%);
  flex-shrink: 0;
}
.ng-btn .ng-mini-globe::before, .ng-btn .ng-mini-globe::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  border: 1px solid rgba(196,30,58,0.55);
  border-bottom-color: transparent;
  border-top-color: transparent;
  animation: ng-meridian 6s linear infinite;
}
.ng-btn .ng-mini-globe::after {
  border-color: rgba(255,255,255,0.35);
  border-bottom-color: transparent;
  border-top-color: transparent;
  transform: rotate(60deg);
  animation-duration: 8s;
  animation-direction: reverse;
}
.ng-btn:hover .ng-mini-globe::before { animation-duration: 2.5s; }
.ng-btn:hover .ng-mini-globe::after  { animation-duration: 3.2s; }
@keyframes ng-meridian { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.ng-btn-stack {
  display: flex; flex-direction: column;
  text-align: left;
  line-height: 1.15;
}
.ng-btn-main { font-weight: 700; }
.ng-btn-sub { font-size: 10.5px; font-weight: 500; color: var(--ng-grey-3); letter-spacing: 0.04em; }

.ng-btn-arrow { margin-left: 4px; width: 16px; height: 16px; display: grid; place-items: center; color: var(--ng-grey-3); transition: transform 0.3s var(--ng-ease-soft), color 0.3s var(--ng-ease-soft); }
.ng-btn:hover .ng-btn-arrow { transform: translateX(3px); color: var(--ng-red); }

.ng-btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1px solid rgba(196,30,58,0.18);
  opacity: 0;
  animation: ng-pulse 4.5s ease-out infinite;
  pointer-events: none;
}
@keyframes ng-pulse { 0%{opacity:0;transform:scale(.92)} 40%{opacity:.8} 100%{opacity:0;transform:scale(1.18)} }

/* ============ Modal ============ */
.ng-modal {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 50%, #0c0608 0%, #050507 60%, #000 100%);
  display: none;
  opacity: 0;
  transition: opacity 0.5s var(--ng-ease-soft);
  overflow: hidden;
  /* Empêche le swipe-back natif du navigateur mobile pendant l'interaction
     avec le globe (Safari iOS, Chrome Android), et coupe le pull-to-refresh. */
  touch-action: none;
  overscroll-behavior: contain;
}
.ng-modal.is-open { display: block; opacity: 1; }
.ng-modal::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(196,30,58,0.08), transparent 50%), radial-gradient(circle at 80% 20%, rgba(122,169,255,0.05), transparent 55%);
  pointer-events: none; z-index: 1;
}

.ng-modal-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px; z-index: 10;
  color: #FAFAFA;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}
.ng-modal-title { display: flex; align-items: baseline; gap: 14px; font-family: 'Plus Jakarta Sans', sans-serif; }
.ng-modal-title .ng-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ng-red); }
.ng-modal-title .ng-t { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

.ng-close {
  appearance: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #FAFAFA;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.3s var(--ng-ease-soft);
}
.ng-close:hover { background: rgba(196,30,58,0.18); border-color: rgba(196,30,58,0.45); transform: rotate(90deg); }
.ng-close svg { width: 16px; height: 16px; }

/* Filtres */
.ng-filters {
  position: absolute; top: 78px; left: 32px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 10;
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.6s var(--ng-ease-soft) 0.4s, transform 0.6s var(--ng-ease-soft) 0.4s;
}
.ng-modal.is-open .ng-filters { opacity: 1; transform: translateX(0); }

.ng-chip {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(250,250,250,0.7);
  padding: 10px 16px 10px 12px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.25s var(--ng-ease-soft);
  min-width: 220px;
  text-align: left;
}
.ng-swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ng-chip-count { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; color: #FAFAFA; opacity: 0.75; }
.ng-chip:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.20); color: #FAFAFA; }
.ng-chip.is-active { background: rgba(196,30,58,0.10); border-color: rgba(196,30,58,0.45); color: #FAFAFA; }

/* Stats */
.ng-stats {
  position: absolute; bottom: 28px; left: 32px; right: 168px;
  z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  pointer-events: none;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.6s var(--ng-ease-soft) 0.5s, transform 0.6s var(--ng-ease-soft) 0.5s;
}
.ng-modal.is-open .ng-stats { opacity: 1; transform: translateY(0); }
.ng-stat { display: flex; flex-direction: column; gap: 2px; color: #FAFAFA; font-family: 'Plus Jakarta Sans', sans-serif; }
.ng-stat .v { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.ng-stat .v small { font-size: 16px; font-weight: 500; color: var(--ng-grey-3); margin-left: 4px; }
.ng-stat .l { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ng-grey-3); margin-top: 4px; }

.ng-hint { color: rgba(250,250,250,0.5); font-size: 11.5px; letter-spacing: 0.06em; text-align: right; font-family: 'Inter', sans-serif; }
.ng-hint kbd { display: inline-block; padding: 2px 6px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 10px; font-weight: 600; color: #FAFAFA; margin: 0 2px; }

/* Brand rail */
.ng-rail {
  position: absolute; top: 84px; bottom: 130px; right: 24px;
  width: 116px; z-index: 8;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
  opacity: 0; transform: translateX(12px);
  transition: opacity 0.6s var(--ng-ease-soft) 0.6s, transform 0.6s var(--ng-ease-soft) 0.6s;
}
.ng-modal.is-open .ng-rail { opacity: 1; transform: translateX(0); }

.ng-rail-eyebrow {
  position: absolute; top: 64px; right: 30px; z-index: 9;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(250,250,250,0.42);
  writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--ng-ease-soft) 0.7s;
}
.ng-modal.is-open .ng-rail-eyebrow { opacity: 1; }

.ng-rail-track {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: ng-rail-scroll 36s linear infinite;
  will-change: transform;
}
.ng-rail:hover .ng-rail-track { animation-play-state: paused; }
@keyframes ng-rail-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .ng-rail-track { animation: none; } }

.ng-rail-item {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  width: 96px; height: 56px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  padding: 8px 10px;
  opacity: 0.78;
  transition: opacity 0.35s var(--ng-ease-soft), transform 0.35s var(--ng-ease-soft), box-shadow 0.35s var(--ng-ease-soft), background 0.35s var(--ng-ease-soft);
  text-decoration: none;
}
.ng-rail-item img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.ng-rail-item:hover { opacity: 1; transform: scale(1.05); background: rgba(255,255,255,1); box-shadow: 0 6px 22px rgba(196,30,58,0.28); }

/* Logos light/transparent : fond sombre */
.ng-rail-item[title="Kopadi"], .ng-rail-item[title="ASUP GmbH"] { background: rgba(20,20,24,0.92); border-color: rgba(255,255,255,0.16); }
.ng-rail-item[title="Kopadi"]:hover, .ng-rail-item[title="ASUP GmbH"]:hover { background: rgba(10,10,12,1); box-shadow: 0 6px 22px rgba(16,185,129,0.32); }

/* Tooltip */
.ng-tt {
  position: fixed; pointer-events: none; z-index: 200;
  background: rgba(10,10,10,0.90);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 3px solid var(--ng-red);
  border-radius: 6px;
  padding: 10px 14px;
  color: #FAFAFA;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  min-width: 200px; max-width: 280px;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-12px);
  transition: opacity 0.2s var(--ng-ease-soft);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
}
.ng-tt.show { opacity: 1; }
.ng-tt-type { font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ng-red); margin-bottom: 4px; }
.ng-tt-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.ng-tt-loc { color: var(--ng-grey-3); font-size: 12px; }

/* Loader */
.ng-loader { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none; transition: opacity 0.6s var(--ng-ease-soft); }
.ng-loader.hidden { opacity: 0; }
.ng-loader .ng-ring { width: 60px; height: 60px; border: 1.5px solid rgba(196,30,58,0.15); border-top-color: var(--ng-red); border-radius: 50%; animation: ng-meridian 1.1s linear infinite; }

/* Globe container */
.ng-globe-container { position: absolute; inset: 0; z-index: 2; }
.ng-globe-container canvas { display: block; }
.ng-modal.is-open .ng-globe-container { animation: ng-globe-fade 1s var(--ng-ease-soft) both; }
@keyframes ng-globe-fade { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* Responsive */
@media (max-width: 760px) {
  .ng-modal-header { padding: 16px 18px; }
  .ng-modal-title .ng-t { font-size: 16px; }
  .ng-modal-title .ng-eyebrow { font-size: 10px; }
  .ng-filters { left: 18px; right: 18px; top: 70px; }
  .ng-chip { min-width: 0; flex: 1 1 auto; padding: 8px 10px; font-size: 11.5px; }
  .ng-stats { left: 18px; right: 18px; bottom: 18px; flex-wrap: wrap; gap: 16px; }
  .ng-stat .v { font-size: 26px; }
  .ng-hint { display: none; }
  /* Sur mobile, on remonte le bouton au-dessus du StickyMobileCTA (~70px). */
  .ng-btn { bottom: 88px; right: 16px; padding: 10px 14px 10px 10px; }
  .ng-btn-sub { display: none; }
  .ng-rail, .ng-rail-eyebrow { display: none; }
  .ng-stats { right: 18px; }
}
