/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

@font-face {
  font-family: 'Gotham';
  src: url('fonts/Gotham-Bold.woff2') format('woff2'),
       url('fonts/Gotham-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 2 couleurs du site */
  --rose:   #ff2db3;
  --violet: #9d6bff;
  --cyan:   #ff2db3;
  --dark:   #05000f;
  --dark2:  #0d0020;
  --white:  #f8f6ff;
  --gray:   #e0d8f8;
  /* alias pour compatibilité */
  --purple: var(--violet);
  --pink:   var(--rose);
  --font:      'Rajdhani', 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  --font-tech: 'Orbitron', 'Courier New', monospace;
  --font-maxima: 'Gotham', var(--font-tech), sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Logo typography ──────────────────────────────────────────── */
.nav-logo, .footer-logo, .glow-box {
  font-family: var(--font-tech);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-logo span, .footer-logo span, .glow-box span,
.hero-title span, .section-title span {
  color: var(--pink);
  text-shadow: 0 0 20px rgba(255, 45, 179, 0.9), 0 0 40px rgba(255, 45, 179, 0.5);
}

/* ── Navbar ───────────────────────────────────────────────────── */
#hero        { position: relative; z-index: 1; }
/* Les sections passent au-dessus du canvas avec un fond opaque */
#services    { position: relative; z-index: 5; background: var(--dark2); }
#confiance   { position: relative; z-index: 5; background: var(--dark); }
#apropos     { position: relative; z-index: 5; background: var(--dark2); }
#contact     { position: relative; z-index: 5; background: var(--dark); }
footer       { position: relative; z-index: 5; background: var(--dark2); }

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(5, 0, 15, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 64, 255, 0.15);
  transition: background 0.3s;
}

#navbar.scrolled {
  background: rgba(5, 0, 15, 0.75);
}

.nav-logo-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.nav-logo {
  position: relative;
  overflow: hidden;
  font-family: var(--font-tech);
  font-size: 1.1rem;
  color: var(--white);
  text-shadow: 0 0 18px rgba(157, 107, 255, 0.9), 0 0 36px rgba(157, 107, 255, 0.4);
}

.nav-by {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-tech);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.2rem;
}

.nav-by-maxima {
  font-family: var(--font-maxima);
  color: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-tech);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--white);
  text-shadow: 0 0 14px rgba(157, 107, 255, 0.9);
}

.btn-nav {
  border: 2px solid var(--rose) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  color: var(--rose) !important;
  text-shadow: 0 0 12px rgba(255, 45, 179, 0.9);
  box-shadow: 0 0 16px rgba(255, 45, 179, 0.5), inset 0 0 12px rgba(255, 45, 179, 0.1);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s !important;
}

.btn-nav:hover {
  background: var(--rose);
  color: var(--white) !important;
  box-shadow: 0 0 28px rgba(255, 45, 179, 0.9), inset 0 0 16px rgba(255, 45, 179, 0.25);
}

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  padding: 0.85rem 2.2rem;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(180, 130, 255, 0.6);
  box-shadow:
    0 0 10px rgba(120, 64, 255, 0.6),
    0 0 28px rgba(120, 64, 255, 0.3),
    inset 0 0 10px rgba(120, 64, 255, 0.15);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 24px rgba(157, 107, 255, 1),
    0 0 50px rgba(120, 64, 255, 0.55),
    inset 0 0 16px rgba(120, 64, 255, 0.25);
}

.btn-ghost {
  display: inline-block;
  color: var(--white);
  padding: 0.85rem 2.2rem;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 64, 192, 0.5);
  box-shadow:
    0 0 10px rgba(255, 64, 192, 0.35),
    0 0 24px rgba(255, 64, 192, 0.15),
    inset 0 0 8px rgba(255, 64, 192, 0.08);
  transition: transform 0.25s, box-shadow 0.25s, color 0.2s;
}

.btn-ghost:hover {
  color: var(--pink);
  transform: translateY(-2px);
  text-shadow: 0 0 16px rgba(255, 45, 179, 0.9);
  box-shadow:
    0 0 24px rgba(255, 45, 179, 0.8),
    0 0 50px rgba(255, 64, 192, 0.4),
    inset 0 0 14px rgba(255, 64, 192, 0.15);
}

/* ── Section commons ─────────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--purple);
  text-shadow: 0 0 16px rgba(157, 107, 255, 0.8);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-tech);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* ── Hero ─────────────────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform-origin: center center;
}

#tv-off {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  pointer-events: none;
  opacity: 0;
}

#tv-off.active {
  animation: tvOff 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

#tv-off.black {
  opacity: 1;
  background: #000;
  transform: none;
  filter: none;
}

#tv-off.fadeout {
  transition: opacity 0.4s ease;
  opacity: 0;
}

@keyframes tvOff {
  0%   { opacity: 0;   transform: scaleY(1)    scaleX(1);    filter: brightness(1); }
  15%  { opacity: 1;   transform: scaleY(1)    scaleX(1);    filter: brightness(3); }
  40%  { opacity: 1;   transform: scaleY(0.04) scaleX(1);    filter: brightness(4); }
  70%  { opacity: 1;   transform: scaleY(0.02) scaleX(0.15); filter: brightness(5); }
  85%  { opacity: 1;   transform: scaleY(0.01) scaleX(0.04); filter: brightness(6); }
  100% { opacity: 0;   transform: scaleY(0)    scaleX(0);    filter: brightness(0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none;
  z-index: 10;
}

.hero-content {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: 0 1rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-tech);
  font-size: clamp(1.2rem, 4vw, 3.3rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow:
    0 0 30px rgba(120, 64, 255, 0.8),
    0 0 80px rgba(120, 64, 255, 0.3);
  margin-bottom: 0;
  position: relative;
}

.hero-title span {
  text-shadow:
    0 0 30px rgba(255, 64, 192, 0.9),
    0 0 80px rgba(255, 64, 192, 0.4);
}

/* ── Glitch navbar ───────────────────────────────────────────── */
.nav-logo.glitch::before {
  font-size: inherit;
  animation: glitch-before 5s infinite linear;
}
.nav-logo.glitch::after {
  font-size: inherit;
  animation: glitch-after 5s infinite linear;
}

/* ── Glitch glow-box (à propos) ──────────────────────────────── */
.glow-box.glitch::before,
.glow-box.glitch::after {
  font-size: inherit;
  line-height: 1.1;
  white-space: nowrap;
  height: auto;
}
.glow-box.glitch::before { animation: glitch-before 6s infinite linear; }
.glow-box.glitch::after  { animation: glitch-after  6s infinite linear; }

/* ── Glitch hero ─────────────────────────────────────────────── */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  pointer-events: none;
  overflow: hidden;
}

.glitch::before {
  color: var(--cyan);
  text-shadow: -2px 0 var(--cyan);
  animation: glitch-before 4s infinite linear;
  left: 2px;
  clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%);
}

.glitch::after {
  color: var(--pink);
  text-shadow: 2px 0 var(--pink);
  animation: glitch-after 4s infinite linear;
  left: -2px;
  clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%);
}

@keyframes glitch-before {
  0%   { clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%); transform: translate(-3px, 0);  opacity: 0; }
  4%   { clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%); transform: translate(-3px, 0);  opacity: 0.85; }
  5%   { clip-path: polygon(0 65%, 100% 65%, 100% 72%, 0 72%); transform: translate(3px, 0);   opacity: 0.85; }
  6%   { clip-path: polygon(0 5%,  100% 5%,  100% 18%, 0 18%); transform: translate(-2px, 0);  opacity: 0.85; }
  7%   { opacity: 0; transform: translate(0); }
  42%  { opacity: 0; }
  44%  { clip-path: polygon(0 35%, 100% 35%, 100% 42%, 0 42%); transform: translate(4px, 0);   opacity: 0.7; }
  45%  { opacity: 0; }
  78%  { opacity: 0; }
  80%  { clip-path: polygon(0 80%, 100% 80%, 100% 88%, 0 88%); transform: translate(-3px, 0);  opacity: 0.9; }
  81%  { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); transform: translate(2px, 0);   opacity: 0.9; }
  82%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes glitch-after {
  0%   { opacity: 0; }
  4%   { clip-path: polygon(0 55%, 100% 55%, 100% 68%, 0 68%); transform: translate(3px, 0);  opacity: 0; }
  5%   { clip-path: polygon(0 55%, 100% 55%, 100% 68%, 0 68%); transform: translate(3px, 0);  opacity: 0.75; }
  6%   { clip-path: polygon(0 78%, 100% 78%, 100% 85%, 0 85%); transform: translate(-4px, 0); opacity: 0.75; }
  7%   { opacity: 0; }
  42%  { opacity: 0; }
  44%  { clip-path: polygon(0 20%, 100% 20%, 100% 28%, 0 28%); transform: translate(-3px, 0); opacity: 0.6; }
  45%  { opacity: 0; }
  78%  { opacity: 0; }
  80%  { clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); transform: translate(3px, 0);  opacity: 0.85; }
  81%  { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); transform: translate(-2px, 0); opacity: 0.85; }
  82%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: rgba(240, 238, 255, 0.7);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--purple));
  margin: 0 auto;
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Services ────────────────────────────────────────────────── */
#services {
  padding: 4rem 0;
  background: var(--dark2);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(120, 64, 255, 0.06);
  border: 1px solid rgba(120, 64, 255, 0.18);
  border-radius: 12px;
  padding: 2.2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: var(--purple);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(120, 64, 255, 0.2);
}

.card-char {
  display: block;
  margin: 0 auto 1rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
}

/* ── Ils nous font confiance ─────────────────────────────────── */
#confiance {
  padding: 3rem 0 2.5rem;
  position: relative;
  z-index: 5;
  background: var(--dark);
  overflow: hidden;
}

.ticker-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 1rem;
  padding: 2rem 0;
  /* fondu gauche/droite */
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ticker-wrap::before,
.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(120, 64, 255, 0.3);
  box-shadow: 0 0 12px rgba(120, 64, 255, 0.4);
}
.ticker-wrap::before { left: 0; }
.ticker-wrap::after  { right: 0; }

.ticker-track {
  display: flex;
  gap: 4rem;
  width: max-content;
  animation: ticker 28s linear infinite;
}

.ticker-track:hover { animation-play-state: paused; }

.logo-slot {
  width: 130px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-slot img {
  max-width: 110px;
  max-height: 38px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(3) invert(0);
  opacity: 0.75;
  transition: opacity 0.3s, filter 0.3s;
}

.logo-slot:hover img {
  opacity: 1;
  filter: grayscale(0) brightness(1.2) drop-shadow(0 0 10px rgba(160, 100, 255, 0.9));
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── À propos ────────────────────────────────────────────────── */
#apropos {
  padding: 3.5rem 0;
  background: var(--dark2);
}

.apropos-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.apropos-text p {
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.apropos-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.apropos-stats li {
  display: flex;
  flex-direction: column;
}

.apropos-stats strong {
  font-family: var(--font-tech);
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 10px rgba(120, 64, 255, 1),
    0 0 30px rgba(120, 64, 255, 0.8),
    0 0 70px rgba(120, 64, 255, 0.4);
}

.apropos-stats span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 0.2rem;
}

.apropos-visual {
  display: flex;
  justify-content: center;
}

.glow-box {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  text-align: center;
  color: var(--white);
  padding: 2rem 3rem;
  border: 1px solid rgba(120, 64, 255, 0.4);
  border-radius: 16px;
  background: rgba(120, 64, 255, 0.07);
  box-shadow:
    0 0 60px rgba(120, 64, 255, 0.15),
    inset 0 0 40px rgba(120, 64, 255, 0.05);
  text-shadow: 0 0 30px rgba(120, 64, 255, 0.6);
  animation: glowPulse 3s ease-in-out infinite;
  overflow: hidden;
}

.glow-box span {
  text-shadow: 0 0 30px rgba(255, 64, 192, 0.8);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 60px rgba(120,64,255,0.15), inset 0 0 40px rgba(120,64,255,0.05); }
  50%       { box-shadow: 0 0 100px rgba(120,64,255,0.3), inset 0 0 60px rgba(120,64,255,0.1); }
}

/* ── Contact ─────────────────────────────────────────────────── */
#contact {
  padding: 3.5rem 0;
}

.contact-inner {
  max-width: 720px;
}

.contact-sub {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.contact-info {
  margin-bottom: 1.5rem;
}

.contact-mail {
  font-family: var(--font-tech);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--pink);
  text-shadow: 0 0 18px rgba(255, 45, 179, 0.8), 0 0 36px rgba(255, 45, 179, 0.4);
  transition: text-shadow 0.2s, color 0.2s;
}

.contact-mail:hover {
  color: var(--pink);
  text-shadow: 0 0 24px rgba(255, 45, 179, 1), 0 0 50px rgba(255, 45, 179, 0.6);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  background: rgba(120, 64, 255, 0.06);
  border: 1px solid rgba(120, 64, 255, 0.2);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--gray); }

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(120, 64, 255, 0.15);
}

.contact-form textarea { resize: vertical; }

.contact-form .btn-primary { align-self: flex-start; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(120, 64, 255, 0.12);
  padding: 2.5rem 0;
  background: var(--dark2);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hero-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hero-title-wrap .hero-title {
  margin-bottom: 0.4rem;
}

.hero-title-by {
  justify-content: center;
  font-size: 0.6rem !important;
}


.hero-by {
  position: absolute;
  bottom: 3.5rem;
  right: 2rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-tech);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.hero-by img {
  height: 10px;
  width: auto;
  opacity: 0.35;
  filter: brightness(3) grayscale(1);
}

.footer-logo {
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
  text-shadow: 0 0 16px rgba(120,64,255,0.5);
}

footer p {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--pink); }

/* ── Pac-Man module repliable ────────────────────────────────── */
.pacman-module {
  margin-bottom: 3rem;
  display: flex;
  justify-content: center;
}

.pacman-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: transparent;
  border: 2px solid rgba(157, 107, 255, 0.5);
  box-shadow: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.pacman-toggle:hover {
  border-color: var(--violet);
  transform: scale(1.05);
}

.pacman-icon-canvas {
  width: 48px;
  height: 48px;
  display: block;
}

.pacman-toggle-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--violet);
}

#pacman-bar.pacman-game {
  display: none;
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5, 0, 15, 0.5);
  border: 1px solid rgba(120, 64, 255, 0.15);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.pacman-module.open .pacman-toggle { display: none; }
.pacman-module.open #pacman-bar.pacman-game { display: block; }

.pacman-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(157, 107, 255, 0.4);
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.pacman-close:hover {
  background: rgba(157, 107, 255, 0.2);
  border-color: var(--violet);
}

#pacman-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

#pacman-score {
  position: absolute;
  right: 1.2rem;
  top: 0.6rem;
  transform: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: rgba(120, 64, 255, 0.7);
  text-shadow: 0 0 10px rgba(120, 64, 255, 0.6);
  pointer-events: none;
  z-index: 1;
}

#pacman-hint {
  position: absolute;
  left: 1.2rem;
  top: 0.6rem;
  transform: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: rgba(120, 64, 255, 0.35);
  pointer-events: none;
  z-index: 1;
}

/* ── Bot widget ──────────────────────────────────────────────── */
.bot-widget {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

#bot-canvas {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 0 14px var(--purple));
}

.bot-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bot-messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 107, 255, 0.35) transparent;
}

.bot-bubble {
  padding: 0.65rem 1.1rem;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 85%;
  animation: bubblePop 0.25s ease;
}

@keyframes bubblePop {
  from { opacity: 0; transform: scale(0.85) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bot-bubble.bot {
  background: rgba(120, 64, 255, 0.12);
  border: 1px solid rgba(120, 64, 255, 0.4);
  box-shadow: 0 0 10px rgba(120, 64, 255, 0.2);
  color: var(--purple);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  animation: bubblePop 0.25s ease, bubbleTextFade 2s ease 0.3s forwards;
}
@keyframes bubbleTextFade {
  from { color: var(--violet); }
  to   { color: var(--white); }
}

.bot-bubble.user {
  background: rgba(0, 255, 238, 0.08);
  border: 1px solid rgba(0, 255, 238, 0.35);
  box-shadow: 0 0 10px rgba(0, 255, 238, 0.15);
  color: var(--cyan);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bot-bubble.typing-dots {
  letter-spacing: 4px;
  font-size: 1.2rem;
  animation: blink 1s step-start infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.bot-input-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.bot-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120, 64, 255, 0.5);
  border-radius: 30px;
  padding: 0.75rem 1.3rem;
  color: #e8e8f0;
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.bot-input-row input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(120, 64, 255, 0.4);
}
.bot-input-row input::placeholder { color: var(--gray); opacity: 0.8; }

#bot-send {
  background: transparent;
  border: 1.5px solid var(--purple);
  border-radius: 50%;
  width: 44px; height: 44px;
  cursor: pointer;
  color: var(--purple);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
  flex-shrink: 0;
}
#bot-send:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 255, 238, 0.5);
}

@media (max-width: 600px) {
  .bot-widget { flex-direction: column; align-items: center; }
  #bot-canvas { width: 100px; height: 100px; }
}

/* ── Panneau Admin ───────────────────────────────────────────── */
#admin-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  width: 360px;
  background: rgba(5, 0, 20, 0.96);
  border: 1.5px solid rgba(120, 64, 255, 0.7);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(120, 64, 255, 0.35), 0 8px 32px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(120, 64, 255, 0.15);
  border-bottom: 1px solid rgba(120, 64, 255, 0.3);
  gap: 0.5rem;
}
.admin-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--purple);
  text-transform: uppercase;
}
.admin-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.admin-badge {
  background: var(--pink);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  box-shadow: 0 0 12px var(--pink);
}
.admin-header button {
  background: transparent;
  border: 1px solid rgba(120,64,255,0.4);
  color: var(--purple);
  border-radius: 6px;
  width: 26px; height: 26px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.admin-header button:hover { border-color: var(--purple); color: var(--purple); }

.admin-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
}

.admin-log {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 107, 255, 0.35) transparent;
}
.admin-info {
  font-size: 0.78rem;
  color: var(--gray);
  text-align: center;
  padding: 1rem 0;
  font-style: italic;
}
.admin-msg {
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  max-width: 90%;
}
.admin-in {
  background: rgba(120, 64, 255, 0.12);
  border: 1px solid rgba(120, 64, 255, 0.3);
  color: var(--purple);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.admin-out {
  background: rgba(0, 255, 238, 0.07);
  border: 1px solid rgba(0, 255, 238, 0.25);
  color: var(--cyan);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.admin-lead {
  line-height: 1.6;
}

.admin-input-row {
  display: flex;
  gap: 0.5rem;
}
.admin-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120, 64, 255, 0.4);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.82rem;
  outline: none;
}
.admin-input-row input:focus { border-color: #7840ff; box-shadow: 0 0 10px rgba(120,64,255,0.3); }
#admin-send-btn {
  background: rgba(120,64,255,0.2);
  border: 1px solid var(--purple);
  border-radius: 8px;
  color: var(--purple);
  width: 38px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, box-shadow 0.2s;
}
#admin-send-btn:hover { background: rgba(120,64,255,0.4); box-shadow: 0 0 10px rgba(120,64,255,0.5); }

.admin-hint {
  font-size: 0.7rem;
  color: var(--gray);
  text-align: center;
  line-height: 1.4;
}

/* Onglets admin */
.admin-tabs {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.admin-tab {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(120,64,255,0.3);
  border-radius: 7px;
  color: var(--gray);
  padding: 0.4rem;
  font-family: var(--font);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab.active { background: rgba(120,64,255,0.2); border-color: #7840ff; color: #c0a0ff; }
.admin-tab:hover:not(.active) { border-color: rgba(120,64,255,0.5); color: var(--purple); }

.admin-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  overflow: hidden;
}

/* Checkbox sauvegarder */
.admin-save-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--gray);
  cursor: pointer;
  flex-shrink: 0;
}
.admin-save-label input { accent-color: var(--purple); }

/* Tag ML */
.ml-tag {
  display: inline-block;
  background: rgba(0,255,238,0.1);
  border: 1px solid rgba(0,255,238,0.3);
  color: var(--pink);
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.admin-info-ok  { color: var(--cyan); font-size: 0.72rem; padding: 0.3rem 0; font-style: italic; }
.admin-info-err { color: var(--pink); font-size: 0.72rem; padding: 0.3rem 0; font-style: italic; }

/* Onglet Entraînement */
.train-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}
.train-add-form input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120,64,255,0.35);
  border-radius: 7px;
  padding: 0.45rem 0.8rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.78rem;
  outline: none;
}
.train-add-form input:focus { border-color: var(--purple); }
#train-add-btn {
  background: rgba(120,64,255,0.2);
  border: 1px solid var(--purple);
  border-radius: 7px;
  color: var(--purple);
  padding: 0.45rem;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.78rem;
  transition: background 0.2s;
}
#train-add-btn:hover { background: rgba(120,64,255,0.4); }

.train-list { overflow-y: auto; }

.train-entry {
  position: relative;
  background: rgba(120,64,255,0.06);
  border: 1px solid rgba(120,64,255,0.2);
  border-radius: 8px;
  padding: 0.55rem 2.2rem 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
}
.train-q { font-size: 0.75rem; color: var(--purple); margin-bottom: 0.2rem; }
.train-a { font-size: 0.78rem; color: var(--white); }
.train-meta { font-size: 0.65rem; color: var(--gray); margin-top: 0.2rem; }
.train-del {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.75rem; opacity: 0.4; transition: opacity 0.2s;
}
.train-del:hover { opacity: 1; }

/* ── Fade-in animations ──────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.large { grid-column: span 1; grid-template-columns: 1fr; }
  .apropos-inner { grid-template-columns: 1fr; gap: 3rem; }
  .apropos-visual { display: none; }
}

@media (max-width: 680px) {
  #navbar { padding: 1rem 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(5,0,15,0.97); padding: 2rem; gap: 1.5rem; }
  .nav-links.open { display: flex; }
  .burger { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .apropos-stats { gap: 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
