@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0e13;
  --bg-2: #0f141b;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.08);
  --line: rgba(233, 226, 214, 0.09);
  --line-2: rgba(233, 226, 214, 0.18);
  --ink: #f0eadf;
  --soft: #a9a191;
  --soft-2: #7d7668;
  --copper: #ee7a3d;
  --copper-2: #f5b06a;
  --copper-deep: #b4502a;
  --night: #080b10;
  --ok: #46d19a;
  --danger: #ef5f6b;
  --amber: #f0b429;
  --focus: #ee7a3d;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  line-height: 1.5;
  overflow-x: clip;
}
/* Aurora + grille technique en arrière-plan */
body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -2;
  background:
    radial-gradient(44rem 32rem at 84% -8%, rgba(238, 122, 61, 0.20), transparent 62%),
    radial-gradient(38rem 30rem at -12% 18%, rgba(74, 108, 180, 0.16), transparent 60%),
    radial-gradient(32rem 28rem at 58% 112%, rgba(238, 122, 61, 0.10), transparent 65%);
  animation: aurora 26s var(--ease) infinite alternate;
  pointer-events: none;
}
@keyframes aurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2.5%, 2%, 0) scale(1.06); }
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(233, 226, 214, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 226, 214, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(120% 85% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(120% 85% at 50% 0%, #000 25%, transparent 75%);
  pointer-events: none;
}

.canvas { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
main { flex: 1; }
::selection { background: rgba(238, 122, 61, 0.4); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(238, 122, 61, 0.3);
  border: 3px solid var(--bg);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(238, 122, 61, 0.55); }

a { color: var(--copper-2); text-underline-offset: 0.2em; transition: color 0.18s; }
a:hover { color: var(--copper); }
h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
  margin: 0;
}
p { text-wrap: pretty; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--copper);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 0 0 10px 10px;
  z-index: 30;
}
.skip:focus { top: 0; }

/* ---- Barre latérale ---- */
.side {
  background: linear-gradient(180deg, #0d1119 0%, var(--night) 100%);
  border-right: 1px solid var(--line);
  color: var(--ink);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}
.top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 1.2rem;
  background: rgba(11, 14, 19, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 7;
}
.top-brand { display: none; }
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  padding: 0 0.3rem;
}
.brand svg { display: block; filter: drop-shadow(0 0 10px rgba(238, 122, 61, 0.45)); transition: transform 0.5s var(--ease); }
.brand:hover svg { transform: rotate(90deg); }
.nav { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; }
.nav a, .nav button.linkish {
  color: var(--soft);
  text-decoration: none;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.nav a:hover, .nav button.linkish:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  transform: translateX(3px);
}
.nav a.on {
  background: linear-gradient(90deg, rgba(238, 122, 61, 0.2), rgba(238, 122, 61, 0.04));
  color: #fff;
  box-shadow: inset 2.5px 0 0 var(--copper);
}
.nav form { margin: 0; }
.nav .button { color: #fff; text-align: center; margin-top: 0.7rem; }
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 9, 0.6);
  backdrop-filter: blur(3px);
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
body.nav-open .scrim { opacity: 1; pointer-events: auto; }
.menu-toggle {
  display: none;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

/* ---- Boutons ---- */
.button, button.solid, button.quiet, .nav .button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-deep) 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(245, 176, 106, 0.35);
  border-radius: 999px;
  padding: 0.72rem 1.3rem;
  font: 600 1rem/1 "Source Sans 3", sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(238, 122, 61, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), border-color 0.2s, background 0.2s;
}
.button::before, button.solid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.32) 50%, transparent 68%);
  transform: translateX(-120%);
  transition: transform 0.65s var(--ease);
}
.button:hover::before, button.solid:hover::before { transform: translateX(120%); }
.button:hover, button.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -14px rgba(238, 122, 61, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.button:active, button.solid:active { transform: translateY(0) scale(0.98); }
.button.quiet, button.quiet {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.button.quiet:hover, button.quiet:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(238, 122, 61, 0.55);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.7);
}
button.danger {
  background: linear-gradient(135deg, var(--danger), #a83240);
  color: #fff;
  border: 1px solid rgba(255, 150, 150, 0.35);
  border-radius: 999px;
  padding: 0.62rem 1.1rem;
  font: 600 0.95rem/1 "Source Sans 3", sans-serif;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
button.danger:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(239, 95, 107, 0.7); }
button.linkish { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
button.done { background: linear-gradient(135deg, var(--ok), #2a9d6f); border-color: rgba(140, 235, 190, 0.45); }
.rip {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  transform: scale(0);
  animation: rip 0.6s var(--ease) forwards;
  pointer-events: none;
}
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.busy { pointer-events: none; color: transparent !important; position: relative; }
.busy > * { visibility: hidden; }
.busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1em;
  height: 1.1em;
  margin: -0.55em 0 0 -0.55em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Mise en page ---- */
.wrap { width: min(1280px, calc(100% - 2.5rem)); margin: 0 auto; }
.page { padding: 2.4rem 0 4rem; }
.page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page > h1 + p, .page > h1 + .lede { margin-top: 0.6rem; }

/* Révélation au scroll (activée par JS via html.js) */
html.js .rv { opacity: 0; }
html.js .rv.in { animation: rise 0.75s var(--ease) both; animation-delay: var(--rd, 0s); }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ---- Accueil ---- */
.hero { padding: 4rem 0 2.6rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.4rem; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); max-width: 13ch; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--copper-2), var(--copper) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: 1.25rem; color: var(--soft); max-width: 40rem; margin: 1.2rem 0 1.8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.chips li {
  font-size: 0.85rem;
  color: var(--soft);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  backdrop-filter: blur(6px);
}

.map { width: 100%; height: auto; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.4)); }
.map .wire {
  fill: none;
  stroke: url(#wireg);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease) 0.2s forwards;
}
.map .wire-glow {
  fill: none;
  stroke: var(--copper);
  stroke-width: 9;
  stroke-linecap: round;
  opacity: 0.12;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.map .node { fill: #151b24; stroke: var(--line-2); stroke-width: 1.6; }
.map .hub { fill: url(#hubg); }
.map .lbl { fill: var(--soft); }
.map .pulse {
  fill: none;
  stroke: var(--copper);
  stroke-width: 1.4;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: pulse 2.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.65); opacity: 0.85; }
  80% { transform: scale(1.95); opacity: 0; }
  100% { transform: scale(1.95); opacity: 0; }
}
.map .packet { fill: var(--copper-2); filter: drop-shadow(0 0 6px rgba(245, 176, 106, 0.9)); }

.band {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(238, 122, 61, 0.07), rgba(238, 122, 61, 0.015));
}
.band .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.band article { padding: 2.2rem 1.6rem 2.4rem 0; transition: transform 0.3s var(--ease); }
.band article:hover { transform: translateY(-3px); }
.band article + article { padding-left: 1.6rem; box-shadow: inset 1px 0 0 var(--line); }
.band h2 { font-size: 1.65rem; margin-bottom: 0.4rem; }
.band p { margin: 0; color: var(--soft); max-width: 28ch; }

.route { padding: 4.2rem 0 3rem; }
.route h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 18ch; margin-bottom: 2rem; }
.route ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.route li { position: relative; padding: 0 0 1.9rem 3.4rem; max-width: 62ch; }
.route li:last-child { padding-bottom: 0; }
.route li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(238, 122, 61, 0.12);
  border: 1px solid rgba(238, 122, 61, 0.5);
  color: var(--copper-2);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: "Source Sans 3", sans-serif;
}
.route li::after {
  content: "";
  position: absolute;
  left: 1.04rem;
  top: 2.5rem;
  bottom: -0.3rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(238, 122, 61, 0.45), rgba(238, 122, 61, 0.05));
}
.route li:last-child::after { display: none; }
.route strong { display: block; font-size: 1.2rem; }
.route span { color: var(--soft); }

/* ---- Cartes & panneaux ---- */
.sheet, .panel, .card {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.sheet:hover { border-color: var(--line-2); }
.sheet h1 { font-size: clamp(2rem, 4vw, 3rem); }
.sheet h2 { font-size: 1.5rem; margin-bottom: 0.8rem; }
.sheet form.fields + form.fields { border-top: 1px dashed var(--line); margin-top: 1.1rem; padding-top: 1.1rem; }
.muted { color: var(--soft); }
.meta { color: var(--soft); font-size: 0.95rem; margin: 0.5rem 0; }

/* ---- Tableaux ---- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th {
  text-align: left;
  color: var(--soft-2);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--line-2);
}
td { text-align: left; padding: 0.85rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
tbody tr:last-child td { border-bottom: 0; }
tr.pick { background: rgba(238, 122, 61, 0.07); }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--copper-2);
  font-size: 0.92em;
}

/* ---- Statuts ---- */
.st {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--soft);
  white-space: nowrap;
}
.st::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.st-active { color: var(--ok); background: rgba(70, 209, 154, 0.1); border-color: rgba(70, 209, 154, 0.35); }
.st-pending { color: var(--amber); background: rgba(240, 180, 41, 0.1); border-color: rgba(240, 180, 41, 0.35); }
.st-pending::before { animation: blink 1.5s ease-in-out infinite; }
.st-cancelled { color: var(--soft-2); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---- Formules ---- */
.plans { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.plans li {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s var(--ease);
}
.plans li:hover {
  transform: translateY(-5px);
  border-color: rgba(238, 122, 61, 0.45);
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.8), 0 0 40px -18px rgba(238, 122, 61, 0.45);
}
.plans li.pick { border-color: rgba(238, 122, 61, 0.55); background: linear-gradient(165deg, rgba(238, 122, 61, 0.13), rgba(238, 122, 61, 0.04)); }
.badge {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--copper), var(--copper-deep));
  color: #fff;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(238, 122, 61, 0.8);
}
.plans h2 { font-size: 1.9rem; margin: 0; }
.plans p { margin: 0; }
.plans .meta { color: var(--soft); }
.plans form { margin-top: auto; padding-top: 0.8rem; }
.price { font-family: Fraunces, Georgia, serif; font-size: 1.75rem; letter-spacing: -0.03em; margin: 0.2rem 0 0; }
.price small { font-family: "Source Sans 3", sans-serif; font-size: 0.95rem; color: var(--soft); letter-spacing: 0; }

/* ---- Formulaires ---- */
form.stack, .stack { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.fields { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; }
.fields label { width: 11.5rem; }
.fields label.wide { width: 17rem; }
.fields input, .fields select { width: 100%; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; color: var(--soft); }
input, select, textarea {
  font: 1rem/1.35 "Source Sans 3", sans-serif;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  width: 15.5rem;
  max-width: 100%;
  caret-color: var(--copper);
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), background 0.2s;
}
input:hover, select:hover, textarea:hover { border-color: rgba(238, 122, 61, 0.5); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(238, 122, 61, 0.16);
  background: rgba(255, 255, 255, 0.07);
}
input::placeholder, textarea::placeholder { color: var(--soft-2); }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9a191' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
}
select option { background: #141a22; color: var(--ink); }
input[type="checkbox"], input[type="radio"], input[type="file"] { width: auto; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--copper); width: 1.05rem; height: 1.05rem; }
input[type="file"] { color: var(--soft); }
input[type="file"]::file-selector-button {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin-right: 0.8rem;
  font: 600 0.85rem "Source Sans 3", sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
input[type="file"]::file-selector-button:hover { background: rgba(255, 255, 255, 0.14); }
textarea { min-height: 7rem; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; }
.row label { flex: 1 1 13rem; }
.row label input, .row label select { width: 100%; }

.secret { position: relative; display: block; width: 15.5rem; max-width: 100%; }
.secret input { width: 100%; padding-right: 2.4rem; }
.eye {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--soft);
  padding: 0.25rem;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.eye:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }

.error {
  background: rgba(239, 95, 107, 0.1);
  border: 1px solid rgba(239, 95, 107, 0.4);
  color: #ffb4ba;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  animation: shake 0.45s var(--ease);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}
.ok { color: var(--ok); font-weight: 600; }

/* ---- Paiement ---- */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.sheet-head h2 { margin: 0; }
.modal {
  width: min(22rem, calc(100vw - 2rem));
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: #141922;
  color: var(--ink);
  padding: 1.2rem 1.15rem 1rem;
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(4, 6, 10, 0.72); }
.modal h2 { margin: 0 0 0.9rem; font-size: 1.45rem; }
.modal form { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.preview {
  margin: 0;
  width: 15.5rem;
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92rem;
}
.modal-actions { display: flex; gap: 0.55rem; margin: 0.2rem 0 0; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; width: 100%; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: 34rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.choice:hover { transform: translateY(-2px); border-color: var(--line-2); }
.choice:has(input:checked) {
  border-color: var(--copper);
  background: rgba(238, 122, 61, 0.09);
  box-shadow: inset 0 0 0 1px var(--copper), 0 10px 26px -18px rgba(238, 122, 61, 0.6);
}
.choice label { flex-direction: row; align-items: center; gap: 0.65rem; color: var(--ink); }
.choice strong { display: block; font-weight: 600; }
.dial { margin: 0; }
.dial .button { font-size: 0.9rem; padding: 0.55rem 1rem; }
.proof { width: 15.5rem; max-width: 100%; border-radius: 12px; border: 1px solid var(--line-2); margin-top: 0.5rem; }

/* ---- Auth ---- */
.auth { min-height: calc(100vh - 4rem); display: grid; place-items: center; padding: 3rem 1rem; position: relative; }
.auth::before {
  content: "";
  position: absolute;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 122, 61, 0.15), transparent 65%);
  filter: blur(12px);
  pointer-events: none;
}
.panel {
  width: min(23rem, 100%);
  margin: 0;
  padding: 1.9rem 1.6rem 1.5rem;
  box-shadow: var(--shadow), 0 0 70px -30px rgba(238, 122, 61, 0.55);
}
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
}
.panel.stack { align-items: stretch; }
.pem {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(238, 122, 61, 0.28), rgba(238, 122, 61, 0.06));
  border: 1px solid rgba(238, 122, 61, 0.45);
  box-shadow: 0 0 32px -8px rgba(238, 122, 61, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.panel h1 { font-size: 2rem; margin-bottom: 0.15rem; text-align: center; }
.psub { color: var(--soft); text-align: center; margin: 0 0 0.9rem; font-size: 0.98rem; }
.panel label { width: 100%; }
.panel input, .panel select { width: 100%; }
.panel .secret { width: 100%; }
.panel button.solid { width: 100%; margin-top: 0.3rem; }
.panel .meta { text-align: center; }
.panel .error { text-align: left; }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: calc(100vh - 64px); }
.split .pitch { background: var(--night); color: var(--ink); padding: 8vh 8vw; display: flex; flex-direction: column; justify-content: center; }
.split .pitch h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); max-width: 10ch; }
.split .pitch p { color: var(--soft); max-width: 32ch; }
.split .form { padding: 8vh 7vw; display: flex; align-items: center; }
.split form { width: 16rem; max-width: 100%; }

/* ---- Code & pied ---- */
pre {
  background: #090c11;
  border: 1px solid var(--line);
  color: #e8e2d4;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.45);
}
pre code { color: inherit; }

.foot {
  padding: 1.8rem 6vw 2.2rem;
  color: var(--soft-2);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.foot a { color: var(--soft); }

/* ---- Accessibilité mouvement ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  html.js .rv { opacity: 1; }
  .map .wire { stroke-dashoffset: 0; }
  .map .packet, .map .pulse { display: none; }
}

/* ---- Mobile ---- */
@media (max-width: 860px) {
  body { grid-template-columns: 1fr; }
  .top { padding: 0.7rem 1rem; }
  .top .top-brand { display: flex; color: var(--ink); font-size: 1.25rem; padding: 0; }
  .menu-toggle { display: inline-flex; }
  .side {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
    width: min(82vw, 268px);
    transform: translateX(-105%);
    transition: transform 0.32s var(--ease);
    box-shadow: 30px 0 80px -30px rgba(0, 0, 0, 0.8);
  }
  .side.open { transform: none; }
  .hero, .band .wrap, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 2.6rem; }
  .band article, .band article + article { padding: 1.3rem 0; box-shadow: none; border-top: 1px solid var(--line); }
  .plans { grid-template-columns: 1fr 1fr; }
  .sheet { overflow-x: auto; }
  table { width: max-content; min-width: 100%; }
}
@media (max-width: 560px) {
  .plans { grid-template-columns: 1fr; }
  .fields label, .fields label.wide { width: 100%; }
}

/* ---- État en ligne & sites ---- */
.live {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--soft-2);
  vertical-align: middle;
}
.live.on {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(70, 209, 154, 0.9);
  animation: livepulse 2s ease-in-out infinite;
}
.live.off { background: var(--danger); opacity: 0.7; }
@keyframes livepulse { 50% { box-shadow: 0 0 4px rgba(70, 209, 154, 0.3); } }

.st-open { color: var(--ok); background: rgba(70, 209, 154, 0.1); border-color: rgba(70, 209, 154, 0.35); }
.st-renew { color: var(--amber); background: rgba(240, 180, 41, 0.1); border-color: rgba(240, 180, 41, 0.35); }
.st-renew::before { animation: blink 1.5s ease-in-out infinite; }
.st-clos { color: var(--danger); background: rgba(239, 95, 107, 0.1); border-color: rgba(239, 95, 107, 0.35); }

button.mini, .button.mini, .mini {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font: 600 0.82rem/1 "Source Sans 3", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
button.mini:hover, .mini:hover {
  background: rgba(238, 122, 61, 0.15);
  border-color: rgba(238, 122, 61, 0.55);
  transform: translateY(-1px);
}
.mini.quiet { background: transparent; color: var(--soft); }

/* ---- Statistiques du compte ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
}
.stat {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.stat:hover { transform: translateY(-3px); border-color: rgba(238, 122, 61, 0.4); }
.stat strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat span { color: var(--soft); font-size: 0.9rem; }

/* ---- Ports publics ---- */
code.pub {
  color: var(--copper-2);
  background: rgba(238, 122, 61, 0.1);
  border: 1px solid rgba(238, 122, 61, 0.3);
  border-radius: 8px;
  padding: 0.15rem 0.45rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.mini-pre {
  font-size: 0.8rem;
  padding: 0.7rem 0.8rem;
  margin: 0.5rem 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.datalist-note { color: var(--soft-2); }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
}

input.search { width: 16rem; margin: 0.2rem 0 0.8rem; }

/* ---- Barre supérieure : utilisateur + horloge ---- */
.who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  min-width: 0;
}
.who-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
  box-shadow: 0 0 10px rgba(70, 209, 154, 0.8);
  animation: livepulse 2s ease-in-out infinite;
}
.who-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.who-id strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-id small { color: var(--soft-2); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--soft-2);
  font-size: 0.8rem;
  white-space: nowrap;
}
.clock strong {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1rem;
  color: var(--copper-2);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .who-id small, .clock span { display: none; }
}

/* ---- Admin : comptabilité et comptes ---- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 0.6rem;
}
h3.sub { font-size: 1rem; color: var(--copper-2); margin: 0.4rem 0 0.6rem; }
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1rem;
  width: 100%;
}
td.actions { white-space: nowrap; }
.act-row { display: flex; align-items: center; gap: 0.35rem; flex-wrap: nowrap; }
.nowrap { white-space: nowrap; }
.inline-form { display: inline-flex; align-items: center; gap: 0.3rem; margin: 0.1rem 0.15rem 0.1rem 0; }
.inline-form input[type="number"] {
  width: 4.5rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.mini.danger {
  border-color: rgba(239, 95, 107, 0.45);
  color: var(--danger);
  background: transparent;
}
.mini.danger:hover { background: rgba(239, 95, 107, 0.14); border-color: var(--danger); }

@media (max-width: 900px) {
  .duo { grid-template-columns: 1fr; }
}

/* ---- Ping en cours ---- */
.mini.pinging {
  pointer-events: none;
  color: var(--copper-2);
  border-color: rgba(238, 122, 61, 0.6);
  animation: pingglow 0.9s ease-in-out infinite;
}
@keyframes pingglow {
  50% { box-shadow: 0 0 0 5px rgba(238, 122, 61, 0.16); background: rgba(238, 122, 61, 0.12); }
}

/* ---- Correspondances LAN du site ---- */
.lanmaps { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }

/* ---- Modale large + grille de champs ---- */
.modal-lg { width: min(28rem, calc(100vw - 2rem)); }
.grid2 label { width: 100%; }
.grid2 label input, .grid2 label select { width: 100%; }
label.check {
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  width: auto;
}
label.check input[type="checkbox"] { width: auto; margin: 0; }
.modal input, .modal select { width: 100%; box-sizing: border-box; }
.modal input[type="checkbox"] { width: auto; }
.modal label { width: 100%; }
.modal .preview { width: 100%; box-sizing: border-box; }

/* ---- Bouton discret « Modifier » (aperçu admin) ---- */
.plan-admin {
  display: block;
  text-align: center;
  margin-top: 0.8rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font: 600 0.9rem/1 "Source Sans 3", sans-serif;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.plan-admin:hover {
  border-color: rgba(238, 122, 61, 0.55);
  color: var(--copper-2);
  background: rgba(238, 122, 61, 0.08);
}

/* ---- Finition responsive ---- */
.who-id strong, .who-id small { max-width: 14rem; }

@media (max-width: 860px) {
  .page { padding-top: 1.4rem; }
}
@media (max-width: 560px) {
  .row label { flex: 1 1 100%; }
  .row .solid { width: 100%; }
  .sheet { padding: 1.1rem; }
  .grid2 { grid-template-columns: 1fr; }
  .who-id strong { max-width: 7rem; }
  input.search { width: 100%; max-width: 22rem; }
  .plans li { padding: 1.1rem 0.9rem 0.9rem; }
}
