/*!
 * La Torche v1.6.1 — feuille de style
 * Copyright (C) 2026 Éric Wolf
 * Auteur et propriétaire : Éric Wolf — réalisé pour l'association Compostons Ensemble (Grosbreuil, Vendée)
 * https://compostons-ensemble.fr
 * Licence : GNU General Public License version 2 ou ultérieure
 */
.torche {
  --t-green: var(--ce-green-700, #2f6b3a);
  --t-green-d: var(--ce-green-900, #1d4426);
  --t-green-l: var(--ce-green-100, #e7f1e2);
  --t-amber: var(--ce-amber-500, #e9a531);
  --t-amber-d: var(--ce-amber-700, #b9781a);
  --t-radius: var(--ce-radius, 14px);
  --t-felt: #2f6d40;
  --t-felt-d: #1c4429;
  --t-ink: #1f2a22;
  --t-paper: #fffcf3;
  --t-red: #c0392b;
  --t-cw: 58px;
  --t-ch: 84px;
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  color: var(--t-ink);
  font-family: inherit;
  line-height: 1.4;
}
.torche *, .torche *::before, .torche *::after { box-sizing: border-box; }

/* ---------- En-tête ---------- */
.torche-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.torche-brand { display: flex; align-items: center; gap: .6rem; }
.torche-logo { display: inline-flex; }
.torche-title { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--t-green-d); letter-spacing: .01em; }
.torche-sub { margin: 0; font-size: .92rem; color: #4b5a4f; }
.torche-tools { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- Boutons ---------- */
.torche-btn {
  border: 0; border-radius: 999px; padding: .5rem 1rem; font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; background: var(--t-green); color: #fff; transition: transform .1s, background .15s, opacity .15s;
}
.torche-btn:hover:not(:disabled) { background: var(--t-green-d); }
.torche-btn:active:not(:disabled) { transform: scale(.97); }
.torche-btn:focus-visible { outline: 3px solid var(--t-amber); outline-offset: 2px; }
.torche-btn.ghost { background: #fff; color: var(--t-green-d); border: 1.5px solid var(--t-green); }
.torche-btn.ghost:hover { background: var(--t-green-l); }
.torche-btn.big { padding: .7rem 1.4rem; font-size: 1rem; }
.torche-btn.warn { background: var(--t-amber-d); }
.torche-btn.fire { background: linear-gradient(90deg, #d9531e, #e9a531); color: #2b1300; }
.torche-btn:disabled { opacity: .55; cursor: default; background: #6d8a74; font-weight: 600; }

/* ---------- Configuration ---------- */
.torche-setup { background: var(--t-green-l); border-radius: var(--t-radius); padding: 1.25rem; max-width: 560px; margin: 0 auto; }
.torche-setup h3 { margin: 0 0 1rem; color: var(--t-green-d); }
.torche-field { display: flex; align-items: center; gap: .6rem; font-weight: 700; margin-bottom: .9rem; }
.torche-setup select, .torche-setup input[type=text] {
  font: inherit; padding: .45rem .6rem; border: 1.5px solid #b9cdb9; border-radius: 8px; background: #fff; color: var(--t-ink);
}
.torche-seats { display: grid; gap: .5rem; margin-bottom: 1rem; }
.torche-seat { display: grid; grid-template-columns: 2rem 1fr auto; gap: .5rem; align-items: center; }
.torche-seat-n { width: 2rem; height: 2rem; border-radius: 50%; background: var(--t-green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.torche-seat input { min-width: 0; }
.torche-check { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; margin-bottom: .6rem; }
.torche-note { font-size: .88rem; color: #4b5a4f; margin: .4rem 0 1rem; }
.torche-error { color: var(--t-red); font-weight: 700; }

/* ---------- Plateau ---------- */
.torche-board {
  background: radial-gradient(ellipse at 50% 40%, var(--t-felt) 0%, var(--t-felt-d) 100%);
  border-radius: var(--t-radius); padding: 1rem; color: #fff; display: grid; gap: 1rem;
  box-shadow: inset 0 0 0 6px #5b3a1e, inset 0 0 0 8px #3e2712, 0 6px 18px rgba(0,0,0,.18);
}
.torche-opps { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.torche-opp {
  background: rgba(0,0,0,.18); border: 2px solid transparent; border-radius: 12px; padding: .5rem .65rem;
  min-width: 150px; display: grid; gap: .3rem; justify-items: center; transition: border-color .2s, background .2s;
}
.torche-opp.active { border-color: var(--t-amber); background: rgba(233,165,49,.18); box-shadow: 0 0 14px rgba(233,165,49,.45); }
.torche-opp.out { opacity: .7; }
.torche-opp-head { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.torche-opp-score { font-size: .85rem; opacity: .9; }
.torche-opp-hand { display: flex; gap: .35rem; align-items: center; font-weight: 700; }
.torche-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem; border-radius: 999px; background: rgba(255,255,255,.18); }
.torche-tag.amber { background: var(--t-amber); color: #2b1d00; }
.torche-mini-table { display: flex; gap: .3rem; }

/* ---------- Centre ---------- */
.torche-center { display: grid; gap: .5rem; justify-items: center; }
.torche-pile { min-height: calc(var(--t-ch) + 28px); display: flex; align-items: flex-end; justify-content: center; gap: .25rem; flex-wrap: wrap; }
.torche-pile-empty { border: 2px dashed rgba(255,255,255,.4); border-radius: 10px; padding: 1.4rem 1rem; font-size: .9rem; opacity: .85; text-align: center; max-width: 280px; }
.torche-play { display: grid; justify-items: center; gap: .15rem; opacity: .55; transform: scale(.82); transform-origin: bottom center; }
.torche-play.last { opacity: 1; transform: none; }
.torche-play.last .torche-card { box-shadow: 0 0 0 3px var(--t-amber), 0 4px 10px rgba(0,0,0,.4); }
.torche-play-cards { display: flex; }
.torche-play-cards .torche-card + .torche-card { margin-left: calc(var(--t-cw) * -.55); }
.torche-play-by { font-size: .72rem; opacity: .85; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.torche-info { display: flex; gap: .35rem .9rem; flex-wrap: wrap; justify-content: center; font-size: .82rem; opacity: .92; }
.torche-dir { font-size: 1.05rem; color: var(--t-amber); }
.torche-log { list-style: none; margin: 0; padding: .45rem .7rem; width: 100%; max-width: 620px; background: rgba(0,0,0,.22); border-radius: 10px; font-size: .86rem; min-height: 2.2rem; }
.torche-log li { opacity: .65; padding: .05rem 0; }
.torche-log li.new { opacity: 1; font-weight: 700; }
.torche-log li:nth-child(n+4) { display: none; }

/* ---------- Ma zone ---------- */
.torche-me { background: rgba(0,0,0,.2); border-radius: 12px; padding: .7rem; border: 2px solid transparent; display: grid; gap: .6rem; }
.torche-me.active { border-color: var(--t-amber); }
.torche-me-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.torche-status { margin-left: auto; font-weight: 800; color: var(--t-amber); }
.torche-me-zones { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.torche-zone.grow { flex: 1 1 320px; }
.torche-zone-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-bottom: .35rem; }
.torche-mytable { display: flex; gap: .5rem; }
.torche-slot { position: relative; width: var(--t-cw); height: calc(var(--t-ch) + 18px); }
.torche-slot > .torche-card { position: absolute; left: 0; top: 0; }
.torche-slot.has-up > .torche-card:not(.back) { top: 18px; }
.torche-slot.mini { width: 30px; height: 56px; }
.torche-slot.mini > .torche-card:not(.back) { top: 12px; }
.torche-slot-empty { display: block; width: var(--t-cw); height: var(--t-ch); border: 2px dashed rgba(255,255,255,.25); border-radius: 8px; }
.torche-slot-empty.mini { width: 30px; height: 44px; }
.torche-hand { display: flex; flex-wrap: wrap; gap: .3rem; padding-top: 12px; }
.torche-empty { margin: 0; opacity: .8; font-style: italic; }
.torche-actions { display: flex; justify-content: center; }
.torche-actions .torche-btn { min-width: min(100%, 320px); }

/* ---------- Cartes ---------- */
.torche-card {
  width: var(--t-cw); height: var(--t-ch); border-radius: 8px; background: var(--t-paper); border: 1px solid #d4cab2;
  box-shadow: 0 2px 4px rgba(0,0,0,.35); position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; margin: 0; font: inherit; color: #1b1b1b; flex: 0 0 auto; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.torche-card.red { color: var(--t-red); }
.torche-card .tc-r { position: absolute; top: 4px; left: 5px; font-weight: 800; font-size: .82rem; line-height: 1; display: flex; flex-direction: column; align-items: center; }
.torche-card .tc-r i { font-style: normal; font-size: .78rem; }
.torche-card .tc-r2 { top: auto; left: auto; bottom: 4px; right: 5px; transform: rotate(180deg); }
.torche-card .tc-c { font-size: 1.75rem; line-height: 1; }
.torche-card.fig .tc-c { font-size: 1.45rem; font-weight: 800; font-family: Georgia, 'Times New Roman', serif; }
.torche-card.fig { background: linear-gradient(160deg, #fffcf3 55%, #f6e7c4); }
.torche-card.back {
  background: repeating-linear-gradient(45deg, var(--t-amber-d) 0 5px, var(--t-amber) 5px 10px);
  border: 3px solid #fff8e6;
}
.torche-card.mini { width: 30px; height: 44px; border-radius: 5px; }
.torche-card.mini.back { border-width: 2px; }
.torche-card.mini .tc-r { top: 2px; left: 3px; font-size: .58rem; }
.torche-card.mini .tc-r i { font-size: .55rem; }
.torche-card.mini .tc-r2 { display: none; }
.torche-card.mini .tc-c { font-size: .95rem; margin-top: 8px; }
.torche-card.mini.fig .tc-c { font-size: .8rem; }

button.torche-card.playable { cursor: pointer; }
button.torche-card.playable:hover { transform: translateY(-5px); }
button.torche-card.playable:focus-visible { outline: 3px solid var(--t-amber); outline-offset: 2px; }
.torche-card.sel, button.torche-card.sel:hover { transform: translateY(-12px); box-shadow: 0 0 0 3px var(--t-amber), 0 8px 14px rgba(0,0,0,.45); }
.torche-slot > .torche-card.sel { z-index: 2; }
.torche-card.locked { filter: grayscale(.6) brightness(.8); cursor: not-allowed; }
.torche-card.pickup { filter: saturate(.55) brightness(.86); }
.torche-card.pickup::after, .torche-card.ten::after {
  position: absolute; top: -9px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.torche-card.pickup::after { content: '↑'; background: var(--t-amber); color: #2b1d00; }
.torche-card.ten::after { content: '🔥'; background: #fff3d6; }

/* ---------- Fenêtres ---------- */
.torche-overlay {
  position: absolute; inset: 0; background: rgba(20,35,24,.62); display: flex; align-items: flex-start; justify-content: center;
  padding: 1rem; z-index: 20; border-radius: var(--t-radius); overflow-y: auto;
}
.torche-overlay.solid { background: var(--t-felt-d); align-items: center; }
.torche-dialog {
  background: #fff; color: var(--t-ink); border-radius: var(--t-radius); padding: 1.25rem 1.4rem; max-width: 560px; width: 100%;
  box-shadow: 0 12px 34px rgba(0,0,0,.35); margin-top: 1.5rem; text-align: center;
}
.torche-dialog h3 { margin: 0 0 .5rem; color: var(--t-green-d); }
.torche-dialog h4 { margin: 1rem 0 .3rem; color: var(--t-green-d); }
.torche-dialog.rules { text-align: left; max-width: 680px; }
.torche-dialog.rules ul { padding-left: 1.2rem; margin: .3rem 0; }
.torche-dialog.rules p { margin: .3rem 0; }
.torche-dialog .torche-btn { margin-top: .8rem; }
.torche-dialog-btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.torche-loser { font-weight: 800; color: var(--t-red); font-size: 1.05rem; }
.torche-scores { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .95rem; }
.torche-scores th, .torche-scores td { padding: .4rem .5rem; border-bottom: 1px solid #e3e8e1; text-align: center; }
.torche-scores th:first-child, .torche-scores td:first-child { text-align: left; }
.torche-scores th { background: var(--t-green-l); color: var(--t-green-d); font-size: .82rem; }
.torche-scores tr.loser td { color: var(--t-red); font-weight: 700; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .torche { --t-cw: 44px; --t-ch: 64px; }
  .torche-title { font-size: 1.3rem; }
  .torche-board { padding: .6rem; gap: .7rem; }
  .torche-opp { min-width: 0; flex: 1 1 calc(50% - .6rem); padding: .4rem; }
  .torche-card .tc-c { font-size: 1.3rem; }
  .torche-card.fig .tc-c { font-size: 1.1rem; }
  .torche-card .tc-r { font-size: .7rem; }
  .torche-status { margin-left: 0; width: 100%; }
  .torche-actions .torche-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .torche-card, .torche-btn { transition: none; }
}

/* ---------- Animations (v1.2) ---------- */
.torche-card.pending { visibility: hidden; }
.torche-fly {
  position: absolute; z-index: 15; pointer-events: none; margin: 0;
  transition: transform .32s cubic-bezier(.2, .75, .3, 1);
}
.torche-card.landed { animation: torche-pop .22s ease-out; }
.torche-card.landed:not(.back) { animation: torche-flip .3s ease-out; }
@keyframes torche-pop { from { transform: scale(.82); } to { transform: none; } }
@keyframes torche-flip { from { transform: rotateY(90deg) scale(.9); } to { transform: none; } }

.torche-deck-wrap { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.torche-deck { position: relative; width: var(--t-cw); height: var(--t-ch); }
.torche-deck .torche-card { position: absolute; left: 0; top: 0; }
.torche-deck .torche-card:nth-child(1) { transform: translate(-4px, 4px); }
.torche-deck .torche-card:nth-child(2) { transform: translate(-2px, 2px); }
.torche-deck.empty .torche-card { opacity: .25; }
.torche-deck-count {
  position: absolute; right: -12px; top: -10px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px;
  background: #fff8e6; color: var(--t-green-d); font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.4); font-variant-numeric: tabular-nums;
}
.torche-btn.small { padding: .3rem .8rem; font-size: .82rem; }
.torche-board.dealing .torche-btn.ghost.small { background: rgba(255,255,255,.92); }

.torche-hand .torche-card.reveal { animation: torche-reveal .38s ease-out backwards; }
@keyframes torche-reveal { from { opacity: 0; transform: translateY(16px) rotateY(80deg); } to { opacity: 1; transform: none; } }

.torche-play.last.fresh .torche-card { animation: torche-drop .3s cubic-bezier(.2, .75, .3, 1); }
@keyframes torche-drop { from { opacity: .2; transform: translateY(-28px) scale(1.12) rotate(-6deg); } to { opacity: 1; transform: none; } }
.torche-pile-empty.burn { animation: torche-burn .8s ease-out; }
@keyframes torche-burn {
  0% { background: rgba(255, 140, 40, .75); border-color: #ffd36b; box-shadow: 0 0 30px rgba(255, 140, 40, .8); }
  100% { background: transparent; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .torche-card.landed, .torche-card.landed:not(.back), .torche-hand .torche-card.reveal,
  .torche-play.last.fresh .torche-card, .torche-pile-empty.burn { animation: none; }
  .torche-fly { transition: none; }
}

/* =====================================================================
 *  v1.3 — Cartes illustrées, effets spéciaux, plateau « bac à compost »
 * ===================================================================== */
.torche { --t-ch: 96px; --t-strata: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%0A%3Crect width='100' height='100' fill='%232f1d0e'/%3E%0A%3Cpath d='M0 0H100V80Q88 76 75 79T50 77T25 80T0 78Z' fill='%2345291a'/%3E%0A%3Cpath d='M0 0H100V58Q85 54 70 57T40 55T15 58T0 56Z' fill='%235e3a1f'/%3E%0A%3Cpath d='M0 0H100V34Q90 31 78 34T52 32T26 35T0 33Z' fill='%237b4e27'/%3E%0A%3Cpath d='M0 0H100V20Q86 17 72 20T45 18T20 21T0 19Z' fill='%238f6a2c'/%3E%0A%3Cpath d='M0 0H100V9Q87 7 74 9.5T48 8T22 10T0 8.5Z' fill='%234f7a2e'/%3E%0A%3C/svg%3E"); --t-decor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%0A%3Cg opacity='.55'%3E%0A%3Cpath d='M20 60q8-10 16 0t16 0' fill='none' stroke='%23e48a9a' stroke-width='3.5' stroke-linecap='round'/%3E%0A%3Cellipse cx='150' cy='40' rx='9' ry='4' transform='rotate%28-30 150 40%29' fill='%23c9772f'/%3E%0A%3Cellipse cx='175' cy='150' rx='8' ry='3.5' transform='rotate%2825 175 150%29' fill='%237da244'/%3E%0A%3Cpath d='M90 170l8-6 5 9z' fill='%23efe6cf'/%3E%0A%3Cpath d='M60 120q-6 12 2 22M60 120q6 10 0 20' fill='none' stroke='%23c9a46a' stroke-width='1.2'/%3E%0A%3Ccircle cx='120' cy='95' r='2' fill='%23a8763c'/%3E%3Ccircle cx='30' cy='190' r='1.6' fill='%23a8763c'/%3E%3Ccircle cx='200' cy='90' r='1.8' fill='%23a8763c'/%3E%0A%3Ccircle cx='130' cy='200' r='2.2' fill='%23d9b38c'/%3E%3Ccircle cx='80' cy='30' r='1.4' fill='%23d9b38c'/%3E%0A%3Cellipse cx='110' cy='140' rx='5' ry='2.4' transform='rotate%2870 110 140%29' fill='%23d0a24a'/%3E%0A%3C/g%3E%3C/svg%3E"); }
.torche-slot { height: calc(var(--t-ch) + 18px); }
.torche-slot.mini { width: 30px; height: 62px; }
.torche-slot-empty.mini { width: 30px; height: 50px; }
.torche-card.mini { width: 30px; height: 50px; }

/* Dos des cartes : votre verso illustré (rayures si absent) */
.torche-card.back {
  background-color: var(--t-amber);
  background-image: var(--t-art-back, none), repeating-linear-gradient(45deg, var(--t-amber-d) 0 5px, var(--t-amber) 5px 10px);
  background-size: cover, auto; background-position: center;
  border: 2px solid #f4e6c4;
}

/* Cartes illustrées (images fournies) et personnages SVG */
.torche-card.art { background-size: cover; background-position: center; border-color: #b9a27a; }
.torche-card.art-ten { background-image: var(--t-art-ten); }
.torche-card.art-d7 { background-image: var(--t-art-d7); }
.torche-card.art-h14 { background-image: var(--t-art-h14); background-position: center 30%; }
.torche-card .tc-art { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 7px; overflow: hidden; }
.torche-card.mini .tc-art { border-radius: 4px; }
.torche-card.art .tc-r, .torche-card.court .tc-r, .torche-card.spiral .tc-r, .torche-card.copper .tc-r {
  background: rgba(255, 250, 236, .93); border-radius: 4px; padding: 2px 2px 1px; top: 2px; left: 2px; z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.torche-card.art .tc-r2, .torche-card.court .tc-r2, .torche-card.spiral .tc-r2, .torche-card.copper .tc-r2 { top: auto; left: auto; bottom: 2px; right: 2px; }
.torche-card.mini.art .tc-r, .torche-card.mini.court .tc-r, .torche-card.mini.spiral .tc-r, .torche-card.mini.copper .tc-r { padding: 1px; top: 1px; left: 1px; }

/* Le 10 : la Torche — bord cuivré qui chauffe et reflet qui balaie la carte */
.torche-card.copper:not(.art) { background: linear-gradient(165deg, #fff6e2 0%, #f8d9a4 60%, #eeb36c 100%); }
.torche-card.copper {
  box-shadow: inset 0 0 0 2px #ffe2ad, inset 0 0 0 4px #b8652c, inset 0 0 12px 3px rgba(255, 120, 30, .55),
              0 0 9px 1px rgba(255, 140, 40, .5), 0 2px 4px rgba(0, 0, 0, .35);
  animation: torche-heat 2.2s ease-in-out infinite alternate;
}
.torche-card.mini.copper { box-shadow: inset 0 0 0 1.5px #ffe2ad, inset 0 0 0 3px #b8652c, 0 0 6px rgba(255, 140, 40, .6); animation: none; }
.torche-card.copper::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 238, 196, .6) 48%, rgba(255, 190, 110, .25) 53%, transparent 62%);
  background-size: 300% 100%; animation: torche-sheen 3.2s linear infinite;
}
.torche-card.copper .tc-flame { position: absolute; bottom: 10%; left: 50%; translate: -50% 0; width: 40%; }
.torche-card.copper .tc-flame svg { width: 100%; height: auto; display: block; }
.torche-card.copper:not(.art) .tc-c { margin-top: -30%; }
@keyframes torche-heat {
  to { box-shadow: inset 0 0 0 2px #fff3cf, inset 0 0 0 4px #e3893a, inset 0 0 18px 5px rgba(255, 150, 40, .8),
                   0 0 16px 4px rgba(255, 160, 50, .75), 0 2px 4px rgba(0, 0, 0, .35); }
}
@keyframes torche-sheen { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.torche-card.copper.sel { animation-name: torche-heat-sel; }
@keyframes torche-heat-sel {
  from { box-shadow: 0 0 0 3px var(--t-amber), inset 0 0 0 4px #b8652c, 0 8px 14px rgba(0,0,0,.45); }
  to { box-shadow: 0 0 0 3px var(--t-amber), inset 0 0 0 4px #e3893a, inset 0 0 18px 5px rgba(255,150,40,.8), 0 8px 14px rgba(0,0,0,.45); }
}

/* Le 7 de carreau : flèches en spirale du brassage */
.torche-card .tc-spiral {
  position: absolute; left: 50%; top: 52%; width: 66%; height: auto; translate: -50% -50%; z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); animation: torche-swirl 7s linear infinite;
}
.torche-card.spiral:not(.art) .tc-c { opacity: .35; }
.torche-card.spiral:not(.art) .tc-spiral path[stroke='#fff4dc'] { stroke: #d9822b; }
@keyframes torche-swirl { to { rotate: 360deg; } }
.torche-dir { display: inline-flex; vertical-align: middle; }
.torche-dir .tc-spiral { width: 20px; height: 20px; filter: none; }
.torche-dir.ccw .tc-spiral { scale: -1 1; }
.torche-dir.spin .tc-spiral { animation: torche-swirl .7s ease-out 2; }

/* Carte agrandie (cartes spéciales jouées, appui long / clic droit) */
.torche-spot {
  position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem; padding: 1rem; background: rgba(24, 14, 6, .62); cursor: pointer; animation: torche-fade .18s ease-out;
}
.torche-spot-card { animation: torche-spot-in .32s cubic-bezier(.2, .8, .3, 1.2); }
.torche-spot .torche-card.big { --t-cw: min(58vw, 240px); --t-ch: calc(var(--t-cw) * 1.66); width: var(--t-cw); height: var(--t-ch); border-radius: 14px; }
.torche-spot .torche-card.big .tc-art { border-radius: 14px; }
.torche-spot .torche-card.big .tc-r { font-size: 1.35rem; padding: 4px 5px 3px; border-radius: 7px; }
.torche-spot .torche-card.big .tc-r i { font-size: 1.2rem; }
.torche-spot .torche-card.big .tc-c { font-size: 6rem; }
.torche-spot .torche-card.big.copper { box-shadow: inset 0 0 0 3px #ffe2ad, inset 0 0 0 7px #b8652c, inset 0 0 26px 8px rgba(255,120,30,.6), 0 0 34px 8px rgba(255,140,40,.6); }
.torche-spot-title { margin: 0; text-align: center; color: #fff8e6; display: grid; gap: .15rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.torche-spot-title strong { font-size: 1.15rem; }
.torche-spot-title span { font-style: italic; color: #ffd38a; }
@keyframes torche-fade { from { opacity: 0; } }
@keyframes torche-spot-in { from { transform: scale(.55) rotate(-8deg); opacity: 0; } }

/* Plateau : l'intérieur d'un grand bac à compost vu en coupe */
.torche-board {
  border-radius: 6px; border: 14px solid #7f4f24;
  border-image: repeating-linear-gradient(180deg, #a36c37 0 24px, #8a5a2b 24px 27px, #3a2410 27px 31px) 14;
  background:
    radial-gradient(ellipse 50% 28% at 50% 46%, rgba(255, 150, 60, .32), transparent 72%),
    var(--t-decor) 0 0 / 220px 220px repeat,
    var(--t-strata) 0 0 / 100% 100% no-repeat,
    #3d2614;
  box-shadow: 0 8px 22px rgba(30, 18, 8, .35);
}
.torche-opp, .torche-me {
  background: rgba(28, 16, 7, .58); border: 2px dashed rgba(255, 236, 200, .45);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
}
.torche-opp.active, .torche-me.active { border: 2px solid var(--t-amber); background: rgba(70, 40, 10, .62); }
.torche-zone-tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: #ffe3b0; opacity: .8; }
.torche-me .torche-zone-tag { margin-bottom: -.3rem; }
.torche-heart-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; color: #ffcf86;
  text-shadow: 0 0 10px rgba(255, 140, 40, .8);
}
.torche-log { background: rgba(24, 14, 6, .6); }
.torche-info { background: rgba(24, 14, 6, .45); padding: .2rem .7rem; border-radius: 999px; }
.torche-pile-empty { border-color: rgba(255, 220, 170, .5); background: rgba(24, 14, 6, .35); }
.torche-zoomhint { display: block; width: 100%; text-align: center; font-size: .72rem; opacity: .7; margin-top: .35rem; }
.torche-actions { flex-wrap: wrap; }

@media (max-width: 640px) {
  .torche { --t-cw: 44px; --t-ch: 74px; }
  .torche-board { border-width: 9px; border-image-slice: 9; }
}
@media (prefers-reduced-motion: reduce) {
  .torche-card.copper, .torche-card.copper::before, .torche-card .tc-spiral, .torche-dir.spin .tc-spiral,
  .torche-spot, .torche-spot-card { animation: none; }
}
.torche-card.art.spiral .tc-spiral { width: 46%; top: 60%; opacity: .92; }

/* =====================================================================
 *  v1.4 — La mascotte de Compostons Ensemble
 * ===================================================================== */
.torche-mascot { display: block; height: auto; user-select: none; -webkit-user-drag: none; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.28)); }
.torche-bubble {
  position: relative; margin: 0; background: #fffaf0; color: var(--t-ink); border-radius: 14px; padding: .55rem .8rem;
  font-size: .9rem; font-weight: 600; line-height: 1.35; box-shadow: 0 2px 8px rgba(0,0,0,.18); border: 2px solid var(--t-amber);
}
.torche-bubble::before {
  content: ''; position: absolute; left: -10px; top: 50%; translate: 0 -50%; border: 8px solid transparent; border-right-color: var(--t-amber); border-left: 0;
}
/* Accueil (configuration) et en-tête des règles */
.torche-welcome { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.torche-welcome .m-welcome { width: 120px; flex: 0 0 auto; animation: torche-wiggle 3.5s ease-in-out infinite; transform-origin: 50% 90%; }
.torche-welcome.rules-head .m-welcome { width: 96px; }
@keyframes torche-wiggle { 0%, 100% { rotate: 0deg; } 50% { rotate: -3deg; } }
/* Commentateur sur le plateau */
.torche-commentary { display: flex; align-items: flex-end; gap: .6rem; width: 100%; max-width: 680px; }
.torche-commentary .m-talk { width: 78px; flex: 0 0 auto; margin-bottom: -4px; }
.torche-commentary .m-talk.hop { animation: torche-hop .6s cubic-bezier(.3, .7, .4, 1.4); }
@keyframes torche-hop { 0% { translate: 0 0; } 35% { translate: 0 -16px; rotate: -6deg; } 70% { translate: 0 0; rotate: 3deg; } 100% { rotate: 0deg; } }
.torche-commentary-text { flex: 1; min-width: 0; display: grid; gap: .4rem; }
.torche-commentary .torche-bubble { font-size: .85rem; padding: .4rem .7rem; justify-self: start; }
.torche-commentary .torche-bubble::before { top: auto; bottom: 10px; translate: 0 0; }
.torche-commentary .torche-log { max-width: none; }
.torche-board.dealing .torche-commentary { justify-content: center; align-items: center; }
/* Fenêtres : mascotte et conseil compost */
.torche-dialog .m-dialog { width: 92px; margin: -0.4rem auto .2rem; }
.torche-tip {
  margin: .9rem 0 0; padding: .6rem .8rem; background: var(--t-green-l); border-radius: 10px; font-size: .9rem; text-align: left;
  border-left: 4px solid var(--t-green);
}
.torche-tip strong { color: var(--t-green-d); }
@media (max-width: 640px) {
  .torche-welcome .m-welcome { width: 86px; }
  .torche-commentary .m-talk { width: 58px; }
  .torche-bubble { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .torche-welcome .m-welcome, .torche-commentary .m-talk.hop { animation: none; }
}

/* =====================================================================
 *  v1.6 — Plein écran et lien vers l'application Android
 * ===================================================================== */
.torche-btn.icon, .torche-btn.android { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.torche-btn.android { background: #3ddc84; color: #073042; }
.torche-btn.android:hover { background: #2bc56f; color: #073042; }
.torche:fullscreen, .torche.torche-full {
  max-width: none; width: 100%; height: 100%; margin: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #f3f6ef; padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
}
.torche:-webkit-full-screen { width: 100%; height: 100%; overflow-y: auto; background: #f3f6ef; padding: 10px; }
.torche.torche-full { position: fixed; inset: 0; z-index: 99990; }
html.torche-lock, html.torche-lock body { overflow: hidden; }
.torche:fullscreen .torche-overlay, .torche.torche-full .torche-overlay { position: fixed; }
@media (max-width: 640px) {
  .torche-btn.icon span, .torche-btn.android span { display: none; }
  .torche-btn.icon, .torche-btn.android { padding: .5rem .65rem; }
}
/* Affichage compact sur téléphone (site et application) */
@media (max-width: 640px) {
  .torche-sub { display: none; }
  .torche-header { margin-bottom: .5rem; gap: .4rem; }
  .torche-title { font-size: 1.15rem; }
  .torche-logo svg { width: 22px; height: 28px; }
  .torche-tools .torche-btn { padding: .38rem .7rem; font-size: .85rem; }
  .torche-board { gap: .5rem; padding: .45rem; }
  .torche-opps { flex-wrap: nowrap; gap: .35rem; }
  .torche-opp { flex: 1 1 0; min-width: 0; padding: .3rem .2rem; gap: .15rem; }
  .torche-opp .torche-zone-tag, .torche-opp .torche-tag:not(.amber) { display: none; }
  .torche-opp-head strong { font-size: .8rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .torche-opp-score, .torche-opp-hand { font-size: .72rem; }
  .torche-opp .torche-tag.amber { font-size: .55rem; padding: 0 .3rem; }
  .torche-mini-table { gap: 2px; }
  .torche-opp .torche-slot.mini, .torche-opp .torche-slot-empty.mini, .torche-opp .torche-card.mini { width: 22px; }
  .torche-opp .torche-card.mini, .torche-opp .torche-slot-empty.mini { height: 36px; }
  .torche-opp .torche-slot.mini { height: 46px; }
  .torche-opp .torche-slot.mini > .torche-card:not(.back) { top: 10px; }
  .torche-opp .torche-card.mini .tc-r { font-size: .5rem; }
  .torche-heart-label { font-size: .62rem; }
  .torche-pile { min-height: calc(var(--t-ch) + 18px); }
  .torche-pile-empty { padding: .8rem; font-size: .8rem; }
  .torche-info { font-size: .72rem; gap: .2rem .6rem; }
  .torche-commentary .m-talk { width: 46px; }
  .torche-log li:nth-child(n+3) { display: none; }
  .torche-me { padding: .5rem; gap: .4rem; }
  .torche-me .torche-zone-tag, .torche-zoomhint { display: none; }
}
/* Plein écran : tout le plateau tient dans l'écran */
.torche:fullscreen .torche-sub, .torche.torche-full .torche-sub,
.torche:fullscreen .torche-zoomhint, .torche.torche-full .torche-zoomhint,
.torche:fullscreen .torche-zone-tag, .torche.torche-full .torche-zone-tag { display: none; }
.torche:fullscreen .torche-header, .torche.torche-full .torche-header { margin-bottom: .4rem; }
.torche:fullscreen .torche-title, .torche.torche-full .torche-title { font-size: 1.25rem; }
.torche:fullscreen .torche-board, .torche.torche-full .torche-board { gap: .45rem; padding: .5rem .8rem; }
.torche:fullscreen .torche-opp, .torche.torche-full .torche-opp { padding: .3rem .55rem; gap: .15rem; }
.torche:fullscreen .torche-log li:nth-child(n+3), .torche.torche-full .torche-log li:nth-child(n+3) { display: none; }
.torche:fullscreen .torche-commentary .m-talk, .torche.torche-full .torche-commentary .m-talk { width: 56px; }
.torche:fullscreen .torche-me, .torche.torche-full .torche-me { padding: .45rem .7rem; gap: .35rem; }
.torche:fullscreen .torche-pile, .torche.torche-full .torche-pile { min-height: calc(var(--t-ch) + 10px); }
