:root {
    --yellow: #FFD60A;
    --magenta: #FF005E;
    --ink: #432371;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--yellow);
    color: var(--ink);
    font-family: "Arial Rounded MT Bold", "Segoe UI Rounded", Arial, Helvetica, sans-serif;
    font-weight: 600;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px;
    flex: 1;
    width: 100%;
}

/* Navbar */
.navbar {
    background: var(--ink);
    color: var(--yellow);
}
.navbar-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
}
.navbar-brand img {
    width: 28px;
    height: auto;
}
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 700;
}
.navbar-nav a:hover {
    opacity: 0.8;
}

.footer {
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
    padding: 20px;
}

/* Boutons */
.btn {
    display: inline-block;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease;
    text-align: center;
    font-family: inherit;
    font-size: 14px;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-magenta { background: var(--magenta); color: var(--yellow); }
.btn-ink { background: var(--ink); color: var(--yellow); }
.btn-white { background: #fff; color: var(--ink); border: 2px solid rgba(67,35,113,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.pill {
    display: inline-block;
    background: var(--ink);
    color: var(--yellow);
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
}
.pill-magenta {
    background: var(--magenta);
    color: var(--yellow);
}

/* Cartes sticker */
.sticker {
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 6px 6px 0 rgba(67,35,113,0.35);
    border-radius: 22px;
}
.sticker-thin {
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 4px 4px 0 rgba(67,35,113,0.3);
    border-radius: 16px;
}
.card {
    padding: 20px 24px;
}

.center { text-align: center; }
.muted { opacity: 0.7; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 560px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Formulaires */
label.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
}
input[type=text], input[type=email], input[type=password], textarea, select {
    border: 2px solid rgba(67,35,113,0.2);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    font-weight: 400;
    font-size: 14px;
}
textarea { font-family: monospace; }
.error-msg {
    color: var(--magenta);
    font-weight: 700;
    font-size: 14px;
}
.hint { font-weight: 400; font-size: 12px; opacity: 0.6; }

/* Écran de duel */
.duel-card {
    flex: 1;
    border: 4px solid #fff;
    border-radius: 18px;
    padding: 22px 10px;
    text-align: center;
    cursor: pointer;
    color: var(--yellow);
    font-family: inherit;
    transition: transform 0.12s ease;
}
.duel-card:hover { transform: translateY(-2px) scale(1.02); }
.duel-card:active { transform: translateY(1px) scale(0.98); }
.duel-card.magenta { background: var(--magenta); }
.duel-card.ink { background: var(--ink); }
.duel-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #fff;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}
.duel-icon img { width: 100%; height: 100%; object-fit: cover; }
.duel-label { font-weight: 800; font-size: 15px; line-height: 1.25; }
.duel-elo { font-size: 10px; margin-top: 8px; opacity: 0.85; }
.vs-badge {
    background: var(--ink);
    color: var(--yellow);
    font-weight: 800;
    font-size: 13px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    flex-shrink: 0;
}

/* Classement */
.rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 2px solid rgba(67,35,113,0.1);
}
.rank-row:last-child { border-bottom: none; }
.rank-row.top { background: rgba(255,214,10,0.4); }
.rank-num { font-weight: 800; width: 24px; text-align: center; color: var(--magenta); }
.rank-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--yellow); display: flex; align-items: center;
    justify-content: center; overflow: hidden; flex-shrink: 0;
}
.rank-icon img { width: 100%; height: 100%; object-fit: cover; }
.rank-label { flex: 1; font-weight: 700; font-size: 14px; }
.rank-meta { font-size: 12px; opacity: 0.6; }
.rank-elo { font-weight: 800; font-size: 14px; }

/* Gestion visuels */
.item-manage-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}
.item-thumb {
    position: relative;
    flex-shrink: 0;
}
.item-thumb-box {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--yellow);
    border: 1.5px dashed rgba(67,35,113,0.3);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 20px;
}
.item-thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.emoji-toggle {
    position: absolute; bottom: -6px; right: -6px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--magenta); color: var(--yellow);
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; cursor: pointer;
}
.emoji-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 8px;
}
.emoji-picker button {
    background: none; border: none; font-size: 18px; cursor: pointer;
}
.emoji-picker button:hover { transform: scale(1.2); }
