:root {
  --bg: #f4f7f8;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #009688;
  --dark: #101823;
  --line: #e5e7eb;
  --danger: #dc2626;
  --shadow: 0 22px 55px rgba(15, 23, 42, .10);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 78px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(15,23,42,.07);
}

.site-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
}

.site-nav .brand span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--dark);
  color: #fff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-menu a {
  padding: 10px 12px;
  border-radius: 13px;
  color: var(--muted);
  font-weight: 800;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: #e8f5f3;
  color: #00796f;
}

.training-page {
  min-height: 100vh;
}

.public-training {
  padding: 54px 7% 70px;
}

.formation-hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: end;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 34px;
  background:
    linear-gradient(90deg, rgba(16, 24, 35, .94), rgba(16, 24, 35, .58)),
    url("assets/machines-clean/machine-necta-snakky.jpg") center/cover;
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.formation-hero h1 {
  max-width: 900px;
  margin-top: 10px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .98;
  letter-spacing: 0;
}

.formation-hero p:not(.eyebrow) {
  margin-top: 20px;
  max-width: 720px;
  color: rgba(255,255,255,.82);
  font-size: 18px;
  line-height: 1.7;
}

.plan-card {
  padding: 26px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 26px;
  background: rgba(255,255,255,.11);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 12px;
}

.plan-card span {
  color: #99f6e4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card strong {
  font-size: 36px;
  line-height: 1;
}

.plan-card p {
  color: rgba(255,255,255,.78);
  line-height: 1.55;
}

.plan-card a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.access-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px;
  border: 1px solid #b2dfdb;
  border-radius: 18px;
  background: #ecfdf9;
}

.price-line strong {
  color: var(--primary);
  font-size: 34px;
}

.price-line span {
  color: var(--muted);
  font-weight: 800;
}

.access-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 460px;
  gap: 40px;
  align-items: center;
  padding: 7vw;
  background-image:
    linear-gradient(90deg, rgba(16, 24, 35, .96), rgba(16, 24, 35, .72)),
    url("assets/machines-clean/machine-necta-snakky.jpg"),
    radial-gradient(circle at 25% 50%, #0f766e 0, #101823 50%, #050a12 100%);
  background-size: cover, min(42vw, 520px) auto, cover;
  background-position: center, 25% center, center;
  background-repeat: no-repeat;
}

.access-visual {
  color: #fff;
  max-width: 760px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  font-weight: 800;
}

.brand-pill b {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary);
}

.access-visual h1 {
  margin-top: 28px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .95;
  letter-spacing: 0;
}

.access-visual p {
  margin-top: 24px;
  max-width: 650px;
  color: rgba(255,255,255,.82);
  font-size: 18px;
  line-height: 1.7;
}

.security-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.security-list span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
}

.access-card {
  width: 100%;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.40);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 18px;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.access-card h2 {
  font-size: 28px;
  line-height: 1.1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 15px;
  font-size: 15px;
  outline: 0;
  background: #fff;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,150,136,.12);
}

button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.access-card button,
.toolbar button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
}

.access-card small,
.form-message {
  color: var(--muted);
  line-height: 1.5;
}

.form-message.error {
  color: var(--danger);
  font-weight: 700;
}

.form-message.success {
  color: var(--primary);
  font-weight: 700;
}

.training-shell {
  padding: 28px;
  user-select: none;
  -webkit-user-select: none;
}

.training-header {
  min-height: 170px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-radius: 30px;
  background: linear-gradient(135deg, #101823, #0d3d39);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.brand span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
}

.training-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

.training-header span,
.training-warning p {
  color: rgba(255,255,255,.76);
}

#logoutTraining {
  min-height: 48px;
  padding: 0 18px;
  background: rgba(255,255,255,.12);
  color: #fff;
}

.training-warning {
  margin: 22px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 22px;
  background: var(--dark);
  color: #fff;
}

.training-warning i {
  color: var(--primary);
  font-size: 24px;
}

.training-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

.training-sidebar,
.videos-grid article,
.toolbar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.training-sidebar {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 20px;
}

.training-sidebar h2 {
  margin-bottom: 14px;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-list button {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  color: var(--text);
}

.category-list button.active {
  background: #e8f5f3;
  color: #00796f;
}

.support-card {
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
  background: #101823;
  color: #fff;
  display: grid;
  gap: 8px;
}

.support-card i {
  color: var(--primary);
  font-size: 26px;
}

.support-card p {
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.5;
}

.support-card a {
  color: #fff;
  font-weight: 800;
}

.support-chat {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #b2dfdb;
  background: #f2fffc;
  display: grid;
  gap: 12px;
}

.support-chat > div:first-child {
  display: grid;
  gap: 6px;
}

.support-chat i {
  color: var(--primary);
  font-size: 22px;
}

.support-chat p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chat-messages {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.chat-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.chat-bubble.mine {
  background: #e8f5f3;
  border-color: #99d9d2;
}

.chat-bubble.admin {
  background: #101823;
  color: #fff;
}

.chat-bubble span {
  display: block;
  margin-bottom: 3px;
  color: inherit;
  opacity: .7;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-bubble p {
  color: inherit;
  font-size: 13px;
}

.chat-empty {
  padding: 12px;
  border: 1px dashed #b2dfdb;
  border-radius: 14px;
  color: var(--muted);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}

.chat-form input {
  height: 48px;
}

.chat-form button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
}

.toolbar {
  margin-bottom: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.toolbar input {
  flex: 1;
}

.toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.videos-grid article {
  overflow: hidden;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: #111827;
  position: relative;
  overflow: hidden;
}

.video-frame iframe,
.video-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.protected-video,
.secure-video,
.secure-video-stage {
  width: 100%;
  height: 100%;
  position: relative;
}

.secure-video-stage button,
.secure-error {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(0,150,136,.22), transparent 35%),
    #111827;
  color: #fff;
  text-align: center;
}

.secure-video-stage button i,
.secure-error i {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--primary);
  font-size: 24px;
}

.secure-video-stage button strong,
.secure-error strong {
  font-size: 18px;
}

.secure-video-stage button span,
.secure-error span {
  max-width: 360px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.5;
}

.secure-video-stage button:disabled {
  cursor: wait;
  opacity: .85;
}

.secure-watermark {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 4;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 24, 35, .72);
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  mix-blend-mode: screen;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

.video-frame::after {
  content: "NH DISTRIB";
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 4;
  color: rgba(255,255,255,.28);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
}

.video-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  text-align: center;
}

.video-placeholder i {
  display: block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 34px;
}

.video-body {
  padding: 18px;
}

.video-body span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f5f3;
  color: #00796f;
  font-size: 12px;
  font-weight: 800;
}

.video-body h3 {
  font-size: 20px;
  line-height: 1.2;
}

.video-body p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    position: absolute;
    right: 20px;
    top: 17px;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu.open {
    display: flex;
  }

  .public-training {
    padding: 28px 18px 54px;
  }

  .access-shell,
  .access-options,
  .formation-hero,
  .training-grid,
  .training-header,
  .videos-grid {
    grid-template-columns: 1fr;
  }

  .access-shell {
    padding: 24px;
  }

  .training-shell {
    padding: 16px;
  }

  .training-sidebar {
    position: static;
  }

  #logoutTraining {
    width: 100%;
  }
}
