/* mobile-fix.css — 11Simulator — correctifs d'affichage téléphone (2026-11-10)
   Feuille purement visuelle : aucune logique de jeu, aucune sauvegarde touchée.
   Retour arrière : retirer la ligne <link ... mobile-fix.css> d'index.html. */

/* 0. Match en direct : la fenêtre de décision passe au-dessus des étiquettes de joueurs (toutes tailles) */
html #liveMatch .lm-stage .lm-overlay{z-index:6!important}

@media (max-width:760px){

/* ───────── 1. Écran de départ : onglets Carrière / Saison rapide / En ligne ───────── */
html[data-theme] body #startModes{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
html[data-theme] body #startModes>button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:5px!important;padding:12px 6px!important;text-align:center!important;min-width:0!important;height:auto!important}
html[data-theme] body #startModes>button>i{font-size:1.3rem!important;line-height:1!important;margin:0!important}
html[data-theme] body #startModes>button>b{font-size:.84rem!important;line-height:1.15!important;margin:0!important;text-align:center!important;width:100%!important}
html[data-theme] body #startModes>button>span{font-size:.68rem!important;line-height:1.25!important;margin:0!important;opacity:.78;text-align:center!important;width:100%!important}

/* ───────── 2. Mode Simple : lignes joueur (Effectif, Mercato) sur une seule ligne ───────── */
html[data-theme] body .s-list .s-row{display:grid!important;grid-template-columns:34px 40px minmax(0,1fr) auto!important;grid-template-rows:auto!important;align-items:center!important;gap:0 10px!important;padding:8px 10px!important;min-height:0!important}
html[data-theme] body .s-list .s-row>.s-ovr{grid-area:1/1/2/2!important;font-size:1.2rem!important;text-align:center!important}
html[data-theme] body .s-list .s-row>.s-pos{grid-area:1/2/2/3!important;width:40px!important;min-width:0!important;min-height:24px!important;height:24px!important;justify-self:start!important;font-size:.66rem!important}
html[data-theme] body .s-list .s-row>.s-name{grid-area:1/3/2/4!important;min-width:0!important;text-align:start!important}
html[data-theme] body .s-list .s-row>.s-name>b{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;line-clamp:2;overflow:hidden!important;white-space:normal!important;overflow-wrap:anywhere;font-size:.9rem!important;line-height:1.2!important}
html[data-theme] body .s-list .s-row>.s-name>small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:.72rem!important}
html[data-theme] body .s-list .s-row>button{grid-area:1/4/2/5!important;width:auto!important;min-width:92px!important;max-width:132px!important;min-height:40px!important;margin:0!important;padding:6px 8px!important;font-size:.76rem!important;white-space:nowrap!important;letter-spacing:0!important}

/* accueil Simple : un long nom de club (« Paris Saint-Germain ») élargissait toute la page sur petit écran */
html[data-theme] body .simple-page{grid-template-columns:minmax(0,1fr)!important}
html[data-theme] body .s-versus{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important}
html[data-theme] body .s-versus>div{min-width:0!important}
html[data-theme] body .s-versus .s-vs-name{max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;text-align:center!important;font-size:1.02rem!important;line-height:1.15!important}

/* ───────── 3. Mode Expert : barre du haut (le bouton Matchday était coupé) ───────── */
html[data-theme] body .topbar .top-actions{flex:1 1 auto!important;min-width:0!important;justify-content:flex-end!important;gap:5px!important;overflow:visible!important}
html[data-theme] body .topbar #arenaBtn,
html[data-theme] body .topbar #simpleMore.es-more-btn{font-size:0!important;width:34px!important;min-width:34px!important;padding:0!important;justify-content:center!important;gap:0!important}
html[data-theme] body .topbar #arenaBtn::before{content:"⚔";font-size:.95rem;line-height:1}
html[data-theme] body .topbar #simpleMore.es-more-btn>span{font-size:1.05rem!important;line-height:1!important}
html[data-theme] body .topbar #advanceBtn{flex:0 0 auto!important;white-space:nowrap!important}

/* ───────── 4. Accueil Expert : classement (colonne Pts coupée) ───────── */
html[data-theme] body .np-table{width:100%!important}
html[data-theme] body .np-table th,html[data-theme] body .np-table td{padding-left:6px!important;padding-right:6px!important}
html[data-theme] body .np-table td.np-club{max-width:calc(100vw - 190px)!important;min-width:0!important}
html[data-theme] body .np-table td.np-club>span:last-child{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

/* ───────── 5. Ardoise tactique : étiquettes qui se chevauchaient ───────── */
html[data-theme] body .pitch .pitch-player{width:74px!important;max-width:74px!important;grid-template-columns:74px!important;justify-items:center!important}
html[data-theme] body .pitch .pitch-player>strong{max-width:74px!important;font-size:.62rem!important;padding:2px 5px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
html[data-theme] body .pitch .pitch-player>.role-chip{max-width:74px!important;width:auto!important;font-size:.54rem!important;padding:1px 4px!important;letter-spacing:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

/* ───────── 6. Tableaux : cellules moins larges pour que les noms tiennent ───────── */
html[data-theme] body .content .table-wrap th,html[data-theme] body .content .table-wrap td{padding-left:5px!important;padding-right:5px!important}
html[data-theme] body .content .table-wrap .club-cell{gap:6px!important}
html[data-theme] body .content .table-wrap table:has(thead th:nth-child(11)) td:nth-child(2){max-width:calc(100vw - 212px)!important}
html[data-theme] body .content .table-wrap .club-cell>strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
/* petits tableaux (5 colonnes ou moins) : tiennent dans l'écran au lieu de défiler */
html[data-theme] body .content .table-wrap table:not(:has(thead th:nth-child(6))){min-width:0!important;width:100%!important}

/* ───────── 7. Matchday : réglages (listes déroulantes coupées) ───────── */
html[data-theme] body .match-settings-grid{grid-template-columns:1fr!important;gap:8px!important}
html[data-theme] body .match-settings-grid .match-option{align-items:center!important;padding:10px 12px!important;gap:10px!important}
html[data-theme] body .match-settings-grid .match-option>div{flex:1 1 auto!important;min-width:0!important}
html[data-theme] body .match-settings-grid .match-option>select{flex:0 0 auto!important;width:auto!important;min-width:132px!important;max-width:56%!important}

/* ───────── 8. Onglets : défilement horizontal au lieu d'onglets coupés ───────── */
html[data-theme] body .content .segment{overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch}
html[data-theme] body .content .segment::-webkit-scrollbar{display:none}
html[data-theme] body .content .segment>button{flex:1 0 auto!important;white-space:nowrap!important;min-height:40px!important;padding-left:12px!important;padding-right:12px!important}

/* ───────── 9. Mercato : cartes « Besoins de l'effectif » plus compactes ───────── */
html[data-theme] body .es-needs .es-need{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:2px 10px!important;padding:9px 11px!important;align-items:center!important}
html[data-theme] body .es-needs .es-need>.es-need-h{grid-column:1/-1!important}
html[data-theme] body .es-needs .es-need>.es-need-b{grid-column:1!important;min-width:0!important}
html[data-theme] body .es-needs .es-need>button{grid-column:2!important;align-self:center!important;min-height:36px!important;padding:6px 10px!important;font-size:.76rem!important;white-space:nowrap!important}
}

/* Très petits écrans : « Simu » en icône seule */
@media (max-width:379px){
html[data-theme] body .topbar #fastSimBtn{font-size:0!important;width:34px!important;min-width:34px!important;padding:0!important;justify-content:center!important}
html[data-theme] body .topbar #fastSimBtn::before{content:"⏩";font-size:.9rem;line-height:1}
}

/* ───────── 10. Match en direct sur téléphone (portrait) ─────────
   Avant : commentaires écrasés à 26px, Changement / Consigne cachés sous l'écran.
   Après : terrain, bande de stats, commentaires qui défilent, commandes toujours visibles. */
@media (max-width:760px) and (orientation:portrait){
html[data-theme] body #liveMatch{grid-template-rows:auto minmax(190px,40vh) minmax(0,1fr)!important}
html[data-theme] body #liveMatch .lm-top{padding:6px 10px!important;padding-top:max(6px,env(safe-area-inset-top))!important}
html[data-theme] body #liveMatch .lm-stage{min-height:0!important}
html[data-theme] body #liveMatch .lm-side{display:flex!important;flex-direction:column!important;gap:8px!important;min-height:0!important;overflow:hidden!important;padding:8px 10px!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
html[data-theme] body #liveMatch .lm-momchart{display:none!important}

html[data-theme] body #liveMatch .lm-livestats{order:1!important;flex:0 0 auto!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:auto!important;gap:0!important;padding:7px 4px!important}
html[data-theme] body #liveMatch .lm-livestats .lm-st{display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:auto auto!important;gap:1px 0!important;padding:0 8px!important;border-left:1px solid rgba(255,255,255,.09)}
html[data-theme] body #liveMatch .lm-livestats .lm-st:first-child{border-left:0}
html[data-theme] body #liveMatch .lm-livestats .lm-st>b{grid-row:1!important;font-size:.92rem!important;line-height:1.2!important}
html[data-theme] body #liveMatch .lm-livestats .lm-st>b:first-child{grid-column:1!important;text-align:left!important}
html[data-theme] body #liveMatch .lm-livestats .lm-st>b:nth-of-type(2){grid-column:2!important;text-align:right!important}
html[data-theme] body #liveMatch .lm-livestats .lm-st>span{grid-row:2!important;grid-column:1/-1!important;text-align:center!important;font-size:.56rem!important;letter-spacing:.06em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html[data-theme] body #liveMatch .lm-livestats .lm-st>.lm-st-bar{display:none!important}

html[data-theme] body #liveMatch .lm-feed{order:2!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch;padding:8px 10px!important;gap:6px!important}
html[data-theme] body #liveMatch .lm-feed .lm-line{flex:0 0 auto!important}

html[data-theme] body #liveMatch .lm-controls{order:3!important;flex:0 0 auto!important;margin-top:0!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-rows:auto!important;gap:6px!important}
html[data-theme] body #liveMatch .lm-controls>*{min-width:0!important}
html[data-theme] body #liveMatch .lm-controls>#lmPause{grid-column:span 2!important}
html[data-theme] body #liveMatch .lm-controls>.lm-speeds{grid-column:span 4!important}
html[data-theme] body #liveMatch .lm-controls>#lmSub,
html[data-theme] body #liveMatch .lm-controls>#lmMentality{grid-column:span 3!important}
html[data-theme] body #liveMatch .lm-controls>#lmView,
html[data-theme] body #liveMatch .lm-controls>#lm3d,
html[data-theme] body #liveMatch .lm-controls>#lmSkip{grid-column:span 2!important}
html[data-theme] body #liveMatch .lm-controls>button,
html[data-theme] body #liveMatch .lm-speeds button{min-height:40px!important;padding:4px 6px!important;font-size:.74rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* fenêtre de décision : tient dans le terrain réduit */
html[data-theme] body #liveMatch .lm-overlay{position:fixed!important;inset:0!important;z-index:30!important;padding:14px!important;padding-top:max(14px,env(safe-area-inset-top))!important;padding-bottom:max(14px,env(safe-area-inset-bottom))!important}
html[data-theme] body #liveMatch .lm-card{padding:16px!important;max-height:100%!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
html[data-theme] body #liveMatch .lm-card h3{font-size:1.2rem!important;line-height:1.15!important}
html[data-theme] body #liveMatch .lm-list{max-height:66vh!important}
}
@media (max-width:760px) and (orientation:portrait) and (max-height:700px){
html[data-theme] body #liveMatch{grid-template-rows:auto minmax(170px,34vh) minmax(0,1fr)!important}
html[data-theme] body #liveMatch .lm-controls>button,
html[data-theme] body #liveMatch .lm-speeds button{min-height:36px!important}
}

/* ═════════ v2 (2026-11-10) ═════════ */
/* ───────── 11. Haut de l'écran : barre toujours visible + encoche / barre d'état ─────────
   La barre du haut défilait avec la page (Arène, Matchday… introuvables après défilement) et,
   dans l'appli installée, passait sous l'encoche (le padding « safe-area » était annulé). */
@media (max-width:860px){
html[data-theme]:not([data-ui="simple"]) body #gameScreen>.topbar{position:fixed!important;top:0!important;left:0!important;right:0!important;width:auto!important;z-index:110!important;
  box-sizing:border-box!important;min-height:0!important;height:calc(60px + env(safe-area-inset-top,0px))!important;
  padding-top:env(safe-area-inset-top,0px)!important;padding-bottom:0!important;
  padding-left:max(10px,env(safe-area-inset-left,0px))!important;padding-right:max(10px,env(safe-area-inset-right,0px))!important}
html[data-theme]:not([data-ui="simple"]) body #gameScreen{grid-template-rows:calc(60px + env(safe-area-inset-top,0px)) var(--ticker,0px) 1fr!important}
/* mode Simple : la barre ne contient que le bouton de thème, elle défile mais respecte l'encoche */
html[data-theme][data-ui="simple"] body #gameScreen{grid-template-rows:auto 1fr!important}
html[data-theme][data-ui="simple"] body #gameScreen>.topbar{box-sizing:content-box!important;padding-top:env(safe-area-inset-top,0px)!important}
html[data-theme][data-ui="simple"] body #gameScreen::after{content:"";position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top,0px);z-index:79;pointer-events:none;background:var(--up-bg,var(--bg,#0a1020))}
/* menu latéral : hauteur réelle de l'écran (la fin du menu passait sous la barre du navigateur) */
html[data-theme] body #sidebar.sidebar{top:0!important;height:100vh!important;height:100dvh!important;max-height:none!important;box-sizing:border-box!important;
  padding-top:max(1rem,env(safe-area-inset-top,0px))!important;padding-bottom:max(1.2rem,env(safe-area-inset-bottom,0px))!important}
/* fenêtres : jamais plus hautes que l'écran visible, jamais sous l'encoche */
html[data-theme] body #modal.modal{padding-left:10px!important;padding-right:10px!important;padding-top:max(12px,env(safe-area-inset-top,0px))!important;padding-bottom:max(12px,env(safe-area-inset-bottom,0px))!important;align-items:center!important}
html[data-theme] body #modal .modal-card{max-height:calc(100vh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;max-width:calc(100vw - 20px)!important;min-width:0!important;box-sizing:border-box!important}
html[data-theme] body #modal .modal-card.np-ps-modal{width:calc(100vw - 20px)!important}
@supports (height:100dvh){
html[data-theme] body #modal .modal-card{max-height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)))!important}
}
}

/* ───────── 12. Effectif Expert : carte joueur compacte (124px → ~70px) ───────── */
@media (max-width:760px){
html[data-theme] body .mobile-cards .squad-mobile-card{display:grid!important;grid-template-columns:34px 34px minmax(0,1fr) auto!important;grid-template-rows:auto auto auto!important;column-gap:9px!important;row-gap:1px!important;align-items:center!important;padding:8px 10px!important}
html[data-theme] body .squad-mobile-card>.player-face{grid-column:1!important;grid-row:1/4!important}
html[data-theme] body .squad-mobile-card>.rating{grid-column:2!important;grid-row:1/4!important}
html[data-theme] body .squad-mobile-card>div:not([class]){display:contents!important}
html[data-theme] body .squad-mobile-card>div:not([class])>strong{grid-column:3!important;grid-row:1!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] body .squad-mobile-card>div:not([class])>.subtext{grid-column:3!important;grid-row:2!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] body .squad-mobile-card>div:not([class])>.micro{grid-column:3!important;grid-row:3!important;display:block!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:0!important}
html[data-theme] body .squad-mobile-card>div:not([class])>.mobile-morale{grid-column:4!important;grid-row:2/4!important;justify-self:end;align-self:center;margin:0!important}
html[data-theme] body .squad-mobile-card>div:not([class])>.mobile-morale .morale-pill>b{display:none!important}
html[data-theme] body .squad-mobile-card .mobile-morale .morale-pill{display:inline-flex!important;width:auto!important;min-width:0!important;grid-template-columns:none!important;gap:3px!important;padding:2px 7px!important;align-items:center!important}
html[data-theme] body .squad-mobile-card .mobile-morale .morale-pill>small{padding:0!important;border:0!important}
html[data-theme] body .squad-mobile-card>.pill{grid-column:4!important;grid-row:1!important;justify-self:end}

/* ───────── 13. Tuiles de chiffres : plus de hauteur imposée (tuiles à moitié vides) ───────── */
html[data-theme] body #content .stat-card{min-height:0!important;padding:12px 14px!important}
html[data-theme] body #content .grid-4:has(.s-fin-line)>.stat-card:first-child,
html[data-theme] body #content .grid-4:has(.s-fin-line)>.stat-card:last-child:nth-child(even){grid-column:1/-1!important}
}

/* ───────── 14. « Raccourcis clavier » inutile sur écran tactile (suit « Carnet du manager » dans Plus) ───────── */
@media (hover:none) and (pointer:coarse){
html[data-theme] body #modal .ui-notebook-open + button.ghost.big:not([id]){display:none!important}
}

/* ───────── 15. Match en direct, thème clair : chiffres de la bande de stats (blancs sur fond clair) ───────── */
html[data-theme="paper"] body #liveMatch .lm-livestats .lm-st b,
html[data-theme="paper"] body #liveMatch .lm-livestats .lm-st span,
html[data-theme="paper"] body #liveMatch .lm-livestats .lm-st small{color:#0c1712!important}
html[data-theme="paper"] body #liveMatch .lm-livestats .lm-st small,
html[data-theme="paper"] body #liveMatch .lm-livestats .lm-st span:not(:has(*)){opacity:.72}
/* fenêtres de décision (causerie, penalty, remplacements), thème clair : texte d'aide sous chaque choix */
html[data-theme="paper"] body #liveMatch .lm-overlay .lm-list small{color:rgba(12,23,18,.66)!important}

/* 16. Téléphone en paysage (hauteur <= 500px) : match en direct, commandes visibles sans défiler */
@media (orientation:landscape) and (max-height:500px){
  html[data-theme] body #liveMatch{grid-template-rows:auto minmax(0,1fr)!important}
  html[data-theme] body #liveMatch .lm-top{padding:4px 16px!important;min-height:0!important}
  html[data-theme] body #liveMatch .lm-crest{width:30px!important;height:30px!important;min-width:30px}
  html[data-theme] body #liveMatch .lm-tn{font-size:15px!important}
  html[data-theme] body #liveMatch .lm-score{padding:2px 14px!important;display:flex!important;flex-direction:row!important;align-items:center;gap:10px}
  html[data-theme] body #liveMatch .lm-score>span{margin:0!important}
  html[data-theme] body #liveMatch .lm-score #lmScore{font-size:24px!important;line-height:1.1}
  html[data-theme] body #liveMatch .lm-side{gap:8px!important;padding-top:8px!important}
  html[data-theme] body #liveMatch .lm-side .lm-controls{order:-1;flex:0 0 auto}
  html[data-theme] body #liveMatch .lm-side .lm-controls .lm-speeds{grid-column:1/-1;justify-self:stretch;display:flex!important;width:auto!important}
  html[data-theme] body #liveMatch .lm-side .lm-controls .lm-speeds button{flex:1 1 0}
  html[data-theme] body #liveMatch .lm-side .lm-momchart{display:none!important}
  html[data-theme] body .bottom-nav{min-height:0!important}
  html[data-theme] body .bottom-nav button{padding-block:3px!important;min-height:0!important}
}

/* 17. Barre de navigation du bas (mode Expert, téléphone) — 2026-11-16
   Avant : trait doré ::before décalé au-dessus de la pastille, double surlignage (bouton + icône),
   libellés en capitales espacées qui se touchent, fond translucide qui laisse voir les cartes. */
@media (max-width:860px){
  html[data-theme] body .bottom-nav{background:var(--up-bg,#0b1016)!important;background:color-mix(in srgb,var(--up-bg,#0b1016) 97%,transparent)!important;
    border-top:1px solid color-mix(in srgb,var(--up-text,#fff) 10%,transparent)!important;
    padding:4px max(6px,env(safe-area-inset-left)) max(6px,calc(env(safe-area-inset-bottom) - 12px)) max(6px,env(safe-area-inset-right))!important;
    gap:2px!important;box-shadow:0 -6px 20px rgba(0,0,0,.28)!important}
  html[data-theme] body .bottom-nav button{position:relative;min-width:0!important;min-height:52px!important;padding:5px 2px 4px!important;gap:3px!important;
    background:transparent!important;box-shadow:none!important;border-radius:14px!important;overflow:visible}
  html[data-theme] body .bottom-nav button::before,html[data-theme] body .bottom-nav button::after{display:none!important;content:none!important}
  html[data-theme] body .bottom-nav button.active{background:transparent!important}
  html[data-theme] body .bottom-nav button i{width:46px!important;height:28px!important;border-radius:999px!important;display:grid!important;place-items:center!important;
    background:transparent!important;font-size:18px!important;line-height:1!important;transition:background-color .18s,color .18s}
  html[data-theme] body .bottom-nav button.active i{background:color-mix(in srgb,var(--up-accent,#f2c14e) 20%,transparent)!important}
  html[data-theme] body .bottom-nav button span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font:600 10.5px/1.15 var(--font-body,system-ui)!important;letter-spacing:0!important;text-transform:none!important}
  html[data-theme] body .bottom-nav button.active span{font-weight:750!important}
  html[data-theme] body .bottom-nav .unread{top:2px!important;right:calc(50% - 26px)!important}
  /* le dernier élément de chaque page passait sous la barre (impossible à atteindre) */
  html[data-theme]:not([data-ui="simple"]) body #gameScreen #content{padding-bottom:calc(76px + max(6px,env(safe-area-inset-bottom) - 12px) + 16px)!important}
}
