/* Bases & Accueil */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
p {
    text-align: justify;
    font-family: 'Martel', serif;
    font-weight: 200;
}
.navbar-toggler {
    border: var(--bs-border-width) solid transparent;
    padding: var(--bs-navbar-toggler-padding-y) 0.3em;
    margin-left:calc(var(--bs-navbar-toggler-padding-x) - 0.3em);
    margin-bottom: 1em;
}
.round-image {
    object-fit: cover;
    width:150px;
    height:150px;
    border-radius: 100%;
}
.navbar-brand {
    position: absolute;
    transform: translateX(-50%);
    top:0;
    left:50%;
}
.navbar-brand img {
    height: 50px;
}
.nav-link-top {
    position:relative;
    font-family: 'Merriweather', serif;
}
.nav-link-top::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: -webkit-linear-gradient(45deg, rgb(255, 81, 81), rgb(255, 199, 125));
    opacity: 50%;
    bottom: 0.1em;
    left: 0;
    transform-origin: top;
    transform: scaleX(0);
    transition: transform 300ms ease-in-out;
}
.nav-link-top:hover::before {
    transform-origin: top;
    transform: scaleX(1);
}
.text-muted {
    font-family: var(--bs-body-font-family);
}
/* Formulaires */
form {
    font-family: var(--bs-body-font-family);
}
@media only screen and (min-width:768px) {
    .form-fullpage {
        max-width: 70%;
    }
}
@media only screen and (min-width:992px) {
    .form-fullpage {
        max-width: 50%;
    }
}
.inputDiv {
    margin: 0.2em 0 0 0;
    width:calc(100%-2em);
}
.inputDivMargins {
    margin: 0.2em 0 2em 0;
}
.noDivPos {
    display:flex;
    flex-direction:row;
    align-items: center;
}
.inlineDiv {
    display: inline-block;
}
form span {
    height: 1em;
    font-size: 0.8em;
    margin: 0.5em 0 0.5em 1em;
}
.success {
    background-color: var(--success-700) !important;
    border-bottom: solid 4px var(--success-900) !important;
    color:black !important;
}
#message {
    display:none;
    position:absolute;
    left:50%;
    z-index:7;
    transform: translateX(-50%);
    font-weight: 700;
    padding:1em 2em;
    background-color: var(--secondary-800);
    border-radius: 5px;
    border-bottom: solid 4px var(--secondary-900);
    color:white;
}
/* color variables */
:root {
    --grey-700:rgb(54, 51, 50);
    --grey-500:rgb(151, 148, 147);
    --grey-200:rgb(189, 189, 189);
    --grey-100:#eee;
    --main-700:rgb(255, 216, 161);
    --main-500:rgb(255, 242, 224);
    --main-200:rgb(255, 248, 238);
    --secondary-900:#f56161;
    --secondary-800:#f48e8e;
    --secondary-700:rgb(255, 191, 161);
    --secondary-500:rgb(255, 231, 224);
    --secondary-200:rgb(255, 243, 238);
    --success-900:#20c997;
    --success-800:#82f5d3;
    --success-700:#b5fce7;
}
/* Inputs de type texte */
label {
    pointer-events: none;
    font-size: 1em;
}
.labelPos {
    transform:translateY(-1.2em);
    color: var(--grey-700) !important;
}
textarea+label.labelPos {
    transform: translateY(-1em);
}
.inputDiv label:not(.noLabelPos) {
    position:absolute;
    margin-left:1em;
    color:var(--grey-700);
    transition: ease-in-out 250ms;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"]:not(input[type="number"].form-control), textarea {
    padding: 0.8em 1.2em;
    border: 0.2em solid transparent;
    border-radius: 0.3em;
    background-color: var(--main-200);
    width:100%;
    font-size: 1em;
    font-weight: 600;
    transition: ease-in-out 500ms;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="tel"]:focus, input[type="url"]:focus, input[type="number"]:not(input[type="number"].form-control):focus, textarea:focus {
    border-bottom: 0.2em solid var(--main-700);
    background-color: var(--main-200);
}
/* Inputs de type texte - Display flex */
.inputFlex {
    display: flex;
    flex-wrap: wrap;
    width:calc(100%);
    margin: 0 0 0 0;
    gap:1.5em;
    justify-content: space-between;
}
.inputFlex .inputDiv {
    margin: 0 0;
    flex-grow: 1;
}
/* Textarea */
textarea {
    resize: none;
    height:8em;
    font-size: 1em;
    width:100%;
}
textarea+label {
    margin-top: 0.5em;
}
.textareaDiv {
    align-items:baseline;
}
/* Checkbox */
.checkContainer {
    display:flex;
    flex-direction: row-reverse;
    cursor: pointer;
    pointer-events: all;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    align-items: center;
}
.checkContainer input[type=checkbox] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkMark {
    position: relative;
    display: inline-block;
    height: 1.4em;
    width: 1.4em;
    border-radius: 0.2em;
    margin-right:0.5em;
    background-color: var(--grey-100);
    transition: ease-in-out 150ms;
}
.checkContainer:hover>.checkMark {
    background-color: var(--grey-200);
}
.checkContainer input[type=checkbox]:checked ~ .checkMark {
    background-color: var(--secondary-900);
}
.checkMark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkContainer input[type=checkbox]:checked ~ .checkMark:after {
    display: block;
}
.checkContainer .checkMark:after {
    left:0.55em;
    top:0.32em;
    width: 0.3em;
    height: 0.6em;
    border: solid white;
    border-width: 0 0.2em 0.2em 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}
/* Buttons */
input[type=button], input[type=submit], button:not(.navbar-toggler, button.btn) {
    padding: 0.7em 1.1em;
    background-color: var(--secondary-500);
    text-transform: uppercase;
    border: 0.2em solid transparent;
    border-radius: 0.3em;
    font-size: 0.9em;
    font-weight: 600;
    transition: ease-in-out 250ms;
}
input[type=button]:hover, input[type=submit]:hover, button:not(.navbar-toggler, button.btn):hover {
    border-bottom: 0.2em solid var(--secondary-700);
    background-color: var(--secondary-200);
    cursor: pointer;
}
input:focus, button:focus, textarea:focus {
    outline:none;
}
.btn-square {
    font-size: 1.4em !important;
    width:2.8rem;
    height:2.8rem;
    padding: 0 0 !important;
    background-color: transparent !important;
    color: var(--secondary-700) !important;
    border:0.1em solid var(--secondary-700) !important;
    transition: ease-in-out 150ms;
}
.btn-square:hover {
    color:white !important;
    background-color: var(--secondary-700) !important;
    border:0.1em solid var(--secondary-700) !important;
}
/* compte.php */
#icon {
    position:relative;
    width: fit-content;
    height: fit-content;
}
#iconDrapeau {
    position: absolute;
    bottom:0;
    right:0;
}
/* resultats.php */
.progress-label {
    font-size: 1.3em;
    line-height: 1.9em;
}
#user #avatar {
    width:12vw;
    height:12vw;
}
#drapeau {
    width:75%;
    height:auto;
}
/* Responsive */
@media screen and (max-width: 992px) { 
    #drapeau {
        width:75vw;
        height: auto;
    }
    .d-flex.flex-column.w-50 {
        width:100% !important;
    }
    .mobileHideCell {
        display: none;
    }
    .navbar-brand img {
        max-height: 35px;
        margin-top:3px;
    }
    input.form-control[type=number] {
        max-width: 2.1rem;
        padding: 0.5em 0.5em;
    }
    #user #avatar {
        width:150px;
        height:150px;
    }
}