/***********/
/* GENERAL */
/* vietnamese */
@font-face {
  font-family: 'Afacad Flux';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(./icons/JVT_C8H4godlU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Afacad Flux';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(./icons/JVT_C8HogodlU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Afacad Flux';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(./icons/JVT_C8EIgo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html { font-size:100%; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; }
body { margin:0; font-family:'Afacad Flux', Helvetica, sans-serif; color:#333332; background-color:#f2f2f2; font-size:18px; }
* {-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
a { color:#545454; text-decoration:none; cursor:pointer; }
a:hover, a:focus { color:#370b52; text-decoration:none; }
ul.unstyled, ol.unstyled { margin-left:0; list-style:none; }
ul,ol { padding:0; margin:0 0 0 0; }
li { line-height:20px; }
img { width:auto\9; height:auto; max-width:100%; vertical-align:middle; border:0; -ms-interpolation-mode:bicubic; }
h1, h2, h3, h4, h5, h6 { margin:auto; font-weight:bold; line-height:20px; color:inherit; text-rendering:optimizelegibility; }
h1,h2,h3 { line-height:40px; }
h1 { font-size:38.5px; }
h2 { font-size:31.5px; }
h3 { font-size:24.5px; line-height:30px; }
h4 { font-size:17.5px; }
h5 { font-size:14px; }
h6 { font-size:11.9px; }
p { margin:0 0 5px; }
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display:block; }



:root {
    /* Palette monochrome en 8 niveaux de gris */
    --color-bg: #EAEAEA;
    --color-light: #FFFFFF;
    --color-medium: #CCCCCC;
    --color-dark: #666666;
    --color-text: #333333;
    --color-accent: #000000; /* Utilisé pour les bordures et les accents */
    --color-error: #CC0000;
}

html, body {
    /* Élimine les marges et paddings par défaut */
    margin: 0;
    padding: 0;
    /* Assure que le body prend toute la hauteur de la fenêtre */
    height: 100%;
    width: 100%;
}


body {
    background-color: var(--color-light);
    color: var(--color-text);
    display: flex;
    justify-content: center;
    margin: 0; 
    padding: 0;
}

#app-container {
    width: 600px;
    margin:auto;
    overflow:hidden;
}

/* --- En-tête --- */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px 18px 10px;
    border-bottom: 1px solid #000000;
    position: relative;
    z-index:99;
}

#logo {
    font-size: 22px;
    font-weight: light;
    color: var(--color-accent);
}
.first-bold {
    font-weight: bold;
}

#help-button {
    background: none;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 18px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    border-radius: 5px;
}

/* --- Plateau de Jeu --- */
#board-section {
    width:100%;
    padding-top: 8px;
    text-align: center;
    position: relative;
    z-index:99;
}

#backgammonBoard {
    /*border: 1px solid var(--color-medium);*/
    transform: scaleX(-1) translateX(0);
    width:95%
}

/* --- Contrôles de Jeu et Affichage --- */
#controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}

#run_simulation {
    padding: 10px 30px;
    font-size: 16px;
    background-color: var(--color-accent);
    color: var(--color-light);
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
#run_simulation:disabled {
    background-color: var(--color-dark);
    cursor: not-allowed;
}

#command_text {
    padding: 10px;
    width: 40%;
    text-align: center;
    font-size: 16px;
    background-color: var(--color-medium); /* Non cliquable */
    color: var(--color-text);
    border:0px;
}

#command_text:focus {
    outline: none; /* Supprime l'encadré par défaut du navigateur */
    border: none;  /* Supprime la bordure que vous pourriez avoir définie */
}
#dice-1-final, #dice-2-final {
    width:0px;
    height:0px;
    overflow:hidden;
    opacity:0;
    display:none;
    visibility:hidden;
}
.dice1, .dice2 {
    width:38px;
    height:38px;
    border-radius: 8px;
    background-color:#000000;
    color:#ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:5px;
    text-align:center;
}
.dice1 {
    margin-left:2%;
}
.dice2 {
    margin-left:-4%;
}
.d_one {
    display:none;
}
.d_two {
    line-height: 19px;
    display:none;
    margin-left: 0px;
    margin-top: -1px;
}
.d_three {
    line-height: 11px;
    display:none;
    margin-left: 0px;
    margin-top: -1px;
}
.d_four {
    line-height: 19px;
    display:none;
    margin-left: 0px;
    margin-top: -1px;
}
.d_five {
    line-height: 11px;
    display:none;
    margin-left: 0px;
    margin-top: -1px;
}
.d_six {
    line-height: 11px;
    display:none;
    margin-left: 0px;
    margin-top: -1px;
}

/* --- boite de texte --- */
#result_text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px 18px 10px;
    border-bottom: 1px solid #000000;
    text-align:center;
}
#run_anwser {
    width:100%;
}
#move_hints {
    width:0px;
    height:0px;
    overflow:hidden;
    opacity:0;
    display:none;
    visibility:hidden;
    
    
}

/* --- Clavier Virtuel --- */
#virtual-keyboard {
    padding: 18px 10px 0px 10px;
    border-top: 1px solid var(--color-medium);
    background-color: var(--color-light);
}

.keyboard-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.key-button {
    flex-grow: 1;
    margin: 2px;
    padding: 15px 0;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-dark);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s;
} 
.key-button-subm {
    flex-grow: 1;
    margin: 2px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--color-accent);
    border: none;
    border-radius: 5px;
}
#key-button-submit {
  width:100%;
  height:100%;
  line-height:30px;
    padding: 10px 0px;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0);
    color: var(--color-light);
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
#key-button-submit:disabled {
    background-color: var(--color-dark);
    cursor: not-allowed;
}

.key-button:active,  .key-button-sub:active {
    background-color: var(--color-medium);
}

#submit-key {
    background-color: var(--color-accent);
    color: var(--color-light);
    font-weight: bold;
}

.gametype-selector {
    flex-grow: 1;
    margin: 2px;
    padding: 15px 0;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-dark);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s;   
}

.gametype-selector:disabled {
    background-color: var(--color-medium);
    cursor: not-allowed;
}

.gamelist {
    flex-grow: 1;
    margin: 2px;
    padding: 15px 0;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-dark);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s;    
}

.gamelist:disabled {
    background-color: var(--color-medium);
    cursor: not-allowed;
}

.hintslist {
    flex-grow: 1;
    margin: 2px;
    padding: 15px 0;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-dark);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s;   
}

.hintslist:disabled {
    background-color: var(--color-medium);
    cursor: not-allowed;
}

#gnubg_log {
    display:none;
    width:96%;
    margin:0 2%;
    margin-bottom:15px;
    }


/* --- stats --- */

/* --- Popups et Fenêtres Modales --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
#modal-tabs > button, #stats-tab > button {
    flex-grow: 1;
    margin: 2px;
    padding: 10px 15px;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-dark);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s;
}
#stats-tab > button {
    float:right;
}

#modal-tabs > button.active-tab {
    background-color: var(--color-medium);
    cursor: not-allowed;
}

.modal-content {
    background-color: var(--color-light);
    padding: 20px;
    max-width: 600px;
    height: 100%;
    margin:auto;
    overflow: auto;
    color: var(--color-text);
}

#gameListModal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0);
    overflow:hidden;
    z-index:1;
    position:fixed;
}

#gameListModalcont {
    background-color: #fefefe;
    margin: 0;
    padding: 0 20px 0 20px;
    width: 100%;
    max-width: 600px;   
    text-align:center; 
    margin:auto;
    overflow:hidden;
}

#hintsListModal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0);
    overflow:hidden;
    z-index:1;
    position:fixed;
}

#hintscontainer {
    background-color: #fefefe;
    margin: 0;
    padding: 0 20px 0 20px;
    width: 100%;
    max-width: 600px;   
    text-align:left; 
    margin:auto;
    overflow:hidden;
}

#gameListModalcont > span, #hintscontainer > span {  
    float: right; font-size: 28px; font-weight: bold; cursor: pointer;
}

#gameListModalcont > pre {  
    white-space: pre-wrap; /* Maintient le formatage et permet le retour à la ligne */
    word-wrap: break-word;
    padding: 10px;
    /*max-height: 300px;*/
    overflow-y: auto;
}

#hintscontainer > h2 {
    text-align:center;
}

#hintscontainer > pre {  
    white-space: pre-wrap; /* Maintient le formatage et permet le retour à la ligne */
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    width:90;
    margin-left:5%;
    text-align:center
}

.copygame {
    flex-grow: 1;
    margin: auto;
    padding: 10px;
    font-size: 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-dark);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s;
    
}

table {
min-width: 250px; border-collapse: collapse; margin-top: 5px; margin-bottom: 20px; width:100%
}
th {
padding: 5px; border: 1px solid #ccc;
}
td {
padding: 5px; border: 1px solid #ccc; text-align: center;
}


.relicat { position:absolute;top:0;left:0;background:blue;width:0px;height:0px;overflow:hidden;display:none;opacity:0;visibility:hidden; }









