:root {
    --bg: #0f0f12;
    --card: #1a1a22;
    --text: #f2f2f5;
    --muted: #9b9bac;
    --accent: #e63946;
    --accent-dim: #c1121f;
    --ok: #2a9d8f;
    --border: #2e2e3a;
    --radius: 14px;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: radial-gradient(ellipse 120% 80% at 50% -20%, #2a1530 0%, var(--bg) 55%);
    color: var(--text);
    line-height: 1.5;
}

.wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.brand h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.brand p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.35rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.card h2 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    font-weight: 700;
}

.field {
    margin-bottom: 1.15rem;
}

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.field small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #12121a;
    color: var(--text);
    font-size: 1rem;
}

input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.source-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.source-options label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #12121a;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
    margin: 0;
    transition: border-color 0.15s, background 0.15s;
}

.source-options label:hover {
    border-color: #44445a;
}

.source-options input {
    accent-color: var(--accent);
    width: 1.05rem;
    height: 1.05rem;
}

.source-options input:checked + span,
.source-options label:has(input:checked) {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(165deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #fff;
    text-decoration: none;
    transition: transform 0.12s, filter 0.12s;
}

.btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #2e2e3a;
    color: var(--text);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.alert-error {
    background: rgba(230, 57, 70, 0.15);
    border: 1px solid rgba(230, 57, 70, 0.45);
    color: #ffb4bc;
}

.alert-success {
    background: rgba(42, 157, 143, 0.15);
    border: 1px solid rgba(42, 157, 143, 0.45);
    color: #9cf0e6;
}

.numero-inscription-box {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px dashed var(--border);
    background: #12121a;
    text-align: center;
}

.numero-inscription-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.numero-inscription-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.alert-warn {
    background: rgba(233, 196, 106, 0.12);
    border: 1px solid rgba(233, 196, 106, 0.35);
    color: #f4e4a6;
}

.footer-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--muted);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

table.data th,
table.data td {
    padding: 0.45rem 0.35rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

table.data th {
    color: var(--muted);
    font-weight: 600;
}

.nav-admin {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.nav-admin a {
    color: var(--muted);
    font-size: 0.9rem;
}

.btn-inline {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    background: #2a1a1f;
    color: #ffb4bc;
    border: 1px solid rgba(230, 57, 70, 0.45);
    cursor: pointer;
}

.btn-inline:hover {
    filter: brightness(1.12);
}

.winner-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(233, 196, 106, 0.2);
    color: #f4d35e;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .wrap-wide {
        max-width: 960px;
    }

    table.data {
        font-size: 0.85rem;
    }
}
