:root {
    --bg: #0a0a10;
    --surface: #15151f;
    --input-bg: #1c1c28;
    --input-border: #35354a;
    --gold: #e8b64c;
    --gold-bright: #f4d68a;
    --violet: #7c5cff;
    --violet-deep: #4b2fb3;
    --text: #eae8f0;
    --text-muted: #9997ab;
    --error: #ff5470;
}

/* Le template charge Bootstrap/coreCss/app.css avant ce fichier :
   on neutralise ce qui doit l'être pour un rendu plein ecran et sombre. */
body {
    background-color: #000 !important;
    color: var(--text);
    font-family: 'Roboto', sans-serif;
    margin: 0;
}

.navbar {
    background-color: #000 !important;
}

.mainContent {
    background-color: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

#scrollUp {
    display: none !important;
}

* { box-sizing: border-box; }

.battlefield-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(480px 320px at 50% 8%, rgba(232, 182, 76, 0.16), transparent 70%),
        radial-gradient(600px 420px at 50% 100%, rgba(124, 92, 255, 0.14), transparent 70%);
    animation: flicker 7s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
    .battlefield-glow { animation: none; }
}

@keyframes flicker {
    0%   { opacity: 0.85; }
    50%  { opacity: 1; }
    100% { opacity: 0.9; }
}

.login-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-col {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.crest {
    width: 78px;
    height: 78px;
    margin: 0 auto -39px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}

.crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.clan-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 1.9rem);
    letter-spacing: 0.12em;
    text-align: center;
    color: var(--gold-bright);
    text-shadow: 0 0 18px rgba(232, 182, 76, 0.35);
    margin: 1.6rem 0 0.25rem;
}

.clan-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}

.login-panel-frame {
    padding: 2px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--violet-deep) 130%);
    clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
}

.login-panel {
    background: var(--surface);
    padding: 2.75rem 1.9rem 2rem;
    clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}

.login-panel .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.login-panel .form-control {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    font-family: 'Roboto', sans-serif;
    font-size: 1.02rem;
    padding: 0.65rem 0.9rem;
    border-radius: 4px;
}

.login-panel .form-control:focus {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(232, 182, 76, 0.22);
}

.login-panel .form-control::placeholder {
    color: #55536b;
}

.btn-battle {
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #241705;
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.18),
        0 6px 16px rgba(232, 182, 76, 0.25);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-battle:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.18),
        0 8px 20px rgba(232, 182, 76, 0.35);
    color: #241705;
}

.btn-battle:active {
    transform: translateY(1px);
}

.btn-battle:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 3px;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 84, 112, 0.1);
    border: 1px solid rgba(255, 84, 112, 0.35);
    color: var(--error);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    padding: 0.55rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
}

.login-error svg {
    flex: 0 0 auto;
}

.login-footer {
    text-align: center;
    color: #4d4b5f;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 1.5rem;
}
