/*
 * Salle de match 1v1 : design « halo » validé par Laizen le 18 nov. (maquettes dans data/maquettes, non publiées).
 * Plus de cadres gris : chaque joueur = son vrai logo de rang KLAW dans un halo à la couleur du rang, pseudo en très grand.
 * Chargé après salle-match.css, dont il remplace l'apparence (le JS et les data-* ne changent pas).
 */
@keyframes halo-pulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.07); } }
@keyframes halo-tour { to { transform: rotate(360deg); } }
@keyframes halo-entre-g { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes halo-entre-d { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* Le logo dans son halo (Match trouvé et arène) */
.halo-salle { position: relative; display: grid; place-items: center; flex: none; width: clamp(130px, 14vw, 180px); aspect-ratio: 1; }
.halo-salle::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent); animation: halo-pulse 2.6s ease-in-out infinite; }
.halo-salle::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--c) 60%, transparent); animation: halo-tour 18s linear infinite; }
.halo-salle svg { position: relative; width: 70%; height: auto; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .5)); }

/* Fond (comme la maquette) : panneau sombre arrondi, lueur de la couleur du rang de chaque joueur de son côté. */
#v-salle .versus-salle, #v-salle .arene-salle { position: relative; isolation: isolate; padding: 26px 22px; border-radius: 14px;
  background: radial-gradient(40% 70% at 16% 45%, color-mix(in srgb, var(--c-moi, #c3c8d0) 18%, transparent), transparent),
    radial-gradient(40% 70% at 84% 45%, color-mix(in srgb, var(--c-adv, #c3c8d0) 20%, transparent), transparent),
    linear-gradient(135deg, #141b33, #1b1638 60%, #2a1230);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .06), 0 20px 50px rgb(0 0 0 / .35); }

/* La DA 2 met tout en minuscules (text-transform: none !important) : ces titres restent en capitales, comme la maquette. */
html.da2 #v-salle .joueur-salle .nom-salle, html.da2 #v-salle .joueur-salle .etat-pret, html.da2 #v-salle .btn-pret-salle,
html.da2 #v-salle .cote-arene .nom-salle, html.da2 #v-salle .action-titre, html.da2 #v-salle .rail-etapes li, html.da2 .direct-arene,
html.da2 #v-salle .regle-arene, html.da2 #v-salle .code-salle output, html.da2 #v-salle .code-salle .btn, html.da2 #v-salle .saisie-salle .btn,
html.da2 #v-salle .action-salle .etiquette { text-transform: uppercase !important; }

/* ---------- Match trouvé ---------- */
#v-salle .versus-salle { grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr); align-items: center; gap: 10px; }
#v-salle .joueur-salle { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; background: none; border: 0; }
#v-salle .joueur-salle[data-joueur="moi"] { animation: halo-entre-g .45s ease-out both; }
#v-salle .joueur-salle[data-joueur="adv"] { animation: halo-entre-d .45s ease-out both; }
#v-salle .joueur-salle .nom-salle { margin-top: 6px; font: italic 400 clamp(40px, 4.6vw, 62px)/1 "Anton", var(--f-titre); text-transform: uppercase; padding-right: .12em; text-shadow: 0 4px 18px rgb(0 0 0 / .6); }
#v-salle .joueur-salle[data-joueur="moi"] .nom-salle { color: var(--or, #fbbf24); }
/* Le rang est dans le logo : son nom écrit n'apparaît plus (sauf « En placement »). */
#v-salle .joueur-salle .rang, #v-salle .cote-arene .rang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#v-salle .joueur-salle > small { margin-top: 6px; font-size: 12px; letter-spacing: .1em; }
#v-salle .joueur-salle .etat-pret { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; font: italic 400 20px/1 "Anton", var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: rgb(255 255 255 / .55); }
#v-salle .joueur-salle .etat-pret::before { content: ""; width: 120px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / .18); transition: width .3s, background .3s, box-shadow .3s; }
#v-salle .joueur-salle .etat-pret.pret { color: var(--ok); text-shadow: 0 0 12px color-mix(in srgb, var(--ok) 60%, transparent); }
#v-salle .joueur-salle .etat-pret.pret::before { width: 160px; background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.milieu-salle { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
#v-salle .milieu-salle .vs { font: italic 400 72px/1 "Anton", var(--f-titre); color: #fff; padding-right: .1em; text-shadow: 0 0 24px var(--rouge-vif), 0 0 4px var(--rouge-vif); }
#v-salle .milieu-salle .compte-salle { margin: 0; }
#v-salle .milieu-salle .compte-salle b { font: italic 400 34px/1 "Anton", var(--f-titre); }
#v-salle .milieu-salle .btn-pret-salle { width: 100%; margin: 0; border-radius: 4px; font: italic 400 24px/1 "Anton", var(--f-titre); letter-spacing: .08em; transform: skewX(-10deg); }
#v-salle .milieu-salle .attente-salle { margin: 0; font-size: 13px; }

/* ---------- Partie en cours : l'arène ---------- */
#v-salle .arene-salle { border: 0; overflow: hidden; }
#v-salle .arene-salle::after { display: none; }
#v-salle .duel-arene { width: 100%; gap: clamp(8px, 2vw, 24px); }
#v-salle .cote-arene { display: flex; align-items: center; gap: 14px; text-align: left; }
#v-salle .cote-arene[data-cote="adv"] { flex-direction: row-reverse; text-align: right; }
#v-salle .cote-arene .halo-salle { width: clamp(64px, 8vw, 100px); }
#v-salle .cote-arene .halo-salle::after { display: none; }
.id-arene { display: grid; gap: 10px; min-width: 0; }
#v-salle .cote-arene .nom-salle { font: italic 400 clamp(26px, 3.6vw, 46px)/1 "Anton", var(--f-titre); text-transform: uppercase; padding-right: .1em; overflow-wrap: anywhere; }
#v-salle .cote-arene[data-cote="moi"] .nom-salle { color: var(--or, #fbbf24); }
/* Sous le pseudo : l'Elo du joueur dans ce mode, à la couleur de son rang. */
.elo-arene { font: italic 400 clamp(16px, 1.8vw, 22px)/1 "Anton", var(--f-titre); letter-spacing: .04em; color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 50%, transparent); }
html.da2 .elo-arene { text-transform: uppercase !important; }
#v-salle .cote-arene.mene .halo-salle::before { animation-duration: 1.2s; }
#v-salle .score-arene { flex-wrap: wrap; justify-content: center; font: italic 400 clamp(56px, 10vw, 112px)/.9 "Anton", var(--f-titre); text-shadow: 0 0 30px color-mix(in srgb, var(--rouge-vif) 55%, transparent); }
#v-salle .score-arene i { color: var(--rouge-vif); }
#v-salle .score-arene .vs-arene { font: italic 400 clamp(40px, 7vw, 84px)/1 "Anton", var(--f-titre); color: #fff; text-shadow: 0 0 24px var(--rouge-vif); }
.direct-arene { flex-basis: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 6px; margin-bottom: 6px; font: 700 12px/1 var(--f-texte); letter-spacing: .2em; text-transform: uppercase; text-shadow: none; color: var(--rouge-vif); }
.direct-arene::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge-vif); box-shadow: 0 0 10px var(--rouge-vif); animation: halo-pulse 1.2s infinite; }
#v-salle .regle-arene { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; }

/* « À faire maintenant » : les étapes en chevrons, une consigne en très grand. */
#v-salle .action-salle { padding: 0; background: none; border: 0; gap: 14px; }
#v-salle .action-salle .etiquette { order: 2; color: var(--rouge-vif); font-weight: 800; letter-spacing: .24em; }
#v-salle .rail-etapes { order: 1; display: flex; gap: 0; }
#v-salle .rail-etapes li { flex: 1; display: block; margin-right: -8px; padding: 10px 0 10px 22px; font: 700 14px/1 var(--f-texte); letter-spacing: .1em; text-transform: uppercase; text-align: left; background: rgb(255 255 255 / .07); color: rgb(255 255 255 / .45); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
#v-salle .rail-etapes li:first-child { padding-left: 12px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
#v-salle .rail-etapes li:last-child { margin-right: 0; }
#v-salle .rail-etapes li::before { display: none; }
#v-salle .rail-etapes li.fait { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
#v-salle .rail-etapes li.fait::after { content: " ✓"; }
#v-salle .rail-etapes li.actuelle { background: var(--rouge-vif); color: #fff; }
#v-salle .action-titre { order: 3; font: italic 400 clamp(24px, 3.4vw, 38px)/1.1 "Anton", var(--f-titre); text-transform: uppercase; }
#v-salle .action-titre b { color: var(--or, #fbbf24); font-weight: 400; }
#v-salle .action-salle .muet { order: 4; }
#v-salle .action-salle.echec .etiquette { color: var(--or); }

/* Code de la map : bandeau en biais */
#v-salle .code-salle { padding: 12px 28px 12px 16px; background: rgb(0 0 0 / .25); border-left: 4px solid var(--rouge-vif); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
#v-salle .code-salle output { font: italic 400 clamp(22px, 3vw, 30px)/1 "Anton", var(--f-titre); letter-spacing: .06em; }
#v-salle .code-salle .btn { margin-left: auto; border-radius: 0; background: #fff; color: #0b0f1a; border: 0; font: italic 400 16px/1 "Anton", var(--f-titre); transform: skewX(-10deg); }

/* Règles, déclaration de secours, signalement : de simples liens discrets. */
.plus-salle { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; }
.plus-salle > details { min-width: 0; }
.plus-salle > details[open] { flex-basis: 100%; }
.plus-salle summary { color: var(--gris); cursor: pointer; list-style: none; border-bottom: 1px dashed rgb(255 255 255 / .25); }
.plus-salle summary::-webkit-details-marker { display: none; }
.plus-salle .regles-salle p { margin: 8px 0 0; }
.plus-salle .declaration-salle { flex-basis: 100%; }

/* Chat : sans cadre, filet en haut */
#v-salle .chat-salle { background: rgb(0 0 0 / .25); border: 0; border-top: 3px solid rgb(255 255 255 / .12); }
#v-salle .saisie-salle .btn { border-radius: 0; font: italic 400 16px/1 "Anton", var(--f-titre); transform: skewX(-10deg); }

/* Téléphone */
@media (max-width: 700px) {
  #v-salle .versus-salle { position: relative; grid-template-columns: 1fr 1fr; gap: 6px; padding: 16px 10px; }
  #v-salle .arene-salle { padding: 16px 10px; }
  #v-salle .milieu-salle { grid-column: 1 / -1; grid-row: 2; margin-top: 14px; gap: 8px; }
  #v-salle .milieu-salle .vs { position: absolute; top: 72px; left: 50%; z-index: 2; transform: translate(-50%, -50%); font-size: 40px; }
  #v-salle .joueur-salle .halo-salle { width: 112px; }
  #v-salle .joueur-salle .nom-salle { font-size: clamp(22px, 7vw, 30px); }
  #v-salle .joueur-salle .etat-pret { font-size: 14px; margin-top: 8px; }
  #v-salle .joueur-salle .etat-pret::before { width: 80px; }
  #v-salle .joueur-salle .etat-pret.pret::before { width: 110px; }
  #v-salle .cote-arene, #v-salle .cote-arene[data-cote="adv"] { flex-direction: column; gap: 4px; text-align: center; }
  #v-salle .cote-arene .halo-salle { width: 58px; }
  #v-salle .cote-arene .nom-salle { font-size: clamp(16px, 5vw, 22px); }
  .elo-arene { font-size: 14px; }
  #v-salle .regle-arene { font-size: 10px; letter-spacing: .1em; }
  #v-salle .rail-etapes li { padding: 8px 0 8px 14px; font-size: 9px; letter-spacing: .02em; }
}
@media (prefers-reduced-motion: reduce) {
  .halo-salle::before, .halo-salle::after, .direct-arene::before, #v-salle .joueur-salle { animation: none !important; }
}

/* Appel du staff (22 nov. 2026) */
.appel-staff { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--trait); }
#v-salle .appel-staff .btn { border-radius: 0; font: italic 400 16px/1 "Anton", var(--f-titre); text-transform: uppercase; transform: skewX(-10deg); }
.decision-staff { display: grid; gap: 10px; padding: 14px; background: rgb(74 222 128 / .08); border: 1px solid rgb(74 222 128 / .35); border-radius: 10px; }
.decision-staff .etiquette { color: #4ade80; font-weight: 800; letter-spacing: .2em; }
.boutons-decision { display: flex; flex-wrap: wrap; gap: 8px; }
#v-salle .boutons-decision .btn { border-radius: 0; transform: skewX(-10deg); }
#v-salle .boutons-decision .btn:not(.btn-creux) { background: #22c55e; color: #052e14; border-color: #22c55e; }
.msg-salle.systeme-salle { margin: 4px 0; padding: 8px 10px; background: rgb(251 191 36 / .12); border-left: 3px solid #fbbf24; }
.msg-salle.staff b { color: #4ade80; }
.badge-staff { margin-left: 5px; padding: 1px 5px; border-radius: 3px; background: rgb(74 222 128 / .2); color: #4ade80; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
html.da2 .badge-staff, html.da2 #v-salle .appel-staff .btn { text-transform: uppercase !important; }
