:root {
    --bg-color: #000000;
    --terminal-bg: #0c0c0c;
    --terminal-border: #1a1a1a;
    --text-color: #c8c8c8;
    --text-bright: #ffffff;
    --primary-neon: #0dffca;
    --secondary-neon: #0d7fff;
    --red-neon: #ff2d55;
    --red-dark: #500f1c;
    --label-color: #6a8298;
    --input-bg: #0f1419;
    --button-bg: #102b23;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

body::before, body::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
}

body::before {
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%230dffca' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 5v1H0V0h5z'/%3E%3C/g%3E%3C/svg%3E");
}

body::after {
    background-image: radial-gradient(var(--primary-neon) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.03;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}

.login-terminal {
    background-color: var(--terminal-bg);
    border-radius: 8px;
    border: 1px solid var(--terminal-border);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8), 
                0 0 0 1px rgba(13, 255, 202, 0.1),
                0 0 60px rgba(13, 255, 202, 0.05);
    overflow: hidden;
    position: relative;
}

.terminal-header {
    background-color: #1a1a1a;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--terminal-border);
}

.terminal-buttons {
    display: flex;
    margin-right: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    opacity: 0.7;
}

.terminal-button:nth-child(1) {
    background-color: #ff5f57;
}
.terminal-button:nth-child(2) {
    background-color: #febc2e;
}
.terminal-button:nth-child(3) {
    background-color: #28c840;
}

.terminal-title {
    font-size: 14px;
    color: #8e8e8e;
    flex-grow: 1;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 300;
}

.terminal-body {
    padding: 20px;
    min-height: 450px;
    max-height: 85vh;
    overflow-y: auto;
}

#terminal-content {
    width: 100%;
}

.ascii-container {
    font-family: 'VT323', monospace;
    color: var(--primary-neon);
    white-space: pre;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(13, 255, 202, 0.6);
    font-size: 12px;
}

.typing-line {
    display: flex;
    margin: 10px 0 25px 0;
    font-family: 'VT323', monospace;
    font-size: 18px;
}

.prompt {
    color: var(--secondary-neon);
    margin-right: 10px;
}

.typing-text {
    color: var(--text-color);
    border-right: 2px solid var(--primary-neon);
    white-space: nowrap;
    overflow: hidden;
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% {
        border-color: var(--primary-neon);
    }
    50% {
        border-color: transparent;
    }
}

.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.revealed {
    display: block;
    opacity: 1;
}

.system-message {
    color: var(--primary-neon);
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(13, 255, 202, 0.3);
    text-shadow: 0 0 5px rgba(13, 255, 202, 0.4);
    letter-spacing: 1px;
}

.system-info {
    color: #4a9c82;
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 15px;
    opacity: 0.85;
}

#login-form {
    margin: 30px 0;
    padding: 15px;
    background-color: rgba(11, 15, 25, 0.6);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--label-color);
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid #1e2530;
    color: var(--text-bright);
    font-family: 'JetBrains Mono', monospace;
    padding: 10px 15px;
    border-radius: 3px;
    font-size: 16px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 0 1px var(--primary-neon);
}

.terminal-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12px;
}

.remember {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember input {
    margin-right: 5px;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--input-bg);
    border: 1px solid #2a3040;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.remember input:checked {
    background-color: var(--primary-neon);
    border-color: var(--primary-neon);
}

.remember input:checked:after {
    content: '✓';
    position: absolute;
    color: black;
    font-size: 12px;
    top: -1px;
    left: 2px;
}

.check-text {
    color: #587184;
    margin-left: 5px;
}

.terminal-link {
    color: var(--secondary-neon);
    text-decoration: none;
    font-size: 12px;
    position: relative;
}

.terminal-link:hover {
    text-decoration: underline;
}

.terminal-link:before {
    content: '>';
    margin-right: 3px;
}

#login-btn {
    width: 100%;
    background-color: var(--button-bg);
    color: var(--primary-neon);
    border: 1px solid #0a3625;
    padding: 12px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    cursor: pointer;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(13, 255, 202, 0.1);
}

#login-btn:hover {
    background-color: #0e3c29;
    box-shadow: 0 0 15px rgba(13, 255, 202, 0.2);
}

#login-btn:active {
    transform: translateY(1px);
}

.terminal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #1c1c1c;
    font-size: 12px;
}

.status-indicator {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-neon);
    margin-right: 8px;
    box-shadow: 0 0 8px var(--primary-neon);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 255, 202, 0.7);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(13, 255, 202, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 255, 202, 0);
    }
}

.status-text {
    color: #4d8d7a;
}

.version-info {
    color: #494949;
}

/* Effet glitch sur le logo */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

/* Simule une ligne de terminal avec des caractères qui défilent */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background-color: rgba(13, 255, 202, 0.3);
    animation: scanline 6s linear infinite;
    opacity: 0.6;
    z-index: 10;
}

@keyframes scanline {
    0% {
        top: 0%;
    }
    100% {
        top: 100%;
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(68px, 9999px, 72px, 0);
    }
    20% {
        clip: rect(17px, 9999px, 92px, 0);
    }
    40% {
        clip: rect(28px, 9999px, 22px, 0);
    }
    60% {
        clip: rect(89px, 9999px, 4px, 0);
    }
    80% {
        clip: rect(75px, 9999px, 52px, 0);
    }
    100% {
        clip: rect(5px, 9999px, 33px, 0);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .ascii-container {
        font-size: 7px;
    }
    
    .terminal-body {
        padding: 12px;
    }
    
    .system-message {
        font-size: 16px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .status-indicator, .version-info {
        font-size: 10px;
    }
}
