/* ALGATOR FAN CARDS — interface (le code d'Algator Cards, avec ses couleurs à lui, en bas de la partie « Fan Cards »). Style sticker : contours épais, ombres dures, formes en dents de croco. */
@font-face { font-family: 'Luckiest Guy'; src: url('/fonts/luckiest-guy.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Baloo 2'; font-weight: 700; src: url('/fonts/baloo2-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Baloo 2'; font-weight: 800; src: url('/fonts/baloo2-800.woff2') format('woff2'); font-display: swap; }

:root {
  --encre: #10242b;
  --creme: #fff9ec;
  --creme2: #fdf0d3;
  --gris: #6c7a7f;
  --marais: #13c27b;
  --marais2: #0a9a60;
  --citron: #b7f34a;
  --soleil: #ffd23f;
  --soleil2: #f5a700;
  --rose: #ff4f9a;
  --ciel: #38b6ff;
  --violet: #8b5cf6;
  --danger: #e4322b;
  --fond1: #0d4a49;
  --fond2: #0b6b5e;
  --fond3: #0f8a64;
  --rayon: 18px;
  --contour: 3px solid var(--encre);
  --ombre: 0 5px 0 var(--encre);
  --ombre-douce: 0 10px 24px rgba(4, 30, 32, .28);
  --titre: 'Luckiest Guy', 'Baloo 2', system-ui, sans-serif;
  --texte: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-l: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 700 16px/1.35 var(--texte); color: var(--encre);
  background-color: var(--fond1);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48' viewBox='0 0 56 48'%3E%3Cpath d='M0 0c14 0 14 24 28 24S42 0 56 0M0 24c14 0 14 24 28 24s14-24 28-24' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='3'/%3E%3C/svg%3E"),
    linear-gradient(160deg, var(--fond1), var(--fond2) 60%, var(--fond3));
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--titre); font-weight: 400; margin: 0; letter-spacing: .5px; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 2px; }
.cache { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -.22em; }
.noscript { color: #fff; padding: 24px; text-align: center; }

/* ─── Mise en page ─── */
#app { display: grid; grid-template-columns: var(--nav-l) minmax(0, 1fr); min-height: 100vh; }
#contenu { min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
#page { flex: 1; padding: 8px 28px 40px; max-width: 1240px; width: 100%; margin: 0 auto; outline: none; }
#barre { display: flex; align-items: center; gap: 10px; padding: 12px 28px 8px; justify-content: flex-end; min-height: 62px; max-width: 1240px; width: 100%; margin: 0 auto; }
#pied { padding: 18px 28px 26px; color: #cfe9e0; font-size: 13px; text-align: center; }
#pied a { color: #fff; margin: 0 6px; }
.chargement { color: #fff; font: 400 26px var(--titre); text-align: center; padding: 80px 0; }

/* ─── Menu latéral ─── */
#nav { background: var(--encre); color: #dcefe7; padding: 14px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: #2b4750 transparent; }
.logo { display: block; text-decoration: none; text-align: center; padding: 4px 0 10px; transform: rotate(-3deg); }
.logo .l1 { display: block; font: 400 31px/.95 var(--titre); color: var(--marais); -webkit-text-stroke: 1px #063; text-shadow: 0 3px 0 #063; }
.logo .l2 { display: inline-block; margin-top: 2px; font: 400 20px/1 var(--titre); color: var(--encre); background: var(--soleil); padding: 3px 12px 1px; border-radius: 8px; }
.logo-barre { display: none; padding: 0; }
.logo-barre .l1 { font-size: 22px; }
.nav-groupe { font: 800 11px/1 var(--texte); letter-spacing: 1.4px; text-transform: uppercase; color: #7fa8a0; padding: 12px 10px 4px; }
.nav-lien { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; text-decoration: none; color: #dcefe7; border: 2px solid transparent; }
.nav-lien:hover { background: #1c3942; }
.nav-lien.actif { background: var(--marais); color: var(--encre); border-color: #063; box-shadow: 0 3px 0 #063; }
.nav-lien .pastille { margin-left: auto; }
.pastille { background: var(--rose); color: #fff; border-radius: 999px; font-size: 12px; line-height: 1; padding: 4px 7px 3px; min-width: 22px; text-align: center; }
.nav-compte { margin-top: auto; padding-top: 10px; }
.nav-carte { display: flex; gap: 10px; align-items: center; background: #1c3942; border-radius: 14px; padding: 8px 10px; text-decoration: none; color: #fff; }
.nav-carte small { display: block; font-size: 12px; color: #9cc6bb; }
.en-ligne { font-size: 12px; color: #9cc6bb; padding: 8px 10px 0; }
.en-ligne::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--citron); margin-right: 6px; }

#nav-mobile { display: none; }

/* ─── Boutons « cube » ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px 7px; border: var(--contour); border-radius: 14px;
  background: linear-gradient(180deg, #fff, var(--creme2)); color: var(--encre); font: 800 16px/1.15 var(--texte); text-decoration: none;
  box-shadow: 0 4px 0 var(--encre); transition: transform .08s, box-shadow .08s; white-space: nowrap; position: relative;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--encre); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--encre); }
.btn[disabled] { filter: grayscale(.7); opacity: .6; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--encre); }
.btn.vert { background: linear-gradient(180deg, #4be39f, var(--marais)); }
.btn.jaune { background: linear-gradient(180deg, #ffe680, var(--soleil)); }
.btn.rose { background: linear-gradient(180deg, #ff87bb, var(--rose)); color: #fff; }
.btn.bleu { background: linear-gradient(180deg, #7fd2ff, var(--ciel)); }
.btn.rouge { background: linear-gradient(180deg, #ff7b6e, var(--danger)); color: #fff; }
.btn.grand { font-size: 21px; padding: 13px 28px 10px; border-radius: 18px; }
.btn.petit { font-size: 14px; padding: 5px 11px 4px; border-radius: 10px; box-shadow: 0 3px 0 var(--encre); border-width: 2px; }
.btn.plein { width: 100%; }
.lien-btn { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; font-weight: 800; }

.onglets { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.onglet { padding: 7px 15px 5px; border: var(--contour); border-radius: 13px; background: var(--creme); font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 var(--encre); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.onglet.actif { background: linear-gradient(180deg, #ffe680, var(--soleil)); }
.onglet .pastille { font-size: 11px; padding: 3px 6px 2px; }

/* ─── Panneaux ─── */
.panneau { background: var(--creme); border: var(--contour); border-radius: var(--rayon); box-shadow: var(--ombre), var(--ombre-douce); padding: 18px; }
.panneau + .panneau { margin-top: 18px; }
.panneau h2 { font-size: 24px; margin-bottom: 10px; }
.panneau h3 { font-size: 19px; margin-bottom: 6px; }
.titre-page { color: #fff; font-size: clamp(30px, 4.4vw, 46px); margin: 6px 0 2px; text-shadow: 0 4px 0 var(--encre); -webkit-text-stroke: 1px var(--encre); }
.sous-titre { color: #d6f1e6; margin-bottom: 12px; }
.sous-section { color: #fff; font-size: 26px; margin: 26px 0 12px; text-shadow: 0 3px 0 var(--encre); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sous-section small { font: 700 14px var(--texte); text-shadow: none; color: #d6f1e6; }
.gris { color: var(--gris); }
.petit-texte { font-size: 13.5px; }
.ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ligne.ecart { justify-content: space-between; }
.pile { display: flex; flex-direction: column; gap: 10px; }
.grille { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.vide { color: var(--gris); text-align: center; padding: 26px 12px; }
.sur-fond .vide, .vide.clair { color: #d6f1e6; }

.pieces { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.piece { width: 1.05em; height: 1.05em; flex: none; }
.chip-pieces { background: var(--creme); border: var(--contour); border-radius: 999px; padding: 5px 14px 3px 8px; box-shadow: 0 3px 0 var(--encre); text-decoration: none; }
.etiquette { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 1px; border-radius: 999px; font: 800 12.5px/1.3 var(--texte); background: var(--encre); color: #fff; }
.etiquette.vert { background: var(--marais); color: var(--encre); }
.etiquette.jaune { background: var(--soleil); color: var(--encre); }
.etiquette.rose { background: var(--rose); }
.etiquette.bleu { background: var(--ciel); color: var(--encre); }
.etiquette.gris { background: #cfd8d6; color: var(--encre); }
.etiquette.rouge { background: var(--danger); }

/* ─── Formulaires ─── */
.champ { display: flex; flex-direction: column; gap: 4px; margin-bottom: 11px; }
.champ > span, .champ > label { font-weight: 800; font-size: 14px; }
.champ small { color: var(--gris); font-size: 12.5px; }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=search], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; padding: 8px 12px 6px; background: #fff; border: var(--contour); border-radius: 12px; outline: none; min-height: 42px;
}
input:focus, select:focus, textarea:focus { border-color: var(--marais2); box-shadow: 0 0 0 3px rgba(19, 194, 123, .25); }
input[type=color] { width: 48px; height: 38px; padding: 2px; border: var(--contour); border-radius: 10px; background: #fff; }
textarea { min-height: 86px; resize: vertical; }
.case { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; margin-bottom: 8px; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--marais2); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ─── Avatars ─── */
.avatar { --t: 44px; width: var(--t); height: var(--t); border-radius: 50%; background: #fff; border: var(--contour); object-fit: contain; flex: none; padding: 3px; display: inline-block; position: relative; }
.avatar.image-clan { object-fit: cover; padding: 0; }
.plinko-tuile.choisie { outline: 3px solid var(--marais); outline-offset: 1px; }
.avatar-cadre { display: inline-flex; border-radius: 50%; padding: 4px; flex: none; background: var(--a, transparent); background-image: linear-gradient(135deg, var(--a), var(--b)); }
.avatar-cadre.motif-rayures { background-image: repeating-linear-gradient(45deg, var(--a) 0 6px, var(--b) 6px 12px); }
.avatar-cadre.motif-damier { background-image: conic-gradient(var(--a) 25%, var(--b) 0 50%, var(--a) 0 75%, var(--b) 0); background-size: 12px 12px; }
.avatar-cadre.motif-pois { background-color: var(--a); background-image: radial-gradient(var(--b) 2.5px, transparent 3px); background-size: 9px 9px; }
.avatar-cadre.motif-flamme { background-image: conic-gradient(from 200deg, var(--a), var(--b), var(--a), var(--b), var(--a)); }
.avatar-cadre.motif-arc { background-image: conic-gradient(#e4322b, #f5a700, #ffd23f, #13c27b, #38b6ff, #8b5cf6, #e4322b); }
.avatar-cadre.motif-metal { background-image: linear-gradient(135deg, var(--a), var(--b) 45%, var(--a) 55%, var(--b)); }
.avatar-cadre.motif-graal { background-image: conic-gradient(#fff2b0, #f5a700, #a86b00, #ffe680, #f5a700, #fff2b0); }
.avatar-cadre.motif-barbier { background-image: repeating-linear-gradient(45deg, #e4322b 0 6px, #fff 6px 12px, #1f9bff 12px 18px, #fff 18px 24px); }
.avatar-cadre.motif-crete { background-image: conic-gradient(from 0deg, #ff3d7f, #3a2bd8, #ff3d7f, #3a2bd8, #ff3d7f); }
.avatar-cadre.motif-prisme { background-image: conic-gradient(#ff4f9a, #ffd23f, #13c27b, #38b6ff, #8b5cf6, #ff4f9a); }
.grille-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.grille-avatars button { background: #fff; border: var(--contour); border-radius: 14px; padding: 5px; aspect-ratio: 1; }
.grille-avatars button.actif { background: var(--soleil); box-shadow: 0 3px 0 var(--encre); }
.grille-avatars img { width: 100%; height: 100%; object-fit: contain; }

/* ─── Barres de progression ─── */
.barre { height: 18px; background: #e8dfc8; border: var(--contour); border-radius: 999px; overflow: hidden; position: relative; }
.barre > i { display: block; height: 100%; background: linear-gradient(180deg, #5eeaae, var(--marais)); border-right: 3px solid var(--encre); min-width: 0; }
.barre.jaune > i { background: linear-gradient(180deg, #ffe680, var(--soleil)); }
.barre-texte { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; line-height: 1; }

/* ─── Stats ─── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.stat { background: #fff; border: var(--contour); border-radius: 14px; padding: 9px 10px 7px; text-align: center; }
.stat b { display: block; font: 400 23px/1.1 var(--titre); }
.stat span { font-size: 12.5px; color: var(--gris); }

/* ─── Fenêtres ─── */
.voile { position: fixed; inset: 0; z-index: 60; background: rgba(5, 25, 30, .72); display: flex; align-items: flex-start; justify-content: center; padding: 26px 14px; overflow-x: hidden; overflow-y: auto; }
.fenetre { background: var(--creme); border: var(--contour); border-radius: 22px; box-shadow: 0 7px 0 var(--encre); width: min(560px, 100%); padding: 20px; position: relative; margin: auto 0; animation: pop .18s ease-out; }
.fenetre.large { width: min(940px, 100%); }
.idees { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 12px; margin-top: 12px; }
.idee { display: flex; gap: 12px; margin: 0; align-items: flex-start; }
.idee .carte { --carte: 8.6px; }
.idee .pile { min-width: 0; flex: 1; }
.idee > .booster { --ec: 12px; }
.galerie-recherche { width: 100%; margin-top: 8px; }
.galerie-categories { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.galerie-dossier { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.galerie-dossier span { white-space: nowrap; }
.galerie-dossier select { min-width: 0; flex: 1; }
.galerie-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 8px; }
.galerie-image { display: block; min-width: 0; padding: 4px; border: 2px solid var(--encre); border-radius: 10px; background: repeating-conic-gradient(#dfe7e3 0 25%, #fff 0 50%) 0 0 / 16px 16px; color: var(--encre); font: inherit; cursor: pointer; content-visibility: auto; contain-intrinsic-size: 104px 132px; }
.galerie-image:hover, .galerie-image:focus-visible { outline: 3px solid var(--soleil); outline-offset: 1px; }
.galerie-image img, .galerie-image canvas { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.galerie-image span { display: block; margin-top: 3px; padding: 1px 3px; border-radius: 5px; background: rgba(255, 255, 255, .9); font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fenetre h2 { font-size: 26px; margin: 0 34px 10px 0; }
.fermer { z-index: 20; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: var(--contour); background: #fff; display: grid; place-items: center; box-shadow: 0 2px 0 var(--encre); }
@keyframes pop { from { transform: scale(.94) translateY(8px); opacity: 0; } }

#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 120; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--encre); color: #fff; border-radius: 14px; padding: 10px 16px 8px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); animation: pop .18s ease-out; text-align: center; border: 2px solid #fff3; }
.toast.ok { background: var(--marais2); }
.toast.err { background: var(--danger); }
.toast.succes { background: linear-gradient(90deg, #7a3ff2, var(--rose)); }

/* ─── Boosters ─── */
.booster {
  --c1: #13c27b; --c2: #0a7a50; --c3: #b7f34a; --ec: 1em;
  position: relative; width: 11em; height: 15.5em; border-radius: .5em; color: #fff; isolation: isolate; font-size: var(--ec); flex: none;
  filter: drop-shadow(0 .45em 0 rgba(4, 24, 28, .55));
  clip-path: polygon(0 3%, 4% 0, 8% 3%, 12% 0, 16% 3%, 20% 0, 24% 3%, 28% 0, 32% 3%, 36% 0, 40% 3%, 44% 0, 48% 3%, 52% 0, 56% 3%, 60% 0, 64% 3%, 68% 0, 72% 3%, 76% 0, 80% 3%, 84% 0, 88% 3%, 92% 0, 96% 3%, 100% 0, 100% 97%, 96% 100%, 92% 97%, 88% 100%, 84% 97%, 80% 100%, 76% 97%, 72% 100%, 68% 97%, 64% 100%, 60% 97%, 56% 100%, 52% 97%, 48% 100%, 44% 97%, 40% 100%, 36% 97%, 32% 100%, 28% 97%, 24% 100%, 20% 97%, 16% 100%, 12% 97%, 8% 100%, 4% 97%, 0 100%);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .6) 0 .13em, rgba(0, 0, 0, .28) .13em .3em) top / 100% 8.5% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .6) 0 .13em, rgba(0, 0, 0, .28) .13em .3em) bottom / 100% 8.5% no-repeat,
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .55), transparent 52%),
    repeating-conic-gradient(from 0deg at 50% 42%, rgba(255, 255, 255, .17) 0 8deg, transparent 8deg 20deg),
    linear-gradient(120deg, transparent 30%, rgba(255, 79, 154, .28) 42%, rgba(255, 210, 63, .28) 50%, rgba(56, 182, 255, .28) 58%, transparent 70%),
    var(--fond-sachet, linear-gradient(155deg, var(--c1), var(--c2) 72%));
}
.booster::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .34) 34%, transparent 46%, transparent 62%, rgba(255, 255, 255, .14) 72%, transparent 82%); }
.booster-art { position: absolute; left: 7%; right: 7%; top: 22%; height: 42%; z-index: 1; }
.booster-art img { position: absolute; width: 62%; height: 74%; object-fit: cover; border: .17em solid #fff; border-radius: .45em; box-shadow: 0 .2em .5em rgba(0, 0, 0, .45); background: #123; }
.booster-art img:nth-child(1) { left: 0; top: 2%; transform: rotate(-9deg); }
.booster-art img:nth-child(2) { right: 0; top: 2%; transform: rotate(9deg); }
.booster-art img:nth-child(3) { left: 19%; top: 24%; transform: none; }
.booster-art.booster-tete img { width: 100%; height: 100%; left: 0; top: 0; transform: none; object-fit: contain; border: 0; background: none; box-shadow: none; }
.booster-art.image-seule img { width: 100%; height: 100%; left: 0; top: 0; transform: none; }
.booster-marque { position: absolute; top: 9.5%; left: 0; right: 0; text-align: center; font: 400 1.16em/1 var(--titre); z-index: 2; text-shadow: 0 .12em 0 rgba(0, 0, 0, .45); }
.booster-marque small { display: block; font-size: .62em; color: var(--c3); margin-top: .1em; }
.booster-nom { position: absolute; left: 4%; right: 4%; bottom: 11%; text-align: center; font: 400 1.62em/.98 var(--titre); z-index: 2; -webkit-text-stroke: .045em #10242b; paint-order: stroke fill; text-shadow: 0 .05em 0 #10242b, 0 .1em 0 #10242b, 0 .16em 0 rgba(0, 0, 0, .45); }
.booster-nom small { display: table; margin: .32em auto 0; padding: .14em .75em .04em; border-radius: 999px; background: #10242b; font: 800 .46em/1.25 var(--texte); color: var(--c3); -webkit-text-stroke: 0; text-shadow: none; }
.booster.t-marais { --c1: #18d186; --c2: #066a45; --c3: #d7ff7e; }
.booster.t-amis { --c1: #ff8a3d; --c2: #d6245f; --c3: #ffe680; }
.booster.t-twitch { --c1: #9d5cff; --c2: #3c1a86; --c3: #d9c6ff; }
.booster.t-fans { --c1: #ff3d7f; --c2: #2a1150; --c3: #25f4ee; }
.booster.t-fans::after { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 15% 15%, rgba(37, 244, 238, .45), transparent 34%), radial-gradient(circle at 85% 85%, rgba(255, 61, 127, .5), transparent 40%); }
.booster.t-tiktok { --c1: #16202a; --c2: #000; --c3: #25f4ee; }
.booster.t-tiktok::after { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 12% 18%, rgba(37, 244, 238, .5), transparent 34%), radial-gradient(circle at 88% 82%, rgba(254, 44, 85, .6), transparent 40%); }
.booster.t-vhs { --c1: #5b3a29; --c2: #241a3c; --c3: #ffc56b; }
.booster.t-vhs::after { content: ''; position: absolute; inset: 0; z-index: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 6px); }
.booster.t-or { --c1: #ffd86b; --c2: #b06c00; --c3: #fff7c9; color: #fff; }
.booster.t-evenement { --c1: #ff4f9a; --c2: #5b1e96; --c3: #ffe680; }
.booster.t-youtube { --c1: #ff3b30; --c2: #8f0d12; --c3: #ffe1dc; }
.booster.t-empire { --c1: #b026ff; --c2: #4a0a78; --c3: #ffd700; }
.booster.t-footmdr { --c1: #35c552; --c2: #0d5a24; --c3: #ffe14d; }
.booster.t-musique { --c1: #ff4fd8; --c2: #3a0d7a; --c3: #7ff9ff; }
.booster.t-musique::after { content: ''; position: absolute; inset: 0; z-index: 0; background: repeating-linear-gradient(90deg, transparent 0 9%, rgba(127, 249, 255, .16) 9% 11%); }
.booster.t-alessia { --c1: #ff7fcf; --c2: #2a0820; --c3: #ffd6f0; }
.booster.t-matmout { --c1: #f4efe4; --c2: #15120e; --c3: #e8b04a; }
.booster.t-matmout::after { content: ''; position: absolute; inset: 0; z-index: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .13) 0 9px, rgba(0, 0, 0, .16) 9px 18px) top / 100% 30% no-repeat, radial-gradient(circle at 50% 110%, rgba(232, 176, 74, .45), transparent 55%); }
.booster.t-alessia::after { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 20% 15%, rgba(255, 127, 207, .45), transparent 35%), radial-gradient(circle at 85% 85%, rgba(255, 214, 240, .25), transparent 40%); }
.booster.t-jeux { --c1: #38b6ff; --c2: #1b3fa8; --c3: #ffe680; }
.booster.t-coupe { --c1: #fff; --c2: #fff; --c3: #fff; --fond-sachet: repeating-linear-gradient(115deg, #e4322b 0 1.5em, #fff 1.5em 3em, #1f6fe0 3em 4.5em, #fff 4.5em 6em); }
.booster.t-coupe::after { content: ''; position: absolute; left: 5%; right: 5%; top: 9%; bottom: 9%; z-index: 0; background: rgba(16, 36, 43, .78); border-radius: .6em; }
.booster.t-coupe .booster-nom small { color: #ffe680; }
.booster.t-coupe .booster-marque small { color: #ff9a8f; }
.booster-ciseaux { position: absolute; left: 50%; top: 46%; width: 66%; transform: translate(-50%, -50%) rotate(-18deg); z-index: 2; color: #fff; }
.booster.booster-image { background: none; clip-path: none; border-radius: 0; filter: drop-shadow(0 .45em .35em rgba(4, 24, 28, .55)); }
.booster.booster-image::before, .booster.booster-image::after { display: none; }
.booster-image > img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Reflet qui passe sur le sachet, dans sa forme exacte. */
.booster-reflet { position: absolute; inset: 0; pointer-events: none; -webkit-mask: var(--forme) center / contain no-repeat; mask: var(--forme) center / contain no-repeat; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%) 130% 0 / 280% 100% no-repeat; animation: reflet-sachet 5s ease-in-out infinite; }
@keyframes reflet-sachet { 55%, 100% { background-position: -50% 0; } }
.tuile-booster { background: var(--creme); border: var(--contour); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; transition: transform .12s; }
.tuile-booster:hover { transform: translateY(-3px) rotate(-.5deg); }
.tuile-booster .booster { --ec: 13px; cursor: pointer; }
.tuile-booster h3 { font-size: 18px; margin: 0; }
.tuile-booster p { font-size: 13px; color: var(--gris); line-height: 1.25; min-height: 2.5em; }
.points-rarete { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.points-rarete i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--encre); }
.ruban { position: absolute; top: 9px; left: 9px; z-index: 4; }
.ruban-droit { position: absolute; top: 9px; right: 9px; z-index: 4; }
.vedette { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 22px; align-items: center; background: linear-gradient(120deg, #ffe680, #ffb84d 55%, #ff7aa8); border: var(--contour); border-radius: 26px; box-shadow: var(--ombre), var(--ombre-douce); padding: 20px; position: relative; overflow: hidden; }
.vedette::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: linear-gradient(135deg, var(--encre) 25%, transparent 25%) 0 0 / 22px 22px, linear-gradient(225deg, var(--encre) 25%, transparent 25%) 0 0 / 22px 22px; opacity: .92; }
.vedette-visuel { display: flex; justify-content: center; position: relative; padding-bottom: 14px; }
.vedette-visuel .booster { --ec: 20px; cursor: pointer; transition: transform .18s; }
.vedette-visuel .booster:hover { transform: rotate(-3deg) scale(1.03); }
.vedette h1 { font-size: clamp(34px, 5vw, 56px); text-shadow: 0 4px 0 #fff8; }
.vedette-infos { position: relative; padding-bottom: 14px; }
.chargeur { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255, 255, 255, .55); border: 2px solid var(--encre); border-radius: 14px; padding: 7px 12px 5px; }
.charges { display: inline-flex; gap: 3px; }
.charges i { width: 13px; height: 22px; border: 2px solid var(--encre); border-radius: 4px; background: #fff; }
.charges i.pleine { background: linear-gradient(180deg, #5eeaae, var(--marais)); }
.tableau-proba { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau-proba td, .tableau-proba th { padding: 5px 7px 3px; border-bottom: 2px dashed #e6dbc0; text-align: left; }
.tableau-proba td:last-child, .tableau-proba th:last-child { text-align: right; }

/* ─── Tableaux ─── */
.table-defile { overflow-x: auto; }
table.tableau { border-collapse: collapse; width: 100%; font-size: 14.5px; }
table.tableau th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--gris); padding: 6px 8px; border-bottom: 3px solid var(--encre); white-space: nowrap; }
table.tableau td { padding: 8px; border-bottom: 2px dashed #e6dbc0; vertical-align: middle; }

/* ─── Fil et accueil ─── */
.fil { display: flex; gap: 10px; overflow: hidden; align-items: center; background: var(--encre); color: #fff; border-radius: 999px; padding: 5px 16px 5px 8px; margin: 4px 0 14px; font-size: 14px; min-height: 40px; }
.fil .avatar { --t: 28px; border-width: 2px; padding: 1px; }
.fil a { color: var(--citron); text-decoration: none; }
.defile-h { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 14px; overflow-x: auto; padding: 44px 44px 48px; margin: -30px -30px -34px; scrollbar-width: thin; scrollbar-color: #ffffff55 transparent; }

/* ─── Podium ─── */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin: 12px 0 16px; }
.marche-podium { text-align: center; color: var(--encre); text-decoration: none; display: block; }
.marche-podium .socle { border: var(--contour); border-radius: 16px 16px 8px 8px; padding: 10px 6px 8px; margin-top: 6px; box-shadow: var(--ombre); }
.marche-podium.p1 .socle { background: linear-gradient(180deg, #ffe680, var(--soleil2)); padding-top: 26px; }
.marche-podium.p2 .socle { background: linear-gradient(180deg, #f2f6f7, #b8c6cb); padding-top: 16px; }
.marche-podium.p3 .socle { background: linear-gradient(180deg, #ffc38a, #c87533); }
.marche-podium .avatar { --t: 68px; }
.marche-podium.p1 .avatar { --t: 86px; }
.marche-podium b { display: block; font: 400 18px/1.1 var(--titre); overflow-wrap: anywhere; }
.rang { font: 400 22px var(--titre); }
.ligne-classement { display: grid; grid-template-columns: 40px 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 12px; text-decoration: none; color: inherit; }
.ligne-classement:nth-child(even) { background: var(--creme2); }
.ligne-classement.moi { background: #d9f7c6; outline: 2px solid var(--marais2); }
.ligne-classement .avatar { --t: 42px; }
.nom-ligne { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-joueur { font-size: 11px; padding: 2px 7px 1px; border-radius: 999px; color: #fff; margin-left: 5px; vertical-align: 1px; }

/* ─── Profil ─── */
.bandeau-profil { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.bandeau-profil .avatar { --t: 104px; }
.bandeau-profil h1 { font-size: 36px; overflow-wrap: anywhere; }
.vitrine { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ─── Jeux ─── */
.recherche-collection { display: block; width: 100%; margin-bottom: 14px; padding: 12px 16px; font-size: 16px; font-weight: 700; }
/* Le chrono reste à gauche de la croix de fermeture. */
.jeu-entete { margin-bottom: 8px; padding-right: 44px; }
.jeu-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.jeu-choix button { padding: 13px 10px 10px; background: #fff; border: var(--contour); border-radius: 14px; box-shadow: 0 4px 0 var(--encre); font-weight: 800; }
.jeu-choix button:hover:not([disabled]) { background: var(--creme2); }
.jeu-choix button.bon { background: #8ff0b8; }
.jeu-choix button.faux { background: #ff9f96; }
.jeu-image { width: 100%; max-height: 300px; object-fit: contain; border: var(--contour); border-radius: 14px; background: #000; margin: 8px auto; display: block; }
.jeu-image.flou { filter: blur(9px); }
.memoire { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; }
.memoire button { aspect-ratio: 1; border: var(--contour); border-radius: 12px; background: linear-gradient(135deg, var(--marais), var(--marais2)); padding: 0; overflow: hidden; }
.memoire button img { width: 100%; height: 100%; object-fit: cover; }
.memoire button.trouve { opacity: .55; }
.tuile-jeu { background: var(--creme); border: var(--contour); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tuile-jeu h3 { font-size: 20px; }
.apercu-cos { display: flex; align-items: center; justify-content: center; height: 78px; border-radius: 12px; background: var(--creme2); }
.apercu-cos.theme { border: var(--contour); color: #fff; font: 400 20px var(--titre); text-shadow: 0 2px 0 var(--encre); background-image: linear-gradient(160deg, var(--a), var(--b) 60%, var(--c)); }
.titre-groupe-cos { color: #fff; font-size: 20px; margin: 14px 0 8px; text-shadow: 0 2px 0 var(--encre); }
.titre-groupe-cos small { font: 700 13px var(--texte); text-shadow: none; color: #d6f1e6; }
.tuile-cos h3 { font-size: 17px; overflow-wrap: anywhere; }
.tuile-cos .ligne { margin-top: auto; }
.tuile-jeu .ico-grand { width: 42px; height: 42px; color: var(--marais2); }

/* ─── Propositions ─── */
.prop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px; background: #fff; border: var(--contour); border-radius: 14px; }
.prop + .prop { margin-top: 10px; }
.prop h3 { font-size: 18px; margin: 0 0 3px; overflow-wrap: anywhere; }
.vote { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 92px; }
.vote .btn.choisi { outline: 3px solid var(--marais2); outline-offset: 1px; }

/* ─── Publicité : toujours identifiée ─── */
.pub { margin: 0 auto; text-align: center; max-width: 780px; }
.pub:has(ins[data-ad-status="unfilled"]) { display: none; }
.pub:has(ins[data-ad-status="filled"]) { background: rgba(255, 255, 255, .92); border: 2px dashed #6c7a7f; border-radius: 14px; padding: 6px 10px 10px; margin: 18px auto; }
.pub-label { display: none; }
.pub:has(ins[data-ad-status="filled"]) .pub-label { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #5b686d; margin-bottom: 4px; }
.bandeau-conso { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); z-index: 70; }

/* ─── Administration ─── */
.admin-grille { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-menu { background: var(--encre); color: #fff; border-radius: 16px; padding: 10px; position: sticky; top: 10px; display: flex; flex-direction: column; gap: 2px; }
.admin-menu h4 { margin: 10px 8px 3px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #7fa8a0; }
.admin-menu a { color: #dcefe7; text-decoration: none; padding: 6px 10px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.admin-menu a:hover { background: #1c3942; }
.admin-menu a.actif { background: var(--soleil); color: var(--encre); }
.editeur-carte { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.apercu-carte { overflow: hidden; position: sticky; top: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px; background: linear-gradient(160deg, var(--fond1), var(--fond2)); border: var(--contour); border-radius: 18px; }
.cadrage { width: 100%; color: #fff; text-align: center; }
.cadrage .ligne { margin-top: 8px; }
.cadrage-zoom { flex-wrap: nowrap; justify-content: center; }
.cadrage-zoom input { flex: 1; min-width: 0; accent-color: var(--soleil); }
.cadrage-zoom b { min-width: 3.4em; font-size: 14px; }
.cadrage-finition { color: #fff; align-items: center; margin: 0; }
.cadrage-finition select { width: auto; min-height: 34px; padding: 2px 8px; color: var(--encre); }
[data-apercu] .carte-photo { cursor: grab; touch-action: none; user-select: none; }
[data-apercu].saisie .carte-photo { cursor: grabbing; }
[data-apercu] .carte-photo img { -webkit-user-drag: none; pointer-events: none; }
.ia-etape { background: #fff; border: var(--contour); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.ia-etape h3 { margin: 0 0 6px; font-size: 18px; }
.ia-images { display: flex; gap: 10px; flex-wrap: wrap; }
.ia-image { width: 104px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.ia-titre { font-size: 12px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.ia-retirees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ia-images a { display: block; width: 104px; text-decoration: none; text-align: center; font-size: 12.5px; }
.ia-images img { width: 104px; height: 76px; object-fit: cover; border: var(--contour); border-radius: 10px; margin-bottom: 3px; background: #1c3942; }
.ia-prompt { width: 100%; min-height: 190px; font: 700 13.5px/1.35 var(--texte); }
.ia-apercu { display: flex; justify-content: center; padding: 14px; margin-top: 10px; border-radius: 12px; background: linear-gradient(160deg, var(--fond1), var(--fond2)); }
.ia-apercu img { max-height: 300px; }
.selecteur-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.liste-cases { max-height: 340px; overflow-y: auto; border: var(--contour); border-radius: 12px; padding: 8px; background: #fff; }
.ligne-carte-admin { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 2px dashed #e6dbc0; }
.ligne-carte-admin img, .ligne-carte-admin .sans-image { width: 50px; height: 38px; border-radius: 7px; object-fit: cover; border: 2px solid var(--encre); background: #1c3942; }
.avertissement { background: #fff3c4; border: 2px solid var(--soleil2); border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.avertissement.rouge { background: #ffe0dc; border-color: var(--danger); }
.info { background: #d9f2ff; border: 2px solid var(--ciel); border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.ok-pastille { color: var(--marais2); }

/* ─── Connexion ─── */
.ecran-auth { max-width: 460px; margin: 10px auto; }
.code-recup { font: 400 26px var(--titre); text-align: center; background: var(--soleil); border: var(--contour); border-radius: 12px; padding: 12px 8px 8px; letter-spacing: 1px; user-select: all; overflow-wrap: anywhere; }

/* ─── Téléphone ─── */
@media (max-width: 1000px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  #nav { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 84vw); z-index: 50; transform: translateX(-102%); transition: transform .18s; height: auto; padding-bottom: 80px; }
  #nav.ouvert { transform: none; box-shadow: 0 0 0 100vmax rgba(5, 25, 30, .6); }
  #barre { padding: 10px 14px 6px; justify-content: space-between; }
  .logo-barre { display: block; }
  #page { padding: 4px 14px 94px; }
  #pied { padding-bottom: 90px; }
  #nav-mobile {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--encre);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 2px;
  }
  #nav-mobile a, #nav-mobile button { display: flex; flex-direction: column; align-items: center; gap: 1px; color: #dcefe7; text-decoration: none; font-size: 11.5px; padding: 5px 2px 3px; border-radius: 12px; background: none; border: 0; }
  #nav-mobile .ico { width: 24px; height: 24px; }
  #nav-mobile .actif { background: var(--marais); color: var(--encre); }
  .vedette { grid-template-columns: minmax(0, 1fr); text-align: center; padding: 14px; }
  .vedette .ligne, .vedette .chargeur { justify-content: center; }
  .vedette-visuel .booster { --ec: 16px; }
  .admin-grille { grid-template-columns: minmax(0, 1fr); }
  .admin-menu { position: static; flex-direction: row; flex-wrap: wrap; }
  .admin-menu h4 { display: none; }
  .editeur-carte { grid-template-columns: minmax(0, 1fr); }
  .apercu-carte { position: static; order: -1; }
  .prop { grid-template-columns: minmax(0, 1fr); }
  .vote { flex-direction: row; }
  .vote .btn { flex: 1; }
  .deux, .trois { grid-template-columns: 1fr 1fr; }
  .panneau { padding: 14px; }
  .jeu-choix { grid-template-columns: minmax(0, 1fr); }
  #toasts { bottom: 84px; }
  .bandeau-conso { bottom: 76px; }
}
@media (max-width: 460px) {
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .deux, .trois { grid-template-columns: minmax(0, 1fr); }
  .podium .avatar { --t: 54px; }
  .podium .p1 .avatar { --t: 66px; }
}

/* ─── Présentoir de boosters de l'accueil ─── */
.presentoir { max-width: 640px; margin: 4px auto 0; padding: 16px 16px 20px; background: radial-gradient(circle at 50% 34%, #17584f, var(--encre) 68%); border: var(--contour); border-radius: 26px; box-shadow: var(--ombre), var(--ombre-douce); color: #fff; text-align: center; overflow: hidden; }
.presentoir h1 { font-size: clamp(22px, 4vw, 32px); margin: 0; color: #fff; }
.presentoir-intro { margin: 2px 0 0; color: #cfe8df; font-size: 14px; }
.presentoir-fil { display: inline-flex; max-width: 100%; margin: 0 0 12px; background: rgba(255, 255, 255, .1); text-align: left; }
.presentoir-fil > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presentoir-fil .etiquette { font-size: 11px; padding: 1px 7px; color: #fff; }
.presentoir-quand { color: #a9c9be; font-size: 12px; }
.presentoir-scene { --v: 20px; position: relative; height: calc(15.5 * var(--v) + 30px); margin-top: 8px; touch-action: pan-y; user-select: none; }
.presentoir-item { --d: 0; position: absolute; left: 50%; top: 8px; width: calc(11 * var(--v)); margin-left: calc(-5.5 * var(--v)); transform: translateX(calc(var(--d) * 62%)) scale(.72); transform-origin: 50% 60%; z-index: 1; opacity: 0; pointer-events: none; transition: transform .42s cubic-bezier(.2, .9, .3, 1), opacity .3s, filter .3s; }
.presentoir-item .booster { --ec: var(--v); }
.presentoir-item.cote { opacity: 1; z-index: 2; pointer-events: auto; cursor: pointer; filter: brightness(.62); }
.presentoir-item.cote .booster { pointer-events: none; }
.presentoir-item.centre { opacity: 1; z-index: 3; pointer-events: auto; transform: none; }
.presentoir-item.centre .booster { cursor: pointer; }
.presentoir-fleche { position: absolute; z-index: 4; left: 0; top: 50%; margin-top: -24px; width: 48px; height: 48px; padding: 0; border-radius: 14px; }
.presentoir-fleche.droite { left: auto; right: 0; }
.presentoir-fleche.droite svg { transform: scaleX(-1); }
.presentoir-infos { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.presentoir-album { background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 3px 14px 1px; color: #fff; font-weight: 800; font-size: 14px; text-decoration: none; }
.presentoir-infos h2 { margin: 4px 0 0; color: #fff; font-size: 24px; }
.presentoir-desc { margin: 0; color: #cfe8df; font-size: 14px; max-width: 460px; }
.presentoir-prix { margin: 2px 0 0; font-weight: 800; color: #fff; }
.presentoir-infos .chargeur { background: var(--creme); color: var(--encre); justify-content: center; }
.presentoir-cta { margin-top: 8px; }
.presentoir-cta .btn { min-width: 270px; }
.presentoir-jauge { background: linear-gradient(90deg, var(--soleil) var(--plein), #fff var(--plein)); }
.presentoir-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.presentoir-liens a, .presentoir-liens .lien-btn { color: #cfe8df; font-size: 13px; }
@media (max-width: 460px) {
  .presentoir { padding: 12px 8px 16px; border-radius: 20px; }
  .presentoir-scene { --v: 16px; }
  .presentoir-fleche { width: 42px; height: 42px; margin-top: -21px; }
  .presentoir-cta .btn { min-width: 0; width: 100%; }
}

/* ─── Parrainage ─── */
.voile.devant { z-index: 120; }
/* Les 3 cartes divines montrées à l'arrivée par un lien : elles montent l'une après l'autre, sans aucun éclair. */
.divines-accueil { --tc: min(11px, calc((100vw - 76px) / 57)); display: flex; justify-content: center; gap: 8px; margin: 6px 0 12px; }
.divines-accueil .carte { --carte: var(--tc); }
.divine-arrive { animation: divine-arrive .6s cubic-bezier(.2, 1.3, .4, 1) backwards; }
@keyframes divine-arrive { from { opacity: 0; transform: translateY(26px) scale(.9); } }
.invitation { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.invitation-qr { width: 164px; flex: none; border: var(--contour); border-radius: 12px; overflow: hidden; background: #fff; line-height: 0; }
.invitation-qr svg { width: 100%; height: auto; display: block; }
.invitation input[readonly] { width: 100%; font-size: 14px; }
.paliers-parrain { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.palier-parrain { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 2px solid var(--encre); border-radius: 12px; background: #fff; opacity: .7; }
.palier-parrain.atteint { opacity: 1; background: #e4fbef; border-color: var(--marais2); }
.palier-parrain small { font-size: 12px; color: var(--gris); }

/* ─── Plinko ─── */
.plinko { background: radial-gradient(circle at 60% 30%, #17584f, var(--encre) 72%); border: var(--contour); border-radius: 24px; box-shadow: var(--ombre), var(--ombre-douce); color: #fff; padding: 14px; margin-top: 10px; }
.plinko-haut { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 12px; }
.plinko-info { font-size: 13px; font-weight: 700; color: #cfe8df; }
.plinko-corps { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
.plinko-cote { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plinko-cote > .btn { width: 100%; }
.plinko-plateau { min-width: 0; background: linear-gradient(180deg, #0f6b5a, #0a3f3c); border: var(--contour); border-radius: 18px; padding: 4px 0 0; overflow: hidden; }
.plinko-plateau canvas { display: block; width: 100%; }
.plinko-choix { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; background: rgba(255, 255, 255, .08); color: #fff; border: 2px solid var(--soleil); border-radius: 16px; padding: 8px; cursor: pointer; font: inherit; min-width: 0; }
.plinko-choix img { width: 58px; height: 76px; object-fit: cover; border-radius: 8px; flex: none; }
.plinko-choix > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.plinko-choix small { color: #cfe8df; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plinko-choix em { font-style: normal; font-size: 13px; color: var(--soleil); }
.plinko-sans { width: 58px; height: 76px; flex: none; display: grid; place-items: center; font: 400 26px var(--titre); background: rgba(255, 255, 255, .1); border-radius: 8px; }
.plinko-vide { margin: 0; padding: 12px; background: rgba(255, 255, 255, .08); border-radius: 14px; font-size: 14px; }
.plinko-vide a, .plinko-record a { color: var(--citron); }
.plinko-regle { margin: 0; padding: 6px 10px; background: rgba(228, 50, 43, .18); border-radius: 12px; font-size: 13px; font-weight: 700; text-align: center; }
.plinko-resultat { margin: 0; min-height: 24px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 14px; }
.plinko-gagne { color: var(--citron); }
.plinko-perd { color: #ff9a8f; }
.plinko-record { margin: 0 0 6px; color: #cfe8df; }
.plinko-derniers { display: flex; flex-wrap: wrap; gap: 5px; }
.plinko-derniers span { padding: 2px 9px 0; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 800; color: #ff9a8f; }
.plinko-derniers span.haut { background: var(--citron); color: var(--encre); }
.plinko-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.plinko-tuile { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; padding: 6px; background: var(--creme); border: 2px solid var(--encre); border-radius: 12px; cursor: pointer; font: inherit; min-width: 0; color: var(--encre); }
.plinko-tuile[hidden] { display: none; }
.plinko-tuile img, .plinko-tuile .plinko-sans { width: 100%; height: 76px; object-fit: cover; border-radius: 8px; }
.plinko-tuile b { font-size: 12px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plinko-tuile small { font-size: 11px; color: var(--gris); min-height: 0; }
.plinko-pub { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; text-decoration: none; }
.plinko-pub > div:nth-child(2) { flex: 1; min-width: 0; }
@media (max-width: 800px) {
  .plinko { padding: 10px; }
  .plinko-corps { grid-template-columns: minmax(0, 1fr); }
  .plinko-plateau { order: -1; }
}

/* ─── Administration : le nouveau panneau ─── */
.btn.doux { background: #fff; box-shadow: 0 2px 0 rgba(16, 36, 43, .35); border-width: 2px; }
.btn.doux:hover { background: var(--creme2); box-shadow: 0 3px 0 rgba(16, 36, 43, .35); }
.btn.doux.danger { color: #b3261e; border-color: #b3261e; box-shadow: 0 2px 0 rgba(179, 38, 30, .35); }
.btn.doux.danger:hover { background: #ffe9e6; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.admin-menu a > span { flex: 1; min-width: 0; }
.adm-pastille { flex: none; min-width: 22px; padding: 1px 6px 0; border-radius: 999px; background: var(--rose); color: #fff; font-size: 12px; text-align: center; }
.admin-menu a.actif .adm-pastille { background: var(--encre); }
.adm-zone { min-width: 0; }
.adm-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.adm-tete h2 { margin: 0; color: #fff; font-size: 30px; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.adm-tete p { margin: 2px 0 0; color: #dcefe7; font-size: 14.5px; max-width: 640px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adm-bloc { background: var(--creme); border: var(--contour); border-radius: 18px; box-shadow: 0 4px 0 var(--encre); padding: 14px 16px; margin-bottom: 14px; }
.adm-bloc > h3 { margin: 0 0 10px; font-size: 19px; }
.adm-centre { max-width: 860px; margin: 0 auto; }
.adm-sous-titre { margin: 20px 0 8px; color: #fff; font-size: 19px; }
.adm-bloc .adm-sous-titre, .fenetre .adm-sous-titre { color: var(--encre); }
.adm-sous-titre small { font: 800 13px var(--texte); background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 1px 9px; vertical-align: 2px; }
.adm-aide { margin: 8px 0 0; font-size: 13px; color: var(--gris); }
.adm-centre > .adm-aide { color: #cfe8df; margin: -2px 0 8px; }
.adm-vide { margin: 0; padding: 22px 12px; text-align: center; color: #dcefe7; background: rgba(255, 255, 255, .08); border: 2px dashed rgba(255, 255, 255, .25); border-radius: 16px; }
.adm-bloc .adm-vide { color: var(--gris); background: none; border-color: #e6dbc0; }
.adm-ok { margin: 0 0 8px; padding: 9px 12px; border-radius: 12px; background: #dff7ea; border: 2px solid var(--marais); font-weight: 700; color: #0a5c3b; }
.adm-compte { margin: 0 0 8px; color: #fff; font-weight: 800; font-size: 14px; min-height: 18px; }
.adm-filtres { background: var(--creme); border: var(--contour); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.adm-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-puces .puce-filtre small { opacity: .7; font-weight: 700; }
.adm-plus { display: flex; justify-content: center; margin-top: 14px; }

/* Tableau de bord */
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.adm-kpi { background: #fff; border: 2px solid rgba(16, 36, 43, .18); border-radius: 14px; padding: 10px 12px 8px; min-width: 0; }
.adm-kpi b { display: block; font: 400 26px/1.1 var(--titre); overflow-wrap: anywhere; }
.adm-kpi span { display: block; font-size: 13px; font-weight: 800; }
.adm-kpi small { display: block; font-size: 12px; color: var(--gris); }
.adm-todo { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 200px)); gap: 10px; }
.adm-todo a { display: flex; flex-direction: column; padding: 10px 12px 8px; border-radius: 14px; background: linear-gradient(180deg, #ffe680, var(--soleil)); border: var(--contour); box-shadow: 0 3px 0 var(--encre); text-decoration: none; color: var(--encre); }
.adm-todo a:hover { transform: translateY(-1px); }
.adm-todo b { font: 400 30px/1 var(--titre); }
.adm-todo span { font-size: 13px; font-weight: 800; }
.adm-trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.adm-trio .adm-bloc { margin: 0; }
.adm-barres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-barres li > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.adm-barres li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-barres li small { color: var(--gris); }
.adm-barres li > i { display: block; height: 7px; border-radius: 999px; background: var(--marais); border: 2px solid var(--encre); margin-top: 2px; }

/* Cartes */
.adm-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.adm-carte-t { display: flex; flex-direction: column; background: var(--creme); border: var(--contour); border-radius: 16px; overflow: hidden; box-shadow: 0 3px 0 var(--encre); min-width: 0; }
.adm-carte-img { position: relative; aspect-ratio: 16 / 9; background: #1c3942; display: grid; place-items: center; color: #7fa8a0; font-size: 13px; border-bottom: var(--contour); }
.adm-carte-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-carte-img .etiquette { position: absolute; top: 6px; left: 6px; border: 2px solid var(--encre); }
.adm-carte-corps { padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.adm-carte-corps > b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-carte-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--gris); font-weight: 700; }
.adm-carte-meta .etiquette { color: #fff; font-size: 11.5px; }
.adm-carte-corps > small { font-size: 12px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-carte-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 10px 10px; }
.adm-carte-actions .btn { flex: 1 1 auto; }

/* Listes : une ligne par élément, les actions à droite */
.adm-liste { display: flex; flex-direction: column; gap: 8px; }
.adm-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--creme); border: var(--contour); border-radius: 14px; padding: 10px 12px; box-shadow: 0 3px 0 var(--encre); }
.adm-bloc .adm-item { box-shadow: none; border-width: 2px; background: #fff; }
.adm-clan-nom { flex: 1 1 260px; min-width: 0; }
.adm-clan-nom > b { font-size: 16.5px; overflow-wrap: anywhere; }
.adm-clan-nom small { display: block; color: var(--gris); font-size: 12.5px; margin-top: 2px; }
.adm-clan-nom p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.adm-nb { color: var(--gris); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.adm-code { font-family: ui-monospace, Consolas, monospace; background: var(--creme2); padding: 1px 8px; border-radius: 8px; border: 2px dashed var(--encre); }
.adm-mini-barre { height: 8px; border-radius: 999px; background: #e9dfc4; border: 2px solid var(--encre); overflow: hidden; margin-top: 6px; max-width: 320px; }
.adm-mini-barre i { display: block; height: 100%; background: var(--marais); }
.adm-item.cat { flex-wrap: nowrap; }
.adm-item.cat input { flex: 1 1 160px; min-width: 0; }
.adm-ordre { display: flex; gap: 3px; flex: none; }
.adm-ajout { display: flex; gap: 8px; margin-top: 12px; }
.adm-ajout input { flex: 1; min-width: 0; }

/* Raretés et finitions : un vrai tableau */
.adm-table { display: flex; flex-direction: column; }
.adm-table-tete, .adm-table-ligne { display: grid; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 2px dashed #e6dbc0; }
.adm-table.rar .adm-table-tete, .adm-table.rar .adm-table-ligne { grid-template-columns: 130px minmax(110px, 2fr) 92px minmax(70px, 1fr) minmax(70px, 1fr) 60px 110px; }
.adm-table.fin .adm-table-tete, .adm-table.fin .adm-table-ligne { grid-template-columns: minmax(120px, 2fr) minmax(80px, 1fr) 100px minmax(80px, 1fr) 110px; }
.adm-table-tete { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--gris); font-weight: 800; border-bottom: 3px solid var(--encre); }
.adm-table-ligne:last-child { border-bottom: 0; }
.adm-table-ligne input:not([type=color]) { width: 100%; min-width: 0; }
.adm-table-ligne .etiquette { color: #fff; font-style: normal; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-couleurs { display: flex; gap: 4px; }
.adm-couleurs input { width: 42px; height: 34px; padding: 2px; border: 2px solid var(--encre); border-radius: 9px; background: #fff; cursor: pointer; }

/* Propositions, corrections, signalements : des fiches centrées */
.adm-fiche { background: var(--creme); border: var(--contour); border-radius: 18px; box-shadow: 0 4px 0 var(--encre); padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.adm-fiche.classee { opacity: .78; box-shadow: none; }
.adm-fiche > header { display: flex; gap: 12px; align-items: flex-start; }
.adm-fiche-titre { flex: 1; min-width: 0; }
.adm-fiche-titre h3 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.adm-fiche-titre p { margin: 3px 0 0; font-size: 13px; color: var(--gris); }
.adm-score { flex: none; min-width: 78px; text-align: center; padding: 6px 8px 4px; border-radius: 14px; background: #fff; border: 2px solid var(--encre); }
.adm-score b { display: block; font: 400 24px/1 var(--titre); }
.adm-score small { font-size: 10.5px; color: var(--gris); white-space: nowrap; }
.adm-score.plus { background: #dff7ea; }
.adm-score.moins { background: #ffe9e6; }
.adm-fiche-texte { margin: 0; font-size: 15.5px; white-space: pre-line; overflow-wrap: anywhere; }
.adm-fiche-note { margin: 0; font-size: 14px; color: #3d5057; }
.adm-fiche-lien { font-size: 13.5px; overflow-wrap: anywhere; }
.adm-fiche-image img { max-height: 150px; max-width: 100%; border-radius: 12px; border: 2px solid var(--encre); display: block; margin-bottom: 4px; }
.adm-fiche > footer { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 2px dashed #e6dbc0; }

/* Joueurs */
.adm-item.joueur { flex-wrap: nowrap; }
.adm-item.joueur > .avatar { --t: 46px; flex: none; }
.adm-joueur-nom { flex: 1 1 200px; min-width: 0; }
.adm-joueur-nom a { color: var(--encre); font-size: 16.5px; overflow-wrap: anywhere; }
.adm-joueur-nom small { color: var(--gris); }
.adm-joueur-puces { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.adm-joueur-puces .etiquette { font-size: 11px; }
.adm-joueur-chiffres { display: grid; grid-template-columns: repeat(4, 64px); gap: 4px; flex: none; }
.adm-joueur-chiffres span { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--gris); }
.adm-joueur-chiffres b { font-size: 15px; color: var(--encre); }
.adm-joueur-vu { flex: 0 0 96px; color: var(--gris); font-size: 12px; text-align: right; }

/* La fiche d'un joueur */
.fj-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 46px; }
.fj-tete .avatar { --t: 64px; flex: none; }
.fj-tete > div:nth-child(2) { flex: 1; min-width: 0; }
.fj-tete h2 { margin: 0; overflow-wrap: anywhere; }
.fj-tete p { margin: 2px 0 0; font-size: 13px; color: var(--gris); }
.fj-solde { flex: none; text-align: center; padding: 6px 12px 4px; border-radius: 14px; background: linear-gradient(180deg, #ffe680, var(--soleil)); border: 2px solid var(--encre); }
.fj-solde b { display: block; font: 400 22px/1 var(--titre); }
.fj-solde small { font-size: 11px; font-weight: 800; }
.fj-onglets { margin: 0 0 12px; }
.fj-onglets .onglet { font: inherit; font-weight: 800; }
.fj-bloc { background: var(--creme2); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.fj-bloc h3 { margin: 0; font-size: 17px; }
.fj-bloc p { margin: 0; }
.fj-rapide { gap: 6px; }
.fj-resultats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.fj-resultats:empty { display: none; }
.fj-carte { display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: center; padding: 5px; background: #fff; border: 2px solid var(--encre); border-radius: 12px; cursor: pointer; font: inherit; color: var(--encre); min-width: 0; }
.fj-carte img, .fj-carte > span { width: 100%; height: 62px; object-fit: cover; border-radius: 8px; background: #1c3942; display: block; }
.fj-carte b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fj-carte small { font-size: 11px; color: var(--gris); }
.fj-carte.choisie { outline: 4px solid var(--marais); outline-offset: 1px; }
.fj-perms { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

/* L'interrupteur : une case à cocher qui se lit comme un bouton allumé / éteint */
.interrupteur { display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; background: var(--creme2); border-radius: 14px; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.interrupteur i { flex: none; width: 46px; height: 26px; border-radius: 999px; background: #cfd8d6; border: 2px solid var(--encre); position: relative; margin-top: 2px; }
.interrupteur i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--encre); transition: left .15s; }
.interrupteur input:checked + i { background: var(--marais); }
.interrupteur input:checked + i::after { left: 22px; }
.interrupteur input:focus-visible + i { outline: 3px solid var(--ciel); outline-offset: 2px; }
.interrupteur span { display: flex; flex-direction: column; min-width: 0; }
.interrupteur small { font-size: 13px; color: var(--gris); }

/* Paliers et récompenses : des lignes à ajouter */
.adm-ligne-edit { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 6px; }
.adm-ligne-edit label { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; font-weight: 800; color: var(--gris); }
.adm-ligne-edit input { width: 100%; min-width: 0; }
.adm-apercu-annonce { background: var(--encre); color: #fff; border-radius: 14px; padding: 8px 12px; margin: 4px 0 12px; }
.adm-apercu-annonce small { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #7fa8a0; font-weight: 800; }
.adm-apercu-annonce p { margin: 2px 0 0; overflow-wrap: anywhere; }

/* Réglages */
.reg-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.reg-champ { background: #fff; border: 2px solid rgba(16, 36, 43, .18); border-radius: 14px; padding: 9px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.reg-champ.interrupteur { flex-direction: row; }
.reg-champ label { display: flex; flex-direction: column; }
.reg-champ label small, .reg-champ small { font-size: 12.5px; color: var(--gris); font-weight: 400; }
.reg-champ.change { border-color: var(--soleil2); background: #fff8dc; }
.reg-saisie { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.reg-saisie input { flex: 1; min-width: 0; }
.reg-saisie .lien-btn { font-size: 12px; color: var(--gris); white-space: nowrap; }
.reg-barre { position: sticky; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; background: var(--encre); color: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.reg-barre span { font-weight: 800; }
table.tableau.journal td { vertical-align: top; }
table.tableau.journal .etiquette { font-size: 11px; }

/* Boîte à idées : l'avis des aides, et la page des aides */
.idee-avis { margin: 0; font-size: 13px; color: var(--gris); }
.idee-avis b { display: inline-block; min-width: 34px; text-align: center; padding: 1px 8px 0; border-radius: 999px; background: #e9dfc4; color: var(--encre); font: 400 16px var(--titre); margin-right: 4px; }
.idee-avis.plus b { background: var(--marais); }
.idee-avis.moins b { background: #ff9a8f; }
.idee-modif { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border-radius: 12px; background: #eaf6ff; border: 2px solid var(--ciel); font-size: 13px; }
.idee-modif small { color: var(--gris); font-weight: 800; }
.idee-modif .btn { align-self: flex-start; margin-top: 4px; }
.aide-progres { background: var(--creme); border: var(--contour); border-radius: 16px; box-shadow: 0 3px 0 var(--encre); padding: 10px 14px; margin-bottom: 12px; }
.aide-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 12px; }
.aide-grille .carte { --carte: 10px; }
.aide-tuile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .16); border-radius: 18px; min-width: 0; }
.aide-tuile.vote-plus { border-color: var(--marais); background: rgba(19, 194, 123, .16); }
.aide-tuile.vote-moins { border-color: #ff9a8f; background: rgba(228, 50, 43, .14); }
.aide-votes { display: flex; align-items: center; gap: 8px; }
.aide-votes .btn { min-width: 58px; }
.aide-votes .btn.choisi { outline: 4px solid #fff; outline-offset: 1px; }
.aide-votes b { min-width: 40px; text-align: center; color: #fff; font: 400 22px var(--titre); }
.aide-tuile small { color: #cfe8df; font-size: 12.5px; text-align: center; }

@media (max-width: 800px) {
  .admin-menu { overflow-x: auto; flex-wrap: nowrap; }
  .admin-menu a { white-space: nowrap; flex: none; }
  .adm-tete h2 { font-size: 25px; }
  .adm-item.joueur { flex-wrap: wrap; }
  .adm-joueur-chiffres { grid-template-columns: repeat(4, 1fr); flex: 1 1 100%; order: 3; }
  .adm-joueur-vu { flex: 1; text-align: left; order: 4; }
  .adm-item.joueur > .btn { order: 5; }
  .adm-table-tete { display: none; }
  .adm-table.rar .adm-table-ligne { grid-template-columns: 1fr 92px 1fr 1fr; }
  .adm-table.rar .adm-table-ligne > span:first-child, .adm-table.rar .adm-table-ligne > input[name=name] { grid-column: span 2; }
  .adm-table.rar .adm-table-ligne > button { grid-column: 1 / -1; }
  .adm-table.fin .adm-table-ligne { grid-template-columns: 1fr 1fr; }
  .adm-item.cat { flex-wrap: wrap; }
  .adm-ligne-edit { flex-wrap: wrap; }
  .adm-fiche > header { flex-direction: column; }
  .reg-grille { grid-template-columns: minmax(0, 1fr); }
}

/* ─── Le Marché ─── */
.marche-chiffres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.marche-chiffres > div { flex: 1 1 130px; background: var(--creme); border: var(--contour); border-radius: 16px; box-shadow: 0 3px 0 var(--encre); padding: 9px 12px 7px; min-width: 0; }
.marche-chiffres b { display: block; font: 400 24px/1.1 var(--titre); }
.marche-chiffres span { font-size: 12.5px; color: var(--gris); font-weight: 700; }
.marche-chiffres > .btn { flex: 0 0 auto; }
.marche-filtres { padding: 12px; margin-bottom: 10px; }
.marche-puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.puce-filtre { padding: 5px 13px 3px; border-radius: 999px; border: 2px solid var(--encre); background: #fff; font: 800 13.5px var(--texte); cursor: pointer; color: var(--encre); }
.puce-filtre.choisi { background: var(--marais); box-shadow: 0 2px 0 var(--encre); }
.marche-compte { margin: 0 0 10px; color: #fff; font-weight: 800; min-height: 20px; }
.marche-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 12px; }
.marche-grille .carte { --carte: 8.6px; }
.offre { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .16); border-radius: 18px; min-width: 0; }
.offre.mienne { border-color: var(--soleil); border-style: dashed; }
.offre-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 22px; }
.offre-badges .etiquette { font-size: 11.5px; }
.offre-prix { display: flex; flex-direction: column; align-items: center; line-height: 1.1; color: #fff; }
.offre-prix .pieces { font: 400 22px var(--titre); }
.offre-prix small { font-size: 12px; color: #cfe8df; }
.offre-infos { font-size: 12.5px; color: #cfe8df; text-align: center; overflow-wrap: anywhere; }
.offre-infos a { color: #fff; font-weight: 800; }
.marche-plus { display: flex; justify-content: center; margin-top: 16px; }
.marche-ventes { list-style: none; margin: 0; padding: 0; }
.marche-ventes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px; padding: 7px 0; border-bottom: 2px dashed #e6dbc0; }
.marche-ventes li:last-child { border-bottom: 0; }
.marche-ventes small { color: var(--gris); }
.marche-ventes .etiquette { font-style: normal; font-size: 11px; }
.marche-cherchees { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.marche-cherchees > div { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.marche-cherchees small { font-weight: 800; color: var(--gris); }
.conseil-prix { background: var(--creme2); border-radius: 12px; padding: 8px 10px; }
.conseil-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 4px 0; border-bottom: 2px dashed #e6dbc0; font-size: 14px; }
.conseil-ligne:last-of-type { border-bottom: 0; }
.conseil-ligne small { color: var(--gris); font-weight: 400; }
.achat { display: flex; gap: 16px; align-items: flex-start; }
.achat > .carte { flex: none; }
.achat-detail { flex: 1; min-width: 0; }
.achat-detail h3 { margin: 0; overflow-wrap: anywhere; }
.ventes-liste { padding: 4px 14px; }
.vente-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 0; border-bottom: 2px dashed #e6dbc0; }
.vente-ligne:last-child { border-bottom: 0; }
.vente-ligne > img, .vente-ligne > .plinko-sans { width: 52px; height: 68px; object-fit: cover; border-radius: 8px; border: 2px solid var(--encre); flex: none; }
.vente-titre { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.vente-titre .lien-btn { font-size: 16px; text-align: left; overflow-wrap: anywhere; }
.vente-titre small { color: var(--gris); font-size: 12.5px; }
.vente-prix { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.vente-prix .pieces { font: 400 22px var(--titre); }
.vente-prix small { color: var(--gris); font-size: 12px; }
.vente-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .marche-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
  .marche-grille .carte { --carte: min(8.6px, calc((50vw - 44px) / 19)); }
  .offre { padding: 8px 4px 10px; }
  .achat { flex-direction: column; align-items: center; }
  .vente-prix { align-items: flex-start; }
}

/* ─── Le profil ─── */
.profil { --accent: #13c27b; }
.profil-hero { position: relative; background: var(--creme); border: var(--contour); border-radius: 22px; box-shadow: var(--ombre), var(--ombre-douce); overflow: hidden; margin-bottom: 18px; }
.profil-banniere { position: relative; height: 170px; overflow: hidden; border-bottom: var(--contour); }
.profil-banniere::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .22) 1.2px, transparent 1.6px) 0 0 / 16px 16px, linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .28)); pointer-events: none; }
.profil-banniere-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profil-identite { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; padding: 0 20px; margin-top: -54px; position: relative; }
.profil-avatar .avatar { --t: 118px; border: 4px solid var(--creme); box-shadow: 0 4px 0 var(--encre); }
.profil-avatar .avatar-cadre { padding: 6px; box-shadow: 0 4px 0 var(--encre); }
.profil-avatar .avatar-cadre .avatar { border: 0; box-shadow: none; }
.profil-nom { flex: 1; min-width: 200px; padding-top: 58px; }
.profil-nom h1 { margin: 0; font-size: 38px; line-height: 1; overflow-wrap: anywhere; }
.profil-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.profil-badges .badge-joueur { margin-left: 0; }
.profil-titre { margin: 6px 0 0; display: inline-block; padding: 2px 12px 0; border-radius: 999px; background: var(--accent); color: var(--encre); font-weight: 800; font-size: 14px; border: 2px solid var(--encre); }
.profil-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; padding-bottom: 4px; }
.profil-bio { margin: 14px 20px 0; font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.profil-puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 20px 0; }
.profil-collection { margin: 16px 20px 0; }
.profil-collection .ligne { font-size: 14px; margin-bottom: 4px; }
.profil-jauge { height: 14px; border-radius: 999px; background: #e9dfc4; border: 2px solid var(--encre); overflow: hidden; }
.profil-jauge i { display: block; height: 100%; background: var(--accent); border-right: 2px solid var(--encre); }
.profil-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 16px 0 0; border-top: 2px dashed #e6dbc0; }
.profil-stats div { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; text-align: center; min-width: 0; }
.profil-stats div + div { border-left: 2px dashed #e6dbc0; }
.profil-stats b { font: 400 24px var(--titre); line-height: 1.1; }
.profil-stats span { font-size: 12px; color: var(--gris); font-weight: 700; }
.profil-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.profil-bloc { margin: 0; min-width: 0; border-top: 6px solid var(--accent); }
.profil-bloc.large { grid-column: 1 / -1; }
.profil-bloc-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin-bottom: 10px; }
.profil-bloc-tete h2 { margin: 0; }
.profil-bloc-tete small { color: var(--gris); font-weight: 700; }
.profil-vide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top-style: dashed; }
.profil-vide p { margin: 0; color: var(--gris); }
.profil-carte { display: flex; gap: 14px; align-items: flex-start; }
.profil-carte > .carte { flex: none; }
.profil-carte h3 { margin: 0 0 4px; overflow-wrap: anywhere; }
.profil-desc { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.profil-succes, .profil-activite { list-style: none; margin: 0; padding: 0; }
.profil-succes li, .profil-activite li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 7px 0; border-bottom: 2px dashed #e6dbc0; }
.profil-succes li:last-child, .profil-activite li:last-child { border-bottom: 0; }
.profil-succes span, .profil-activite small { color: var(--gris); font-size: 13px; }
.profil-activite .etiquette { font-style: normal; color: #fff; font-size: 11px; }

.perso h3 { margin: 16px 0 8px; font-size: 18px; }
.perso h3:first-child { margin-top: 4px; }
.perso-bannieres { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.perso-fond { height: 46px; border-radius: 12px; border: 3px solid var(--encre); cursor: pointer; font: inherit; }
.perso-fond.choisi, .perso-accent.choisi { outline: 4px solid var(--soleil); outline-offset: 2px; }
.perso-fond-carte { grid-column: span 2; background: var(--creme2); font-weight: 800; color: var(--encre); }
.perso-accents { display: flex; flex-wrap: wrap; gap: 10px; }
.perso-accent { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--encre); cursor: pointer; }
.perso-sections { list-style: none; margin: 0; padding: 0; }
.perso-sections li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 2px dashed #e6dbc0; }
.perso-sections li span { display: flex; gap: 4px; }
@media (max-width: 800px) {
  .profil-sections { grid-template-columns: minmax(0, 1fr); }
  .profil-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profil-stats div:nth-child(4) { border-left: 0; }
  .profil-stats div:nth-child(n+4) { border-top: 2px dashed #e6dbc0; }
  .profil-actions { align-items: flex-start; width: 100%; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .profil-banniere { height: 120px; }
  .profil-identite { padding: 0 14px; margin-top: -44px; gap: 10px; }
  .profil-avatar .avatar { --t: 92px; }
  .profil-nom { padding-top: 46px; min-width: 0; }
  .profil-nom h1 { font-size: 30px; }
  .profil-bio, .profil-puces, .profil-collection { margin-left: 14px; margin-right: 14px; }
  .profil-stats b { font-size: 20px; }
}

/* ─── Jamais trouvées ─── */
.filtres-jamais { margin: 14px 0 12px; flex-wrap: wrap; gap: 8px; }
.filtres-jamais select { flex: 0 1 220px; min-width: 0; }
.filtres-jamais [data-compte] { color: #fff; font-weight: 800; }
.jamais-case { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.jamais-case small { color: #cfe8df; font-size: 12px; text-align: center; overflow-wrap: anywhere; max-width: calc(19 * 8px + 12px); }

/* ─── Le Gratt'Algator ─── */
.grattage .plinko-corps { grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); }
.grat-ligne { display: flex; flex-direction: column; gap: 6px; }
.grat-etiquette { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #cfe8df; }
.grat-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.grat-choix .btn.choisi { background: var(--citron); color: var(--encre); }
.grat-aide { margin: -2px 0 2px; font-size: 13px; color: #cfe8df; }
.grat-aide .lien-btn { color: var(--citron); }
.grat-table { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.grat-file { display: flex; flex-wrap: wrap; gap: 5px; }
.grat-file span { padding: 2px 10px 0; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 800; }
.grat-file span.actif { outline: 2px solid var(--soleil); }
.grat-file span.gagne { background: var(--citron); color: var(--encre); }
.grat-file span.perdu { color: #ff9a8f; }
.grat-rarites { display: flex; flex-wrap: wrap; gap: 6px; }
.grat-rarites span { padding: 3px 10px; border-radius: 999px; background: var(--creme); border: 2px solid var(--encre); font-size: 13px; }

/* Le ticket : papier crème, encoches sur les côtés comme un vrai ticket détaché. */
.ticket { --t1: #13c27b; --t2: #0d6b52; position: relative; max-width: 520px; width: 100%; margin: 0 auto; padding: 14px 14px 12px; color: var(--encre);
  background: linear-gradient(160deg, #fffaf0 0%, #fff3d6 100%); border: 3px solid var(--encre); border-radius: 18px; box-shadow: 0 8px 0 rgba(0, 0, 0, .25); }
.ticket::before, .ticket::after { content: ''; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #0b4a40; border: 3px solid var(--encre); }
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }
.ticket.niv-facile { --t1: #1f9bff; --t2: #0b4f8a; }
.ticket.niv-difficile { --t1: #a24bff; --t2: #4b1d86; }
.ticket.niv-extreme { --t1: #e4322b; --t2: #10242b; }
.ticket-tete { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: linear-gradient(120deg, var(--t1), var(--t2)); color: #fff; }
.ticket-tete img, .ticket-tete .plinko-sans { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid #fff; flex: none; }
.ticket-titre { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
.ticket-titre b { font: 400 24px var(--titre); letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.ticket-titre span { font-size: 13px; font-weight: 800; }
.ticket-titre small { font-size: 12px; opacity: .9; }
.ticket-lot { flex: none; text-align: center; padding: 4px 10px; border-radius: 10px; background: var(--soleil); color: var(--encre); border: 2px solid var(--encre); line-height: 1.1; }
.ticket-lot small { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ticket-lot b { font: 400 20px var(--titre); }
.ticket-regle { margin: 10px 0 8px; text-align: center; font-size: 14px; }
.ticket-zone { position: relative; border-radius: 14px; overflow: hidden; }
.ticket-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; background: #f3ead2; border-radius: 14px; border: 2px solid rgba(16, 36, 43, .25); }
.gc { aspect-ratio: 1.25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 12px; background: #fff; border: 2px solid rgba(16, 36, 43, .2); font-weight: 800; min-width: 0; }
.gc .piece { width: 42%; height: auto; }
.gc b { font-size: clamp(12px, 3.4vw, 18px); color: var(--t2); white-space: nowrap; }
.gc.non { color: #a9b2b6; font-size: 12px; }
.gc.non svg { width: 34%; }
.gc.oui.vu { background: #fff6c8; border-color: var(--soleil); animation: case-pop .35s ease-out; }
.gc.alu-vide { background: linear-gradient(135deg, #b9c0c6, #eef1f3 40%, #9ea6ad); }
@keyframes case-pop { 0% { transform: scale(.8); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
.ticket-alu { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; border-radius: 14px; }
.ticket-alu:active { cursor: grabbing; }
.ticket-pied { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-top: 10px; }
.ticket-resultat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 16px; }
.ticket-resultat b { font: 400 22px var(--titre); }
.ticket.perdant .ticket-resultat b { color: #b23a2e; }
.ticket.gagnant .ticket-resultat b { color: var(--t2); }
.ticket.jackpot { box-shadow: 0 8px 0 rgba(0, 0, 0, .25), 0 0 0 4px var(--soleil); }
.ticket.jackpot .ticket-resultat b { color: #c47b00; font-size: 28px; }
/* Jackpot : les cases dorées respirent doucement, sans clignoter. */
.ticket.jackpot .gc.oui { animation: case-or 1.6s ease-in-out infinite alternate; }
@keyframes case-or { from { background: #fff6c8; } to { background: #ffe680; } }
.grat-total { text-align: center; padding: 18px 12px; background: rgba(255, 255, 255, .08); border-radius: 18px; }
.grat-total h2 { margin: 0; }
.grat-total p { margin: 4px 0 10px; color: #cfe8df; }
.grat-total-gain { font: 400 40px var(--titre); margin-bottom: 12px; }
.grat-total .grat-file { justify-content: center; }
@media (max-width: 800px) {
  .grattage .plinko-corps { grid-template-columns: minmax(0, 1fr); }
  .grat-table { order: -1; }
  .ticket-titre b { font-size: 20px; }
}
@media (max-width: 480px) {
  .ticket { padding: 12px 10px 10px; }
  .ticket-titre b { font-size: 17px; letter-spacing: 0; }
  .ticket-tete { gap: 7px; padding: 6px; }
  .ticket-tete img, .ticket-tete .plinko-sans { width: 36px; height: 48px; }
  .ticket-lot { padding: 3px 6px; }
  .ticket-lot b { font-size: 16px; }
  .ticket-grille { gap: 6px; padding: 6px; }
}

/* ─── La nouvelle interface (body.ui-v2). Sans cette classe, tout reste comme avant. ─── */
body.ui-v2 { --nav-l: 264px; }
body.ui-v2 #nav { padding: 14px 12px 18px; gap: 6px; background: linear-gradient(180deg, #10242b, #0c1d23); border-right: 3px solid #07151a; }
body.ui-v2 .nav-groupe { padding: 10px 6px 2px; }
.nav2-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nav2-tuile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 8px 4px 6px; border-radius: 14px; background: #17323a; border: 2px solid #24454f; box-shadow: 0 3px 0 #07151a; color: #dcefe7; text-decoration: none; text-align: center; font-size: 12.5px; line-height: 1.15; min-width: 0; }
.nav2-tuile .ico { width: 22px; height: 22px; }
.nav2-tuile span { overflow-wrap: anywhere; }
.nav2-tuile:hover { background: #1e404a; transform: translateY(-1px); }
.nav2-tuile:active { transform: translateY(2px); box-shadow: 0 1px 0 #07151a; }
.nav2-tuile.actif { background: linear-gradient(180deg, #4be39f, var(--marais)); color: var(--encre); border-color: #063; box-shadow: 0 3px 0 #063; }
.nav2-tuile.large { grid-column: 1 / -1; flex-direction: row; gap: 10px; min-height: 44px; font-size: 15px; }
.nav2-tuile.admin { border-color: var(--soleil2); color: var(--soleil); }
.nav2-tuile.admin.actif { color: var(--encre); background: linear-gradient(180deg, #ffe680, var(--soleil)); box-shadow: 0 3px 0 #8a5a00; }
.nav2-tuile .pastille { position: absolute; top: 4px; right: 6px; margin: 0; }
.nav2-joueur { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 16px; background: #17323a; border: 2px solid #24454f; box-shadow: 0 3px 0 #07151a; text-decoration: none; color: #fff; }
.nav2-joueur:hover { background: #1e404a; }
.nav2-joueur .avatar { --t: 46px; }
.nav2-joueur-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nav2-joueur-texte b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav2-joueur-texte small { font-size: 12px; color: #9cc6bb; }
.nav2-xp, .barre2-chip.niveau > i { display: block; height: 7px; border-radius: 999px; background: #0c1d23; border: 2px solid #07151a; overflow: hidden; margin-top: 3px; }
.nav2-xp > i, .barre2-chip.niveau > i > i { display: block; height: 100%; background: var(--citron); }
.nav2-invite { display: flex; flex-direction: column; gap: 8px; }

/* La barre du haut : elle reste visible, avec le coffre du jour, le niveau, les pièces et la cloche. */
body.ui-v2 #barre { position: sticky; top: 0; z-index: 30; gap: 8px; padding: 10px 28px; min-height: 60px; background: linear-gradient(180deg, rgba(8, 40, 42, .92), rgba(8, 40, 42, .7) 70%, transparent); backdrop-filter: blur(6px); max-width: none; }
.barre2-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px 4px; border-radius: 999px; background: var(--creme); border: var(--contour); box-shadow: 0 3px 0 var(--encre); text-decoration: none; color: var(--encre); font-size: 15px; position: relative; }
.barre2-chip:hover, .barre2-avatar:hover, .barre2-coffre:hover { transform: translateY(-1px); }
.barre2-chip.rond { padding: 6px 9px 4px; }
.barre2-chip.rond .pastille { position: absolute; top: -7px; right: -7px; border: 2px solid var(--encre); }
.barre2-chip.niveau { flex-direction: column; align-items: stretch; gap: 0; padding: 4px 13px 5px; min-width: 76px; line-height: 1.1; }
.barre2-chip.niveau > i { background: #e9dfc4; border-color: var(--encre); margin-top: 2px; height: 8px; }
.barre2-chip.niveau > i > i { background: var(--marais); }
.barre2-avatar { display: inline-flex; border-radius: 50%; box-shadow: 0 3px 0 var(--encre); }
.barre2-avatar .avatar { --t: 40px; }
.barre2-coffre { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 4px 9px; border-radius: 999px; background: linear-gradient(180deg, #ffe680, var(--soleil)); border: var(--contour); box-shadow: 0 3px 0 var(--encre); font: inherit; font-size: 14.5px; color: var(--encre); cursor: pointer; }
.barre2-coffre .piece { width: 22px; height: 22px; }
body.ui-v2 #page { padding-top: 4px; }

/* L'accueil */
.acc2 { display: flex; flex-direction: column; gap: 16px; }
/* Dans une colonne flex, « margin: auto » ferait prendre au présentoir la largeur de son contenu : il dépassait sur téléphone. */
.acc2 > * { min-width: 0; max-width: 100%; }
.acc2 > .presentoir { width: 100%; max-width: 640px; align-self: center; }
.acc2 > .panneau, .acc2 #missions-accueil > .panneau { margin-top: 0 !important; }
.acc2-nouveau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 9px 14px; border-radius: 14px; background: #d9f2ff; border: 2px solid var(--ciel); font-size: 14.5px; }
.acc2-bonjour { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 16px 18px; border-radius: 22px; background: var(--creme); border: var(--contour); box-shadow: var(--ombre), var(--ombre-douce); }
.acc2-bonjour > .avatar, .acc2-bonjour > .avatar-cadre .avatar { --t: 78px; }
.acc2-bonjour-texte { flex: 1 1 260px; min-width: 0; }
.acc2-bonjour h1 { font-size: clamp(26px, 3.6vw, 38px); overflow-wrap: anywhere; }
.acc2-bonjour.invite p { margin-top: 6px; font-size: 16px; }
.acc2-progres { margin: 8px 0 5px; font-size: 14px; }
.acc2-bonjour-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.acc2-raccourcis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.acc2-raccourci { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px 9px; border-radius: 18px; background: var(--creme); border: var(--contour); box-shadow: 0 4px 0 var(--encre); text-decoration: none; color: var(--encre); text-align: center; min-width: 0; }
.acc2-raccourci:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--encre); }
.acc2-raccourci:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--encre); }
.acc2-raccourci .ico { width: 30px; height: 30px; }
.acc2-raccourci b { font: 400 17px var(--titre); letter-spacing: .4px; }
.acc2-raccourci small { font-size: 12px; color: var(--gris); font-weight: 700; }
.acc2-raccourci.vif { background: linear-gradient(180deg, #ffe680, var(--soleil)); }
.acc2-raccourci.vif small { color: var(--encre); }
.acc2-colonnes { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.acc2-principal { min-width: 0; position: relative; z-index: 1; overflow: hidden; padding: 0 2px; }
/* Les rangées de cartes restent dans leur colonne (elles ne passent plus sous la colonne de droite), avec des cartes plus petites. */
.acc2-principal .defile-h { margin: -22px 0 -26px; padding: 30px 6px 36px; }
.acc2-principal .carte.moyenne { --carte: 8.2px; }
.acc2-principal > .sous-section:first-child { margin-top: 4px; }
.acc2-cote { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.acc2-cote > .panneau, .acc2-cote .cdj-place > .panneau { margin: 0; }
.acc2-cote .cdj-place:empty { display: none; }
.acc2-evenements { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.acc2-evenements .panneau { margin: 0; text-decoration: none; display: block; }
.acc2-coupe { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }


/* L'accueil : la colonne de gauche remplie */
.acc2-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.acc2-duo > .panneau { margin: 0; min-width: 0; }
.acc2-duo h2, .acc2-cote h2 { font-size: 22px; }
.acc2-cote .ligne.ecart { flex-wrap: nowrap; }
.acc2-fil ul, .acc2-marche ul { list-style: none; margin: 8px 0 0; padding: 0; }
.acc2-fil li { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 2px dashed #e6dbc0; font-size: 14px; }
.acc2-fil li:last-child { border-bottom: 0; }
.acc2-fil li > span { min-width: 0; overflow-wrap: anywhere; }
.acc2-fil .avatar { --t: 32px; border-width: 2px; padding: 1px; }
.acc2-fil small { display: block; color: var(--gris); font-size: 12px; margin-top: 1px; }
.acc2-fil .etiquette { font-style: normal; color: #fff; font-size: 10.5px; }
.acc2-fil .lien-btn, .acc2-marche .lien-btn { text-align: left; }
.acc2-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.acc2-chiffres span { display: flex; flex-direction: column; background: #fff; border: 2px solid rgba(16, 36, 43, .18); border-radius: 12px; padding: 6px 10px 4px; font-size: 12px; color: var(--gris); }
.acc2-chiffres b { font: 400 22px var(--titre); color: var(--encre); }
.acc2-marche h3 { margin: 12px 0 0; font-size: 15px; }
.acc2-marche li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 2px dashed #e6dbc0; font-size: 14px; }
.acc2-marche li:last-child { border-bottom: 0; }
.acc2-marche li small { color: var(--gris); white-space: nowrap; }
.acc2-jamais { margin-top: 18px; }
.acc2-principal .acc2-jamais-cartes { margin: -18px -6px -16px; padding: 26px 6px 26px; }
.acc2-jamais .btn { margin-top: 4px; }

@media (max-width: 1000px) {
  body.ui-v2 #barre { padding: 8px 14px; gap: 6px; }
  body.ui-v2 #nav { width: min(310px, 88vw); padding-bottom: 90px; }
  .barre2-chip.niveau, .barre2-avatar { display: none; }
  .barre2-coffre span { display: none; }
  .barre2-coffre { padding: 6px 9px 4px; }
  .acc2-colonnes { grid-template-columns: minmax(0, 1fr); }
  .acc2-bonjour-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .acc2-bonjour > .avatar, .acc2-bonjour > .avatar-cadre .avatar { --t: 58px; }
}
@media (max-width: 480px) {
  .acc2-raccourcis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc2-bonjour { padding: 12px 14px; }
}

/* ─── Mode photosensible ─── */
body.photosensible *, body.photosensible *::before, body.photosensible *::after { animation: none !important; transition: none !important; }

/* ─── Musée, carte du jour, statistiques, historique ─── */
.cdj-corps { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; }
.cdj-corps > .carte { flex: none; }
.stats-monde { margin-top: 4px; }
.titre-stats { font-size: 18px; margin: 0 0 6px; }
.stats.stats-carte { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stats-carte .stat span { font-size: 12px; }
.stats-carte .stat b { font-size: 20px; }
[data-frise] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 10px; align-items: start; }
[data-frise] > .sous-section, [data-frise] > .vide { grid-column: 1 / -1; }
.musee-oeuvre .carte.petite { --carte: 5.6px; }
.musee-oeuvre { display: flex; gap: 14px; align-items: flex-start; padding: 12px; margin: 0; background: var(--creme); border: var(--contour); border-radius: var(--rayon); box-shadow: var(--ombre-douce); }
.musee-oeuvre > .carte { flex: none; }
.musee-oeuvre h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.musee-texte { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.musee-annee { margin-top: 22px; }
.musee-fete { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ligne-historique { padding: 10px 0; border-bottom: 2px dashed #e6dbc0; gap: 6px; }
.ligne-historique:last-child { border-bottom: 0; }
@media (max-width: 520px) {
  .cdj-corps { flex-direction: column; align-items: center; text-align: center; }
  .cdj-corps .ligne { justify-content: center; }
  .musee-oeuvre { gap: 10px; padding: 10px; }
  .stats.stats-carte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .musee-oeuvre .carte.petite { --carte: 4.6px; }
}
.cdj-place:empty { display: none; }
.cdj-place > .panneau { height: 100%; }
.carte-du-jour .stats.stats-carte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.carte-du-jour .cdj-corps h3 { overflow-wrap: anywhere; }
.badge-pionnier { background: linear-gradient(135deg, #f5a700, #b06c00); }
.pionnier-ligne { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; padding: 7px 10px; border-radius: 12px; background: #fff3cf; font-size: 13px; font-weight: 700; }
.pionnier-ligne svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.jamais-trouvees { margin-top: 18px; }
.jamais-nombre { font: 400 30px/1 var(--titre, inherit); color: var(--soleil2); -webkit-text-stroke: 1.5px var(--encre); }

/* ─── Bouteille à la mer ─── */
.bouteille-mer { background: linear-gradient(180deg, var(--creme) 0%, var(--creme) 62%, #d8f1f4 100%); }
.bouteille-arrivee { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0; }
.bouteille-arrivee h2 { margin: 0; }
.bouteille-sur-titre { font: 400 20px/1.1 var(--titre); color: var(--ciel); -webkit-text-stroke: 1px var(--encre); margin: 0; }
.bouteille-arrivee .carte { animation: bouteille-retour .9s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes bouteille-retour { from { transform: rotateY(90deg) translateY(14px); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bouteille-arrivee .carte { animation: none; } }
body.photosensible .bouteille-arrivee .carte { animation: none; }

/* ─── Algator Fan Cards : ses couleurs à lui ─── */
:root {
  --marais: #ff3d7f; --marais2: #d81b60; --citron: #25f4ee; --rose: #ff3d7f; --violet: #8b5cf6;
  --fond1: #150a2e; --fond2: #2a1150; --fond3: #43166e;
}
body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M16 10l2 5 5 2-5 2-2 5-2-5-5-2 5-2zM46 38l1.5 3.5 3.5 1.5-3.5 1.5L46 48l-1.5-3.5L41 43l3.5-1.5z' fill='%23ffffff' fill-opacity='.07'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 20% 0%, rgba(255, 61, 127, .22), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(37, 244, 238, .16), transparent 50%),
    linear-gradient(160deg, var(--fond1), var(--fond2) 60%, var(--fond3));
}
.logo .l1 { color: #fff; -webkit-text-stroke: 1px #2a1150; text-shadow: 0 3px 0 #ff3d7f; letter-spacing: 1px; }
.logo .l2 { background: linear-gradient(90deg, #ff3d7f, #8b5cf6); color: #fff; border: 2px solid #150a2e; box-shadow: 0 3px 0 #25f4ee; }
.nav-lien.actif { border-color: #150a2e; box-shadow: 0 3px 0 #150a2e; color: #fff; }
body.ui-v2 #nav { background: linear-gradient(180deg, #1d0f3d, #12082a); border-right-color: #0a0418; }
.nav2-tuile { background: #2a1752; border-color: #3d2373; box-shadow: 0 3px 0 #0a0418; color: #f1e8ff; }
body.ui-v2 #barre { background: linear-gradient(180deg, rgba(21, 10, 46, .94), rgba(21, 10, 46, .72) 70%, transparent); }
.nav2-tuile:hover { background: #3a2170; }
.btn.vert { background: linear-gradient(180deg, #ff7aa8, var(--marais)); color: #fff; }
.presentoir { background: radial-gradient(circle at 50% 34%, #5a1f8a, #150a2e 68%); }
.nav2-tuile.actif { background: linear-gradient(180deg, #ff7aa8, var(--marais)); color: #fff; border-color: #150a2e; box-shadow: 0 3px 0 #25f4ee; }

/* ─── Le thème « Interface moche » (body.ui-moche) : 100 fois plus moche, exprès.
   Couleurs criardes, Comic Sans et bordures en relief, mais RIEN qui bouge ni qui clignote (règle photosensible). ─── */
body.ui-moche, body.ui-moche button, body.ui-moche input, body.ui-moche select, body.ui-moche textarea { font-family: 'Comic Sans MS', 'Comic Neue', 'Chalkboard SE', cursive !important; }
body.ui-moche {
  --encre: #000080; --creme: #ffff00; --creme2: #ff99ff; --gris: #800000; --marais: #00ff00; --marais2: #008000; --citron: #ccff00;
  --soleil: #ff8000; --soleil2: #ff0000; --rose: #ff00ff; --ciel: #00ffff; --violet: #9900ff;
  --contour: 5px ridge #ff0000; --ombre: 8px 8px 0 #0000ff; --ombre-douce: none; --rayon: 0;
  --titre: 'Comic Sans MS', 'Comic Neue', cursive;
  color: #000080;
  background-color: #00ff00 !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='30' height='30' fill='%23ff00ff'/%3E%3Crect x='30' y='30' width='30' height='30' fill='%23ff00ff'/%3E%3Ctext x='8' y='52' font-size='22'%3E%E2%98%85%3C/text%3E%3C/svg%3E") !important;
  background-attachment: scroll !important;
}
body.ui-moche h1, body.ui-moche h2, body.ui-moche h3, body.ui-moche .titre-page, body.ui-moche .sous-section {
  font-family: 'Comic Sans MS', 'Comic Neue', cursive !important; font-weight: 700; letter-spacing: 0;
  color: #ff00ff !important; -webkit-text-stroke: 0 !important;
  text-shadow: 2px 2px 0 #00ffff, 4px 4px 0 #0000ff !important;
}
body.ui-moche .titre-page { display: inline-block; transform: rotate(-2deg); background: #ffff00; padding: 2px 12px; border: 4px dashed #ff0000; }
body.ui-moche .sous-section { transform: rotate(1deg); }
body.ui-moche .sous-titre, body.ui-moche #pied { color: #000080 !important; background: #ffffff; padding: 3px 8px; border: 2px dotted #ff0000; }
body.ui-moche #pied { margin: 0 14px 14px; }
body.ui-moche #pied::after { content: ' · Optimisé pour Internet Explorer 6 en 800×600 · Vous êtes le visiteur n° 000042'; color: #ff0000; font-weight: 700; }
body.ui-moche a { color: #0000ff; text-decoration: underline; }

/* Panneaux, blocs, fiches : jaune pétant, bordure en relief rouge, ombre bleue. */
body.ui-moche .panneau, body.ui-moche .adm-bloc, body.ui-moche .acc2-bonjour, body.ui-moche .profil-hero, body.ui-moche .fenetre, body.ui-moche .adm-fiche, body.ui-moche .adm-filtres,
body.ui-moche .marche-chiffres > div, body.ui-moche .aide-progres {
  background: #ffff00 !important; color: #000080; border: 5px ridge #ff0000 !important; border-radius: 0 !important; box-shadow: 8px 8px 0 #0000ff !important;
}
body.ui-moche .panneau:nth-of-type(even), body.ui-moche .acc2-cote > .panneau:nth-child(even) { background: #00ffff !important; border-style: outset !important; }
body.ui-moche .presentoir { background: #ff00ff !important; border: 6px groove #ffff00 !important; border-radius: 0 !important; }

/* Les boutons : dégradé vert-violet, relief gris, texte souligné. */
body.ui-moche .btn, body.ui-moche .onglet, body.ui-moche .puce-filtre, body.ui-moche .acc2-raccourci, body.ui-moche .barre2-chip, body.ui-moche .barre2-coffre {
  background: linear-gradient(180deg, #00ff00, #ff00ff) !important; color: #0000ff !important; text-decoration: underline;
  border: 4px outset #c0c0c0 !important; border-radius: 0 !important; box-shadow: 3px 3px 0 #000000 !important; font-weight: 700;
}
body.ui-moche .btn:active, body.ui-moche .onglet.actif, body.ui-moche .puce-filtre.choisi { border-style: inset !important; background: linear-gradient(180deg, #ff8000, #ffff00) !important; }
body.ui-moche .btn.rouge, body.ui-moche .btn.danger { background: linear-gradient(180deg, #ff0000, #800000) !important; color: #ffff00 !important; }
body.ui-moche .acc2-raccourci:nth-child(odd) { transform: rotate(-1.5deg); }
body.ui-moche .acc2-raccourci:nth-child(even) { transform: rotate(1.5deg); }
body.ui-moche .acc2-raccourci small, body.ui-moche .acc2-raccourci b { color: #000080 !important; }

/* Le menu : bleu roi, tuiles orange et violettes en pointillés. */
body.ui-moche #nav { background: #0000ff !important; border-right: 6px double #ffff00 !important; }
body.ui-moche .nav-groupe { color: #ffff00 !important; text-decoration: underline; font-size: 13px; }
body.ui-moche .nav2-tuile, body.ui-moche .nav-lien { background: #ff8000 !important; color: #000080 !important; border: 3px dotted #ffffff !important; border-radius: 0 !important; box-shadow: none !important; }
body.ui-moche .nav2-tuile:nth-child(even) { background: #9900ff !important; color: #ffff00 !important; }
body.ui-moche .nav2-tuile.actif, body.ui-moche .nav-lien.actif { background: #00ff00 !important; color: #ff00ff !important; border-style: double !important; }
body.ui-moche .nav2-joueur { background: #ff00ff !important; border: 4px ridge #00ffff !important; border-radius: 0 !important; }
body.ui-moche .logo .l1 { color: #ffff00 !important; text-shadow: 3px 3px 0 #ff0000 !important; -webkit-text-stroke: 0 !important; font-family: 'Comic Sans MS', cursive !important; }
body.ui-moche .logo .l2 { background: #00ff00 !important; color: #ff00ff !important; border-radius: 0 !important; font-family: 'Comic Sans MS', cursive !important; }
body.ui-moche #barre { background: #ff0000 !important; backdrop-filter: none !important; border-bottom: 5px ridge #ffff00; }
body.ui-moche #nav-mobile { background: #0000ff !important; border-top: 5px ridge #ffff00; }
body.ui-moche #nav-mobile a, body.ui-moche #nav-mobile button { color: #ffff00 !important; }

/* Les champs : rose, en creux. Les étiquettes : bleu ciel à bord noir. */
body.ui-moche input, body.ui-moche select, body.ui-moche textarea { background: #ffccff !important; color: #000080 !important; border: 3px inset #808080 !important; border-radius: 0 !important; }
body.ui-moche .etiquette, body.ui-moche .badge-joueur { border: 2px solid #000000; border-radius: 0 !important; }
body.ui-moche .barre, body.ui-moche .profil-jauge, body.ui-moche .adm-mini-barre { border-radius: 0 !important; border: 3px inset #808080 !important; background: #ffffff !important; }
body.ui-moche .barre > i, body.ui-moche .profil-jauge > i, body.ui-moche .adm-mini-barre > i { background: repeating-linear-gradient(90deg, #ff0000 0 10px, #ffff00 10px 20px) !important; }

/* Les cartes restent lisibles : elles sont le contenu du jeu. Juste un cadre vert fluo en pointillés. */
body.ui-moche .carte { outline: 4px dashed #00ff00; outline-offset: 3px; }
body.ui-moche .avatar { border: 4px ridge #ff00ff !important; border-radius: 0 !important; }
body.ui-moche .toast { background: #ff00ff !important; color: #ffff00 !important; border: 5px ridge #00ffff !important; border-radius: 0 !important; font-family: 'Comic Sans MS', cursive !important; }
body.ui-moche .voile { background: repeating-linear-gradient(45deg, rgba(255, 0, 255, .55) 0 20px, rgba(0, 255, 0, .55) 20px 40px) !important; }

/* ─── Thème avec une image (Thème Harleen) : sa tête en fond, sous un voile ─── */
body.fond-image { background-image: linear-gradient(160deg, rgba(20, 15, 8, .72), rgba(43, 35, 22, .62)), var(--fond-image); background-size: auto, 190px 190px; background-repeat: no-repeat, repeat; }

/* ─── Le code « harleen » : 30 secondes où tout devient Harleen ─── */
body.harleen-envahi { background-image: var(--harleen-tete); background-size: 150px 150px; background-repeat: repeat; }
body.harleen-envahi { --harleen-tete: url("/img/harleen-tete.jpg"); }
body.harleen-envahi :is(h1, h2, h3, h4, p, a, button, label, span, b, strong, small, i, em, li, td, th, dt, dd, option, .carte-titre, .carte-desc, .carte-rarete, .carte-num):not(.harleen-bandeau, .harleen-bandeau *) {
  color: transparent !important; text-shadow: none !important; -webkit-text-fill-color: transparent;
  background-image: var(--harleen-tete) !important; background-size: 1.25em 1.25em !important; background-repeat: repeat !important; background-color: transparent !important;
}
body.harleen-envahi :is(input, textarea, select):not(.harleen-bandeau *) { color: transparent !important; background: var(--harleen-tete) 0 0 / 1.6em 1.6em repeat !important; }
body.harleen-envahi svg:not(.harleen-bandeau *) { opacity: 0; }
body.harleen-envahi img:not(.harleen-bandeau *) { object-fit: cover; }
.harleen-bandeau { position: fixed; left: 50%; bottom: 18px; z-index: 9999; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
  background: #2b2316; color: #fff6e0; border: 3px solid #fff6e0; box-shadow: 0 6px 0 rgba(0, 0, 0, .35); font: 400 17px var(--titre); white-space: nowrap; }
.harleen-bandeau img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #fff6e0; }
.harleen-bandeau b { min-width: 2ch; text-align: center; font-size: 22px; color: #ffd23f; }
