515 lines
9.9 KiB
CSS
515 lines
9.9 KiB
CSS
/* Styles partagés des écrans de jeu : /jeu/[mode] et /defi/[seed].
|
||||
|
|
Layout « app » verrouillé au viewport (100dvh via +layout) : la page ne
|
|||
|
|
scrolle jamais, seuls les panneaux internes défilent. Mobile-first. */
|
|||
|
|
|
|||
|
|
.jeu {
|
|||
|
|
flex: 1;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
min-height: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.etat {
|
|||
|
|
flex: 1;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
gap: 1rem;
|
|||
|
|
padding: 1rem;
|
|||
|
|
overflow-y: auto;
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Split photo | carte — */
|
|||
|
|
.split {
|
|||
|
|
flex: 1;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 0.5rem;
|
|||
|
|
padding: 0.5rem;
|
|||
|
|
min-height: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Mobile : la photo s'adapte (plafond ~42dvh), la carte garde au minimum
|
|||
|
|
35dvh utiles + la barre de sauts (~3,5rem). */
|
|||
|
|
.panneau-photo {
|
|||
|
|
position: relative; /* ancre du panneau d'indices */
|
|||
|
|
flex: 1 1 0;
|
|||
|
|
min-height: 5rem;
|
|||
|
|
max-height: 42dvh;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.panneau-carte {
|
|||
|
|
position: relative; /* ancre de la puce de statut et de l'aide */
|
|||
|
|
flex: 1 1 0;
|
|||
|
|
min-height: calc(35dvh + 3.5rem);
|
|||
|
|
display: flex;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.panneau-carte > * {
|
|||
|
|
flex: 1;
|
|||
|
|
min-width: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* État résultat : le panneau photo devient une fiche scrollable interne. */
|
|||
|
|
.split.resultat .panneau-photo {
|
|||
|
|
max-height: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.split.resultat .panneau-carte {
|
|||
|
|
min-height: 10rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.resultat-scroll {
|
|||
|
|
height: 100%;
|
|||
|
|
overflow-y: auto;
|
|||
|
|
background: var(--oki-blanc);
|
|||
|
|
border-radius: var(--oki-radius);
|
|||
|
|
box-shadow: var(--oki-ombre);
|
|||
|
|
padding: 1rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Puce de statut unique (manche, seed, minuteur) : haut-droite, une ligne.
|
|||
|
|
Aucun élément absolu au-dessus des zones interactives : les badges sont
|
|||
|
|
décoratifs, les clics les traversent. — */
|
|||
|
|
.statut {
|
|||
|
|
position: absolute;
|
|||
|
|
top: 0.5rem;
|
|||
|
|
right: 0.5rem;
|
|||
|
|
z-index: 3;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: flex-end;
|
|||
|
|
gap: 0.4rem;
|
|||
|
|
max-width: calc(100% - 1rem);
|
|||
|
|
pointer-events: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.badge-manche {
|
|||
|
|
background: rgba(255, 253, 248, 0.94);
|
|||
|
|
color: var(--oki-vert);
|
|||
|
|
border-radius: 999px;
|
|||
|
|
padding: 0.25rem 0.8rem;
|
|||
|
|
font-size: 0.82rem;
|
|||
|
|
font-weight: 700;
|
|||
|
|
white-space: nowrap;
|
|||
|
|
box-shadow: var(--oki-ombre);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Seed visible mais discrète : les joueurs vérifient qu'ils jouent le même défi */
|
|||
|
|
.badge-seed {
|
|||
|
|
background: rgba(255, 253, 248, 0.8);
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
border-radius: 999px;
|
|||
|
|
padding: 0.15rem 0.7rem;
|
|||
|
|
font-size: 0.72rem;
|
|||
|
|
font-weight: 600;
|
|||
|
|
white-space: nowrap;
|
|||
|
|
box-shadow: var(--oki-ombre);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.badge-timer {
|
|||
|
|
display: flex;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Indices : panneau scrollable interne, en surimpression de la photo
|
|||
|
|
(zone non interactive) — jamais au-dessus de la carte. — */
|
|||
|
|
.indices {
|
|||
|
|
position: absolute;
|
|||
|
|
left: 0.4rem;
|
|||
|
|
right: 0.4rem;
|
|||
|
|
bottom: 0.4rem;
|
|||
|
|
z-index: 4;
|
|||
|
|
max-height: calc(100% - 0.8rem);
|
|||
|
|
overflow-y: auto;
|
|||
|
|
margin: 0;
|
|||
|
|
padding: 0.4rem 0.6rem;
|
|||
|
|
background: rgba(255, 253, 248, 0.96);
|
|||
|
|
border-radius: var(--oki-radius-petit);
|
|||
|
|
box-shadow: var(--oki-ombre);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.indice {
|
|||
|
|
margin: 0.25rem 0;
|
|||
|
|
background: var(--oki-bleu-doux);
|
|||
|
|
border-left: 4px solid var(--oki-bleu);
|
|||
|
|
border-radius: var(--oki-radius-petit);
|
|||
|
|
padding: 0.5rem 0.8rem;
|
|||
|
|
font-size: 0.95rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Aide « poser le marqueur » : pastille décorative sur la carte, les clics
|
|||
|
|
la traversent (pointer-events: none). Sur mobile elle flotte au bas du
|
|||
|
|
canevas, juste au-dessus de la barre de sauts (~3,65rem) ; sur desktop elle
|
|||
|
|
est décalée à droite pour ne pas chevaucher les sauts en overlay bas-gauche. — */
|
|||
|
|
.aide-carte {
|
|||
|
|
position: absolute;
|
|||
|
|
left: 50%;
|
|||
|
|
bottom: 3.9rem; /* 48px de sauts + espacements, arrondi au-dessus */
|
|||
|
|
transform: translateX(-50%);
|
|||
|
|
z-index: 3;
|
|||
|
|
margin: 0;
|
|||
|
|
padding: 0.3rem 0.9rem;
|
|||
|
|
max-width: calc(100% - 5rem);
|
|||
|
|
background: rgba(255, 253, 248, 0.92);
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
border-radius: 999px;
|
|||
|
|
box-shadow: var(--oki-ombre);
|
|||
|
|
font-size: 0.85rem;
|
|||
|
|
text-align: center;
|
|||
|
|
white-space: nowrap;
|
|||
|
|
overflow: hidden;
|
|||
|
|
text-overflow: ellipsis;
|
|||
|
|
pointer-events: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Barre d'actions : en bas du flux (la page ne scrolle pas), opaque,
|
|||
|
|
au-dessus de la carte grâce au z-index explicite. — */
|
|||
|
|
.barre-actions {
|
|||
|
|
position: sticky;
|
|||
|
|
bottom: 0;
|
|||
|
|
z-index: 5;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: space-between;
|
|||
|
|
gap: 0.6rem;
|
|||
|
|
padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom));
|
|||
|
|
background: var(--oki-blanc);
|
|||
|
|
border-top: 1px solid var(--oki-sable-fonce);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.barre-actions .btn {
|
|||
|
|
min-height: 48px; /* cible tactile */
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.actions-secondaires {
|
|||
|
|
display: flex;
|
|||
|
|
gap: 0.5rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.actions-secondaires .btn {
|
|||
|
|
padding: 0.6rem 0.9rem;
|
|||
|
|
font-size: 0.92rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.penalite {
|
|||
|
|
font-size: 0.75rem;
|
|||
|
|
font-weight: 500;
|
|||
|
|
opacity: 0.8;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.valider {
|
|||
|
|
flex: 0 1 auto;
|
|||
|
|
padding: 0.8rem 1.2rem;
|
|||
|
|
white-space: nowrap;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Écrans très étroits : tout doit tenir sur une ligne. */
|
|||
|
|
@media (max-width: 420px) {
|
|||
|
|
.actions-secondaires .btn {
|
|||
|
|
padding: 0.55rem 0.7rem;
|
|||
|
|
font-size: 0.86rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.penalite {
|
|||
|
|
display: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.valider {
|
|||
|
|
padding: 0.7rem 0.9rem;
|
|||
|
|
font-size: 0.95rem;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Paysage / écrans très bas : on relâche les planchers pour éviter le rognage. */
|
|||
|
|
@media (max-height: 540px) {
|
|||
|
|
.panneau-photo {
|
|||
|
|
min-height: 3.5rem;
|
|||
|
|
max-height: 34dvh;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.panneau-carte {
|
|||
|
|
min-height: 11rem;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Desktop : split 50/50 qui remplit exactement la hauteur disponible. */
|
|||
|
|
@media (min-width: 768px) {
|
|||
|
|
.split {
|
|||
|
|
flex-direction: row;
|
|||
|
|
gap: 0.8rem;
|
|||
|
|
padding: 0.8rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.panneau-photo,
|
|||
|
|
.split.resultat .panneau-photo {
|
|||
|
|
flex: 1 1 50%;
|
|||
|
|
min-height: 0;
|
|||
|
|
max-height: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.panneau-carte,
|
|||
|
|
.split.resultat .panneau-carte {
|
|||
|
|
flex: 1 1 50%;
|
|||
|
|
min-height: 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.aide-carte {
|
|||
|
|
left: auto;
|
|||
|
|
right: 0.8rem;
|
|||
|
|
bottom: 3.4rem; /* au-dessus de la rangée de sauts en overlay bas-gauche */
|
|||
|
|
transform: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.barre-actions {
|
|||
|
|
justify-content: center;
|
|||
|
|
gap: 1.5rem;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Écran bilan du défi : compact, scroll interne en dernier recours. — */
|
|||
|
|
.bilan {
|
|||
|
|
flex: 1;
|
|||
|
|
min-height: 0;
|
|||
|
|
overflow-y: auto;
|
|||
|
|
width: 100%;
|
|||
|
|
max-width: 900px;
|
|||
|
|
margin: 0 auto;
|
|||
|
|
padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 0.8rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bilan h1 {
|
|||
|
|
margin: 0;
|
|||
|
|
text-align: center;
|
|||
|
|
font-size: 1.6rem;
|
|||
|
|
color: var(--oki-vert);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Filet drapeau du bilan : 3 segments francs aux couleurs OKI qui se
|
|||
|
|
dessinent (scaleX) en cascade syncopée — sobre, pas de confettis. */
|
|||
|
|
.filet-drapeau {
|
|||
|
|
display: flex;
|
|||
|
|
width: 132px;
|
|||
|
|
height: 5px;
|
|||
|
|
margin: 0 auto;
|
|||
|
|
border-radius: 3px;
|
|||
|
|
overflow: hidden;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.filet-drapeau .seg {
|
|||
|
|
flex: 1;
|
|||
|
|
transform-origin: left center;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.filet-drapeau .seg-vert {
|
|||
|
|
background: var(--oki-vert);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.filet-drapeau .seg-corail {
|
|||
|
|
background: var(--oki-corail);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.filet-drapeau .seg-bleu {
|
|||
|
|
background: var(--oki-bleu);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Seed rappelée sous le titre du bilan (page /defi/[seed]) */
|
|||
|
|
.seed-discret {
|
|||
|
|
margin: 0;
|
|||
|
|
text-align: center;
|
|||
|
|
font-size: 0.9rem;
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.total {
|
|||
|
|
margin: 0;
|
|||
|
|
text-align: center;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.total .valeur {
|
|||
|
|
font-size: 2.4rem;
|
|||
|
|
font-weight: 800;
|
|||
|
|
color: var(--oki-vert);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.total .unite {
|
|||
|
|
margin-left: 0.4rem;
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Carte SVG du récap : hauteur plafonnée à 44dvh via la largeur
|
|||
|
|
(viewBox 600×620 → hauteur ≈ largeur × 1,033). */
|
|||
|
|
.bilan-carte {
|
|||
|
|
width: min(100%, 42.5dvh, 520px);
|
|||
|
|
margin: 0 auto;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.recap {
|
|||
|
|
list-style: none;
|
|||
|
|
margin: 0;
|
|||
|
|
padding: 0;
|
|||
|
|
display: flex;
|
|||
|
|
flex-direction: column;
|
|||
|
|
gap: 0.4rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.recap li {
|
|||
|
|
display: flex;
|
|||
|
|
align-items: baseline;
|
|||
|
|
gap: 0.6rem;
|
|||
|
|
background: var(--oki-blanc);
|
|||
|
|
border-radius: var(--oki-radius-petit);
|
|||
|
|
box-shadow: var(--oki-ombre);
|
|||
|
|
padding: 0.5rem 0.9rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.r-nom {
|
|||
|
|
font-weight: 700;
|
|||
|
|
color: var(--oki-vert);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.r-region {
|
|||
|
|
flex: 1;
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
font-size: 0.9rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.r-score {
|
|||
|
|
font-weight: 800;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bilan-actions {
|
|||
|
|
display: flex;
|
|||
|
|
flex-wrap: wrap;
|
|||
|
|
justify-content: center;
|
|||
|
|
gap: 0.7rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bilan-actions .btn {
|
|||
|
|
min-height: 48px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.legende {
|
|||
|
|
margin: 0;
|
|||
|
|
text-align: center;
|
|||
|
|
font-size: 0.85rem;
|
|||
|
|
color: var(--oki-encre-doux);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.puce.joueur {
|
|||
|
|
color: var(--oki-corail);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.puce.reelle {
|
|||
|
|
color: var(--oki-vert);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Bilan desktop : deux colonnes (carte | récap) pour tenir sans scroll. */
|
|||
|
|
@media (min-width: 900px) {
|
|||
|
|
.bilan {
|
|||
|
|
display: grid;
|
|||
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|||
|
|
align-content: start;
|
|||
|
|
column-gap: 1.5rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bilan h1,
|
|||
|
|
.bilan .seed-discret,
|
|||
|
|
.bilan .filet-drapeau,
|
|||
|
|
.bilan .total,
|
|||
|
|
.bilan .bilan-actions,
|
|||
|
|
.bilan .legende {
|
|||
|
|
grid-column: 1 / -1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bilan-carte {
|
|||
|
|
width: min(100%, 42.5dvh);
|
|||
|
|
justify-self: center;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Hauteur limitée : resserre le bilan pour rester sans scroll dès 800px. */
|
|||
|
|
@media (max-height: 800px) {
|
|||
|
|
.bilan {
|
|||
|
|
gap: 0.55rem;
|
|||
|
|
padding-top: 0.6rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.bilan h1 {
|
|||
|
|
font-size: 1.35rem;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.total .valeur {
|
|||
|
|
font-size: 1.9rem;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* — Motion (playbook §1.7) : transform/opacity uniquement, tout est sous
|
|||
|
|
gate html.js + no-preference — contenu statique complet sans JS ni motion. — */
|
|||
|
|
@media (prefers-reduced-motion: no-preference) {
|
|||
|
|
/* Moment révélation : la fiche résultat monte pendant que la carte prend
|
|||
|
|
l'emphase (léger zoom de reprise, --dur-mesure --ease-ka). */
|
|||
|
|
html.js .resultat-scroll {
|
|||
|
|
animation: jwe-montee var(--dur-mesure) var(--ease-ka);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
html.js .split.resultat .panneau-carte {
|
|||
|
|
animation: jwe-emphase var(--dur-mesure) var(--ease-ka);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Pastilles de statut (manche, seed, minuteur) : apparition en pop. */
|
|||
|
|
html.js .badge-manche,
|
|||
|
|
html.js .badge-seed,
|
|||
|
|
html.js .badge-timer {
|
|||
|
|
animation: oki-pop var(--dur-mesure) var(--ease-ka) backwards;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* Filet drapeau du bilan : segments qui se dessinent 0 / 120 / 300 ms. */
|
|||
|
|
html.js .filet-drapeau .seg {
|
|||
|
|
animation: jwe-filet var(--dur-mesure) var(--ease-ka) backwards;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
html.js .filet-drapeau .seg-corail {
|
|||
|
|
animation-delay: 120ms;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
html.js .filet-drapeau .seg-bleu {
|
|||
|
|
animation-delay: 300ms;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@keyframes jwe-montee {
|
|||
|
|
from {
|
|||
|
|
transform: translateY(18px);
|
|||
|
|
opacity: 0;
|
|||
|
|
}
|
|||
|
|
to {
|
|||
|
|
transform: translateY(0);
|
|||
|
|
opacity: 1;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@keyframes jwe-emphase {
|
|||
|
|
from {
|
|||
|
|
transform: scale(0.965);
|
|||
|
|
opacity: 0.7;
|
|||
|
|
}
|
|||
|
|
to {
|
|||
|
|
transform: scale(1);
|
|||
|
|
opacity: 1;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@keyframes jwe-filet {
|
|||
|
|
from {
|
|||
|
|
transform: scaleX(0);
|
|||
|
|
}
|
|||
|
|
to {
|
|||
|
|
transform: scaleX(1);
|
|||
|
|
}
|
|||
|
|
}
|