/* Cartes GDE — bleu roi, or et parchemin, style Premier Empire. */
:root {
  --bleu-nuit: #081433;
  --bleu: #0f2463;
  --bleu-roi: #1a3a8f;
  --or: #d4a94a;
  --or-clair: #f0d68a;
  --or-sombre: #8a6420;
  --parchemin: #f3e6c4;
  --parchemin-sombre: #e2cf9f;
  --encre: #2b1d0e;
  --encre-douce: #5a4326;
  --rouge: #9c1c1c;
  --titre: 'Cinzel', 'Times New Roman', serif;
  --texte: 'EB Garamond', Georgia, serif;
  --rayon: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--texte);
  font-size: 18px;
  line-height: 1.5;
  color: var(--parchemin);
  background-color: var(--bleu-nuit);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(26, 58, 143, .9), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23d4a94a' fill-opacity='.06'%3E%3Cpath d='M32 14c-3 4-4 8-2 12-3-1-6 0-7 3 3-1 5 0 6 2h-4v2h4c-1 3-3 5-6 5 3 2 6 1 8-1 0 2 0 4-1 6h4c-1-2-1-4-1-6 2 2 5 3 8 1-3 0-5-2-6-5h4v-2h-4c1-2 3-3 6-2-1-3-4-4-7-3 2-4 1-8-2-12z'/%3E%3C/g%3E%3C/svg%3E");
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--or-clair); }
:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 3px; }

/* ——— En-tête ——— */
.entete {
  background: linear-gradient(180deg, var(--bleu) 0%, #0b1a4a 100%);
  border-bottom: 3px double var(--or);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
  position: sticky;
  top: 0;
  z-index: 10;
}
.entete-int {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.blason {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--or-clair);
  margin-right: auto;
}
.blason svg { width: 40px; height: 40px; flex: none; }
.blason-nom { font-family: var(--titre); font-weight: 700; font-size: 22px; letter-spacing: .06em; line-height: 1.1; }
.blason-sous { display: block; font-family: var(--titre); font-size: 11px; letter-spacing: .25em; color: var(--or); text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--titre);
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--parchemin);
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.nav a:hover { color: var(--or-clair); border-color: rgba(212, 169, 74, .4); }
.nav a[aria-current="page"] {
  color: var(--bleu-nuit);
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  border-color: var(--or-sombre);
}

/* ——— Corps ——— */
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 16px 48px; }
.titre-page { text-align: center; margin: 0 0 6px; font-family: var(--titre); font-size: clamp(28px, 6vw, 42px); color: var(--or-clair); letter-spacing: .05em; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.sous-titre { text-align: center; margin: 0 auto 22px; color: var(--parchemin-sombre); font-style: italic; max-width: 640px; }
.ornement { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--or); margin: 0 auto 24px; max-width: 420px; }
.ornement::before, .ornement::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--or)); }
.ornement::after { background: linear-gradient(90deg, var(--or), transparent); }
.ornement svg { width: 22px; height: 22px; }

/* ——— Filtres ——— */
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 24px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.puce {
  font-family: var(--titre);
  font-size: 14px;
  letter-spacing: .05em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--or-sombre);
  background: rgba(8, 20, 51, .7);
  color: var(--parchemin);
  cursor: pointer;
}
.puce:hover { border-color: var(--or); color: var(--or-clair); }
.puce[aria-pressed="true"] { background: linear-gradient(180deg, var(--or-clair), var(--or)); color: var(--bleu-nuit); border-color: var(--or-sombre); font-weight: 700; }
.puce .nb { opacity: .7; font-size: 12px; margin-left: 4px; }
.outils { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.champ {
  font: inherit;
  font-size: 16px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--or-sombre);
  background: var(--parchemin);
  color: var(--encre);
  min-width: 0;
}
input.champ { width: 220px; max-width: 100%; }

/* ——— Grille de cartes ——— */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.carte {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  border-radius: var(--rayon);
}
.carte-img {
  aspect-ratio: 5 / 7;
  width: 100%;
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--bleu);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55), 0 0 0 1px rgba(212, 169, 74, .35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.carte-img img { width: 100%; height: 100%; object-fit: cover; }
.carte:hover .carte-img, .carte:focus-visible .carte-img { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 12px 26px rgba(0, 0, 0, .6), 0 0 0 2px var(--or); }
.carte:focus-visible { outline: none; }
.carte-nom { font-family: var(--titre); font-weight: 700; color: var(--or-clair); font-size: 16px; line-height: 1.2; }
.carte-grade { font-size: 14px; color: var(--parchemin-sombre); font-style: italic; margin-top: -6px; }
.sans-image {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: var(--titre);
  color: var(--or-clair);
  border: 3px double var(--or);
  border-radius: var(--rayon);
  background: radial-gradient(circle, var(--bleu-roi), var(--bleu));
}

.vide { text-align: center; color: var(--parchemin-sombre); font-style: italic; padding: 40px 0; }

/* ——— Compagnies ——— */
.compagnie { margin-bottom: 44px; scroll-margin-top: 110px; }
.banniere {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--bleu-roi), var(--bleu) 70%, transparent);
  border-left: 5px solid var(--or);
  border-bottom: 1px solid rgba(212, 169, 74, .45);
}
.banniere h2 { margin: 0; font-family: var(--titre); color: var(--or-clair); font-size: clamp(20px, 5vw, 28px); letter-spacing: .06em; }
.banniere span { color: var(--parchemin-sombre); font-style: italic; }
.sommaire { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.sommaire a { text-decoration: none; }

/* ——— Parchemin ——— */
.parchemin {
  color: var(--encre);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(140, 100, 40, .18), transparent 60%),
    var(--parchemin);
  border: 2px solid var(--or);
  outline: 1px solid var(--or-sombre);
  outline-offset: -7px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

/* ——— Agrandissement ——— */
.fiche {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(960px, calc(100vw - 24px));
  width: 100%;
  max-height: calc(100dvh - 24px);
  overflow: visible;
  color: inherit;
}
.fiche::backdrop { background: rgba(4, 9, 25, .82); backdrop-filter: blur(3px); }
.fiche[open] { animation: entree .2s ease-out; }
@keyframes entree { from { opacity: 0; transform: scale(.96); } }
.fiche-int {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 4px;
}
.fiche-img { border-radius: 14px; overflow: hidden; box-shadow: 0 14px 40px rgba(0, 0, 0, .7), 0 0 0 2px var(--or); aspect-ratio: 5 / 7; }
.fiche-img img { width: 100%; height: 100%; object-fit: cover; }
.fiche-texte { padding: 26px 24px 22px; position: relative; }
.fiche-texte h2 { margin: 0; font-family: var(--titre); font-size: clamp(26px, 5vw, 34px); color: var(--bleu); line-height: 1.1; }
.fiche-grade { margin: 4px 0 14px; font-family: var(--titre); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-douce); }
.insignes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.insigne { font-family: var(--titre); font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--bleu); color: var(--or-clair); border: 1px solid var(--or-sombre); }
.insigne.or { background: linear-gradient(180deg, var(--or-clair), var(--or)); color: var(--bleu-nuit); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.stat { text-align: center; padding: 8px 4px; border-radius: 6px; background: var(--bleu); color: var(--parchemin); border: 1px solid var(--or-sombre); }
.stat b { display: block; font-family: var(--titre); font-size: 22px; color: var(--or-clair); line-height: 1.1; }
.stat small { font-family: var(--titre); font-size: 11px; letter-spacing: .12em; }
.capacite { border-top: 1px solid rgba(138, 100, 32, .5); padding-top: 14px; }
.capacite h3 { margin: 0 0 4px; font-family: var(--titre); font-size: 17px; color: var(--rouge); }
.capacite p { margin: 0; font-size: 18px; }
.fermer, .fleche {
  position: absolute;
  border: 1px solid var(--or-sombre);
  background: var(--bleu);
  color: var(--or-clair);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.fermer { top: 10px; right: 10px; z-index: 2; }
.fermer:hover, .fleche:hover { background: var(--bleu-roi); }
.navfiche { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.navfiche button { position: static; }

/* ——— Combat ——— */
.attente { max-width: 640px; margin: 0 auto; padding: 36px 28px; text-align: center; }
.attente svg { width: 84px; height: 84px; color: var(--bleu); margin: 0 auto 12px; }
.attente h2 { font-family: var(--titre); color: var(--bleu); margin: 0 0 10px; font-size: 26px; }
.attente p { margin: 0 0 10px; }
.attente ul { text-align: left; display: inline-block; margin: 6px 0 0; }

/* ——— Compte ——— */
.compte { display: flex; align-items: center; min-height: 36px; }
.bouton-discord {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 6px;
  background: #5865f2; color: #fff; text-decoration: none;
  font-family: var(--titre); font-size: 14px; letter-spacing: .04em;
  border: 1px solid var(--or-sombre);
}
.bouton-discord:hover { background: #4752c4; }
.bouton-discord svg { width: 20px; height: 20px; }
.profil { position: relative; }
.profil summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--or-sombre); background: rgba(8, 20, 51, .6);
}
.profil summary::-webkit-details-marker { display: none; }
.profil summary img, .initiale { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--or); }
.initiale { display: grid; place-items: center; background: var(--bleu-roi); color: var(--or-clair); font-family: var(--titre); font-weight: 700; }
.profil-nom { font-family: var(--titre); font-size: 14px; color: var(--or-clair); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 20;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--parchemin); border: 2px solid var(--or); border-radius: 6px; box-shadow: 0 10px 26px rgba(0, 0, 0, .55);
}
.profil-menu a, .profil-menu button {
  all: unset; cursor: pointer; padding: 9px 12px; border-radius: 4px; color: var(--encre);
  font-family: var(--titre); font-size: 14px; display: flex; justify-content: space-between; gap: 12px;
}
.profil-menu a:hover, .profil-menu button:hover, .profil-menu :focus-visible { background: var(--parchemin-sombre); }
.profil-menu b { color: var(--bleu); }

.message {
  position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translate(-50%, 30px);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 6px;
  background: var(--bleu); color: var(--parchemin); border: 1px solid var(--or); box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; text-align: center;
}
.message.visible { opacity: 1; transform: translate(-50%, 0); }

/* ——— Ma collection ——— */
.vue { display: flex; justify-content: center; margin: -6px auto 18px; }
.vue[hidden] { display: none; }
.onglet {
  font-family: var(--titre); font-size: 14px; letter-spacing: .05em; cursor: pointer;
  padding: 8px 16px; border: 1px solid var(--or); background: transparent; color: var(--parchemin);
}
.onglet:first-child { border-radius: 6px 0 0 6px; }
.onglet:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.onglet[aria-pressed="true"] { background: var(--or); color: var(--bleu-nuit); font-weight: 700; }
.onglet .nb { font-size: 12px; opacity: .8; margin-left: 4px; }
.carte-img { position: relative; }
.exemplaires {
  position: absolute; right: 6px; bottom: 6px; min-width: 34px; padding: 2px 8px; border-radius: 999px;
  background: var(--bleu-nuit); color: var(--or-clair); border: 1px solid var(--or);
  font-family: var(--titre); font-weight: 700; font-size: 14px;
}
.manque {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  padding: 4px 10px; border-radius: 4px; background: rgba(8, 20, 51, .85); color: var(--parchemin);
  font-family: var(--titre); font-size: 12px; border: 1px solid var(--or-sombre);
}
.carte.manquante img { filter: grayscale(1) brightness(.45); }
.carte.manquante .carte-nom { color: var(--parchemin-sombre); }
.insigne.possedee { background: #24572d; color: #f3e6c4; }
.insigne.absente { background: #5a4326; color: var(--parchemin); }

/* ——— Boutons ——— */
.bouton {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  font-family: var(--titre); font-weight: 700; font-size: 16px; letter-spacing: .06em;
  padding: 12px 22px; border-radius: 6px; border: 1px solid var(--or-sombre);
  background: linear-gradient(180deg, var(--or-clair), var(--or)); color: var(--bleu-nuit);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
.bouton:hover { filter: brightness(1.08); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton.secondaire { background: transparent; color: var(--or-clair); border-color: var(--or); box-shadow: none; }

/* ——— Boosters ——— */
.boosters { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.reserve { display: flex; align-items: center; gap: 8px; font-style: italic; color: var(--parchemin-sombre); }
.pastille { width: 16px; height: 22px; border-radius: 3px; border: 1px solid var(--or); background: transparent; }
.pastille.pleine { background: linear-gradient(180deg, var(--or-clair), var(--or)); }
.reserve span:last-child { margin-left: 6px; }
.scene { perspective: 900px; padding: 10px 0; }
.paquet {
  width: 210px; aspect-ratio: 5 / 7; position: relative; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--or-clair); text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(212, 169, 74, .07) 0 6px, transparent 6px 14px),
    linear-gradient(160deg, var(--bleu-roi), var(--bleu) 55%, var(--bleu-nuit));
  border: 3px solid var(--or); outline: 1px solid var(--or-sombre); outline-offset: -10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 30px rgba(0, 0, 0, .4);
  animation: flotte 3s ease-in-out infinite;
}
.paquet svg { width: 70px; height: 70px; color: var(--or); }
.paquet strong { font-family: var(--titre); font-size: 22px; letter-spacing: .08em; }
.paquet span { font-family: var(--titre); font-size: 12px; letter-spacing: .15em; color: var(--or); }
.paquet-haut { position: absolute; top: 0; left: 0; right: 0; height: 22px; border-bottom: 2px dashed var(--or); background: rgba(212, 169, 74, .15); border-radius: 9px 9px 0 0; transition: transform .45s, opacity .45s; }
.paquet.secoue { animation: secoue .15s linear infinite; }
.paquet.ouvert .paquet-haut { transform: translateY(-40px) rotate(-8deg); opacity: 0; }
.paquet.ouvert { animation: none; transform: scale(1.06); opacity: 0; transition: opacity .45s .15s, transform .45s; }
@keyframes flotte { 50% { transform: translateY(-6px) rotate(.6deg); } }
@keyframes secoue { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.actions[hidden] { display: none; }
.tirage { display: grid; grid-template-columns: repeat(5, minmax(0, 190px)); gap: 16px; justify-content: center; width: 100%; perspective: 1200px; }
.tirage-place { position: relative; animation: distribue .4s calc(var(--i) * 70ms) both ease-out; }
.tirage-cadre { position: relative; }
.tirage-carte { position: relative; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.retournee .tirage-carte { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: var(--rayon); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.dos {
  border: 3px solid var(--or); box-shadow: 0 8px 20px rgba(0, 0, 0, .55);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23d4a94a' d='M32 4c-6 7-8 15-4 23-5-3-12-2-15 4 6-2 10 1 11 5h-8v4h8c-1 6-6 10-12 10 6 4 12 2 16-3 0 5-1 9-3 13h14c-2-4-3-8-3-13 4 5 10 7 16 3-6 0-11-4-12-10h8v-4h-8c1-4 5-7 11-5-3-6-10-7-15-4 4-8 2-16-4-23z'/%3E%3C/svg%3E") center / 40% no-repeat,
    radial-gradient(circle, var(--bleu-roi), var(--bleu-nuit));
}
.recto { transform: rotateY(180deg); box-shadow: 0 8px 20px rgba(0, 0, 0, .55), 0 0 0 1px var(--or); }
.tirage-place.rare.retournee .recto { box-shadow: 0 0 0 2px var(--or-clair), 0 0 28px 6px rgba(240, 214, 138, .65); }
.nouvelle {
  position: absolute; bottom: -10px; left: 50%; z-index: 1; transform: translateX(-50%) rotate(-3deg);
  padding: 3px 10px; border-radius: 4px; background: var(--rouge); color: #fff; border: 1px solid var(--or-clair);
  font-family: var(--titre); font-weight: 700; font-size: 13px; white-space: nowrap; box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .3s .35s;
}
.tirage-place.retournee .nouvelle { opacity: 1; }
.tirage-nom { display: block; margin-top: 16px; line-height: 1.2; text-align: center; font-family: var(--titre); font-size: 14px; color: var(--or-clair); opacity: 0; transition: opacity .3s .3s; }
.tirage-place.retournee .tirage-nom { opacity: 1; }
@keyframes distribue { from { opacity: 0; transform: translateY(30px) scale(.9); } }

/* ——— Classement ——— */
.classement { max-width: 640px; margin: 40px auto 0; }
.tableau { width: 100%; border-collapse: collapse; background: var(--parchemin); color: var(--encre); border: 2px solid var(--or); border-radius: 6px; overflow: hidden; }
.tableau th { font-family: var(--titre); font-size: 13px; letter-spacing: .08em; text-align: left; background: var(--bleu); color: var(--or-clair); padding: 8px 10px; }
.tableau td { padding: 8px 10px; border-top: 1px solid var(--parchemin-sombre); }
.tableau .joueur { display: flex; align-items: center; gap: 8px; }
.tableau .joueur img { border-radius: 50%; }

/* ——— Pied ——— */
.pied { text-align: center; padding: 18px 16px 24px; font-size: 14px; color: var(--parchemin-sombre); border-top: 1px solid rgba(212, 169, 74, .3); }
.pied b { font-family: var(--titre); color: var(--or); letter-spacing: .1em; }

/* ——— Téléphone ——— */
@media (max-width: 720px) {
  .compte { margin-left: auto; }
  .profil-nom { max-width: 90px; }
  .bouton-discord span { display: none; }
  .bouton-discord { padding: 7px 9px; }
  .nav { order: 3; }
  .tirage { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 10px; }
  .tirage-nom { font-size: 13px; }
  .tirage-place { width: calc((100% - 20px) / 3); }
  .nouvelle { font-size: 11px; padding: 2px 7px; }
  .message { font-size: 15px; bottom: auto; top: 12px; transform: translate(-50%, -30px); }
  .paquet { width: 180px; }
  .paquet span { font-size: 10px; letter-spacing: .08em; }
  .vue .onglet { padding: 8px 12px; }
  body { font-size: 17px; }
  .entete-int { padding: 8px 12px; gap: 8px; }
  .blason svg { width: 32px; height: 32px; }
  .blason-nom { font-size: 18px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav { gap: 2px; }
  .nav a { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 12px; letter-spacing: .03em; padding: 7px 3px; }
  main { padding: 20px 12px 40px; }
  .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .carte-nom { font-size: 14px; }
  .carte-grade { font-size: 13px; }
  .fiche-int { grid-template-columns: 1fr; gap: 14px; }
  .fiche-img { max-width: 300px; width: 78%; margin: 0 auto; }
  .fiche-texte { padding: 22px 16px 18px; }
  .stat b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════ Combat ═══════ */
.zone-combat { margin-bottom: 8px; }
.preparation { max-width: 760px; margin: 0 auto 22px; padding: 26px 24px; text-align: center; }
.preparation h2 { margin: 0 0 8px; font-family: var(--titre); color: var(--bleu); }
.preparation .actions { margin-top: 16px; }
.petit { font-size: 15px; color: var(--encre-douce); margin: 12px 0 0; }
.bouton.secondaire-sombre { background: var(--bleu); color: var(--or-clair); border-color: var(--or); box-shadow: none; }
.bouton.secondaire-sombre:disabled { opacity: .55; cursor: not-allowed; }
.bouton.petit-bouton { padding: 8px 14px; font-size: 14px; }
.bouton:disabled { cursor: not-allowed; }
.choix-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; max-width: 980px; margin: 0 auto 22px; }
.choix { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; text-align: center; font-family: var(--titre); font-size: 13px; color: var(--parchemin-sombre); }
.choix img, .choix .sans-image { aspect-ratio: 5 / 7; border-radius: 6px; object-fit: cover; opacity: .55; filter: grayscale(.6); transition: opacity .15s, filter .15s, box-shadow .15s; }
.choix[aria-pressed="true"] img { opacity: 1; filter: none; box-shadow: 0 0 0 3px var(--or-clair), 0 6px 14px rgba(0, 0, 0, .5); }
.choix[aria-pressed="true"] span { color: var(--or-clair); }
.choix:focus-visible img { outline: 2px solid var(--or-clair); }
.aide-regles { max-width: 760px; margin: 0 auto 10px; padding: 14px 20px; }
.aide-regles summary { cursor: pointer; font-family: var(--titre); color: var(--bleu); }
.aide-regles ul { margin: 10px 0 0; padding-left: 20px; }
.classement[hidden] { display: none; }

.bataille { max-width: 680px; margin: -8px auto 0; display: flex; flex-direction: column; gap: 8px; }
.bataille.avec-panneau { padding-bottom: 190px; }
.camp { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 8px; background: rgba(8, 20, 51, .65); border: 1px solid rgba(212, 169, 74, .35); }
.camp-nom { font-family: var(--titre); color: var(--or-clair); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30%; }
.camp-info { font-size: 14px; color: var(--parchemin-sombre); white-space: nowrap; }
.etendard { all: unset; position: relative; flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 6px; border-radius: 6px; }
.etendard svg { width: 22px; height: 22px; color: var(--or); flex: none; }
.etendard-barre { flex: 1; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .5); border: 1px solid var(--or-sombre); overflow: hidden; }
.etendard-barre span { display: block; height: 100%; background: linear-gradient(90deg, #b8860b, var(--or-clair)); transition: width .5s ease; }
.camp-ennemi .etendard-barre span { background: linear-gradient(90deg, #7a1515, #c94040); }
.etendard-pv { font-family: var(--titre); font-weight: 700; color: var(--or-clair); min-width: 36px; text-align: right; }
.etendard.visable { cursor: pointer; box-shadow: 0 0 0 2px #e05050; animation: pulse 1.2s ease-in-out infinite; }
.etendard.touche { animation: secousse .35s; }

.plateau { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.case { position: relative; aspect-ratio: 5 / 7; border-radius: 8px; }
.case.vide { border: 1px dashed rgba(212, 169, 74, .35); background: rgba(8, 20, 51, .35); display: grid; place-items: center; }
.case.libre { border: 2px dashed var(--or-clair); cursor: pointer; background: rgba(212, 169, 74, .12); }
.case.libre span { font-family: var(--titre); font-size: 12px; color: var(--or-clair); text-align: center; padding: 4px; }
.unite { all: unset; position: relative; aspect-ratio: 5 / 7; border-radius: 8px; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .55), 0 0 0 1px rgba(212, 169, 74, .45); transition: transform .25s ease, box-shadow .2s, opacity .3s, filter .3s; }
.unite img, .unite .sans-image { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.unite.repos img { filter: saturate(.55) brightness(.8); }
.unite.prete { box-shadow: 0 4px 12px rgba(0, 0, 0, .55), 0 0 0 2px var(--or); }
.unite.choisie { transform: translateY(-6px); box-shadow: 0 10px 22px rgba(0, 0, 0, .6), 0 0 0 3px var(--or-clair); }
.unite.visable { box-shadow: 0 0 0 3px #e05050, 0 0 18px rgba(224, 80, 80, .6); animation: pulse 1.2s ease-in-out infinite; }
.unite.visable.allie { box-shadow: 0 0 0 3px #6fb3ff, 0 0 18px rgba(111, 179, 255, .5); }
.unite.arrivee { animation: arrivee .45s ease-out; }
.unite.assaut { transform: translate(var(--dx), var(--dy)) scale(1.06); transition: transform .22s cubic-bezier(.5, 0, .7, .4); z-index: 3; }
.unite.touche { animation: secousse .35s; }
.unite.touche img { filter: brightness(1.6) sepia(1) hue-rotate(-40deg) saturate(4); }
.unite.tombe { opacity: 0; transform: scale(.85) rotate(-4deg); filter: grayscale(1); transition: opacity .5s, transform .5s, filter .3s; }
.jauge { position: absolute; left: 6%; right: 6%; bottom: 26px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .6); overflow: hidden; }
.jauge span { display: block; height: 100%; background: #4caf50; transition: width .4s; }
.unite.blessee .jauge span { background: #e0a030; }
.pv { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); padding: 0 8px; border-radius: 999px; background: rgba(8, 20, 51, .9); border: 1px solid var(--or); color: var(--parchemin); font-family: var(--titre); font-weight: 700; font-size: 14px; white-space: nowrap; }
.pv small { color: #8fd08f; font-size: 11px; margin-left: 2px; }
.marque { position: absolute; top: 4px; left: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(8, 20, 51, .85); color: var(--parchemin-sombre); font-size: 11px; font-family: var(--titre); }
.marque.fortin { left: auto; right: 4px; background: #6b4b1b; color: var(--or-clair); border: 1px solid var(--or); }
.apercu { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 4px; background: #9c1c1c; color: #fff; font-family: var(--titre); font-weight: 700; font-size: 14px; white-space: nowrap; pointer-events: none; }
.etendard .apercu { top: -12px; left: auto; right: 0; transform: none; }
.flottant { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); pointer-events: none; z-index: 5; font-family: var(--titre); font-weight: 700; font-size: 22px; white-space: nowrap; text-shadow: 0 2px 4px #000, 0 0 2px #000; animation: monte 1.2s ease-out forwards; }
.flottant.degat { color: #ff6b6b; }
.flottant.info { color: var(--or-clair); font-size: 15px; }
.etendard .flottant { top: -6px; }
@keyframes monte { from { opacity: 0; transform: translate(-50%, 8px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -34px); } }
@keyframes secousse { 25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }
@keyframes pulse { 50% { filter: brightness(1.12); } }
@keyframes arrivee { from { opacity: 0; transform: translateY(-14px) scale(.92); } }

.barre-tour { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; padding: 8px 12px; border-top: 1px solid rgba(212, 169, 74, .4); border-bottom: 1px solid rgba(212, 169, 74, .4); background: linear-gradient(90deg, transparent, rgba(26, 58, 143, .55), transparent); }
.tour-qui { font-family: var(--titre); color: var(--parchemin-sombre); }
.tour-qui.a-moi { color: var(--or-clair); font-weight: 700; }
.ordres { font-family: var(--titre); padding: 3px 10px; border-radius: 999px; background: var(--or); color: var(--bleu-nuit); font-weight: 700; }
.chrono { font-family: var(--titre); font-weight: 700; color: var(--parchemin); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.chrono.urgent { color: #ff6b6b; }
.lien-abandon { all: unset; cursor: pointer; font-size: 14px; color: var(--parchemin-sombre); text-decoration: underline; }
.consigne { text-align: center; font-style: italic; color: var(--parchemin-sombre); min-height: 1.5em; }
.main { display: flex; gap: 10px; overflow-x: auto; padding: 10px 4px 12px; justify-content: safe center; scrollbar-width: thin; }
.en-main { all: unset; flex: none; width: 112px; aspect-ratio: 5 / 7; border-radius: 8px; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); transition: transform .2s, box-shadow .2s; }
.en-main img, .en-main .sans-image { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; filter: brightness(.6) saturate(.6); }
.en-main.jouable img { filter: none; }
.en-main.jouable { box-shadow: 0 4px 10px rgba(0, 0, 0, .5), 0 0 0 2px var(--or); }
.en-main.choisie { transform: translateY(-8px); box-shadow: 0 10px 20px rgba(0, 0, 0, .6), 0 0 0 3px var(--or-clair); }
.panneau { position: fixed; z-index: 30; left: 50%; bottom: 10px; transform: translateX(-50%); width: min(680px, calc(100vw - 20px)); max-height: 46vh; overflow-y: auto; display: flex; gap: 16px; padding: 14px 16px; align-items: flex-start; animation: glisse .2s ease-out; }
@keyframes glisse { from { opacity: 0; transform: translate(-50%, 20px); } }
.panneau[hidden] { display: none; }
.panneau-img { flex: none; width: 100px; aspect-ratio: 5 / 7; border-radius: 8px; overflow: hidden; }
.panneau-img img { width: 100%; height: 100%; object-fit: cover; }
.panneau-texte { min-width: 0; }
.panneau h3 { margin: 0 0 4px; font-family: var(--titre); color: var(--bleu); }
.panneau h3 small { font-size: 13px; color: var(--rouge); }
.panneau p { margin: 0 0 8px; }
.stats-ligne { font-family: var(--titre); font-size: 14px; color: var(--encre-douce); }
.panneau .actions { justify-content: flex-start; }
.journal { color: var(--parchemin-sombre); font-size: 15px; }
.journal summary { cursor: pointer; font-family: var(--titre); color: var(--or); }
.journal ol { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow-y: auto; }
.journal li { padding: 2px 0; border-bottom: 1px solid rgba(212, 169, 74, .12); }
.annonce { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; align-content: center; gap: 10px; pointer-events: none; background: rgba(4, 9, 25, .35); text-align: center; animation: entree .2s ease-out; }
.annonce[hidden] { display: none; }
.annonce > strong { font-family: var(--titre); font-size: clamp(34px, 9vw, 56px); color: var(--or-clair); text-shadow: 0 3px 10px #000; }
.annonce > span { font-family: var(--titre); font-size: 18px; color: var(--parchemin); text-shadow: 0 2px 6px #000; }
.annonce-carte { width: min(220px, 50vw); aspect-ratio: 5 / 7; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 3px var(--or-clair), 0 0 40px rgba(240, 214, 138, .5); }
.annonce-carte img { width: 100%; height: 100%; object-fit: cover; }
.annonce.fixe { pointer-events: auto; background: rgba(4, 9, 25, .78); padding: 16px; }
.fin { max-width: 420px; padding: 26px 22px; }
.fin h2 { margin: 0 0 8px; font-family: var(--titre); font-size: 38px; color: var(--rouge); }
.fin.gagne h2 { color: var(--bleu); }

@media (max-width: 720px) {
  .plateau { gap: 5px; }
  .camp { gap: 8px; padding: 5px 8px; }
  .camp-info { font-size: 12px; }
  .camp-nom { font-size: 14px; max-width: 26%; }
  .etendard-pv { font-size: 14px; min-width: 30px; }
  .pv { font-size: 11px; padding: 0 5px; bottom: 2px; }
  .pv small { display: none; }
  .jauge { bottom: 19px; height: 4px; }
  .marque { font-size: 9px; padding: 0 3px; }
  .apercu { font-size: 12px; padding: 1px 4px; }
  .flottant { font-size: 17px; }
  .flottant.info { font-size: 11px; }
  .case.libre span { font-size: 9px; }
  .en-main { width: 78px; }
  .main { justify-content: flex-start; }
  .panneau { padding: 12px; gap: 12px; }
  .panneau-img { width: 80px; }
  .panneau { font-size: 15px; max-height: 42vh; }
  .panneau h3 { font-size: 18px; }
  .stats-ligne { font-size: 12px; }
  .panneau .bouton { padding: 9px 14px; font-size: 14px; }
  .choix-deck { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .choix { font-size: 11px; }
  .preparation { padding: 20px 14px; }
  .unite.choisie { transform: translateY(-3px); }
}
.en-bataille main > .titre-page, .en-bataille main > .ornement { display: none; }
