/* Bruyère Idle : la mise en page de l'appli (les jetons de la charte sont dans commun.css). */
html, body { height: 100%; overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tel { width: 100%; max-width: 480px; height: 100vh; height: 100dvh; margin: 0 auto; }
@media (min-width: 520px) { .tel { border-left: 1px solid var(--ligne); border-right: 1px solid var(--ligne); } }
.ecran { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: env(safe-area-inset-top); }
.entete { padding-top: 14px; }
.entete h1 { min-width: 0; }
.contenu { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 18px; }
.onglets { height: auto; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.onglets button { min-height: 50px; }
.bas { border-top: 1px solid var(--ligne); background: rgba(20, 16, 25, .9); }
.retour-ecran .bas { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

button { touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button:disabled { opacity: .5; cursor: default; }
.btn:active:not(:disabled), .puce:active, .ligne.choix:active, .recette:active, .tuile:active { transform: scale(.97); }
.retour { font-size: 24px; line-height: 1; width: 44px; height: 44px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 1px solid var(--ligne-forte); flex-shrink: 0; background: var(--panneau-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.ecart { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rangee { display: flex; flex-wrap: wrap; gap: 8px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.droite { text-align: right; flex-shrink: 0; }
.btn-petit { height: 40px; }
.croix { width: 40px; height: 40px; border-radius: 10px; color: var(--encre-3); font-size: 16px; flex-shrink: 0; }

/* puces de choix (filtres, quantités) */
.puces { display: flex; gap: 8px; padding: 0 16px 10px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce { height: 40px; padding: 0 14px; border-radius: 99px; background: var(--panneau-2); border: 1px solid var(--ligne); font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--encre-2); }
.puce.actif { background: rgba(217, 164, 65, .18); border-color: rgba(217, 164, 65, .6); color: var(--or-clair); }

/* lignes qu'on choisit */
.ligne.choix { width: 100%; text-align: left; }
.ligne.choisi { background: rgba(217, 164, 65, .08); margin: 0 -14px; padding-left: 14px; padding-right: 14px; width: calc(100% + 28px); box-shadow: inset 3px 0 0 var(--or); }
.ligne.verrou { opacity: .5; }

/* métiers */
.grille-metiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.carte.metier { padding: 10px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.carte.metier .nom { font-size: 13px; font-weight: 650; }

/* recettes */
.grille-recettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.recette { background: var(--panneau); border: 1px solid var(--ligne); border-radius: 12px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-height: 92px; }
.recette .i { font-size: 26px; }
.recette .n { font-size: 12px; font-weight: 650; line-height: 1.2; }
.recette.choisi { border-color: var(--or); background: rgba(217, 164, 65, .1); }
.recette.verrou { opacity: .45; }

/* tuiles */
.tuiles.six { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tuiles.six .tuile { font-size: 22px; }
.tuile.vide { border-style: dashed; }
.tuile.vide .petit { font-size: 9.5px; text-align: center; }
.tuile[data-choisi] { border-color: var(--or); box-shadow: inset 0 0 12px rgba(217, 164, 65, .3); }

/* accueil */
.accueil .contenu { align-items: stretch; gap: 14px; padding-top: 30px; }
.logo { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.titre-jeu { font-family: var(--titre); color: var(--or); font-size: 34px; text-align: center; }
.chapo { text-align: center; color: var(--encre-2); font-size: 15px; line-height: 1.5; }
input, textarea { width: 100%; font: inherit; color: var(--encre); background: var(--nuit-2); border: 1px solid var(--ligne-forte); border-radius: 10px; padding: 12px; margin-top: 6px; font-size: 16px; }
textarea { font-size: 12px; font-family: ui-monospace, monospace; resize: vertical; }
details summary { cursor: pointer; padding: 4px 0; }

/* annonce */
#annonce { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -30px); opacity: 0; pointer-events: none;
  background: var(--panneau-2); border: 1px solid rgba(217, 164, 65, .55); color: var(--encre); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); transition: transform .25s, opacity .25s; z-index: 10; max-width: 92vw; text-align: center; }
#annonce.vu { transform: translate(-50%, 0); opacity: 1; }
.monte { animation: monte .6s ease-out; }
@keyframes monte { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* combat */
.bandeau { height: 112px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 12px 14px; }
.journal { font-size: 12.5px; line-height: 1.7; color: var(--encre-2); border-top: 1px solid var(--ligne); padding-top: 8px; min-height: 66px; }
.tuile-lien { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; }
.tuile-lien b { font-size: 14px; margin-top: 4px; }
.sous-ligne { padding-left: 14px; background: rgba(255, 255, 255, .02); }
.coeurs { color: #ff8fa3; font-weight: 600; letter-spacing: 1px; font-size: .9em; }

/* boutique */
.bandeau-info { display: flex; flex-direction: column; gap: 4px; border-color: rgba(200, 111, 180, .55); background: linear-gradient(180deg, rgba(74, 37, 70, .5), var(--panneau)); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { background: var(--panneau-2); border: 1px solid rgba(200, 111, 180, .45); border-radius: 12px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; }
.pack b { color: var(--or-clair); font-size: 17px; }

/* les boutons longs (récompenses) passent à la ligne au lieu de déborder */
.btn { height: auto; min-height: 52px; padding: 8px 14px; line-height: 1.25; text-align: center; flex-wrap: wrap; }
.btn-petit { min-height: 40px; padding: 6px 14px; }
