body{
    margin:0;
    padding:0;
    font-family:Arial;
    background:#f2f2f2;
}

.container{
    max-width:900px;
    margin:auto;
    padding:10px;
}

h1{
    text-align:center;
}

.topbar{
    margin-bottom:10px;
}

input,
textarea{

    width:100%;

    box-sizing:border-box;

    padding:10px;

    border-radius:10px;

    border:1px solid #ccc;

}

textarea{

    height:120px;

    resize:vertical;

}

.math-toolbar{

    display:flex;

    flex-wrap:wrap;

    gap:5px;

    margin:10px 0;

}

.math-toolbar button,
.buttons button,
.audio-controls button{

    padding:10px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    background:#1976d2;

    color:white;

}

.buttons,
.audio-controls{

    display:flex;

    gap:10px;

    margin:10px 0;

    flex-wrap:wrap;

}

#chat{

    background:white;

    border-radius:10px;

    padding:10px;

    height:500px;

    overflow-y:auto;

    display:flex;

    flex-direction:column;

    gap:10px;

}

.message{

    padding:10px;

    border-radius:10px;

    background:#e3f2fd;

    word-wrap:break-word;

}

.math{

    border-left:5px solid #ff9800;

    background:#fff8e1;

    font-family:Courier New;

}

.audio{

    background:#f1f8e9;

}

.date{

    font-size:12px;

    color:gray;

    margin-bottom:5px;

}

.copy-btn{

    margin-top:10px;

    padding:6px 12px;

    border:none;

    border-radius:8px;

    background:#4caf50;

    color:white;

    cursor:pointer;

    font-size:14px;

}

.copy-btn:hover{

    opacity:0.9;

}

#recordStatus{

    margin-top:10px;

    font-weight:bold;

}

#audioVisualizer{

    display:flex;

    align-items:flex-end;

    gap:5px;

    height:40px;

    margin-top:10px;

}

#audioVisualizer div{

    width:8px;

    height:10px;

    background:#1976d2;

    border-radius:5px;

}

#audioVisualizer.recording div{

    animation:audioWave 0.8s infinite alternate;

}

#audioVisualizer.recording div:nth-child(2){

    animation-delay:0.1s;

}

#audioVisualizer.recording div:nth-child(3){

    animation-delay:0.2s;

}

#audioVisualizer.recording div:nth-child(4){

    animation-delay:0.3s;

}

#audioVisualizer.recording div:nth-child(5){

    animation-delay:0.4s;

}

@keyframes audioWave{

    from{
        height:10px;
    }

    to{
        height:40px;
    }

}

audio{

    width:100%;

    margin-top:10px;

}
/* ======================================
   EDITEUR COLLABORATIF
====================================== */

.editor-toolbar{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    margin:15px 0;

}

.editor-toolbar select,
.editor-toolbar input[type=file]{

    flex:1;

    min-width:180px;

}

#editorContent{

    width:100%;

    min-height:120px;

    margin-bottom:10px;

}

#preview{

    background:white;

    border-radius:10px;

    padding:15px;

    border:1px solid #ddd;

    min-height:300px;

    margin-top:10px;

    overflow:auto;

}

#preview img{

    max-width:100%;

    border-radius:8px;

    margin:10px 0;

}

#preview video{

    max-width:100%;

    border-radius:8px;

    margin:10px 0;

}

#preview audio{

    width:100%;

    margin:10px 0;

}

.box{

    background:#eef7ff;

    border-left:5px solid #2196f3;

    padding:12px;

    margin:10px 0;

    border-radius:5px;

}

.copy{

    background:#222;

    color:#fff;

    padding:10px;

    border-radius:5px;

    overflow:auto;

    font-family:Courier New, monospace;

}

#saveStatus{

    margin-top:10px;

    color:#4caf50;

    font-weight:bold;

}