/* Polices hébergées en local (aucune requête tierce, conformité RGPD/CNIL) */
@font-face { font-family: "Space Grotesk"; src: url("../assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #0c0713;
  --bg-soft: #140b20;
  --surface: #180f28;
  --surface-2: #1f1433;
  --border: #35234c;
  --border-soft: #271a3a;
  --text: #f3ecfa;
  --muted: #b7a3cc;
  --muted-2: #7c6893;

  --purple-100: #f1e0fb;
  --purple-300: #d9a6ef;
  --purple-400: #c07de3;
  --purple-500: #ab55cf;
  --purple-600: #9138b8;
  --purple-700: #712a92;
  --purple-glow: rgba(171, 85, 207, 0.45);

  --signal: var(--purple-500);
  --signal-2: #7a5cff;
  --signal-dim: var(--purple-700);
  --amber: #f5a623;
  --danger: #ff5c7a;
  --success: #35d399;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 24px 70px -24px rgba(90, 20, 130, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Écran d'administration */
.auth-page { display:grid; place-items:center; min-height:100vh; padding:28px; }
.auth-shell { width:min(100%,460px); }
.auth-brand { display:flex; align-items:center; gap:12px; color:var(--text); text-decoration:none; margin:0 0 28px 8px; font:700 17px var(--font-display); }
.auth-brand img { width:42px; height:42px; filter:drop-shadow(0 6px 16px var(--purple-glow)); }
.auth-brand small { display:block; color:var(--muted); font:500 11px var(--font-mono); letter-spacing:.08em; text-transform:uppercase; margin-top:2px; }
.auth-card { background:linear-gradient(145deg,rgba(31,20,51,.97),rgba(18,10,31,.98)); border:1px solid var(--border); box-shadow:var(--shadow); border-radius:var(--radius-lg); padding:36px; }
.auth-kicker { color:var(--purple-300); font:600 11px var(--font-mono); letter-spacing:.14em; text-transform:uppercase; margin:0 0 12px; }
.auth-card h1 { margin:0; font:700 clamp(28px,5vw,38px)/1.1 var(--font-display); }
.auth-copy { color:var(--muted); margin:12px 0 28px; }
.auth-form { display:grid; gap:9px; }
.auth-form label { color:var(--purple-100); font-size:13px; font-weight:600; margin-top:5px; }
.auth-form input { width:100%; background:rgba(7,4,13,.55); border:1px solid var(--border); color:var(--text); border-radius:9px; height:46px; padding:0 13px; font:15px var(--font-body); }
.auth-form input:focus { outline:none; border-color:var(--purple-400); box-shadow:0 0 0 3px rgba(171,85,207,.15); }
.auth-form .btn { margin-top:14px; width:100%; height:48px; }
.auth-error { background:rgba(255,92,122,.12); color:#ffc2cf; border:1px solid rgba(255,92,122,.35); border-radius:8px; padding:10px 12px; font-size:13px; }
.auth-foot { border-top:1px solid var(--border-soft); color:var(--muted-2); font-size:12px; margin:25px 0 0; padding-top:18px; }
.auth-divider { display:flex; align-items:center; gap:12px; margin:0 0 16px; color:var(--muted-2); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; }
.auth-divider::before, .auth-divider::after { content:""; flex:1; height:1px; background:var(--border-soft); }

/* ---------- Fond anime : aurores + losanges flottants ---------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.bg-fx::before,
.bg-fx::after {
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 22s ease-in-out infinite alternate;
}

.bg-fx::before {
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, var(--purple-600), transparent 70%);
}

.bg-fx::after {
  bottom: -25%;
  right: -15%;
  background: radial-gradient(circle, var(--signal-2), transparent 70%);
  animation-delay: -11s;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(6%, 8%) scale(1.15);
  }
}

.diamonds {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.diamonds i {
  position: absolute;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-600));
  transform: rotate(45deg);
  opacity: 0.18;
  border-radius: 3px;
  animation: float-diamond linear infinite;
}

@keyframes float-diamond {
  from {
    transform: translateY(0) rotate(45deg);
  }
  to {
    transform: translateY(-120vh) rotate(225deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

a {
  color: var(--purple-300);
}

::selection {
  background: var(--purple-700);
  color: #fff;
}

/* ---------- Reveal on load ---------- */

.reveal {
  animation: rise-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.14s; }
.reveal-3 { animation-delay: 0.22s; }
.reveal-4 { animation-delay: 0.3s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 8px;
  max-width: 1040px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(12, 7, 19, 0.85), rgba(12, 7, 19, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 14px var(--purple-glow));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.08);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--text), var(--purple-300));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text span {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  display: block;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  background: none;
  -webkit-text-fill-color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

#pwa-install-btn {
  margin-left: 8px;
  white-space: nowrap;
}

.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.hero {
  padding: 48px 0 20px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--purple-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  width: fit-content;
  padding: 6px 12px 6px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(53, 211, 153, 0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(53, 211, 153, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(53, 211, 153, 0.08); }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.08;
}

h1 .grad {
  background: linear-gradient(90deg, var(--purple-300), var(--signal-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 580px;
  margin: 0;
}

/* ---------- Bandeau confiance ---------- */

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.trust-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 7px 12px;
  border-radius: 20px;
  transition: transform 0.2s, border-color 0.2s;
}

.trust-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--purple-300);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-chip:hover {
  transform: translateY(-2px);
  border-color: var(--purple-700);
  color: var(--text);
}

/* ---------- Grid principale ---------- */

.grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
  margin-top: 30px;
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  box-shadow: var(--shadow);
  transition: border-color 0.3s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(140deg, rgba(171, 85, 207, 0.35), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  margin: 0 0 4px;
}

.card-sub {
  color: var(--muted-2);
  font-size: 12.5px;
  margin: 0 0 18px;
}

/* ---------- Tabs contenu texte / fichier ---------- */

.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
  width: fit-content;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--purple-600), var(--signal-2));
  color: #fff;
  box-shadow: 0 6px 16px -6px var(--purple-glow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: rise-in 0.35s ease both;
}

textarea#secret-text {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 14px;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea#secret-text:focus,
input:focus,
select:focus,
.tab-btn:focus-visible {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(171, 85, 207, 0.18);
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 34px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.dropzone:hover {
  transform: translateY(-1px);
  border-color: var(--purple-600);
}

.dropzone.drag {
  border-color: var(--purple-400);
  background: rgba(171, 85, 207, 0.08);
}

.dropzone p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dropzone strong {
  color: var(--text);
}

.dropzone .dz-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  opacity: 0.85;
}

.dropzone .dz-icon svg {
  width: 26px;
  height: 26px;
  color: var(--purple-300);
}

.file-chip {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 13px;
  animation: rise-in 0.25s ease both;
}

.file-chip.show {
  display: flex;
}

.file-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.file-chip .name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip .size {
  color: var(--muted-2);
  font-size: 11.5px;
}

.file-chip .remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
}

.file-chip .remove svg {
  width: 14px;
  height: 14px;
}

/* ---------- Options form ---------- */

.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.field select,
.field input[type="text"],
.field input[type="password"],
.field input[type="number"] {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field.full {
  grid-column: 1 / -1;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--bg-soft);
  overflow: hidden;
}

.mini-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.mini-checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--signal);
  cursor: pointer;
}

.stepper button {
  background: var(--surface-2);
  border: none;
  color: var(--text);
  width: 34px;
  height: 38px;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--font-mono);
  transition: background 0.15s;
}

.stepper button:hover {
  background: var(--purple-700);
}

.stepper input {
  border: none !important;
  text-align: center;
  background: transparent !important;
  font-family: var(--font-mono) !important;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}

.toggle-row:first-of-type {
  border-top: none;
  margin-top: 4px;
}

.toggle-row .label {
  font-size: 13px;
}

.toggle-row .desc {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .track {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.switch .track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.switch input:checked + .track {
  background: linear-gradient(135deg, var(--purple-600), var(--signal-2));
  border-color: var(--purple-500);
}

.switch input:checked + .track::before {
  transform: translateX(18px);
  background: #fff;
}

#password-field {
  display: none;
  margin-top: 10px;
}

#password-field.show {
  display: block;
  animation: rise-in 0.25s ease both;
}

.pw-strength {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.pw-strength.show {
  display: flex;
}

.pw-strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 4px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.pw-strength-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.25s ease, background 0.25s ease;
}

.pw-strength-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted-2);
  white-space: nowrap;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s, filter 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-500), var(--signal-2));
  color: #fff;
  width: 100%;
  margin-top: 20px;
  box-shadow: 0 14px 34px -12px var(--purple-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-soft);
}

.btn-ghost:hover {
  border-color: var(--purple-600);
}

.btn-danger {
  background: rgba(255, 92, 122, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 92, 122, 0.3);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.btn:disabled:active { transform: none; }

.error-box {
  display: none;
  background: rgba(255, 92, 122, 0.1);
  border: 1px solid rgba(255, 92, 122, 0.3);
  color: #ffb3c2;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  margin-top: 12px;
}

.error-box.show {
  display: block;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- Panneau "sceau" (signature element) ---------- */

.seal-panel {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
}

.seal {
  width: 110px;
  height: 110px;
  position: relative;
  margin-bottom: 20px;
}

.seal svg {
  width: 100%;
  height: 100%;
  transition: filter 0.4s;
}

.seal .ring {
  stroke: var(--border);
  fill: none;
  stroke-width: 3;
}

.seal .ring-progress {
  stroke: var(--purple-500);
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.seal .lock-body {
  fill: var(--surface-2);
  stroke: var(--muted-2);
  stroke-width: 2;
  transition: fill 0.3s, stroke 0.3s;
}

.seal .lock-shackle {
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 4;
  stroke-linecap: round;
  transform-origin: 55px 42px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.3s;
}

.seal.sealed .lock-shackle {
  transform: none;
  stroke: var(--purple-400);
}

.seal.sealed .lock-body {
  fill: rgba(171, 85, 207, 0.14);
  stroke: var(--purple-400);
}

.seal.sealed .ring-progress {
  stroke-dashoffset: 0;
}

.seal.sealed svg {
  filter: drop-shadow(0 0 14px var(--purple-glow));
}

.seal:not(.sealed) .lock-shackle {
  transform: translateY(-6px) rotate(-18deg);
}

.seal-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.seal-panel h3 {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 10px 0 6px;
}

.seal-panel p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  max-width: 220px;
}

.seal-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
  text-align: left;
}

.seal-fact {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.seal-fact .k {
  color: var(--muted-2);
}

.seal-fact .v {
  font-family: var(--font-mono);
  color: var(--text);
}

/* ---------- Resultat ---------- */

.result {
  display: none;
  margin-top: 20px;
}

.result.show {
  display: block;
  animation: rise 0.35s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.link-row input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--purple-700);
  color: var(--purple-300);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 11px 12px;
  border-radius: 9px;
}

.result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.qr-box {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  width: fit-content;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: rise-in 0.3s ease both;
}

.qr-box.show {
  display: flex;
}

.qr-box canvas {
  border-radius: 6px;
}

.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(53, 211, 153, 0.4);
}

.toast.error {
  border-color: rgba(255, 92, 122, 0.4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--muted);
}

.badge.amber {
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.35);
}

.badge.danger {
  color: var(--danger);
  border-color: rgba(255, 92, 122, 0.35);
}

.badge.success {
  color: var(--success);
  border-color: rgba(53, 211, 153, 0.35);
}

.badge.purple {
  color: var(--purple-300);
  border-color: var(--purple-700);
}

/* ---------- Features / comment ca marche ---------- */

.features {
  margin-top: 56px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.section-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 22px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 780px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-700);
  box-shadow: 0 20px 40px -22px var(--purple-glow);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(171, 85, 207, 0.22), rgba(122, 92, 255, 0.14));
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--purple-300);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h4 {
  font-family: var(--font-display);
  font-size: 14.5px;
  margin: 0 0 6px;
}

.feature-card p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ---------- Page view.html ---------- */

.view-center {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.view-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: rise-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.view-card .seal {
  margin: 0 auto 22px;
}

.view-card h2 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 8px;
}

.reveal-image-preview {
  display: block;
  max-width: 100%;
  max-height: 320px;
  width: auto;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.view-card .meta-line {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}

/* ----- Squelette de chargement (page de lecture d'un lien) ----- */
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin: 0 auto 10px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--surface-2) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-w60 { width: 60%; height: 16px; }
.skeleton-w90 { width: 90%; }
.skeleton-w40 { width: 40%; margin-bottom: 20px; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-line { animation: none; }
}

.reveal-content {
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px;
  overflow-y: auto;
  margin-top: 16px;
  animation: rise-in 0.3s ease both;
}

.countdown-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  color: var(--amber);
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  margin-top: 14px;
}

.live-countdown {
  font-family: var(--font-mono);
  color: var(--purple-300);
}

.view-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Dashboard ---------- */

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 16px;
}

.dash-table th {
  text-align: left;
  color: var(--muted-2);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.dash-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  color: var(--text);
}

.dash-table tr:hover td {
  background: var(--bg-soft);
}


.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .opt-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--purple-700);
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--text), var(--purple-300));
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-card .lbl {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.chart-card {
  margin-top: 16px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 140px;
  padding: 10px 6px 0;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
}

.bar-col .bar {
  width: 100%;
  max-width: 46px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--purple-400), var(--purple-700));
  height: 4%;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px -10px var(--purple-glow);
}

.bar-col .bar-lbl {
  font-size: 11px;
  color: var(--muted-2);
  text-align: center;
}

.bar-col .bar-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

.gate {
  max-width: 380px;
  margin: 80px auto;
  text-align: center;
}

.gate input {
  width: 100%;
  margin-top: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 12px;
  border-radius: 9px;
  font-family: var(--font-mono);
  text-align: center;
}

/* ---------- Mes liens (historique local) ---------- */

.history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.history-card:hover {
  border-color: var(--purple-700);
}

.history-card .h-main {
  min-width: 0;
}

.history-card .h-slug {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--purple-300);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.history-card .h-meta {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 3px;
}

.history-card .h-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.empty-hist {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted-2);
  font-size: 13px;
}

.footer-note {
  text-align: center;
  color: var(--muted-2);
  font-size: 11.5px;
  margin-top: 48px;
}

.footer-note .footer-brand {
  color: var(--muted);
}

footer.site-footer {
  max-width: 1040px;
  margin: 60px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted-2);
  font-size: 12px;
  text-decoration: none;
}

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

/* ============================================================
   ENHANCEMENTS — finitions "pro" & animations avancées
   ============================================================ */

/* ----- Barre de progression de scroll ----- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--purple-500), var(--signal-2), var(--purple-300));
  z-index: 200;
  box-shadow: 0 0 12px var(--purple-glow);
  will-change: transform;
}

/* ----- Reveal au scroll ----- */
.on-scroll {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.on-scroll.in-view {
  opacity: 1;
  transform: none;
}

/* ----- Halo lumineux du hero ----- */
.hero-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(171, 85, 207, 0.14), transparent 60%);
  border-radius: var(--radius-lg);
  z-index: -1;
}

/* ----- Ripple sur les boutons ----- */
.btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.35);
  animation: ripple-out 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-out {
  to { transform: scale(2.4); opacity: 0; }
}

/* ----- Titre en dégradé animé ----- */
h1 .grad {
  background: linear-gradient(90deg, var(--purple-300), var(--signal-2), var(--purple-400), var(--purple-300));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: grad-shift 8s ease infinite;
}
@keyframes grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ----- Soulignement animé de la navigation ----- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple-400), var(--signal-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* ----- Cartes : lueur d'accompagnement au survol ----- */
.card { transition: border-color 0.3s, box-shadow 0.35s, transform 0.35s; }
.grid .card:hover {
  border-color: var(--purple-700);
  box-shadow: 0 30px 70px -30px var(--purple-glow), var(--shadow);
}
.feature-card, .stat-card, .trust-chip {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ----- Barre d'outils sous le textarea ----- */
.text-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.char-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ----- Mini-boutons outils ----- */
.mini-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.mini-tool:hover {
  color: var(--text);
  border-color: var(--purple-600);
  background: var(--surface);
  transform: translateY(-1px);
}
.mini-tool svg { width: 14px; height: 14px; }
.mini-tool.icon-only { padding: 8px; }
.mini-tool.icon-only svg { width: 16px; height: 16px; }

/* ----- Rangée input mot de passe + outils ----- */
.pw-input-row { display: flex; gap: 8px; align-items: stretch; }
.pw-input-row input { flex: 1; }

/* ----- Astuce sous le résultat ----- */
.result-hint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 10px 12px;
  margin: 12px 0 0;
}
.result-hint strong { color: var(--purple-300); }
.result-hint code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 0 5px;
  border-radius: 4px;
  color: var(--purple-300);
}


/* ----- Barre d'outils "Mes liens" ----- */
.hist-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.hist-search {
  flex: 1;
  min-width: 180px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hist-search:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(171, 85, 207, 0.18);
}
.hist-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  margin-left: auto;
}

/* ----- Boutons de la page reveal (copier / télécharger contenu) ----- */
.reveal-tools {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ----- Page confidentialité : lisibilité ----- */
.prose-block h2 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 28px 0 8px;
  scroll-margin-top: 90px;
}
.prose-block h2:first-of-type { margin-top: 12px; }
.prose-block p, .prose-block li { color: var(--muted); font-size: 14px; line-height: 1.65; }
.prose-block ul { padding-left: 20px; }
.prose-block li { margin-bottom: 6px; }
.prose-block code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--purple-300);
}
.privacy-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 8px;
}
.privacy-toc a {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted);
  text-decoration: none;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 6px 11px;
  border-radius: 20px;
  transition: color 0.15s, border-color 0.15s;
}
.privacy-toc a:hover { color: var(--text); border-color: var(--purple-600); }
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.security-item {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
}
.security-item .si-k {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--purple-300);
}
.security-item .si-v { font-size: 13px; color: var(--text); margin-top: 4px; }
.updated-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 5px 11px;
  border-radius: 20px;
  margin-top: 10px;
}

/* ----- Page Outils ----- */
.tabs-wrap { flex-wrap: wrap; width: auto; }
.tool-block {
  border-top: 1px solid var(--border-soft);
  padding: 20px 0;
}
.tool-block:first-of-type { border-top: none; padding-top: 8px; }
.tool-title {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0 0 4px;
}
.tool-desc { font-size: 12.5px; color: var(--muted-2); margin: 0 0 12px; }
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}
.tool-range {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 200px;
}
.tool-range b { color: var(--purple-300); font-family: var(--font-mono); min-width: 26px; }
.tool-range input[type="range"] { flex: 1; accent-color: var(--purple-500); }
.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.field-inline select, .field-inline input {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-body);
}
.field-inline input { width: 60px; }
.chip-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.chk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.chk input { accent-color: var(--purple-500); width: 15px; height: 15px; }
.out-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.tool-out {
  flex: 1;
  min-width: 200px;
  background: var(--bg-soft);
  border: 1px solid var(--purple-700);
  color: var(--purple-300);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 11px 12px;
  border-radius: 9px;
  word-break: break-all;
}
.tool-area {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px;
  line-height: 1.55;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-area:focus { outline: none; border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(171,85,207,.18); }
.btn-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.entropy { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.entropy b { color: var(--purple-300); font-family: var(--font-mono); }
#qr-out { display: none; }

/* ============================================================
   MENU HAMBURGER + RESPONSIVE MOBILE
   ============================================================ */

/* Le bouton hamburger (case à cocher) est masqué sur desktop */
.hamburger { display: none; }
.nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }

@media (max-width: 720px) {
  .topbar { position: sticky; }

  .hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    border: 1px solid var(--border-soft);
    background: var(--surface-2);
    border-radius: 11px;
    cursor: pointer;
    z-index: 60;
    flex-shrink: 0;
  }
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), opacity 0.2s;
  }
  .nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* La navigation devient un panneau déroulant */
  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    background: linear-gradient(180deg, var(--surface), var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
  }
  .nav-toggle:checked ~ .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-links a { padding: 13px 14px; font-size: 15px; border-radius: 9px; }
  .nav-links a::after { display: none; }
}

/* --- Ajustements généraux petits écrans --- */
@media (max-width: 600px) {
  .wrap { padding: 0 16px 60px; }
  .topbar { padding: 16px 16px 8px; }
  .hero { padding: 32px 0 12px; }
  .card { padding: 20px; }

  /* Boutons : tailles cohérentes, plus rien d'énorme */
  /* Boutons compacts qui s'enroulent — plus jamais pleine largeur (sauf le CTA principal .btn-primary) */
  .btn-sm { padding: 8px 12px; font-size: 12.5px; }
  .mini-tool { padding: 7px 10px; font-size: 11.5px; }
  .result-actions,
  .btn-line,
  .view-actions,
  .hist-toolbar { flex-wrap: wrap; gap: 8px; }

  /* Champs + boutons associés : le champ prend toute la largeur, les boutons restent petits */
  .out-row,
  .link-row,
  .pw-input-row { flex-wrap: wrap; }
  .out-row .tool-out,
  .link-row input,
  .pw-input-row input { flex: 1 1 100%; min-width: 0; }
  .hist-search { flex: 1 1 100%; }
  .hist-count { margin-left: 0; width: 100%; }

  .history-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .history-card .h-actions { flex-wrap: wrap; }

  .trust-row { gap: 8px; }
  .tabs-wrap { width: 100%; }
  .tabs-wrap .tab-btn { flex: 1 1 auto; text-align: center; }

  .stat-cards { grid-template-columns: repeat(2, 1fr) !important; }
  h1 { font-size: clamp(26px, 8vw, 34px); }
}

/* ----- Hero avec illustration humaine (page d'accueil) ----- */
.hero-split { display: flex; align-items: center; gap: 36px; }
.hero-copy { flex: 1 1 auto; min-width: 0; }
.hero-illus { flex: 0 0 330px; max-width: 330px; }
.hero-illus svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 46px var(--purple-glow));
  animation: float-illus 6s ease-in-out infinite;
}
@keyframes float-illus {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (max-width: 900px) {
  .hero-split { flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
  .hero-illus { flex: none; width: 66%; max-width: 300px; align-self: center; }
}
@media (max-width: 600px) {
  .hero-illus { width: 82%; max-width: 260px; }
}
