/* style.css : style informatique / terminal */

@font-face {
    font-family: "JetBrainsMono";
    src: url("JetBrainsMono-ExtraBold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

#terminal-title {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #33ff66;
    
    /* Animation */
    /* width: 100vw;*/
    will-change: width; /* ESSENTIEL pour Safari / WebView iOS */
    animation: typing 3s steps(50, end) forwards, blink 0.7s step-end infinite;
    
    -webkit-font-smoothing: antialiased;
}

@keyframes typing {
    from { width: 0ch; }
    to { width: 30ch; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

body {
    margin: 0;
    font-family: "JetBrainsMono", monospace;
    background-color: #121212; /* fond sombre style terminal */
    color: #00ff00; /* texte vert fluo */
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /*    align-items: center;*/
    /*    border: 2px solid #00ff00;*/
    padding: 20px;
    box-sizing: border-box;
    autocorrect: off;
    spellcheck: false;
}

* {
    -webkit-user-select: none;
    user-select: none;
}

/*body * {*/
/*    pointer-events: none;*/
/*}*/

input {
    pointer-events: auto;
}

div.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

button {
    background-color: #222;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 20px;
    font-family: "JetBrainsMono", monospace;
    font-size: 18px;
    cursor: pointer;
    margin-top: 15px;
}

button:hover {
    background-color: #333;
}

p, span {
    font-family: "JetBrainsMono", monospace;
    font-size: 20px;
    line-height: 1.5;
}

/* style “terminal clignotant” pour un curseur si besoin */
.cursor {
    display: inline-block;
    width: 10px;
    background-color: #00ff00;
    animation: blink 1s infinite;
}

/* ===== Modal EditQuestionView ===== */

.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.edit-modal-container {
    background-color: #0d0d0d;
    border: 2px solid #00ff00;
    border-radius: 6px;
    padding: 20px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 0 20px #00ff0077;
    font-family: "JetBrainsMono", monospace;
    color: #00ff00;
}

.edit-modal-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #00ff00;
    text-align: center;
}

.edit-modal textarea {
    width: 100%;
    height: 70px;
    background-color: #111;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px;
    font-family: monospace;
    box-sizing: border-box;
    margin-bottom: 12px;
    resize: none;
}

.edit-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-modal-buttons button {
    padding: 8px 14px;
    border: 1px solid #00ff00;
    font-family: "JetBrainsMono", monospace;
    background-color: #111;
    color: #00ff00;
    cursor: pointer;
}

.edit-modal-buttons button:hover {
    background-color: #222;
}

.edit-textarea {
    width: 100%;
    height: 70px;
    background-color: #111;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px;
    font-family: "JetBrainsMono", monospace;
    box-sizing: border-box;
    margin-bottom: 12px;
    resize: none;
    font-size: 15px;
    display: block;
    margin-bottom: 10px;
}

.alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alert-container {
    background: gray;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 80%;
    text-align: center;
}

.alert-message {
    margin: 15px 0;
}

.alert-btn {
    padding: 8px 16px;
    margin-left: 10px;
}

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.menu-bar {
    background: #ddd;
    padding: 10px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

#content {
    flex: 1;
    padding: 20px;
}

.reset-btn {
    margin-top: 10px;
}

.no-questions {
    margin-top: 120px;
}

.question-label {
    font-weight: bold;
    font-size: 18px;
    margin: 10px 0;
}

.progress-bar {
    width: calc(100vw - 40px); /* 20px de chaque côté */
    margin: 0 20px; /* espace gauche et droite */
    background: #111;
    height: 20px; /* tu peux ajuster la hauteur */
    border-radius: 10px; /* optionnel, arrondi des bords */
}

.answer-field {
    width: 100%;
    height: 70px;
    background-color: #111;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px;
    font-family: "JetBrainsMono", monospace;
    box-sizing: border-box;
    margin-bottom: 12px;
    resize: none;
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
}

.h-stack {
    justify-content: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: scroll;
    gap: 10px;
}

.scroll-view {
    item-height: 60;
    width: 100%;
    height: auto;
    padding: 5px;
    gap: 5px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    background-color: #121212;
}

.check-box {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.render-list-container {
    border: 1px solid #ccc;
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    position: relative;
}

.menu {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #999;
    padding: 5px;
    display: none;
    z-index: 10;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.modify-btn {
    display: block;
}

.del-btn {
    display: block;
}
