/* =============================================================================
   N2M SÉCURITÉ — Composants UI
   Version: 1.0.0 | P1
   ============================================================================= */

/* ── Boutons ──────────────────────────────────────────────────────────────── */

.gold-btn,
.outline-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--btn-radius);
  padding: 14px 28px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* Gold (primaire) */
.gold-btn {
  background: var(--n2m-gold);
  color: var(--n2m-black);
  border-color: var(--n2m-gold);
}
.gold-btn:hover {
  background: var(--n2m-gold-dim);
  border-color: var(--n2m-gold-dim);
  color: var(--n2m-black);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--n2m-glow);
}
.gold-btn:active { transform: translateY(0); }

/* Outline (secondaire) */
.outline-btn {
  background: transparent;
  color: var(--n2m-white);
  border-color: var(--n2m-border);
}
.outline-btn:hover {
  border-color: var(--n2m-gold);
  color: var(--n2m-gold);
  transform: translateY(-2px);
}

/* Ghost (tertiaire) */
.ghost-btn {
  background: transparent;
  color: var(--n2m-gold);
  border-color: transparent;
  padding-inline: 0;
}
.ghost-btn:hover { color: var(--n2m-gold-dim); gap: 12px; }
.ghost-btn svg,
.ghost-btn .arrow { transition: transform var(--transition); }
.ghost-btn:hover .arrow { transform: translateX(4px); }

/* Variantes tailles */
.gold-btn--sm, .outline-btn--sm { padding: 10px 20px; font-size: 0.8rem; }
.gold-btn--lg, .outline-btn--lg { padding: 18px 36px; font-size: 0.95rem; }

/* Bouton icône seul */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--n2m-border);
  border-radius: var(--card-radius);
  background: transparent;
  color: var(--n2m-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover {
  border-color: var(--n2m-gold);
  color: var(--n2m-gold);
}

/* ── Cards ────────────────────────────────────────────────────────────────── */

.n2m-card {
  background: var(--n2m-navy);
  border: 1px solid var(--n2m-border);
  border-radius: var(--card-radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition-slow), box-shadow var(--transition-slow);
}
.n2m-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245,194,0,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.n2m-card:hover {
  border-color: rgba(245, 194, 0, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--n2m-border);
}

/* Card avec accent de service */
.n2m-card--service {
  border-left: 3px solid var(--service-accent, var(--n2m-gold));
}
.n2m-card--service:hover {
  border-color: var(--service-accent, var(--n2m-gold));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), -4px 0 20px var(--service-glow, var(--n2m-glow));
}

/* Barre de progression couleur service (bas de card) */
.n2m-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--service-accent, var(--n2m-gold));
  width: 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.n2m-card:hover .n2m-card-progress { width: 100%; }

/* Card stat */
.n2m-stat-card {
  text-align: center;
  padding: 32px 24px;
}
.n2m-stat-card .n2m-stat-value {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.n2m-stat-card .n2m-stat-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n2m-muted);
}

/* ── Badges & Pills ───────────────────────────────────────────────────────── */

.n2m-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 2px;
}
.n2m-badge--gold {
  background: rgba(245, 194, 0, 0.12);
  color: var(--n2m-gold);
  border: 1px solid rgba(245, 194, 0, 0.25);
}
.n2m-badge--red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.n2m-badge--green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-ok);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.n2m-badge--cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--status-info);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* Dot blink (live / opérationnel) */
.n2m-badge .dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.5s ease-in-out infinite;
}

/* ── Stat bubble (command center) ─────────────────────────────────────────── */

.n2m-stat-bubble {
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--n2m-border);
  border-radius: var(--card-radius);
  padding: 14px 18px;
  min-width: 180px;
}
.n2m-stat-bubble__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n2m-muted);
  margin-bottom: 4px;
}
.n2m-stat-bubble__value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--n2m-gold);
  line-height: 1;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

.n2m-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.n2m-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.n2m-modal {
  background: var(--n2m-navy);
  border: 1px solid var(--n2m-border);
  border-radius: var(--card-radius);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  position: relative;
  animation: modalIn 0.35s cubic-bezier(.4,0,.2,1) both;
}
.n2m-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--n2m-muted);
  font-size: 1.3rem;
  line-height: 1;
  transition: color var(--transition);
}
.n2m-modal__close:hover { color: var(--n2m-white); }

/* ── Curseur custom ───────────────────────────────────────────────────────── */

.n2m-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--n2m-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  transform: translate(-50%, -50%);
  mix-blend-mode: normal;
}
.n2m-cursor--hover-btn {
  transform: translate(-50%, -50%) scale(2.5);
  background: rgba(245, 194, 0, 0.15);
}
.n2m-cursor--hover-card {
  transform: translate(-50%, -50%) scale(1.5);
}

/* Icône + sur survol de card */
.n2m-cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 900;
  color: var(--n2m-gold);
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.n2m-cursor--hover-card::after {
  content: '+';
  opacity: 1;
}

@media (hover: none) { .n2m-cursor { display: none; } }

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */

.n2m-breadcrumbs {
  padding-block: 14px;
  border-bottom: 1px solid var(--n2m-border);
  background: var(--n2m-navy);
}
.n2m-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.n2m-breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.n2m-breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: var(--n2m-muted);
}
.n2m-breadcrumbs a { color: var(--n2m-muted); }
.n2m-breadcrumbs a:hover { color: var(--n2m-gold); }
.n2m-breadcrumbs li:last-child { color: var(--n2m-gold); }

/* ── Bloc Écosystème ──────────────────────────────────────────────────────── */

.bloc-ecosysteme {
  background: var(--n2m-navy);
  border-top: 1px solid var(--n2m-border);
  border-bottom: 1px solid var(--n2m-border);
  padding-block: 0;
}
.bloc-ecosysteme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1024px) {
  .bloc-ecosysteme-grid { grid-template-columns: repeat(4, 1fr); }
}
.bloc-ecosysteme-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 28px;
  border-right: 1px solid var(--n2m-border);
  text-decoration: none;
  transition: background var(--transition);
}
.bloc-ecosysteme-item:last-child { border-right: none; }
@media (max-width: 1023px) {
  .bloc-ecosysteme-item:nth-child(2) { border-right: none; }
  .bloc-ecosysteme-item:nth-child(1),
  .bloc-ecosysteme-item:nth-child(2) {
    border-bottom: 1px solid var(--n2m-border);
  }
}
.bloc-ecosysteme-item:hover {
  background: rgba(245, 194, 0, 0.04);
}
.bloc-ecosysteme-item__text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--n2m-muted);
  line-height: 1.4;
}
.bloc-ecosysteme-item__text span {
  display: block;
  color: var(--n2m-white);
  font-size: 0.88rem;
}
.bloc-ecosysteme-item__arrow {
  color: var(--n2m-gold);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.bloc-ecosysteme-item:hover .bloc-ecosysteme-item__arrow {
  transform: translateX(4px);
}

/* ── Boutons flottants ────────────────────────────────────────────────────── */

/* ── Pile de boutons flottants (bas-droite) : tous ronds, même taille ──────── */
.n2m-float-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none; /* le conteneur ne capte pas les clics ; les boutons oui */
}
.n2m-float-stack > * { pointer-events: auto; }

/* Bouton flottant générique — taille unique */
.n2m-float-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
  transition: transform var(--transition);
}
.n2m-float-btn:hover { transform: scale(1.1); color: #fff; }

/* Couleurs par bouton */
.n2m-float-btn--whatsapp { background: #25D366; animation: whatsappPulse 2.5s infinite; }
.n2m-float-btn--google   { background: #fff; }
.n2m-float-btn--devis    { background: var(--n2m-gold, #F5C200); color: #0A1628; }
.n2m-float-btn--config   { background: #1A73E8; }
.n2m-float-btn--urgence  { background: var(--status-danger, #EF4444); animation: urgencePulse 2.5s infinite; }
.n2m-float-btn--theme    { background: var(--n2m-gold, #F5C200); color: #0A1628; font-size: 22px; line-height: 1; }
.n2m-float-btn--urgence:hover { background: #DC2626; }

/* Infobulle à GAUCHE (les boutons sont sur le bord droit) */
.n2m-float-btn .tooltip {
  position: absolute;
  right: calc(100% + 12px);
  left: auto;
  white-space: nowrap;
  background: var(--n2m-navy);
  color: var(--n2m-white);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--n2m-border);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.n2m-float-btn:hover .tooltip { opacity: 1; }
.n2m-float-btn .tooltip--wide { white-space: normal; width: 220px; text-align: left; line-height: 1.4; }

@media (max-width: 480px) {
  .n2m-float-stack { right: 14px; bottom: 14px; gap: 10px; }
  .n2m-float-btn { width: 50px; height: 50px; }
  /* Sur mobile : pas de survol → l'info urgence reste accessible via le clic (modal). */
  .n2m-float-btn .tooltip { display: none; }
}

/* ── FAB : un seul bouton qui déplie les 6 actions ────────────────────────── */
.n2m-fab-items {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.85);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.n2m-float-stack.is-open .n2m-fab-items {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.n2m-fab-toggle {
  position: relative;
  pointer-events: auto;
  align-self: flex-end;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--n2m-gold, #F5C200);
  color: #0A1628;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, background 0.2s ease;
}
.n2m-fab-toggle:hover { transform: scale(1.06); }
.n2m-float-stack.is-open .n2m-fab-toggle { background: #0A1628; color: #fff; }
.n2m-fab-toggle__close { display: none; }
.n2m-float-stack.is-open .n2m-fab-toggle__open { display: none; }
.n2m-float-stack.is-open .n2m-fab-toggle__close { display: block; }
/* halo pulsé pour attirer l'attention (uniquement fermé) */
.n2m-fab-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(245,194,0,0.5);
  animation: n2mFabPulse 2.6s infinite;
  pointer-events: none;
}
.n2m-float-stack.is-open .n2m-fab-toggle::after { animation: none; }
@keyframes n2mFabPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,194,0,0.5); }
  70%  { box-shadow: 0 0 0 15px rgba(245,194,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,194,0,0); }
}
@media (max-width: 480px) {
  .n2m-fab-toggle { width: 56px; height: 56px; }
}

/* Modal urgence */
.urgence-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.urgence-modal-header .icon {
  width: 44px;
  height: 44px;
  background: rgba(239, 68, 68, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--status-danger);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.urgence-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.urgence-contact a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(5, 5, 8, 0.5);
  border: 1px solid var(--n2m-border);
  border-radius: var(--card-radius);
  color: var(--n2m-white);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--transition);
}
.urgence-contact a:hover { border-color: var(--n2m-gold); color: var(--n2m-white); }
.urgence-steps {
  font-size: 0.88rem;
  color: var(--n2m-muted);
  line-height: 1.7;
}
.urgence-steps li { padding: 4px 0; }

/* ── Nav mobile ───────────────────────────────────────────────────────────── */

#n2m-nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--n2m-black);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 32px) 32px 32px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
#n2m-nav-mobile.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
@media (min-width: 1024px) {
  #n2m-nav-mobile { display: none !important; }
}
.n2m-mobile-link {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--n2m-white);
  padding: 16px 0;
  border-bottom: 1px solid var(--n2m-border);
  text-decoration: none;
  transition: color var(--transition);
}
.n2m-mobile-link:hover { color: var(--n2m-gold); }
.n2m-mobile-submenu {
  padding-left: 16px;
  margin-top: 8px;
}
.n2m-mobile-submenu a {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--n2m-muted);
  padding: 10px 0;
  text-decoration: none;
  transition: color var(--transition);
}
.n2m-mobile-submenu a:hover { color: var(--n2m-gold); }
.n2m-mobile-cta { margin-top: 32px; }
.n2m-mobile-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Utilitaires responsive ───────────────────────────────────────────────── */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}

/* ── Hero Radar SVG ──────────────────────────────────────────────────────── */

.n2m-hero__radar-wrap {
  position: relative;
  flex-shrink: 0;
  display: none;
  width: 420px;
  height: 420px;
}
@media (min-width: 1024px) {
  .n2m-hero__radar-wrap { display: block; }
}

.n2m-radar-svg {
  width: 380px;
  height: 380px;
  display: block;
  overflow: visible;
  margin-left: auto;
}

/* Sweep : rotation CSS sur le groupe SVG */
.n2m-radar-sweep {
  transform-origin: 190px 190px;
  animation: radarSweep 4s linear infinite;
}

/* Blips */
.n2m-blip {
  animation: blink 1.8s ease-in-out infinite;
}

/* ── Float cards (chiffres sur le radar) ─────────────────────────────────── */

.n2m-hero__float-card {
  position: absolute;
  background: rgba(5, 5, 8, 0.88);
  border: 1px solid var(--n2m-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 22px;
  border-radius: var(--card-radius);
  white-space: nowrap;
  z-index: 5;
}
.n2m-hero__float-card--1 {
  top: 24px;
  left: -52px;
}
.n2m-hero__float-card--2 {
  bottom: 44px;
  right: -24px;
}

.n2m-hero__float-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n2m-muted);
  margin-bottom: 5px;
}
.n2m-hero__float-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--n2m-gold);
  line-height: 1;
}

/* ── Badge statut opérationnel ───────────────────────────────────────────── */

.n2m-hero__status {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  animation: blink 2.5s ease-in-out infinite;
}

/* ── Bande certifications défilante ──────────────────────────────────────── */

.n2m-certif-band {
  position: relative;
  z-index: 10;
  background: var(--n2m-navy);
  border-block: 1px solid var(--n2m-border);
  overflow: hidden;
  padding-block: 14px;
}
.n2m-certif-band__track {
  display: flex;
  gap: 52px;
  width: max-content;
  animation: certifScroll 38s linear infinite;
}
.n2m-certif-band__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--n2m-muted);
  white-space: nowrap;
  transition: color var(--transition);
  cursor: default;
}
.n2m-certif-band__item:hover { color: var(--n2m-gold); }
.n2m-certif-band__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--n2m-gold);
  opacity: 0.5;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .n2m-certif-band__track { animation: none; }
  .n2m-radar-sweep { animation: none; }
  .n2m-blip { animation: none; opacity: 0.7; }
}
