/* Orévia · la feuille du site, écrite à la main.
   Les variables d'abord : un second thème ne touche qu'à elles. Puis une section par composant. */

:root {
    --encre: #15161F;
    --papier: #EFE4C8;
    --papier-sombre: #E2D3AE;
    --laiton: #D1A445;
    --laiton-fonce: #9A6B22;
    --nuit: #1E2B4D;
    --ciel: #4FA0D6;
    --ciel-clair: #BFE0F2;
    --patine: #3E8C86;
    --magenta: #D8457E;
    --brun: #2a2616;
    --gris: #9a9a9a;
    --patine-fonce: #27605C;
    --magenta-fonce: #8E2550;
    --encre-voile: rgba(21, 22, 31, .18);
    --encre-translucide: rgba(21, 22, 31, .7);
    --titre: "Luckiest Guy", Impact, cursive;
    --texte: "Barlow Condensed", "Arial Narrow", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--encre);
    color: var(--papier);
    font-family: var(--texte);
    font-size: 19px;
    line-height: 1.45;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--magenta);
    outline-offset: 2px;
}

/* Un élément caché par l'attribut hidden le reste, quel que soit son display */
[hidden] {
    display: none !important;
}

/* La zone de texte de secours de « Copier » */
.hors-ecran {
    position: fixed;
    left: -9999px;
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* cadre */

.dessin {
    /* Remis à zéro sur chaque cadre : un cadre dans un cadre n'hérite pas de son parent */
    --fond: initial;
    --trait: initial;
    --ombre: initial;
    --incl: initial;
    position: relative;
    isolation: isolate;
    transform: rotate(var(--incl, 0deg));
}

.dessin::before,
.dessin::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.dessin::before {
    background: var(--fond, var(--papier));
    border: var(--trait, 4px) solid var(--encre);
    box-shadow: var(--ombre, 9px 9px 0 var(--nuit));
    filter: url(#crayon);
}

.dessin::after {
    border: 1.5px solid var(--encre);
    transform: translate(3px, -2px) rotate(-0.5deg);
    opacity: .7;
    filter: url(#crayon2);
}

.dessin.rond::before,
.dessin.rond::after {
    border-radius: 50%;
}

/* etiquette */

.dechire {
    --fond: initial;
    --couleur: initial;
    --rot: initial;
    display: inline-block;
    position: relative;
    isolation: isolate;
    color: var(--couleur, currentColor);
    transform: rotate(var(--rot, 0deg));
}

.dechire::before {
    content: "";
    position: absolute;
    inset: -5px -9px;
    z-index: -1;
    background: var(--fond, var(--nuit));
    clip-path: var(--bord);
    filter: url(#crayon2) drop-shadow(3px 3px 0 var(--encre));
}

/* touche */

.touche {
    --fond: var(--laiton);
    --trait: 4px;
    --ombre: 0 10px 0 var(--laiton-fonce), 0 10px 0 4px var(--encre);
    --incl: -1.5deg;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px 16px 20px;
    color: var(--encre);
    text-decoration: none;
    transition: transform .12s;
}

.touche-magenta {
    --fond: var(--magenta);
    --ombre: 0 10px 0 var(--magenta-fonce), 0 10px 0 4px var(--encre);
    --incl: 1.2deg;
    color: var(--papier);
}

.touche:hover {
    --ombre: 0 4px 0 var(--laiton-fonce), 0 4px 0 4px var(--encre);
    transform: translateY(6px) rotate(0);
}

.touche-magenta:hover {
    --ombre: 0 4px 0 var(--magenta-fonce), 0 4px 0 4px var(--encre);
}

.touche-lecture {
    --fond: var(--papier);
    --trait: 3px;
    --ombre: 4px 4px 0 var(--encre);
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
}

.touche-lecture svg {
    position: relative;
    left: 4px;
    fill: var(--encre);
}

.touche-texte {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.touche-surtitre {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .3em;
    text-transform: uppercase;
    opacity: .85;
}

.touche-titre {
    font-family: var(--titre);
    font-size: 27px;
    line-height: 1.05;
    text-shadow: 2px 2px 0 var(--encre-voile);
}

.touche-jouer {
    --fond: var(--papier);
    --couleur: var(--encre);
    --rot: 8deg;
    position: absolute;
    right: -14px;
    top: -22px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3em;
}

@media (max-width: 639.98px) {
    .touche-titre {
        font-size: 23px;
    }
}

/* carte_chapitre */

.carte {
    --incl: -0.8deg;
    display: flex;
    flex-direction: column;
    padding: 26px 24px 20px;
    color: var(--encre);
    transition: transform .12s;
}

.carte:nth-child(even) {
    --incl: .9deg;
}

.carte:nth-child(3n) {
    --incl: -1.3deg;
}

.carte:hover {
    transform: translateY(-3px);
}

.carte-sombre {
    --fond: var(--papier-sombre);
}

.carte-id {
    --fond: var(--laiton);
    --couleur: var(--encre);
    --rot: -3deg;
    position: absolute;
    left: 12px;
    top: -16px;
    font-family: var(--titre);
    font-size: 19px;
}

.carte-derniere .carte-id {
    --fond: var(--magenta);
    --couleur: var(--papier);
}

.carte-sombre .carte-id {
    --fond: var(--laiton-fonce);
}

.carte-acte {
    margin: 4px 0 6px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--patine);
}

.carte-titre {
    margin: 0 0 10px;
    font-family: var(--titre);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.05;
    color: var(--encre);
    text-shadow: 3px 3px 0 var(--ciel);
}

.carte-lien,
.carte-liens a {
    text-decoration: none;
}

/* Toute la carte mène à l'article, les liens du bas restent cliquables par-dessus */
.carte-lien::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.carte-resume {
    margin: 0 0 16px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.35;
    color: var(--brun);
}

.carte-a-venir {
    margin: 8px 0 18px 9px;
}

.carte-a-venir-etiquette {
    --couleur: var(--papier);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3em;
}

.carte-liens {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: auto 0 0;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--magenta);
}

.carte-liens a:hover {
    text-decoration: underline;
}

/* navigation_chapitres */

.navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.navigation-bas {
    margin-top: 48px;
}

.nav-bouton {
    --trait: 4px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 12px 18px 10px;
    text-decoration: none;
    transition: transform .12s;
}

.nav-precedent {
    --fond: var(--patine);
    --ombre: 0 7px 0 var(--patine-fonce), 0 7px 0 4px var(--encre);
    color: var(--papier);
}

.nav-suivant {
    --fond: var(--laiton);
    --ombre: 0 7px 0 var(--laiton-fonce), 0 7px 0 4px var(--encre);
    flex-direction: row-reverse;
    text-align: right;
    color: var(--encre);
}

.nav-bouton:hover {
    transform: translateY(4px);
}

.nav-precedent:hover {
    --ombre: 0 3px 0 var(--patine-fonce), 0 3px 0 4px var(--encre);
}

.nav-suivant:hover {
    --ombre: 0 3px 0 var(--laiton-fonce), 0 3px 0 4px var(--encre);
}

.nav-fleche {
    --fond: var(--papier);
    --trait: 3px;
    --ombre: 3px 3px 0 var(--encre);
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-family: var(--titre);
    font-size: 30px;
    line-height: 1;
    color: var(--patine);
}

.nav-suivant .nav-fleche {
    color: var(--encre);
}

.nav-texte {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-sens {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    opacity: .8;
}

.nav-titre {
    overflow: hidden;
    font-family: var(--titre);
    font-size: 22px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.nav-tous {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: var(--laiton);
}

.nav-tous:hover {
    color: var(--papier);
}

@media (max-width: 639.98px) {
    .navigation {
        grid-template-columns: minmax(0, 1fr);
    }

    .nav-tous {
        order: 3;
    }

    .nav-vide {
        display: none;
    }
}

/* titre_de_page */

.titre-page {
    --trait: 5px;
    --ombre: 10px 10px 0 var(--nuit);
    --incl: -1.2deg;
    margin: 0 0 44px;
    padding: 22px 30px 16px;
}

.titre-page-bandeau {
    --couleur: var(--laiton);
    --rot: -3deg;
    position: absolute;
    left: 16px;
    top: -16px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .3em;
}

.titre-page h1 {
    margin: 0;
    font-family: var(--titre);
    font-weight: 400;
    font-size: 46px;
    line-height: 1.02;
    color: var(--nuit);
    text-shadow: 4px 4px 0 var(--magenta);
    -webkit-text-stroke: 1px var(--encre);
}

@media (max-width: 639.98px) {
    .titre-page h1 {
        font-size: 34px;
    }
}

/* feuille */

.feuille {
    --trait: 4px;
    --ombre: 10px 10px 0 var(--nuit);
    padding: 34px 38px 30px;
    color: var(--encre);
    overflow-wrap: anywhere;
}

/* Une feuille, ou un prompt déplié, fait des milliers de pixels de haut : le demi-degré
   du trait repassé l'écarterait du cadre en bas et ferait défiler la page en largeur */
.feuille::after,
.prompt.ouvert::after {
    transform: translate(3px, -2px);
}

.feuille h2 {
    margin: 30px 0 10px;
    font-family: var(--titre);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.1;
    color: var(--nuit);
    text-shadow: 3px 3px 0 var(--ciel);
}

.feuille > h2:first-child {
    margin-top: 0;
}

.feuille h3 {
    margin: 26px 0 8px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--patine);
}

/* Les intertitres sous un sous-titre (#### dans une lettre) */
.feuille h4 {
    margin: 22px 0 6px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.25;
    color: var(--nuit);
}

.feuille p,
.feuille li {
    font-weight: 500;
    font-size: 19px;
    line-height: 1.45;
    color: var(--brun);
}

.feuille p {
    margin: 0 0 14px;
}

.feuille ul,
.feuille ol {
    margin: 0 0 14px;
    padding-left: 1.2em;
}

.feuille li + li {
    margin-top: 4px;
}

.feuille a {
    color: var(--magenta);
    text-decoration: underline;
}

.feuille code {
    padding: 0 .3em;
    background: var(--papier-sombre);
}

@media (max-width: 639.98px) {
    .feuille {
        padding: 26px 20px;
    }
}

/* prompt */

.prompt {
    --fond: var(--nuit);
    --trait: 3px;
    --ombre: 6px 6px 0 var(--magenta);
    margin: 16px 0 22px;
    padding: 14px 18px 12px;
    color: var(--papier);
}

.prompt-etiquette {
    --fond: var(--laiton);
    --couleur: var(--encre);
    --rot: -2deg;
    position: absolute;
    left: 10px;
    top: -14px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .35em;
}

.prompt pre {
    position: relative;
    max-height: 4.6em;
    margin: 6px 0 0;
    overflow: hidden;
    font: 500 16px/1.5 var(--texte);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.prompt pre::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.2em;
    background: linear-gradient(to bottom, transparent, var(--nuit));
}

.prompt.ouvert pre,
.prompt.court pre {
    max-height: none;
}

.prompt.ouvert pre::after,
.prompt.court pre::after {
    display: none;
}

.prompt-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.prompt-bouton {
    padding: 6px 12px 4px;
    border: 2px solid var(--encre);
    box-shadow: 3px 3px 0 var(--encre);
    font: 800 13px/1.2 var(--texte);
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--encre);
    cursor: pointer;
    transition: transform .12s;
}

.prompt-plus {
    background: var(--papier);
    transform: rotate(-1deg);
}

.prompt-copier {
    background: var(--laiton);
    transform: rotate(1deg);
}

.prompt-bouton:active {
    box-shadow: 1px 1px 0 var(--encre);
}

.prompt-plus:active {
    transform: translate(2px, 2px) rotate(-1deg);
}

.prompt-copier:active {
    transform: translate(2px, 2px) rotate(1deg);
}

/* barre_de_jeu */

/* Les boutons dessinés des barres : ceux de la barre de jeu et ceux de la barre d'en-tête */
.bouton-barre {
    --trait: 3px;
    flex: none;
    padding: 8px 14px 6px;
    border: 0;
    background: none;
    font: 800 13px/1.2 var(--texte);
    letter-spacing: .3em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .12s;
}

.bouton-barre:hover {
    transform: translateY(3px);
}

.bouton-laiton {
    --fond: var(--laiton);
    --ombre: 0 5px 0 var(--laiton-fonce), 0 5px 0 3px var(--encre);
    color: var(--encre);
}

.bouton-laiton:hover {
    --ombre: 0 2px 0 var(--laiton-fonce), 0 2px 0 3px var(--encre);
}

.jeu-commandes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 0 2px 4px;
}

.jeu-aide {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--papier);
    opacity: .85;
}

.jeu-secours {
    margin-left: auto;
    font-weight: 600;
    font-size: 14px;
    color: var(--laiton);
    text-decoration: underline;
}

/* diorama : les seules couleurs écrites en dur du site */

.ciel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 60% 40% at 70% 85%, rgba(209, 164, 69, .55), transparent 70%),
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(255, 255, 255, .55), transparent 60%),
        radial-gradient(ellipse 50% 30% at 85% 35%, rgba(255, 255, 255, .35), transparent 60%),
        linear-gradient(180deg, #2E6FB0 0%, var(--ciel) 35%, var(--ciel-clair) 70%, #E9D9B4 100%);
}

.decor {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.decor > * {
    position: absolute;
}

.soleil {
    right: 14%;
    top: 7%;
    width: 150px;
    height: 150px;
}

.soleil-disque {
    --fond: var(--laiton);
    --trait: 4px;
    --ombre: 6px 6px 0 var(--laiton-fonce);
    display: block;
    width: 150px;
    height: 150px;
}

.rayon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 260px;
    height: 5px;
    margin: -2.5px 0 0 -130px;
    background: var(--laiton);
    opacity: .55;
    filter: url(#crayon2);
}

.rayon:nth-child(2) { transform: rotate(30deg); }
.rayon:nth-child(3) { transform: rotate(60deg); }
.rayon:nth-child(4) { transform: rotate(90deg); }
.rayon:nth-child(5) { transform: rotate(120deg); }
.rayon:nth-child(6) { transform: rotate(150deg); }

.nuage {
    height: 34px;
    border-radius: 40px;
    background: #fff;
    opacity: .9;
    box-shadow: 4px 4px 0 rgba(30, 43, 77, .18);
    filter: url(#crayon);
}

.nuage::before {
    content: "";
    position: absolute;
    left: 22%;
    top: -55%;
    width: 45%;
    height: 130%;
    border-radius: 50%;
    background: #fff;
}

.nuage-pale {
    opacity: .75;
}

.mer-lointaine {
    left: -2%;
    right: -2%;
    bottom: 12%;
    height: 10%;
    background: linear-gradient(180deg, #9AD6F0, #5FAEDC);
    filter: url(#crayon2);
}

.vaguelette {
    height: 8px;
    border-top: 2px solid #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    filter: url(#crayon2);
}

/* Le filtre est posé sur l'île entière : sur chaque plan, son découpage l'effacerait */
.ile {
    inset: 0;
    filter: url(#crayon2);
}

.ilot,
.plan {
    position: absolute;
}

.ilot {
    left: 94%;
    bottom: 15%;
    width: 64px;
    height: 4%;
    background: var(--nuit);
    clip-path: polygon(0 100%, 22% 40%, 48% 0, 72% 50%, 100% 100%);
}

.plan {
    left: 0;
    right: 0;
    bottom: 13%;
}

.plan-1 {
    height: 24%;
    background: #6FB3D9;
    opacity: .9;
    clip-path: polygon(46% 100%, 50% 60%, 56% 44%, 62% 56%, 68% 30%, 74% 46%, 80% 36%, 86% 58%, 90% 100%);
}

.plan-2 {
    height: 22%;
    background: var(--patine);
    clip-path: polygon(10% 100%, 14% 62%, 20% 44%, 27% 56%, 33% 30%, 40% 48%, 46% 38%, 54% 60%, 61% 46%, 69% 66%, 76% 100%);
}

.plan-3 {
    height: 12%;
    background: var(--nuit);
    clip-path: polygon(8% 100%, 14% 80%, 22% 56%, 30% 70%, 38% 42%, 47% 64%, 55% 38%, 64% 60%, 72% 50%, 80% 72%, 88% 84%, 92% 100%);
}

.mer-proche {
    left: -2%;
    right: -2%;
    bottom: -8px;
    height: 15%;
    background: linear-gradient(180deg, #3A86C6 0%, #26568A 40%, var(--nuit) 72%, var(--encre) 100%);
    filter: url(#crayon2);
}

.vague {
    height: 12px;
    border-top: 3px solid rgba(239, 228, 200, .9);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    filter: url(#crayon2);
}

.barque {
    --fond: var(--laiton-fonce);
    --trait: 3px;
    --ombre: none;
    --incl: -3deg;
    position: absolute;
    width: 46px;
    height: 14px;
}

.barque::before,
.barque::after {
    border-radius: 0 0 14px 14px;
}

.voile {
    position: absolute;
    left: 16px;
    bottom: 12px;
    width: 15px;
    height: 32px;
    filter:
        drop-shadow(1.5px 0 0 var(--encre))
        drop-shadow(-1.5px 0 0 var(--encre))
        drop-shadow(0 1.5px 0 var(--encre))
        drop-shadow(0 -1.5px 0 var(--encre));
}

.voile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--papier);
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

/* marque */

.marque {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 44px;
}

.marque-nom {
    font-family: var(--titre);
    font-size: 44px;
    line-height: 1.1;
    color: var(--papier);
    text-decoration: none;
    text-shadow: 4px 4px 0 var(--nuit);
    -webkit-text-stroke: 2px var(--encre);
}

.marque-etiquette {
    --fond: var(--laiton);
    --couleur: var(--encre);
    padding: 4px 14px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .4em;
}

@media (max-width: 639.98px) {
    .marque-nom {
        font-size: 34px;
    }
}

/* pied */

.pied {
    padding: 40px 24px 60px;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    color: var(--gris);
}

.pied p {
    margin: 0;
}

.pied-lien {
    text-decoration: none;
    opacity: .7;
}

.pied-lien:hover {
    text-decoration: underline;
    opacity: 1;
}

/* bouton_simple */

.bouton-simple {
    --fond: var(--laiton);
    --trait: 4px;
    --ombre: 0 7px 0 var(--laiton-fonce), 0 7px 0 4px var(--encre);
    --incl: -1deg;
    display: inline-block;
    padding: 12px 22px 10px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .25em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--encre);
    transition: transform .12s;
}

.bouton-simple:hover {
    --ombre: 0 3px 0 var(--laiton-fonce), 0 3px 0 4px var(--encre);
    transform: translateY(4px);
}

/* entete_accueil */

.entete-accueil {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px 270px;
}

/* accroche */

.accroche {
    --trait: 5px;
    --ombre: 12px 12px 0 var(--nuit);
    --incl: -1.6deg;
    max-width: 760px;
    padding: 26px 34px 20px;
}

.accroche-bandeau {
    --couleur: var(--laiton);
    --rot: -3deg;
    position: absolute;
    left: 18px;
    top: -18px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .3em;
}

.accroche h1 {
    margin: 0;
    font-family: var(--titre);
    font-weight: 400;
    font-size: 52px;
    line-height: 1.02;
    color: var(--nuit);
    text-shadow: 4px 4px 0 var(--magenta);
    -webkit-text-stroke: 1px var(--encre);
}

.accroche-sous-titre {
    margin: 14px 0 0;
    font-weight: 600;
    font-size: 21px;
    line-height: 1.3;
    color: var(--encre);
}

@media (max-width: 639.98px) {
    .accroche h1 {
        font-size: 38px;
    }
}

/* touches */

.touches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 980px;
    margin-top: 52px;
}

@media (max-width: 639.98px) {
    .touches {
        grid-template-columns: 1fr;
    }
}

/* frise */

.frise {
    max-width: 1100px;
    margin: 0 auto;
    padding: 58px 24px 80px;
}

.frise-titre {
    margin: 0 0 26px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .4em;
    text-transform: uppercase;
    color: var(--laiton);
}

.frise-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 34px 30px;
}

/* colonne */

.colonne {
    max-width: 860px;
    margin: 60px auto 0;
    padding: 0 24px 90px;
}

.colonne-large {
    max-width: 1100px;
}

/* barre */

.barre {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 16px;
    background: var(--encre);
}

.barre::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--laiton);
    filter: url(#crayon2);
}

.bouton-retour {
    --fond: var(--patine);
    --ombre: 0 5px 0 var(--patine-fonce), 0 5px 0 3px var(--encre);
    color: var(--papier);
}

.bouton-retour:hover {
    --ombre: 0 2px 0 var(--patine-fonce), 0 2px 0 3px var(--encre);
}

.barre-nom {
    flex: none;
    font-family: var(--titre);
    font-size: 24px;
    line-height: 1;
    color: var(--papier);
    text-decoration: none;
    text-shadow: 3px 3px 0 var(--nuit);
    -webkit-text-stroke: 1.5px var(--encre);
}

.barre-chapitre {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.barre-id {
    --fond: var(--laiton);
    --couleur: var(--encre);
    flex: none;
    margin-left: 9px;
    font-family: var(--titre);
    font-size: 15px;
}

.barre-titre {
    overflow: hidden;
    font-family: var(--titre);
    font-size: 20px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--papier);
}

/* L'emplacement libre des futurs outils (Signaler un bug) pousse Jouer à droite */
.barre-outils {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

/* Sur téléphone : Retour garde sa flèche, le titre du chapitre disparaît */
@media (max-width: 639.98px) {
    .barre {
        gap: 10px;
    }

    .bouton-barre {
        padding: 8px 10px 6px;
        letter-spacing: .15em;
    }

    .barre-titre,
    .bouton-retour-texte {
        display: none;
    }
}

/* ecran_de_jeu */

.jeu {
    --fond: var(--nuit);
    --trait: 4px;
    --ombre: 10px 10px 0 var(--magenta);
    margin: 0 0 48px;
    padding: 10px;
    color: var(--papier);
    /* La barre collante ne cache pas le jeu quand on arrive par #jeu */
    scroll-margin-top: 88px;
}

.zone-jeu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--nuit);
}

.zone-jeu:fullscreen {
    padding: 10px;
    background: var(--encre);
}

.jeu-ecran {
    position: relative;
    min-height: 300px;
    aspect-ratio: 16 / 10;
    background: var(--encre);
}

.zone-jeu:fullscreen .jeu-ecran {
    flex: 1;
    min-height: 0;
    aspect-ratio: auto;
}

.jeu-cadre {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--encre);
}

.jeu-affiche {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 24px 16px;
    background: var(--nuit);
}

/* La touche de l'accueil, en vrai bouton */
.jeu-lancer {
    max-width: 100%;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.jeu-mobile {
    display: none;
    margin: 0;
    padding: 8px 16px;
    background: var(--laiton);
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    color: var(--encre);
}

@media (max-width: 899.98px) {
    .jeu-mobile {
        display: block;
    }
}

/* moteur */

.page-moteur {
    height: 100vh;
    overflow: hidden;
}

.moteur {
    position: fixed;
    inset: 0;
    background: var(--encre);
}

.moteur-canevas {
    display: block;
    width: 100%;
    height: 100%;
}

.moteur-chargement {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--encre);
}

.moteur-texte {
    margin: 0;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--papier);
}

.moteur-barre {
    width: min(260px, 70%);
    height: 14px;
    border: 2px solid var(--papier);
}

.moteur-progres {
    display: block;
    width: calc(var(--progres, 0) * 100%);
    height: 100%;
    background: var(--laiton);
}

.moteur-erreur {
    position: absolute;
    inset: auto 16px 16px;
    margin: 0;
    padding: 10px 14px;
    background: var(--magenta);
    font-weight: 600;
    font-size: 15px;
    color: var(--papier);
}

/* fiche_composant */

.fiche {
    margin: 0 0 64px;
}

.fiche-scene {
    padding: 30px 0 18px;
}

.fiche-pile {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Les étiquettes et la touche débordent de leur boîte : on leur laisse la place */
.fiche-ligne {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px 34px;
    padding: 0 14px 0 12px;
}

.fiche-variante {
    min-width: 0;
    margin: 0;
}

.fiche-legende {
    margin-top: 16px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--laiton);
}

.fiche-note {
    margin: 0 0 4px;
    color: var(--gris);
}

/* Le cartouche : le fichier, ses paramètres et son exemple, lus dans son en-tête */
.fiche-doc {
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid var(--nuit);
    font-weight: 600;
    font-size: 14px;
    color: var(--gris);
    overflow-wrap: anywhere;
}

.fiche-doc ul {
    margin: 4px 0 0;
    padding-left: 1.2em;
}

.fiche-fichier {
    margin: 0;
    letter-spacing: .1em;
}

.fiche-cadre {
    max-width: 320px;
    padding: 18px 24px;
    color: var(--encre);
}

.fiche-rond {
    display: block;
    width: 58px;
    height: 58px;
}

.fiche-diorama .ciel {
    height: 420px;
}

/* Dans le catalogue, la barre ne colle pas en haut de l'écran */
.fiche-barre .barre {
    position: relative;
}
