/* app/menus.css — la barre des menus et le bloc du bas (app/menus.js), le départ de l'accueil, la
   Carrière (app/carriere.js), les ordres de la pause, le prochain objectif de l'écran de fin, et les
   noms des persos qui ne se coupent pas. Chargée en dernier. */

/* Un nom de perso ne se coupe jamais en fin de ligne (« Strix Æ-7 », « Hex Nøde-Ø »). */
.nom-perso{white-space:nowrap;}

/* ---------- Le bloc du bas ----------
   Collé au bas de la fenêtre, sur un fond plein (ce qui défile passe dessous, sans se mélanger aux
   boutons) : les actions de l'écran, puis la barre. Debout : l'une au-dessus de l'autre ; couché
   (et sur ordinateur) : la barre à gauche, toujours de la même largeur, les actions à droite. */
.arena-panel{--menus-pad:28px;}
.arena-panel.wide{--menus-pad:30px;}
html.petit-ecran .arena-panel,html.petit-ecran .arena-panel.wide{--menus-pad:16px;}
.arena-root .arena-panel:has(.menus-bas){padding-bottom:0;}
.arena-root .menus-bas{position:sticky;bottom:0;z-index:3;flex:none;display:flex;flex-direction:column;gap:8px;
 margin:auto calc(-1 * var(--menus-pad)) 0;padding:10px var(--menus-pad) calc(12px + env(safe-area-inset-bottom,0px));
 background:linear-gradient(180deg,rgba(8,7,18,0),#080712 10px);}
/* La rangée d'actions (la classe .arena-actions reste : le moteur y retrouve le bouton Fiche). */
html .arena-root .arena-panel .menus-bas > .arena-actions{position:static;display:flex;gap:8px;margin:0;padding:0;background:none;}
html .arena-root .arena-panel .menus-bas > .arena-actions .arena-btn{flex:1 1 0;min-width:0;height:auto;min-height:50px;padding:4px 10px;line-height:1.2;}
html .arena-root .arena-panel .menus-bas > .arena-actions .arena-btn.primary:not(.atelier-action){flex-grow:1.25;font-size:16px;letter-spacing:.14em;}
.arena-root .menus-bas > .atelier-manque{margin:0;}

/* ---------- La barre des menus ---------- */
.menus-barre{display:flex;gap:6px;}
.menus-onglet{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
 min-height:54px;padding:6px 2px 5px;border-radius:12px;cursor:pointer;white-space:nowrap;
 font:700 11px/1.1 system-ui,sans-serif;color:#cfd5e4;background:rgba(18,16,36,.92);border:1px solid rgba(0,224,255,.2);}
.menus-onglet span{max-width:100%;overflow:hidden;text-overflow:ellipsis;}
.menus-onglet svg{flex:none;width:22px;height:22px;fill:none;stroke:#7ff3ff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
 filter:drop-shadow(0 0 3px rgba(0,224,255,.6));}
.menus-onglet svg .plein{fill:#ffd23d;stroke:#ffd23d;stroke-width:1;filter:drop-shadow(0 0 2px rgba(255,210,61,.7));}
.menus-onglet svg .trait-plein{stroke:#ffd23d;stroke-width:2;}
.menus-onglet[data-act]:hover,.menus-onglet[data-act]:focus-visible{border-color:rgba(0,224,255,.55);background:linear-gradient(rgba(0,224,255,.1),rgba(0,224,255,.1)),rgba(18,16,36,.92);outline:none;}
.menus-onglet[data-act]:hover svg,.menus-onglet[data-act]:focus-visible svg{stroke:#fff;}
/* L'écran ouvert : allumé, un trait cyan en haut. */
.menus-onglet.on{color:#7ff3ff;border-color:#00e0ff;background:linear-gradient(rgba(0,224,255,.14),rgba(0,224,255,.14)),rgba(18,16,36,.92);
 box-shadow:inset 0 2px 0 #00e0ff,0 0 14px rgba(0,224,255,.22);}
.menus-onglet[aria-current]{cursor:default;}
/* Quelque chose y attend (un achat possible, un rapport nouveau) : un point lumineux. */
.menus-onglet.point::after,.atelier-onglet.point::after{content:"";position:absolute;top:5px;right:7px;width:8px;height:8px;border-radius:50%;
 background:#ffd63d;box-shadow:0 0 8px #ffd63d;animation:accueil-point 1.6s infinite;}
.atelier-onglet.point{position:relative;}

@media (orientation:landscape){
 .arena-root .menus-bas{flex-direction:row-reverse;align-items:stretch;gap:10px;}
 .arena-root .menus-bas.seule{justify-content:flex-end;}
 .arena-root .menus-bas > .menus-barre{flex:0 0 56%;}
 html .arena-root .arena-panel .menus-bas > .arena-actions{flex:1 1 auto;min-width:0;}
 /* Le manque d'Ærg passe au-dessus du bloc (couché, la ligne n'a plus la place). */
 .arena-root .menus-bas:has(> .atelier-manque){flex-wrap:wrap;}
 .arena-root .menus-bas > .atelier-manque{flex:1 0 100%;}
}
@media (orientation:landscape) and (max-height:560px){
 .arena-root .menus-bas{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));}
 .menus-onglet{min-height:48px;padding:4px 2px 3px;gap:2px;font-size:10.5px;}
 .menus-onglet svg{width:20px;height:20px;}
 html .arena-root .arena-panel .menus-bas > .arena-actions .arena-btn{min-height:48px;}
 html .arena-root .arena-panel .menus-bas > .arena-actions .arena-btn.primary:not(.atelier-action){font-size:15px;}
}

/* ---------- Les boutons à symbole (Fiche, Accueil de la pause) et la roue de la pause ---------- */
.arena-btn.menus-symbole,.arena-btn.menus-roue{display:inline-flex;align-items:center;justify-content:center;gap:7px;}
html .arena-root .arena-panel .arena-actions .arena-btn.menus-roue{flex:0 0 56px;min-width:0;padding:0;}
.menus-symbole svg,.menus-roue svg{flex:none;width:22px;height:22px;fill:none;stroke:#7ff3ff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
 filter:drop-shadow(0 0 3px rgba(0,224,255,.55));}
.menus-symbole svg .plein,.menus-roue svg .plein{fill:#ffd23d;stroke:#ffd23d;stroke-width:1;}
.menus-symbole svg .trait-plein{stroke:#ffd23d;stroke-width:2;}
.menus-symbole span{min-width:0;white-space:nowrap;}
/* Très étroit : le mot seul (« Fiche de Strix » garde sa place). */
@media (max-width:379px){
 .arena-actions .menus-symbole[data-act="fiche"] svg{display:none;}
}

/* ---------- L'accueil : la barre sous le départ ---------- */
.accueil-col .menus-barre{flex:none;}
@media (orientation:landscape) and (max-height:430px){
 .accueil-col{top:8px;justify-content:safe center;}
 .accueil-col .coffre-txt small{display:none;}
 /* « Changer » devient sa flèche seule : le niveau et les appuis tiennent sur une ligne. */
 .accueil-changer{font-size:0;}
 .accueil-changer::after{content:"›";font-size:22px;line-height:1;}
 .accueil-col .menus-onglet{min-height:44px;padding:3px 2px 2px;}
 .accueil-col .menus-onglet svg{width:19px;height:19px;}
}
/* Couché, très peu de hauteur (barres du navigateur visibles) : le titre reste entier ; la phrase du
   siège laisse sa place (elle est dans les Ordres), le départ se serre. */
@media (orientation:landscape) and (max-height:380px){
 .accueil-col .siege{display:none;}
 .accueil-col .accueil-perso{padding-top:3px;padding-bottom:3px;}
 .accueil-col .accueil-portrait{width:44px;height:44px;}
 .accueil-col .arena-btn.primary.accueil-jouer{min-height:48px;}
 .accueil-col{bottom:30px;}
 .arena-title.accueil-titre{font-size:clamp(24px,4.2vw,34px);}
 .accueil-col .menus-onglet{min-height:40px;gap:1px;font-size:10px;}
 .accueil-col .menus-onglet svg{width:18px;height:18px;}
}
@media (orientation:landscape) and (max-height:400px){
 html.tactile .accueil-col .ordre{padding-top:2px;padding-bottom:2px;}
 .accueil-col .ordres-titre .aerg-compteur{padding-top:1px;padding-bottom:1px;}
}
/* Plus bas encore : le coffre du jour attend dans les Ordres. */
@media (orientation:landscape) and (max-height:345px){
 .accueil-col .coffre{display:none;}
}

/* ---------- La Carrière ---------- */
.arena-panel.carriere-ecran{width:min(760px,100%);}
.carriere{display:flex;flex-direction:column;gap:10px;}
.carriere-bloc{display:flex;flex-direction:column;gap:6px;padding:9px 11px;border-radius:12px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);}
.carriere-grade-nom{font-size:14px;color:#c9cfe0;}
.carriere-grade-nom b{color:var(--gc,#fff);font-weight:900;}
.carriere-grade .grade-barre{display:block;height:6px;border-radius:3px;background:#15132a;overflow:hidden;}
.carriere-grade .grade-barre b{display:block;height:100%;background:var(--gc,#9a5cff);box-shadow:0 0 8px var(--gc,#9a5cff);}
.carriere-prochain{display:flex;align-items:center;gap:8px;font-size:12px;color:#9ea6bd;line-height:1.35;}
.carriere-prochain b{color:#e7e9ee;}
.carriere-prochain .appui-ico{flex:none;width:24px;height:24px;fill:none;stroke:#7ff3ff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.carriere-records{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.carriere-records div{display:flex;flex-direction:column;gap:2px;padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.04);font-size:11.5px;color:#9ea6bd;line-height:1.25;}
.carriere-records b{font:900 19px/1.1 system-ui,sans-serif;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap;}
.carriere .arena-scores{margin:0;}
.carriere .arena-empty{margin:2px 0;font-size:12.5px;}
html.petit-ecran .carriere-records b{font-size:16px;}
@media (orientation:portrait){
 html.petit-ecran .carriere .arena-sdate{display:none;}
}

/* ---------- La pause : les ordres de la partie ---------- */
.ordres-pause{margin:10px 0 2px;}
.ordres-pause .ordres-titre{margin-bottom:1px;}
/* Couché, peu de hauteur : les ordres à côté de la phrase, la pause tient sans défiler. */
@media (orientation:landscape) and (max-height:560px){
 .arena-panel:has(> .ordres-pause){width:min(720px,100%);}
 .ordres-pause{gap:4px;margin-top:6px;}
}

/* ---------- L'écran de fin : le prochain objectif, toute la ligne mène à l'achat ---------- */
button.bilan-objectif{width:100%;font:inherit;font-size:12px;text-align:left;cursor:pointer;}
.bilan-objectif em{flex:none;font-style:normal;font-weight:800;color:#7ff3ff;white-space:nowrap;}
.bilan-objectif:hover,.bilan-objectif:focus-visible{border-color:#00e0ff;outline:none;}

/* ---------- Les paramètres : l'aide ---------- */
.arena-btn.reglages-lire{flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;font-size:13px;font-weight:700;}
.reglages-lire svg{width:20px;height:20px;fill:none;stroke:#7ff3ff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.reglages-lire svg .plein{fill:#ffd23d;stroke:#ffd23d;stroke-width:1;}
.reglages .arena-actions .arena-btn{min-height:46px;font-size:14px;font-weight:700;}
/* Couché : Son puis Aide à gauche, Commandes et Écran puis le crédit de la musique à droite ; peu de
   hauteur : lignes plus serrées, tout tient sans défiler. */
@media (min-width:700px) and (max-height:520px){
 .reglages .reglages-grille{grid-template-areas:"son ce" "aide ce" "aide credit";grid-template-rows:auto 1fr auto;row-gap:0;}
 .reglages .reglages-grille > .reglages-sec:first-child{grid-area:son;}
 .reglages .reglages-grille > .reglages-sec:nth-child(2){grid-area:ce;}
 .reglages .reglages-grille > .reglages-aide{grid-area:aide;}
 .reglages .reglages-grille > .reglages-credit{grid-area:credit;align-self:end;}
}
@media (min-width:700px) and (max-height:430px){
 .reglages .reglages-p{padding-top:12px;}
 .reglages .reglages-titre{font-size:20px;}
 .reglages .reglages-l{min-height:34px;}
 .reglages .reglages-sec h3{margin-top:6px;}
 .reglages .reglages-titre{margin-bottom:0;}
 .reglages .reglages-credit{margin-top:6px;padding-top:6px;}
 .reglages .arena-actions{margin-top:6px;padding-top:6px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));}
 .reglages .arena-actions .arena-btn{min-height:42px;}
}
