/* Phynaria AdminTool — reprend l'apparence du launcher PhynariaMC (src/styles.css) :
   fond animé, panneaux en verre dépoli, dégradé corail → orange, police Nunito */
@font-face {
    font-family: "cNunito";
    src: url("font.ttf") format("truetype");
    font-weight: 200 1000;
    font-display: swap;
}

:root {
    --primary: #ef5a3c;
    --accent: #f7a33b;
    --body: #0e0c11;
    --dark: #24212a;
    --surface: #17151b;
    --brand: linear-gradient(120deg, var(--primary) 0%, #f2733a 50%, var(--accent) 100%);
    --text: #fff;
    --text-2: rgba(255, 255, 255, .75);
    --muted: rgba(255, 255, 255, .45);
    --faint: rgba(255, 255, 255, .3);
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);
    --ok: #4ade80;
    --red: #f87171;
    --ease-smooth: cubic-bezier(.22, .61, .36, 1);
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
    --font: cNunito, "Nunito", "Segoe UI", system-ui, sans-serif;
    --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
    min-height: 100vh;
    background: var(--body);
    color: var(--text);
    font: 400 15px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .2); }

a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease-smooth); }
a:hover { color: #ffd9b8; }
h2 { margin: 0 0 14px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
code, .mono, pre { font-family: var(--mono); }
code {
    font-size: .85em;
    padding: 2px 7px;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .12)), #1f2937;
    outline: 1px solid rgba(255, 255, 255, .12);
    outline-offset: -1px;
    color: #fff;
}
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.w1 { width: 1%; }
.w40 { width: 40%; }
.text-gradient { background: linear-gradient(100deg, #fff 10%, #ffd9b8 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- Fond animé (identique au launcher) */
.scene { position: fixed; inset: 0; z-index: -10; overflow: hidden; background: var(--body); }
.scene-image { position: absolute; inset: -4%; background: url("bg.png") center / cover no-repeat; animation: kenburns 40s ease-in-out infinite alternate; filter: saturate(115%); }
.scene-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 0%, rgba(14, 12, 17, .2), transparent 60%), linear-gradient(180deg, rgba(14, 12, 17, .7) 0%, rgba(14, 12, 17, .92) 100%); }
.scene-orb { position: absolute; border-radius: 9999px; filter: blur(80px); mix-blend-mode: screen; opacity: .3; }
.scene-orb.a { width: 520px; height: 520px; left: -140px; top: -160px; background: var(--primary); animation: drift-a 22s ease-in-out infinite alternate; }
.scene-orb.b { width: 460px; height: 460px; right: -120px; bottom: -180px; background: var(--accent); opacity: .22; animation: drift-b 26s ease-in-out infinite alternate; }
.scene-particles { position: absolute; inset: 0; }
.scene-particles span { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 8px var(--accent); opacity: 0; animation: particle linear infinite; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
@keyframes drift-a { to { transform: translate(160px, 120px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-180px, -100px) scale(1.1); } }
@keyframes particle { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .8; } 90% { opacity: .6; } 100% { transform: translateY(-105vh) rotate(360deg); opacity: 0; } }
@keyframes glow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.06); } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes appear { from { opacity: 0; transform: translateY(8px) scale(.99); } }

/* Panneau en verre dépoli du launcher */
.glass, .card, .sidebar, .topbar {
    background: linear-gradient(160deg, rgba(32, 28, 38, .72) 0%, rgba(14, 12, 17, .78) 100%);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 12px 40px -12px rgba(0, 0, 0, .6);
}

/* ---------------------------------------------------------------- Structure */
.shell { display: flex; gap: 8px; padding: 8px; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 8px;
    width: 248px;
    height: calc(100vh - 16px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.brand b { font-size: 15.5px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--faint); font-size: 12px; font-weight: 600; }
.mark { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.mark-glow { position: absolute; inset: 4px; border-radius: 99px; background: rgba(239, 90, 60, .4); filter: blur(14px); animation: glow 3s ease-in-out infinite; }
.mark img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); transition: transform .5s var(--ease-bounce); }
.brand:hover .mark img { transform: scale(1.1) rotate(-6deg); }
.brand.big { padding: 0; }
.brand.big .mark { width: 56px; height: 56px; }
.brand.big b { font-size: 21px; }

.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }
.sidebar nav a {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .55);
    font-weight: 700;
    font-size: 14.5px;
    transition: color .3s var(--ease-smooth), background .3s var(--ease-smooth);
}
.sidebar nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sidebar nav a.active { color: #fff; }
.sidebar nav a.active::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 12px; background: var(--brand); box-shadow: 0 8px 24px -6px rgba(239, 90, 60, .7); }
.sidebar nav svg, .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: transform .3s var(--ease-bounce); }
.sidebar nav a:hover svg { transform: scale(1.1); }
.sidebar nav span { flex: 1; }
.pill { font-size: 11px; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 99px; background: #fff; color: var(--primary); }
.pill.warn { background: var(--accent); color: #2a1503; }
.sidebar nav a.active .pill { background: rgba(0, 0, 0, .25); color: #fff; }

.sidebar-user { display: flex; align-items: center; gap: 10px; margin: 0 10px 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
.avatar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 900; font-size: 16px; box-shadow: 0 6px 16px -6px rgba(239, 90, 60, .7); }
.avatar:hover { color: #fff; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); line-height: 1.3; }
.who b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--faint); font-size: 12px; font-weight: 600; }
.sidebar-user form { margin: 0; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .5); cursor: pointer; transition: .2s var(--ease-smooth); }
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.icon-btn:active { transform: scale(.9); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.topbar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 20px; border-radius: 16px; }
.topbar .title { flex: 1; min-width: 0; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.status i { width: 8px; height: 8px; border-radius: 99px; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status.ok i { color: var(--ok); }
.status.warn { color: var(--accent); background: rgba(247, 163, 59, .1); box-shadow: inset 0 0 0 1px rgba(247, 163, 59, .3); }
.burger { display: none; width: 38px; height: 38px; padding: 11px 10px; flex-direction: column; justify-content: space-between; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); cursor: pointer; }
.burger i { display: block; height: 2px; border-radius: 2px; background: #fff; }
.scrim { display: none; }

.content { display: flex; flex-direction: column; gap: 16px; padding: 8px 4px 48px; max-width: 1440px; width: 100%; }
.content > *, .grid > * { animation: appear .45s var(--ease-smooth) both; }
.content > *:nth-child(2), .grid > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3), .grid > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4), .grid > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(n+5), .grid > *:nth-child(n+5) { animation-delay: .16s; }

/* ---------------------------------------------------------------- Blocs */
.card { position: relative; border-radius: 20px; padding: 22px; min-width: 0; }
.card.narrow { max-width: 600px; }
.card.empty { text-align: center; color: var(--muted); padding: 56px 24px; }
.card.info { color: var(--text-2); padding: 16px 20px; background: linear-gradient(120deg, rgba(239, 90, 60, .14), rgba(247, 163, 59, .06)), linear-gradient(160deg, rgba(32, 28, 38, .72), rgba(14, 12, 17, .78)); box-shadow: inset 0 0 0 1px rgba(247, 163, 59, .22), 0 12px 40px -12px rgba(0, 0, 0, .6); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.grid.gallery { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
/* Les boutons d'un formulaire gardent leur taille au lieu de prendre toute la largeur */
.stack > .btn:not(.block), .stack > .actions, .stack > a.btn { align-self: flex-start; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.toolbar h2, .toolbar p { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.center { justify-content: center; }
.actions form, form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
form.inline input, form.inline select { width: auto; min-width: 200px; }
.sticky-actions { position: sticky; bottom: 8px; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 10px; border-radius: 16px; background: linear-gradient(160deg, rgba(32, 28, 38, .85), rgba(14, 12, 17, .9)); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--line), 0 12px 40px -12px rgba(0, 0, 0, .8); }

.kpi { padding: 18px 20px; overflow: hidden; }
.kpi span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kpi b { display: block; margin-top: 6px; font-size: 32px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.kpi small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 99px; background: var(--primary); filter: blur(40px); opacity: .22; }
.kpi:nth-child(2n)::after { background: var(--accent); }

/* ---------------------------------------------------------------- Formulaires (comme .input du launcher) */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    color: #fff;
    font: 500 14px/1.4 var(--font);
    outline: none;
    transition: background .2s var(--ease-smooth), box-shadow .2s var(--ease-smooth);
}
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .3); }
input:hover, select:hover, textarea:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
input:focus, select:focus, textarea:focus { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(239, 90, 60, .7); }
input:disabled { opacity: .55; }
select { appearance: none; padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7a33b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select option { background: var(--surface); }
textarea { resize: vertical; }
textarea.mono, textarea.small { font: 12.5px/1.55 var(--mono); }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=file] { min-height: 0; padding: 8px; }
input[type=checkbox] {
    appearance: none;
    width: 20px;
    height: 20px;
    min-height: 0;
    padding: 0;
    flex-shrink: 0;
    border-radius: 6px;
    display: grid;
    place-items: center;
    cursor: pointer;
}
input[type=checkbox]::after { content: ""; width: 10px; height: 6px; margin-top: -2px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) scale(0); transition: transform .25s var(--ease-bounce); }
input[type=checkbox]:checked { background: var(--brand); box-shadow: 0 4px 12px -4px rgba(239, 90, 60, .8); }
input[type=checkbox]:checked::after { transform: rotate(-45deg) scale(1); }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; color: var(--text); cursor: pointer; }
label.check.small { font-size: 12.5px; color: var(--muted); }
fieldset { margin: 0; padding: 6px 16px 14px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 9px; }
legend { float: left; width: 100%; margin: 10px 0 2px; padding: 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.input-upload { display: flex; gap: 6px; }
.input-upload input { flex: 1; min-width: 0; }
.input-upload .btn { flex-shrink: 0; }

/* Interrupteur (Switch.tsx du launcher) */
.switch { flex-direction: row; align-items: center; gap: 14px; font-size: 17px; font-weight: 800; color: #fff; cursor: pointer; }
.switch input { display: none; }
.switch span { position: relative; width: 48px; height: 26px; flex-shrink: 0; border-radius: 99px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: .3s var(--ease-smooth); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: rgba(255, 255, 255, .7); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: .35s var(--ease-bounce); }
.switch input:checked + span { background: var(--brand); box-shadow: 0 6px 18px -6px rgba(239, 90, 60, .8); }
.switch input:checked + span::after { left: 25px; background: #fff; }

/* ---------------------------------------------------------------- Boutons */
.btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 18px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    color: #fff;
    font: 700 14px/1.2 var(--font);
    white-space: nowrap;
    cursor: pointer;
    transition: transform .25s var(--ease-bounce), background .2s var(--ease-smooth), box-shadow .2s var(--ease-smooth), filter .2s;
}
.btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn:active { transform: scale(.96); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--brand); box-shadow: 0 8px 24px -8px rgba(239, 90, 60, .75); }
.btn.primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.primary:active { transform: scale(.96); }
/* Reflet animé (.btn-shine du launcher) */
.btn.primary::after { content: ""; position: absolute; inset: 0; width: 40%; z-index: -1; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shine 3.5s ease-in-out infinite; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.btn.danger { background: rgba(248, 113, 113, .08); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .3); color: #fca5a5; }
.btn.danger:hover { background: rgba(248, 113, 113, .18); color: #fff; }
.btn.small { min-height: 32px; padding: 6px 12px; border-radius: 10px; font-size: 12.5px; }
.btn.block { width: 100%; min-height: 48px; font-size: 15px; }
label.btn { flex-direction: row; color: #fff; }

/* ---------------------------------------------------------------- Tableaux */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 800; color: var(--faint); border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .2s var(--ease-smooth); }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.table tbody tr:hover td:first-child { border-radius: 12px 0 0 12px; }
.table tbody tr:hover td:last-child { border-radius: 0 12px 12px 0; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 7px 12px; }
.table tr.unread td { font-weight: 800; color: #fff; }
.table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.table tr.unread { cursor: pointer; }
.table td input:not([type=checkbox]):not([type=radio]), .table td textarea { min-height: 36px; padding: 7px 10px; border-radius: 10px; }
.table td.center input[type=checkbox] { margin: 0 auto; }
.thumb { display: block; width: 76px; height: 44px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .07); color: var(--text-2); vertical-align: middle; }
.tag.ok { background: rgba(74, 222, 128, .12); color: var(--ok); }
.tag.accent { background: rgba(247, 163, 59, .14); color: var(--accent); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.bad { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot.warn { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.flash { padding: 13px 18px; border-radius: 14px; font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.flash.success { background: rgba(74, 222, 128, .1); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .28); color: #bbf7d0; }
.flash.error { background: rgba(248, 113, 113, .1); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .3); color: #fecaca; }
.flash.warn { background: rgba(247, 163, 59, .1); box-shadow: inset 0 0 0 1px rgba(247, 163, 59, .3); color: #fde3bd; }
.flash a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- Profils */
.profile { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform .35s var(--ease-bounce); }
.profile:hover { transform: translateY(-3px); }
.profile.disabled { opacity: .5; }
.profile-head { display: flex; gap: 14px; align-items: center; padding: 20px 20px 16px; background: radial-gradient(circle at 0% 0%, rgba(239, 90, 60, .22), transparent 60%); }
.profile-head img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }
.profile-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 19px; }
.profile-head code { padding: 0; background: none; outline: 0; color: var(--faint); font-size: 12px; }
.profile .facts { margin: 0 20px; padding: 14px 16px; border-radius: 14px; background: rgba(0, 0, 0, .2); }
.profile .actions { padding: 16px 20px 20px; margin-top: auto; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 12px; }
.facts dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.facts.wide { grid-template-columns: 120px 1fr; margin-bottom: 22px; }

/* ---------------------------------------------------------------- Fichiers */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--faint); font-weight: 800; }
.breadcrumb a { padding: 4px 11px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: #fff; }
.breadcrumb a:hover { background: var(--brand); }
.dropzone { margin-bottom: 18px; padding: 28px 20px; text-align: center; border-radius: 18px; border: 2px dashed rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .02); transition: .25s var(--ease-smooth); }
.dropzone.over { border-color: var(--accent); background: rgba(247, 163, 59, .08); transform: scale(1.005); }
.dropzone p { margin: 0 0 16px; color: var(--muted); }
.dropzone p strong { display: block; margin-bottom: 2px; font-size: 18px; font-weight: 900; color: #fff; }
.queue { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; max-height: 280px; overflow-y: auto; text-align: left; }
.queue:empty { display: none; }
.queue .item { display: grid; grid-template-columns: 1fr 140px 80px; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); font-size: 13px; }
.queue .item > span:last-child { text-align: right; font-weight: 700; }
.queue .item.error { color: #fca5a5; }
.queue .item.done { color: var(--muted); }
.meter { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--brand); box-shadow: 0 0 12px rgba(239, 90, 60, .7); transition: width .25s var(--ease-smooth); }
.files td:nth-child(2) { overflow-wrap: anywhere; }
.files td:nth-child(2) a { color: #fff; font-weight: 700; }
.files td:nth-child(2) a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- Actualités (carte comme dans le launcher) */
.news-card { display: flex; flex-direction: column; max-width: 440px; overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -20px rgba(0, 0, 0, .9); }
.news-card .news-img { height: 210px; background: linear-gradient(135deg, var(--primary), var(--accent)) center / cover; }
.news-card > div:last-child { padding: 16px 18px 20px; }
.news-card h3 { font-size: 20px; }
.news-card p { margin: 8px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- Fonds */
.bg { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.bg.active { box-shadow: inset 0 0 0 2px var(--accent), 0 12px 40px -12px rgba(247, 163, 59, .5); }
.bg-img { aspect-ratio: 16 / 9; border-radius: 12px; background: rgba(0, 0, 0, .3) center / cover; }
.bg-img.default { display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(rgba(14, 12, 17, .55), rgba(14, 12, 17, .55)), url("bg.png") center / cover; }

/* ---------------------------------------------------------------- Statistiques */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); }
.tabs a { padding: 7px 14px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.tabs a:hover { color: #fff; }
.tabs a.active { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -6px rgba(239, 90, 60, .7); }
.chart { display: block; width: 100%; height: 180px; }
.chart rect { fill: var(--primary); rx: .6; }
.chart.b rect { fill: var(--accent); }
.chart rect:hover { fill: #fff; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 12px; font-weight: 600; }

pre.log, pre.code { overflow: auto; max-height: 70vh; padding: 14px 16px; border-radius: 14px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; color: var(--text-2); }
pre.code { position: relative; cursor: copy; font-size: 15px; color: #ffd9b8; }
pre.code::after { content: "Copier"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .08); font: 700 11.5px var(--font); color: var(--text-2); }
ul { padding-left: 18px; }
ul li::marker { color: var(--accent); }

/* ---------------------------------------------------------------- Connexion / installation */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth, .install { width: 100%; padding: 32px; border-radius: 24px; animation: appear .5s var(--ease-smooth) both; }
.auth { max-width: 410px; display: flex; flex-direction: column; gap: 16px; }
.install { max-width: 660px; }
.auth-title { margin: 8px 0 0; font-size: 26px; font-weight: 900; }

/* ---------------------------------------------------------------- Mobile */
@media (max-width: 960px) {
    .grid.two { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 8px; top: 8px; transform: translateX(calc(-100% - 16px)); transition: transform .35s var(--ease-smooth); }
    .sidebar.open { transform: none; }
    .sidebar.open + .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
    .burger { display: flex; }
    .topbar { padding: 10px 12px; }
    .topbar h1 { font-size: 19px; }
    .status { display: none; }
    .content { padding: 4px 0 40px; }
    .card { padding: 18px; border-radius: 18px; }
    .queue .item { grid-template-columns: 1fr 80px; }
    .queue .item > span:last-child { display: none; }
    .table { display: block; overflow-x: auto; }
}

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

/* ---------------------------------------------------------------- Modpacks */
.pack-list { display: flex; flex-direction: column; gap: 10px; }
.pack { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.pack.has-update { background: linear-gradient(120deg, rgba(239, 90, 60, .12), rgba(247, 163, 59, .04)); box-shadow: inset 0 0 0 1px rgba(247, 163, 59, .3); }
.pack > img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .8); }
.pack-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pack-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pack-title a { color: #fff; font-size: 17px; font-weight: 900; }
.pack-versions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.pack-versions .ver { font-weight: 800; padding: 3px 10px; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.pack-versions .ver.new { background: var(--brand); }
.pack-versions .arrow { color: var(--accent); font-weight: 900; }
.pack .flash { padding: 8px 12px; margin-top: 6px; }
.pack .actions { justify-content: flex-end; max-width: 330px; }
.tag.cf { background: rgba(241, 100, 54, .16); color: #ff9f7a; }
.tag.mr { background: rgba(27, 217, 106, .14); color: #5ee69a; }

.mp-search { display: flex; gap: 8px; margin: 14px 0 16px; }
.mp-search input { flex: 1; }
.mp-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mp-card { display: grid; grid-template-columns: 56px 1fr; gap: 12px 14px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s var(--ease-smooth), transform .3s var(--ease-bounce); animation: appear .35s var(--ease-smooth) both; }
.mp-card:hover { background: rgba(255, 255, 255, .06); transform: translateY(-2px); }
.mp-card img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.mp-card h3 { font-size: 16px; }
.mp-card p { margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-card .actions { grid-column: 1 / -1; }

.modal { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 24px; color: var(--text); background: linear-gradient(160deg, rgba(32, 28, 38, .97), rgba(14, 12, 17, .98)); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 100px -20px rgba(0, 0, 0, .9); overflow: auto; }
.modal[open] { animation: appear .3s var(--ease-smooth) both; }
.modal::backdrop { background: rgba(8, 6, 10, .7); backdrop-filter: blur(6px); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 20px 22px; background: radial-gradient(circle at 0 0, rgba(239, 90, 60, .25), transparent 60%), rgba(20, 17, 24, .95); border-bottom: 1px solid var(--line); }
.modal-head img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.modal-head > div { flex: 1; min-width: 0; }
.modal-head h3 { font-size: 20px; }
.modal-step { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-step[hidden] { display: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.version-list { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.version { flex-direction: row; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text); flex-wrap: wrap; }
.version:hover { background: rgba(255, 255, 255, .05); }
.version:has(input:checked) { background: rgba(239, 90, 60, .16); box-shadow: inset 0 0 0 1px rgba(239, 90, 60, .45); }
.version .v-name { font-weight: 800; }
.version .muted { margin-left: auto; }
input[type=radio] { appearance: none; width: 18px; height: 18px; min-height: 0; padding: 0; flex-shrink: 0; border-radius: 99px; cursor: pointer; display: grid; place-items: center; }
input[type=radio]::after { content: ""; width: 8px; height: 8px; border-radius: 99px; background: #fff; transform: scale(0); transition: transform .25s var(--ease-bounce); }
input[type=radio]:checked { background: var(--brand); box-shadow: 0 4px 12px -4px rgba(239, 90, 60, .8); }
input[type=radio]:checked::after { transform: scale(1); }
.target { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.target-new, .target-existing { padding-left: 30px; }
.summary-head { display: flex; flex-direction: column; gap: 2px; font-size: 17px; }
.modal details summary { cursor: pointer; font-weight: 700; }
.modal .flash ul { margin: 8px 0 0; max-height: 160px; overflow-y: auto; }
.busy { display: grid; place-items: center; gap: 14px; padding: 30px; text-align: center; color: var(--text-2); }
.spinner { width: 34px; height: 34px; border-radius: 99px; border: 3px solid rgba(255, 255, 255, .1); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.meter.big { height: 12px; }
@media (max-width: 960px) {
    .pack { grid-template-columns: 48px 1fr; }
    .pack > img { width: 48px; height: 48px; }
    .pack .actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
}

/* Tableau des plateformes (mises à jour du launcher) */
#platforms td:first-child { width: 190px; }
#platforms td:nth-child(3) { width: 36%; }
#platforms td:nth-child(3) .btn { margin-top: 6px; }
#platforms td:last-child, #optional-mods td:last-child { width: 1%; }
#optional-mods td:nth-child(3) { width: 1%; text-align: center; }
#optional-mods th, #platforms th { white-space: nowrap; }
