/* levo.cool — direction « Abysse » : bleu marine du logo LevoKMH, cyan du « T », glace, blanc cassé.
   Layout : colonne centrale 1240px, en-tête flottant en verre, sections qui respirent, éditeur en coque d'application. */
:root {
  --abyss: #0B0B0D;
  --deep: #0F0F12;
  --hull: #151518;
  --hull-2: #1C1C21;
  --marine: #1E1E24;
  --marine-2: #222229;
  --cyan: #59D8F8;
  --cyan-2: #2FB8E0;
  --ice: #B7F1FC;
  --bone: #EEF0EF;
  --text-2: #B5B5BE;
  --mist: #8D8D97;
  --line: rgba(255,255,255,0.072);
  --line-2: rgba(255,255,255,0.13);
  --glass: rgba(24,24,28,0.55);
  --live: #FF4D6D;
  --live-ink: #FF9AAD;
  --ok: #3BD671;
  --warn: #FFC266;
  --ink-on-cyan: #0A0A0C;

  --f-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 22px;
  --r-xl: 30px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; } /* les défilements doux sont demandés en JS : un changement de page revient en haut d'un coup */
body {
  margin: 0;
  background: var(--deep);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--cyan); color: var(--ink-on-cyan); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.13) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.101); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
.display { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; }
.h-xl { font-family: var(--f-display); font-weight: 800; font-size: clamp(42px, 7vw, 96px); letter-spacing: -0.045em; line-height: 0.95; }
.h-l { font-family: var(--f-display); font-weight: 700; font-size: clamp(32px, 4.2vw, 56px); letter-spacing: -0.035em; line-height: 1.02; }
.h-m { font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.03em; line-height: 1.1; }
.h-s { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--mist); }
.mono { font-family: var(--f-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--cyan); font-weight: 600; font-size: 15px; }
.kicker::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.grad-text {
  background: linear-gradient(100deg, var(--bone) 10%, var(--ice) 45%, var(--cyan) 70%, var(--bone) 95%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 8s ease-in-out infinite;
}
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- buttons ---------- */
.btn {
  --bg: transparent; --fg: var(--bone); --bd: var(--line-2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-m);
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-weight: 650; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .35s var(--ease-out), background .25s, border-color .25s, box-shadow .35s;
  overflow: hidden; isolation: isolate;
}
.btn:hover { border-color: rgba(255,255,255,0.23); background: rgba(255,255,255,0.036); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --bg: var(--cyan); --fg: var(--ink-on-cyan); --bd: transparent; font-weight: 750; box-shadow: 0 10px 30px -10px rgba(89,216,248,.65), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-primary:hover { --bg: #74E0FA; border-color: transparent; background: var(--bg); box-shadow: 0 16px 40px -10px rgba(89,216,248,.8), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-primary::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-light { --bg: var(--bone); --fg: var(--ink-on-cyan); --bd: transparent; font-weight: 750; }
.btn-light:hover { background: #fff; border-color: transparent; }
.btn-ghost { --bd: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--bone); background: rgba(255,255,255,0.043); border-color: transparent; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; }
.btn-block { width: 100%; }

/* ---------- chips, pills, inputs ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(24,24,28,.5);
  color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .25s var(--ease-out);
}
.chip:hover { color: var(--bone); border-color: var(--line-2); }
.chip[aria-pressed="true"], .chip.on { background: var(--bone); color: var(--ink-on-cyan); border-color: transparent; }
.chip svg { width: 16px; height: 16px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.pill-cyan { background: rgba(89,216,248,.14); color: var(--ice); }
.pill-live { background: rgba(255,77,109,.16); color: var(--live-ink); }
.pill-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255,77,109,.7); animation: livePulse 1.6s infinite; }
.pill-ok { background: rgba(59,214,113,.14); color: #8EEBB0; }
.pill-solid { background: var(--cyan); color: var(--ink-on-cyan); }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,109,.7); } 70% { box-shadow: 0 0 0 8px rgba(255,77,109,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,109,0); } }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 14px; font-weight: 650; color: var(--bone); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-m);
  background: rgba(10,10,12,.7); border: 1px solid var(--line-2); color: var(--bone);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(89,216,248,.15); }
.input::placeholder { color: #8C8C96; }
textarea.input { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238FB0C4' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.hint { font-size: 13px; color: var(--mist); }

/* switch */
.switch { position: relative; display: inline-flex; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.101); transition: background .25s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bone); transition: transform .35s var(--ease-spring); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--cyan); }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* range */
input[type=range].range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
input[type=range].range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--cyan) var(--p, 50%), rgba(255,255,255,0.101) var(--p, 50%)); }
input[type=range].range::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.101); }
input[type=range].range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--cyan); }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 4px solid var(--cyan); box-shadow: 0 2px 10px rgba(0,0,0,.4); transition: transform .2s var(--ease-spring); }
input[type=range].range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--cyan); }
input[type=range].range:active::-webkit-slider-thumb { transform: scale(1.2); }

/* segmented */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px; background: rgba(10,10,12,.7); border: 1px solid var(--line); }
.seg button { position: relative; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--mist); font-weight: 650; font-size: 14px; cursor: pointer; transition: color .2s, background .25s; }
.seg button:hover { color: var(--bone); }
.seg button[aria-pressed="true"] { background: var(--hull-2); color: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- surfaces ---------- */
.panel { background: var(--hull); border: 1px solid var(--line); border-radius: var(--r-l); }
.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border: 1px solid var(--line-2); }
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(89,216,248,.13), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.spot::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(300px circle at var(--mx, -999px) var(--my, -999px), rgba(89,216,248,.6), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- icons ---------- */
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- toast ---------- */
#toasts { position: fixed; z-index: 200; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 14px;
  background: rgba(24,24,28,.92); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); font-size: 14.5px; font-weight: 550; pointer-events: auto;
  animation: toastIn .5s var(--ease-spring);
}
.toast .t-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(89,216,248,.16); color: var(--cyan); flex: none; }
.toast .t-ic svg { width: 16px; height: 16px; }
.toast.out { animation: toastOut .35s var(--ease-out) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(6,6,8,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn .3s ease; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--r-xl); background: var(--hull); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -20px rgba(0,0,0,.8); animation: modalIn .5s var(--ease-spring); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-body { padding: 18px 22px 22px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }

/* ---------- route transition ---------- */
#view { position: relative; }
.view-enter { animation: viewEnter .7s var(--ease-out) both; }
@keyframes viewEnter { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
#route-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 300; background: linear-gradient(90deg, var(--cyan), var(--ice)); box-shadow: 0 0 12px var(--cyan); transition: width .5s var(--ease-out), opacity .4s; }

/* reveal on scroll : visible au repos, la transition n'ajoute qu'un léger glissement */
.rv { transition: transform .9s var(--ease-out), opacity .9s var(--ease-out); }
.rv.pre { transform: translateY(26px); opacity: .55; }

/* cursor glow (desktop) */
#cursor-glow { position: fixed; z-index: 1; left: 0; top: 0; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(89,216,248,.07), transparent); transition: opacity .4s; will-change: transform; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.logo .dot { color: var(--cyan); }
.logo-mark { width: 34px; height: 34px; flex: none; transition: transform .6s var(--ease-spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rv.pre { transform: none; opacity: 1; }
}

/* menu du compte */
.acct { position: relative; }
.head-me { cursor: pointer; color: var(--bone); transition: border-color .2s, box-shadow .2s; }
.head-me:hover, .head-me[aria-expanded="true"] { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(89,216,248,.15); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; width: 250px; padding: 6px; border-radius: 16px; background: var(--hull); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); animation: modalIn .3s var(--ease-out); }
.acct-id { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-id b { display: block; font-size: 15px; }
.acct-id small { font-family: var(--f-mono); color: var(--mist); font-size: 12.5px; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 14.5px; font-weight: 550; cursor: pointer; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: rgba(255,255,255,0.043); color: var(--bone); }
.acct-menu svg { width: 18px; height: 18px; }
.acct-menu .danger-item { color: var(--live-ink); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 12px; }
.acct-menu .danger-item:hover { background: rgba(255,77,109,.1); color: var(--live-ink); }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* logos de marque (Font Awesome) : pleins, pas de contour */
.ico.ico-fa { stroke: none; fill: currentColor; overflow: visible; }
.ico.ico-fa path { stroke: none; }
.ico.ico-solid { transform: scale(.86); }

/* sélecteur de langue */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(24,24,28,.55); color: var(--bone); font-weight: 700; font-size: 13.5px; letter-spacing: .02em; cursor: pointer; transition: border-color .2s, background .2s; }
.lang-btn svg { width: 17px; height: 17px; color: var(--cyan); }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: rgba(89,216,248,.55); background: rgba(32,32,38,.7); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 90; min-width: 190px; padding: 6px; border-radius: 16px; background: var(--hull); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); animation: modalIn .3s var(--ease-out); }
.lang.up .lang-menu { top: auto; bottom: calc(100% + 8px); }
.lang-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 14.5px; font-weight: 600; cursor: pointer; text-align: left; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(255,255,255,0.043); color: var(--bone); }
.lang-menu button[aria-checked="true"] { color: var(--bone); background: rgba(89,216,248,.12); }
.lang-menu .lc { font-family: var(--f-mono); font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.058); color: var(--ice); }
.lang-menu button[aria-checked="true"] .lc { background: var(--cyan); color: var(--ink-on-cyan); }
.lang-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 4px 2px; }
.lang-list .chip { min-height: 36px; }
.foot-right { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.auth-top-r { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1180px) { .head-cta > .lang { display: none; } }
@media (max-width: 640px) { .app-top .lang-btn span { display: none; } .app-top .lang-btn { padding: 0 10px; } }

/* badge vérifié (sceau certifié) */
.pf-verif { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 2px 6px rgba(22,115,196,.45)); }
.pf-verif.seal-sm { width: 17px; height: 17px; vertical-align: -3px; margin-left: 2px; }
.pf-verif.seal-xl { width: 92px; height: 92px; filter: drop-shadow(0 10px 30px rgba(43,166,236,.55)); animation: sealFloat 5s ease-in-out infinite; }
.pf-verif.bdg-seal { width: 30px; height: 30px; }
@keyframes sealFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(4deg); } }
