/* Réinitialisation de base et application de la police pixel */
body {
    height: 100vh;
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: 'VT323', monospace;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
    display: grid;
    place-items: center;
}

.container {
    width: 90%;
    max-width: 1000px;
    text-align: center;
    margin: 0 auto; /* Centrage */
}

/* La fenêtre du terminal initiale */
.terminal-window {
    background: #000;
    border: 2px solid #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    text-align: left;
    transition: opacity 0.5s ease-out;
    max-width: 700px; /* Terminal plus petit */
    width: 100%;
    margin: 0 auto 20px auto; /* Centre le terminal */
}

.terminal-header {
    background: #fff;
    color: #000;
    padding: 5px 10px;
    font-size: 1.2em;
    border-bottom: 2px solid #fff;
}

#terminal-content {
    padding: 15px;
    margin: 0;
    color: #fff;
    font-size: 1.5em;
    min-height: 150px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.typed-cursor {
    color: #fff;
    opacity: 1;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; }
}

.button-container {
    padding: 0 20px 20px 20px;
    text-align: center;
}

#exit-button {
    display: none;
    opacity: 0;
    transition: opacity 1s;
    font-family: 'VT323', monospace;
    font-size: 1.5em;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    padding: 5px 20px;
    cursor: pointer;
}

#exit-button:hover {
    background: #fff;
    color: #000;
}

/* Le logo */
#logo {
    display: none;
    opacity: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: -50px auto 0 auto;
    transition: opacity 3.5s ease-in-out;
    position: relative;
    /* animation: sharpPixelLoop 6s infinite linear; */
}

/* La navigation principale */
#main-nav {
    display: none;
    opacity: 0;
    margin-top: 5px !important;
    text-align: center;
    transition: opacity 3.5s ease-in-out;
}

#main-nav a, #main-nav span {
    font-family: 'VT323', monospace;
    font-size: 1.6em;
    color: #888;
    text-decoration: none;
    letter-spacing: 3px;
    margin: 0 10px;
    transition: color 0.3s;
}

#main-nav a:hover {
    color: #fff;
    text-shadow: none;
}

/* --- Styles pour les terminaux Modals (Pop-up) --- */

.modal-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.modal-terminal.is-visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    background: #000;
    border: 2px solid #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    text-align: left;
}

.modal-content .terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal-button {
    background: none;
    border: 1px solid #000;
    color: #000;
    font-family: 'VT323', monospace;
    font-size: 1em;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 15px;
}
.close-modal-button:hover {
    background: #000;
    color: #fff;
}

.modal-body {
    padding: 20px;
    font-size: 1.3em;
    color: #fff;
    min-height: 100px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 1em 0;
}

/* --- Styles pour les boutons liens dans les modals --- */

.modal-link-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1em;
    margin-bottom: 1em;
}

a.modal-button {
    font-family: 'VT323', monospace;
    font-size: 1.2em;
    text-decoration: none;
    border: 2px solid #fff;
    color: #fff;
    background-color: #000;
    padding: 5px 15px;
    transition: all 0.3s;
    display: inline-block;
    margin-bottom: 0;
}

a.modal-button:hover {
    background-color: #fff;
    color: #000;
    text-decoration: none;
}

.modal-body a:not(.modal-button) {
    color: #00ff00;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5em;
}

.modal-body a:not(.modal-button):hover {
    color: #fff;
    text-decoration: underline;
}

/* --- NOUVEAU: Styles pour le Modal Password --- */

.password-input-line {
    display: flex;
    align-items: center;
    margin-top: 0.5em;
    margin-bottom: 1em;
}

.password-input-line > span {
    margin-right: 10px;
    font-size: 1.3em;
    color: #fff;
}

#password-input {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 1.3em;
    padding: 2px 5px;
    flex-grow: 1;
    caret-shape: block;
}

#password-input:focus {
    outline: none;
    border-color: #00ff00;
}

.error-message {
    color: #ff4136; /* Rouge pour l'erreur */
    margin-top: 1em;
}