/* --- Style de la modale de code --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.is-open {
    display: flex;
}

.modal > div {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow-x: scroll;
}

.modal header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.modal header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal main {
    margin-top: 15px;
}

.modal pre {
    background: #f3f4f6;
    padding: 15px;
    overflow-x: auto;
    border-radius: 8px;
    max-height: 400px;
    height: 400px;
}

#copyButton {
    margin-top: 15px;
    background-color: #821fa0cc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#copyButton:hover {
    background-color: #821fa0cc;
}

.modal-tabs {
    display: flex;
    margin-top: 15px;
}

.modal-tabs .tab {
    flex: 1;
    padding: 10px;
    margin: 0 10px;
    background-color: #f3f4f6;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
}

.modal-tabs .tab.active {
    background-color: #821fa0cc;
    color: #fff;
}

.tab-content {
    display: none;
    margin-top: 15px;
}

.tab-content.active {
    display: block;
}

#copyMessage {
    display: none;
    margin-top: 10px;
    color: #821fa0cc;
    font-weight: bold;
    opacity: 0;
    text-align: center;
    transition: opacity 0.5s ease;
}

#copyMessage.show {
    display: block;
    opacity: 1;
}
