.home-quick-links{display:flex;flex-direction:column;gap:8px;flex:0 1 340px;min-width:0;max-width:100%;align-self:stretch;justify-content:center}
.home-group-chat{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:48px;box-sizing:border-box;padding:8px 10px;white-space:normal;text-align:center}
.home-group-chat .ic{width:20px;height:20px;flex:none}
.home-group-chat>span:first-of-type{min-width:0;overflow-wrap:anywhere}
.home-group-chat .chat-unread-badge{position:absolute;top:-5px;right:-4px;left:auto}
/* V343 — Profil mobile : toutes les informations et tous les accès restent visibles.
   La grille évite que les bases flex de 180/220 px deviennent des hauteurs en colonne. */
@media (max-width:860px){
  #profile-hub{padding:12px;--hub-text-scale:1}
  html[data-a11y-size="large"] #profile-hub{--hub-text-scale:1.15}
  html[data-a11y-size="xlarge"] #profile-hub{--hub-text-scale:1.3}
  #profile-hub .profile-hub__row1{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;align-items:stretch}
  #profile-hub .profile-hub__row1>*{grid-column:1/-1;min-width:0;max-width:none;align-self:stretch!important}
  #profile-hub #loyalty-card,#profile-hub #classement-card,
  #profile-hub #btn-objectifs,#profile-hub #btn-album{grid-column:auto}

  #profile-hub .profile-hub__identity{gap:10px;padding-bottom:2px}
  #profile-hub #home-avatar{width:48px;height:48px}
  #profile-hub .profile-hub__name-btn{flex:1;min-width:0;min-height:48px;padding:2px 4px;text-align:left;position:relative}
  #profile-hub .profile-hub__greeting{font-size:calc(12px * var(--hub-text-scale))}
  #profile-hub .profile-hub__username{display:block;font-size:calc(18px * var(--hub-text-scale));line-height:1.35;overflow-wrap:anywhere;padding-right:16px}
  #profile-hub .profile-hub__chevron{position:absolute;right:0;top:50%}
  #profile-hub .grade-pill{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:calc(11.5px * var(--hub-text-scale));line-height:1.35;padding:2px 6px}

  #profile-hub .profile-hub__stat-card{position:relative;padding:9px 10px;gap:5px}
  #profile-hub .profile-hub__stat-top{min-height:28px;padding-right:24px}
  #profile-hub .profile-hub__stat-label{font-size:calc(10.5px * var(--hub-text-scale));letter-spacing:0}
  #profile-hub .profile-hub__stat-value{font-size:calc(22px * var(--hub-text-scale))}
  #profile-hub .profile-hub__stat-row{gap:5px}
  #profile-hub .profile-hub__progress-hint{font-size:calc(12px * var(--hub-text-scale));line-height:1.35}
  #profile-hub .classement-ouvrir{font-size:calc(12px * var(--hub-text-scale));margin-top:3px}
  #profile-hub .profile-hub__info-btn{width:44px;height:44px;min-height:44px;padding:0;font-size:calc(14px * var(--hub-text-scale));flex:none;background:radial-gradient(circle,rgba(168,115,15,.12) 0 12px,transparent 13px)}
  #profile-hub .profile-hub__info-btn::before{inset:0}
  #profile-hub .profile-hub__stat-top .profile-hub__info-btn{position:absolute;top:0;right:0}

  #profile-hub #btn-objectifs,#profile-hub #btn-album{width:100%;min-height:48px;padding:8px;font-size:calc(13px * var(--hub-text-scale));line-height:1.3;white-space:normal}
  /* La présentation dorée du voyage est conservée, avec moins d'épaisseur. */
  #view-home #profile-hub #opt-voyage{width:100%!important;min-width:0!important;min-height:66px!important;padding:8px 40px 8px 10px!important;gap:10px!important;box-shadow:0 4px 0 #875423,0 7px 12px #8a5a1724!important;margin:0 0 4px!important}
  #view-home #profile-hub #opt-voyage .btn-voyage__embleme{width:40px!important;height:40px!important;font-size:calc(29px * var(--hub-text-scale))!important;flex:0 0 40px!important}
  #view-home #profile-hub #opt-voyage .btn-voyage__textes{min-width:0;white-space:normal}
  #view-home #profile-hub #opt-voyage .btn-voyage__titre{font-size:calc(21px * var(--hub-text-scale))!important}
  #view-home #profile-hub #opt-voyage .btn-voyage__sous{font-size:calc(12px * var(--hub-text-scale))!important;line-height:1.3!important;white-space:normal!important}
  #view-home #profile-hub #opt-voyage::after{right:10px!important;font-size:calc(24px * var(--hub-text-scale))!important}

  #profile-hub .profile-hub__universe{gap:6px}
  #profile-hub .profile-hub__universe-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #profile-hub .profile-hub__universe-item{min-width:0;min-height:62px;padding:7px;gap:6px}
  #profile-hub .profile-hub__universe-thumb{width:28px;height:28px;border-radius:7px}
  #profile-hub .profile-hub__universe-name{font-size:calc(12px * var(--hub-text-scale));line-height:1.3;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
  #profile-hub .profile-hub__universe-sub{font-size:calc(10px * var(--hub-text-scale))}

  #profile-hub .profile-hub__row2{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:10px;padding-top:10px}
  #profile-hub .profile-hub__format{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:2px 4px;min-width:0}
  #profile-hub .profile-hub__format label{grid-column:1/-1;font-size:calc(11px * var(--hub-text-scale))}
  #profile-hub .profile-hub__format select{width:100%;min-width:0;min-height:44px;font-size:calc(16px * var(--hub-text-scale));padding:6px 8px}
  #profile-hub .profile-hub__tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #profile-hub .profile-hub__tool-btn{min-width:0;min-height:48px;justify-content:center;padding:7px 4px;font-size:calc(12px * var(--hub-text-scale));line-height:1.3;white-space:normal}
  #profile-hub .profile-hub__tool-btn .ic{width:16px;height:16px;flex:none}

  #profile-hub .profile-hub__community-admin{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:0}
  #profile-hub .profile-hub__community-card{min-width:0;width:100%;min-height:74px;padding:8px;gap:6px;border-radius:12px}
  #profile-hub .profile-hub__community-icon{width:26px;height:30px;border-radius:9px}
  #profile-hub .profile-hub__community-icon .ic{width:17px;height:17px}
  #profile-hub .profile-hub__community-copy{overflow-wrap:anywhere}
  #profile-hub .profile-hub__community-copy strong{font-size:calc(13px * var(--hub-text-scale));line-height:1.25}
  #profile-hub .profile-hub__community-copy small{font-size:calc(11px * var(--hub-text-scale));line-height:1.3}
  #profile-hub .profile-hub__community-card .chat-unread-badge{position:absolute;top:2px;left:2px;right:auto}
  #profile-hub .profile-hub__admin-zone{grid-column:1/-1;min-width:0;justify-content:space-between;padding:4px 8px;border-left:0;border-top:1px solid rgba(94,61,28,.15)}
  #profile-hub #btn-admin{min-height:44px;padding:7px 10px}
}

@media (max-width:360px){
  #profile-hub .profile-hub__tools .profile-hub__tool-btn{flex-direction:column;gap:3px;min-height:56px}
  #profile-hub .profile-hub__community-card{flex-direction:column;align-items:flex-start}
}

/* V374 — cibles tactiles et hauteur du profil sur les écrans étroits. */
#profile-hub .profile-hub__photo-btn{width:44px;min-width:44px;min-height:44px;padding:6px}
@media(max-width:360px){
 #profile-hub .profile-hub__universe-item{min-height:48px;padding:5px}
 #profile-hub .profile-hub__community-copy small{display:none}
 #view-home #profile-hub #opt-voyage .btn-voyage__sous{display:none}
 #profile-hub .profile-hub__row1{gap:8px}
}

/* Accueil mobile simplifié ; le menu garde les commandes et leurs états d'origine. */
.home-menu-launch{display:none}.home-menu-dialog{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 28px);box-sizing:border-box;border:1px solid var(--paper-deep);border-radius:22px;padding:18px;background:var(--panel);color:var(--ink);overflow:auto}.home-menu-dialog::backdrop{background:rgba(10,30,55,.58)}.home-menu-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.home-menu-dialog>header h2{margin:0}.home-menu-dialog>header button{min-width:48px;min-height:48px}.home-menu-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.home-menu-content>*{min-width:0}.home-menu-content .profile-hub__row2,.home-menu-content .profile-hub__universe,.home-menu-content .home-advanced-panel{grid-column:1/-1}.home-menu-content .profile-hub__row2{margin:0!important}.home-menu-content button{white-space:normal}
@media(max-width:760px){
 #view-home:not(.hidden){display:flex;flex-direction:column}
 #view-home #profile-hub{order:1}#view-home:not(.hidden)>.home-play-panel{order:2}#view-home #panel-myturn{order:3}#view-home:not(.hidden)>.home-tournaments-panel{order:4}#view-home #panel-theirturn{order:5}#view-home #panel-finished{order:6}
 #profile-hub .profile-hub__row1{grid-template-columns:minmax(0,1fr) 112px}
 #profile-hub .profile-hub__row1>#home-quick-links{grid-column:1!important;grid-row:2;min-width:0;max-width:100%;width:100%;align-self:stretch!important}
 #profile-hub #btn-global-chat{font-size:calc(15px * var(--hub-text-scale));line-height:1.25}
 #profile-hub .profile-hub__row1>.profile-hub__identity{grid-column:1!important;grid-row:1;min-width:0}
 #profile-hub .profile-hub__row1>.home-menu-launch{display:block;grid-column:2!important;grid-row:1;min-height:64px;min-width:0;width:96px;justify-self:end;align-self:stretch;font-size:17px;padding:10px}
 #view-home #profile-hub .home-quick-links>#opt-voyage{grid-column:1!important;grid-row:2;align-self:center!important;height:64px!important;min-height:64px!important;flex:none!important;margin:0!important}
 #profile-hub .profile-hub__row1>#classement-card{grid-column:2!important;grid-row:2;padding:6px;min-width:0}
 #view-home #profile-hub #opt-voyage{padding:8px 10px!important;justify-content:flex-start}
 #view-home #profile-hub #opt-voyage .btn-voyage__titre{font-size:18px!important}
 #view-home #profile-hub #opt-voyage .btn-voyage__sous,#view-home #profile-hub #opt-voyage::after{display:none!important}
 #profile-hub #classement-card .profile-hub__stat-label{font-size:10px}
 #profile-hub #classement-card .profile-hub__stat-value{font-size:20px}
 #profile-hub #classement-card .classement-ouvrir{font-size:11px}
 #profile-hub .profile-hub__identity .profile-hub__avatar-wrap{flex-shrink:0}#profile-hub .profile-hub__name-btn{min-width:0}#profile-hub .profile-hub__username{overflow-wrap:anywhere}
}

/* V426 : les sections sont ouvertes au premier affichage. */
.home-section-toggle{display:none}
.home-section-content{display:contents}
@media(max-width:760px){
 #view-home :is(.home-play-panel,.home-tournaments-panel,#panel-myturn,#panel-theirturn,#panel-finished)>h2{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px 8px}
 #view-home :is(.home-play-panel,.home-tournaments-panel,#panel-myturn,#panel-theirturn,#panel-finished)>h2>.ic{grid-column:1;grid-row:1}
 #view-home .home-section-hint{grid-column:1/-1;grid-row:2;width:auto;margin:0}
 #view-home .home-section-toggle{display:inline-flex;grid-column:3;grid-row:1;margin:0;min-height:44px;min-width:0;width:auto;padding:4px 6px;align-items:center;justify-content:center;font-size:12px;line-height:1.2;white-space:nowrap;border:0;background:transparent!important;box-shadow:none!important;color:var(--ma-ink)}
 #view-home :is(.home-play-panel,.home-tournaments-panel,#panel-myturn,#panel-theirturn,#panel-finished).home-section-collapsed{padding:6px 12px}
 #view-home .home-section-collapsed>h2{margin:0;font-size:18px}
 #view-home .home-section-collapsed .home-section-hint{display:none}
 .home-section-collapsed>.home-section-content{display:none}
}
