/* Roadfolk : design tokens (couleurs et polices du brief, section 11) */
:root {
  --vert: #4F6B3A;
  --terracotta: #C8693A;
  --sable: #E7C8A3;
  --creme: #FBF6EC;
  --brun: #3B291D;
  --blanc-carte: #FFFDF8;
  --ombre: 0 6px 18px rgba(59, 41, 29, .12);
  --rayon: 24px;
  --titre: "Playfair Display", Georgia, serif;
  --texte: "Nunito", system-ui, sans-serif;
  --main: "Caveat", cursive;
  --nav-h: 84px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  background: var(--creme); color: var(--brun); font: 17px/1.45 var(--texte);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.15; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; flex: none; }

#app { min-height: 100%; max-width: 560px; margin: 0 auto; position: relative; }

/* Boutons : grands, pour les doigts gantés */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 58px; padding: 14px 22px; border: 0; border-radius: 999px;
  background: var(--vert); color: #fff; font-weight: 700; font-size: 18px; cursor: pointer;
  box-shadow: var(--ombre);
}
.btn.accent { background: var(--terracotta); }
.btn.clair { background: var(--sable); color: var(--brun); box-shadow: none; }
.btn[disabled] { opacity: .5; }
.btn:focus-visible, .champ:focus-visible, .choix:focus-visible, .onglet:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }

.carte { background: var(--blanc-carte); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre); }
.note { font-family: var(--main); font-size: 23px; line-height: 1.2; }
.discret { opacity: .75; font-size: 15px; }

/* Écran de connexion */
.accueil { min-height: 100dvh; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #f3c9a9; }
.accueil .fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.accueil .voile { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(251,246,236,.97) 0%, rgba(251,246,236,.85) 30%, rgba(251,246,236,0) 52%, rgba(59,41,29,.0) 70%, rgba(59,41,29,.55) 100%); }
.accueil > * { position: relative; }
.accueil .logo { width: min(86%, 380px); margin: calc(env(safe-area-inset-top) + 16px) auto 0; }
.accueil .bas { padding: 24px 20px calc(env(safe-area-inset-bottom) + 28px); display: grid; gap: 12px; }
.accueil .discret { color: #fff; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* Formulaires */
.page { padding: calc(env(safe-area-inset-top) + 20px) 18px calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); }
.page.sans-nav { padding-bottom: calc(env(safe-area-inset-bottom) + 28px); }
.etape { display: grid; gap: 16px; }
.champ { width: 100%; min-height: 58px; padding: 12px 18px; border: 2px solid var(--sable); border-radius: 18px; background: #fff; }
.etiquette { font-weight: 700; margin-bottom: 6px; display: block; }
.grille { display: grid; gap: 12px; }
.grille.casques { grid-template-columns: repeat(3, 1fr); }
.grille.motos { grid-template-columns: repeat(2, 1fr); }
.choix {
  border: 3px solid transparent; border-radius: 20px; background: #fff; padding: 8px; cursor: pointer; text-align: center;
  box-shadow: var(--ombre); display: grid; gap: 4px; justify-items: center;
}
.choix[aria-pressed="true"] { border-color: var(--vert); background: #EEF3E6; }
.choix img { width: 100%; }
.choix.casque img { border-radius: 50%; }
.erreur { color: #8a2f10; background: #f7ddd0; border-radius: 14px; padding: 10px 14px; font-weight: 600; }

/* En-tête avec décor de montagnes */
.entete { position: relative; padding: calc(env(safe-area-inset-top) + 16px) 18px 6px; background: url(/assets/decor/haut.webp) right bottom / cover no-repeat; }
.entete .salut { display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--creme); box-shadow: var(--ombre); flex: none; }
.entete h1 { font-size: 34px; margin: 18px 0 8px; }

.vide { text-align: center; padding: 30px 18px; display: grid; gap: 12px; justify-items: center; }
.vide img { width: 150px; opacity: .9; }

/* La bande */
.membres { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 14px 0 18px; }
.membre { text-align: center; padding: 14px 10px; display: grid; gap: 4px; justify-items: center; }
.membre .avatar { width: 84px; }
.membre .moto { width: 100%; max-width: 150px; margin-top: 2px; }
.membre b { font-family: var(--titre); font-size: 20px; }

/* Navigation basse flottante, avec petits sapins derrière */
/* Les sapins restent dans la largeur de l'app (comme le haut), leurs bords se fondent dans le crème */
.nav-fond {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 600px); height: 170px;
  background: url(/assets/decor/bas-gauche.webp) left bottom / auto 100% no-repeat, url(/assets/decor/bas-droite.webp) right bottom / auto 100% no-repeat;
  pointer-events: none; z-index: 5;
}
.nav {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 536px);
  bottom: calc(env(safe-area-inset-bottom) + 10px); height: 68px; display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center;
  background: var(--blanc-carte); border-radius: 999px; box-shadow: 0 8px 24px rgba(59,41,29,.18); padding: 0 6px;
}
.onglet { display: grid; justify-items: center; gap: 2px; border: 0; background: none; font-size: 13px; font-weight: 600; min-height: 56px; cursor: pointer; color: var(--brun); }
.onglet svg { width: 26px; height: 26px; }
.onglet[aria-current="page"] { color: var(--vert); font-weight: 700; }
.boussole { width: 72px; height: 72px; margin: -22px auto 0; border-radius: 50%; border: 0; background: var(--vert); display: grid; place-items: center; box-shadow: var(--ombre); cursor: pointer; }
.boussole svg { width: 36px; height: 36px; }
.svg-trait { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ecran-attente { min-height: 100dvh; display: grid; place-items: center; }
