body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7fa;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

h1 {
    text-align: center;
    color: #007bff;
    margin-bottom: 25px;
    font-size: 2.2em;
}

.input-section {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background-color: #fcfdff;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

textarea, input[type="number"], select {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
    background-color: #f8f9fa;
    resize: vertical;
}

input[type="number"] {
    width: 100px; /* Plus petit pour les nombres */
}

select {
    width: calc(100% - 22px); /* Ajuster pour select */
    appearance: none; /* Supprime le style par défaut des navigateurs */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2C118.8L146.2%2C259.4L5.4%2C118.8h281.6z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%, 0 0;
    background-size: 0.65em auto, 100%;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
    margin-right: 10px;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    display: none;
    font-weight: 500;
}

.error.show {
    display: block;
}

/* Styles pour le contrôle du microphone sur la page de configuration */
.microphone-control {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    background-color: #fcfdff;
    margin-top: 20px;
}
.microphone-control h3 {
    margin-top: 0;
    color: #495057;
}

#mic-status, #current-volume {
    position: relative; /* Les rendre relatifs pour la page de config */
    top: auto;
    left: auto;
    margin-top: 10px; /* Espace entre eux */
    display: inline-block; /* Permet qu'ils soient côte à côte */
    margin-right: 10px; /* Espacement horizontal */
}

.status-indicator {
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 500;
    z-index: 5;
}

#mic-status {
    background-color: #e9ecef;
    color: #495057;
}

#mic-status.active {
    background-color: #d4edda;
    color: #155724;
}

#mic-status.error-mic {
    background-color: #f8d7da;
    color: #721c24;
}

#current-volume {
    background-color: #ffeeba;
    color: #856404;
}

.mic-toggle-button {
    background-color: #17a2b8; /* Bleu-cyan pour le micro */
    padding: 10px 15px;
    font-size: 0.9em;
    z-index: 10;
    margin-top: 5px;
    margin-right: 10px;
}

.mic-toggle-button:hover {
    background-color: #138496;
}

/* Style pour la page de dessin (plein écran) */
.drawing-page {
    margin: 0;
    overflow: hidden; /* Empêche les barres de défilement */
}

.svg-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #eaf7ff;
    display: flex; /* Utilise flexbox pour centrer le contenu */
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    overflow: hidden;
}

/* Styles pour l'élément SVG à l'intérieur du conteneur fullscreen */
.svg-fullscreen svg {
    max-width: 90%;   /* L'SVG ne dépassera pas 90% de la largeur de son parent */
    max-height: 90%;  /* L'SVG ne dépassera pas 90% de la hauteur de son parent */
    display: block;   /* Élimine l'espace sous l'SVG (comportement inline par défaut) */
    /* Les attributs width="100%" et height="100%" dans le JS le feront s'adapter */
}

.svg-fullscreen svg * {
    fill: none; 
    stroke: #343a40; 
    stroke-width: 10px; 
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Overlays Pause/Dessin - NOUVELLES POSITIONS */
#fullscreen-svg-container.paused::before {
    content: 'Trop de bruit dans la classe !';
    position: absolute;
    bottom: 20px; /* Position en bas */
    left: 20px; /* Position à gauche */
    transform: none; /* Annule le transform: translate(-50%, -50%) */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 2em; /* Légèrement plus petit pour le coin */
    font-weight: bold;
    color: #dc3545;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

#fullscreen-svg-container.drawing::before {
    content: 'Vous êtes bien sage !';
    position: absolute;
    bottom: 20px; /* Position en bas */
    left: 20px; /* Position à gauche */
    transform: none; /* Annule le transform: translate(-50%, -50%) */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.5em; /* Légèrement plus petit pour le coin */
    font-weight: bold;
    color: #28a745;
    z-index: 10;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Bouton de retour sur la page de dessin */
.back-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #6c757d;
    padding: 10px 20px;
    font-size: 1em;
    z-index: 10;
}

.back-button:hover {
    background-color: #5a6268;
}