/* =====================================================================
   Pages du jeu (secteur, escouade…) — complète style.css
   ===================================================================== */

body.game {
  background:
    radial-gradient(1000px 600px at 85% -10%, #15233d 0%, transparent 60%),
    radial-gradient(800px 600px at -10% 40%, #101b30 0%, transparent 55%),
    linear-gradient(180deg, #060a14 0%, #050811 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.text-dim { color: var(--text-dim); }

/* ---------- Barre du jeu ---------- */
.game-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6, 10, 20, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
  padding: .55rem 0;
}
.game-nav .brand .name { font-size: .75rem; }
.game-tabs {
  display: flex; gap: .25rem;
  list-style: none; margin: 0 auto; padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.game-tabs::-webkit-scrollbar { display: none; }
.game-tabs a {
  display: flex; align-items: center; gap: .45rem;
  padding: .5rem .85rem;
  border-radius: 4px;
  color: var(--text-dim);
  text-decoration: none;
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.game-tabs a:hover { color: #fff; background: rgba(107, 211, 214, .06); }
.game-tabs a.active {
  color: #fff;
  background: rgba(107, 211, 214, .1);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.game-tabs svg { flex: none; opacity: .85; }
.game-user {
  display: flex; align-items: center; gap: .7rem;
  font-family: "Orbitron", sans-serif;
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--text);
}
/* Mobile : icônes seules */
@media (max-width: 767.98px) {
  .game-tabs a span { display: none; }
  .game-tabs a { padding: .55rem .6rem; }
}

/* ---------- Barre de ressources ---------- */
.resource-bar {
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  background: rgba(8, 14, 26, .55);
}
.resource-bar ul {
  display: flex; flex-wrap: wrap; gap: .3rem 2rem;
  list-style: none; margin: 0; padding: .55rem 0;
}
.resource-bar li { display: flex; align-items: baseline; gap: .5rem; }
.res-label {
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.resource-bar strong {
  font-family: "Orbitron", sans-serif;
  font-size: .95rem;
  color: var(--accent-strong);
}
.resource-bar strong.violet { color: #b28cff; }
.resource-bar strong.ready  { color: #7be38a; }

/* ---------- Structure ---------- */
.game-main { flex: 1; padding: 1.5rem 0 2.5rem; }

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(13, 22, 40, .88), rgba(8, 14, 26, .88));
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 1.2rem 1.3rem;
}
.panel::before {
  /* coin coupé, comme les cartes de l'accueil */
  content: "";
  position: absolute; top: -1px; right: -1px;
  width: 18px; height: 18px;
  background: var(--bg-0);
  border-left: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  transform: translate(50%, -50%) rotate(45deg);
}
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.panel .eyebrow {
  font-family: "Orbitron", sans-serif;
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--accent);
}
.panel-title {
  font-family: "Black Ops One", sans-serif;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: .06em;
  margin: .15rem 0 0;
}
.panel-title span { color: var(--accent); }
.panel-title.small { font-size: 1.25rem; }

.game-alert {
  margin-bottom: 1.2rem;
  padding: .7rem 1rem;
  border-radius: 4px;
  font-size: 1rem;
}
.game-alert.danger { color: #ffb4a8; background: rgba(220, 70, 50, .14); border: 1px solid rgba(220, 70, 50, .4); }

/* ---------- Carte du secteur ---------- */
.compass {
  display: flex; align-items: center; gap: .4rem;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--accent-strong);
  padding: .4rem .7rem;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
}
.compass span { color: var(--text-dim); font-weight: 400; font-size: .65rem; }

.sector-map-wrap {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  grid-template-rows: 1.3rem auto;
  max-width: 560px;
  margin: 0 auto;
}
.axis {
  display: grid;
  font-family: "Orbitron", sans-serif;
  font-size: .58rem;
  color: var(--text-dim);
  opacity: .7;
}
.axis-x { grid-column: 2; grid-template-columns: repeat(10, 1fr); text-align: center; align-items: end; padding-bottom: .2rem; }
.axis-y { grid-column: 1; grid-row: 2; grid-template-rows: repeat(10, 1fr); align-items: center; text-align: right; padding-right: .35rem; }

.sector-map {
  grid-column: 2; grid-row: 2;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr)); /* cases toutes identiques, quel que soit leur contenu */
  aspect-ratio: 1;
  /* image de décor passée en style inline par la page (URL relative à la page, pas au CSS) */
  background-repeat: repeat;
  background-size: 33.33%;
  border: 1px solid rgba(107, 211, 214, .35);
  box-shadow: 0 0 0 4px rgba(107, 211, 214, .05), 0 10px 40px rgba(0, 0, 0, .5);
  border-radius: 3px;
  overflow: hidden;
}
.cell {
  position: relative;
  display: grid; place-items: center;
  min-width: 0; min-height: 0; /* le contenu ne peut pas agrandir la case */
  overflow: hidden;
  font-size: .6rem;
  color: #fff;
}
.cell img {
  /* en absolu : largeur ET hauteur suivent la case (dans une grille, height:100% seul n'est pas fiable),
     l'élément est réduit pour tenir entier, y compris dans les cases rectangulaires de la marge */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
}

/* ---------- Brouillard de guerre ----------
   La carte est un instantané de la dernière observation :
   - cases jamais explorées : nuit brumeuse quasi opaque
   - cases vues : voile gris-bleu texturé, éléments désaturés
   - cases de nos unités : nettes
   La texture est en background-attachment: fixed pour rester continue d'une case à l'autre. */
.sector-map {
  --fog-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.72 0 0 0 0 0.78 0 0 0 0 0.84 0.75 0 0 0 -0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}
.cell.fog,
.cell.terrain::before {
  background-image: var(--fog-texture);
  background-size: 320px 320px;
  background-attachment: fixed;
  animation: fog-drift 60s linear infinite;
}
.cell.fog {
  background-color: rgba(4, 7, 13, .94);
  background-blend-mode: soft-light;
}
.cell.terrain::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background-color: rgba(120, 136, 156, .38);
  opacity: .9;
  pointer-events: none;
}
.cell.terrain img {
  filter: grayscale(.85) brightness(.8) contrast(.9);
}
@keyframes fog-drift {
  from { background-position: 0 0; }
  to   { background-position: 320px 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .cell.fog, .cell.terrain::before { animation: none; }
}
/* Grille tactique très légère */
.cell::after {
  content: "";
  position: absolute; inset: 0;
  border-right: 1px solid rgba(107, 211, 214, .06);
  border-bottom: 1px solid rgba(107, 211, 214, .06);
  pointer-events: none;
}
.cell.unite { background: rgba(107, 211, 214, .14); }
.cell.unite img { filter: drop-shadow(0 0 4px rgba(107, 211, 214, .8)); }

.map-hint {
  margin: 1rem 0 0;
  text-align: center;
  font-size: .95rem;
  color: var(--text-dim);
}

/* ---------- Opérations ---------- */
.pips { display: flex; gap: 5px; padding-top: .3rem; }
.pips span {
  width: 12px; height: 22px;
  border: 1px solid var(--panel-border);
  border-radius: 2px;
  transform: skewX(-12deg);
}
.pips span.on { background: var(--accent); box-shadow: 0 0 8px rgba(107, 211, 214, .6); border-color: var(--accent); }

.ops-panel { border-color: rgba(107, 211, 214, .45); }
.ops-panel.state-attente,
.ops-panel.state-renegat { border-color: rgba(224, 163, 58, .5); }
.ops-msg { font-size: 1.08rem; color: var(--text); margin-bottom: 1rem; }
.ops-msg strong { color: #fff; }
.ops-msg.warn strong { color: #e0a33a; }
.ops-msg.ok strong { color: #7be38a; }
.ops-sub { margin: .8rem 0 0; font-size: .92rem; color: var(--text-dim); }
.ops-sub a { color: var(--accent); }
.ops-tip {
  margin: .9rem 0 0;
  padding: .7rem .8rem;
  font-size: .88rem;
  color: var(--text-dim);
  border-left: 2px solid var(--accent);
  background: rgba(107, 211, 214, .05);
}
.btn-play.hostile { border-color: #e0a33a; background: rgba(224, 163, 58, .1); }
.btn-play.hostile:hover { background: rgba(224, 163, 58, .25); box-shadow: 0 0 24px rgba(224, 163, 58, .4); }

/* ---------- Rapport ---------- */
.rank { text-align: right; line-height: 1; }
.rank strong { font-family: "Orbitron", sans-serif; font-size: 1.6rem; color: var(--accent-strong); }
.rank sup { font-size: .55em; }
.rank span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-top: .2rem; }

.report {
  display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem;
  margin: 0 0 .8rem;
}
.report dt { font-weight: 400; color: var(--text-dim); }
.report dd { margin: 0; color: #fff; text-align: right; font-weight: 600; }

.report-flag {
  font-size: .92rem;
  margin: .4rem 0 0;
  padding: .35rem .7rem;
  border-radius: 3px;
  border-left: 2px solid;
}
.report-flag.warn   { color: #e8c27a; border-color: #e0a33a; background: rgba(224, 163, 58, .07); }
.report-flag.danger { color: #ffb4a8; border-color: #dc4632; background: rgba(220, 70, 50, .08); }
.report-flag.ok     { color: #b9f0c0; border-color: #7be38a; background: rgba(123, 227, 138, .06); }
.report-flag.info   { color: var(--accent-strong); border-color: var(--accent); background: rgba(107, 211, 214, .05); }

.report-sub {
  font-family: "Orbitron", sans-serif;
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.2rem 0 .6rem;
}
.contacts { list-style: none; margin: 0; padding: 0; }
.contacts li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem;
  padding: .45rem 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.contacts li strong { color: #fff; }
.contacts li span { color: var(--text-dim); font-size: .92rem; }
.contacts li.hostile strong { color: #e0a33a; }
.badge-renegat {
  font-family: "Orbitron", sans-serif;
  font-size: .6rem !important;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #ff8a7a !important;
  border: 1px solid rgba(220, 70, 50, .5);
  border-radius: 2px;
  padding: .05rem .35rem;
}
.contacts .yrvbot { flex-basis: 100%; color: #b28cff !important; }

/* ---------- Messagerie ---------- */
.msg-meta { font-size: .88rem; color: var(--text-dim); margin-bottom: .3rem; }
.msg-meta strong { color: #fff; }
.msg-body { font-style: italic; margin: 0; }

/* ---------- Pied ---------- */
.game-footer {
  border-top: 1px solid rgba(255, 255, 255, .05);
  padding: 1rem 0;
  font-size: .85rem;
  color: var(--text-dim);
}
.game-footer a { color: var(--text-dim); text-decoration: none; letter-spacing: .08em; }
.game-footer a:hover { color: var(--accent); }

.game-alert.ok { color: #b9f0c0; background: rgba(123, 227, 138, .1); border: 1px solid rgba(123, 227, 138, .4); }

/* =====================================================================
   Escouade
   ===================================================================== */
.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: .9rem;
  margin-bottom: 1rem;
}
.unit-card {
  display: flex; gap: .9rem;
  padding: .9rem;
  border: 1px solid rgba(107, 211, 214, .14);
  border-radius: 5px;
  background: rgba(6, 10, 20, .55);
  transition: border-color .2s;
}
.unit-card:hover { border-color: rgba(107, 211, 214, .4); }
.unit-card.exhausted { opacity: .75; }
.unit-portrait {
  position: relative;
  flex: 0 0 80px; height: 80px;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 60%, rgba(107, 211, 214, .18), transparent 70%);
}
.unit-portrait > img:first-child { width: 80px; height: 80px; }
.unit-badge {
  position: absolute; right: -6px; bottom: -6px;
  width: 26px; height: 26px;
  filter: drop-shadow(0 0 4px #b28cff);
}
.unit-body { flex: 1; min-width: 0; }
.unit-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.unit-head h3 {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.unit-id { font-family: "Orbitron", sans-serif; font-size: .65rem; color: var(--text-dim); letter-spacing: .08em; }

.unit-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 .5rem; }
.stat {
  display: flex; flex-direction: column; align-items: center;
  min-width: 46px;
  padding: .2rem .45rem;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 3px;
  background: rgba(255, 255, 255, .02);
}
.stat span { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.stat strong { font-family: "Orbitron", sans-serif; font-size: 1rem; color: #fff; }
.stat strong.pv   { color: #7be38a; }
.stat strong.ut   { color: var(--accent-strong); }
.stat strong.zero { color: #ff6b5a; }

.unit-line { font-size: .9rem; color: var(--text-dim); margin: 0; }
.unit-line strong { color: var(--text); font-weight: 600; }
.unit-flag.danger { margin: .4rem 0 0; font-size: .85rem; color: #ffb4a8; }
.unit-msg {
  margin: .5rem 0 0;
  padding: .35rem .55rem;
  font-size: .85rem;
  font-style: italic;
  color: #f0d48a;
  border-left: 2px solid #e0a33a;
  background: rgba(224, 163, 58, .06);
}
.unit-msg span { font-style: normal; color: var(--text-dim); margin-right: .3rem; }

.unit-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.btn-special {
  border: 1px solid #b28cff;
  background: rgba(178, 140, 255, .1);
  color: #e6dcff;
  font-family: "Orbitron", sans-serif;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .4rem .65rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.btn-special:hover:not(:disabled) { background: rgba(178, 140, 255, .25); box-shadow: 0 0 14px rgba(178, 140, 255, .35); }
.btn-special:disabled { opacity: .4; cursor: not-allowed; }
.unit-done { font-size: .82rem; color: var(--text-dim); font-style: italic; }

.squad-wiped {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed rgba(220, 70, 50, .5);
  border-radius: 5px;
  background: rgba(220, 70, 50, .06);
}
.squad-wiped h2 { font-family: "Black Ops One", sans-serif; color: #ff8a7a; letter-spacing: .08em; }
.squad-wiped p { max-width: 460px; margin: .6rem auto 1.4rem; }

.race-portrait {
  float: right;
  width: 110px; height: 110px;
  margin: 0 0 .5rem .8rem;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  object-fit: cover;
}
.help-list { margin: 0; padding-left: 1.1rem; color: var(--text-dim); }
.help-list li { margin-bottom: .4rem; }
.help-list strong { color: #e6dcff; }

.corpses { list-style: none; margin: 0; padding: 0; }
.corpses li {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .55rem 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.corpses img { flex: none; filter: grayscale(1) brightness(.7); }
.corpses strong { color: #fff; }
.corpses p { margin: .1rem 0 0; font-size: .88rem; color: var(--text-dim); }
.corpses .corpse-note { color: #b28cff; }

/* =====================================================================
   Navette
   ===================================================================== */
.shuttle-img {
  width: 120px; height: auto;
  margin: -.4rem -.3rem 0 0;
  filter: drop-shadow(0 6px 18px rgba(107, 211, 214, .25));
}
.shuttle-panel.ready { border-color: rgba(123, 227, 138, .5); }
.shuttle-status {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
}
.shuttle-status strong { font-family: "Orbitron", sans-serif; color: #7be38a; letter-spacing: .1em; }
.shuttle-status p { margin: 0; color: var(--text-dim); }
.status-dot {
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #7be38a;
  box-shadow: 0 0 12px #7be38a;
  animation: pulse 1.6s ease-in-out infinite;
}
.countdown {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent-strong);
  text-shadow: 0 0 18px rgba(107, 211, 214, .35);
}
.countdown small { font-size: .9rem; font-weight: 400; color: var(--text-dim); margin: 0 .5rem 0 .15rem; }

.express {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  padding: .7rem .9rem;
  border: 1px dashed rgba(107, 211, 214, .3);
  border-radius: 4px;
  margin-bottom: .4rem;
}
.express small { display: block; color: var(--text-dim); font-size: .82rem; }
.express strong { color: #fff; }
.express button:disabled { opacity: .4; cursor: not-allowed; }

.manifest {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
  margin-top: .4rem;
}
@media (max-width: 575.98px) { .manifest { grid-template-columns: 1fr; } }
.manifest p { margin: .3rem 0 0; font-size: .95rem; }
.rocks, .recruits { display: flex; flex-wrap: wrap; gap: 2px; }
.rocks img { filter: drop-shadow(0 0 4px rgba(178, 140, 255, .5)); }

.recruit-limits { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; font-size: .8rem; color: var(--text-dim); letter-spacing: .08em; }
.recruit-limits strong { font-family: "Orbitron", sans-serif; color: #fff; }

.recruit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: .8rem;
}
.recruit-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: .9rem .7rem;
  border: 1px solid rgba(107, 211, 214, .14);
  border-radius: 5px;
  background: rgba(6, 10, 20, .55);
}
.recruit-card h3 {
  font-family: "Orbitron", sans-serif;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin: .4rem 0 0;
}
.recruit-card .unit-stats { justify-content: center; }
.recruit-card .unit-line { font-size: .82rem; margin-bottom: .7rem; }
.recruit-card form { margin-top: auto; width: 100%; }
.recruit-card.locked img:first-child { filter: grayscale(.8) brightness(.7); }
.btn-recruit {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  width: 100%;
  border: 1px solid var(--accent);
  background: rgba(107, 211, 214, .08);
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: .68rem;
  letter-spacing: .14em;
  padding: .5rem .4rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.btn-recruit:hover:not(:disabled) { background: rgba(107, 211, 214, .22); box-shadow: 0 0 16px rgba(107, 211, 214, .35); }
.btn-recruit:disabled { opacity: .35; cursor: not-allowed; }

.orbalis-stock { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.orbalis-stock > div {
  padding: .8rem;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 4px;
  text-align: center;
}
.orbalis-stock strong { display: block; font-family: "Orbitron", sans-serif; font-size: 2rem; color: #fff; }
.orbalis-stock strong.violet { color: #b28cff; }
.orbalis-stock span { font-size: .82rem; color: var(--text-dim); }

/* =====================================================================
   Quêtes
   ===================================================================== */
.quest-list { display: flex; flex-direction: column; gap: .8rem; }
.quest-card {
  --q: var(--accent);
  display: flex; gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(255, 255, 255, .07);
  border-left: 3px solid var(--q);
  border-radius: 4px;
  background: rgba(6, 10, 20, .55);
}
.quest-card.type-aliens { --q: #e0a33a; }
.quest-card.type-rocher { --q: #b28cff; }
.quest-card.type-survie { --q: #7be38a; }
.quest-card.type-temple { --q: var(--accent); }
.quest-card.type-tuerie { --q: #ff6b5a; }
.quest-icon {
  flex: 0 0 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: radial-gradient(circle, color-mix(in srgb, var(--q) 22%, transparent), transparent 70%);
}
.quest-icon img { width: 64px; height: 64px; object-fit: contain; }
.quest-body { flex: 1; min-width: 0; }
.quest-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.quest-head h3 {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--q);
  margin: 0;
}
.quest-timer {
  flex: none;
  font-family: "Orbitron", sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  color: #fff;
  padding: .15rem .5rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 3px;
}
.quest-goal { margin: .35rem 0 0; }
.quest-goal strong { color: #fff; }
.quest-cap { margin: .35rem 0 0; font-size: .9rem; color: var(--text-dim); display: flex; align-items: center; gap: .35rem; }
.quest-cap svg { color: var(--accent); }
.quest-cap strong { color: var(--accent-strong); }

.quest-history { list-style: none; margin: 0; padding: 0; }
.quest-history li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem;
  padding: .45rem 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
  font-size: .92rem;
}
.quest-history strong { color: #fff; }
.quest-history .date { margin-left: auto; color: var(--text-dim); font-size: .82rem; }
.result {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: .72rem;
  padding: .1rem .4rem;
  border-radius: 2px;
}
.result.win  { color: #0b1a10; background: #7be38a; }
.result.loss { color: #1a0b0b; background: #ff6b5a; }

.top-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.top-list li {
  display: flex; align-items: center; gap: .7rem;
  padding: .4rem .5rem;
  border-radius: 3px;
}
.top-list li:nth-child(odd) { background: rgba(255, 255, 255, .02); }
.top-list li.me { background: rgba(107, 211, 214, .12); box-shadow: inset 2px 0 0 var(--accent); }
.top-list .pos { width: 1.6rem; font-family: "Orbitron", sans-serif; font-size: .8rem; color: var(--text-dim); }
.top-list li:nth-child(-n+3) .pos { color: #e0a33a; }
.top-list .who { flex: 1; color: #fff; }
.top-list .lvl { font-family: "Orbitron", sans-serif; font-size: .75rem; color: var(--accent-strong); }

/* =====================================================================
   Messagerie
   ===================================================================== */
.inbox-tools { display: flex; align-items: center; gap: .8rem; }
.check-all { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--text-dim); cursor: pointer; }
.inbox-tools button:disabled { opacity: .35; cursor: not-allowed; }

.inbox { list-style: none; margin: 0; padding: 0; }
.msg {
  display: flex; gap: .8rem;
  padding: .85rem .3rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.msg > input { margin-top: .3rem; accent-color: var(--accent); }
.msg-main { flex: 1; min-width: 0; }
.msg-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.msg-from { color: #fff; font-weight: 700; letter-spacing: .03em; }
.msg.system .msg-from { color: var(--accent-strong); font-family: "Orbitron", sans-serif; font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; }
.msg.channel { background: rgba(178, 140, 255, .05); }
.msg-tag {
  font-family: "Orbitron", sans-serif;
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #b28cff;
  border: 1px solid rgba(178, 140, 255, .5);
  border-radius: 2px;
  padding: .05rem .35rem;
}
.msg-top time { margin-left: auto; font-size: .8rem; color: var(--text-dim); }
.msg-text { margin-top: .3rem; overflow-wrap: anywhere; line-height: 1.45; }
.msg.system .msg-text { color: var(--text-dim); }
.smiley { vertical-align: middle; margin-right: .25rem; }
.msg-actions { display: flex; gap: 1rem; margin-top: .4rem; font-size: .85rem; }
.msg-actions a, .link-btn {
  background: none; border: 0; padding: 0;
  color: var(--accent);
  text-decoration: none;
  font-size: .85rem;
  cursor: pointer;
}
.msg-actions a:hover, .link-btn:hover { color: #fff; }
.msg-actions .link-btn { color: var(--text-dim); }
.msg-actions .link-btn:hover { color: #ff8a7a; }

.pager { display: flex; justify-content: center; align-items: center; gap: 1.2rem; margin-top: 1rem; font-size: .9rem; color: var(--text-dim); }
.pager a { color: var(--accent); text-decoration: none; }

.msg-quote {
  margin: 0 0 1rem;
  padding: .6rem .8rem;
  max-height: 160px; overflow: auto;
  font-size: .9rem;
  color: var(--text-dim);
  border-left: 2px solid var(--accent);
  background: rgba(107, 211, 214, .05);
}
.msg-quote span { display: block; font-size: .78rem; color: var(--accent); margin-bottom: .25rem; }

.compose-form { display: flex; flex-direction: column; }
.form-label {
  font-family: "Orbitron", sans-serif;
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 .35rem;
}
.compose-form input[type="text"],
.compose-form input[type="email"],
.compose-form input[type="password"],
.compose-form textarea {
  background: rgba(6, 10, 20, .8);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  padding: .55rem .75rem;
  margin-bottom: 1rem;
}
.compose-form textarea { resize: vertical; min-height: 120px; }
.compose-form input:focus, .compose-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 211, 214, .2);
}

.recipients { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: .25rem .65rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-size: .9rem;
  transition: background .15s, border-color .15s;
}
.chip small { color: var(--text-dim); }
.chip input:checked + span { background: rgba(107, 211, 214, .18); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--accent); }

.smileys { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 1.2rem; }
.smileys label { cursor: pointer; }
.smileys input { position: absolute; opacity: 0; pointer-events: none; }
.smileys img, .smileys .none {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-dim);
}
.smileys input:checked + * { border-color: var(--accent); background: rgba(107, 211, 214, .15); }
.smileys input:focus-visible + * { box-shadow: 0 0 0 2px var(--accent); }

/* =====================================================================
   Profil
   ===================================================================== */
.id-card { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.id-photo {
  width: 110px; height: 110px;
  display: grid; place-items: center;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 40%, rgba(107, 211, 214, .15), transparent 70%);
  color: var(--text-dim);
  overflow: hidden;
}
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-facts { list-style: none; margin: .6rem 0 0; padding: 0; }
.id-facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .18rem 0; font-size: .95rem; }
.id-facts span { color: var(--text-dim); }
.id-facts strong { color: #fff; }
.id-facts strong.renegat { color: #ff8a7a; }
.id-photo-actions {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
}
.id-photo-actions label { cursor: pointer; }
@media (max-width: 420px) { .id-card { grid-template-columns: 1fr; } }

.progress-list { list-style: none; margin: 0; padding: 0; }
.progress-list li + li { margin-top: .8rem; }
.pl-top { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: .3rem; }
.pl-top span { color: var(--text-dim); }
.pl-top strong { font-family: "Orbitron", sans-serif; font-size: .82rem; color: #fff; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 8px rgba(107, 211, 214, .6); }
.bar span.full { background: #7be38a; box-shadow: 0 0 8px rgba(123, 227, 138, .6); }

.radio-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.pass-change { margin-bottom: 1rem; }
.pass-change summary {
  cursor: pointer;
  color: var(--accent);
  font-size: .95rem;
  margin-bottom: .8rem;
}
.pass-change[open] summary { color: #fff; }
.pass-change input { width: 100%; }

.btn-ghost:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost:disabled:hover { background: transparent; }

.shop { display: flex; flex-direction: column; gap: .8rem; }
.shop-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(107, 211, 214, .14);
  border-radius: 5px;
  background: rgba(6, 10, 20, .55);
}
.shop-item > img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.shop-body { flex: 1; min-width: 0; }
.shop-body h3 {
  font-family: "Orbitron", sans-serif;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 .25rem;
}
.shop-body p { margin: 0; font-size: .92rem; color: var(--text-dim); }
.shop-body .shop-note { margin-top: .3rem; font-size: .85rem; color: #e8c27a; }
.shop-buy { flex: none; display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 104px; }
.shop-buy strong { font-family: "Orbitron", sans-serif; color: var(--accent-strong); }
@media (max-width: 575.98px) {
  .shop-item { flex-wrap: wrap; }
  .shop-buy { width: 100%; flex-direction: row; justify-content: space-between; }
  .shop-buy .btn-recruit { width: auto; padding-inline: 1.2rem; }
}

/* =====================================================================
   FAQ
   ===================================================================== */
.faq-toc { position: sticky; top: 5rem; }
.faq-toc ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.faq-toc a {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .4rem .5rem;
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
}
.faq-toc a:hover { background: rgba(107, 211, 214, .08); color: #fff; }
.faq-toc a span { font-family: "Orbitron", sans-serif; font-size: .7rem; color: var(--text-dim); }
@media (max-width: 991.98px) {
  .faq-toc { position: static; }
  .faq-toc ul { display: flex; flex-wrap: wrap; gap: .3rem; }
  .faq-toc a { border: 1px solid var(--panel-border); border-radius: 999px; padding: .2rem .7rem; }
}

.faq-search input {
  width: 100%;
  background: rgba(6, 10, 20, .8);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  padding: .6rem .9rem;
  margin-bottom: .6rem;
}
.faq-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(107, 211, 214, .2); }

.faq-group { scroll-margin-top: 5rem; }
.faq-item {
  border-top: 1px solid rgba(255, 255, 255, .06);
  scroll-margin-top: 5rem;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem .2rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: "Orbitron", sans-serif;
  color: var(--accent);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent-strong); }
.faq-answer { padding: 0 .2rem 1rem; color: var(--text); line-height: 1.55; }
.faq-answer p { margin-bottom: .6rem; }
.faq-answer ul { margin-bottom: .6rem; padding-left: 1.2rem; }
.faq-answer li { margin-bottom: .3rem; }
.faq-answer strong { color: #fff; }
.faq-answer em { color: var(--accent-strong); font-style: normal; }

/* =====================================================================
   Débriefing
   ===================================================================== */
.debrief-status {
  font-family: "Orbitron", sans-serif;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  border-radius: 3px;
  white-space: nowrap;
}
.debrief-status.ok   { color: #7be38a; border: 1px solid rgba(123, 227, 138, .5); }
.debrief-status.warn { color: #e0a33a; border: 1px solid rgba(224, 163, 58, .5); cursor: help; }

.debrief-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .7rem;
  margin: 1rem 0;
}
.dstat {
  padding: .9rem .7rem;
  border: 1px solid rgba(107, 211, 214, .2);
  border-radius: 5px;
  background: rgba(6, 10, 20, .55);
  text-align: center;
}
.dstat strong { display: block; font-family: "Orbitron", sans-serif; font-size: 2rem; line-height: 1.1; color: var(--accent-strong); }
.dstat span { font-size: .82rem; color: var(--text-dim); }
.dstat.hostile strong { color: #e0a33a; }
.dstat.violet strong  { color: #b28cff; }
.dstat.danger strong  { color: #ff6b5a; }
.dstat.zero { opacity: .55; }
.dstat.zero strong { color: var(--text-dim); }
.report-flag a { color: inherit; text-decoration: underline; }

.squad-mini { list-style: none; margin: 0; padding: 0; }
.squad-mini li {
  display: flex; align-items: center; gap: .6rem;
  padding: .35rem 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
  font-size: .92rem;
}
.squad-mini .who { flex: 1; color: #fff; }
.squad-mini .pv, .squad-mini .ut, .squad-mini .zero { font-family: "Orbitron", sans-serif; font-size: .72rem; min-width: 3.3rem; text-align: right; }
.squad-mini .pv   { color: #7be38a; }
.squad-mini .ut   { color: var(--accent-strong); }
.squad-mini .zero { color: #ff6b5a; }

/* =====================================================================
   Tour des chlorosaures
   ===================================================================== */
.chloro-panel { border-color: rgba(224, 163, 58, .45); }
.chloro-img { filter: drop-shadow(0 0 12px rgba(224, 163, 58, .45)); }
.loss-panel { border-color: rgba(220, 70, 50, .5); }
.loss-panel .corpses img { filter: grayscale(1) brightness(.6) sepia(.4) hue-rotate(-30deg); }

/* =====================================================================
   Intervention (action.php)
   ===================================================================== */
.action-bar {
  position: sticky; top: 3.6rem; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem;
  margin-bottom: 1rem;
  padding: .6rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(8, 14, 26, .92);
  backdrop-filter: blur(6px);
}
.action-bar > div { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.action-bar strong { font-family: "Orbitron", sans-serif; color: #fff; letter-spacing: .08em; }
.action-bar .btn-play { padding: .6rem 1.6rem; }
.calamity {
  font-family: "Orbitron", sans-serif; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: #e0a33a; border: 1px solid rgba(224, 163, 58, .5); border-radius: 3px; padding: .25rem .6rem;
  animation: pulse 2s ease-in-out infinite;
}
.chrono { font-family: "Orbitron", sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--accent-strong); min-width: 4ch; text-align: right; }
.chrono.urgent { color: #ff6b5a; animation: pulse .8s ease-in-out infinite; }

.action-wrap { max-width: 860px; } /* damier + marge : cases du damier ≈ 70 px */
.action-map {
  grid-column: 2; grid-row: 2;
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr)); /* cases toutes identiques, quel que soit leur contenu */
  aspect-ratio: 1;
  border: 1px solid rgba(107, 211, 214, .35);
  box-shadow: 0 0 0 4px rgba(107, 211, 214, .05), 0 10px 40px rgba(0, 0, 0, .5);
  border-radius: 3px;
  overflow: hidden;
  user-select: none;
  --fog-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.72 0 0 0 0 0.78 0 0 0 0 0.84 0.75 0 0 0 -0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}
.map-bg {
  position: absolute; inset: 0;
  background-repeat: repeat;
  z-index: 0;
}
/* Fog (3e intervention) : décor assombri en CSS, plus besoin des images « _ » sombres */
.action-map.nuit .map-bg { filter: brightness(.5) saturate(.7); }
.action-map .cell { z-index: 1; cursor: pointer; }
.action-map .cell img[hidden] { display: none; }
.action-map .cell.vis { background: rgba(255, 255, 255, .03); }
.action-map .cell.unite { background: rgba(107, 211, 214, .14); }
.action-map .cell.unite.epuisee img { filter: grayscale(.6) brightness(.75); }
.action-map .cell.selected {
  background: rgba(107, 211, 214, .28);
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 16px rgba(107, 211, 214, .6);
  z-index: 2;
}
/* Autres unités : halo de couleur qui épouse la silhouette du sprite */
.action-map .cell.autre img { --halo: transparent; filter: drop-shadow(0 0 2px var(--halo)) drop-shadow(0 0 6px var(--halo)); }
.action-map .cell.autre.ennemi   img { --halo: #ff3b2f; }  /* ennemi */
.action-map .cell.autre.epargner img { --halo: #3b9dff; }  /* unité d'un joueur à épargner */
.action-map .cell.autre.cible    img { --halo: #ff9f1a; animation: halo-cible 1.2s ease-in-out infinite; } /* cible Mustuoc */
.action-map .cell.autre.logh     img { --halo: #4be37a; }  /* Logh'Cyr autonome */
@keyframes halo-cible {
  50% { filter: drop-shadow(0 0 3px var(--halo)) drop-shadow(0 0 12px var(--halo)); }
}
@media (prefers-reduced-motion: reduce) { .action-map .cell.autre.cible img { animation: none; } }
/* Impact d'un tir */
.action-map .cell.boom::after {
  content: "";
  position: absolute; inset: 0;
  background: url("../../images/bam.gif") center / contain no-repeat;
  border: 0;
  animation: boom .7s ease-out forwards;
  z-index: 3;
}
@keyframes boom {
  0%   { opacity: 0; transform: scale(.5); }
  20%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1); }
}
/* Unité en marche (assets/js/marche.js) : copie qui glisse entre deux cases, l'image de la case d'arrivée attend */
.action-map .marcheur {
  position: absolute; left: 0; top: 0;
  z-index: 4;
  object-fit: contain;
  pointer-events: none;
}

/* Panneau de l'unité active */
.up-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }
.up-head img { border-radius: 4px; border: 1px solid var(--panel-border); object-fit: cover; }
.unit-panel .unit-actions { margin-top: .4rem; }

/* Croix directionnelle (indispensable sur mobile) */
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(3, 48px);
  gap: 6px;
  justify-content: center;
}
.dpad button {
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(6, 10, 20, .8);
  color: var(--accent-strong);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.dpad button:hover, .dpad button:active { background: rgba(107, 211, 214, .18); box-shadow: 0 0 12px rgba(107, 211, 214, .35); }
.dpad [data-dir="3"] { grid-column: 2; grid-row: 1; }
.dpad [data-dir="1"] { grid-column: 1; grid-row: 2; }
.dpad .fire          { grid-column: 2; grid-row: 2; font-family: "Orbitron", sans-serif; font-size: .7rem; color: #ff8a7a; border-color: rgba(255, 107, 90, .5); }
.dpad [data-dir="2"] { grid-column: 3; grid-row: 2; }
.dpad [data-dir="4"] { grid-column: 2; grid-row: 3; }

.squad-mini.selectable li { cursor: pointer; border-radius: 3px; padding-inline: .3rem; }
.squad-mini.selectable li:hover { background: rgba(107, 211, 214, .06); }
.squad-mini.selectable li.on { background: rgba(107, 211, 214, .14); box-shadow: inset 2px 0 0 var(--accent); }

.action-log { max-height: 180px; overflow-y: auto; font-size: .88rem; }
.action-log p { margin: 0; padding: .2rem 0; border-bottom: 1px solid rgba(255, 255, 255, .04); color: var(--text-dim); }
.action-log p:first-child { color: #fff; }
.action-log p.ok     { color: #9be6a5; }
.action-log p.warn   { color: #e8c27a; }
.action-log p.danger { color: #ff8a7a; }
.action-log p.info   { color: var(--accent-strong); }

/* ---------- Intervention : marge d'observation ----------
   Le damier 10×10 est entouré de 2 cases de marge (action.php, MARGE = 2) affichées à demi-largeur :
   on y voit et on y tire, on n'y marche pas. 2 × 0,5fr + 10 × 1fr + 2 × 0,5fr = 12fr de côté. */
.action-map,
.action-wrap .axis-x {
  grid-template-columns: repeat(2, minmax(0, .5fr)) repeat(10, minmax(0, 1fr)) repeat(2, minmax(0, .5fr));
}
.action-map,
.action-wrap .axis-y {
  grid-template-rows: repeat(2, minmax(0, .5fr)) repeat(10, minmax(0, 1fr)) repeat(2, minmax(0, .5fr));
}
.action-wrap .axis span.marge { opacity: .35; font-size: .5rem; }
.action-map .cell.marge { filter: brightness(.72) saturate(.75); cursor: default; }
.action-map .cell.marge.unite { cursor: pointer; }
/* Liseré du damier jouable (1/12 de marge de chaque côté) */
.zone-jouable {
  position: absolute;
  inset: calc(100% / 12);
  border: 1px dashed rgba(107, 211, 214, .55);
  box-shadow: 0 0 0 1px rgba(6, 10, 20, .35);
  pointer-events: none;
  z-index: 2;
}

/* =====================================================================
   Replay du tour des chlorosaures (chlorosaurs.php + assets/js/replay.js)
   ===================================================================== */
.replay-panel { border-color: rgba(224, 163, 58, .45); }
.replay-ctrl { display: flex; flex-wrap: wrap; gap: .4rem; }
.replay-ctrl button { cursor: pointer; }
.replay-ctrl button:disabled { opacity: .4; cursor: default; }
.replay-map .cell { cursor: default; }
.replay-status {
  min-height: 1.6em;
  margin: .8rem 0 0;
  text-align: center;
  font-size: 1rem;
  color: var(--text);
}
.replay-status.warn   { color: #e8c27a; }
.replay-status.danger { color: #ff8a7a; font-weight: 600; }
.replay-status.fin    { color: var(--text-dim); font-style: italic; }

/* Dégâts flottants et marque de mort */
.cell .flottant {
  position: absolute; left: 0; right: 0; top: 30%;
  z-index: 4;
  text-align: center;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: clamp(.7rem, 1.6vw, 1.1rem);
  text-shadow: 0 0 4px #000, 0 0 8px #000;
  pointer-events: none;
  animation: flotte 1.4s ease-out forwards;
}
.cell .flottant.degat { color: #ffb02e; }
.cell .flottant.mort  { color: #ff4433; font-size: clamp(1rem, 2.4vw, 1.7rem); }
@keyframes flotte {
  0%   { opacity: 0; transform: translateY(20%) scale(.8); }
  15%  { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-70%) scale(1); }
}

/* Tireur caché : flèche rouge entrant par le côté d'où vient le tir */
.cell .fleche-tir {
  position: absolute; inset: 0;
  z-index: 4;
  pointer-events: none;
  animation: fleche 1.4s ease-out forwards;
}
.cell .fleche-tir::before {
  content: "";
  position: absolute;
  width: 0; height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 16px solid #ff3b2f;            /* triangle pointant vers la gauche */
  filter: drop-shadow(0 0 4px #ff3b2f);
}
/* posée contre le bord d'où vient le tir, pointée vers la cible */
.cell .fleche-tir.depuis-droite::before { right: 2%; top: 50%; transform: translateY(-50%); }
.cell .fleche-tir.depuis-gauche::before { left: 2%;  top: 50%; transform: translateY(-50%) rotate(180deg); }
.cell .fleche-tir.depuis-bas::before    { bottom: 6%; left: 50%; transform: translateX(-50%) rotate(90deg); }
.cell .fleche-tir.depuis-haut::before   { top: 6%;   left: 50%; transform: translateX(-50%) rotate(-90deg); }
@keyframes fleche {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cell .flottant, .cell .fleche-tir { animation-duration: .01s; }
}
/* Replay terminé : le bouton « PASSER » devient l'accès au jeu, mis en valeur */
.replay-ctrl button.suite { color: #fff; background: rgba(107, 211, 214, .18); box-shadow: 0 0 14px rgba(107, 211, 214, .35); }

/* =====================================================================
   Passage de la navette (shuttle.php + assets/js/navette.js)
   ===================================================================== */
.navette-panel { border-color: rgba(107, 211, 214, .5); }
.navette-scene { max-width: 520px; margin: 0 auto; }
.navette-map { position: relative; } /* la navette et son ombre se déplacent au-dessus de la grille */
.navette-map .cell { cursor: default; }
.navette-vaisseau {
  position: absolute;
  width: 22%; height: auto;
  z-index: 6;
  pointer-events: none;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 6px rgba(107, 211, 214, .35));
}
.navette-ombre {
  position: absolute;
  width: 17.6%; height: 8.2%;
  z-index: 5;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .35) 45%, transparent 72%);
  pointer-events: none;
}
.navette-vaisseau[hidden], .navette-ombre[hidden] { display: none; }

/* Rocher porté par un soldat : petit rocher dans le coin de la case */
.navette-map .cell img.badge-rocher {
  inset: auto 3% 3% auto;
  width: 44%; height: 44%;
  z-index: 3;
  filter: drop-shadow(0 0 4px #4fa8ff);
}
.navette-map .cell img.badge-rocher.embarque { animation: embarque .65s ease-in forwards; }
@keyframes embarque {
  to { transform: translateY(-160%) scale(.3); opacity: 0; }
}

/* Dépôt d'une recrue : rayon de téléportation puis apparition */
.navette-map .cell.teleport {
  background: linear-gradient(to bottom, rgba(139, 231, 234, .05), rgba(139, 231, 234, .65));
  box-shadow: inset 0 0 18px rgba(139, 231, 234, .9);
  animation: rayon .45s ease-out;
}
@keyframes rayon {
  from { background-size: 30% 100%; opacity: .2; }
  to   { opacity: 1; }
}
.navette-map .cell.arrivee img { animation: apparition .5s ease-out; }
@keyframes apparition {
  from { opacity: 0; transform: scale(.4); filter: brightness(3); }
  to   { opacity: 1; transform: scale(1); filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .navette-map .cell img.badge-rocher.embarque, .navette-map .cell.teleport, .navette-map .cell.arrivee img { animation: none; }
}
