/* ==========================================================================
   GRILLE ET CONTENEURS
   ========================================================================== */
section {
    width: 100%;
}

.row {
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.rowButtons {
    padding: 1%;
    width: 98%;
    display: flex;
    justify-content: space-between;
}

.rowAccessCardMobile {
    position: absolute;
    bottom: 10vh;
}

.itemList {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CLÉ : par défaut un enfant flex a `flex-shrink: 1` et se laisse écraser
   quand le conteneur manque de place. C'est ce qui rognait le formulaire. */
.itemList > * {
    flex-shrink: 0;
}

/* ==========================================================================
   LARGEURS
   ========================================================================== */
.quarterWidth {
    width: 20%;
}

.halfWidth {
    width: 40%;
}

.twoWidths {
    width: 90%;
}

/* ==========================================================================
   NIVEAUX ET ILLUSTRATIONS
   ========================================================================== */
.level,
.progress {
    height: 15px;
    border-radius: 10px;
}

.level {
    margin-top: 3px;
    width: 95%;
    background-color: var(--track-color);
}

.progress {
    background-color: var(--primary-color);
}

.circleLevel {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 300%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.illustration {
    margin-right: 10px;
    height: 100%;
    border-radius: 10px;
}

.tile {
    padding: 0;
    border: 1px solid var(--surface-raised);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.tile header {
    margin-top: 0;
}

.tileBackground {
    height: 100%;
    padding: 3px;
    background-color: var(--tile-overlay);
}

.square {
    border-radius: var(--border-radius);
}

/* ==========================================================================
   ÉTATS ET TRANSITIONS
   ========================================================================== */
.welcomeMain {
    display: flex;
    justify-content: space-around;
}

.welcomeAnimation {
    transform: scale(0);
}

.hideItem {
    margin-left: 12%;
    width: 25%;
}

.rotate-back {
    animation: rotateBack 1s ease forwards;
}

.cursor {
    padding-right: 5px;
}

.required {
    margin-left: 3px;
    color: var(--primary-color);
}

/* ==========================================================================
   ERREURS
   ========================================================================== */
.errorMain {
    display: flex;
    justify-content: space-around;
}

.errorMain div {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--error-color);
}

.errorMain div .icon { font-size: 350%; }

.errorMain div p {
    font-family: var(--font-family-main);
    font-weight: 900;
    font-size: 125%;
}

.progress {
    background-color: var(--primary-color);
    transition: width 1s cubic-bezier(0.5, 1, 0.89, 1);   /* easeOutQuad */
}

.illustration {
    margin-right: 10px;
    height: 100%;
    border-radius: 10px;
    opacity: 0;
    transform: scale(0);
    transition: transform 1s cubic-bezier(0.5, 1, 0.89, 1),
                opacity 1s cubic-bezier(0.5, 1, 0.89, 1);
    will-change: transform, opacity;
}

.illustration.isVisible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .hidden {
        display: none;
    }

    .rotateItem {
        animation: rotateAnimation 1s forwards;
    }

    .rotateItem .scrollable {
        transform: rotateY(180deg);
    }

    .illustration {
        height: 50%;
    }
}