:root {
    /* Palette de couleur */
    --brand-orange: #FF8C00;
    --brand-dark: #333333;

    /* Role */
    --primary: var(--brand-orange);
    --secondary: #d37400; /* primary hover */
    --background: #F2F2F2;

    /* Text  Color*/
    --text-primary: var(--brand-dark);
    --text-secondary: #636363;

    /* Font families */
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace; /* Pour le jeu */

    /* Font bold */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 800;

    /* Hover color */
    --text-hover: #000000;
    --bg-hover-active: #e5e7eb;
}

body {
    background-color: var(--background);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.letter {
    font-weight: var(--fw-regular);
    font-family: var(--font-mono);
    color: rgb(127, 127, 127);
}

.jeu {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.actif { 
    border-left: 2px solid black;
}

.incorrect {
    color: red;
}

.correct {
    color: black;
}

.TypingArea {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    margin-left: 2rem;
}

.jeu {
    --nombre-lignes: 3;
    --hauteur-ligne: 1.5;

    left: 0;
    display: flex;
    justify-content: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    height: calc(var(--nombre-lignes) * var(--hauteur-ligne) * 1em);
    line-height: 1.5;
    font-size: 2em;
    overflow: hidden;
}

.word {
    margin-right: .9em;
}

.caret {
  position: absolute;
  width: 2px;
  height: 2rem;
  background-color: #f1c40f;
  border-radius: 4px;
  transition: all 0.15s ease;
}

@keyframes clignotement {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.timer { 
    color: #f1c40f;
    font-size: 4rem;
    font-weight: var(--fw-regular);
    font-family: var(--font-mono);
    visibility: hidden;
}

.typing-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.focusWarning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.focusWarning span {
    font-size: 1.5rem;
    font-weight: var(--fw-regular);
    font-family: var(--font-main);
    color: black;
}

.game-container {
    position: relative;
}

/* STATS */

.gameover-container {
    position: absolute;
    margin-top: clamp(10rem, 35vh, 20rem);
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    align-items: center;
    transition: 0.3s;
}

.gameover-container .stats {
    display: flex;
    flex-direction: column;
}

#stats-wrapper #wpm-container {
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
    align-items: flex-end;
    margin-bottom: clamp(3rem, 8vh, 10rem);
    gap: 1rem;
}

#stats-wrapper #wpm-container #wpm-score {
    font-size: clamp(4rem, 10vw, 7rem);
}

#stats-wrapper #wpm-container .stat-label {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

#stats-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: clamp(3rem, 6vh, 7rem);
}

#other-wrapper {
    display: flex;
    flex-direction: row;
    gap: clamp(2rem, 8vw, 10rem);
}

.gameover-container span {
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: var(--fw-regular);
    font-family: var(--font-mono);
    color: black;
}

.gameover-container #other-wrapper .stat-value {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: var(--font-main);
    color: var(--brand-dark);
}

.gameover-container #other-wrapper .stat-label {
    color: #7b8289;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

/* REPLAY BUTTON*/

.replay {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.replay .fa-repeat {
    cursor: pointer;
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
}