/* assets/styles.css */
:root {
    --column-gap: 50px; /* Intervalle entre colonnes, modifiable */
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto; /* Centrage horizontal */
    text-align: left;
    font-size: 0.9em;
    color: white;
    padding: 10px;
    background: none;
    margin-top: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* Assure que .container reste dans le flux normal */
}

/* S'assurer que le parent (body) ne perturbe pas le centrage */
body {
    background-image: url('images/starry-background.jpg');
    background-repeat: repeat;
    background-size: 30%;
    background-position: center;
    min-height: 50vh;
    margin: 0;
    padding: 0; /* Ajouté pour éviter des marges inattendues */
    font-family: Arial, sans-serif;
    position: relative; /* Contexte de positionnement */
}
p { text-indent: 25px; }
.titre {
    text-align: center;
    margin: 80px auto 0 auto;
    color:#deeef4;
    font-size: 2em;
    font-weight: bold;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(3, 7, 33, 0.9);
    width: max-content;
}
.commentaires {
    text-align: center;
    font-style: italic;
    margin: 0 auto 0 auto;
    color: #e3fafd;
    font-size: 1.1em;
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    background-color: rgb(0, 0, 0);
    width: max-content;
}
.tableau {
    width: 1200px;
    height: 848px;
    background-image: url('images/elements-grid.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    border: 2px solid #ccc;
    box-sizing: border-box;
    gap: 91px; /* Utilise la variable pour l'intervalle */
    padding: 0 53px 0 58px;
}
.colonne-header {
    text-align: center;
    margin-bottom: 10px;
}

.colonne-header img {
    width: 50px;
    height: 50px;
    cursor: pointer;
}

/* .term.incorrect-term {
    border: 3px dashed #ff0000;
}

.term.selected {
    background: #ff0000;
}
*/
.error-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.term-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-group {
    display: flex;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.button {
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    background-color: #7e6308;
    color: white;
    font-size:1em;
    text-decoration: none;
    border-radius: 10px;
    border: outset 3px #ffe247;
    cursor: pointer;
}

.button:hover {
    background-color: #b47c43;
}

.button.reset {
    background: #ff4444;
}

.button.reset:hover {
    background: #cc0000;
}

.buttons {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.error-message {
    color: red;
    margin: 10px 0;
}

.modal-button {
    padding: 10px 20px;
    font-size: 0.8em;
    background: #645500;
    color: white;
    border: inset 3px #ffcf00;
    border-radius: 10px;
    cursor: pointer;
    width: 95%;
}

.modal-button:hover {
    background: #93790b;
}

.element-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    position: relative;
    z-index: 10;
}

.element-icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: block !important;
}

.element-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error {
    animation: blink 1s infinite;
}

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

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border-bottom: groove 1px #294867;
    padding: 10px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.top-bar a, .top-bar span {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

.top-bar a:hover {
    text-decoration: underline;
}

.language-select {
    margin: 0 10px;
}

.global-icons a {
    text-decoration: none;
}

.global-icons img {
    width: 30px;
    height: 30px;
    opacity: 0.7;
}

.global-icons img:hover {
    opacity: 1;
}

.navigation {
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
}

.navigation a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    padding: 5px 10px;
    border: 2px outset #ffffff;
    border-radius: 3px;
    font-size: 14px;
}

.navigation a:hover {
    background: rgba(255, 255, 255, 0.2);
}

h1, h2, h3 {
    color: #ddd;
}

.element.fire { color: #d32f2f; }
.element.earth { color: #388e3c; }
.element.air { color: #0288d1; }
.element.water { color: #7b1fa2; }

.group-1 { color: #ff5555; }
.group-2 { color: #55ff55; }
.group-3 { color: #5555ff; }
.group-4 { color: #ff55ff; }
.group-5 { color: #ffff55; }
.group-6 { color: #55ffff; }
.group-7 { color: #ffaa55; }
.group-8 { color: #aa55ff; }

.plateau {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 20px 0;
}

.column {
    min-height: 200px;
    padding: 10px;
    border: 2px dashed #555;
    border-radius: 5px;
}

.column h3 {
    text-align: center;
    margin: 0 0 10px;
}

#term-area .term {
    display: inline-block;
    font-size: 0.8em;
    font-weight: bold;
    background: #e0e0e0;
    color: #000;
    border: 3px inset #ccc;
    padding: 5px 10px;
    margin: 5px;
    cursor: pointer;
    text-align: center;
}

#correction {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
}

.descriptions {
    margin-top: 20px;
}

.description {
    padding: 5px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    margin: 10px 0;
    font-size: 1.1em;
    line-height: 1.5em;
    text-indent: 40px;
    text-align: justify;
}

input[type="radio"] {
    margin: 5px;
}

input[type="radio"]:disabled {
    opacity: 0.5;
}
.info-message {
    color: #87CEEB;
    margin: 10px 0;
    font-size: 1em;
}

.version-selector {
    margin-top: 10px;
}

.version-selector select {
    padding: 5px;
    font-size: 1em;
}

.move-term-window {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    display: none;
}

.move-term-window label {
    margin: 0 10px;
}

.welcome-content {
    line-height: 1.6;
    text-align-last: left;
    padding:30px;
    background-color: rgba(0,20,50,0.95);
    border-radius: 20px;
    margin-top: 20px;
    color:lightgray;
    font-size: 1.2em;
}
.welcome-content p {
    margin-bottom: 15px;
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    width: 100%;
}
.header {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    text-align: center;
}
.header nav {
    display: flex;
    font-size: 0.9rem;
    font-style: italic;
    justify-content: left;
    gap: 20px;
}
.header nav a {
    color: steelblue;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}
.header nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

h1 {
    margin: 0;
    font-size: 22px; /* Réduit légèrement si nécessaire */
}
.term-counter {
    font-size: 14px;
    color: #9fb177;
    text-align: center;
}

.term-form {
    display: inline;
}

.button.reset {
    padding: 5px 10px;
    font-size: 14px; /* Bouton plus petit */
}
.index-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.terms-table, .versions-table {
    width: 90%;
    max-height: 600px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 10px;
    margin: 10px auto;
    background-color: #11084f;
    color:#bae3e2;
}

.terms-table table, .versions-table table {
    width: 100%;
    border-collapse: collapse;
}

.terms-table td, .versions-table th, .versions-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #929292;
}

.terms-table th {
    padding: 10px;
    text-align: center;
    border-bottom: 3px solid #4f7fdb;
}

.first-column {
    font-weight: bold;
    margin: 0 auto;
    font-size: 1.2em;
}

.symbol-img {
    width: 20px;
    height: 20px;
}

.preview-button {
    padding: 5px 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.preview-button:hover {
    background: #45a049;
}

.replace-button {
    padding: 5px 10px;
    background: #0288d1;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.replace-button:hover {
    background: #0277bd;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    z-index: 1000;
    max-width: 900px;
    text-align: center;
}
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.index-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}
.index-modal.active {
    display: flex;
}
.index-modal-content {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    width: 95% !important;
    max-width: 800px !important;
    margin: auto;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#symbol-button:disabled {
    background: deepbluesky;
    cursor: not-allowed;
}
.confirmation-message {
    color: green;
    margin: 10px 0;
    padding: 10px;
    background-color: #e6ffe6;
    border: 1px solid #ccffcc;
    border-radius: 4px;
    text-align: center;
}
.edit-term-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.edit-term-modal-content {
    display: block;
    width: 90% !important;          /* Utilise 90% de la largeur disponible */
    max-width: 1000px !important;   /* Mais ne dépasse pas 1000px */
    max-height: 85vh;    /* Ne dépasse pas 85% de la hauteur de l'écran */
    overflow-y: auto;    /* Ajoute un scroll si le texte est trop long */
    position: relative;
    background: #1a1a1a;
    padding: 35px !important;
    line-height: 1.7;
    font-size: 1.1rem;
    border: 1px solid #4CAF50;
    border-radius: 15px;
    color: #eee;
}

@media (max-width: 600px) {
    .edit-term-modal-content {
        width: 95%;
        max-width: 95%;
    }
}
.edit-term-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
    display: block;
}
.edit-term-table th, .edit-term-table td {
    border: 1px solid #272727;
    padding: 8px;
    text-align: left;
    background-color: rgb(197, 224, 247);
    color: black;
}
.edit-term-table th {
    background: #070b3b;
    color:azure;
}
.edit-term-table td.text-preview {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.edit-term-table button {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}
.edit-term-table button.keep-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.edit-term-form {
    display: block;
    margin-top : 20px;
    font-size : 1em;
}
.edit-term-form textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    font-size: 1em;
}
.edit-term-form .radio-group {
    margin: 10px 0;
}
.edit-term-form button {
    padding: 10px 20px;
    background: #776606;
    color: #fff;
    border: outset 3px #c69942;
    cursor: pointer;
}
.edit-term-form button:hover {
    background: #b38a00;
}
.text-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
}
.text-modal-content {
    background: #fff;
    color: #000;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    margin: 50px auto;
    max-height: 80vh;
    overflow-y: auto;
}
.text-modal-content button {
    padding: 10px 20px;
    background: #836501;
    color: #fff;
    border: outset 3px #982;
    cursor: pointer;
}
.close-button {
    padding: 10px 20px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}
.close-button:hover {
    background: #5a6268;
}
.edit-icon {
    width: 40px;
    height: 40px;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 10px;
    z-index: 1000;
    position: relative;
    pointer-events: auto;
}
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start; /* ou space-between pour un espace plus grand */
    align-items: center;
    flex-wrap: wrap;
}

#reset-button {
    margin-left: auto; /* Pousse le bouton à droite */
    background: #c80000;
    color: #fff;
    font-weight: bold;
    border: outset 5px red;
}
#reset-button:hover:not(:disabled) {
    background: #ff0000;
}

.index_text {
    text-align: justify;
    font-size: 1.2em;
    font-family: PT Serif;
    line-height: 130%;
    text-indent: 30px;
    font-weight: lighter;
    margin-top: 0px;
    margin-bottom: 20px;
}

.index_text span {
    color: #f55;
}

.aspect-illustration-container {
    position: relative;
    width: 720px;
    height: 720px;
    background-size: cover;
}

.planet-img {
    position: absolute;
    width: 360px;
    height: 360px;
}

.planet-img.p1 { top: 20px; left: 20px; }
.planet-img.p2 { bottom: 20px; right: 20px; }

.main-illustration {
    width: 100%;
    height: auto;
}