/* frontend/css/login.css - Style inspiré GTA V */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oswald', sans-serif;
    overflow: hidden;
    background: #000;
    color: white;
}

/* Container principal */
.gta-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #1a1a1a 0%, #0a0a0a 100%);
}

/* Background city - Amélioré pour meilleure visibilité */
.background-city {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)),
        url('/images/city-default.jpg') center/cover no-repeat;
    filter: blur(1px);
    opacity: 0.6;
    z-index: 1;
}

/* Background pour Taxi Nord */
.theme-nord .background-city {
    background:
        linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)),
        url('/images/city-nord.jpg') center/cover no-repeat;
    filter: blur(0.5px);
    opacity: 0.7;
}

/* Background pour Taxi Sud */
.theme-sud .background-city {
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65)),
        url('/images/city-sud.jpg') center/cover no-repeat;
    filter: blur(0.8px);
    opacity: 0.65;
}

/* Scanlines effet TV */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px);
    pointer-events: none;
    z-index: 10;
}

/* Noise texture */
.noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    z-index: 9;
    pointer-events: none;
    background:
        repeating-radial-gradient(circle at 50% 50%,
            transparent 0,
            rgba(255, 255, 255, 0.1) 1px,
            transparent 2px);
    animation: noise 0.2s infinite;
}

@keyframes noise {

    0%,
    100% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-1px, 1px);
    }

    40% {
        transform: translate(1px, -1px);
    }

    60% {
        transform: translate(-1px, -1px);
    }

    80% {
        transform: translate(1px, 1px);
    }
}

/* Logo style GTA */
.gta-logo {
    position: relative;
    z-index: 5;
    margin-bottom: 2rem;
    animation: logoIntro 1s ease-out;
}

@keyframes logoIntro {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.logo-text {
    text-align: center;
    position: relative;
}

.logo-main {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 6rem;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    text-shadow:
        3px 3px 0 #000,
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        0 0 30px var(--primary-color),
        0 0 60px var(--primary-color);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.2);
    }
}

.logo-sub {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    color: #fff;
    margin-top: -1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Effet glitch */
.glitch {
    animation: glitch 0.3s linear;
}

@keyframes glitch {

    0%,
    100% {
        text-shadow:
            3px 3px 0 #000,
            -3px -3px 0 #000,
            3px -3px 0 #000,
            -3px 3px 0 #000,
            0 0 30px var(--primary-color);
    }

    20% {
        text-shadow:
            3px 3px 0 #000,
            -3px -3px 0 #000,
            3px -3px 0 #000,
            -3px 3px 0 #000,
            -5px 0 10px #00ffff,
            5px 0 10px #ff00ff;
    }

    40% {
        text-shadow:
            3px 3px 0 #000,
            -3px -3px 0 #000,
            3px -3px 0 #000,
            -3px 3px 0 #000,
            5px 0 10px #00ffff,
            -5px 0 10px #ff00ff;
    }
}

/* Menu principal */
.gta-menu {
    position: relative;
    z-index: 5;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--primary-color);
    padding: 0;
    width: 90%;
    max-width: 450px;
    animation: menuSlide 0.5s ease-out 0.3s both;
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.9),
        inset 0 0 30px rgba(255, 255, 255, 0.02);
}

@keyframes menuSlide {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Header du menu */
.menu-header {
    background: var(--primary-color);
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

.menu-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: #000;
    text-shadow: none;
}

.menu-subtitle {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.7);
    letter-spacing: 0.3em;
}

/* Formulaire */
.gta-form {
    padding: 2rem;
}

/* Groupe d'input */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

/* CHAMPS DE SAISIE CORRIGÉS - FOND SOMBRE FORCÉ */
.gta-input,
input[type="text"].gta-input,
input[type="password"].gta-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.7) !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
    font-size: 1rem;
    font-family: 'Oswald', sans-serif;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.gta-input:focus,
input[type="text"].gta-input:focus,
input[type="password"].gta-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.9) !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    border-color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Placeholder style */
.gta-input::placeholder,
input[type="text"].gta-input::placeholder,
input[type="password"].gta-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
    opacity: 1;
}

/* Autocomplete styles */
.gta-input:-webkit-autofill,
.gta-input:-webkit-autofill:hover,
.gta-input:-webkit-autofill:focus,
.gta-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(0, 0, 0, 0.9) inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Pour le theme nord */
.theme-nord .gta-input:focus {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Pour le theme sud */
.theme-sud .gta-input:focus {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.input-wrapper.focused .input-border {
    width: 100%;
}

/* Checkbox GTA */
.gta-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.gta-checkbox input {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    margin-right: 0.8rem;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
}

.gta-checkbox input:checked+.checkbox-box {
    background: var(--primary-color);
}

.gta-checkbox input:checked+.checkbox-box::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
}

.checkbox-label {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
}

/* Options row */
.options-row {
    margin-bottom: 1rem;
}

/* Bouton GTA */
.gta-button {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.button-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.gta-button:hover .button-bg {
    left: 0;
}

.gta-button:hover {
    color: #000;
    box-shadow: 0 0 20px var(--primary-color);
}

.gta-button.loading {
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.gta-button.success {
    background: #00ff00;
    color: #000;
    border-color: #00ff00;
}

.button-text,
.button-loader {
    position: relative;
    z-index: 1;
}

/* Message d'erreur */
.gta-error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 0.8rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    animation: errorFlash 0.5s ease;
}

@keyframes errorFlash {

    0%,
    100% {
        background: rgba(255, 0, 0, 0.1);
    }

    50% {
        background: rgba(255, 0, 0, 0.2);
    }
}

/* Footer du menu */
.menu-footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
}

/* Corner badges */
.corner-badges {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
}

.badge-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Fade out animation */
.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* ========== THEMES ========== */

:root {
    --primary-color: #f0f0f0;
    --accent-color: #000000;
}

/* Theme Nord */
.theme-nord {
    --primary-color: #FFD700;
    --accent-color: #FF6600;
}

/* Theme Sud */
.theme-sud {
    --primary-color: #00D4FF;
    --accent-color: #FF00FF;
}

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

@media (max-width: 768px) {
    .logo-main {
        font-size: 4rem;
    }

    .logo-sub {
        font-size: 1.2rem;
    }

    .gta-menu {
        width: 95%;
    }

    .corner-badges {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-main {
        font-size: 3rem;
    }

    .logo-sub {
        font-size: 1rem;
    }

    .menu-title {
        font-size: 1.5rem;
    }

    .gta-form {
        padding: 1.5rem;
    }

    .input-group {
        margin-bottom: 1rem;
    }
}