/* ───────────────────────────────────────────
   Outils LSL — design monochrome
   ─────────────────────────────────────────── */
:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --surface-2: #111111;
    --surface-3: #171717;
    --border: #1f1f1f;
    --border-strong: #2e2e2e;
    --text: #fafafa;
    --text-2: #d4d4d4;
    --muted: #8a8a8a;
    --faint: #525252;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar: 252px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 40px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 14px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
a:not([class]) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
a:not([class]):hover { text-decoration-color: var(--text); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface-2); }
img { display: block; max-width: 100%; }
::selection { background: var(--white); color: #000; }

.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; color: var(--text); }
.block { display: block; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Structure ────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar);
    display: flex; flex-direction: column;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-text span { font-size: 12px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section {
    margin: 16px 10px 6px;
    font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    color: var(--faint);
}
.nav-section:first-child { margin-top: 0; }
.nav-link {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-weight: 500;
    transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); background: var(--surface-3); }
.nav-link.is-active::before {
    content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px;
    width: 2px; border-radius: 2px; background: var(--white);
}
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.version { padding: 4px 10px; font: 11px var(--mono); color: var(--faint); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar); display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    height: 56px;
    display: flex; align-items: center; gap: 14px;
    padding: 0 32px;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs strong { color: var(--text); font-weight: 500; }
.crumbs-sep { color: var(--faint); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 28px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: 999px;
    font-size: 12px; color: var(--text-2);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }

.content { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 36px 32px 120px; display: flex; flex-direction: column; gap: 20px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 8px; }
.page-head h1 { font-size: 28px; line-height: 1.15; }
.page-sub { margin-top: 6px; color: var(--muted); }
.page-actions { display: flex; gap: 10px; }

.footer {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 18px 32px; border-top: 1px solid var(--border);
    font-size: 12px; color: var(--faint);
}

/* ── Cartes ───────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-pad { padding: 24px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.card-head h3, .card-title { font-size: 15px; }
.card-head p { margin-top: 3px; }
.card-title { margin-bottom: 16px; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.split-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }

/* Héros du tableau de bord */
.hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    padding: 40px;
    background:
        radial-gradient(ellipse 60% 120% at 100% 0%, rgba(255, 255, 255, .07), transparent 60%),
        linear-gradient(180deg, var(--surface-2), var(--surface));
}
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 85% 30%, #000 0%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse at 85% 30%, #000 0%, transparent 65%);
    opacity: .55;
}
.hero-text { position: relative; z-index: 1; max-width: 620px; }
.hero h2 { font-size: 30px; line-height: 1.15; margin: 12px 0 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-logo { position: relative; z-index: 1; width: 148px; height: 148px; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat {
    display: flex; flex-direction: column; gap: 6px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; color: var(--muted); font-weight: 500; }
.stats-inline { padding: 0 24px 24px; }
.stats-inline .stat { background: var(--surface-2); }

/* Outils */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tool { display: flex; flex-direction: column; gap: 10px; padding: 22px; transition: border-color .15s, transform .15s, background .15s; }
.tool:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.tool-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tool-icon {
    display: grid; place-items: center; width: 40px; height: 40px;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--surface-3);
}
.tool h3 { font-size: 16px; }
.tool p { flex: 1; font-size: 13px; }
.tool-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 500; font-size: 13px; }
.tool:hover .tool-link .icon { transform: translateX(3px); }
.tool-link .icon { transition: transform .15s; }

/* ── Boutons ──────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
    font: 500 13px var(--font);
    cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { background: var(--surface-3); border-color: #3d3d3d; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, .input:focus-visible, .select:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.btn-primary { background: var(--white); color: #000; border-color: var(--white); }
.btn-primary:hover { background: #e5e5e5; border-color: #e5e5e5; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; gap: 6px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: transparent; color: var(--muted);
    cursor: pointer; transition: color .15s, background .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }

/* ── Formulaires ──────────────────────────── */
.input, .select {
    width: 100%; height: 38px; padding: 0 12px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font: 400 13px var(--font);
    transition: border-color .15s, background .15s;
}
.input.mono { font-family: var(--mono); }
.input::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: #3d3d3d; }
.input:focus, .select:focus { outline: none; border-color: var(--white); background: #050505; }
.select {
    appearance: none; -webkit-appearance: none;
    padding-right: 34px; cursor: pointer;
    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='%238a8a8a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.input-sm, .select-sm { height: 32px; font-size: 12.5px; }
.input[data-dirty] { border-color: #5a5a5a; }
.price-input { width: 110px; font-variant-numeric: tabular-nums; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--faint); }
.field-inline { flex-direction: row; align-items: center; gap: 10px; }
.field-inline .field-label { white-space: nowrap; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.inline-form { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; white-space: nowrap; }
input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px; margin: 0;
    border: 1px solid #4a4a4a; border-radius: 4px;
    background: var(--bg); cursor: pointer;
    display: inline-grid; place-content: center;
    transition: background .1s, border-color .1s;
}
input[type="checkbox"]::after {
    content: ''; width: 9px; height: 5px;
    border: solid #000; border-width: 0 0 2px 2px;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform .1s;
}
input[type="checkbox"]:checked { background: var(--white); border-color: var(--white); }
input[type="checkbox"]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input[type="checkbox"]:indeterminate { background: var(--white); border-color: var(--white); }
input[type="checkbox"]:indeterminate::after { width: 8px; height: 0; border-width: 0 0 2px 0; transform: none; }

.search { position: relative; display: block; min-width: 220px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 34px; }

/* ── Badges, codes, alertes ───────────────── */
.badge {
    display: inline-flex; align-items: center;
    height: 22px; padding: 0 9px;
    border: 1px solid var(--border-strong); border-radius: 999px;
    font-size: 11.5px; font-weight: 500; color: var(--text-2);
    white-space: nowrap;
}
.badge-solid { background: var(--white); color: #000; border-color: var(--white); }
.code {
    display: inline-block; padding: 2px 8px;
    border: 1px solid var(--border-strong); border-radius: 6px;
    background: var(--surface-2);
    font: 500 12px var(--mono); letter-spacing: .02em;
}

.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2); font-size: 13px;
}
.alert .icon { margin-top: 2px; color: var(--muted); }
.alert-warning { border-color: #4a4a4a; background: var(--surface-2); }
.alert-warning .icon { color: var(--text); }
.alert-error { border-color: var(--white); background: var(--surface-2); color: var(--text); }
.alert-error .icon { color: var(--white); }
.card .alert { margin-top: 18px; }
.card-pad > .alert:first-child { margin-top: 0; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--muted); }
.empty .icon { color: var(--faint); }

/* ── Tableaux ─────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table-scroll { max-height: 64vh; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    position: sticky; top: 0; z-index: 1;
    padding: 11px 22px; text-align: left;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--faint);
    white-space: nowrap;
}
.table td { padding: 12px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table tr.is-selected { background: var(--surface-3); }
.table-form td { padding-top: 9px; padding-bottom: 9px; }
.table-form .select-sm { min-width: 190px; }
.table-form .vehicle-sound { min-width: 210px; }
.table-form td .block { margin-top: 2px; }
.col-check { width: 44px; padding-right: 0 !important; }
.col-price { width: 140px; }
.table-foot { padding: 12px 22px; border-top: 1px solid var(--border); }
tr[hidden] { display: none; }

/* Correspondance des marques */
.mapping { display: flex; flex-direction: column; }
.mapping-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.1fr) 110px;
    align-items: center; gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
}
.mapping-row:last-child { border-bottom: none; }
.mapping-origin { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mapping-arrow { color: var(--faint); display: grid; place-items: center; }
.mapping-row.is-mapped .mapping-arrow { color: var(--text); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.toolbar .select { width: auto; min-width: 160px; }
.toolbar-group { display: flex; gap: 8px; margin-left: auto; }

/* Débadgeage */
.tex-files { display: flex; flex-direction: column; }
.tex-file { padding: 16px 22px 20px; border-bottom: 1px solid var(--border); }
.tex-file:last-child { border-bottom: none; }
.tex-file-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text-2); font-size: 13px; }
.tex-file-head .icon { color: var(--faint); }
.tex-file-all { margin-left: auto; }
.tex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.tex {
    position: relative;
    display: flex; flex-direction: column; gap: 6px;
    padding: 8px 8px 10px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-2);
    cursor: pointer; user-select: none;
    transition: border-color .12s, background .12s;
}
.tex:hover { border-color: var(--border-strong); }
.tex:has(input:checked) { border-color: var(--white); background: var(--surface-3); }
.tex input[type="checkbox"] { position: absolute; top: 14px; left: 14px; z-index: 1; box-shadow: 0 0 0 3px rgba(0, 0, 0, .55); }
.tex-thumb {
    display: grid; place-items: center;
    aspect-ratio: 1; border-radius: 6px; overflow: hidden;
    /* damier : rend la transparence visible */
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, #262626 25%, transparent 25%), linear-gradient(-45deg, #262626 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #262626 75%), linear-gradient(-45deg, transparent 75%, #262626 75%);
    background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.tex-thumb img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.tex:has(input:checked) .tex-thumb img { opacity: .35; filter: grayscale(1); }
.tex-thumb > *, .tex-thumb::after { grid-area: 1 / 1; }
.tex:has(input:checked) .tex-thumb::after {
    content: 'Effacé'; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px; background: var(--white); color: #000;
}
.tex-noprev { font: 500 11px var(--mono); color: var(--faint); }
.tex-name { font-size: 11.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tex-meta { font-size: 11px; color: var(--faint); }
.tex-flag {
    position: absolute; top: 12px; right: 12px;
    padding: 2px 7px; border-radius: 999px;
    background: rgba(0, 0, 0, .75); border: 1px solid var(--border-strong);
    font-size: 10px; font-weight: 500; color: var(--text);
}

/* Onglets */
.tabs { display: flex; gap: 4px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; transition: color .15s, background .15s; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; }
.segmented button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 12px var(--font); cursor: pointer; }
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: var(--white); color: #000; }
.segmented button:disabled { opacity: .35; cursor: not-allowed; }

/* Studio de tatouage */
.studio { display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; gap: 16px; height: calc(100vh - 290px); min-height: 640px; }
.studio-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.studio-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.studio-panel-head h3 { font-size: 14px; }
.studio-collection { display: grid; grid-template-columns: 1fr 100px; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.studio-upload { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.studio-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.studio-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; }
.studio-item:hover { background: var(--surface-2); }
.studio-item.is-active { background: var(--surface-3); border-color: var(--border-strong); }
.studio-thumb, .studio-preview {
    display: grid; place-items: center; flex-shrink: 0; overflow: hidden; border-radius: 6px;
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, #262626 25%, transparent 25%), linear-gradient(-45deg, #262626 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #262626 75%), linear-gradient(-45deg, transparent 75%, #262626 75%);
    background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.studio-thumb { width: 42px; height: 42px; }
.studio-thumb img, .studio-preview img { width: 100%; height: 100%; object-fit: contain; }
.studio-item-text { display: flex; flex-direction: column; min-width: 0; }
.studio-item-text strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-item-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--muted); }
.studio-empty .icon { color: var(--faint); }

.studio-stage { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.studio-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.studio-hint { margin-left: auto; }
.studio-viewport { position: relative; flex: 1; min-height: 0; cursor: crosshair; touch-action: none; }
.studio-viewport canvas { display: block; width: 100%; height: 100%; }
.studio-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: rgba(10, 10, 10, .92); }
.studio-overlay .icon { color: var(--faint); }

.studio-props { display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow-y: auto; }
.studio-preview { width: 100%; aspect-ratio: 16 / 10; }
.studio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.studio-section { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.studio-section-head { display: flex; align-items: center; justify-content: space-between; }
.studio-section [data-place-controls] { display: flex; flex-direction: column; gap: 12px; }
.studio-flat { display: flex; flex-direction: column; gap: 6px; }
.studio-flat canvas { width: 100%; aspect-ratio: 1; border: 1px solid var(--border-strong); border-radius: 8px; cursor: crosshair; touch-action: none; background: #050505; }
.studio-actions { display: flex; gap: 8px; padding-top: 4px; }
.studio-actions .btn { flex: 1; }

input[type="range"] { width: 100%; accent-color: var(--white); height: 18px; }

/* Personnages */
.split-peds { grid-template-columns: 1fr 1fr; align-items: start; }
.ped-parts { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ped-parts li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.ped-parts li.is-ready { border-color: var(--border-strong); }
.ped-part-state { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--faint); }
.ped-parts li.is-ready .ped-part-state { background: var(--white); border-color: var(--white); color: #000; }
.ped-part-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ped-meta { margin: -6px 0 16px; }
.split-peds .dropzone { min-height: 220px; }
.steps-inline { margin-top: 16px; line-height: 1.8; }

@media (max-width: 1200px) {
    .studio { grid-template-columns: 1fr; height: auto; }
    .studio-stage { height: 70vh; }
    .studio-list { max-height: 320px; }
    .split-peds { grid-template-columns: 1fr; }
}

/* Éditeur de blips */
.blip-editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.blip-browser { display: flex; flex-direction: column; min-height: 0; }
.blip-browser-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.blip-browser-head .search { flex: 1; min-width: 180px; }
.blip-browser-head .select { width: auto; min-width: 170px; }
.blip-browser-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.blip-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--cell, 64px) + 14px), 1fr)); gap: 6px;
    padding: 14px; max-height: calc(100vh - 300px); min-height: 420px; overflow-y: auto; align-content: start;
}
.blip-grid-loading { grid-column: 1 / -1; padding: 24px; text-align: center; }
.blip-cell {
    position: relative; display: grid; place-items: center; aspect-ratio: 1;
    padding: 6px; border: 1px solid var(--border); border-radius: 8px;
    background: #2b3a46; cursor: pointer; transition: border-color .1s, transform .1s;
}
.blip-cell:hover { border-color: #6b7a86; transform: translateY(-1px); }
.blip-cell canvas { width: 100%; height: 100%; image-rendering: auto; }
.blip-cell.is-empty { background: #1d262e; }
.blip-cell.is-selected { border-color: var(--white); box-shadow: 0 0 0 2px var(--white); }
.blip-cell-tag {
    position: absolute; left: 3px; bottom: 2px;
    font: 500 9.5px var(--mono); color: rgba(255, 255, 255, .55);
    text-shadow: 0 1px 2px #000;
}
.blip-cell.has-id .blip-cell-tag { color: rgba(255, 255, 255, .9); }
.blip-cell.is-modified::after {
    content: ''; position: absolute; top: 4px; right: 4px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 2px #000;
}

.blip-panel { position: sticky; top: 72px; display: flex; flex-direction: column; max-height: calc(100vh - 160px); overflow: hidden; }
.blip-panel .studio-panel-head h3 { font-size: 14px; }
.blip-panel-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; overflow-y: auto; }
.blip-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.blip-ids { display: flex; flex-wrap: wrap; gap: 6px; }
.blip-ids .code { font-size: 11px; }
.blip-canvas-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 8px; }
.blip-canvas {
    width: 100%; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border-strong);
    image-rendering: pixelated; touch-action: none; cursor: crosshair;
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, #262626 25%, transparent 25%), linear-gradient(-45deg, #262626 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #262626 75%), linear-gradient(-45deg, transparent 75%, #262626 75%);
    background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.blip-canvas[data-tool="move"] { cursor: move; }
.blip-canvas[data-tool="picker"] { cursor: copy; }
.blip-canvas-side { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.blip-tools { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; margin-bottom: 2px; border-bottom: 1px solid var(--border); }
.icon-btn.is-active { color: #000; background: var(--white); border-color: var(--white); }
.blip-color { width: 32px; height: 32px; padding: 0; border: 1px solid var(--border-strong); border-radius: 8px; background: none; cursor: pointer; }
.blip-color::-webkit-color-swatch-wrapper { padding: 3px; }
.blip-color::-webkit-color-swatch { border: 0; border-radius: 5px; }
.blip-color::-moz-color-swatch { border: 0; border-radius: 5px; }
.blip-section { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.blip-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.blip-section-title { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.blip-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.blip-inline { display: flex; align-items: center; gap: 6px; }
.blip-inline .input, .blip-inline .select { flex: 1; min-width: 0; }
.blip-inline .blip-font { flex: 0 0 96px; }
.blip-preview-color { width: auto; max-width: 190px; }
.blip-preview { display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: 8px; background: #2b3a46; }
.blip-preview canvas { flex-shrink: 0; }

.blip-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .7); }
.blip-modal-card { width: min(760px, 100%); max-height: min(720px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; }
.blip-modal-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.blip-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding: 14px; overflow-y: auto; }
.blip-pick {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-2);
    font: 500 10.5px var(--mono); cursor: pointer;
}
.blip-pick:hover { border-color: var(--white); }
.blip-pick canvas { border-radius: 4px; }
.blip-picker-empty { grid-column: 1 / -1; padding: 20px; text-align: center; }

.blip-resource { width: 180px !important; }
.blip-table th, .blip-table td { padding-left: 12px; padding-right: 12px; }
.blip-table th:first-child, .blip-table td:first-child { padding-left: 22px; }
.blip-table td:nth-child(2) { min-width: 150px; }
.blip-table .icon-btn { width: 28px; height: 28px; }
.blip-row-icon { display: inline-flex; align-items: center; gap: 8px; }
.blip-row-icon canvas { padding: 3px; border-radius: 6px; background: #2b3a46; box-sizing: content-box; }
.blip-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.blip-sprite-field { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.blip-sprite-field canvas { border-radius: 8px; border: 1px solid var(--border-strong); }
.blip-coords { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.blip-file-stats { padding-top: 20px; }
.blip-file-stats .stat-value { font-size: 20px; white-space: nowrap; }
.blip-file-note { padding: 14px 22px 0; }

@media (max-width: 1100px) {
    .blip-editor { grid-template-columns: 1fr; }
    .blip-panel { position: static; max-height: none; }
    .blip-grid { max-height: 60vh; }
}

/* Protection de scripts */
.protect-tool { display: flex; flex-direction: column; gap: 16px; }
.protect-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.protect-toolbar .field-inline { gap: 10px; }
.protect-toolbar .select { min-width: 150px; }
.protect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.protect-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; min-height: 30px; }
.protect-pane-actions { display: flex; gap: 6px; }
.protect-code {
    width: 100%; height: 420px; padding: 12px 14px; resize: vertical;
    font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; tab-size: 4;
}
.protect-code[readonly] { background: var(--surface-2); color: var(--text-2); }
.protect-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.protect-actions [data-error] { margin-right: auto; color: var(--white); }

@media (max-width: 900px) {
    .protect-grid { grid-template-columns: 1fr; }
    .protect-code { height: 280px; }
}

/* Barre d'action fixe */
.action-bar {
    position: sticky; bottom: 20px; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 4px; padding: 12px 12px 12px 22px;
    background: rgba(10, 10, 10, .88);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .9);
}
.action-bar-text { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.export-options { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.export-options .input { width: 170px; }

/* Étapes */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; }
.steps li {
    position: relative; counter-increment: step;
    display: flex; flex-direction: column; gap: 3px;
    padding: 0 0 18px 44px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute; left: 0; top: 0;
    width: 28px; height: 28px; display: grid; place-items: center;
    border: 1px solid var(--border-strong); border-radius: 8px;
    font: 500 11px var(--mono); color: var(--text-2);
    background: var(--surface-2);
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 34px; bottom: 6px; width: 1px; background: var(--border); }
.steps strong { font-size: 13.5px; font-weight: 600; }
.steps span { color: var(--muted); font-size: 13px; }

/* Zone de dépôt */
.dropzone {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 320px; padding: 32px;
    border: 1px dashed #3a3a3a; border-radius: var(--radius);
    background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, .012) 12px 24px);
    text-align: center; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.dropzone:hover { border-color: #5a5a5a; }
.dropzone.is-over { border-color: var(--white); border-style: solid; background-color: var(--surface-2); }
.dz-idle, .dz-busy { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 420px; }
.dz-busy { display: none; }
.dropzone.is-busy { cursor: default; }
.dropzone.is-busy .dz-idle { display: none; }
.dropzone.is-busy .dz-busy { display: flex; }
.dz-icon {
    display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px;
    border: 1px solid var(--border-strong); border-radius: 14px;
    background: var(--surface-2);
}
.dz-title { font-size: 16px; font-weight: 600; }
.dz-hint { color: var(--muted); font-size: 13px; max-width: 340px; margin-bottom: 8px; }
.dz-limit { font-size: 12px; color: var(--faint); margin-top: 4px; }
.dz-file { display: flex; align-items: center; gap: 8px; font: 13px var(--mono); max-width: 100%; }
.dz-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-status { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dz-error { position: absolute; left: 16px; right: 16px; bottom: 16px; }

.progress { width: 100%; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress-bar { width: 0; height: 100%; background: var(--white); transition: width .15s; }
.progress.is-indeterminate .progress-bar { width: 35%; animation: indeterminate 1.1s ease-in-out infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Résultat */
.result-head { display: flex; align-items: center; gap: 18px; padding: 24px; flex-wrap: wrap; }
.result-head h2 { font-size: 20px; }
.result-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--white); color: #000; }
.result-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--text-2); }
.file-list li:hover { background: var(--surface-2); }
.file-list .icon { color: var(--faint); }

/* Notifications */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, .9);
    font-size: 13px;
    animation: toast-in .25s ease-out;
    transition: opacity .3s, transform .3s;
}
.toast-success { background: var(--white); color: #000; border-color: var(--white); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Connexion */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: radial-gradient(ellipse at top, #141414, #000 60%); }
.auth-card {
    width: 100%; max-width: 380px;
    display: flex; flex-direction: column; gap: 16px;
    padding: 36px 32px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow);
}
.auth-card img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 4px; }
.auth-card h1 { font-size: 22px; }

.auth-card .btn-lg { height: 46px; font-size: 14px; gap: 10px; }
.center { text-align: center; }
.setup { display: flex; flex-direction: column; gap: 8px; }
.setup-code { display: block; padding: 10px 12px; font-size: 12px; word-break: break-all; user-select: all; }

/* Utilisateur connecté */
.user { display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 8px; }
.user img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); }
.user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.user-text strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text span { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-backdrop { display: none; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 1100px) {
    .tool-grid { grid-template-columns: 1fr; }
    .split, .split-wide { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .6); }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; margin-left: -8px; }
    .topbar { padding: 0 16px; }
    .content { padding: 24px 16px 120px; }
    .footer { padding: 16px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { padding: 28px 22px; }
    .hero h2 { font-size: 24px; }
    .hero-logo { display: none; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .mapping-row { grid-template-columns: 1fr; gap: 10px; }
    .mapping-arrow { display: none; }
    .toolbar-group { margin-left: 0; }
    .inline-form { grid-template-columns: 1fr; }
    .card-head { flex-wrap: wrap; }
    .search { min-width: 0; width: 100%; }
}

/* ── Ombrika : abonnement, quotas, tarifs ───── */
.upgrade-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; margin-bottom: 4px; border: 1px solid var(--border-strong); border-radius: 10px; background: linear-gradient(160deg, var(--surface-3), var(--surface)); transition: border-color .15s; }
.upgrade-card:hover { border-color: #4a4a4a; }
.upgrade-card strong { font-size: 13px; }
.upgrade-card span { font-size: 12px; color: var(--muted); line-height: 1.45; }
a.pill { color: var(--text-2); }
a.pill:hover { border-color: #4a4a4a; color: var(--text); }

.usage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 20px 22px; }
.usage-list { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.progress-bar.is-full { background: repeating-linear-gradient(45deg, var(--white) 0 6px, #bdbdbd 6px 12px); }

.plan-current { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 6px; flex-wrap: wrap; }
.plan-current h2 { font-size: 30px; letter-spacing: -0.03em; }
.plan-price { color: var(--muted); font-size: 14px; }
.plan-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 18px; }

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 26px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.price-card.is-featured { border-color: var(--white); background: linear-gradient(180deg, #141414, var(--surface) 55%); box-shadow: 0 30px 60px -30px rgba(255, 255, 255, .12); }
.price-flag { position: absolute; top: -11px; left: 24px; padding: 3px 10px; border-radius: 999px; background: var(--white); color: #000; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.price-card h3 { font-size: 18px; }
.price-amount { display: flex; align-items: baseline; gap: 8px; }
.price-amount strong { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.price-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.price-features .icon { margin-top: 2px; color: var(--text); }
.btn.is-current { background: transparent; color: var(--muted); cursor: default; border-style: dashed; }
.pricing-note { text-align: center; margin-top: 18px; }
.table.compare td:not(:first-child), .table.compare th:not(:first-child) { text-align: center; }
.table.compare td:first-child { color: var(--text); font-weight: 500; }

.member { display: inline-flex; align-items: center; gap: 10px; }
.member img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); }
.invite-row { display: flex; gap: 8px; }
.invite-row form { display: contents; }
.table tr.is-banned td { opacity: .55; }
.textarea { height: auto; min-height: 90px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.admin-preview { display: flex; align-items: center; gap: 8px; }
.admin-preview .select { width: auto; min-width: 190px; }
.tabs-sm .tab { height: 30px; padding: 0 11px; font-size: 12.5px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.back-link svg { transform: rotate(180deg); }
.back-link:hover { color: var(--text); }
.admin-user-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 18px; font-size: 13px; }
.admin-facts dt { color: var(--muted); }
.admin-facts dd { margin: 0; }
.admin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-plan-form { margin-bottom: 12px; }
.admin-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.admin-plans .card { display: flex; flex-direction: column; gap: 12px; }
.admin-limits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-limits .field-label { font-size: 11.5px; }
a.member { color: inherit; }
a.member:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.card-head .tabs { flex-wrap: nowrap; }
.join-card { max-width: 620px; display: flex; flex-direction: column; gap: 14px; }
.join-card .form-actions { justify-content: flex-start; }
.studio-quota { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }

@media (max-width: 1100px) {
    .usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pricing { grid-template-columns: 1fr; }
}

/* Outils en développement */
.nav-soon { margin-left: auto; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.soon { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 640px; margin: 24px auto 0; padding: 48px 32px; text-align: center; }
.soon-icon { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface-2); }
.soon h2 { font-size: 26px; letter-spacing: -0.03em; }
.soon p { max-width: 520px; line-height: 1.6; }
.soon-list { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.soon-list li { display: flex; gap: 10px; color: var(--text-2); font-size: 14px; }
.soon-list .icon { margin-top: 2px; }
/* ───────────────────────────────────────────
   Animations de l'application
   ─────────────────────────────────────────── */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }
@keyframes app-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Contenu des pages : apparition en cascade */
.content > * { animation: app-rise .7s var(--ease-out) both; }
.content > *:nth-child(1) { animation-delay: .02s; }
.content > *:nth-child(2) { animation-delay: .08s; }
.content > *:nth-child(3) { animation-delay: .14s; }
.content > *:nth-child(4) { animation-delay: .2s; }
.content > *:nth-child(5) { animation-delay: .26s; }
.content > *:nth-child(n+6) { animation-delay: .32s; }
.stats > .stat, .tool-grid > .tool { animation: app-rise .7s var(--ease-out) both; }
.stats > .stat:nth-child(2), .tool-grid > .tool:nth-child(2) { animation-delay: .06s; }
.stats > .stat:nth-child(3), .tool-grid > .tool:nth-child(3) { animation-delay: .12s; }
.stats > .stat:nth-child(4), .tool-grid > .tool:nth-child(4) { animation-delay: .18s; }
.tool-grid > .tool:nth-child(n+5) { animation-delay: .24s; }

/* Survols fluides */
.tool { transition: border-color .3s, transform .5s var(--ease-out), background .3s, box-shadow .5s var(--ease-out); }
.tool:hover { box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .95); }
.tool-icon { transition: transform .5s var(--ease-out), background .3s; }
.tool:hover .tool-icon { transform: translateY(-2px) rotate(-6deg); background: var(--surface-2); }
.stat { transition: border-color .3s, transform .5s var(--ease-out); }
.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.nav-link { transition: color .2s, background .25s, padding-left .35s var(--ease-out); }
.nav-link:hover { padding-left: 13px; }
.nav-link.is-active::before { animation: nav-in .5s var(--ease-out) both; }
@keyframes nav-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.btn { transition: background .2s, border-color .2s, color .2s, transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.btn:active { transform: translateY(1px) scale(.98); }
.upgrade-card { transition: border-color .3s, transform .5s var(--ease-out); }
.upgrade-card:hover { transform: translateY(-2px); }

/* Jauges : remplissage animé au chargement */
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.meter .progress-bar { transform-origin: left; animation: fill 1.1s var(--ease-out) .25s both; }

/* Logo de la barre latérale */
.brand img { transition: transform .8s var(--ease-out); }
.brand:hover img { transform: rotate(-20deg) scale(1.05); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* ── Pages de compte (connexion, inscription, mot de passe) ── */
body.auth { display: block; min-height: 100vh; padding: 0; background: radial-gradient(ellipse 80% 60% at 50% -10%, #1b1b1b, #000 60%); }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; animation: app-rise .7s var(--ease-out, ease) both; }
.auth-brand img { border-radius: 9px; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; padding: 32px 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .95); animation: app-rise .8s var(--ease-out, ease) .08s both; }
.auth-card h1 { font-size: 24px; letter-spacing: -0.03em; }
.auth-card > p { margin-top: -8px; }
.auth-card .form { gap: 14px; }
.auth-switch { text-align: center; font-size: 13.5px; }
.auth-switch a, .auth-legal a, .field-label-row a, .check-terms a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.auth-legal { text-align: center; }
.auth-legal a { color: var(--muted); }
.auth-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.auth-icon.is-mail { animation: mail-bounce 2.4s var(--ease-out, ease) infinite; }
@keyframes mail-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.auth-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.field-label-row { display: flex; justify-content: space-between; gap: 10px; }
.field-label-row a { font-weight: 400; }
.password { position: relative; display: block; }
.password .input { padding-right: 42px; }
.password .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; }
.strength { display: block; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--white); transition: width .4s var(--ease-out, ease), opacity .3s; }
.check-terms { align-items: flex-start; white-space: normal; line-height: 1.5; font-size: 13px; }
.check-terms input { margin-top: 2px; flex-shrink: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.link-btn { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.input-code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 24px; font-weight: 600; letter-spacing: .45em; text-align: center; padding-top: 12px; padding-bottom: 12px; }
.input-code::placeholder { color: var(--faint); letter-spacing: .45em; }
.auth-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 13.5px; }
.auth-actions form { display: inline; }
.pending-email { padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; margin-bottom: 16px; }
.btn-danger { background: transparent; border-color: #5a5a5a; color: var(--text); }
.btn-danger:hover { background: var(--white); color: #000; border-color: var(--white); }
.danger-zone { border-style: dashed; }
.account-id { display: flex; align-items: center; gap: 12px; }
.account-id img { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-strong); }
.user img { border-radius: 50%; }