/* Table de nuit en mer du Nord : plateau à gauche, banc des joueurs à droite */
:root {
  --nuit: #0d1620;
  --bois: #16222f;
  --bois-2: #1f2f40;
  --bois-3: #2a3d52;
  --or: #d9ad55;
  --or-pale: #f1dca6;
  --encre: #ebe4d3;
  --encre-2: #a7b2be;
  --sang: #c4523b;
  --mousse: #5aa465;
  --trait: rgba(217, 173, 85, 0.35);
  --f-titre: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-texte: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --rayon: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 17px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--f-titre); font-weight: 700; text-wrap: balance; margin: 0; letter-spacing: 0.02em; }
h2 { font-size: 1.35rem; color: var(--or-pale); }
h3 { font-size: 1.05rem; color: var(--or-pale); }
p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--or-pale); outline-offset: 2px; }

/* ---------- Boutons ---------- */
.btn {
  min-height: 54px;
  padding: 10px 18px;
  border-radius: var(--rayon);
  border: 2px solid var(--trait);
  background: var(--bois-2);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:hover:not(:disabled) { border-color: var(--or); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.principal { background: var(--or); border-color: var(--or); color: #1b1408; }
.btn.principal:hover:not(:disabled) { background: var(--or-pale); }
.btn.danger { border-color: var(--sang); color: #f3c3b8; }
.btn.discret { background: transparent; }
.btn.petit { min-height: 40px; padding: 6px 12px; font-size: 0.95rem; }
.boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.boutons:empty { display: none; }

/* ---------- Barre du haut ---------- */
.barre {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-block: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--bois);
  border-bottom: 2px solid var(--trait);
}
.marque { font-family: var(--f-titre); font-weight: 700; font-size: 1.25rem; color: var(--or); white-space: nowrap; }
.marque small { display: block; font-family: var(--f-texte); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--encre-2); }
.etat { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.puce { padding: 4px 12px; border-radius: 999px; background: var(--bois-3); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.puce.forte { background: var(--or); color: #1b1408; }
.barre nav { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Table : plateau + côté ---------- */
.table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  padding-block: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  align-items: start;
}
.plateau-zone { min-width: 0; display: flex; justify-content: center; }
.plateau {
  position: relative;
  width: min(100%, calc(100vh - 110px));
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 55%, #2d6f86, #12324a 60%, #0b1c2b);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}
.plateau > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.calque { position: absolute; inset: 0; }

.case {
  position: absolute;
  width: 8.6%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(9px, 1.5vw, 18px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: #fff;
  opacity: 0;
}
.case b { display: block; font-size: 1.4em; }
.case.visible, .plateau.sans-image .case {
  opacity: 1;
  background: var(--teinte);
  border: 3px solid var(--or);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.drakkar {
  position: absolute;
  width: 9%;
  transform: translate(-50%, -62%);
  transition: left 0.24s ease, top 0.24s ease;
  pointer-events: none;
  z-index: 3;
}
.drakkar img { width: 100%; display: block; filter: drop-shadow(0 0 3px var(--c)) drop-shadow(0 0 2px var(--c)) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.6)); }
.drakkar span {
  position: absolute;
  left: 50%;
  bottom: -22%;
  transform: translateX(-50%);
  min-width: 1.7em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--c);
  border: 2px solid #fff;
  color: var(--ct);
  font-size: clamp(8px, 1.1vw, 13px);
  font-weight: 800;
  text-align: center;
  line-height: 1.5;
}
.drakkar.actif img { animation: tangage 1.6s ease-in-out infinite; }
@keyframes tangage { 50% { transform: rotate(-4deg) translateY(-3%); } }

.marqueur {
  position: absolute;
  width: 3.7%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--teinte), 0 0 12px 3px var(--teinte);
  transition: left 0.5s cubic-bezier(.3, 1.4, .5, 1);
  pointer-events: none;
  z-index: 2;
}
.echelle-repli { display: none; }
.plateau.sans-image .echelle-repli { display: block; }
.echelle-repli div {
  position: absolute;
  width: 3.4%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 6px;
  background: rgba(239, 227, 198, 0.85);
  color: #1b1408;
  display: grid;
  place-items: center;
  font-size: clamp(8px, 1.2vw, 14px);
  font-weight: 700;
}
.echelle-repli div.nom { width: auto; transform: translate(-100%, -50%); padding: 0 6px; white-space: nowrap; background: rgba(13, 22, 32, 0.8); color: var(--encre); }

.zone { position: absolute; display: flex; justify-content: center; align-items: flex-start; }
.zone .paquet { position: relative; height: 100%; aspect-ratio: 1.79; max-width: 100%; }
.zone .paquet img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 2px 2px 0 rgba(0,0,0,.4), 4px 4px 0 rgba(0,0,0,.25); }
.zone .paquet.vide img { opacity: 0.15; box-shadow: none; }
.zone .paquet .art { height: 100%; border-radius: 4px; overflow: hidden; }
.zone .compte {
  position: absolute;
  right: -6%;
  top: -10%;
  min-width: 2em;
  padding: 0 0.4em;
  border-radius: 999px;
  background: var(--nuit);
  border: 2px solid var(--or);
  color: var(--or-pale);
  font-size: clamp(9px, 1.2vw, 14px);
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.zone .titre-repli { display: none; }
.plateau.sans-image .zone .titre-repli { display: block; position: absolute; bottom: -1.6em; font-size: 0.8rem; color: var(--or-pale); font-family: var(--f-titre); }

/* ---------- Côté droit ---------- */
.cote { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--rayon);
  background: var(--bois-2);
  border: 2px solid var(--or);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.action .qui { align-self: flex-start; padding: 3px 12px; border-radius: 999px; background: var(--c); color: var(--ct); font-weight: 800; }
.action p { color: var(--encre); }
.action .note { color: var(--encre-2); font-size: 0.92rem; }

.bloc { padding: 14px 16px; border-radius: var(--rayon); background: var(--bois); }
.bloc > h3 { margin-bottom: 8px; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--encre-2); font-family: var(--f-texte); }

.liste-joueurs { display: flex; flex-direction: column; gap: 6px; }
.ligne-joueur {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--bois-2);
  text-align: left;
  cursor: pointer;
}
.ligne-joueur:hover { border-color: var(--trait); }
.ligne-joueur.actif { border-color: var(--or); }
.ligne-joueur .pastille { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.ligne-joueur .nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-joueur .details { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--encre-2); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.ligne-joueur .badge { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: var(--bois-3); color: var(--or-pale); font-weight: 700; }

.journal { max-height: 340px; overflow-y: auto; margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.journal li { color: var(--encre-2); }
.journal li.manche { color: var(--or-pale); font-weight: 700; margin-top: 6px; }
.journal li:last-child { color: var(--encre); }

/* ---------- Cartes ---------- */
.rangee { display: flex; flex-wrap: wrap; gap: 10px; }
.carte {
  --teinte: #555;
  width: 132px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bois-3);
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  flex: none;
}
.carte .art { aspect-ratio: 1.6; overflow: hidden; }
.carte .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carte .legende { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 8px; font-weight: 700; font-size: 0.9rem; border-top: 4px solid var(--teinte); }
.carte .legende .prix { min-width: 1.6em; text-align: center; border-radius: 999px; background: var(--teinte); color: #1b1408; font-variant-numeric: tabular-nums; }
.carte.grand { width: 220px; }
.carte.mini { width: 92px; }
.carte.mini .legende { font-size: 0.78rem; padding: 3px 6px; }
.art.sans-image { position: relative; background: var(--teinte, #445); display: grid; place-items: center; }
.art.sans-image::after { content: attr(data-nom); padding: 6px; text-align: center; font-family: var(--f-titre); font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }

button.choix { max-width: 100%; padding: 0; border: 3px solid transparent; border-radius: 11px; background: none; cursor: pointer; text-align: left; }
button.choix:hover { border-color: var(--trait); }
button.choix.choisi { border-color: var(--or); transform: translateY(-4px); }
button.choix:disabled { opacity: 0.4; cursor: default; }

.carte-texte {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 340px;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #efe3c6;
  color: #2a1f12;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.carte-texte .art { aspect-ratio: 2.2; overflow: hidden; }
.carte-texte .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carte-texte .corps { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.carte-texte .genre { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #7a5a2a; }
.carte-texte h3 { color: #2a1f12; font-size: 1.15rem; }
.carte-texte.tempete .genre { color: #8e2f22; }
.carte-texte.evenement .genre { color: #2f6b3a; }
.req { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.req li { display: flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: 999px; background: rgba(42, 31, 18, 0.1); font-weight: 700; font-size: 0.92rem; }
.req li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--teinte); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.req li.manque { background: rgba(196, 82, 59, 0.2); }
.req li .p { color: #7a5a2a; font-weight: 600; }
.valeur { font-weight: 600; }
.valeur b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* ---------- Voiles (écrans plein écran) ---------- */
.voile {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  background: var(--nuit);
  padding-block: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.voile.dialogue { z-index: 30; }
.feuille { width: min(100%, 980px); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.passe {
  min-height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}
.passe img { width: 120px; opacity: 0.9; }
.passe p { color: var(--encre-2); font-size: 1.2rem; }
.passe h1 { font-size: clamp(2rem, 7vw, 3.6rem); color: var(--c); text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.passe .btn { min-width: 260px; min-height: 68px; font-size: 1.3rem; }

.prive-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--c); }
.prive-tete .pastille { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.prive-tete h1 { font-size: 1.7rem; }
.prive-tete .secret { margin-left: auto; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--encre-2); }
.prive-corps { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--rayon); background: var(--bois-2); border: 2px solid var(--or); }
.prive-corps:empty { display: none; }
.affaires { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.affaires .large { grid-column: 1 / -1; }
.richesse { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.richesse .jeton { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.richesse .jeton img { width: 44px; height: 44px; }
.richesse .jeton small { font-size: 0.85rem; font-weight: 600; color: var(--encre-2); }
.etiquette { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #2f63a3; font-weight: 700; font-size: 0.85rem; }
.serments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.serments li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--bois-3); }
.serments li.fini { opacity: 0.55; }
.vide { color: var(--encre-2); font-style: italic; }

.choix-joueurs { display: flex; flex-wrap: wrap; gap: 10px; }
.choix-joueurs .btn { border-color: var(--c); display: flex; flex-direction: column; align-items: flex-start; }
.choix-joueurs .btn small { font-weight: 500; color: var(--encre-2); font-size: 0.85rem; }
.choix-joueurs .btn.choisi { background: var(--c); color: var(--ct); }
.choix-joueurs .btn.choisi small { color: inherit; }

.compteur { display: inline-flex; align-items: center; gap: 10px; }
.compteur output { min-width: 2.4em; text-align: center; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.compteur .btn { width: 54px; padding: 0; font-size: 1.5rem; }

.formulaire-serment { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
select, input[type="number"], input[type="text"] {
  min-height: 48px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 2px solid var(--trait);
  background: var(--nuit);
  color: var(--encre);
  font: inherit;
}
input[type="number"] { width: 5.5em; font-variant-numeric: tabular-nums; }

.de {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--parchemin, #efe3c6);
  color: #2a1f12;
  font-family: var(--f-titre);
  font-size: 3.2rem;
  font-weight: 700;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.4);
}
.de.roule { animation: roule 0.7s ease-out; }
@keyframes roule { 0% { transform: rotate(-200deg) scale(.6); } 100% { transform: none; } }

.minuterie { font-family: var(--f-titre); font-size: 3.4rem; font-weight: 700; color: var(--or-pale); font-variant-numeric: tabular-nums; line-height: 1; }
.minuterie.ecoule { color: var(--sang); animation: pulse 1s ease-in-out infinite; }
.minuterie.pause { opacity: 0.5; }
@keyframes pulse { 50% { opacity: 0.4; } }

.resume-echange { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.resume-echange > div { padding: 10px 12px; border-radius: 8px; background: var(--bois); border-left: 5px solid var(--c); }
.resume-echange h3 { font-size: 0.95rem; margin-bottom: 4px; }
.resume-echange ul { margin: 0; padding-left: 18px; }

/* ---------- Accueil ---------- */
.accueil { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.accueil .boite { border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.accueil .boite img { display: block; width: 100%; }
.accueil h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--or); line-height: 1.05; }
.accueil .sous { color: var(--encre-2); font-size: 1.05rem; }
.nb-joueurs { display: flex; gap: 8px; }
.nb-joueurs .btn { width: 64px; }
.nb-joueurs .btn.choisi { background: var(--or); color: #1b1408; border-color: var(--or); }
.saisie-joueur { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--bois-2); border-left: 6px solid var(--c); }
.saisie-joueur input { width: 100%; }
.nuancier { display: flex; flex-wrap: wrap; gap: 8px; }
.nuancier button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; background: var(--s); cursor: pointer; }
.nuancier button.choisi { border-color: #fff; box-shadow: 0 0 0 2px var(--or); }
.nuancier button:disabled { opacity: 0.2; cursor: default; }
.erreur { color: #f3a08c; font-weight: 600; }

/* ---------- Réglages ---------- */
.grille-reglages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; }
.grille-reglages label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--bois-2); }
.grille-reglages label span { min-width: 0; }
.grille-plateau { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.grille-plateau label { display: flex; align-items: center; gap: 8px; }
.grille-plateau b { width: 2em; text-align: right; font-variant-numeric: tabular-nums; }
.grille-plateau select { flex: 1; min-width: 0; }
fieldset { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0 6px; font-family: var(--f-titre); font-weight: 700; color: var(--or-pale); }

/* ---------- Bilan ---------- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tuile { padding: 12px 14px; border-radius: var(--rayon); background: var(--bois-2); }
.tuile b { display: block; font-size: 1.7rem; font-family: var(--f-titre); color: var(--or-pale); font-variant-numeric: tabular-nums; }
.tuile span { color: var(--encre-2); font-size: 0.9rem; }
.defile { overflow-x: auto; }
table.scores { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.scores th, table.scores td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--trait); white-space: nowrap; }
table.scores th:nth-child(2), table.scores td:nth-child(2) { text-align: left; }
table.scores th { color: var(--encre-2); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
table.scores tr.premier td { color: var(--or-pale); font-weight: 800; }
.graphique svg { width: 100%; height: auto; display: block; min-width: 560px; }
.legende-graph { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legende-graph span { display: flex; align-items: center; gap: 6px; }
.legende-graph i { width: 18px; height: 4px; border-radius: 2px; background: var(--teinte); }
textarea.export { width: 100%; min-height: 260px; padding: 10px; border-radius: 8px; border: 2px solid var(--trait); background: var(--nuit); color: var(--encre); font: 0.85rem/1.4 ui-monospace, Menlo, Consolas, monospace; }

/* ---------- Règles ---------- */
.lien-aide { align-self: flex-start; min-height: 40px; padding: 4px 0; border: 0; background: none; color: var(--or-pale); font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.regles-tete { position: sticky; top: calc(-1 * max(20px, env(safe-area-inset-top, 0px))); z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: calc(-1 * max(20px, env(safe-area-inset-top, 0px))); padding-top: max(20px, env(safe-area-inset-top, 0px)); padding-bottom: 10px; background: var(--nuit); }
.regles-tete h1 { color: var(--or); }
.sommaire { display: flex; flex-wrap: wrap; gap: 8px; }
.regle { scroll-margin-top: 80px; }
.regle h2 { margin-bottom: 10px; }
.regle p { margin: 0 0 8px; max-width: 72ch; }
.regle ul, .regle ol { margin: 0 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; max-width: 72ch; }
.regle.cible { outline: 2px solid var(--or); outline-offset: 2px; }
.liste-commandes { columns: 2 260px; display: block !important; }
.liste-commandes li { break-inside: avoid; margin-bottom: 4px; }
.situation { border-left: 5px solid var(--or); display: flex; flex-direction: column; gap: 4px; }
.jarl { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--trait); }
.jarl-fil { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; }
.jarl-fil:empty { display: none; }
.bulle { max-width: 85%; padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; }
.bulle.q { align-self: flex-end; background: var(--bois-3); }
.bulle.r { align-self: flex-start; background: #efe3c6; color: #2a1f12; }
.bulle.attente { font-style: italic; opacity: 0.75; }
.jarl-form { display: flex; flex-wrap: wrap; gap: 10px; }
.jarl-form input { flex: 1 1 240px; min-width: 0; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 980px) {
  .table { grid-template-columns: minmax(0, 1fr); }
  .plateau { width: min(100%, 760px); }
  .accueil { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .affaires, .resume-echange { grid-template-columns: minmax(0, 1fr); }
  .carte { width: 112px; }
  .carte.grand { width: 180px; }
  .barre nav .btn { min-height: 44px; padding: 6px 10px; font-size: 0.92rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
