* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    color: #f2ead7;

    background:
        linear-gradient(
            rgba(0, 5, 12, 0.14),
            rgba(0, 5, 12, 0.34)
        ),
        url("../images/temple-background.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.temple-gate {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.login-panel {
    width: min(420px, 92vw);

    position: relative;
    z-index: 1;

    padding: 20px 28px 28px;

    text-align: center;

    background: transparent;
    border: none;
    box-shadow: none;
}

/* =========================================================
   ZONE LOGO
   ========================================================= */

.logo-zone {
    position: relative;
    margin: 0 auto 26px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 270px;
}

/* Lueur très légère "lever de soleil" derrière le logo */
.sunrise-glow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 180px;
    pointer-events: none;
    z-index: 0;
}

.sunrise-glow::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);

    width: 230px;
    height: 105px;

    border-radius: 50% 50% 60% 60% / 100% 100% 0 0;

    background:
        radial-gradient(
            ellipse at center bottom,
            rgba(255, 234, 170, 0.50) 0%,
            rgba(255, 217, 120, 0.22) 28%,
            rgba(255, 193, 80, 0.12) 46%,
            rgba(255, 165, 60, 0.06) 60%,
            rgba(255, 140, 40, 0.00) 78%
        );

    filter: blur(10px);
    opacity: 0.95;
}

/* Petites premières lueurs très discrètes */
.sunrise-glow::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 56px;
    transform: translateX(-50%);

    width: 180px;
    height: 32px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 229, 160, 0.22) 0%,
            rgba(255, 211, 120, 0.10) 45%,
            rgba(255, 180, 90, 0.00) 100%
        );

    filter: blur(10px);
    border-radius: 50%;
    opacity: 0.85;
}

.official-logo {
    position: relative;
    z-index: 2;

    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.official-logo img {
    display: block;
    width: min(340px, 100%);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
    border: none;

    filter:
        drop-shadow(0 10px 18px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 12px rgba(255, 221, 140, 0.08));
}

/* =========================================================
   FORMULAIRE
   ========================================================= */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    color: #d9bc73;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    color: #f5efe2;

    background: rgba(0, 4, 9, 0.52);
    border: 1px solid rgba(210, 174, 91, 0.70);
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.field input:focus {
    background: rgba(2, 12, 22, 0.78);
    border-color: #d5b366;
    box-shadow: 0 0 0 2px rgba(213, 179, 102, 0.12);
}

button {
    margin-top: 4px;
    padding: 13px 20px;

    border: 1px solid #d2ad5e;
    background:
        linear-gradient(
            180deg,
            #debf77,
            #aa7d35
        );

    color: #090c10;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: bold;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    cursor: pointer;

    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);

    transition:
        transform 0.12s ease,
        filter 0.2s ease;
}

button:hover {
    filter: brightness(1.08);
}

button:active {
    transform: translateY(1px);
}

.login-error {
    margin: -2px 0 0;
    color: #efaaaa;
    font-size: 0.84rem;
    text-align: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 520px) {
    body {
        background-attachment: scroll;
    }

    .temple-gate {
        padding: 12px;
    }

    .login-panel {
        width: min(360px, 94vw);
        padding: 16px 18px 22px;
    }

    .logo-zone {
        min-height: 235px;
        margin-bottom: 20px;
    }

    .sunrise-glow {
        width: 270px;
        height: 150px;
    }

    .sunrise-glow::before {
        width: 195px;
        height: 90px;
    }

    .sunrise-glow::after {
        width: 150px;
        top: 48px;
    }

    .official-logo img {
        width: min(290px, 100%);
    }
}