/* --- VARIABLES DE THEME (Par défaut: Mode Sombre) --- */
:root {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --input-bg: #252526;
    --border-color: #333;
    --primary-color: #4caf50;
    --secondary-color: #2196f3;
    --placeholder-color: #aaa;
}

/* --- THEME CLAIR (Surcharge des variables) --- */
body.light-mode {
    --bg-color: #f0f2f5;           /* Gris très clair */
    --container-bg: #ffffff;       /* Blanc pur */
    --text-color: #333333;         /* Gris foncé */
    --input-bg: #f9f9f9;           /* Blanc cassé */
    --border-color: #ccc;          /* Bordure grise */
    --placeholder-color: #666;
}

/* --- STYLES GENERAUX --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    transition: background-color 0.3s, color 0.3s; /* Transition fluide */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* Style du bouton thème */
.theme-btn {
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
}
.theme-btn:hover {
    background-color: var(--input-bg);
}

.input-group, .result-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--placeholder-color);
}

textarea, input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    height: 100px;
    resize: vertical;
}

textarea:focus, input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.btn {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
}

.primary { background-color: var(--primary-color); }
.primary:hover { opacity: 0.9; }

.secondary { background-color: var(--secondary-color); }
.secondary:hover { opacity: 0.9; }

footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--placeholder-color);
    margin-top: 1rem;
}