/* ============================================================
   SITE CO — CHARTE
   ============================================================
   Nuit bleue du club (#092966), rouge (#C7282D), or des étoiles.
   Titres en Uni Sans (la police du club), texte en police système
   (SF sur Mac et iPhone : zéro chargement, rendu parfait).

   FLUIDITÉ : on n'anime que transform et opacity (le GPU s'en charge
   seul), jamais la mise en page. Les cartes hors écran ne sont pas
   dessinées (content-visibility). Le flou d'arrière-plan, coûteux, est
   réservé aux panneaux qui le méritent (fiche, palette de recherche).
*/

@font-face {
  font-family: "Uni Sans";
  src: url("/fonts/UniSansSemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --nuit: #040816;
  --nuit-2: #070e24;
  --nuit-3: #0b1636;
  --marine: #092966;
  --bleu: #2f6bff;
  --bleu-2: #5b8cff;
  --ciel: #8fb3ff;
  --rouge: #e0313a;
  --rouge-co: #c7282d;
  --or: #f5c451;
  --vert: #36d27a;
  --orange: #ff9f43;
  --texte: #eef3ff;
  --texte-2: #a9b6d6;
  --texte-3: #6f7da3;
  --ligne: rgba(143, 179, 255, .12);
  --ligne-2: rgba(143, 179, 255, .22);
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-3: rgba(255, 255, 255, .09);
  --rayon: 18px;
  --rayon-s: 12px;
  --ombre: 0 18px 50px -18px rgba(0, 0, 0, .7);
  --ombre-bleue: 0 20px 60px -20px rgba(47, 107, 255, .55);
  --titre: "Uni Sans", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --corps: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ressort: cubic-bezier(.2, .9, .25, 1.12);
  --doux: cubic-bezier(.22, .8, .24, 1);
  --menu: 268px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--nuit);
  color: var(--texte);
  font: 15px/1.5 var(--corps);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(47, 107, 255, .45); }
:focus-visible { outline: 2px solid var(--bleu-2); outline-offset: 2px; border-radius: 6px; }

/* ---------------- Le décor : une nuit qui bouge à peine ---------------- */
.decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.decor::before, .decor::after, .decor i {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform;
}
.decor::before { width: 62vw; height: 62vw; left: -18vw; top: -26vw; background: radial-gradient(circle, #123a9e 0%, transparent 65%); animation: derive1 28s ease-in-out infinite alternate; }
.decor::after { width: 52vw; height: 52vw; right: -16vw; bottom: -24vw; background: radial-gradient(circle, #6b1022 0%, transparent 62%); opacity: .38; animation: derive2 34s ease-in-out infinite alternate; }
.decor i { width: 40vw; height: 40vw; left: 38vw; top: 30vh; background: radial-gradient(circle, #0d2a7a 0%, transparent 60%); opacity: .35; animation: derive3 40s ease-in-out infinite alternate; }
.decor .grain {
  position: absolute; inset: -50%; width: 200%; height: 200%; border-radius: 0; filter: none; opacity: .05; animation: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes derive1 { to { transform: translate3d(12vw, 8vh, 0) scale(1.12); } }
@keyframes derive2 { to { transform: translate3d(-10vw, -6vh, 0) scale(1.1); } }
@keyframes derive3 { to { transform: translate3d(-14vw, 12vh, 0) scale(.9); } }

/* ---------------- Coque : menu + barre + vue ---------------- */
.coque { position: relative; z-index: 1; display: grid; grid-template-columns: var(--menu) 1fr; min-height: 100vh; }
.menu {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none;
  padding: 22px 14px 18px; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, rgba(7, 14, 36, .92), rgba(4, 8, 22, .96));
  border-right: 1px solid var(--ligne);
}
.menu::-webkit-scrollbar { display: none; }
.marque { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.marque img { width: 46px; height: 51px; filter: drop-shadow(0 8px 18px rgba(47, 107, 255, .45)); }
.marque b { display: block; font: 600 16px/1.05 var(--titre); letter-spacing: .06em; text-transform: uppercase; }
.marque span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; color: var(--texte-3); text-transform: uppercase; margin-top: 3px; }
.menu-titre { margin: 16px 10px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .18em; color: var(--texte-3); text-transform: uppercase; }
.menu a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--texte-2); font-weight: 650; font-size: 14px; transition: color .2s, background .2s;
}
.menu a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.menu a:hover { color: var(--texte); background: var(--surface); }
.menu a.est-actif { color: #fff; background: linear-gradient(90deg, rgba(47, 107, 255, .32), rgba(47, 107, 255, .06)); box-shadow: inset 0 0 0 1px rgba(91, 140, 255, .35); }
.menu a.est-actif::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--bleu-2); box-shadow: 0 0 14px var(--bleu); }
.menu a .compte { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--texte-3); background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.menu a .compte.est-alerte { color: #fff; background: var(--rouge); }
.menu-pied { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--ligne); font-size: 11.5px; color: var(--texte-3); }
.menu-pied b { color: var(--texte-2); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.barre {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 34px;
  background: linear-gradient(180deg, rgba(4, 8, 22, .9), rgba(4, 8, 22, .72));
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(143, 179, 255, .07);
}
.barre-fil { font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-3); }
.barre-fil b { color: var(--texte-2); }
.chercher {
  margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 300px; padding: 9px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--ligne); color: var(--texte-3); font-size: 13.5px; transition: border-color .2s, background .2s;
}
.chercher:hover { border-color: var(--ligne-2); background: var(--surface-3); color: var(--texte-2); }
.chercher kbd { margin-left: auto; font: 700 11px var(--corps); padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--texte-2); }
.bouton {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 12px; border: 1px solid var(--ligne-2);
  background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--texte); transition: transform .15s var(--ressort), background .2s, border-color .2s;
}
.bouton:hover { background: var(--surface-3); border-color: rgba(143, 179, 255, .4); }
.bouton:active { transform: scale(.96); }
.bouton.est-plein { background: linear-gradient(135deg, var(--bleu), #1d47c9); border-color: transparent; box-shadow: var(--ombre-bleue); }
.bouton svg { width: 16px; height: 16px; }
.bouton.est-occupe svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.vue { padding: 6px 34px 70px; min-width: 0; view-transition-name: vue; }

/* ---------------- Transitions de page ---------------- */
::view-transition-old(vue) { animation: 180ms var(--doux) both sortie; }
::view-transition-new(vue) { animation: 380ms var(--doux) both entree; }
@keyframes sortie { to { opacity: 0; transform: translate3d(0, -8px, 0) scale(.995); } }
@keyframes entree { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.995); } }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: var(--doux); }

/* ---------------- Titres de page ---------------- */
.entete { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 6px 0 26px; }
.entete h1 { margin: 0; font: 600 clamp(34px, 4.2vw, 58px)/.95 var(--titre); letter-spacing: .01em; text-transform: uppercase; }
.entete h1 em { font-style: normal; background: linear-gradient(90deg, var(--bleu-2), var(--ciel)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.entete p { margin: 8px 0 0; max-width: 760px; color: var(--texte-2); font-size: 15.5px; }
.surtitre { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--bleu-2); }
.surtitre::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.entete-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Chiffres clés ---------------- */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.chiffre {
  position: relative; overflow: hidden; padding: 18px 20px; border-radius: var(--rayon);
  background: linear-gradient(160deg, rgba(47, 107, 255, .14), rgba(255, 255, 255, .02) 55%); border: 1px solid var(--ligne);
}
.chiffre::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 60px at 85% 0%, rgba(143, 179, 255, .18), transparent); }
.chiffre span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-3); }
.chiffre b { display: block; margin-top: 6px; font: 600 40px/1 var(--titre); font-variant-numeric: tabular-nums; }
.chiffre small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--texte-2); }
.chiffre.est-rouge b { color: #ff6b72; }
.chiffre.est-or b { color: var(--or); }

/* ---------------- Contrôles : segments, puces, champs ---------------- */
.outils { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.segments { position: relative; display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--ligne); }
.segments button {
  position: relative; z-index: 1; border: 0; background: none; padding: 8px 15px; border-radius: 10px; font-weight: 750; font-size: 13.5px; color: var(--texte-2); transition: color .25s;
  white-space: nowrap;
}
.segments button.est-actif { color: #fff; }
.segments .glisseur { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: linear-gradient(135deg, var(--bleu), #2149c4); box-shadow: 0 8px 24px -10px var(--bleu); transition: transform .38s var(--ressort), width .38s var(--ressort); }
.segments button .n { margin-left: 6px; font-size: 11px; opacity: .7; }
.champ {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--ligne); min-width: 240px;
}
.champ input { flex: 1; border: 0; outline: 0; background: none; font-size: 14px; }
.champ input::placeholder { color: var(--texte-3); }
.champ svg { width: 16px; height: 16px; color: var(--texte-3); }
.liste-deroulante { position: relative; }
.liste-deroulante select {
  appearance: none; -webkit-appearance: none; padding: 9px 34px 9px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--ligne);
  font-weight: 650; font-size: 13.5px; color: var(--texte); cursor: pointer;
}
.liste-deroulante::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border: solid var(--texte-3); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.liste-deroulante select option { background: #0b1636; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 750; letter-spacing: .02em;
  background: var(--surface-2); border: 1px solid var(--ligne); color: var(--texte-2); white-space: nowrap;
}
.puce.est-rouge { color: #ffb3b7; background: rgba(224, 49, 58, .16); border-color: rgba(224, 49, 58, .35); }
.puce.est-orange { color: #ffd2a1; background: rgba(255, 159, 67, .14); border-color: rgba(255, 159, 67, .32); }
.puce.est-vert { color: #a9f0c6; background: rgba(54, 210, 122, .13); border-color: rgba(54, 210, 122, .3); }
.puce.est-bleu { color: #c8d8ff; background: rgba(47, 107, 255, .18); border-color: rgba(91, 140, 255, .38); }
.puce.est-or { color: #ffe3a1; background: rgba(245, 196, 81, .14); border-color: rgba(245, 196, 81, .32); }
.vide { padding: 60px 20px; text-align: center; color: var(--texte-3); }

/* ---------------- Étoiles ---------------- */
.etoiles { display: inline-flex; gap: 1px; line-height: 0; }
.etoiles svg { width: 14px; height: 14px; }
.etoiles .p { fill: var(--or); }
.etoiles .v { fill: rgba(255, 255, 255, .14); }

/* ---------------- Carte de joueur ---------------- */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; }
.carte {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; min-height: 300px; border-radius: 20px; overflow: hidden; cursor: pointer;
  background: linear-gradient(170deg, #12245a 0%, #0a1433 46%, #070d22 100%);
  border: 1px solid rgba(143, 179, 255, .16);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transition: transform .5s var(--doux), box-shadow .4s, border-color .3s;
  content-visibility: auto; contain-intrinsic-size: 196px 300px;
  isolation: isolate;
}
.carte::before { /* le reflet qui suit la souris */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 255, 255, .18), transparent 45%);
}
.carte:hover { border-color: rgba(143, 179, 255, .42); box-shadow: 0 26px 60px -26px rgba(47, 107, 255, .7); transition: transform .12s linear, box-shadow .4s, border-color .3s; }
.carte:hover::before { opacity: 1; }
.carte-photo { position: relative; height: 176px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, rgba(91, 140, 255, .35), transparent 60%); }
.carte-photo img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none; transform: translateX(-50%); object-fit: cover; transition: transform .6s var(--doux); }
.carte-photo img.est-portrait { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.carte:hover .carte-photo img { transform: translateX(-50%) scale(1.045); }
.carte-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, #0a1433); }
.carte-initiales { position: absolute; inset: 0; display: grid; place-items: center; font: 600 54px var(--titre); color: rgba(143, 179, 255, .28); }
.carte-poste { position: absolute; z-index: 2; top: 12px; left: 12px; min-width: 34px; height: 34px; padding: 0 9px; display: grid; place-items: center; border-radius: 11px; font: 600 17px var(--titre); background: rgba(4, 8, 22, .7); border: 1px solid var(--ligne-2); }
.carte-club { position: absolute; z-index: 2; top: 10px; right: 10px; width: 38px; height: 38px; padding: 5px; border-radius: 12px; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); }
.carte-club img { width: 100%; height: 100%; object-fit: contain; }
.carte-corps { position: relative; z-index: 2; padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.carte-nom { font: 600 18px/1.05 var(--titre); text-transform: uppercase; letter-spacing: .02em; }
.carte-nom small { display: block; font: 600 11.5px var(--corps); letter-spacing: .04em; text-transform: none; color: var(--texte-2); margin-bottom: 2px; }
.carte-ligne { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--texte-2); }
.carte-pied { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.carte.est-cache { display: none; }
.carte.est-signe { border-color: rgba(224, 49, 58, .55); }
.carte .ruban { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 6px 12px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; color: #fff; background: linear-gradient(90deg, #b3121d, #e0313a); }

/* ---------------- Sections et grilles de poste ---------------- */
.section { margin: 34px 0 14px; display: flex; align-items: baseline; gap: 14px; }
.section h2 { margin: 0; font: 600 24px var(--titre); text-transform: uppercase; letter-spacing: .03em; }
.section span { color: var(--texte-3); font-size: 13px; font-weight: 650; }
.section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ligne-2), transparent); }
.panneau { border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--ligne); padding: 20px; }

/* ---------------- Apparition au défilement ---------------- */
.apparait { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .7s var(--doux), transform .7s var(--doux); }
.apparait.est-vu { opacity: 1; transform: none; }

/* ---------------- Écran de chargement ---------------- */
.chargement { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--nuit); transition: opacity .6s var(--doux), visibility .6s; }
.chargement.est-fini { opacity: 0; visibility: hidden; }
.chargement-c { display: grid; justify-items: center; gap: 18px; }
.chargement img { width: 120px; animation: flotte 2.4s ease-in-out infinite; filter: drop-shadow(0 18px 40px rgba(47, 107, 255, .6)); }
.chargement-barre { width: 180px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.chargement-barre i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, var(--bleu), var(--ciel)); animation: charge 1.1s var(--doux) infinite; }
.chargement-t { font: 600 13px var(--titre); letter-spacing: .3em; color: var(--texte-3); text-transform: uppercase; }
/* Mot de passe du staff (version en ligne) */
.verrou { display: grid; gap: 12px; width: min(320px, calc(100vw - 32px)); margin-top: 8px; animation: verrou-entre .5s var(--doux) both; }
@keyframes verrou-entre { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
.verrou label { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.verrou input[type=password] {
  padding: 13px 15px; border-radius: 12px; border: 1px solid var(--ligne-2); background: var(--surface-2);
  color: var(--texte); font: 500 16px var(--corps); outline: none; transition: border-color .2s, box-shadow .2s;
}
.verrou input[type=password]:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(47, 107, 255, .25); }
.verrou .verrou-retenir { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--texte-3); }
.verrou .bouton { justify-content: center; padding: 12px 15px; font-size: 14px; }
.verrou .bouton:disabled { opacity: .6; }
.verrou-msg { min-height: 18px; margin: 0; text-align: center; font-size: 13px; color: var(--texte-3); }
.verrou-fermer { display: block; margin-top: 10px; padding: 0; background: none; border: 0; font-size: 12px; color: var(--texte-3); text-decoration: underline; cursor: pointer; }
@keyframes flotte { 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes charge { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* ---------------- Palette de recherche (⌘K) ---------------- */
.palette { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(2, 5, 14, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.palette.est-ouverte { display: flex; animation: fondu .18s var(--doux); }
.palette-boite { width: min(680px, 92vw); border-radius: 20px; overflow: hidden; background: rgba(9, 18, 46, .96); border: 1px solid var(--ligne-2); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9); animation: monte .32s var(--ressort); }
.palette-champ { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ligne); }
.palette-champ input { flex: 1; border: 0; outline: 0; background: none; font-size: 18px; }
.palette-res { max-height: 56vh; overflow-y: auto; padding: 8px; }
.palette-ligne { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.palette-ligne.est-choisi { background: rgba(47, 107, 255, .2); }
.palette-ligne .av { width: 38px; height: 38px; border-radius: 10px; overflow: hidden; background: var(--surface-2); flex: none; display: grid; place-items: center; font: 600 14px var(--titre); color: var(--texte-3); }
.palette-ligne .av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.palette-ligne b { display: block; font-weight: 750; }
.palette-ligne small { color: var(--texte-3); font-size: 12px; }
.palette-ligne .puce { margin-left: auto; }
@keyframes fondu { from { opacity: 0; } }
@keyframes monte { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.98); } }

/* ---------------- Fiche joueur (panneau) ---------------- */
.fiche-voile { position: fixed; inset: 0; z-index: 50; background: rgba(2, 5, 14, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s var(--doux); }
.fiche-voile.est-ouvert { opacity: 1; }
.fiche {
  position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(980px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #0a1638, #060c22 40%); border-left: 1px solid var(--ligne-2); box-shadow: -40px 0 120px -30px rgba(0, 0, 0, .9);
  transform: translate3d(100%, 0, 0); transition: transform .55s var(--doux);
}
.fiche.est-ouvert { transform: none; }
.fiche-fermer { position: absolute; z-index: 5; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--ligne-2); background: rgba(4, 8, 22, .6); display: grid; place-items: center; }

/* ---------------- Tableaux ---------------- */
.tableau { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tableau th { text-align: left; padding: 8px 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); border-bottom: 1px solid var(--ligne-2); position: sticky; top: 0; background: #0a1536; }
.tableau td { padding: 8px 10px; border-bottom: 1px solid var(--ligne); color: var(--texte-2); }
.tableau tbody tr { transition: background .15s; }
.tableau tbody tr:hover { background: rgba(47, 107, 255, .08); }

/* Monogramme d'un joueur sans photo : ses initiales sur un fond qui
   change avec le poste, pour qu'une grille sans photos reste vivante. */
.carte-initiales { background: radial-gradient(90% 80% at 50% 10%, hsla(var(--teinte, 222), 80%, 55%, .35), transparent 70%); color: rgba(220, 230, 255, .55); text-shadow: 0 10px 30px rgba(0, 0, 0, .4); letter-spacing: .04em; }

.carte-photo .carte-filigrane { position: absolute; left: 50%; top: 50%; width: 62%; height: auto; max-height: 82%; object-fit: contain;
  transform: translate(-50%, -54%) rotate(-8deg); opacity: .16; filter: grayscale(.2) saturate(1.3); }
.carte:hover .carte-photo .carte-filigrane { transform: translate(-50%, -54%) rotate(-4deg) scale(1.06); opacity: .24; transition: transform .6s var(--doux), opacity .4s; }

/* ---------------- Notifications ---------------- */
.toasts { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 420px; padding: 12px 16px; border-radius: 14px;
  background: rgba(10, 20, 50, .96); border: 1px solid var(--ligne-2); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  font-size: 13.5px; font-weight: 650; opacity: 0; transform: translate3d(0, 12px, 0) scale(.98); transition: opacity .3s var(--doux), transform .4s var(--ressort); }
.toast.est-visible { opacity: 1; transform: none; }
.toast i { width: 18px; height: 18px; flex: none; border-radius: 50%; }
.toast.est-ok i { background: var(--vert); box-shadow: 0 0 12px var(--vert); }
.toast.est-erreur { border-color: rgba(224, 49, 58, .5); }
.toast.est-erreur i { background: var(--rouge); }
.toast.est-info i { background: var(--bleu-2); }
.toast.est-attente i { border: 2px solid var(--bleu-2); border-right-color: transparent; animation: tourne .8s linear infinite; }

/* ---------------- Mobile ---------------- */
@media (max-width: 980px) {
  :root { --menu: 0px; }
  .coque { grid-template-columns: 1fr; }
  .menu {
    position: fixed; z-index: 40; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; gap: 2px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    overflow-x: auto; border-right: 0; border-top: 1px solid var(--ligne); background: rgba(4, 8, 22, .96);
  }
  .menu .marque, .menu .menu-titre, .menu .menu-pied { display: none; }
  .menu a { flex-direction: column; gap: 4px; padding: 8px 10px; font-size: 10.5px; white-space: nowrap; }
  .menu a.est-actif::before { display: none; }
  .menu a .compte { display: none; }
  .barre { padding: 12px 16px; }
  #maj span { display: none; }
  .barre-fil { font-size: 0; letter-spacing: 0; }
  .barre-fil b { font-size: 12px; letter-spacing: .14em; }
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .chiffre { padding: 14px 15px; }
  .chiffre b { font-size: 30px; }
  .entete { margin-bottom: 18px; }
  .chercher { min-width: 0; }
  .chercher span, .chercher kbd { display: none; }
  .vue { padding: 4px 16px 110px; }
  .toasts { left: 12px; right: 12px; bottom: 86px; }
  .toast { min-width: 0; max-width: none; }
  .grille-cartes { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
  .carte { min-height: 262px; contain-intrinsic-size: 156px 262px; }
  .carte-photo { height: 150px; }
}

/* Mode allégé (cf. app.js) et préférence système de transparence
   réduite : décor immobile, plus de flou d'arrière-plan. */
.allege .decor::before, .allege .decor::after, .allege .decor i { animation: none; }
.allege .barre, .allege .filtres, .allege .palette, .allege .fiche-voile { backdrop-filter: none; -webkit-backdrop-filter: none; }
.allege .barre { background: rgba(4, 8, 22, .96); }
.allege .filtres { background: rgba(8, 15, 38, .97); }
@media (prefers-reduced-transparency: reduce) {
  .decor::before, .decor::after, .decor i { animation: none; }
  .barre, .filtres, .palette, .fiche-voile { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .barre { background: rgba(4, 8, 22, .96); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
