@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');
body::before {
    background-position: center;
    background-image: url('/student-experiment/v3/img/main-bg.jpeg') !important;
    background-size: cover !important;
    position: fixed !important;
    filter: brightness(100%) !important;
    background-position: center !important;
    content: '';
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
body {
    color: var(--text-1);
    font-family: "Atkinson Hyperlegible", serif;
    font-weight: 400;
    background-color: transparent !important;
}

.title{
    font-family: "Varela Round", serif;
    font-weight: bold;
}
.form-container,
#mission-statement,
#mission-feedback,
.form-container .btn,
.form-container .form-control,
.form-container .form-select,
#btn-submit-exercise,
#btn-next-mission {
    font-size: 18px;
}
.form-container h1,
.form-container h2,
.container h2.title {
    font-size: 34px;
}
.container h3.title {
    font-size: 30px;
}
pre {
   white-space: pre-wrap;             /* CSS3 */
}
.answer-true{
    background-color: #51d19596;
    color: var(--text-0);
    border: 1px solid #025a31;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}
.answer-false{
    background-color: #e03c4a7c;
    color: var(--text-0);
    border: 1px solid #6a171f;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.form-container {
    max-width: 700px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-1)
}
.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

.thank-you-message {
    display: none;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    min-height: 60vh;
}
#code {
    font-size: 26px;
    font-weight: bold;
    color: #155724;
    border: 2px solid #155724;
    padding: 10px;
    border-radius: 15px;
    width: fit-content;
    margin: 0 auto;
}

.container {
    width: calc(100% - 24px);
    max-width: 1680px;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 30px;
    background-color: var(--bg-1);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}
p {
    line-height: 1.6;
}
.section-title {
    font-weight: bold;
    margin-top: 20px;
    color: var(--text-1);
}
.hidden {
    display: none;
}
/* Cacher les boutons radio */
input[name="answer-qcm"] {
    display: none;
}

/* Style des labels comme des boutons */
.answer-label-qcm {
    display: block;
    padding: 10px;
    border: 1px solid #0d6efd;
    border-radius: 5px;
    text-align: center;
    color: #0d6efd;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

/* Style pour le label lorsqu'il est sélectionné */
input[name="answer-qcm"]:checked + .answer-label-qcm {
    background-color: #0d6efd;
    color: white;
}
.answer-correct {
    background-color: #51d19596 !important;
    border: 1px solid #025a31 !important;
    color: white !important;
}
.answer-incorrect {
    background-color: #e03c4a7c !important;
    border: 1px solid #6a171f !important;
    color: white !important;
}

.container-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .iframe-wrapper {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.button-filler-container {
    position: relative;
    text-align: center;
}

.button-filler {
    position: relative;
    width: 300px;
    height: 60px;
    background-color: #6bbf76;
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 18px;
    cursor: not-allowed;
    overflow: hidden;
    outline: none;
}

.button-filler span {
    position: relative;
    z-index: 1;
}

.button-filler .fill-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #4fa85a;
    transition: width 0.5s ease;
}

.dropzone, .items {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px dashed #ccc;
    padding: 10px;
    background-color: var(--bg-2);
    min-height: 260px;
}

.dropzone {
    background-color: var(--bg-2);
    border: 1px double #008820;
    position: relative;
}

#dd-content img.item:not(.img-half) {
    width: 80%;
    cursor: grab;
    max-width: 500px;
}
img.img-half {
    width: 35%;
}

#dd-content .fa-angles-right, #dd-content .fa-angles-down {
    align-self: center;
    justify-self: center;
}

#thank-you #code{
    cursor: pointer;
}
#thank-you #code:hover{
    color: white;
    background-color: var(--vitta-green);
}

.table{
    color: var(--text-1);
}

#accountStep {
    padding: 10px;
    display: block;
    border: 1px solid var(--text-3);
    border-radius: 10px;
    text-align: center;
    background-color: var(--bg-1);
}

#accountStep hr {
    border-top: 1px solid var(--text-1);
}

#separatorOr,
#accountStep hr {
    opacity: 0.5;
    width: 60%;
    margin: 1rem auto;
}

#accountStep ul {
    text-align: left;
    margin: 0 auto;
    width: 56%;
}
#leftPartNoUser {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}
#separatorOr {
    width: 100%;
    margin: 0.25rem auto;
    background: var(--bg-1);
    text-align: center;
    position: relative;
    z-index: 1;
    font-weight: 700;
    text-shadow:
        2px 0 0 var(--bg-1),
        -2px 0 0 var(--bg-1),
        0 2px 0 var(--bg-1),
        0 -2px 0 var(--bg-1),

        3px 0 0 var(--bg-1),
        -3px 0 0 var(--bg-1),
        0 3px 0 var(--bg-1),
        0 -3px 0 var(--bg-1),

        1px 1px var(--bg-1),
        1px -1px 0 var(--bg-1),
        1px -1px 0 var(--bg-1),
        -1px 1px 0 var(--bg-1),

        1px 1px var(--bg-1),
        1px -2px 0 var(--bg-1),
        1px -2px 0 var(--bg-1),
        -2px 1px 0 var(--bg-1);

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#separatorOr::before {
    content: ' ';
    position: absolute;

    width: 100%;
    top: 50%;
    left: 0px;

    z-index: -1;
    height: 1px;

    background-color: var(--text-1);
    border: none;
}

.legend-sims {
    list-style: none;
    padding: 10px 16px;
    margin: 12px 0;
    background-color: var(--bg-2);
    border-radius: 10px;
    columns: 2;
    font-size: 17px;
}
.legend-sims li { break-inside: avoid; }

.sims-item {
    padding: 10px 12px;
    border: 1px solid var(--bg-2);
    border-radius: 10px;
}
.sims-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sims-radio {
    flex: 1 1 auto;
    min-width: 56px;
    text-align: center;
    cursor: pointer;
    margin: 0;
}
.sims-radio input { display: none; }
.sims-radio span {
    display: block;
    padding: 8px 0;
    border: 1px solid #0d6efd;
    border-radius: 8px;
    color: #0d6efd;
    transition: background-color 0.15s, color 0.15s;
}
.sims-radio input:checked + span {
    background-color: #0d6efd;
    color: #fff;
}

.likert-row { display: flex; flex-wrap: wrap; gap: 6px; }
.likert-row .form-check-inline { margin-right: 0; }

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 520px;
}
.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background-color: var(--bg-2);
    border: 1px solid #008820;
    border-radius: 10px;
    cursor: grab;
}
.ranking-item .rank-index {
    font-weight: bold;
    font-size: 21px;
    width: 28px;
    text-align: center;
    color: #008820;
}
.ranking-item .rank-handle { margin-left: auto; opacity: 0.5; }
.sortable-ghost { opacity: 0.4; }

.mission-feedback { margin-top: 16px; }
.mission-feedback img { max-width: 320px; border: 1px solid var(--bg-4); border-radius: 8px; margin-top: 8px; }
.mission-progress { font-weight: bold; color: #008820; }

.tts-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 14px 0;
}
.tts-text { flex: 1 1 auto; min-width: 0; }
.tts-block.hidden { display: none; }
.form-container .tts-block { margin: 0 0 1rem; }
.mission-feedback .tts-block { margin: 0; }
.tts-text > :first-child { margin-top: 0; }
.tts-text > :last-child { margin-bottom: 0; }

.tts-btn {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin-top: 2px;
    border: none;
    border-radius: 50%;
    background-color: rgba(107, 191, 118, 0.16);
    color: #2f8f43;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.tts-btn:hover { background-color: rgba(107, 191, 118, 0.32); }
.tts-btn:active { transform: scale(0.92); }
.tts-btn.playing { background-color: rgba(107, 191, 118, 0.5); color: #1e6b2e; }
.tts-btn.playing i { animation: tts-pulse 1s ease-in-out infinite; }
@keyframes tts-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.mission-cmds,
.solution-code {
    -webkit-user-select: none;
    user-select: none;
}
.mission-cmds img { -webkit-user-drag: none; }
.mission-cmds { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.mission-cmd { display: block; max-width: 230px; height: auto; }
.mission-cmd.code {
    max-width: 220px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px 8px;
}