/* =====================================================================
   SEBA — Feuille de style principale
   Mobile-first. Palette : noir #0D0D0D · mauve #6A0DAD · blanc #FFFFFF
   ===================================================================== */

:root {
  --black:        #0D0D0D;
  --black-soft:   #151517;
  --surface:      #1B1B1F;
  --surface-2:    #232329;
  --line:         #2E2E36;

  --violet:       #6A0DAD;
  --violet-500:   #7F2BD1;
  --violet-400:   #9A55E8;
  --violet-300:   #B98BF2;
  --violet-glow:  rgba(122, 40, 205, .35);

  --white:        #FFFFFF;
  --text:         #F4F2F8;
  --text-dim:     #A8A4B8;
  --text-faint:   #6F6B80;

  --green:        #2ECC71;
  --red:          #FF4D5E;
  --amber:        #FFB020;
  --blue:         #3DA5F5;

  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    22px;
  --shadow:       0 6px 24px rgba(0,0,0,.45);
  --shadow-soft:  0 2px 10px rgba(0,0,0,.3);
  --ease:         cubic-bezier(.22,.61,.36,1);

  --tabbar-h:     64px;
  --topbar-h:     56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--black);
  background-image:
    radial-gradient(900px 500px at 50% -10%, rgba(106,13,173,.20), transparent 60%),
    radial-gradient(600px 400px at 100% 100%, rgba(106,13,173,.10), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

a { color: var(--violet-300); text-decoration: none; }
a:hover { color: var(--violet-400); }

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 .75rem; }

.muted   { color: var(--text-dim); }
.faint   { color: var(--text-faint); }
.small   { font-size: .82rem; }
.tiny    { font-size: .74rem; }
.center  { text-align: center; }
.right   { text-align: right; }
.bold    { font-weight: 700; }
.mono    { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mt      { margin-top: 1rem; }
.mt-sm   { margin-top: .5rem; }
.mb      { margin-bottom: 1rem; }
.nowrap  { white-space: nowrap; }
.ellipsis{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hidden  { display: none !important; }
.full    { width: 100%; }

/* ------------------------------------------------------------------ */
/* Barre supérieure                                                    */
/* ------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem;
  height: var(--topbar-h);
  padding: 0 .9rem;
  padding-top: env(safe-area-inset-top);
  background: rgba(13,13,13,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--white); font-weight: 800; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(140deg, var(--violet-400), var(--violet));
  box-shadow: 0 4px 14px var(--violet-glow);
  font-size: .95rem; color: #fff;
}
.brand-name { font-size: 1.05rem; letter-spacing: .06em; }
.topbar-right { display: flex; align-items: center; gap: .45rem; }

.balance-chip {
  display: inline-flex; align-items: baseline; gap: .25rem;
  padding: .34rem .6rem; border-radius: 999px;
  background: linear-gradient(140deg, rgba(106,13,173,.30), rgba(106,13,173,.12));
  border: 1px solid rgba(154,85,232,.35);
  color: var(--white); font-weight: 700; font-size: .86rem;
}
.balance-cur { font-size: .66rem; color: var(--violet-300); font-weight: 600; }

.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-dim);
}
.icon-btn:hover { color: var(--white); border-color: var(--violet-500); }
.icon-btn-admin {
  background: linear-gradient(140deg, rgba(106,13,173,.45), rgba(106,13,173,.18));
  border-color: rgba(154,85,232,.55); color: var(--violet-300);
}
.icon-btn-admin:hover { color: #fff; }
.avatar {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 10px; font-weight: 800; font-size: .82rem;
  background: linear-gradient(140deg, var(--violet-400), var(--violet));
  color: #fff;
}
.badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: .62rem; font-weight: 800;
  border: 2px solid var(--black);
}

/* ------------------------------------------------------------------ */
/* Contenu                                                             */
/* ------------------------------------------------------------------ */
.page { max-width: 760px; margin: 0 auto; padding: 1rem .9rem 2rem; }
.page-wide { max-width: 1180px; }

.card {
  background: linear-gradient(160deg, var(--surface), var(--black-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: .85rem;
  animation: rise .35s var(--ease) both;
}
.card-tight { padding: .75rem .85rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: .7rem;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-accent { border-color: rgba(154,85,232,.4); box-shadow: 0 0 0 1px rgba(154,85,232,.10), var(--shadow-soft); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop  { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.grid { display: grid; gap: .7rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 620px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.row { display: flex; align-items: center; gap: .6rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* Statistiques */
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .75rem; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.stat-value { font-size: 1.15rem; font-weight: 800; margin-top: .15rem; }
.stat-value.violet { color: var(--violet-300); }
.stat-value.green  { color: var(--green); }
.stat-value.red    { color: var(--red); }

/* ------------------------------------------------------------------ */
/* Boutons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px; padding: .6rem 1.1rem;
  border: 0; border-radius: 999px;
  background: linear-gradient(140deg, var(--violet-500), var(--violet));
  color: #fff; font-size: .95rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-align: center;
  box-shadow: 0 6px 18px var(--violet-glow);
  transition: transform .12s var(--ease), box-shadow .2s var(--ease), opacity .2s;
}
.btn:hover  { color: #fff; box-shadow: 0 8px 24px var(--violet-glow); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 36px; padding: .35rem .8rem; font-size: .83rem; }
.btn-lg { min-height: 54px; font-size: 1.02rem; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--violet-500); color: var(--white); }
.btn-danger  { background: linear-gradient(140deg, #ff5f6d, #d4283a); box-shadow: 0 6px 18px rgba(255,77,94,.28); }
.btn-success { background: linear-gradient(140deg, #34d17e, #14a55a); box-shadow: 0 6px 18px rgba(46,204,113,.25); }
.btn-outline { background: transparent; border: 1px solid var(--violet-500); color: var(--violet-300); box-shadow: none; }

/* ------------------------------------------------------------------ */
/* Formulaires                                                         */
/* ------------------------------------------------------------------ */
.field { margin-bottom: .85rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-dim); margin-bottom: .3rem; }
.input, input[type=text], input[type=tel], input[type=password], input[type=number], input[type=email], input[type=search], select, textarea {
  width: 100%; min-height: 48px;
  padding: .7rem .85rem;
  background: var(--black-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 16px; font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 90px; resize: vertical; }
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--violet-500);
  box-shadow: 0 0 0 3px rgba(106,13,173,.22);
}
.input::placeholder { color: var(--text-faint); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A8A4B8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 20px; padding-right: 2.2rem; }
.hint { font-size: .75rem; color: var(--text-faint); margin-top: .25rem; }
.field-error { color: var(--red); font-size: .78rem; margin-top: .25rem; }

.otp-input { letter-spacing: .8em; text-align: center; font-size: 1.5rem !important; font-weight: 800; padding-left: .8em; }

.check {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer;
}
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--violet-400); flex: 0 0 auto; }
.check span { font-size: .87rem; }
.check.is-on { border-color: var(--violet-500); }

/* Sélecteur de mise */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  padding: .5rem .85rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-weight: 700; font-size: .87rem; cursor: pointer;
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--violet-500); }
.chip.is-active {
  background: linear-gradient(140deg, var(--violet-500), var(--violet));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px var(--violet-glow);
}

/* Alertes */
.alert {
  padding: .7rem .85rem; border-radius: var(--radius-sm);
  margin-bottom: .8rem; font-size: .88rem;
  border: 1px solid; animation: pop .3s var(--ease) both;
}
.alert-success { background: rgba(46,204,113,.12); border-color: rgba(46,204,113,.4); color: #8ef0b8; }
.alert-error   { background: rgba(255,77,94,.12);  border-color: rgba(255,77,94,.4);  color: #ffb0b8; }
.alert-warning { background: rgba(255,176,32,.12); border-color: rgba(255,176,32,.4); color: #ffd68f; }
.alert-info    { background: rgba(61,165,245,.12); border-color: rgba(61,165,245,.4); color: #a8d6ff; }

/* Badges d'état */
.tag {
  display: inline-block; padding: .18rem .55rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
}
.tag-win     { background: rgba(46,204,113,.15); border-color: rgba(46,204,113,.4); color: #8ef0b8; }
.tag-loss    { background: rgba(255,77,94,.15);  border-color: rgba(255,77,94,.4);  color: #ffb0b8; }
.tag-draw    { background: rgba(255,176,32,.15); border-color: rgba(255,176,32,.4); color: #ffd68f; }
.tag-pending { background: rgba(61,165,245,.15); border-color: rgba(61,165,245,.4); color: #a8d6ff; }
.tag-violet  { background: rgba(154,85,232,.16); border-color: rgba(154,85,232,.45); color: var(--violet-300); }

/* Listes */
.list { display: flex; flex-direction: column; gap: .5rem; }
.list-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .8rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.list-item .title { font-weight: 700; font-size: .92rem; }
.list-item .sub   { font-size: .76rem; color: var(--text-faint); }
.list-item.is-unread { border-color: rgba(154,85,232,.45); background: rgba(106,13,173,.10); }

.empty { text-align: center; padding: 2rem 1rem; color: var(--text-faint); }
.empty svg { opacity: .35; margin-bottom: .5rem; }

/* Tableaux (admin) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 520px; }
th, td { padding: .6rem .65rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); position: sticky; top: 0; }
tbody tr:hover { background: rgba(106,13,173,.08); }
tbody tr:last-child td { border-bottom: 0; }

/* Barre d'onglets */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(19,19,21,.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-faint); font-size: .64rem; font-weight: 600;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--violet-300); }
.tab.active svg { filter: drop-shadow(0 0 8px var(--violet-glow)); }

.site-footer { text-align: center; padding: 1rem .9rem 1.4rem; color: var(--text-faint); font-size: .72rem; }
.footer-links a { color: var(--text-dim); }

/* ------------------------------------------------------------------ */
/* Damier                                                              */
/* ------------------------------------------------------------------ */
.board-wrap { display: flex; justify-content: center; margin: .3rem 0 .8rem; }
.board {
  position: relative;
  width: min(94vw, 460px); aspect-ratio: 1;
  display: grid;
  border-radius: 12px; overflow: hidden;
  border: 2px solid var(--violet); box-shadow: 0 10px 34px rgba(0,0,0,.6), 0 0 0 4px rgba(106,13,173,.14);
  touch-action: manipulation; user-select: none;
}
/* Damier : contraste maximal, palette classique du jeu de dames.
   Le mauve de la marque est réservé à l'interface, jamais aux pions. */
.sq { position: relative; display: grid; place-items: center; }
.sq-light { background: #F2E4C8; }   /* crème */
.sq-dark  { background: #6B4226; }   /* bois foncé */
.sq-num   { position: absolute; top: 1px; left: 3px; font-size: 8px; color: rgba(255,255,255,.42); pointer-events: none; }

.pc {
  width: 78%; height: 78%; border-radius: 50%;
  display: grid; place-items: center;
  transition: transform .18s var(--ease), box-shadow .18s;
  will-change: transform;
}
/* Blancs : ivoire — Noirs : rouge vif. Lisibles sur les deux couleurs de case. */
.pc-w {
  background: radial-gradient(circle at 32% 28%, #ffffff, #f0ead9 60%, #c9bfa6);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.22), 0 3px 7px rgba(0,0,0,.5);
  border: 2px solid #8d8271;
}
.pc-b {
  background: radial-gradient(circle at 32% 28%, #ff6b5e, #d92020 60%, #8e1010);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 3px 7px rgba(0,0,0,.5);
  border: 2px solid #6d0f0f;
}
/* Dame : couronne dorée en relief + liseré or épais. Une dame doit se
   reconnaître d'un coup d'œil, sur petit écran comme de loin — l'ancienne
   étoile se confondait avec un simple reflet sur le pion. */
.pc-k {
  border-width: 3px;
  border-color: #FFC83D;
}
.pc-k::after {
  content: "";
  width: 66%; height: 66%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 27'%3E%3Cpath d='M3 8.4 10.2 14.2 16 3.6l5.8 10.6L29 8.4l-2.1 12H5.1z' fill='%23FFC83D' stroke='%234A2D00' stroke-width='1.9' stroke-linejoin='round'/%3E%3Crect x='4.6' y='20.4' width='22.8' height='4.4' rx='1.7' fill='%23FFC83D' stroke='%234A2D00' stroke-width='1.7'/%3E%3Ccircle cx='3' cy='7.2' r='2.5' fill='%23FFE08A' stroke='%234A2D00' stroke-width='1.7'/%3E%3Ccircle cx='16' cy='2.6' r='2.5' fill='%23FFE08A' stroke='%234A2D00' stroke-width='1.7'/%3E%3Ccircle cx='29' cy='7.2' r='2.5' fill='%23FFE08A' stroke='%234A2D00' stroke-width='1.7'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55));
  pointer-events: none;
}
/* Le pion ivoire est clair : on assombrit légèrement son fond sous la
   couronne pour que l'or ressorte autant que sur le pion rouge. */
.pc-w.pc-k { border-color: #E0A81C; }
.pc-mine { cursor: pointer; }
.pc-sel  { transform: scale(1.1); box-shadow: 0 0 0 3px var(--violet-400), 0 4px 12px rgba(0,0,0,.5); }
.pc-drop { animation: pop .2s var(--ease) both; }

.sq-src::after {
  content: ""; position: absolute; inset: 6%;
  border: 3px dashed rgba(20,120,60,.9); border-radius: 8px;
}
.sq-target { cursor: pointer; }
.sq-target::after {
  content: ""; position: absolute;
  width: 34%; height: 34%; border-radius: 50%;
  background: rgba(23,170,86,.95);
  box-shadow: 0 0 0 3px rgba(255,255,255,.55), 0 0 14px rgba(23,170,86,.8);
  animation: pulse 1.4s infinite;
}
.sq-capture::after { background: rgba(214,32,32,.95); box-shadow: 0 0 0 3px rgba(255,255,255,.55), 0 0 14px rgba(214,32,32,.8); }
.sq-last  { box-shadow: inset 0 0 0 4px rgba(255,193,7,.85); }
.sq-doomed .pc { opacity: .4; filter: grayscale(.6); }
.pc-sel { transform: scale(1.12); box-shadow: 0 0 0 4px #17AA56, 0 4px 12px rgba(0,0,0,.5); }

/* ------------------------------------------------------------------ */
/* Bandeaux joueurs : qui joue, et combien de temps il lui reste       */
/* ------------------------------------------------------------------ */
.player-bar {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 2px solid var(--line);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
/* Le joueur au trait est nettement mis en avant */
.player-bar.is-turn {
  border-color: #17AA56;
  background: rgba(23,170,86,.10);
  box-shadow: 0 0 0 3px rgba(23,170,86,.18);
}
.player-dot { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; border: 2px solid rgba(0,0,0,.35); }
.player-dot.w { background: radial-gradient(circle at 32% 28%, #fff, #e6dfcc); }
.player-dot.b { background: radial-gradient(circle at 32% 28%, #ff6b5e, #c81c1c); }

/* Étiquette « à lui de jouer » dans le bandeau */
.turn-flag {
  font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: .12rem .45rem; border-radius: 999px;
  background: #17AA56; color: #fff; white-space: nowrap;
}
.player-bar:not(.is-turn) .turn-flag { display: none; }

/* Chronomètre présent sur CHAQUE bandeau */
.timer {
  font-variant-numeric: tabular-nums; font-weight: 900; font-size: 1.6rem;
  min-width: 3.4rem; text-align: right; letter-spacing: -.02em;
  color: var(--text-faint);
}
.timer .unit { font-size: .7rem; font-weight: 700; margin-left: .1rem; color: var(--text-faint); }
.player-bar.is-turn .timer { color: #35D07F; }
.timer.warn   { color: var(--amber) !important; }
.timer.danger { color: var(--red) !important; animation: pulse .7s infinite; }

.timer-bar { height: 6px; border-radius: 999px; background: var(--black-soft); overflow: hidden; margin-top: .35rem; border: 1px solid var(--line); }
.timer-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #35D07F, #17AA56); transition: width .35s linear; }
.timer-bar.warn   > i { background: linear-gradient(90deg, #ffd27a, var(--amber)); }
.timer-bar.danger > i { background: linear-gradient(90deg, #ff8a94, var(--red)); }

/* Alerte de connexion pendant une partie */
.conn-state {
  margin: .5rem 0; padding: .6rem .8rem;
  border-radius: var(--radius-sm); text-align: center; font-size: .86rem; font-weight: 600;
  background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.55); color: #ffd68f;
}

/* Bandeau principal : à qui de jouer */
.turn-banner {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin: .6rem 0; padding: .7rem 1rem;
  border-radius: 999px; font-weight: 800; font-size: 1rem;
  border: 2px solid transparent; text-align: center;
}
.turn-banner.mine {
  background: linear-gradient(140deg, rgba(23,170,86,.25), rgba(23,170,86,.12));
  border-color: #17AA56; color: #7BE8A8;
}
.turn-banner.theirs {
  background: var(--surface-2); border-color: var(--line); color: var(--text-dim);
}
.turn-banner .dot-live {
  width: 10px; height: 10px; border-radius: 50%; background: currentColor;
  animation: pulse 1.2s infinite;
}

/* ------------------------------------------------------------------ */
/* Modale de fin de partie                                             */
/* ------------------------------------------------------------------ */
.result-modal { text-align: center; }
.result-icon {
  width: 78px; height: 78px; margin: 0 auto .6rem;
  border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem;
}
.result-win  { background: rgba(46,204,113,.16); border: 2px solid rgba(46,204,113,.6); }
.result-loss { background: rgba(255,77,94,.14);  border: 2px solid rgba(255,77,94,.55); }
.result-draw { background: rgba(255,176,32,.14); border: 2px solid rgba(255,176,32,.55); }

.result-title { font-size: 1.6rem; font-weight: 900; margin: 0 0 .15rem; }
.result-title.win  { color: #35D07F; }
.result-title.loss { color: #FF6B78; }
.result-title.draw { color: var(--amber); }
.result-reason { color: var(--text-dim); font-size: .9rem; margin-bottom: .9rem; }

.result-amount {
  font-size: 2.4rem; font-weight: 900; letter-spacing: -.02em;
  margin: .2rem 0 .1rem; line-height: 1.1;
}
.result-amount.win  { color: #35D07F; }
.result-amount.loss { color: #FF6B78; }
.result-amount.draw { color: var(--amber); }
.result-amount .cur { font-size: 1rem; font-weight: 700; }

.result-balance {
  margin: .9rem 0; padding: .8rem;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.result-balance .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.result-balance .val { font-size: 1.5rem; font-weight: 900; margin-top: .1rem; }

.result-detail { text-align: left; font-size: .86rem; }
.result-detail summary { cursor: pointer; color: var(--text-dim); font-size: .82rem; }

/* Résumé financier avant partie */
.breakdown { display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; }
.breakdown .line { display: flex; justify-content: space-between; }
.breakdown .line.total { border-top: 1px dashed var(--line); padding-top: .4rem; margin-top: .2rem; font-weight: 800; color: var(--green); }

/* Modale */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.72); backdrop-filter: blur(4px);
  display: grid; place-items: end center;
  animation: pop .2s var(--ease) both;
}
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.1rem 1rem calc(1.4rem + env(safe-area-inset-bottom));
  max-height: 88dvh; overflow-y: auto;
}
@media (min-width: 640px) {
  .modal-backdrop { place-items: center; }
  .modal { border-radius: var(--radius-lg); }
}
.modal h2 { margin-bottom: .6rem; }
.modal-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.modal-actions .btn { flex: 1; }

/* Règles du jeu */
.rules-box { max-height: 42vh; overflow-y: auto; padding-right: .3rem; font-size: .87rem; }
.rules-box h4 { color: var(--violet-300); margin: .9rem 0 .3rem; }
.rules-box ul { margin: 0 0 .4rem; padding-left: 1.1rem; }
.rules-box li { margin-bottom: .22rem; }

/* Recherche d'adversaire */
.searching { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 1.4rem 0; }
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(154,85,232,.25); border-top-color: var(--violet-400);
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-host { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px); transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: .4rem; width: min(92vw, 420px); }
.toast { padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--violet-500); box-shadow: var(--shadow); font-size: .87rem; animation: pop .22s var(--ease) both; }
.toast.err { border-color: var(--red); }
.toast.ok  { border-color: var(--green); }

/* Classement */
.rank-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.rank-pos { width: 30px; text-align: center; font-weight: 900; color: var(--text-faint); }
.rank-row.top1 .rank-pos { color: #FFD700; }
.rank-row.top2 .rank-pos { color: #C0C0C0; }
.rank-row.top3 .rank-pos { color: #CD7F32; }
.rank-row.is-me { border-color: var(--violet-500); background: rgba(106,13,173,.14); }

/* Tournoi */
.bracket { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .5rem; }
.bracket-round { min-width: 200px; display: flex; flex-direction: column; gap: .5rem; justify-content: space-around; }
.bracket-round h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.match { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .6rem; font-size: .82rem; }
.match .side { display: flex; justify-content: space-between; gap: .5rem; padding: .12rem 0; }
.match .side.win { color: var(--green); font-weight: 700; }

/* Admin */
/* Une valeur longue et sans espace (règles d'un jeu en JSON, clé d'API…)
   élargissait la ligne entière et faisait défiler toute la page vers la
   droite sur téléphone. On l'autorise à revenir à la ligne. */
.list-item > div { min-width: 0; }
.list-item .title, .list-item .sub, .list-item .mono { overflow-wrap: anywhere; }

.admin-nav { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .8rem; }
.admin-nav a {
  padding: .42rem .8rem; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-dim); font-size: .82rem; font-weight: 600;
}
.admin-nav a.active { background: linear-gradient(140deg, var(--violet-500), var(--violet)); color: #fff; border-color: transparent; }

.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-dim); font-size: .84rem; font-weight: 600;
}
.pagination .current { background: var(--violet); color: #fff; border-color: transparent; }

/* Page d'accueil publique */
.hero { text-align: center; padding: 2rem 0 1.2rem; }
.hero h1 { font-size: 2rem; background: linear-gradient(120deg, #fff, var(--violet-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); max-width: 34ch; margin: 0 auto 1.2rem; }
.feature { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 0; }
.feature-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: rgba(106,13,173,.2); color: var(--violet-300); }

@media (min-width: 640px) {
  body { font-size: 15.5px; }
  .grid-2 { gap: .8rem; }
  h1 { font-size: 1.7rem; }
}

/* ==================================================================== */
/* THÈME CLAIR                                                          */
/* -------------------------------------------------------------------- */
/* Le thème sombre reste celui par défaut. Le thème clair ne redéfinit   */
/* que les variables de couleur, puis quelques rares endroits où une     */
/* teinte avait été écrite en dur. Le damier, lui, ne change pas : ses   */
/* couleurs bois/crème et les pions ivoire/rouge sont déjà lisibles sur  */
/* les deux fonds, et un joueur ne doit pas avoir à se réhabituer.       */
/* ==================================================================== */
[data-theme="light"] {
  --black:        #F1EDF7;
  --black-soft:   #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #F6F3FC;
  --line:         #E2DCEF;

  --violet:       #6A0DAD;
  --violet-500:   #7B22C9;
  --violet-400:   #7A22C9;
  --violet-300:   #5C0C97;
  --violet-glow:  rgba(106,13,173,.22);

  --white:        #17131F;
  --text:         #1B1725;
  --text-dim:     #56506A;
  --text-faint:   #837C97;

  --green:        #12924B;
  --red:          #D42A3C;
  --amber:        #9B5C05;
  --blue:         #1A62C8;

  --shadow:       0 8px 26px rgba(38,22,66,.13);
  --shadow-soft:  0 2px 10px rgba(38,22,66,.08);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(900px 500px at 50% -10%, rgba(106,13,173,.10), transparent 60%),
    radial-gradient(600px 400px at 100% 100%, rgba(106,13,173,.06), transparent 60%);
}

[data-theme="light"] .topbar { background: rgba(255,255,255,.86); }
[data-theme="light"] .tabbar { background: rgba(255,255,255,.94); }
[data-theme="light"] .badge  { border-color: #FFFFFF; }

[data-theme="light"] .balance-chip {
  background: linear-gradient(140deg, rgba(106,13,173,.14), rgba(106,13,173,.05));
  border-color: rgba(106,13,173,.26);
  color: #3C0A66;
}
[data-theme="light"] .icon-btn-admin {
  background: linear-gradient(140deg, rgba(106,13,173,.16), rgba(106,13,173,.06));
  border-color: rgba(106,13,173,.32);
}
[data-theme="light"] .icon-btn-admin:hover { color: var(--violet); }

[data-theme="light"] .btn-danger  { background: linear-gradient(140deg, #E4485A, #BE1F31); }
[data-theme="light"] .btn-success { background: linear-gradient(140deg, #23B96B, #0E8A4A); }

[data-theme="light"] .alert-success { color: #0D6437; }
[data-theme="light"] .alert-error   { color: #9E1524; }
[data-theme="light"] .alert-warning { color: #7A4705; }
[data-theme="light"] .alert-info    { color: #134D8C; }
[data-theme="light"] .tag-win     { color: #0D6437; }
[data-theme="light"] .tag-loss    { color: #9E1524; }
[data-theme="light"] .tag-draw    { color: #7A4705; }
[data-theme="light"] .tag-pending { color: #134D8C; }

[data-theme="light"] .conn-state {
  background: rgba(255,176,32,.16); border-color: rgba(155,92,5,.45); color: #7A4705;
}
[data-theme="light"] .turn-banner.mine { color: #0C6E3B; }
[data-theme="light"] .player-bar.is-turn .timer { color: #0C6E3B; }
[data-theme="light"] .result-title.win,  [data-theme="light"] .result-amount.win  { color: #0E7C45; }
[data-theme="light"] .result-title.loss, [data-theme="light"] .result-amount.loss { color: #BE2233; }

[data-theme="light"] .modal-backdrop { background: rgba(28,18,44,.42); }
[data-theme="light"] .toast { background: #FFFFFF; }
[data-theme="light"] .board {
  box-shadow: 0 10px 30px rgba(38,22,66,.20), 0 0 0 4px rgba(106,13,173,.10);
}
[data-theme="light"] .hero h1 {
  background: linear-gradient(120deg, #1B1725, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .feature-icon { background: rgba(106,13,173,.10); }
[data-theme="light"] tbody tr:hover { background: rgba(106,13,173,.06); }
[data-theme="light"] .rank-row.is-me { background: rgba(106,13,173,.07); }
[data-theme="light"] .list-item.is-unread { background: rgba(106,13,173,.06); }
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2356506A'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}
[data-theme="light"] .spinner { border-color: rgba(106,13,173,.18); border-top-color: var(--violet); }

/* Bouton de bascule : on n'affiche que l'icône de la destination */
.theme-toggle .i-sun  { display: none; }
.theme-toggle .i-moon { display: block; }
[data-theme="light"] .theme-toggle .i-sun  { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }
button.icon-btn { padding: 0; font: inherit; cursor: pointer; }
.theme-toggle svg { display: block; }

/* ==================================================================== */
/* AMIS, PRÉSENCE ET MESSAGES DE PARTIE                                 */
/* ==================================================================== */

/* La barre d'onglets accueille un onglet de plus : on resserre les
   libellés plutôt que d'en sacrifier un. */
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .tab { font-size: .6rem; } .tab svg { width: 19px; height: 19px; } }
.tab-badge { top: 6px; right: 50%; margin-right: -22px; }

/* Voyant de présence : vert plein en ligne, gris creux hors ligne */
.presence {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
  background: transparent; border: 2px solid var(--text-faint);
}
.presence.is-on {
  background: #2ECC71; border-color: #2ECC71;
  box-shadow: 0 0 0 3px rgba(46,204,113,.18);
}
.friend-row { align-items: center; }

/* ------------------------------------------------------------------ */
/* Messages pendant la partie                                          */
/* ------------------------------------------------------------------ */
/* Le principe : une icône, une feuille de choix, et une bulle qui
   apparaît au-dessus de l'AUTEUR chez les deux joueurs puis s'efface.
   Pas de journal : pendant une partie, l'écran d'un téléphone est trop
   étroit pour qu'on y sacrifie dix lignes à des messages déjà lus. */

/* Icône de messagerie, dans la barre de commandes de la partie.
   Elle y est TOUJOURS visible et ne recouvre rien — un bouton flottant en
   bas d'écran masquait le chronomètre du joueur, ce qui est inacceptable
   dans une partie au temps compté. */
.icon-btn-chat {
  background: linear-gradient(140deg, var(--violet-500), var(--violet));
  border-color: rgba(154,85,232,.55); color: #fff; font-size: 1.05rem;
}
.icon-btn-chat:hover { color: #fff; }
.icon-btn-chat.is-off { background: var(--surface); color: var(--text-faint); border-color: var(--line); }
.icon-btn-chat.has-new::after {
  content: ""; position: absolute; top: -3px; right: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--black);
}

/* Feuille de choix */
.chat-modal { max-width: 460px; }
.chat-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; margin-bottom: .6rem;
}
.chat-list { display: flex; flex-direction: column; gap: .35rem; max-height: 46vh; overflow-y: auto; }
.chat-send {
  padding: .5rem .7rem; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: .88rem; font-family: inherit;
  transition: border-color .15s, transform .1s, background .15s;
}
.chat-send .ico { margin-right: .45rem; }
.chat-send:hover  { border-color: var(--violet-500); }
.chat-send:active { transform: scale(.97); }
.chat-send.emoji  { font-size: 1.5rem; padding: .35rem 0; text-align: center; border-radius: 14px; }
.chat-send[disabled] { opacity: .45; pointer-events: none; }

/* Bouton de coupure des messages */
.chat-toggle {
  background: none; border: 0; color: var(--text-faint);
  font: inherit; font-size: .74rem; cursor: pointer; text-decoration: underline;
}

/* Bulle éphémère, ancrée sur la barre de son auteur */
.speech {
  position: absolute; left: 12px; bottom: calc(100% + 6px); z-index: 5;
  max-width: 82%; padding: .4rem .7rem;
  border-radius: 14px 14px 14px 4px;
  background: #FFF8E6; color: #2A2118;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  font-size: .88rem; font-weight: 600; line-height: 1.3;
  animation: speechIn .18s ease-out;
}
.speech.mine { left: auto; right: 12px; border-radius: 14px 14px 4px 14px; }
.speech::after {
  content: ""; position: absolute; bottom: -7px; left: 14px;
  border: 7px solid transparent; border-top-color: #FFF8E6; border-bottom: 0;
}
.speech.mine::after { left: auto; right: 14px; }
.speech .ico { margin-right: .3rem; font-size: 1.05rem; }
.speech.leaving { opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
@keyframes speechIn {
  from { opacity: 0; transform: translateY(6px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ */
/* Pions restants                                                      */
/* ------------------------------------------------------------------ */
/* Compter les pions de l'adversaire à l'œil, sur un damier 10x10 et sur
   un téléphone, est pénible et source d'erreur : on l'affiche. */
.pieces {
  display: flex; align-items: center; gap: .28rem; flex: 0 0 auto;
  padding: .22rem .5rem .22rem .34rem; border-radius: 999px;
  background: var(--black-soft); border: 1px solid var(--line);
}
.pc-mini {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.35); flex: 0 0 auto;
}
.pc-mini.w { background: radial-gradient(circle at 32% 28%, #fff, #e6dfcc); }
.pc-mini.b { background: radial-gradient(circle at 32% 28%, #ff6b5e, #c81c1c); }
.pc-n { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pc-k {
  font-size: .66rem; font-weight: 800; color: #2A2118;
  background: #FFC83D; border-radius: 999px; padding: .04rem .3rem;
}
.pc-k::before { content: "♛"; margin-right: .12rem; }
.pieces.low .pc-n { color: var(--red); }

.player-bar { position: relative; }

/* ------------------------------------------------------------------ */
/* Revanche                                                            */
/* ------------------------------------------------------------------ */
.rematch-box {
  margin: .8rem 0 0; padding: .75rem .8rem;
  border-radius: var(--radius-sm);
  background: rgba(46,204,113,.10); border: 1px solid rgba(46,204,113,.45);
  text-align: center; font-size: .9rem;
}
.rematch-box .row { justify-content: center; margin-top: .5rem; }
.rematch-wait { color: var(--text-dim); font-size: .85rem; }

.warn { color: var(--amber); }

/* =====================================================================
   LES ALERTES VIVANTES
   ---------------------------------------------------------------------
   Une demande d'ami et un défi n'ont pas la même urgence, et ne doivent
   donc pas avoir la même présence à l'écran :

     · une notification ordinaire glisse en haut, quelques secondes ;
     · un DÉFI reste, avec ses deux boutons et son compte à rebours. Il
       expire et il engage de l'argent : le manquer coûte réellement
       quelque chose.

   La pile est en position fixe et laisse passer les clics partout où
   elle n'affiche rien : elle ne doit jamais bloquer la page en dessous.
   ===================================================================== */
.al-pile {
  position: fixed; z-index: 90;
  top: calc(var(--topbar-h) + 8px); left: 50%; transform: translateX(-50%);
  width: min(94vw, 460px);
  display: grid; gap: .5rem;
  pointer-events: none;
}
.al-pile > * { pointer-events: auto; }

/* ---------------------- Le bandeau ordinaire ---------------------- */
.al-toast {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .7rem; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: al-entre .28s var(--ease) both;
}
.al-toast.cliquable { cursor: pointer; }
.al-toast .al-ico { font-size: 1.1rem; line-height: 1; }
.al-toast .al-txt { flex: 1; min-width: 0; font-size: .84rem; line-height: 1.25; }
.al-toast .al-txt b { display: block; font-weight: 700; }
.al-toast .al-txt small { display: block; font-size: .72rem; color: var(--text-dim); }
.al-toast .al-x,
.al-defi .al-x {
  background: none; border: none; color: var(--text-faint);
  font-size: 1.3rem; line-height: 1; padding: 0 .2rem; cursor: pointer;
}

/* ---------------------- Le défi ---------------------- */
.al-defi {
  padding: .75rem .8rem; border-radius: var(--radius);
  /* Un fond OPAQUE sous le dégradé : sans lui, le texte de la page se
     lit à travers la carte et l'alerte perd toute autorité. */
  background-color: var(--surface);
  background-image: linear-gradient(150deg, rgba(122, 40, 205, .34), rgba(122, 40, 205, 0) 62%);
  border: 1.5px solid var(--violet-400);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 1px var(--violet-glow);
  animation: al-entre .3s var(--ease) both, al-respire 2.4s ease-in-out .3s infinite;
}
.al-defi-tete { display: flex; align-items: center; gap: .55rem; }
.al-defi-av {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--violet-500), var(--violet));
}
.al-defi-qui { flex: 1; min-width: 0; line-height: 1.2; }
.al-defi-qui b { display: block; font-size: .92rem; }
.al-defi-qui small { display: block; font-size: .72rem; color: var(--text-dim); }
.al-defi-chrono {
  flex: 0 0 auto; font-variant-numeric: tabular-nums;
  padding: .18rem .5rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800; color: var(--amber);
  background: rgba(255, 176, 32, .12); border: 1px solid rgba(255, 176, 32, .4);
}
.al-defi-quoi { margin: .5rem 0 .6rem; font-size: .82rem; color: var(--text-dim); }
.al-defi-quoi b { color: var(--text); }
.al-defi-choix { display: flex; gap: .5rem; }
.al-btn {
  flex: 1; padding: .6rem .5rem; border-radius: 999px; cursor: pointer;
  font-size: .88rem; font-weight: 800; border: none; color: #fff;
}
.al-btn.oui { background: linear-gradient(135deg, #2ECC71, #16A34A); box-shadow: 0 4px 14px rgba(46, 204, 113, .4); }
.al-btn.non { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.al-btn:active { transform: scale(.97); }
.al-btn[disabled] { opacity: .5; cursor: default; }

/* Les quinze dernières secondes : on passe au rouge et on accélère. */
.al-defi.presse {
  border-color: var(--red);
  animation: al-entre .3s var(--ease) both, al-respire-presse 1s ease-in-out infinite;
}
.al-defi.presse .al-defi-chrono {
  color: var(--red); background: rgba(255, 77, 94, .14); border-color: rgba(255, 77, 94, .5);
}

.al-part { animation: al-sort .24s var(--ease) both !important; }

@keyframes al-entre {
  from { opacity: 0; transform: translateY(-14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes al-sort {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-10px) scale(.97); }
}
@keyframes al-respire {
  0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px var(--violet-glow); }
  50%      { box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 22px 2px var(--violet-glow); }
}
@keyframes al-respire-presse {
  0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,77,94,.5); }
  50%      { box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px 3px rgba(255,77,94,.55); }
}

/* La pastille bat UNE fois quand son nombre augmente. Une pastille qui
   clignote sans arrêt, on cesse de la voir au bout d'une minute. */
@keyframes al-bat {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.55); }
  100% { transform: scale(1); }
}
.badge.al-bat { animation: al-bat .5s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .al-toast, .al-defi, .al-defi.presse, .al-part, .badge.al-bat { animation: none; }
}
