@import url('https://fonts.googleapis.com/css2?family=Inria+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');
/* Icones : https://boxicons.com */

* {
    font-family: 'Inria Sans', sans-serif;

}

html, body {
    height: 100%;
    margin: 0;
    border: 0;

    --color-blue-light: #5688C7;
    --color-blue-dark: #36548B;

    --color-gray-sombre: #14171C;
    --color-gray-ligne: #636363;
    --color-gray-placeholder: #1D1E21;

    --color-green-dark: #5E6D50;
    --color-green-light: #899E75;

    --color-red-dark: #F23737;
    --color-red-light: #c75656;

    --color-white: #ffffff;
    --color-white2: #D9D9D9;

    /* fs = font-size */
    --fs-title: 20px;
    --fs-normal: 16px;
    --fs-normal-14: 14px;
    --fs-small: 11px;
    --fs-arrow: 28px; /* Uniquement pour les fleche de menu notament */

    /* br = border-radius */
    --br-very-small: 5px;
    --br-large: 15px;
    --br-small: 10px;
    --br-round: 1000px;
}

#general-content {
    /* min-height: 90vh;  Forcer les pages à faire au moins 90vh */
    /* border: 1px solid blue;  debug */
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    cursor: default;
    color: var(--color-white);
}

a {
    margin: 0;
    text-decoration: none;
    transition: 0.7s;
    color: var(--color-text-white);
}

a:hover {
    transition: 0.2s;

}

body {
    background-color: var(--color-gray-sombre);
    color: var(--color-white);
    /* border: 1px solid red; debug */
    width: 100%; /* prend toute la largeur sur mobile */
    max-width: 900px; /* largeur max sur grand écran */
    margin: auto; /* centre sur PC */
}

/* Header */
header img {
    width: 30px;

}

header {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    position: fixed;
    left: 50%;
    transform: translateX(-50%); /* centre par rapport à l'écran */
    width: 100%;
    max-width: 900px; /* même largeur max que le contenu */
    bottom: 0;
    padding: 1.4rem 0 1rem 0;
    border-top: 2px solid var(--color-gray-ligne);
    background-color: var(--color-gray-sombre); /* évite la transparence */
    z-index: 99;
}
header a {
    display: flex;
    flex-direction: column;
    align-items: center;
}
header .select {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--color-white);
    border-radius: 100px;
    margin-top: 6px;
}
header .no-select {
    display: block;
    width: 8px;
    height: 8px;
    background-color: transparent;
    border-radius: 100px;
    margin-top: 6px;
}



#conteneur{
    width: 90%;
    margin: 1rem auto;
}





/* Les boutton */
.btn_1{ /* Ecriture bleu clair sur fond blanc */
    background-color: var(--color-white);
    color: var(--color-blue-light);
    font-weight: bold;
    font-size: var(--fs-normal);
    border-radius: var(--br-large);
    padding: 12px;
    border-bottom: 2px solid var(--color-blue-dark);
    text-align: center;
}
.btn_2{ /* Ecriture blanc sur fond transparant avec contour gris */
    background-color: transparent;
    color: var(--color-white);
    font-weight: bold;
    font-size: var(--fs-normal);
    border-radius: var(--br-large);
    padding: 12px;
    border: 2px solid var(--color-gray-ligne);
    border-bottom: 4px solid var(--color-gray-ligne);
    text-align: center;
}
.btn_3{ /* Ecriture gris-noir sur fond bleu */
    background-color: var(--color-blue-light);
    color: var(--color-gray-sombre);
    font-weight: bold;
    font-size: var(--fs-normal);
    border-radius: var(--br-large);
    padding: 12px;
    border: 0px solid var(--color-blue-dark);
    border-bottom: 4px solid var(--color-blue-dark);
    text-align: center;

    /*
    je sais plus pourquoi j'ai pas de rebord sur ce bouton donc en cas de probleme revenir sur l'ancien design si dessous

    background-color: var(--color-blue-light);
    color: var(--color-gray-sombre);
    font-weight: bold;
    font-size: var(--fs-normal);
    padding: 12px;
    border-bottom: 2px solid var(--color-blue-dark);
    text-align: center;
    */
}
.btn_4{ /* Ecriture bleu sur fond transparent bordure gris */
    background-color: transparent;
    color: var(--color-blue-light);
    font-weight: bold;
    font-size: var(--fs-normal);
    border-radius: var(--br-large);
    padding: 12px;
    border: 2px solid var(--color-gray-ligne);
    border-bottom: 4px solid var(--color-gray-ligne);
    text-align: center;
}
.btn_5{ /* Ecriture rouge sur fond transparent bordure gris */
    background-color: transparent;
    color: var(--color-red-dark);
    font-weight: bold;
    font-size: var(--fs-normal);
    border-radius: var(--br-large);
    padding: 12px;
    border: 2px solid var(--color-gray-ligne);
    border-bottom: 4px solid var(--color-gray-ligne);
    text-align: center;
}


.btn_plus{ /* [+] bleu clair avec le "+"" blanc*/
    background-color: var(--color-blue-light);
    display: block;
    width: 22px;
    height: 22px;
    text-align: center;
    fond-weight: z;
    font-size: 24px;
    border-radius: 3px;
}
.btn_plus p{
    position: relative;
    bottom: 5px;
}



/* Les input */
.input input{
    background-color: var(--color-gray-placeholder);
    border: 2px solid var(--color-gray-ligne);
    padding: 1rem;
    margin-top: 0.5rem;
    border-radius: var(--br-small);
    color: var(--color-gray-ligne);
    width: 100%;
    height: 43px;
    font-size: var(--fs-normal);
}
.input .label{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.input .label a{
    color: var(--color-gray-ligne);
    font-size: var(--fs-small);
}
.input select {
    background-color: var(--color-gray-placeholder);
    border: 2px solid var(--color-gray-ligne);
    padding: 0 1rem;
    margin-top: 0.5rem;
    border-radius: var(--br-small);
    color: var(--color-gray-ligne);
    width: 100%;
    height: 43px;
    font-size: var(--fs-normal);
    padding-right: 3rem;
}
.input textarea {
    width: 100%;
    padding: 0.7rem;
    border-radius: var(--br-small);
    background: var(--color-gray-placeholder);
    color: white;
    border: 1px solid var(--color-gray-ligne);
}

/*input ronde checkbox vert etc*/
.input-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.input-choice input[type="checkbox"],
.input-choice input[type="radio"] {
    display: none;

}
.input-choice .selector {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--color-white); /* Sélectionnable → bordure blanche */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.15s ease-in-out;
}
.input-choice .selector::after {
    content: "";
    width: 0px;
    height: 0px;
    background-color: var(--color-green-light);
    border-radius: 50%;
    transition: 0.15s ease-in-out;
}
.input-choice input:checked + .selector::after {
    width: 14px;
    height: 14px;
}
.input-choice input:checked + .selector {
    border-color: var(--color-white);

}
.input-choice.disabled {
    cursor: not-allowed;

}
.input-choice.disabled .selector {
    border-color: var(--color-gray-ligne); /* Gris-ligne = non sélectionnable */
    opacity: 0.6;
}
.input-choice.disabled .selector::after {
    display: none;

}
.input-choice.disabled label {
    opacity: 0.6;

}



#top_menu{
    border-bottom: 2px solid var(--color-gray-ligne);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}
#top_menu table{
    width: 100%;
    color: var(--color-gray-ligne)
}
#top_menu table td.border{
    width: 80px;

}
#top_menu h1{
    color: var(--color-gray-ligne);
    display: block;
    text-align: center;
    font-size: var(--fs-title);
}
#top_menu a#action{
    text-align: right;
    color: var(--color-blue-light);
    font-size: var(--fs-normal-14);
    font-weight: bold;
    display: block;
}



.full-height{ /* a utiliser que sur le mini form. tout ce qui demande un scrole ne peuve pas prendre ce parametre.*/
    height: 70%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.work_in_progress{
    /*opacity: 15%; bug sur mobil la transparence passe par dessus les element */
}
.separateur{
    border: 1px solid var(--color-gray-ligne);

}

#safe_bottom_page{
/* Ajouter un element vide en bas de page pour que le menu na cache rien */
        /*border: 1px solid red;*/
        min-height: 100px;
        width: 100%;
        display: block;
}


/* Responsive : si écran plus large que 1200px, on réduit un peu */
@media screen and (min-width: 1200px) {
    body {
        max-width: 900px;
        margin: auto;
    }
    html {
        background-color: #1D1E21;
    }
}


/* ==========================================================================
   Version PC (≥ 1024 px)
   Même identité que le mobile (couleurs, typo, cartes, boutons) :
   seule la mise en page change. Rien ici ne s'applique en dessous de 1024 px.
   ========================================================================== */

/* Éléments réservés au PC : masqués sur mobile et tablette */
header .nav-brand,
header .nav-user,
header .nav-label,
.desk-only {
    display: none;
}

/* Tablette : la zone fixe « Créer une partie » suit la largeur du contenu */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    #button_zone {
        left: 50%;
        transform: translateX(-50%);
        max-width: 900px;
    }
}

@media screen and (min-width: 1024px) {
    html, body {
        --sidebar-w: 248px;
        --content-max: 1120px;   /* largeur max du contenu */
        --form-max: 480px;       /* colonne « mobile » des formulaires */
        --color-gray-texte: #9AA0A8; /* gris lisible (6,8:1) ; #636363 reste pour les bordures */
        --fs-page-title: 32px;
    }

    html {
        background-color: var(--color-gray-sombre);
    }
    body {
        max-width: none;
        margin: 0;
        padding-left: var(--sidebar-w);
        box-sizing: border-box;
    }
    .desk-only {
        display: revert;
    }

    /* --- Barre latérale (le <header> mobile, réorganisé) ------------------ */
    header {
        left: 0;
        top: 0;
        bottom: 0;
        transform: none;
        width: var(--sidebar-w);
        max-width: none;
        box-sizing: border-box;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 6px;
        padding: 28px 18px;
        border-top: 0;
        border-right: 2px solid var(--color-gray-ligne);
        overflow-y: auto;
    }
    header a {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 12px 14px;
        border-radius: var(--br-small);
        color: var(--color-gray-texte);
        font-weight: bold;
        font-size: var(--fs-normal);
    }
    header a:hover,
    header a:has(.select) {
        background-color: var(--color-gray-placeholder);
        color: var(--color-white);
    }
    header img {
        width: 24px;
    }
    header .nav-label {
        display: inline;
    }
    /* La pastille blanche de la page active passe à droite du libellé */
    header .select,
    header .no-select {
        order: 3;
        margin: 0 0 0 auto;
    }

    header .nav-brand,
    header .nav-user {
        display: flex;
    }
    header .nav-brand {
        padding: 0 8px 26px;
        color: var(--color-white);
    }
    header .nav-brand:hover {
        background: none;
    }
    header .nav-brand img {
        width: 48px;
        height: 48px;
        object-fit: contain;
    }
    header .nav-brand span,
    header .nav-user span {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }
    header .nav-brand b {
        font-size: 18px;
    }
    header small {
        font-size: 12px;
        font-weight: normal;
        color: var(--color-gray-texte);
    }
    header .nav-user {
        margin-top: auto;
        border: 1px solid var(--color-gray-ligne);
        border-radius: var(--br-large);
        padding: 12px;
        color: var(--color-white);
    }
    header .nav-user img {
        width: 36px;
        height: 36px;
        border-radius: var(--br-round);
        object-fit: cover;
    }
    header .nav-user b {
        font-size: var(--fs-normal-14);
    }

    /* --- Zone de contenu ------------------------------------------------ */
    #general-content {
        max-width: var(--content-max);
        margin: 0 auto;
        padding: 0 48px;
        box-sizing: border-box;
    }
    #safe_bottom_page {
        min-height: 48px;
    }

    /* En-tête de page : titre à gauche, actions à droite */
    #top_menu {
        padding: 30px 0;
    }
    #top_menu table td.border {
        width: 48px;
    }
    #top_menu table td.border:last-child {
        width: auto;
        text-align: right;
    }
    #top_menu h1 {
        text-align: left;
        font-size: var(--fs-page-title);
        color: var(--color-gray-texte);
    }
    #top_menu a {
        color: var(--color-gray-texte);
    }
    #top_menu .btn_2 {
        display: inline-flex;
        color: var(--color-white);
    }

    /* Par défaut, toute page garde la colonne mobile, centrée.
       Les pages qui exploitent la largeur ajoutent la classe layout-wide sur <body>. */
    #general-content > *:not(#top_menu) {
        max-width: var(--form-max);
        margin-left: auto;
        margin-right: auto;
    }
    body.layout-wide #general-content > *:not(#top_menu) {
        max-width: none;
    }
}

@media screen and (min-width: 1024px) {
    /* Sur mobile, .full-height pousse les boutons vers le bas (zone du pouce) : inutile à la souris */
    .full-height {
        height: auto;
        gap: 3rem;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1199px) {
    #general-content {
        padding: 0 32px;
    }
}
