:root {
  --bg: #101a26;
  --bg-soft: #16222f;
  --panel: #16212e;
  --panel-2: #121b26;
  --core: #00d9ff;
  --line: rgba(255, 255, 255, 0.09);
  --text: #e7edf5;
  --text-dim: #97a4b5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Rajdhani", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,217,255,.10), transparent), 
                     radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0,217,255,.05), transparent);
  background-attachment: fixed;
  color: var(--text);
}

.kris-mono { font-family: "Share Tech Mono", monospace; }

/* Angular HUD panel corners, used throughout instead of border-radius */
.hud-clip {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.hud-clip-sm {
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.theme-transition { transition: background-color .5s ease, border-color .5s ease, color .5s ease, box-shadow .5s ease; }

/* Faint blueprint grid used as ambient texture */
.grid-field {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
}

/* Scanline sweep across HUD panels */
@keyframes scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.scanline {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.scanline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(0,217,255,.06), transparent);
  animation: scan 6s linear infinite;
}

/* Arc-reactor style pulsing core, used as the site's signature element */
@keyframes reactor-pulse {
  0%, 100% { box-shadow: 0 0 12px 2px var(--core-glow, rgba(0,217,255,.55)); }
  50%      { box-shadow: 0 0 26px 6px var(--core-glow, rgba(0,217,255,.85)); }
}
.reactor-core { animation: reactor-pulse 2.6s ease-in-out infinite; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
.spin-slow { animation: spin-slow 14s linear infinite; }

/* Boot-in animation for HUD panels / cards */
@keyframes boot-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.boot-in { animation: boot-in .5s ease both; }

/* Typing caret used in terminal blocks */
@keyframes caret-blink { 50% { opacity: 0; } }
.caret::after {
  content: "_";
  animation: caret-blink 1s step-end infinite;
  color: var(--core);
}

/* Nav link underline sweep */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--core);
  transition: width .25s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }

/* Module selector cards */
.module-card { position: relative; overflow: hidden; }
.module-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.04) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.module-card:hover::before { transform: translateX(120%); }

/* Focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--core);
  outline-offset: 2px;
}

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform .2s ease;
}
details[open] summary::before { transform: rotate(90deg); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reactor-core, .spin-slow, .scanline::after, .boot-in, .caret::after { animation: none !important; }
}

/* Form fields */
.hud-input {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: "Share Tech Mono", monospace;
}
.hud-input:focus { border-color: var(--core); }
.hud-input::placeholder { color: var(--text-dim); }

/* Native <select> renders a white popup by default in most browsers unless
   the element itself AND its <option>s get an explicit dark background. */
select.hud-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--panel-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d9ff' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 2.5rem;
}
select.hud-input option {
  background-color: var(--panel-2);
  color: var(--text);
}

/* Audience radio "cards" in the contact form (particulier / pro / association) */
.sr-only:focus-visible + * , label:has(.sr-only:focus-visible) {
  outline: 2px solid var(--core);
  outline-offset: 2px;
}

.section-eyebrow {
  font-family: "Share Tech Mono", monospace;
  letter-spacing: .18em;
  font-size: .7rem;
  color: var(--core);
}


/* Rotating dashed ring(s) around the centered header logo */
.logo-halo { position: relative; display: inline-flex; }
.logo-halo::before, .logo-halo::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 9999px;
  border: 1px dashed rgba(0,217,255,.45);
  animation: spin-slow 18s linear infinite;
}
.logo-halo::after {
  inset: -20px;
  border: 1px solid rgba(0,217,255,.18);
  animation-duration: 30s;
  animation-direction: reverse;
}

/* Small blinking LED strip, like status lights on a server rack */
.led-strip { display: inline-flex; gap: 6px; align-items: center; }
.led-strip span {
  width: 6px; height: 6px; border-radius: 9999px;
  background: var(--core);
  opacity: .25;
  animation: led-blink 2.4s ease-in-out infinite;
}
.led-strip span:nth-child(1) { animation-delay: 0s; }
.led-strip span:nth-child(2) { animation-delay: .3s; }
.led-strip span:nth-child(3) { animation-delay: .6s; }
.led-strip span:nth-child(4) { animation-delay: .9s; }
.led-strip span:nth-child(5) { animation-delay: 1.2s; }
@keyframes led-blink {
  0%, 60%, 100% { opacity: .2; box-shadow: none; }
  30% { opacity: 1; box-shadow: 0 0 6px 1px var(--core); }
}

/* Ambient floating data particles behind the hero */
.particle-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particle-field span {
  position: absolute;
  bottom: -10px;
  width: 3px; height: 3px;
  background: var(--core);
  border-radius: 9999px;
  opacity: .5;
  animation: particle-rise linear infinite;
}
@keyframes particle-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .3; }
  100% { transform: translateY(-420px) translateX(20px); opacity: 0; }
}

/* Thin animated data readout bar, like a server activity meter */
.data-bar { position: relative; height: 3px; overflow: hidden; background: rgba(255,255,255,.06); }
.data-bar::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -30%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--core), transparent);
  animation: data-sweep 2.8s ease-in-out infinite;
}
@keyframes data-sweep {
  0%   { left: -30%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-halo::before, .logo-halo::after, .led-strip span, .particle-field span, .data-bar::after { animation: none !important; }
}

/* Tariff tables — dedicated "Tarifs" section with tab switcher */
.price-table-wrap { overflow-x: auto; }
.price-table-wrap.hidden { display: none; }

.price-table-pro { width: 100%; border-collapse: collapse; }
.price-table-pro thead th {
  text-align: left;
  padding: 16px 22px;
  font-family: "Share Tech Mono", monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  white-space: nowrap;
}
.price-table-pro tbody td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
  color: var(--text);
}
.price-table-pro tbody tr:last-child td { border-bottom: none; }
.price-table-pro tbody tr { transition: background-color .15s ease; }
.price-table-pro tbody tr:hover { background: rgba(0,217,255,.05); }
.price-table-pro td:last-child {
  font-family: "Share Tech Mono", monospace;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}
.price-table-pro thead th:last-child {
  text-align: right;
}
.price-table-pro td:first-child { width: 1%; white-space: nowrap; }

.profile-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 9999px;
  font-family: "Share Tech Mono", monospace;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.profile-chip[data-profile="pro"] {
  color: var(--core);
  border-color: rgba(0,217,255,.4);
  background: rgba(0,217,255,.08);
}

.pricing-tab-btn {
  padding: 10px 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-family: "Share Tech Mono", monospace;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
  margin-bottom: -1px;
}
.pricing-tab-btn:hover { color: var(--text); }
.pricing-tab-btn.is-active {
  color: var(--text);
  background: rgba(255,255,255,.04);
}

/* Sous ~640px : le tableau classique (colonnes qui se compressent) devient
   illisible sur téléphone. On bascule chaque ligne en carte empilée
   "étiquette : valeur", en s'appuyant sur data-label pour l'étiquette. */
@media (max-width: 640px) {
  .price-table-wrap { overflow-x: visible; }

  .price-table-pro thead { display: none; }

  .price-table-pro,
  .price-table-pro tbody,
  .price-table-pro tr,
  .price-table-pro td {
    display: block;
    width: 100%;
  }

  .price-table-pro tr {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
  }
  .price-table-pro tbody tr:last-child {
    border-bottom: none;
  }

  .price-table-pro td {
    padding: 6px 0;
    border-bottom: none;
    white-space: normal;
    width: auto;
  }

  /* Le badge Profil passe en premier, pleine largeur, sans étiquette */
  .price-table-pro td:first-child {
    order: -1;
    padding-bottom: 10px;
  }

  /* Prestation et Tarif : étiquette à gauche (via data-label), valeur à droite */
  .price-table-pro td[data-label] {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    text-align: left;
  }
  .price-table-pro td[data-label]::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-family: "Share Tech Mono", monospace;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
  }
  .price-table-pro td:last-child {
    text-align: right;
    white-space: normal;
  }
}

/* Carte "Nos sites" — indicateur Ctrl + molette pour zoomer */
#map { position: relative; }
.map-zoom-hint {
  position: absolute;
  inset: 0;
  z-index: 1000; /* au-dessus des tuiles/contrôles Leaflet */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(2, 6, 23, .6);
  color: #fff;
  font-family: "Share Tech Mono", monospace;
  font-size: .85rem;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.map-zoom-hint.is-visible { opacity: 1; }
