:root {
  --bg: #000000;
  --panel: #080808;
  --panel-soft: rgba(0, 0, 0, 0.9);
  --line: #707070;
  --line-dim: #333333;
  --white: #ffffff;
  --gray: #b9b9b9;
  --green: #00ff66;
  --acid: #ffff00;
  --red: #ff2020;
  --cyan: #00ccff;
  --visited: #aa55ff;
  --serif: "Times New Roman", Times, serif;
  --mono: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: #000;
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 74% 12%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1px),
    radial-gradient(circle at 47% 81%, rgba(0, 255, 102, 0.35) 0 1px, transparent 1px),
    radial-gradient(circle at 92% 67%, rgba(255, 255, 0, 0.45) 0 1px, transparent 1px),
    #000;
  background-size: 220px 180px, 340px 240px, 260px 260px, 420px 300px, auto;
  font-family: var(--serif);
  font-size: 16px;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  content: "";
  opacity: 0.08;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 2px,
    #fff 2px 3px
  );
}

/* Liens */

a {
  color: var(--cyan);
  text-decoration: underline;
}

a:visited {
  color: var(--visited);
}

/* Titres / textes */

h1,
h2,
h3 {
  margin: 0.35em 0;
  font-family: var(--serif);
}

h1 {
  color: var(--acid);
  font-size: 52px;
  text-align: center;
  text-shadow: 3px 3px 0 #660000;
}

h2 {
  color: var(--green);
  font-size: 30px;
  margin-bottom: 18px;
}

h3 {
  color: var(--acid);
  font-size: 21px;
  margin-bottom: 10px;
}

p {
  margin: 0.7em 0;
  color: var(--gray);
  line-height: 1.55;
  font-size: 18px;
}

/* Structure générale */

.site-shell {
  width: min(1100px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 0 28px;
}

.site-shell::before {
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  color: var(--red);
  background: #111;
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  content: none;
}

/* Header */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 14px 0 18px;
  padding: 20px 28px;
  border: 2px ridge var(--line);
  background: #000;
  text-align: left;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--acid);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  min-width: 0;
  flex: 0 0 auto;
}

.brand::before,
.brand::after {
  display: none;
  content: none;
}

.header-logo {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex: 0 0 auto;
  opacity: 0.95;
  filter: contrast(1.25);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  line-height: 1.9;
  flex-wrap: wrap;
}

.main-nav a {
  display: inline-block;
  margin: 0;
  color: var(--cyan);
  background: transparent;
  font-family: var(--serif);
  font-size: 22px;
  text-decoration: underline;
}

.main-nav a.active {
  color: var(--acid);
}

/* Layout principal */

.main-grid {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Compte à rebours principal */

.main-countdown-panel {
  margin: 18px 0;
  padding: 28px;
  border: 3px ridge var(--green);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 255, 102, 0.08) 0 2px,
      transparent 2px 4px
    ),
    radial-gradient(circle at center, rgba(255, 32, 32, 0.12), transparent 60%),
    #020802;
  font-family: var(--mono);
  text-align: center;
  box-shadow:
    inset 0 0 24px rgba(0, 255, 102, 0.18),
    0 0 18px rgba(255, 32, 32, 0.16);
}

.main-countdown-inner {
  padding: 26px 18px;
  border: 1px inset var(--green);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.06) 0 4px,
      transparent 4px 8px
    ),
    rgba(0, 0, 0, 0.82);
}

.main-countdown-label {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: uglyBlink 1200ms steps(2) infinite;
}

.main-countdown-date {
  display: block;
  margin: 6px 0 10px;
  color: var(--acid);
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 #660000;
}

.main-countdown-value {
  display: block;
  color: var(--green);
  font-size: 34px;
  line-height: 1.35;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.75);
}

.main-countdown-note {
  margin: 16px auto 0;
  color: var(--gray);
  font-family: var(--mono);
  font-size: 16px;
}

.hero-console,
.status-panel,
.wide-section {
  margin: 18px 0;
  padding: 24px;
  border: 2px ridge var(--line);
  background: var(--panel-soft);
}

.hero-console {
  min-height: 0;
  text-align: center;
}

.wide-section {
  text-align: left;
}

/* Bloc principal KALYCE */

.kalyce-dossier {
  position: relative;
  overflow: hidden;
}

.kalyce-dossier > *:not(.kalyce-mark) {
  position: relative;
  z-index: 1;
}

.kalyce-mark {
  position: absolute;
  right: -160px;
  bottom: -240px;
  z-index: 0;
  width: min(820px, 92vw);
  opacity: 0.18;
  mix-blend-mode: screen;
  filter: contrast(1.35);
  pointer-events: none;
}

.hero-subtitle {
  color: var(--white);
  font-size: 28px;
}

.cold-copy {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 22px;
}

/* Marquee */

marquee {
  display: block;
  margin-bottom: 18px;
  padding: 6px 0;
  color: var(--red);
  background: #070000;
  border-top: 1px dashed var(--red);
  border-bottom: 1px dashed var(--red);
  font-family: var(--mono);
  font-size: 15px;
}

/* Notes */

.conspiracy-note {
  width: min(860px, 100%);
  margin: 20px auto 0;
  padding: 18px;
  border: 1px dashed var(--red);
  background: #080000;
  text-align: left;
}

.conspiracy-note p {
  color: var(--white);
}

.highlight {
  color: var(--acid);
  background: #240000;
  padding: 0 4px;
}

/* Variantes de sections */

.theory-section {
  background:
    linear-gradient(90deg, rgba(255, 255, 0, 0.04), transparent 18%),
    rgba(0, 0, 0, 0.92);
}

.experiment-section {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 255, 102, 0.04) 0 6px,
      transparent 6px 12px
    ),
    rgba(0, 0, 0, 0.92);
}

.protocol-section {
  background:
    linear-gradient(180deg, rgba(255, 0, 0, 0.06), transparent 35%),
    rgba(0, 0, 0, 0.92);
}

/* Grille de cartes */

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

.protocol-grid article {
  min-height: 0;
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  background: #050505;
}

.protocol-grid article p:last-child {
  margin-bottom: 0;
}

/* Expériences réussies */

.experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 22px;
}

.experience-card {
  padding: 22px;
  border: 1px dashed var(--line);
  background: #050505;
}

.experience-title {
  margin-bottom: 18px;
  color: var(--acid);
  font-size: 34px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.experience-figure {
  width: min(680px, 100%);
  margin: 0 auto 18px;
  text-align: center;
}

.experience-figure img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: 580px;
  margin: 0 auto;
  object-fit: cover;
  border: 2px ridge var(--line);
  background: #000;
  filter: contrast(1.15) saturate(0.9);
}

.experience-figure figcaption {
  width: 100%;
  margin: 8px auto 0;
  color: var(--gray);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.experience-card p {
  width: min(780px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

/* Section recrutement KALYCE */

.recruitment-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 34px 28px;
  border: 3px ridge var(--red);
  background: #080000;
  box-shadow: none;
  animation: blockBlink 520ms steps(2) infinite;
}

.recruitment-section::before {
  display: block;
  margin: 0 auto 14px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  content: "transmission prioritaire // recrutement actif";
  animation: uglyBlink 420ms steps(2) infinite;
}

.recruitment-section h2 {
  color: var(--acid);
  font-size: 38px;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #660000;
}

.recruitment-section p {
  width: min(820px, 100%);
  margin: 18px auto 0;
  color: var(--white);
  font-family: var(--mono);
  font-size: 21px;
  line-height: 1.65;
  text-align: center;
  text-shadow: none;
}

.recruitment-section p::first-line {
  color: var(--acid);
}

.recruitment-section .cta-row {
  justify-content: center;
  margin-top: 32px;
}

.recruitment-section .button {
  min-width: 260px;
  font-size: 17px;
  text-transform: uppercase;
}

.recruitment-section .button.primary {
  border-color: var(--red);
  background: var(--acid);
  box-shadow: none;
}

.recruitment-section .button.primary:hover {
  background: var(--red);
  color: var(--white);
}

/* Pop-ups recrutement */

.recruitment-popups {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.recruitment-popup {
  position: fixed;
  width: min(340px, calc(100vw - 28px));
  border: 2px outset #999;
  background: #c0c0c0;
  color: #000;
  font-family: var(--mono);
  pointer-events: auto;
  animation: popupArrival 180ms steps(2), popupShake 900ms steps(2) infinite;
}

.recruitment-popup:nth-child(odd) {
  border-color: var(--red);
}

.recruitment-popup:nth-child(even) {
  border-color: var(--acid);
}

.recruitment-popup-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  color: var(--white);
  background: #660000;
  font-size: 13px;
  text-transform: uppercase;
}

.recruitment-popup-titlebar span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recruitment-popup-close {
  width: 24px;
  height: 22px;
  padding: 0;
  border: 2px outset #ddd;
  color: #000;
  background: #c0c0c0;
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.recruitment-popup-close:hover {
  border-style: inset;
  background: var(--red);
  color: var(--white);
}

.recruitment-popup-body {
  padding: 14px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.05) 0 2px,
      transparent 2px 4px
    ),
    #c0c0c0;
}

.recruitment-popup-body strong {
  display: block;
  margin-bottom: 8px;
  color: #660000;
  font-size: 16px;
  text-transform: uppercase;
}

.recruitment-popup-body p {
  margin: 0;
  color: #000;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
}

.recruitment-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.recruitment-popup-actions a,
.recruitment-popup-actions button {
  display: inline-block;
  flex: 1;
  padding: 7px 8px;
  border: 2px outset #999;
  color: #000;
  background: var(--acid);
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.recruitment-popup-actions a:visited {
  color: #000;
}

.recruitment-popup-actions a:hover,
.recruitment-popup-actions button:hover {
  border-style: inset;
  background: var(--red);
  color: var(--white);
}

.recruitment-popup.exiting {
  animation: popupExit 180ms steps(2) forwards;
}

/* Boutons */

.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px auto 0;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 2px outset #999;
  color: #000;
  background: #c0c0c0;
  font-family: var(--mono);
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  min-width: 220px;
}

.button.primary {
  background: var(--acid);
}

.button:hover {
  border-style: inset;
  background: var(--green);
  color: #000;
}

.button:visited {
  color: #000;
}

/* Effets */

.glitch-text {
  animation: uglyBlink 5s steps(2) infinite;
}

.glitch-text::before,
.glitch-text::after {
  display: none;
}

.blink {
  animation: uglyBlink 700ms steps(2) infinite;
}

@keyframes uglyBlink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0.35;
  }
}

@keyframes blockBlink {
  0%,
  49% {
    opacity: 1;
    background: #080000;
    border-color: var(--red);
  }

  50%,
  100% {
    opacity: 0.45;
    background: #250000;
    border-color: var(--acid);
  }
}

@keyframes popupArrival {
  0% {
    opacity: 0;
    transform: scale(0.92) translate(8px, -8px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(0);
  }
}

@keyframes popupShake {
  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(1px, -1px);
  }

  50% {
    transform: translate(-1px, 1px);
  }

  75% {
    transform: translate(1px, 1px);
  }
}

@keyframes popupExit {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
}

@keyframes pageError {
  0% {
    transform: translate(0);
    filter: invert(0);
  }

  50% {
    transform: translate(4px, -2px);
    filter: invert(1);
  }

  100% {
    transform: translate(0);
    filter: invert(0);
  }
}

/* Responsive */

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    font-size: 36px;
  }

  .header-logo {
    width: 78px;
    height: 78px;
  }

  .main-nav a {
    font-size: 20px;
  }

  .protocol-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  p {
    font-size: 17px;
  }

  .site-shell {
    width: calc(100% - 10px);
    padding: 8px 0 20px;
  }

  .site-shell::before {
    font-size: 11px;
  }

  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .brand {
    justify-content: flex-start;
    font-size: 32px;
    gap: 12px;
  }

  .header-logo {
    width: 58px;
    height: 58px;
  }

  .main-nav {
    width: 100%;
    display: block;
    text-align: left;
  }

  .main-nav a {
    display: block;
    margin: 5px 0;
    font-size: 20px;
  }

  .main-countdown-panel {
    margin: 14px 0;
    padding: 18px;
  }

  .main-countdown-inner {
    padding: 18px 12px;
  }

  .main-countdown-label {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .main-countdown-date {
    font-size: 38px;
  }

  .main-countdown-value {
    font-size: 20px;
  }

  .main-countdown-note {
    font-size: 13px;
  }

  .hero-console,
  .status-panel,
  .wide-section {
    margin: 14px 0;
    padding: 18px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .cold-copy {
    font-size: 16px;
  }

  marquee {
    font-size: 12px;
  }

  .conspiracy-note {
    margin: 16px auto 0;
    padding: 16px;
  }

  .protocol-grid {
    display: block;
  }

  .protocol-grid article {
    margin: 10px 0;
    padding: 16px;
  }

  .kalyce-mark {
    right: -190px;
    bottom: -140px;
    width: 620px;
    opacity: 0.11;
  }

  .experience-card {
    padding: 16px;
  }

  .experience-title {
    font-size: 25px;
  }

  .experience-figure {
    width: 100%;
  }

  .experience-figure img {
    height: 240px;
  }

  .experience-figure figcaption {
    font-size: 12px;
  }

  .cta-row {
    display: block;
  }

  .button {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 8px 0;
  }

  .recruitment-section {
    padding: 24px 16px;
  }

  .recruitment-section h2 {
    font-size: 28px;
  }

  .recruitment-section p {
    font-size: 17px;
    line-height: 1.55;
  }

  .recruitment-section .button {
    min-width: 0;
  }

  .recruitment-popup {
    width: calc(100vw - 18px);
    left: 9px !important;
    right: auto !important;
  }
}
