* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Styles pour le statut du serveur */
.server-status {
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.server-status.online {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.server-status.offline {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
}

.status-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-icon.online {
    background-color: #4CAF50;
}

.status-icon.offline {
    background-color: #f44336;
}

.upload-container {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-content {
    border: 2px dashed #6c63ff;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-content.disabled {
    border-color: #ccc;
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.upload-content.disabled * {
    pointer-events: none;
}

.upload-content.drag-over {
    background-color: rgba(108, 99, 255, 0.1);
    border-color: #4b45b2;
}

#uploadIcon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.upload-content p {
    color: #666;
    margin: 1rem 0;
}

.sub-text {
    font-size: 0.9rem;
    color: #999 !important;
}

.upload-button {
    background-color: #6c63ff;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.upload-button:hover {
    background-color: #4b45b2;
}

.upload-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.file-list {
    margin-top: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    opacity: 1;
}

.file-item.deleting {
    opacity: 0.5;
    background-color: #ffebee;
    transform: translateX(10px);
}

.file-item.deleted {
    background-color: #f5f5f5;
    opacity: 0.7;
}

.file-item.deleted .file-name,
.file-item.deleted .file-size {
    text-decoration: line-through;
    color: #999;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-right: 1rem;
    min-width: 0;
}

.file-name {
    color: #333;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.progress {
    width: 200px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin: 0 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background-color: #6c63ff;
    width: 0;
    transition: width 0.3s ease;
}

.delete-button {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: color 0.3s ease;
}

.delete-button:hover {
    color: #c82333;
}

.upload-status {
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.upload-status.success {
    color: #4CAF50;
}

.upload-status.error {
    color: #f44336;
}

.upload-status.deleted {
    color: #666;
}

/* Styles pour les étapes */
.step-container {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.step-container.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Styles pour le select de classe */
.select-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.class-select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.class-select:hover {
    border-color: #6c63ff;
}

.class-select:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    font-size: 0.8rem;
}

/* Styles pour l'input de prénom */
.input-wrapper {
    margin-bottom: 1.5rem;
}

.name-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.name-input:hover {
    border-color: #6c63ff;
}

.name-input:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* Styles pour les boutons */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.next-button, .back-button {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.next-button {
    background-color: #6c63ff;
    color: white;
}

.next-button:hover:not(:disabled) {
    background-color: #4b45b2;
}

.next-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.back-button {
    background-color: #f5f5f5;
    color: #666;
}

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

/* Styles pour l'affichage des informations de l'élève */
.student-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #666;
}

#studentClassDisplay {
    font-weight: 600;
    color: #6c63ff;
}

#studentNameDisplay {
    font-weight: 600;
    color: #333;
}

/* Styles pour l'affichage de la classe sélectionnée */
.selected-class-display {
    text-align: center;
    color: #6c63ff;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: rgba(108, 99, 255, 0.1);
    border-radius: 6px;
}

/* Styles pour l'enregistreur audio */
.audio-recorder-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.audio-recorder-container h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.recorder-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.record-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.record-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#startRecording {
    background-color: #dc3545;
    color: white;
}

#startRecording:hover:not(:disabled) {
    background-color: #c82333;
}

#stopRecording {
    background-color: #6c757d;
    color: white;
}

#stopRecording:hover:not(:disabled) {
    background-color: #5a6268;
}

.record-icon, .stop-icon, .pause-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.record-icon {
    background-color: white;
    animation: pulse 2s infinite;
}

.stop-icon {
    background-color: white;
}

.pause-icon {
    position: relative;
    background: transparent;
    width: 12px;
    height: 12px;
}

.pause-icon::before,
.pause-icon::after {
    content: '';
    position: absolute;
    top: 0;
    width: 4px;
    height: 12px;
    background-color: white;
    border-radius: 2px;
}

.pause-icon::before {
    left: 0;
}

.pause-icon::after {
    right: 0;
}

#pauseRecording {
    background-color: #ffc107;
    color: white;
}

#pauseRecording:hover:not(:disabled) {
    background-color: #e0a800;
}

#pauseRecording.paused {
    background-color: #28a745;
}

#pauseRecording.paused .pause-icon::before {
    left: 2px;
    transform: rotate(-45deg);
}

#pauseRecording.paused .pause-icon::after {
    right: 2px;
    transform: rotate(45deg);
}

.recording-timer {
    font-size: 1.2rem;
    font-weight: 600;
    color: #dc3545;
    min-width: 80px;
    text-align: center;
}

.audio-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.audio-preview.hidden {
    display: none;
}

.audio-preview audio {
    width: 100%;
    margin-bottom: 1rem;
}

.audio-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.save-button, .discard-button {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-button {
    background-color: #28a745;
    color: white;
}

.save-button:hover {
    background-color: #218838;
}

.discard-button {
    background-color: #dc3545;
    color: white;
}

.discard-button:hover {
    background-color: #c82333;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Styles pour le mode enregistrement actif */
.recording-active {
    animation: recordingPulse 2s infinite;
}

@keyframes recordingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Styles responsives pour mobile */
@media screen and (max-width: 768px) {
    .audio-recorder-container {
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background-color: #fff;
    }

    .recorder-controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .record-button {
        flex: 1 1 calc(100% - 0.5rem);
        min-width: calc(50% - 0.5rem);
    }

    .recording-timer {
        flex: 0 0 100%;
        order: -1;
        margin-bottom: 1rem;
    }

    .pause-icon::before,
    .pause-icon::after {
        width: 4px;
        height: 16px;
    }

    .audio-preview {
        margin: 1rem -1rem 0 -1rem;
        padding: 1rem;
        background-color: #f8f9fa;
    }

    .audio-preview audio {
        width: calc(100% + 2rem);
        margin: 0 -1rem;
        background-color: white;
        padding: 0.5rem;
    }

    .audio-controls {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.5rem;
    }

    .save-button, .discard-button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    /* Ajustements pour le conteneur principal sur mobile */
    .step-container {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 8px;
    }

    .upload-container {
        padding: 0;
        box-shadow: none;
        background-color: transparent;
    }

    /* Amélioration de la visibilité des boutons d'enregistrement */
    #startRecording {
        background-color: #dc3545;
        font-weight: 500;
    }

    #stopRecording {
        background-color: #6c757d;
        font-weight: 500;
    }

    .record-icon, .stop-icon {
        width: 16px;
        height: 16px;
    }

    /* Amélioration de la visibilité du timer */
    .recording-timer {
        background-color: #fff;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* Ajustement de l'espacement entre l'enregistreur et la zone de dépôt */
    .upload-content {
        margin-top: 1rem;
        padding: 1rem;
        border: 2px dashed #e0e0e0;
        border-radius: 8px;
    }

    .pause-message {
        margin: -1rem -1rem 1rem -1rem;
        border-radius: 0;
    }
}

/* Ajustements supplémentaires pour les très petits écrans */
@media screen and (max-width: 380px) {
    .audio-recorder-container h3 {
        font-size: 1.1rem;
    }

    .record-button {
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    .recording-timer {
        font-size: 1.3rem;
    }
}

.pause-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 