body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    background-color: #1a1d21;
    color: #e0e0e0;
    line-height: 1.5;
}

.navbar {
    background-color: #2c3035;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 1.5rem;
}

.nav-link {
    color: #c0c0c0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

/* Style pour un bouton de déconnexion dans la navbar */
#logout-button-nav {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
#logout-button-nav:hover {
    background-color: #c9302c;
}


.main-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #25282c;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-align: center;
}

h1 { 
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

#response-area h2 { 
    color: #f0f0f0;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    text-align: left;
}

textarea {
    width: calc(100% - 22px);
    min-height: 120px;
    padding: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #44484d;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
    background-color: #1e2124;
    color: #e0e0e0;
    line-height: 1.4;
}

textarea::placeholder {
    color: #777c82;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #555c63;
    cursor: not-allowed;
}

#response-area {
    margin-top: 2rem;
    text-align: left;
    background-color: #1e2124;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #44484d;
}

#response-text {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap; 
}

#response-text h1,
#response-text h2,
#response-text h3,
#response-text h4,
#response-text h5,
#response-text h6 {
    color: #ffffff;
    margin-top: 1.2em;   
    margin-bottom: 0.6em; 
    line-height: 1.3;     
    font-weight: bold;
}

#response-text h1 { font-size: 2em; }
#response-text h2 { font-size: 1.75em; }
#response-text h3 { font-size: 1.5em; }
#response-text h4 { font-size: 1.25em; }
#response-text h5 { font-size: 1.1em; }
#response-text h6 { font-size: 1em; font-style: italic; }

#response-text p {
    margin-top: 0;
    margin-bottom: 0.8em;
}

#response-text strong { font-weight: bold; }
#response-text em { font-style: italic; }

#response-text ul,
#response-text ol {
    margin-left: 20px; 
    margin-bottom: 0.8em; 
    padding-left: 1.5em;
}

#response-text li { margin-bottom: 0.3em; }

#response-text pre {
    background-color: #16181a;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #3a3e42;
    margin-top: 0.5em;
    margin-bottom: 1em;
    line-height: 1.45;
}

#response-text code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background-color: #3a3e42;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

#response-text pre code {
    background-color: transparent;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

#response-text blockquote {
    border-left: 4px solid #555c63;
    padding-left: 1em;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0.8em;
    color: #b0b0b0;
}

#response-text a {
    color: #3498db;
    text-decoration: none;
}
#response-text a:hover { text-decoration: underline; }

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    padding: 20px;
}

#login-form {
    background-color: #25282c;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: left;
}

#login-form h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #c0c0c0;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: calc(100% - 22px); 
    padding: 10px;
    border: 1px solid #44484d;
    border-radius: 4px;
    background-color: #1e2124;
    color: #e0e0e0;
    font-size: 1rem;
}

#login-button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 0.5rem; 
}

#login-button:hover { background-color: #0056b3; }

.error-message {
    color: #d9534f;
    text-align: center;
    margin-top: 1rem;
    min-height: 1.2em;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    .nav-item {
        margin-left: 0;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    .nav-link, #logout-button-nav {
        display: block;
        padding: 0.5rem 0;
        width: 100%;
        text-align: left;
    }
     #logout-button-nav {
        box-sizing: border-box;
     }
    .main-container {
        margin: 1rem;
        padding: 1rem;
    }
    h1 { font-size: 1.8rem; }
    textarea { min-height: 100px; }
    #response-text h1 { font-size: 1.8em; }
    #response-text h2 { font-size: 1.6em; }
    #response-text h3 { font-size: 1.4em; }
    #response-text h4 { font-size: 1.2em; }
    #response-text h5 { font-size: 1.1em; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    #response-area h2 { font-size: 1.15rem; }
    button, #login-button {
        width: 100%;
        padding: 12px 0;
    }
    .nav-logo { align-self: center; }
    .nav-menu { align-items: center; }
    #response-text h1 { font-size: 1.6em; }
    #response-text h2 { font-size: 1.4em; }
    #response-text h3 { font-size: 1.2em; }
    #response-text h4 { font-size: 1.1em; }
    #response-text h5 { font-size: 1em; }
}