:root {
  --bg: #0b0b0e;
  --panel: #17181c;
  --panel-soft: #121316;
  --panel-elevated: #1d1e23;
  --line: #25272e;
  --line-soft: #1d1f25;
  --text: #f2f3f5;
  --text-dim: #8e8f96;
  --text-muted: #5b5d65;
  --accent: #34d399;
  --accent-dim: #22a777;
  --accent-soft: rgba(52,211,153,0.12);
  --amber: #f5a524;
  --red: #ef4444;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "SFMono-Regular", "JetBrains Mono", Consolas, Menlo, monospace;
  --radius: 14px;
  --radius-lg: 18px;
  --tabbar-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-x: none;
  letter-spacing: -0.005em;
}

html, body { overflow-x: hidden; }
body { min-height: 100vh; }

#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 18px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}

.hidden { display: none !important; }

header { margin-bottom: 24px; }

h1 {
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.sub {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-family: var(--mono);
}
.sub b { color: var(--text); font-weight: 500; }

.dim { color: var(--text-dim); text-align: center; font-size: 0.85rem; font-family: var(--mono); }

.mode-row {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  background: var(--panel-soft);
  padding: 4px;
  border-radius: 12px;
}

.mode-btn {
  flex: 1;
  padding: 11px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 9px;
  transition: all 0.18s ease;
}

.mode-btn.active {
  background: var(--panel-elevated);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.04) inset;
}

.field { margin-bottom: 18px; }

label {
  display: block;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0;
}
label .hint {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 400;
  margin-left: 6px;
  font-family: var(--mono);
}
.press-legend {
  margin: 8px 2px 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}
.press-request-link {
  display: inline-block;
  margin: 9px 2px 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.press-request-link:hover { text-decoration: underline; }
.legend-list { display: flex; flex-direction: column; gap: 11px; margin: 4px 0 10px; }
.legend-row { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--text-dim); }
.legend-emoji { font-size: 1.3rem; width: 28px; text-align: center; flex: none; }
.fc-test { color: #34d399; font-weight: 700; font-size: 0.9em; }
.fv-press-d { display: inline-block; font-size: 0.7em; font-weight: 700; color: #fbbf24; border: 1px solid rgba(251,191,36,0.5); border-radius: 4px; padding: 0 4px; margin-left: 5px; vertical-align: middle; cursor: help; }

/* Note "estimation" sous le resultat du calculateur (presses derivees / D) */
.est-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 11px; padding: 9px 11px; background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.32); border-radius: 9px; }
.est-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; font-size: 0.66rem; font-weight: 700; color: #fbbf24; border: 1px solid rgba(251,191,36,0.55); border-radius: 5px; }
.est-text { font-size: 0.8rem; line-height: 1.4; }
.est-main { font-weight: 700; color: #fbbf24; }
.est-sub { color: var(--text-muted); margin-top: 2px; }

input[type=number],
input[type=text],
input[type=url],
input[type=email],
select,
textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  padding: 13px 15px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
input[type=number]:focus,
input[type=text]:focus,
input[type=url]:focus,
input[type=email]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea {
  resize: vertical;
  min-height: 60px;
  font-family: var(--sans);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a808c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
select optgroup { color: var(--text-dim); font-style: normal; }
select option { color: var(--text); background: var(--panel); }

.unit-toggle {
  display: inline-flex;
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 3px;
}
.unit-toggle button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.18s;
}
.unit-toggle button.active {
  background: var(--panel-elevated);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.two-col { display: flex; gap: 12px; }
/* Aligne les inputs EN BAS de chaque colonne + largeurs egales : sinon un libelle
   plus court (ex: "Humidite (%)") remonte son champ par rapport aux voisins
   ("Poids presse (g)" / "Temperature") sur petit ecran. */
.two-col > .field { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.two-col > .field > input, .two-col > .field > select { margin-top: auto; }
.two-col .field { flex: 1; }

.result {
  margin-top: 28px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  transition: background 0.25s, box-shadow 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.03) inset;
}

.result.danger {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(180deg, rgba(239,68,68,0.08), rgba(239,68,68,0.02));
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.12);
}
.result.danger .headline .big { color: var(--red); text-shadow: 0 0 18px rgba(239,68,68,0.35); }
.result.danger .headline .big span { color: rgba(239,68,68,0.7); }
.result.danger .headline .cap { color: var(--red); }
.result h2 {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.step {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.85rem;
  gap: 12px;
}
.step:last-of-type { border-bottom: none; }
.step .lbl { color: var(--text-dim); }
.step .val { color: var(--text); font-family: var(--mono); text-align: right; }

.headline {
  text-align: center;
}
.headline .cap {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.headline .big {
  color: var(--text);
  font-family: var(--mono);
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 10px 0 0;
}
.headline .big span { font-size: 0.95rem; color: var(--text-dim); font-weight: 400; margin-left: 4px; }
.headline .big-secondary {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.headline .big-secondary span { font-size: 0.78rem; margin-left: 3px; color: var(--text-muted); }
.headline .note { color: var(--text-muted); font-size: 0.75rem; }

.safety {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.safety.ok    { background: rgba(52,211,153,0.06); color: var(--accent); border-color: rgba(52,211,153,0.2); }
.safety.warn  { background: rgba(245,165,36,0.06); color: var(--amber); border-color: rgba(245,165,36,0.25); }
.safety.danger{ background: rgba(239,68,68,0.06);  color: var(--red);   border-color: rgba(239,68,68,0.25); }
.safety .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
  margin-top: 7px;
}
.safety .safety-text { display: flex; flex-direction: column; gap: 2px; }
.safety .safety-main { color: currentColor; }
.safety .safety-sub  { color: var(--text-dim); font-size: 0.76rem; }

.config { margin-top: 24px; padding-top: 18px; }
.config summary {
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; gap: 6px;
}
.config summary::before {
  content: '+'; color: var(--text-muted); font-family: var(--mono); font-size: 0.9rem;
}
.config[open] summary::before { content: '−'; }
.config summary:hover { color: var(--text); }
.config .field { margin-top: 14px; }

.footer { margin-top: 32px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.footer p { margin-bottom: 8px; }
.footer b { color: var(--text-dim); font-weight: 500; }

.sub-status {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* PAYWALL */
#paywall { position: relative; }
#paywall > * { position: relative; z-index: 1; }
#paywall .guardian-bg { z-index: 0; }

.guardian-bg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0.9;
}
.guardian-flat {
  grid-area: 1 / 1;
  width: 86vw;
  max-width: 340px;
  aspect-ratio: 1;
  height: auto;
  display: block;
}
.pyramid-3d {
  grid-area: 1 / 1;
  width: 56vw;
  max-width: 220px;
  aspect-ratio: 1;
  perspective: 900px;
  position: relative;
}
.pyramid-rotor {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation:
    pyramid-tumble 22s ease-in-out infinite,
    pyramid-fold 7s ease-in-out infinite;
}
@property --pyr-tilt {
  syntax: '<angle>';
  inherits: true;
  initial-value: 32deg;
}

.pyr-face {
  position: absolute;
  width: 100%;
  height: 92%;
  bottom: 6%;
  left: 0;
  transform-origin: 50% 100%;
  transform: rotateY(var(--rot)) translateZ(50cqi) rotateX(var(--pyr-tilt));
  pointer-events: none;
}
.pyramid-3d { container-type: inline-size; }
.pyr-face svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
@keyframes pyramid-tumble {
  0%   { transform: rotateX(0deg)   rotateY(0deg)   rotateZ(0deg); }
  18%  { transform: rotateX(28deg)  rotateY(70deg)  rotateZ(-14deg); }
  36%  { transform: rotateX(-18deg) rotateY(150deg) rotateZ(20deg); }
  54%  { transform: rotateX(32deg)  rotateY(230deg) rotateZ(-22deg); }
  72%  { transform: rotateX(-22deg) rotateY(305deg) rotateZ(15deg); }
  88%  { transform: rotateX(12deg)  rotateY(340deg) rotateZ(-8deg); }
  100% { transform: rotateX(0deg)   rotateY(360deg) rotateZ(0deg); }
}

@keyframes pyramid-fold {
  0%, 65%, 100% { --pyr-tilt: 32deg; }
  80%, 86%      { --pyr-tilt: 78deg; }
}

.g-aura {
  transform-origin: center;
  animation: g-breath 4.5s ease-in-out infinite;
}
.g-ring-outer { animation: g-rot 60s linear infinite; transform-origin: 120px 120px; transform-box: view-box; }
.g-ring-mid   { animation: g-rot-rev 40s linear infinite; transform-origin: 120px 120px; transform-box: view-box; }
.g-pupil-orbit {
  animation: g-look 13s ease-in-out infinite;
}
.g-pupil { filter: drop-shadow(0 0 4px #34d399); }
.g-eye {
  animation: g-blink 9s ease-in-out infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}
.g-dot { animation: g-dot-pulse 3.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }

@keyframes g-rot { to { transform: rotate(360deg); } }
@keyframes g-rot-rev { to { transform: rotate(-360deg); } }
@keyframes g-breath {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.08); opacity: 1; }
}
@keyframes g-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94%, 95%      { transform: scaleY(0.1); }
}
@keyframes g-dot-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
/* Pupille reste dans son orbite : rx_eye=28, r_pupil=7, marge 2 → ±19 max X, ry_eye=15 → ±5 max Y */
@keyframes g-look {
  0%,  3%    { transform: translate(0, 0); }
  9%,  15%   { transform: translate(-17px, 3px); }
  21%, 27%   { transform: translate(16px, -4px); }
  33%, 37%   { transform: translate(2px, -5px); }
  43%, 49%   { transform: translate(-14px, 5px); }
  55%, 61%   { transform: translate(15px, 4px); }
  67%, 71%   { transform: translate(-12px, -3px); }
  77%, 83%   { transform: translate(14px, -2px); }
  89%, 100%  { transform: translate(0, 0); }
}

.plans { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 22px; }

.plan {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  color: var(--text);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.plan:hover, .plan:active {
  border-color: var(--accent-dim);
  background: var(--panel);
}
.plan-featured {
  border-color: var(--accent-dim);
  background: linear-gradient(180deg, var(--panel), var(--accent-soft));
}
.plan-name {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.plan-price {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.plan-price em { font-style: normal; font-size: 1.4rem; }
.plan-price-eur {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -4px;
}
.plan-price-eur:empty { display: none; }
.plan-price-desktop {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 1px;
  opacity: 0.85;
}
.plan-price-desktop:empty { display: none; }
.plan-price-yearly {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 2px;
  font-weight: 600;
}
.plan-price-yearly:empty { display: none; }

.desktop-tip {
  margin: 0 0 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text);
}
.desktop-tip summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  font-weight: 500;
}
.desktop-tip summary::-webkit-details-marker { display: none; }
.desktop-tip summary::after {
  content: '+';
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
}
.desktop-tip[open] summary::after { content: '−'; }
.desktop-tip ol {
  margin: 12px 0 4px;
  padding: 0 0 0 22px;
  color: var(--text-dim);
  line-height: 1.55;
  font-size: 0.78rem;
}
.desktop-tip ol li { padding: 3px 0; }
.desktop-tip b { color: var(--text); }
.plan-period { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; }
.plan-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: #04130c;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.plan-discount-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
  z-index: 2;
}
.plan.has-discount .plan-badge { display: none; }

.plan-price-strike {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 8px;
  font-weight: 400;
  vertical-align: middle;
}

.plan-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-soft);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}
.plan-alt:active {
  background: var(--panel);
  border-color: var(--text-dim);
}
.plan-alt > svg:first-child {
  color: var(--accent);
  flex-shrink: 0;
}
.plan-alt-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plan-alt-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.plan-alt-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.plan-alt-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.refund-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.45;
}
.refund-note svg { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.refund-note b { color: var(--accent); font-weight: 600; }

.footer-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.settings-text {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
}

/* Sous-titre de groupe à l'intérieur d'une section (ex. "Mes données") */
.settings-subhead {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 0 8px;
}
.settings-subhead:first-of-type { margin-top: 6px; }

/* Referral UI */
.referral-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 14px 0 14px;
}
.ref-stat {
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.ref-stat-val {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.ref-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}
.ref-stat.accent .ref-stat-val { color: var(--accent); }

.referral-link-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 8px;
}
.referral-link-wrap input {
  flex: 1;
  font-size: 13px !important;
  padding: 11px 12px !important;
}
.referral-copy {
  background: var(--panel-elevated);
  border: none;
  color: var(--text);
  padding: 0 18px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.referral-copy:active { opacity: 0.75; }
.referral-share {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #06140e;
  border: none;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.referral-share:active { opacity: 0.85; }

.paywall-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.paywall-lang button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.paywall-lang button.active {
  color: var(--accent);
  font-weight: 600;
}
.paywall-lang button:active { opacity: 0.7; }
.paywall-lang-sep { color: var(--text-muted); opacity: 0.5; }

.paywall-discount-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--accent);
  border-radius: 10px;
  margin-bottom: 14px;
  color: #06140e;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.25);
}
.paywall-discount-banner svg { flex-shrink: 0; margin-top: 1px; }
.paywall-discount-banner .discount-banner-sub {
  display: block;
  font-weight: 500;
  opacity: 0.85;
  font-size: 0.78rem;
  margin-top: 2px;
}

.support-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--panel);
  border-radius: 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  transition: background 0.15s;
}
.support-link b { color: var(--accent); font-weight: 600; }

.support-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.support-btn {
  flex: 1 1 0;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.support-btn:active { transform: scale(0.98); }

.faq summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq summary::before {
  content: "▸";
  color: var(--accent);
  transition: transform 0.2s ease;
  display: inline-block;
}
.faq[open] summary::before { transform: rotate(90deg); }
.faq-item {
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.faq-item strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  margin-bottom: 4px;
}
.faq-item p {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.5;
}

.my-tickets-count { color: var(--text-dim); font-weight: 500; margin-left: 6px; font-size: 0.78rem; }
.my-tickets-count.my-tickets-unread {
  color: #fff;
  background: #ef4444;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: pulse-badge 1.6s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.my-tickets-list { padding-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.my-tickets-empty { font-size: 0.85rem; color: var(--text-dim); padding: 8px 0; }
.ticket-item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticket-subject { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.ticket-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.ticket-status-open    { background: rgba(245, 158, 11, 0.16); color: #f59e0b; }
.ticket-status-replied { background: rgba(52, 211, 153, 0.16); color: var(--accent); }
.ticket-status-closed  { background: rgba(128, 128, 128, 0.16); color: var(--text-dim); }
.ticket-date { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
.ticket-msg, .ticket-reply { margin-top: 8px; }
.ticket-msg-author, .ticket-reply-author {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.ticket-reply-author { color: var(--accent); }
.ticket-msg p, .ticket-reply p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.ticket-reply {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}
.ticket-close-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px 12px;
  background: var(--panel);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.ticket-close-btn:active { transform: scale(0.98); background: var(--line); }

.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ticket-reply-box {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ticket-reply-box textarea {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 36px;
}
.ticket-reply-box button {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.ticket-reply-box button:active { transform: scale(0.97); }

.modal-card select {
  width: 100%;
  padding: 10px 32px 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f99' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.support-link svg { color: var(--text-muted); flex-shrink: 0; }
.support-link:active { background: var(--panel-elevated); }

.btn {
  background: var(--accent);
  color: #04130c;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

/* ───── Boot animation ───── */
.boot {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.boot-glyph {
  width: 86px;
  height: 86px;
  margin-bottom: 8px;
  opacity: 0;
  transform: scale(0.6);
  animation: boot-glyph-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.1s;
}
.boot-glyph svg { width: 100%; height: 100%; display: block; }
.boot-glow { animation: boot-glow-pulse 2.4s ease-in-out infinite 0.7s; transform-origin: 40px 40px; transform-box: fill-box; }
.boot-tri {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: boot-tri-draw 0.7s ease-out forwards 0.3s;
}
.boot-dot {
  opacity: 0;
  transform: scale(0);
  transform-origin: 40px 44px;
  transform-box: fill-box;
  animation: boot-dot-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.9s,
             boot-dot-pulse 1.8s ease-in-out infinite 1.4s;
  filter: drop-shadow(0 0 6px #34d399);
}

.boot-word {
  font-family: var(--sans);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  display: flex;
  gap: 1px;
}
.boot-word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  animation: boot-letter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.boot-word span:nth-child(1) { animation-delay: 0.85s; }
.boot-word span:nth-child(2) { animation-delay: 0.92s; }
.boot-word span:nth-child(3) { animation-delay: 0.99s; }
.boot-word span:nth-child(4) { animation-delay: 1.06s; }
.boot-word span:nth-child(5) { animation-delay: 1.13s; }
.boot-word span:nth-child(6) { animation-delay: 1.20s; }
.boot-word span:nth-child(7) { animation-delay: 1.27s; }
.boot-word span:nth-child(8) { animation-delay: 1.34s; }
.boot-word span:nth-child(9) { animation-delay: 1.41s; }

.boot-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: boot-line-grow 0.6s ease-out forwards 1.5s;
}

.boot-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  opacity: 0;
  animation: boot-tag-in 0.5s ease-out forwards 1.8s,
             boot-tag-blink 1.6s ease-in-out infinite 2.4s;
}

@keyframes boot-glyph-in {
  0%   { opacity: 0; transform: scale(0.55); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes boot-tri-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes boot-dot-in {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 1; transform: scale(1.25); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes boot-dot-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}
@keyframes boot-glow-pulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
@keyframes boot-letter {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes boot-line-grow {
  to { width: 180px; }
}
@keyframes boot-tag-in {
  to { opacity: 1; }
}
@keyframes boot-tag-blink {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.45; }
}

.error-msg { text-align: center; color: var(--red); margin: 60px 0 16px; font-size: 0.88rem; }

/* ───── Tab bar (iOS-style bottom nav) ───── */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(11, 11, 14, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: stretch;
  z-index: 100;
}
.tabbar.hidden { display: none; }

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  transition: color 0.15s;
}
.tab-btn svg { opacity: 0.72; transition: opacity 0.15s; }
.tab-btn.active { color: var(--accent); }
.tab-btn.active svg { opacity: 1; }
.tab-btn:active { opacity: 0.6; }

/* ───── Header (iOS large title style) ───── */
.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  min-height: 38px;
}
.app-header h1 { flex: 1; margin: 0; font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; }
.app-header .header-btn {
  background: var(--panel);
  border: none;
  color: var(--text);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.app-header .header-btn:hover, .app-header .header-btn:active {
  background: var(--panel-elevated);
}
.app-header .header-btn.primary {
  background: var(--accent);
  color: #06140e;
}
.app-header .header-btn.danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
}

/* ───── Fiche view (read-only dashboard) ───── */
.fv-hero {
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-elevated) 100%);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.04) inset;
}
.fv-hero-strain {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.fv-hero-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 10px;
}
.fv-hero-lineage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 4px 10px;
  margin-bottom: 14px;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.30);
  border-radius: 999px;
  color: #c4b5fd;
  cursor: pointer;
  transition: background 0.15s;
}
.fv-hero-lineage:hover {
  background: rgba(139, 92, 246, 0.18);
}
.fv-hero-yield {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.fv-yield-val {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.fv-yield-sub {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.fv-sec {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.fv-sec h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.fv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 14px;
}
.fv-row:last-child { border-bottom: none; }
.fv-lbl {
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.fv-val {
  font-size: 0.92rem;
  color: var(--text);
  font-family: var(--mono);
  text-align: right;
  word-break: break-word;
}
.fv-notes {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.btn-secondary.danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
}
.btn-secondary.danger:active { opacity: 0.75; }

/* ───── Fiches list ───── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state p { margin: 4px 0; }
.empty-state .hint { color: var(--text-muted); font-size: 0.82rem; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 12px 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  font-family: var(--sans);
}
.search-bar input:focus { background: transparent !important; }
.search-clear {
  background: var(--panel-elevated);
  border: none;
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.search-clear:active { opacity: 0.7; }
.stat-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.stat-card .stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.stat-card .stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-family: var(--mono);
}
.stat-card .stat-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--sans);
}
.stat-card.accent .stat-value { color: var(--accent); }

.fiche-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.fiche-card:active {
  background: var(--panel-elevated);
  transform: scale(0.99);
}
.fiche-card .fc-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.fiche-card .fc-date {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--mono);
}
.fiche-card .fc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.fiche-card .fc-meta span {
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 5px;
  font-family: var(--mono);
}
.fiche-card .fc-yield {
  color: var(--accent);
  font-weight: 600;
}

/* ───── Fiche form sections ───── */
.fiche-sec {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.fiche-sec h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fiche-sec h3 .sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--mono);
}


/* Chip row (boutons radio visuels) */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-row button {
  background: var(--panel-soft);
  border: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip-row button:active { transform: scale(0.97); }
.chip-row button.active {
  background: var(--accent);
  color: #06140e;
  font-weight: 600;
}

.result-mini {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
  min-height: 38px;
  display: flex;
  align-items: center;
}

.input-with-unit { display: flex; gap: 8px; }
.input-with-unit input { flex: 1; }
.unit-toggle.small button { padding: 5px 9px; font-size: 0.74rem; }

.fiche-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-secondary, .btn-primary {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-secondary:active, .btn-primary:active { transform: scale(0.98); opacity: 0.85; }
.btn-secondary {
  background: var(--panel-elevated);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: #06140e;
}
.btn-export {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  background: var(--panel-elevated);
  border: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
}
.btn-export:active { transform: scale(0.98); opacity: 0.85; }

/* ─── Live Press launch button ─── */
.live-launch-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #04130c;
  border: none;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(52, 211, 153, 0.25);
}
.live-launch-btn:active { transform: scale(0.98); }
.live-launch-btn svg { stroke: #04130c; }

/* ─── Live Press screen ─── */
body.live-active #matrix,
body.pkd-active #matrix { display: none; }

#live-press {
  background: var(--bg);
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden auto;
  isolation: isolate;
  padding-bottom: calc(30px + var(--safe-bottom));
  /* Couleur dynamique pilotée par data-stage */
  --live-color: var(--accent);
  --live-color-soft: var(--accent-soft);
  --live-rgb: 52, 211, 153;
  transition: background 0.6s ease;
}
#live-press[data-stage="preheat"] {
  --live-color: #5cc7ff;
  --live-color-soft: rgba(92, 199, 255, 0.12);
  --live-rgb: 92, 199, 255;
}
#live-press[data-stage="ramp"] {
  --live-color: #f5a524;
  --live-color-soft: rgba(245, 165, 36, 0.12);
  --live-rgb: 245, 165, 36;
}
#live-press[data-stage="hold"] {
  --live-color: #34d399;
  --live-color-soft: rgba(52, 211, 153, 0.14);
  --live-rgb: 52, 211, 153;
}
.live-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(var(--live-rgb), 0.12), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(var(--live-rgb), 0.05), transparent 65%),
    var(--bg);
  z-index: 0;
  pointer-events: none;
  transition: background 0.7s ease;
  animation: liveBgPulse 5s ease-in-out infinite;
  will-change: opacity;
}
@keyframes liveBgPulse {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 1; }
}
#live-press.transitioning .live-bg {
  animation: liveBgFlash 0.7s ease-out;
}
@keyframes liveBgFlash {
  0%   { opacity: 0.9; }
  30%  { opacity: 1.4; }
  100% { opacity: 0.9; }
}
.live-header {
  position: relative;
  z-index: 2;
  background: transparent !important;
  border-bottom: none !important;
  padding-top: 14px;
}
.live-header h1 {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.live-stages {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 6px 16px 0;
  margin-bottom: 20px;
  justify-content: stretch;
}
.live-stage {
  flex: 1;
  padding: 9px 8px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--panel-soft);
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  transition: all 0.35s ease;
  position: relative;
}
.live-stage.active {
  color: var(--live-color);
  background: var(--live-color-soft);
  border-color: rgba(var(--live-rgb), 0.35);
  box-shadow: 0 0 24px rgba(var(--live-rgb), 0.25), inset 0 0 0 1px rgba(var(--live-rgb), 0.25);
  transform: scale(1.04);
}
.live-stage.active::after {
  content: "";
  position: absolute;
  bottom: -5px; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--live-color);
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--live-color);
  animation: liveStageDotPulse 1.5s ease-in-out infinite;
}
@keyframes liveStageDotPulse {
  0%, 100% { transform: translateX(-50%) scale(1);   opacity: 1; }
  50%      { transform: translateX(-50%) scale(1.6); opacity: 0.7; }
}
.live-stage.done {
  color: var(--accent-dim);
  background: rgba(52, 211, 153, 0.05);
  border-color: rgba(52, 211, 153, 0.12);
  opacity: 0.55;
}
.live-stage.skip { opacity: 0.25; }

.live-ring-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px auto 8px;
  width: 264px;
  height: 264px;
  animation: liveRingBreathe 2.6s ease-in-out infinite;
}
@keyframes liveRingBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}
.live-ring-wrap.transitioning { animation: liveRingFlash 0.7s ease-out; }
@keyframes liveRingFlash {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.live-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.live-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 5;
}
.live-ring .ring-progress {
  fill: none;
  stroke: var(--live-color);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 628;
  transition: stroke-dashoffset 0.4s linear, stroke 0.6s ease;
  filter: drop-shadow(0 0 14px rgba(var(--live-rgb), 0.55));
}
.live-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--live-rgb), 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.live-time {
  font-family: var(--mono);
  font-size: 3.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.045em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(var(--live-rgb), 0.25);
  transition: text-shadow 0.6s ease;
  position: relative;
  z-index: 2;
}
.live-stage-label {
  position: absolute;
  top: calc(50% + 42px);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--live-color);
  transition: color 0.6s ease;
  z-index: 2;
}
.live-stage-label.animate { animation: liveLabelIn 0.5s ease-out; }
/* Bouton Start DANS le rond du timer : le press ne démarre plus tout seul */
.live-start-btn { position:absolute; inset:0; margin:auto; z-index:3; display:none; flex-direction:column;
  align-items:center; justify-content:center; gap:2px; width:70%; height:70%; background:none; border:none;
  color:var(--live-color,#34d399); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.live-ring-wrap.awaiting .live-start-btn { display:flex; }
.live-ring-wrap.awaiting .live-time { display:none; }
.live-start-btn svg { margin-left:5px; filter:drop-shadow(0 0 12px rgba(var(--live-rgb),0.5)); }
.live-start-btn span { font-size:0.8rem; font-weight:800; letter-spacing:0.12em; text-transform:uppercase; margin-top:2px; }
.live-start-btn:active { transform:scale(0.95); }
@keyframes liveLabelIn {
  0%   { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.live-meta {
  position: relative;
  z-index: 2;
  margin: 16px 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-meta:empty { display: none; }
.live-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.live-meta-row:empty { display: none; }
.live-meta-row strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.live-controls {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
}
.live-ctrl-btn {
  flex: 0 0 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}
.live-ctrl-btn:active { transform: scale(0.94); }
.live-ctrl-btn.primary {
  flex: 1;
  max-width: 220px;
  height: 54px;
  border-radius: 27px;
  background: var(--live-color);
  color: #04130c;
  font-weight: 700;
  font-size: 0.95rem;
  border-color: transparent;
  letter-spacing: -0.005em;
  box-shadow: 0 4px 18px rgba(var(--live-rgb), 0.35);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}
.live-ctrl-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}
.live-ctrl-btn.paused svg rect { display: none; }
.live-ctrl-btn.paused::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 3px;
}

.live-ring-wrap.pulse .ring-progress {
  animation: ringPulse 0.5s ease-out 2;
}
@keyframes ringPulse {
  0% { filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.35)); }
  50% { filter: drop-shadow(0 0 30px rgba(52, 211, 153, 0.95)); }
  100% { filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.35)); }
}

/* ─── Setup modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Reserve l'espace de la barre d'onglets (+ safe area) en bas : la carte se centre
     AU-DESSUS de la barre, donc les boutons ne passent plus jamais derriere elle,
     quel que soit l'empilement (z-index). */
  padding: 24px 24px calc(24px + var(--tabbar-h, 64px) + var(--safe-bottom, 0px));
  animation: modalIn 0.18s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: #1b1f27;
  border-radius: 18px;
  padding: 18px 18px 16px;
  width: 100%;
  max-width: 380px;
  /* vh compte la hauteur TOTALE (barres comprises) sur mobile -> le bas (bouton) sortait
     de l'ecran sur petits telephones. dvh = hauteur reellement VISIBLE -> la carte tient
     toujours a l'ecran et scrolle si besoin. Fallback vh pour vieux navigateurs. */
  max-height: 80vh;
  max-height: calc(100dvh - 48px - var(--tabbar-h, 64px) - var(--safe-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.modal-card .field { margin-bottom: 10px; }
.modal-card .field:last-of-type { margin-bottom: 0; }
.modal-card .field label { margin-bottom: 4px; font-size: 0.82rem; }
.modal-card .field input { padding: 10px 12px; font-size: 0.95rem; }
#support-message { min-height: 150px; line-height: 1.45; }

/* ── Wizard chatbot "Demande d'ajout de presse" ── */
.pw-card { max-width: 430px; display: flex; flex-direction: column; max-height: 88vh; }
.pw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pw-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 2px 6px; line-height: 1; }
.pw-chat { flex: 1; overflow-y: auto; min-height: 220px; max-height: 52vh; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.pw-bubble { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.pw-bubble.bot { align-self: flex-start; background: var(--panel-soft, #232833); color: var(--text-dim, #d2d6de); border-bottom-left-radius: 4px; }
.pw-bubble.user { align-self: flex-end; background: var(--accent-soft); color: var(--accent); font-weight: 600; border-bottom-right-radius: 4px; }
.pw-input { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pw-text-row { display: flex; gap: 8px; width: 100%; }
.pw-text { flex: 1; }
.pw-send-btn { flex: none; width: 46px; border: none; border-radius: 10px; background: var(--accent); color: #06271b; font-size: 1rem; font-weight: 700; cursor: pointer; }
.pw-choice { padding: 9px 15px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.pw-choice:active { transform: scale(0.96); }
.pw-choice.sel { background: var(--accent); color: #06271b; }
.pw-multi { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.pw-recap-list { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-bottom: 2px; }
.pw-recap-chip { display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,0.1)); background: var(--panel-soft, #232833); color: var(--text-dim, #d2d6de); font-size: 0.85rem; cursor: pointer; }
.pw-recap-chip b { color: var(--text-muted); font-weight: 600; flex: none; }
.pw-edit-ic { margin-left: auto; color: var(--accent); flex: none; }
.pw-action { flex: 1; min-width: 150px; padding: 11px; border-radius: 10px; border: none; background: var(--accent); color: #06271b; font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.pw-skip { padding: 11px 15px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,0.12)); background: transparent; color: var(--text-muted); cursor: pointer; }
.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ecedf2;
  margin-bottom: 2px;
}
.modal-sub {
  font-size: 0.78rem;
  color: #8a8f99;
  margin: 0 0 12px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.modal-btn {
  padding: 11px 14px;
}
.modal-btn {
  flex: 1;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.modal-btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #ecedf2;
}
.modal-btn.primary {
  background: #34d399;
  color: #04130c;
}
.modal-btn:active { transform: scale(0.97); }

.modal-card .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.modal-card .chip-row button {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}
.modal-card .chip-row button.active {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border-color: var(--red);
}
.report-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.report-check:hover { border-color: rgba(239, 68, 68, 0.3); }
.report-check input { width: 16px; height: 16px; accent-color: var(--red); flex-shrink: 0; }
.report-check:has(input:checked) {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--red);
  color: var(--text);
}
.modal-card textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.header-btn.danger { color: var(--red); }
.header-btn.danger:hover { background: rgba(239, 68, 68, 0.1); }

.setup-total {
  margin-top: 12px;
  padding: 9px 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #8a8f99;
}
.setup-total strong {
  color: #34d399;
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.setup-calc {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.setup-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #8a8f99;
}
.setup-calc-row strong {
  color: #ecedf2;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ─── Duplicate picker ─── */
.dup-picker-card {
  max-width: 440px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
#dup-picker-search {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin: 4px 0 10px;
  width: 100%;
}
#dup-picker-search:focus { outline: none; border-color: var(--accent); }
.dup-list {
  flex: 1;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 50vh;
}
.dup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dup-item:active { background: var(--panel-elevated); transform: scale(0.99); }
.dup-item-main { flex: 1; min-width: 0; }
.dup-item-strain {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dup-item-strain span { color: var(--text-dim); font-weight: 400; font-size: 0.78rem; }
.dup-item-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.dup-item svg { color: var(--text-muted); flex-shrink: 0; }
.dup-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ─── Test badge ─── */
.test-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  margin-left: 10px;
}
.test-badge.hidden { display: none; }

/* ─── Comparaison de 2 fiches ─── */
#fiche-compare { padding-bottom: 30px; }
.cmp-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 8px;
}
.cmp-head-cell {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.cmp-head-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.cmp-head-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.cmp-yield {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  padding: 0 16px 12px;
  align-items: center;
}
.cmp-yield-cell {
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.cmp-yield-cell.win {
  border-color: var(--accent);
  background: rgba(52, 211, 153, 0.18);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.18);
}
.cmp-yield-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cmp-yield-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.cmp-yield-vs {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.cmp-table {
  margin: 0 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.cmp-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  background: var(--panel-soft);
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row.diff { background: rgba(52, 211, 153, 0.04); }
.cmp-cell {
  font-size: 0.85rem;
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.cmp-cell.diff { color: var(--accent); font-weight: 600; }
.cmp-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 0 6px;
  white-space: nowrap;
}

/* ─── Photos ─── */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.photos-grid:empty { display: none; }
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-soft);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.photo-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.photo-thumb-remove svg { stroke: #fff; }
.photo-thumb.uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  background-image:
    linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.5), transparent);
  background-size: 60% 100%;
  background-repeat: no-repeat;
  animation: photoShimmer 1.2s ease-in-out infinite;
}
@keyframes photoShimmer {
  0%   { background-position: -60% 0; }
  100% { background-position: 160% 0; }
}
.photo-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px dashed rgba(52, 211, 153, 0.4);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s ease;
}
.photo-add-btn:active { transform: scale(0.98); }
.photo-add-btn.full { opacity: 0.4; pointer-events: none; }

.fv-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  padding: 0 16px 14px;
}
.fv-photos:empty { display: none; padding: 0; }
.fv-photos .photo-thumb { aspect-ratio: 1; }

.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalIn 0.2s ease-out;
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.photo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ─── Pokéball badge sur fiches ─── */
.fc-poke {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  filter: drop-shadow(0 0 4px currentColor);
}
.fc-poke[data-status="approved"]      { color: rgba(52, 211, 153, 0.45); }
.fc-poke[data-status="pending"]       { color: rgba(245, 165, 36, 0.45); }
.fc-poke[data-status="rejected"]      { color: rgba(239, 68, 68, 0.45); }
.fc-poke[data-status="not_submitted"] { filter: none; opacity: 0.4; }

/* ─── Rosidex submit action ─── */
#fiche-rosidex-action { margin: 16px 16px 30px; }
.rosidex-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #04130c;
  border: none;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(52, 211, 153, 0.3);
}
.rosidex-add-btn:active { transform: scale(0.98); }
.rosidex-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.rosidex-state-icon { font-size: 1.3rem; flex-shrink: 0; }
.rosidex-state-text { display: flex; flex-direction: column; gap: 2px; }
.rosidex-state-text strong { font-size: 0.9rem; color: var(--text); }
.rosidex-state-text span { font-size: 0.78rem; color: var(--text-dim); }
.rosidex-state.approved { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.05); }
.rosidex-state.approved strong { color: var(--accent); }
.rosidex-state.pending  { border-color: rgba(245, 165, 36, 0.3); background: rgba(245, 165, 36, 0.05); }
.rosidex-state.pending  strong { color: var(--amber); }
.rosidex-state.rejected { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }
.rosidex-state.rejected strong { color: var(--red); }
.rosidex-reject-reason {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid var(--red);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--text);
}
.rosidex-reject-reason strong {
  color: var(--red);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-right: 6px;
}

.rosidex-rules {
  margin: 10px 0 4px;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.rosidex-rules-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.rosidex-rules ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rosidex-rule { display: flex; gap: 8px; align-items: center; font-size: 0.84rem; }
.rosidex-rule.ok    { color: var(--accent); }
.rosidex-rule.fail  { color: var(--red); }
.rosidex-rule.warn  { color: var(--amber); }
.rosidex-rule.always { color: var(--text-dim); }
.modal-btn.primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Pokédex boot animation ─── */
.pkd-boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #04130c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  animation: pkdBootFadeOut 0.35s ease-in 1.6s forwards;
}
.pkd-boot.hidden { display: none !important; }
.pkd-boot-scanlines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(52, 211, 153, 0.08) 0px,
      rgba(52, 211, 153, 0.08) 1px,
      transparent 1px,
      transparent 3px
    );
  pointer-events: none;
  opacity: 0;
  animation: pkdBootScanlinesIn 0.2s ease-out 0.1s forwards;
}
.pkd-boot-text {
  text-align: center;
  color: var(--accent);
  font-family: var(--mono);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.6), 0 0 20px rgba(52, 211, 153, 0.3);
  position: relative;
  z-index: 2;
  animation: pkdBootTextFlicker 1.4s ease-out;
}
.pkd-boot-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  animation: pkdBootTitleAppear 0.4s steps(8) forwards;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  margin-left: auto;
  margin-right: auto;
}
.pkd-boot-sub {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  opacity: 0;
  animation: pkdBootFadeIn 0.3s ease-out 0.45s forwards;
}
.pkd-boot-bar {
  width: 220px;
  height: 6px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid var(--accent);
  border-radius: 3px;
  margin: 18px auto 10px;
  overflow: hidden;
  opacity: 0;
  animation: pkdBootFadeIn 0.3s ease-out 0.55s forwards;
}
.pkd-boot-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #5cc7ff);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
  animation: pkdBootBarFill 0.7s ease-out 0.65s forwards;
}
.pkd-boot-status {
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  opacity: 0;
  animation:
    pkdBootFadeIn 0.2s ease-out 0.7s forwards,
    pkdBootStatusBlink 0.6s steps(2) 0.7s infinite;
}
.pkd-boot-scan {
  position: absolute;
  left: 0; right: 0;
  height: 5px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.9);
  top: -10px;
  animation: pkdBootScanSweep 1.1s ease-in-out 0.35s 1;
  opacity: 0.9;
}
@keyframes pkdBootScanlinesIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pkdBootFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pkdBootFadeOut {
  to { opacity: 0; visibility: hidden; }
}
@keyframes pkdBootTitleAppear {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes pkdBootBarFill {
  to { width: 100%; }
}
@keyframes pkdBootStatusBlink {
  50% { opacity: 0.3; }
}
@keyframes pkdBootScanSweep {
  0%   { top: -10px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes pkdBootTextFlicker {
  0%, 100% { opacity: 1; }
  5%, 8%   { opacity: 0.4; }
  10%      { opacity: 1; }
  60%, 62% { opacity: 0.7; }
  63%      { opacity: 1; }
}

/* Cards stagger fade-in après le boot */
.pkd-card {
  opacity: 0;
  animation: pkdCardIn 0.4s ease-out forwards;
}
@keyframes pkdCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Pokédex browse cards (esprit Pokémon) ─── */
#pkd-strains-grid {
  padding: 4px 14px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.pkd-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(var(--card-rgb), 0.18) 0%, rgba(var(--card-rgb), 0.04) 100%),
    var(--panel);
  border: 1.5px solid rgba(var(--card-rgb), 0.35);
  border-radius: 14px;
  padding: 10px 10px 12px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 10px rgba(var(--card-rgb), 0.08);
}
.pkd-card:active { transform: scale(0.97); box-shadow: 0 0 24px rgba(var(--card-rgb), 0.35); }
.pkd-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-bottom: 6px;
}
.pkd-card-foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(var(--card-rgb), 0.2);
}
.pkd-card-stat-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.pkd-card-stat-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgb(var(--card-rgb));
}
.pkd-card-count {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.pkd-card-num {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  color: rgb(var(--card-rgb));
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(var(--card-rgb), 0.3);
}
.pkd-card-sprite-wrap {
  position: relative;
  margin: 6px 0;
}
.pkd-card-mats-overlay {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 8px;
  border-radius: 999px;
  margin: 4px auto 0;
  align-self: center;
  z-index: 2;
}
.pkd-mat-primary {
  font-size: 1.3rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(var(--card-rgb), 0.22);
  border: 1px solid rgba(var(--card-rgb), 0.45);
  box-shadow:
    0 0 10px rgba(var(--card-rgb), 0.55),
    inset 0 0 6px rgba(var(--card-rgb), 0.25);
  filter: drop-shadow(0 0 3px rgba(var(--card-rgb), 0.6));
  line-height: 1;
}
.pkd-mat-secondary {
  font-size: 0.85rem;
  opacity: 0.6;
}
.pkd-card-sprite {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.pkd-card-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: radial-gradient(circle at 50% 40%, rgba(var(--card-rgb), 0.18), transparent 70%);
}
.pkd-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-bottom: 6px;
}
.pkd-card-foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(var(--card-rgb), 0.2);
}
.pkd-card-stat-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.pkd-card-stat-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgb(var(--card-rgb));
}
.pkd-card-count {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* Scan animation — sweep diagonal flash (style mythic) appliqué à toutes les rarities */
.pkd-card-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.pkd-card.scanning .pkd-card-scan {
  inset: -30%;
  background: linear-gradient(115deg,
    transparent 35%,
    rgba(var(--card-rgb), 0.35) 44%,
    rgba(255, 255, 255, 0.85) 49.5%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.85) 50.5%,
    rgba(var(--card-rgb), 0.4) 56%,
    transparent 65%);
  opacity: 1;
  filter: blur(1px) drop-shadow(0 0 10px rgba(var(--card-rgb), 0.7));
  animation: pkdScanFlash 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1;
}
@keyframes pkdScanFlash {
  0%   { transform: translate(-120%, -120%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translate(120%, 120%); opacity: 0; }
}
.pkd-card.scanning {
  box-shadow:
    0 0 40px rgba(var(--card-rgb), 0.6),
    inset 0 0 16px rgba(var(--card-rgb), 0.25);
  transform: scale(1.02);
  transition: transform 0.32s, box-shadow 0.32s;
  border-radius: 14px;
  overflow: hidden;
}

/* Ancien engraving désactivé (remplacé par rosette spirographe) */
.pkd-card-engraving,
.pkd-hero .pkd-card-engraving { display: none; }

/* ─── Rosette spirographe : signature unique par strain ─── */
.pkd-rosette-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Sur la grid card, la rosette est dans le sprite-wrap : confinée à la zone carrée du sprite */
.pkd-card .pkd-card-sprite-wrap { position: relative; overflow: hidden; border-radius: 12px; }
.pkd-card .pkd-card-sprite-empty { background: rgba(0, 0, 0, 0.18); }
.pkd-card .pkd-card-sprite { position: relative; z-index: 1; }
.pkd-card .pkd-card-sprite-empty + .pkd-rosette-wrap,
.pkd-card .pkd-card-sprite-wrap > .pkd-card-sprite-empty ~ .pkd-rosette-wrap { z-index: 0; }
.pkd-rosette {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 4px rgba(var(--card-rgb), 0.4));
  -webkit-mask-image: radial-gradient(circle, #000 0%, #000 72%, transparent 96%);
          mask-image: radial-gradient(circle, #000 0%, #000 72%, transparent 96%);
}
.pkd-card .pkd-rosette { opacity: 0.9; }
.pkd-card.rarity-mythical .pkd-rosette,
.pkd-hero.rarity-mythical .pkd-rosette {
  animation: rosetteSpin 24s linear infinite;
}
.pkd-card.rarity-legendary .pkd-rosette,
.pkd-hero.rarity-legendary .pkd-rosette {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}
.pkd-card.rarity-mythical .pkd-rosette {
  filter: drop-shadow(0 0 8px rgba(252, 211, 77, 0.6)) drop-shadow(0 0 14px rgba(167, 139, 250, 0.5));
}
@keyframes rosetteSpin {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}
/* Sur le hero, la rosette est confinée dans le sprite-frame */
.pkd-hero-sprite-frame { position: relative; overflow: hidden; }

/* ─── Vrai flip 3D : faces indépendantes (compatible Telegram WebView) ─── */
.pkd-hero-3d-wrap {
  position: relative;
  margin: 14px 14px 12px;
}
.pkd-hero-3d-inner { position: relative; }
.pkd-hero-3d-inner > .pkd-hero {
  margin: 0;
  will-change: transform, opacity;
  transform: translateZ(0);
  transition: transform 1.05s cubic-bezier(0.65, 0.05, 0.36, 1),
              opacity 0.18s linear 0.46s,
              visibility 0s linear 0.55s;
}
.pkd-hero-3d-inner > .pkd-hero.pkd-hero-front {
  position: relative;
  transform: perspective(1600px) rotateY(0deg);
  opacity: 1;
  visibility: visible;
}
.pkd-hero-3d-inner > .pkd-hero.pkd-hero-back {
  position: absolute;
  inset: 0;
  padding: 22px 18px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: perspective(1600px) rotateY(180deg);
  opacity: 0;
  visibility: hidden;
}
/* État flipped : front part vers l'arrière, back vient à l'avant */
.pkd-hero-3d-inner.flipped > .pkd-hero.pkd-hero-front {
  transform: perspective(1600px) rotateY(180deg);
  opacity: 0;
  visibility: hidden;
}
.pkd-hero-3d-inner.flipped > .pkd-hero.pkd-hero-back {
  transform: perspective(1600px) rotateY(360deg);
  opacity: 1;
  visibility: visible;
}
.pkd-hero-3d-inner.flipped > .pkd-hero.pkd-hero-front { pointer-events: none; }
.pkd-hero-3d-inner:not(.flipped) > .pkd-hero.pkd-hero-back { pointer-events: none; }
.entry-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  padding-bottom: 8px;
}
.entry-num {
  font-family: var(--mono);
  font-weight: 800;
  color: rgb(var(--card-rgb));
  font-size: 0.9rem;
}
.entry-title {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}
.entry-strain {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}
.entry-close { color: var(--text-dim); font-size: 1.1rem; line-height: 1; }
.entry-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(var(--card-rgb), 0.22);
  border-radius: 12px;
  padding: 9px 11px;
}
.entry-card-link { cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease; }
.entry-card-link:hover { background: rgba(255,255,255,0.07); border-color: rgba(var(--card-rgb), 0.45); }
.entry-card-link:active { transform: scale(0.985); }
.entry-card-arrow {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.6;
  line-height: 1;
}
.entry-card-link:hover .entry-card-arrow { opacity: 1; color: rgb(var(--card-rgb)); }
.entry-podium-row { cursor: pointer; transition: background 0.15s ease, transform 0.1s ease; }
.entry-podium-row:active { transform: scale(0.985); }
.entry-podium-row .entry-card-arrow { font-size: 1rem; margin-left: 6px; }
.entry-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.entry-ico { font-size: 0.95rem; filter: drop-shadow(0 0 4px rgba(var(--card-rgb), 0.5)); }
.entry-lbl {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}
.entry-card-body {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.entry-card-body-row { gap: 14px; }
.entry-stat { display: flex; flex-direction: column; gap: 2px; }
.entry-stat-lbl {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.entry-stat-val {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}
.entry-pheno-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: rgb(var(--card-rgb));
}
.entry-pheno-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.entry-empty {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
  opacity: 0.7;
}
.entry-mat-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 2px 0;
  justify-content: center;
}
.back-mat-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 10px 4px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  min-width: 32px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.back-mat-chip:active { transform: scale(0.95); }
.back-mat-chip .chip-emoji { font-size: 1rem; }
.back-mat-chip .chip-n {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.6rem;
  opacity: 0.85;
}
.back-mat-chip.active {
  background: rgba(var(--mat-rgb, var(--card-rgb)), 0.28);
  border-color: rgba(var(--mat-rgb, var(--card-rgb)), 0.7);
  outline: 1.5px solid rgba(var(--mat-rgb, var(--card-rgb)), 0.45);
  outline-offset: 1px;
  color: var(--text);
}

.entry-best-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.entry-best-row {
  display: grid;
  grid-template-columns: 26px auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(var(--row-rgb, var(--card-rgb)), 0.08);
  border: 1px solid rgba(var(--row-rgb, var(--card-rgb)), 0.22);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.entry-best-row:hover { background: rgba(var(--row-rgb, var(--card-rgb)), 0.14); }
.entry-best-row:active { transform: scale(0.985); }
.best-emoji {
  font-size: 1.05rem;
  text-align: center;
  filter: drop-shadow(0 0 3px rgba(var(--row-rgb, var(--card-rgb)), 0.5));
}
.best-yield {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.92rem;
  color: rgb(var(--row-rgb, var(--card-rgb)));
}
.best-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-podium {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.entry-podium-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
}
.entry-podium-row.podium-1 { background: linear-gradient(90deg, rgba(251,191,36,0.18) 0%, rgba(251,191,36,0.04) 100%); border: 1px solid rgba(251,191,36,0.35); }
.entry-podium-row.podium-2 { background: linear-gradient(90deg, rgba(180,180,180,0.14) 0%, rgba(180,180,180,0.04) 100%); border: 1px solid rgba(180,180,180,0.25); }
.entry-podium-row.podium-3 { background: linear-gradient(90deg, rgba(205,127,50,0.14) 0%, rgba(205,127,50,0.04) 100%); border: 1px solid rgba(205,127,50,0.25); }
.podium-medal { font-size: 1rem; text-align: center; }
.podium-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-yield {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.85rem;
  color: rgb(var(--card-rgb));
}
.entry-podium-row.podium-1 .podium-yield { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,0.5); }
.entry-foot {
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  opacity: 0.6;
  margin-top: 4px;
}
.pkd-hero-flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(165deg, rgba(0,0,0,0.92) 0%, rgba(20,16,40,0.85) 100%);
  border-radius: inherit;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  font-size: 0.62rem;
  color: var(--text);
  border: 1px solid rgba(var(--card-rgb), 0.4);
  box-shadow: inset 0 0 16px rgba(var(--card-rgb), 0.18);
}
.flip-back-head {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  padding-bottom: 5px;
  margin-bottom: 6px;
}
.flip-back-num {
  font-family: var(--mono);
  font-weight: 800;
  color: rgb(var(--card-rgb));
  font-size: 0.65rem;
}
.flip-back-title {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-left: auto;
}
.flip-back-sections {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
}
.flip-sec { display: flex; flex-direction: column; gap: 2px; }
.flip-sec-head {
  display: flex;
  align-items: center;
  gap: 4px;
}
.flip-sec-ico { font-size: 0.75rem; }
.flip-sec-lbl {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.flip-sec-body {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 14px;
  font-family: var(--mono);
}
.flip-val { color: var(--text); font-weight: 700; font-size: 0.7rem; }
.flip-val-em { color: rgb(var(--card-rgb)); font-size: 0.7rem; }
.flip-meta { color: var(--text-dim); font-size: 0.58rem; font-weight: 500; }
.flip-sep { color: var(--text-dim); opacity: 0.4; }
.flip-empty {
  color: var(--text-dim);
  font-size: 0.58rem;
  font-style: italic;
  opacity: 0.65;
}
.flip-podium {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
}
.podium-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 4px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
}
.podium-medal { font-size: 0.7rem; }
.podium-name {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-yield {
  color: rgb(var(--card-rgb));
  font-weight: 700;
}
.podium-1 .podium-yield { color: #fbbf24; }
.flip-back-foot {
  text-align: center;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  opacity: 0.6;
  margin-top: 4px;
  text-transform: uppercase;
}
.pkd-rosette-wrap.pkd-rosette-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  z-index: 0;
  display: block;
}
.pkd-rosette-wrap.pkd-rosette-hero .pkd-rosette {
  width: 100%;
  height: 100%;
}
.pkd-hero .pkd-rosette { opacity: 0.95; filter: drop-shadow(0 0 6px rgba(var(--card-rgb), 0.55)); }
/* Spin on click : roue lancée puis décélère longuement */
@keyframes wheelSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(1260deg); }
}
.pkd-hero .pkd-rosette.spinning {
  animation: wheelSpin 3s cubic-bezier(0.08, 0.95, 0.2, 1);
  transform-origin: center center;
}
.pkd-hero.rarity-mythical .pkd-rosette.spinning {
  animation: wheelSpin 3s cubic-bezier(0.08, 0.95, 0.2, 1);
}
.pkd-hero-sprite-frame .pkd-hero-sprite { position: relative; z-index: 2; }
.pkd-hero-sprite-frame .pkd-hero-frame-glow { z-index: 0; }
.pkd-hero-sprite-empty { width: 100%; height: 100%; background: transparent; }

/* ─── CRI : reveal stylé du nom de la strain ─── */
.pkd-cry-reveal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 70%, transparent 100%);
  cursor: pointer;
  pointer-events: none;
  animation: cryFade 0.25s ease;
}
.pkd-cry-reveal.out { animation: cryFadeOut 0.22s ease forwards; }
@keyframes cryFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cryFadeOut {
  to { opacity: 0; }
}
.cry-name-stack {
  position: relative;
  display: inline-block;
}
.cry-name {
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  display: block;
}
.cry-name-front {
  position: relative;
  color: #fff;
  text-shadow:
    0 0 14px rgba(var(--card-rgb), 0.85),
    0 2px 0 rgba(0, 0, 0, 0.6),
    0 4px 8px rgba(0, 0, 0, 0.5);
  animation: cryShout 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.cry-name-mid, .cry-name-back {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cry-name-mid {
  color: rgb(var(--card-rgb));
  transform: translate(2px, 2px);
  filter: blur(1px);
  opacity: 0.65;
  animation: cryGhost 0.85s cubic-bezier(0.16, 1, 0.3, 1) reverse;
}
.cry-name-back {
  color: rgb(var(--card-rgb));
  transform: translate(-3px, -3px);
  filter: blur(3px);
  opacity: 0.5;
  animation: cryGhost 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cryShout {
  0%   { transform: scale(0.4) rotate(-5deg); opacity: 0; }
  25%  { transform: scale(1.18) rotate(2deg); opacity: 1; }
  40%  { transform: scale(0.96); }
  60%  { transform: scale(1.04); }
  80%  { transform: scale(0.99); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cryGhost {
  0%   { transform: translate(0, 0); opacity: 0; }
  40%  { opacity: 0.9; }
  100% { transform: translate(10px, 10px); opacity: 0.4; }
}
.cry-sub {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgb(var(--card-rgb));
  letter-spacing: 0.22em;
  opacity: 0.9;
  text-transform: uppercase;
  animation: cryBlink 0.55s ease-in-out infinite;
}
.cry-sub::before { content: "> "; opacity: 0.7; }
@keyframes cryBlink {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 0.3; }
}

/* ─── Mascot reveal : pixel art + melody ─── */
.pkd-hero-mascot-reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  padding: 18px 22px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.82) 100%);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border: 1.5px solid rgba(var(--card-rgb), 0.7);
  border-radius: 18px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.65),
    0 0 30px rgba(var(--card-rgb), 0.45);
  cursor: pointer;
  text-align: center;
  animation: mascotPop 0.6s cubic-bezier(0.34, 1.6, 0.5, 1);
}
.pkd-hero-mascot-reveal.out { animation: mascotOut 0.28s ease forwards; }
@keyframes mascotPop {
  0%   { transform: translate(-50%, -50%) scale(0.4) rotate(-12deg); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.08) rotate(3deg);  opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0);        opacity: 1; }
}
@keyframes mascotOut {
  to { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
}
.mascot-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.strain-mascot {
  display: block;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -webkit-crisp-edges;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
.mascot-cry {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgb(var(--card-rgb));
  text-shadow: 0 0 8px rgba(var(--card-rgb), 0.55);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Heat advisor : banner Sweet spot après spin ─── */
.pkd-hero-advisor {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 10;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.78) 100%);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border: 1px solid rgba(var(--card-rgb), 0.55);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: advisorPop 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.pkd-hero-advisor.out { animation: advisorOut 0.28s ease forwards; }
@keyframes advisorPop {
  0%   { transform: translateY(16px) scale(0.92); opacity: 0; }
  60%  { transform: translateY(-3px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes advisorOut {
  to { transform: translateY(10px); opacity: 0; }
}
.advisor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.advisor-icon { font-size: 1.1rem; filter: drop-shadow(0 0 6px rgba(var(--card-rgb), 0.7)); }
.advisor-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text);
}
.advisor-sub {
  font-size: 0.66rem;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
.advisor-close {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1;
}
.advisor-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}
.advisor-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.advisor-stat-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.advisor-stat-val {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.advisor-stat.advisor-stat-highlight .advisor-stat-val {
  color: rgb(var(--card-rgb));
  text-shadow: 0 0 8px rgba(var(--card-rgb), 0.4);
}

/* Sigil retiré (remplacé par rosette) */
.pkd-hero-sigil-wrap { display: none; }
.pkd-hero .pkd-hero-sprite-frame { margin-top: 56px; }
.pkd-card-engraving .eng-l3 circle { filter: drop-shadow(0 0 1.5px rgba(252, 211, 77, 0.85)); }
.pkd-card-engraving .eng-l3 path   { filter: drop-shadow(0 0 0.8px rgba(252, 211, 77, 0.55)); }
.pkd-card-engraving .eng-l2 circle { filter: drop-shadow(0 0 0.6px rgba(187, 247, 208, 0.6)); }
.pkd-card-engraving .eng-l1 path,
.pkd-card-engraving .eng-l1 rect   { filter: drop-shadow(0 0 0.6px rgba(165, 243, 252, 0.55)); }

/* ═══════════════════════════════════════════════════
   HERO CARD : refonte premium TCG
   ═══════════════════════════════════════════════════ */

/* Engraving : reste en arrière-plan derrière tout */
.pkd-hero .pkd-card-engraving {
  border-radius: inherit;
  z-index: 0;
  height: 60%;
  bottom: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

/* ─── Coins ornementaux (style cyber/TCG) ─── */
.pkd-hero-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 4;
  border-color: rgba(var(--card-rgb), 0.85);
  border-style: solid;
  border-width: 0;
  filter: drop-shadow(0 0 4px rgba(var(--card-rgb), 0.55));
}
.pkd-corner-tl { top: 8px;    left: 8px;    border-top-width: 2px;    border-left-width: 2px;    border-top-left-radius: 8px; }
.pkd-corner-tr { top: 8px;    right: 8px;   border-top-width: 2px;    border-right-width: 2px;   border-top-right-radius: 8px; }
.pkd-corner-bl { bottom: 8px; left: 8px;    border-bottom-width: 2px; border-left-width: 2px;    border-bottom-left-radius: 8px; }
.pkd-corner-br { bottom: 8px; right: 8px;   border-bottom-width: 2px; border-right-width: 2px;   border-bottom-right-radius: 8px; }
.pkd-hero.rarity-mythical .pkd-hero-corner {
  border-color: #fcd34d;
  filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.8));
}
.pkd-hero.rarity-legendary .pkd-hero-corner {
  border-color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.7));
}

/* ─── Rarity badge top-left, Num top-right ─── */
.pkd-hero .pkd-hero-rarity {
  position: absolute;
  top: 18px;
  left: 20px;
  margin: 0;
  z-index: 5;
}
.pkd-hero .pkd-hero-num { z-index: 5; top: 18px; right: 20px; }

/* ─── Frame autour du sprite avec halo lumineux ─── */
.pkd-hero-sprite-frame {
  position: relative;
  z-index: 2;
  width: 196px;
  height: 196px;
  margin: 18px auto 14px;
  cursor: pointer;
}
.pkd-hero-sprite-frame:active { transform: scale(0.98); transition: transform 0.1s ease; }
.pkd-hero-frame-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--card-rgb), 0.45) 0%, rgba(var(--card-rgb), 0.18) 35%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.pkd-hero.rarity-legendary .pkd-hero-frame-glow {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.55) 0%, rgba(251, 191, 36, 0.22) 40%, transparent 75%);
}
.pkd-hero.rarity-mythical .pkd-hero-frame-glow {
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55) 0%, rgba(255, 100, 200, 0.35) 35%, rgba(100, 200, 255, 0.18) 60%, transparent 80%);
  animation: pulseHaloMythic 3.4s ease-in-out infinite;
}
@keyframes pulseHaloMythic {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.08); }
}
.pkd-hero .pkd-hero-sprite {
  position: relative;
  z-index: 1;
  margin: 0 !important;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: 1.5px solid rgba(var(--card-rgb), 0.55);
  box-shadow:
    inset 0 0 24px rgba(var(--card-rgb), 0.18),
    0 4px 18px rgba(0, 0, 0, 0.5);
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px), 0 14px
  );
}
.pkd-hero.rarity-legendary .pkd-hero-sprite {
  border-color: #fbbf24;
  box-shadow:
    inset 0 0 30px rgba(251, 191, 36, 0.3),
    0 4px 22px rgba(251, 191, 36, 0.35);
}
.pkd-hero.rarity-mythical .pkd-hero-sprite {
  border-color: rgba(167, 139, 250, 0.85);
  box-shadow:
    inset 0 0 30px rgba(167, 139, 250, 0.35),
    0 4px 26px rgba(255, 100, 200, 0.45);
}

/* ─── Banner nom avec décoration ─── */
.pkd-hero-name-banner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 14px 12px;
}
.pkd-hero-name-deco {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--card-rgb), 0.6), transparent);
  position: relative;
}
.pkd-hero-name-deco::before,
.pkd-hero-name-deco::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  background: rgba(var(--card-rgb), 0.9);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 6px rgba(var(--card-rgb), 0.7);
}
.pkd-hero-name-deco.left::after  { right: 0; }
.pkd-hero-name-deco.right::before { left: 0;  }
.pkd-hero-name-deco.left::before  { display: none; }
.pkd-hero-name-deco.right::after  { display: none; }
.pkd-hero-name-banner .pkd-hero-name {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.pkd-hero.rarity-legendary .pkd-hero-name {
  color: #fde68a;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.55), 0 2px 6px rgba(0, 0, 0, 0.7);
}
.pkd-hero.rarity-mythical .pkd-hero-name {
  background: linear-gradient(90deg, #fcd34d 0%, #ff64c8 50%, #a78bfa 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(255, 100, 200, 0.45);
}

/* ─── Sous-titre breeder (sous le nom) ─── */
.pkd-hero-breeder {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-dim);
  margin: -4px 0 10px;
  letter-spacing: 0.02em;
}
.pkd-hero-breeder strong {
  color: var(--text);
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
}
.pkd-hero-breeder-lbl {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-style: normal;
  margin-right: 4px;
}
.pkd-hero-breeder-more {
  font-size: 0.66rem;
  opacity: 0.8;
  font-style: normal;
  margin-left: 4px;
  font-family: var(--mono);
  background: rgba(var(--card-rgb), 0.15);
  border: 1px solid rgba(var(--card-rgb), 0.35);
  color: rgb(var(--card-rgb));
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease;
}
.pkd-hero-breeder-more:hover { background: rgba(var(--card-rgb), 0.28); opacity: 1; }
.pkd-hero-breeder-more:active { transform: scale(0.94); }

/* ─── Mode beta : code unique au lieu de la paywall ─── */
.paywall.beta-mode > *:not(#beta-form-container) { display: none !important; }
.beta-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 18px;
}
.beta-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, var(--panel) 0%, rgba(20, 23, 29, 0.95) 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}
.beta-badge {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(90deg, #ff64c8, #a78bfa);
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(167, 139, 250, 0.45);
}
.beta-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}
.beta-sub {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 14px;
}
.beta-end {
  font-size: 0.82rem;
  color: var(--text);
  margin: 0 0 22px;
  padding: 8px 14px;
  background: rgba(167, 139, 250, 0.12);
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.3);
}
#beta-code-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.1rem;
  font-family: var(--mono);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.1em;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  margin-bottom: 14px;
  text-transform: uppercase;
}
#beta-code-input:focus {
  border-color: rgba(167, 139, 250, 0.6);
  outline: none;
}
.beta-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, #ff64c8, #a78bfa);
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(167, 139, 250, 0.45);
}
.beta-submit:active { transform: scale(0.98); }
.beta-countdown {
  margin: 8px auto 20px;
  text-align: center;
}
.beta-countdown-num {
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(90deg, #ff64c8, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 24px rgba(167, 139, 250, 0.25);
}
.beta-countdown-label {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.beta-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 16px 0 6px;
  font-style: italic;
}
.beta-support {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.5);
  color: #a78bfa;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
}
.beta-support:hover { background: rgba(167, 139, 250, 0.12); border-color: #a78bfa; }
.beta-support:active { transform: scale(0.97); }

/* ─── Autocomplete strain + breeder ─── */
.autocomplete-field { position: relative; }
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.autocomplete-list.hidden { display: none; }
.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item:focus { background: rgba(var(--accent-rgb, 52, 211, 153), 0.1); outline: none; }
.ac-name { color: var(--text); font-weight: 600; }
.ac-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: 8px;
  white-space: nowrap;
}

/* ─── Bandeau specs ─── */
.pkd-hero-band {
  position: relative;
  z-index: 2;
  margin: 4px 0 0;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 100%);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--card-rgb), 0.28);
  border-radius: 14px;
}
.pkd-hero.rarity-mythical .pkd-hero-band {
  background: linear-gradient(180deg, rgba(13, 5, 33, 0.7) 0%, rgba(36, 10, 69, 0.55) 100%);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: inset 0 0 20px rgba(167, 139, 250, 0.12);
}
.pkd-hero.rarity-legendary .pkd-hero-band {
  background: linear-gradient(180deg, rgba(28, 16, 6, 0.65) 0%, rgba(35, 23, 8, 0.5) 100%);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: inset 0 0 16px rgba(251, 191, 36, 0.08);
}

/* ─── Crest "Top Run" ─── */
.pkd-hero-crest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: linear-gradient(95deg, rgba(var(--card-rgb), 0.18), rgba(var(--card-rgb), 0.06));
  border: 1px solid rgba(var(--card-rgb), 0.3);
  border-radius: 10px;
}
.pkd-hero-crest .crest-emoji {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}
.pkd-hero-crest .crest-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.pkd-hero-crest .crest-lbl {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.crest-mat {
  font-size: 0.85rem;
  filter: drop-shadow(0 0 4px rgba(var(--card-rgb), 0.5));
}
.pkd-hero-crest .crest-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pkd-hero.rarity-mythical .pkd-hero-crest {
  background: linear-gradient(95deg, rgba(167, 139, 250, 0.25), rgba(255, 100, 200, 0.12));
  border-color: rgba(167, 139, 250, 0.45);
}

/* ─── Stat bars upgrade : icon + bar + valeur right-aligned ─── */
.pkd-hero .pkd-stats-bars { display: flex; flex-direction: column; gap: 9px; }
.pkd-hero .pkd-stat-row {
  display: grid;
  grid-template-columns: 22px 80px 1fr auto;
  align-items: center;
  gap: 8px;
}
.pkd-stat-ico {
  font-size: 0.95rem;
  text-align: center;
  filter: drop-shadow(0 0 4px rgba(var(--card-rgb), 0.5));
}
.pkd-hero .pkd-stat-lbl {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-align: left;
}
.pkd-hero .pkd-stat-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.pkd-hero .pkd-stat-fill {
  height: 100%;
  background: linear-gradient(90deg,
    rgba(var(--card-rgb), 0.95) 0%,
    rgba(var(--card-rgb), 0.7)  100%);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 8px rgba(var(--card-rgb), 0.55);
}
.pkd-hero .pkd-stat-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 50%);
  border-radius: inherit;
}
.pkd-hero.rarity-mythical .pkd-stat-fill {
  background: linear-gradient(90deg, #fcd34d 0%, #ff64c8 50%, #a78bfa 100%);
  box-shadow: 0 0 10px rgba(255, 100, 200, 0.55);
}
.pkd-hero.rarity-legendary .pkd-stat-fill {
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}
.pkd-hero .pkd-stat-val {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  min-width: 44px;
  text-align: right;
  color: var(--text);
}

/* ─── Materials chips remontés dans le hero (au-dessus du band) ─── */
.pkd-hero > .pkd-hero-mats {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
}

/* ─── Ligne MATERIAL dans la stat table ─── */
.pkd-hero .pkd-stat-row.pkd-stat-material,
.pkd-stat-row.pkd-stat-material {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-bottom: 9px;
  margin-bottom: 7px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  flex-wrap: nowrap;
  width: 100%;
}
.pkd-hero .pkd-stat-row.pkd-stat-material .pkd-stat-mat-chips {
  justify-content: center;
}
.pkd-stat-row.pkd-stat-material .pkd-stat-lbl {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  white-space: nowrap;
}
.pkd-stat-mat-chips {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.pkd-stat-mat-chips::-webkit-scrollbar { display: none; }
.pkd-stat-mat-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 8px 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  min-width: 30px;
  flex: 0 0 auto;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.pkd-stat-mat-chip:active { transform: scale(0.95); }
.pkd-stat-mat-chip .chip-emoji { font-size: 0.92rem; }
.pkd-stat-mat-chip .chip-n { font-size: 0.6rem; }
.pkd-stat-mat-chip .chip-emoji {
  display: block;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
}
.pkd-stat-mat-chip .chip-n {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.62rem;
  opacity: 0.85;
  text-align: center;
  line-height: 1;
}
.pkd-stat-mat-chip.primary {
  background: rgba(var(--mat-rgb, var(--card-rgb)), 0.2);
  border-color: rgba(var(--mat-rgb, var(--card-rgb)), 0.5);
  color: var(--text);
}
.pkd-stat-mat-chip.primary .chip-emoji {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 2px rgba(var(--mat-rgb, var(--card-rgb)), 0.5));
}
.pkd-stat-mat-chip.primary .chip-n { opacity: 1; font-size: 0.7rem; }
/* Sélection : ring net coloré (pas de blur baveux) */
.pkd-stat-mat-chip.active {
  background: rgba(var(--mat-rgb, var(--card-rgb)), 0.32);
  border-color: rgba(var(--mat-rgb, var(--card-rgb)), 0.85);
  outline: 1.5px solid rgba(var(--mat-rgb, var(--card-rgb)), 0.55);
  outline-offset: 1px;
  color: var(--text);
}
.pkd-stat-mat-chip:not(.primary).active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  outline: 1.5px solid rgba(255, 255, 255, 0.35);
}

/* ─── Vote heart sur chaque fiche du Rosidex ─── */
.pkd-fiche-vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 5px 9px;
  margin-left: 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.pkd-fiche-vote:active { transform: scale(0.92); }
.pkd-fiche-vote .vote-heart { font-size: 0.95rem; }
.pkd-fiche-vote .vote-count {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--text-dim);
  min-width: 10px;
  text-align: center;
}
.pkd-fiche-vote.voted {
  background: rgba(255, 92, 132, 0.18);
  border-color: rgba(255, 92, 132, 0.55);
}
.pkd-fiche-vote.voted .vote-count { color: #ff8aa5; }

/* ─── Présentation Rosidex à l'inscription ─── */
#pokedex-intro {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 60px;
}
.pkd-intro-counter {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin: -2px 0 6px;
}

/* ─── Sigil heraldic ─── */
.pkd-hero-sigil-wrap {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.pkd-sigil {
  display: block;
  opacity: 0.95;
}
.pkd-hero.rarity-mythical .pkd-sigil {
  filter: drop-shadow(0 0 8px rgba(252, 211, 77, 0.7)) drop-shadow(0 0 14px rgba(167, 139, 250, 0.5));
}
.pkd-hero.rarity-legendary .pkd-sigil {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}
/* Le sprite frame doit descendre un peu pour laisser place au sigil */
.pkd-hero .pkd-hero-sprite-frame { margin-top: 56px; }

/* Holo + rareté */
.pkd-card-holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.pkd-card.rarity-rare {
  border-color: #5cc7ff;
  box-shadow: 0 2px 14px rgba(92, 199, 255, 0.25);
}
.pkd-card.rarity-rare .pkd-card-holo {
  opacity: 0.4;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(92, 199, 255, 0.18) 45%,
    rgba(165, 100, 255, 0.18) 55%,
    transparent 70%);
  background-size: 200% 200%;
  animation: holoShine 4s ease-in-out infinite;
}
.pkd-card.rarity-legendary {
  border-color: #fbbf24;
  box-shadow: 0 4px 22px rgba(251, 191, 36, 0.4), inset 0 0 18px rgba(251, 191, 36, 0.1);
  background:
    linear-gradient(160deg, rgba(251, 191, 36, 0.22) 0%, rgba(251, 191, 36, 0.05) 100%),
    var(--panel);
}
.pkd-card.rarity-legendary .pkd-card-holo {
  opacity: 0.7;
  background: linear-gradient(115deg,
    transparent 25%,
    rgba(251, 191, 36, 0.35) 40%,
    rgba(255, 100, 200, 0.3) 50%,
    rgba(100, 200, 255, 0.3) 60%,
    transparent 75%);
  background-size: 250% 250%;
  animation: holoShine 3s ease-in-out infinite;
}
.pkd-card.rarity-legendary .pkd-card-stat-val { color: #fbbf24; }

.pkd-card.rarity-mythical {
  border: 2px solid transparent;
  box-shadow: 0 6px 28px rgba(255, 100, 200, 0.45), inset 0 0 24px rgba(167, 139, 250, 0.18);
  background:
    linear-gradient(160deg, rgba(255, 100, 200, 0.25) 0%, rgba(167, 139, 250, 0.15) 50%, rgba(100, 200, 255, 0.2) 100%),
    var(--panel);
  position: relative;
  clip-path: inset(0 round 14px);
  isolation: isolate;
}
.pkd-card.rarity-mythical::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg,
    #ff3b8a 0%,
    #ff8a3b 14%,
    #ffd93b 28%,
    #3bff7e 42%,
    #3bd9ff 56%,
    #3b6bff 70%,
    #a83bff 84%,
    #ff3b8a 100%);
  background-size: 400% 400%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: mythicBorderShift 6s linear infinite;
  will-change: background-position;
  pointer-events: none;
}
@keyframes mythicBorderShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}
/* ── Mythical : ambiance galactique ── */
.pkd-card.rarity-mythical {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(167, 139, 250, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 100, 200, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(100, 50, 200, 0.4) 0%, transparent 70%),
    linear-gradient(160deg, #0d0521 0%, #1a0838 50%, #240a45 100%);
}
.pkd-card.rarity-mythical .pkd-card-holo {
  opacity: 0.85;
  background:
    radial-gradient(ellipse 60% 40% at 30% 30%, rgba(167, 139, 250, 0.6) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 70% 70%, rgba(255, 100, 200, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(100, 200, 255, 0.4) 0%, transparent 60%);
  mix-blend-mode: screen;
  animation: mythicNebula 14s ease-in-out infinite;
  filter: blur(6px);
  will-change: transform;
}
@keyframes mythicNebula {
  0%, 100% { transform: rotate(0deg)   scale(1.1) translate(0, 0); }
  25%      { transform: rotate(90deg)  scale(1.3) translate(3%, -2%); }
  50%      { transform: rotate(180deg) scale(1.2) translate(-2%, 3%); }
  75%      { transform: rotate(270deg) scale(1.35) translate(2%, 2%); }
}

.pkd-card.rarity-mythical::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Champ d'étoiles */
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 78% 28%, rgba(255, 255, 255, 1), transparent),
    radial-gradient(1px 1px at 45% 65%, rgba(200, 220, 255, 0.85), transparent),
    radial-gradient(2px 2px at 22% 78%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1px 1px at 88% 52%, rgba(220, 200, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 60% 12%, rgba(255, 240, 200, 0.9), transparent),
    radial-gradient(1px 1px at 33% 38%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 92% 82%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1px 1px at 18% 45%, rgba(180, 220, 255, 0.85), transparent),
    radial-gradient(2px 2px at 70% 92%, rgba(255, 255, 255, 1), transparent),
    radial-gradient(1px 1px at 50% 25%, rgba(255, 255, 255, 0.7), transparent);
  animation: mythicTwinkle 4s ease-in-out infinite;
}
@keyframes mythicTwinkle {
  0%, 100% { opacity: 0.9; filter: brightness(1); }
  25%      { opacity: 1;   filter: brightness(1.4); }
  50%      { opacity: 0.7; filter: brightness(0.85); }
  75%      { opacity: 1;   filter: brightness(1.3); }
}

/* Comète : streak fin qui traverse en diagonale */
.pkd-card.rarity-mythical .pkd-card-scan {
  inset: -50%;
  background: linear-gradient(115deg,
    transparent 48%,
    rgba(255, 255, 255, 0.7) 49.8%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.7) 50.2%,
    transparent 52%);
  opacity: 0;
  transform: translate(-100%, -100%);
  animation: mythicComet 5s linear infinite;
  filter: blur(0.4px) drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
  pointer-events: none;
  will-change: transform, opacity;
}

/* Quand la carte mythique est tap (scanning) : on remplace le comet permanent
   par un sweep flash dramatique one-shot pour marquer la sélection */
.pkd-card.rarity-mythical.scanning .pkd-card-scan {
  inset: -30%;
  background: linear-gradient(115deg,
    transparent 35%,
    rgba(255, 215, 92, 0.4) 44%,
    rgba(255, 255, 255, 0.9) 49.5%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.9) 50.5%,
    rgba(255, 110, 196, 0.5) 56%,
    transparent 65%);
  opacity: 1;
  filter: blur(1px) drop-shadow(0 0 12px rgba(255, 255, 255, 0.85));
  animation: mythicScanFlash 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1;
}
@keyframes mythicScanFlash {
  0%   { transform: translate(-120%, -120%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translate(120%, 120%); opacity: 0; }
}
.pkd-card.rarity-mythical.scanning {
  box-shadow:
    0 0 50px rgba(255, 215, 92, 0.7),
    0 0 90px rgba(255, 110, 196, 0.45),
    inset 0 0 24px rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.02);
  transition: transform 0.32s, box-shadow 0.32s;
  border-radius: 14px;
  overflow: hidden;
}
/* La rainbow border ::before doit rester arrondie au scan */
.pkd-card.rarity-mythical.scanning::before {
  border-radius: 16px;
}
/* Le scan ne doit pas déborder même avec son inset négatif */
.pkd-card.rarity-mythical.scanning .pkd-card-scan {
  border-radius: 14px;
  overflow: hidden;
}
@keyframes mythicComet {
  0%   { transform: translate(-100%, -100%); opacity: 0; }
  50%  { transform: translate(-100%, -100%); opacity: 0; }
  62%  { opacity: 0.85; }
  88%  { opacity: 0.85; }
  100% { transform: translate(100%, 100%);  opacity: 0; }
}
.pkd-card.rarity-mythical .pkd-card-stat-val {
  background: linear-gradient(90deg, #ff64c8, #a78bfa, #64c8ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(255, 100, 200, 0.6));
}
@keyframes holoShine {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}
.pkd-card-rarity {
  position: absolute;
  top: 10px;
  left: -1px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 8px 3px 9px;
  border-radius: 0 6px 6px 0;
  pointer-events: none;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pkd-card-rarity.common {
  background: linear-gradient(90deg, #6b7280 0%, #4b5563 100%);
  color: #e5e7eb;
  box-shadow: 0 2px 6px rgba(107, 114, 128, 0.3);
}
.pkd-card-rarity.rare {
  background: linear-gradient(90deg, #5cc7ff 0%, #3aaae0 100%);
  color: #06212e;
  box-shadow: 0 2px 8px rgba(92, 199, 255, 0.4);
}
.pkd-card-rarity.legendary {
  background: linear-gradient(90deg, #fbbf24 0%, #f5a524 100%);
  color: #3a2700;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.pkd-card-rarity.mythical {
  background: linear-gradient(90deg, #ff64c8 0%, #a78bfa 50%, #64c8ff 100%);
  background-size: 200% 100%;
  color: #fff;
  box-shadow: 0 2px 14px rgba(255, 100, 200, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  animation: mythicBadgeShift 3s linear infinite;
}
@keyframes mythicBadgeShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ─── Pokédex hero (détail strain mode "fiche") ─── */
.pkd-hero {
  position: relative;
  margin: 14px 14px 12px;
  padding: 22px 18px 18px;
  background:
    linear-gradient(160deg, rgba(var(--card-rgb), 0.2) 0%, rgba(var(--card-rgb), 0.04) 70%),
    var(--panel);
  border: 1.5px solid rgba(var(--card-rgb), 0.4);
  border-radius: 18px;
  text-align: center;
  overflow: hidden;
}
.pkd-hero.rarity-rare {
  border-color: #5cc7ff;
  box-shadow: 0 4px 24px rgba(92, 199, 255, 0.18);
}
.pkd-hero.rarity-legendary {
  border-color: #fbbf24;
  box-shadow: 0 6px 30px rgba(251, 191, 36, 0.35), inset 0 0 30px rgba(251, 191, 36, 0.08);
  background:
    linear-gradient(160deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.04) 70%),
    var(--panel);
}
.pkd-hero.rarity-legendary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 25%,
    rgba(251, 191, 36, 0.25) 45%,
    rgba(255, 100, 200, 0.2) 50%,
    rgba(100, 200, 255, 0.2) 55%,
    transparent 75%);
  background-size: 220% 220%;
  animation: holoShine 4s ease-in-out infinite;
  pointer-events: none;
}

.pkd-hero.rarity-mythical {
  border-color: transparent;
  box-shadow: 0 8px 40px rgba(167, 139, 250, 0.5), inset 0 0 50px rgba(100, 50, 200, 0.25);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(167, 139, 250, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 100, 200, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(100, 50, 200, 0.4) 0%, transparent 65%),
    linear-gradient(160deg, #0d0521 0%, #1a0838 50%, #240a45 100%);
  position: relative;
  overflow: hidden;
  /* Force le clipping arrondi sur les enfants avec blur + mix-blend-mode
     (bug Chromium : overflow:hidden seul ne suffit pas dans ce cas) */
  clip-path: inset(0 round 18px);
  isolation: isolate;
}
.pkd-hero.rarity-mythical::before {
  content: "";
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(ellipse 50% 35% at 30% 30%, rgba(167, 139, 250, 0.6) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 70% 70%, rgba(255, 100, 200, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 50% 50%, rgba(100, 200, 255, 0.4) 0%, transparent 60%);
  mix-blend-mode: screen;
  animation: mythicNebula 14s ease-in-out infinite;
  filter: blur(14px);
  pointer-events: none;
}
.pkd-hero.rarity-mythical::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 8% 14%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(2px 2px at 22% 28%, rgba(255, 255, 255, 1), transparent),
    radial-gradient(1px 1px at 38% 52%, rgba(200, 220, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 55% 18%, rgba(255, 240, 220, 0.9), transparent),
    radial-gradient(1px 1px at 72% 62%, rgba(220, 200, 255, 0.85), transparent),
    radial-gradient(2px 2px at 88% 38%, rgba(255, 255, 255, 1), transparent),
    radial-gradient(1px 1px at 92% 78%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 18% 82%, rgba(180, 220, 255, 0.9), transparent),
    radial-gradient(1px 1px at 48% 92%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 65% 88%, rgba(255, 200, 255, 0.95), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 12% 58%, rgba(255, 255, 255, 0.9), transparent);
  animation: mythicTwinkle 5s ease-in-out infinite;
}
.pkd-hero-rarity.mythical {
  background: linear-gradient(90deg, #ff64c8 0%, #a78bfa 50%, #64c8ff 100%);
  background-size: 200% 100%;
  color: #fff;
  border: 1px solid rgba(255, 100, 200, 0.6);
  animation: mythicBadgeShift 3s linear infinite;
  text-shadow: 0 0 12px rgba(255, 100, 200, 0.5);
}
.pkd-hero > * { position: relative; z-index: 1; }
.pkd-hero-num {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.05rem;
  color: rgb(var(--card-rgb));
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(var(--card-rgb), 0.4);
  letter-spacing: -0.02em;
  z-index: 1;
}
.pkd-hero-sprite {
  margin: 12px auto 10px;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(var(--card-rgb), 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pkd-hero-sprite img { width: 100%; height: 100%; object-fit: cover; }
.pkd-hero-emoji { font-size: 4.5rem; opacity: 0.8; }
.pkd-hero-rarity {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.pkd-hero-rarity.common { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }
.pkd-hero-rarity.rare { background: rgba(92, 199, 255, 0.18); color: #5cc7ff; border: 1px solid rgba(92, 199, 255, 0.4); }
.pkd-hero-rarity.legendary { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.6); text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }

/* ─────────────────────────────────────────────────────────────
   DIVINE TIER (au-dessus de Mythical)
   Palette : blanc-or iridescent froid (#f6f0d8 → #e8d28a → #cfa84d)
   Mood : lumière intemporelle, halo respirant lent, scan ascendant
   ───────────────────────────────────────────────────────────── */

/* Badge tagline carte */
.pkd-card-rarity.divine {
  background: linear-gradient(90deg, #f6f0d8 0%, #e8d28a 50%, #cfa84d 100%);
  background-size: 200% 100%;
  color: #2a1d05;
  box-shadow: 0 2px 14px rgba(232, 210, 138, 0.7);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: divineBadgeShift 5s linear infinite;
}
@keyframes divineBadgeShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Badge hero */
.pkd-hero-rarity.divine {
  background: linear-gradient(90deg, #f6f0d8 0%, #e8d28a 50%, #cfa84d 100%);
  background-size: 200% 100%;
  color: #2a1d05;
  border: 1px solid rgba(232, 210, 138, 0.7);
  animation: divineBadgeShift 5s linear infinite;
  text-shadow: 0 0 10px rgba(246, 240, 216, 0.55);
}

/* Rosette spin (hérite mythical) */
.pkd-card.rarity-divine .pkd-rosette,
.pkd-hero.rarity-divine .pkd-rosette {
  animation: rosetteSpin 32s linear infinite;
  filter: drop-shadow(0 0 8px rgba(246, 240, 216, 0.75)) drop-shadow(0 0 14px rgba(207, 168, 77, 0.5));
}
.pkd-hero.rarity-divine .pkd-rosette.spinning {
  animation: wheelSpin 3s cubic-bezier(0.08, 0.95, 0.2, 1);
}

/* Sigil */
.pkd-hero.rarity-divine .pkd-sigil {
  filter: drop-shadow(0 0 8px rgba(246, 240, 216, 0.85)) drop-shadow(0 0 16px rgba(232, 210, 138, 0.55));
}

/* Hero corner liseré or */
.pkd-hero.rarity-divine .pkd-hero-corner {
  border-color: #f6f0d8;
  filter: drop-shadow(0 0 6px rgba(246, 240, 216, 0.85));
}

/* Hero frame glow : halo respirant lent */
.pkd-hero.rarity-divine .pkd-hero-frame-glow {
  background: radial-gradient(circle,
    rgba(246, 240, 216, 0.6) 0%,
    rgba(232, 210, 138, 0.32) 35%,
    rgba(207, 168, 77, 0.15) 60%,
    transparent 82%);
  animation: divineHaloBreath 5.2s ease-in-out infinite;
}
@keyframes divineHaloBreath {
  0%, 100% { opacity: 0.78; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

/* Sprite border iridescent */
.pkd-hero.rarity-divine .pkd-hero-sprite {
  border-color: rgba(246, 240, 216, 0.9);
  box-shadow:
    inset 0 0 32px rgba(232, 210, 138, 0.35),
    0 4px 28px rgba(207, 168, 77, 0.4);
}

/* Nom gradient or */
.pkd-hero.rarity-divine .pkd-hero-name {
  background: linear-gradient(90deg, #fffaeb 0%, #f6f0d8 30%, #e8d28a 60%, #cfa84d 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(232, 210, 138, 0.5);
}

/* Band */
.pkd-hero.rarity-divine .pkd-hero-band {
  background: linear-gradient(180deg, rgba(20, 14, 4, 0.7) 0%, rgba(35, 26, 8, 0.55) 100%);
  border-color: rgba(232, 210, 138, 0.45);
  box-shadow: inset 0 0 22px rgba(246, 240, 216, 0.14);
}

/* Crest */
.pkd-hero.rarity-divine .pkd-hero-crest {
  background: linear-gradient(95deg, rgba(232, 210, 138, 0.28), rgba(207, 168, 77, 0.12));
  border-color: rgba(232, 210, 138, 0.5);
}

/* Stat fill or-blanc */
.pkd-hero.rarity-divine .pkd-stat-fill {
  background: linear-gradient(90deg, #fffaeb 0%, #f6f0d8 40%, #e8d28a 75%, #cfa84d 100%);
  box-shadow: 0 0 12px rgba(246, 240, 216, 0.65);
}

/* ─── Carte Divine : fond profond + bordure prism + champ d'or ─── */
.pkd-card.rarity-divine {
  border: 2px solid transparent;
  box-shadow: 0 6px 30px rgba(232, 210, 138, 0.45), inset 0 0 26px rgba(246, 240, 216, 0.18);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(246, 240, 216, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(232, 210, 138, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(207, 168, 77, 0.18) 0%, transparent 70%),
    linear-gradient(160deg, #040608 0%, #0c0a06 50%, #14110a 100%);
  position: relative;
  clip-path: inset(0 round 14px);
  isolation: isolate;
}
.pkd-card.rarity-divine::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg,
    #fffaeb 0%,
    #f6f0d8 18%,
    #fbe9b3 36%,
    #e8d28a 54%,
    #cfa84d 72%,
    #f6f0d8 90%,
    #fffaeb 100%);
  background-size: 400% 400%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: divineBorderShift 12s linear infinite;
  will-change: background-position;
  pointer-events: none;
}
@keyframes divineBorderShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

/* Holo doux iridescent */
.pkd-card.rarity-divine .pkd-card-holo {
  opacity: 0.8;
  background:
    radial-gradient(ellipse 60% 40% at 30% 30%, rgba(246, 240, 216, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 70% 70%, rgba(232, 210, 138, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 245, 200, 0.4) 0%, transparent 60%);
  mix-blend-mode: screen;
  animation: divineNebula 18s ease-in-out infinite;
  filter: blur(7px);
  will-change: transform;
}
@keyframes divineNebula {
  0%, 100% { transform: rotate(0deg)   scale(1.1) translate(0, 0); }
  25%      { transform: rotate(90deg)  scale(1.25) translate(2%, -1%); }
  50%      { transform: rotate(180deg) scale(1.18) translate(-1%, 2%); }
  75%      { transform: rotate(270deg) scale(1.3)  translate(1%, 1%); }
}

/* Champ de particules dorées discrètes (vs étoiles blanches du mythical) */
.pkd-card.rarity-divine::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 245, 200, 0.95), transparent),
    radial-gradient(1.5px 1.5px at 78% 28%, rgba(246, 240, 216, 1), transparent),
    radial-gradient(1px 1px at 45% 65%, rgba(232, 210, 138, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 22% 78%, rgba(255, 245, 200, 0.9), transparent),
    radial-gradient(1px 1px at 88% 52%, rgba(246, 240, 216, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 60% 12%, rgba(255, 245, 200, 0.95), transparent),
    radial-gradient(1px 1px at 33% 38%, rgba(246, 240, 216, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 92% 82%, rgba(255, 245, 200, 0.95), transparent),
    radial-gradient(1px 1px at 18% 45%, rgba(232, 210, 138, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 70% 92%, rgba(255, 245, 200, 1), transparent),
    radial-gradient(1px 1px at 50% 25%, rgba(246, 240, 216, 0.7), transparent);
  animation: divineTwinkle 6s ease-in-out infinite;
}
@keyframes divineTwinkle {
  0%, 100% { opacity: 0.88; filter: brightness(1); }
  25%      { opacity: 1;    filter: brightness(1.35); }
  50%      { opacity: 0.72; filter: brightness(0.9); }
  75%      { opacity: 1;    filter: brightness(1.25); }
}

/* Scan ascendant lent (de bas en haut) */
.pkd-card.rarity-divine .pkd-card-scan {
  inset: -50%;
  background: linear-gradient(0deg,
    transparent 47%,
    rgba(255, 245, 200, 0.65) 49.5%,
    rgba(255, 250, 235, 0.95) 50%,
    rgba(255, 245, 200, 0.65) 50.5%,
    transparent 53%);
  opacity: 0;
  transform: translateY(100%);
  animation: divineAscend 6s linear infinite;
  filter: blur(0.4px) drop-shadow(0 0 4px rgba(246, 240, 216, 0.6));
  pointer-events: none;
  will-change: transform, opacity;
}
@keyframes divineAscend {
  0%   { transform: translateY(100%); opacity: 0; }
  45%  { transform: translateY(100%); opacity: 0; }
  55%  { opacity: 0.9; }
  85%  { opacity: 0.9; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* Scan flash one-shot quand carte sélectionnée */
.pkd-card.rarity-divine.scanning .pkd-card-scan {
  inset: -30%;
  background: linear-gradient(0deg,
    transparent 35%,
    rgba(246, 240, 216, 0.5) 44%,
    rgba(255, 250, 235, 0.95) 49.5%,
    rgba(255, 255, 250, 1) 50%,
    rgba(255, 250, 235, 0.95) 50.5%,
    rgba(232, 210, 138, 0.6) 56%,
    transparent 65%);
  opacity: 1;
  filter: blur(1px) drop-shadow(0 0 14px rgba(246, 240, 216, 0.9));
  animation: divineScanFlash 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1;
}
@keyframes divineScanFlash {
  0%   { transform: translateY(120%);  opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-120%); opacity: 0; }
}
.pkd-card.rarity-divine.scanning {
  box-shadow:
    0 0 60px rgba(246, 240, 216, 0.8),
    0 0 100px rgba(232, 210, 138, 0.5),
    inset 0 0 26px rgba(255, 250, 235, 0.45) !important;
  transform: scale(1.02);
  transition: transform 0.32s, box-shadow 0.32s;
  border-radius: 14px;
  overflow: hidden;
}
.pkd-card.rarity-divine.scanning::before { border-radius: 16px; }
.pkd-card.rarity-divine.scanning .pkd-card-scan { border-radius: 14px; overflow: hidden; }

/* Stat value carte : or */
.pkd-card.rarity-divine .pkd-card-stat-val {
  background: linear-gradient(90deg, #fffaeb, #e8d28a, #cfa84d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(246, 240, 216, 0.7));
}

/* ─── Hero Divine ─── */
.pkd-hero.rarity-divine {
  border-color: transparent;
  box-shadow: 0 8px 42px rgba(232, 210, 138, 0.55), inset 0 0 52px rgba(207, 168, 77, 0.22);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(246, 240, 216, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(232, 210, 138, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(207, 168, 77, 0.32) 0%, transparent 65%),
    linear-gradient(160deg, #040608 0%, #0c0a06 50%, #14110a 100%);
  position: relative;
  overflow: hidden;
  clip-path: inset(0 round 18px);
  isolation: isolate;
}
.pkd-hero.rarity-divine::before {
  content: "";
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(ellipse 50% 35% at 30% 30%, rgba(246, 240, 216, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 70% 70%, rgba(232, 210, 138, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 50% 50%, rgba(255, 245, 200, 0.4) 0%, transparent 60%);
  mix-blend-mode: screen;
  animation: divineNebula 18s ease-in-out infinite;
  filter: blur(14px);
  pointer-events: none;
}
.pkd-hero.rarity-divine::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 8% 14%, rgba(255, 245, 200, 0.95), transparent),
    radial-gradient(2px 2px at 22% 28%, rgba(246, 240, 216, 1), transparent),
    radial-gradient(1px 1px at 38% 52%, rgba(232, 210, 138, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 55% 18%, rgba(255, 250, 235, 0.9), transparent),
    radial-gradient(1px 1px at 72% 62%, rgba(232, 210, 138, 0.85), transparent),
    radial-gradient(2px 2px at 88% 38%, rgba(246, 240, 216, 1), transparent),
    radial-gradient(1px 1px at 92% 78%, rgba(255, 245, 200, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 18% 82%, rgba(246, 240, 216, 0.9), transparent),
    radial-gradient(1px 1px at 48% 92%, rgba(255, 245, 200, 0.7), transparent),
    radial-gradient(2px 2px at 65% 88%, rgba(232, 210, 138, 0.95), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(246, 240, 216, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 12% 58%, rgba(255, 245, 200, 0.9), transparent);
  animation: divineTwinkle 7s ease-in-out infinite;
}

.pkd-hero-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.pkd-hero-mats {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.pkd-mat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 7px;
  background: rgba(var(--mat-rgb), 0.15);
  border: 1px solid rgba(var(--mat-rgb), 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  color: rgb(var(--mat-rgb));
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pkd-mat-chip:active { transform: scale(0.94); }
.pkd-mat-chip.active {
  background: rgba(var(--mat-rgb), 0.4);
  border-color: rgb(var(--mat-rgb));
  box-shadow: 0 0 14px rgba(var(--mat-rgb), 0.5);
  color: #fff;
}
.pkd-mat-emoji { font-size: 0.95rem; line-height: 1; }
.pkd-mat-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.pkd-hero-bestby {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.pkd-hero-bestby strong { color: var(--accent); }

.pkd-stats-bars {
  margin-top: 4px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pkd-stat-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  align-items: center;
  gap: 8px;
}
.pkd-stat-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.pkd-stat-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(var(--card-rgb), 0.15);
}
.pkd-stat-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(var(--card-rgb), 0.6) 0%, rgb(var(--card-rgb)) 100%);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(var(--card-rgb), 0.4);
  transition: width 0.6s ease;
}
.pkd-stat-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

.pkd-section-title {
  margin: 18px 18px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.pkd-locked-card {
  margin: 30px 20px;
  padding: 30px 20px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  text-align: center;
}
.pkd-locked-icon { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.6; }
.pkd-locked-card h2 { font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
.pkd-locked-card .pkd-request-btn { margin-top: 14px; }

#pkd-strains-grid {
  padding: 0 14px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.pkd-strain-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.pkd-strain-card:active { transform: scale(0.98); }
.pkd-strain-card:hover { border-color: rgba(52, 211, 153, 0.3); }
.pkd-strain-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pkd-strain-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pkd-strain-stat {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.pkd-strain-stat span {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pkd-strain-stat.best span { color: var(--accent); }

#pkd-strain-stats {
  padding: 10px 14px 8px;
}
.pkd-strain-toolbar,
.pkd-grid-toolbar {
  margin: 4px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pkd-strain-toolbar .search-bar,
.pkd-grid-toolbar .search-bar {
  margin: 0;
  width: 100%;
}
.pkd-sort-select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 32px 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f99' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.pkd-sort-select:focus { outline: none; border-color: var(--accent); }
.pkd-sort-select option { background: var(--panel); color: var(--text); }
.pkd-strain-meta {
  display: flex;
  gap: 8px;
  justify-content: space-around;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px;
}
.pkd-meta-stat { text-align: center; }
.pkd-meta-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pkd-meta-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pkd-meta-stat.best .pkd-meta-val { color: var(--accent); }

#pkd-strain-fiches {
  padding: 0 14px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pkd-fiche-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pkd-fiche-row:active { background: var(--panel-elevated); }
.pkd-fiche-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--panel-soft);
}
.pkd-fiche-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0.3;
}
.pkd-fiche-info { flex: 1; min-width: 0; }
.pkd-fiche-strain {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pkd-fiche-meta {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.pkd-fiche-meta strong { color: var(--accent); }
.pkd-fiche-yield {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ─── Pokédex settings card ─── */
.pkd-card {
  margin-top: 10px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pkd-card.pkd-pending  { border-color: rgba(245, 165, 36, 0.4); }
.pkd-card.pkd-approved { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.04); }
.pkd-card.pkd-denied   { border-color: rgba(239, 68, 68, 0.3); }
.pkd-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pkd-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pkd-step-txt {
  font-size: 0.85rem;
  color: var(--text-dim);
}
#pokedex-pseudo {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
}
#pokedex-pseudo:focus { outline: none; border-color: var(--accent); }
.pkd-request-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--accent);
  color: #04130c;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.pkd-request-btn:active { transform: scale(0.98); }
.pkd-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  align-self: flex-start;
}
.pkd-badge.pending  { background: rgba(245, 165, 36, 0.15); color: var(--amber); border: 1px solid rgba(245, 165, 36, 0.4); }
.pkd-badge.approved { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(52, 211, 153, 0.4); }
.pkd-badge.denied   { background: rgba(239, 68, 68, 0.12); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.3); }
.pkd-card p {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.pkd-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 8px 0 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.pkd-info strong { color: var(--text); font-weight: 600; }

.wipe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease;
}
.wipe-btn:active { background: rgba(239, 68, 68, 0.18); transform: scale(0.98); }

.fv-test-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ─── PlantBuddy ─── */
#plantbuddy { padding: 16px 14px 88px; }
.pb-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.pb-title {
  font-size: 1.4rem; font-weight: 800; margin: 0;
  background: linear-gradient(90deg, #5fdd6b, #3aa64c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pb-tokens {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,196,0,0.18), rgba(255,140,0,0.12));
  border: 1px solid rgba(255,196,0,0.35);
  font-weight: 800; font-size: 0.95rem;
  color: #ffc844;
}
.pb-coin { font-size: 1.05rem; }
.pb-card {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 18px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.pb-sprite-wrap {
  display: flex; justify-content: center;
  margin-bottom: 14px;
  position: relative;
}
.pb-sprite {
  width: 180px; height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  filter: drop-shadow(0 8px 16px rgba(95,221,107,0.25));
  animation: pb-bob 3s ease-in-out infinite;
}
@keyframes pb-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.pb-stage-label {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim, #889);
  margin-bottom: 12px;
}
.pb-stage-label strong {
  font-size: 1.15rem;
  color: var(--text, #fff);
}
.pb-stage-name {
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(95,221,107,0.15);
  color: #5fdd6b;
  font-weight: 700;
  font-size: 0.75rem;
}
.pb-xp-bar-wrap { margin-bottom: 18px; }
.pb-xp-bar {
  height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 6px;
}
.pb-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #5fdd6b, #3aa64c);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.pb-xp-text {
  font-size: 0.78rem;
  color: var(--text-dim, #889);
  text-align: center;
}
.pb-xp-text .pb-xp-sep { opacity: 0.4; margin: 0 2px; }
.pb-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 14px;
}
.pb-stat {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 12px;
}
.pb-stat-num {
  font-size: 1.4rem; font-weight: 800;
  color: var(--text, #fff);
}
.pb-stat-label {
  font-size: 0.7rem;
  color: var(--text-dim, #889);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.pb-section { margin-top: 22px; }
.pb-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim, #889);
  margin: 0 0 10px 4px;
}
.pb-recent {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 14px;
  padding: 8px 0;
}
.pb-empty {
  padding: 18px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim, #889);
  margin: 0;
  font-style: italic;
}
.pb-event {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.pb-event:last-child { border-bottom: none; }
.pb-event-label { color: var(--text, #fff); }
.pb-event-meta { color: var(--text-dim, #889); font-size: 0.7rem; }
.pb-event-amount.pos { color: #5fdd6b; font-weight: 700; }
.pb-event-amount.neg { color: #ff7575; font-weight: 700; }

/* ─── Profil maker public ─── */
.mp-content { padding: 16px 14px 80px; }
.mp-header {
  text-align: center; margin-bottom: 14px;
}
.mp-pseudo {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(90deg, #5fdd6b, #3aa64c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mp-joined {
  font-size: 0.78rem;
  color: var(--text-dim, #889);
  margin-top: 4px;
}
.mp-intro {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text, #fff);
  font-style: italic;
}
.mp-pb-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.mp-pb-sprite {
  width: 90px; height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 10px rgba(95,221,107,0.2));
  animation: pb-bob 3s ease-in-out infinite;
}
.mp-pb-info { flex: 1; min-width: 0; }
.mp-pb-stage {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text, #fff);
  margin-bottom: 8px;
}
.mp-pb-stage span { color: #5fdd6b; }
.mp-empty-pb {
  text-align: center;
  font-style: italic;
  color: var(--text-dim, #889);
  font-size: 0.85rem;
  padding: 16px 0;
}
.mp-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.mp-stat {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.mp-stat-num {
  font-size: 1.2rem; font-weight: 800;
  color: var(--text, #fff);
}
.mp-stat-label {
  font-size: 0.65rem;
  color: var(--text-dim, #889);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.mp-section { margin-top: 18px; }
.mp-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim, #889);
  margin: 0 4px 10px;
}
.mp-badges {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.mp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(255,196,0,0.15), rgba(255,140,0,0.08));
  border: 1px solid rgba(255,196,0,0.3);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: #ffc844;
  font-weight: 700;
}
.mp-badge-emoji { font-size: 0.95rem; }
.mp-morphs {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.mp-morph {
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #a78bfa;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}
.mp-recent {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  padding: 4px 0;
}
.mp-fiche-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
}
.mp-fiche-row:last-child { border-bottom: none; }
.mp-fiche-row:hover { background: rgba(255,255,255,0.02); }
.mp-fiche-strain {
  font-size: 0.9rem;
  color: var(--text, #fff);
  font-weight: 600;
}
.mp-fiche-pheno {
  color: var(--text-dim, #889);
  font-weight: 400;
  font-size: 0.8rem;
  margin-left: 4px;
}
.mp-fiche-yield {
  color: #5fdd6b;
  font-weight: 800;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

/* Pseudo cliquable dans listes */
.pkd-clickable-pseudo {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.15);
  text-underline-offset: 2px;
}
.pkd-clickable-pseudo:hover { color: #5fdd6b; }

.pkd-intro-edit {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ─── Maker profile hero v2 (polished) ─── */
.mp-hero {
  display: flex; gap: 16px;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  align-items: center;
}
.mp-hero-sprite-wrap {
  position: relative;
  flex: 0 0 auto;
}
.mp-hero-sprite {
  width: 96px; height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 14px rgba(95,221,107,0.25));
  animation: pb-bob 3s ease-in-out infinite;
}
.mp-hero-stage-pill {
  position: absolute; bottom: -4px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #5fdd6b, #3aa64c);
  color: #0c1118;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(95,221,107,0.35);
}
.mp-hero-id {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.mp-hero-id .mp-pseudo {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(90deg, #5fdd6b, #3aa64c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.mp-stage-name {
  font-size: 0.78rem;
  color: var(--text-dim, #889);
  font-style: italic;
}
.mp-xp-row {
  margin-top: 6px;
}
.mp-xp-row .pb-xp-bar { margin-bottom: 4px; }
.mp-xp-text {
  font-size: 0.72rem;
  color: var(--text-dim, #889);
  font-variant-numeric: tabular-nums;
}
.mp-xp-text .mp-xp-next { opacity: 0.6; }
.mp-hero-id .mp-joined {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-dim, #889);
}

.mp-intro {
  background: rgba(95,221,107,0.06);
  border-left: 3px solid #5fdd6b;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text, #fff);
  line-height: 1.5;
}

/* ─── Maker profile : thèmes progressifs par stage ─── */

/* Stage 1-2 : neutre, look "débutant" */
.mp-stage-1 .mp-hero, .mp-stage-2 .mp-hero { border-color: rgba(95,221,107,0.18); }

/* Stage 3 : touche d'accent vert plus visible */
.mp-stage-3 .mp-hero {
  border-color: rgba(95,221,107,0.35);
  box-shadow: 0 4px 24px rgba(95,221,107,0.08);
}

/* Stage 4 : glow vert net */
.mp-stage-4 .mp-hero {
  border-color: rgba(95,221,107,0.5);
  box-shadow: 0 6px 28px rgba(95,221,107,0.18);
}
.mp-stage-4 .mp-hero-sprite { filter: drop-shadow(0 8px 18px rgba(95,221,107,0.4)); }

/* Stage 5 : glow ambré chaud + accent or */
.mp-stage-5 .mp-hero {
  border-color: rgba(245,165,36,0.45);
  background: linear-gradient(135deg, rgba(245,165,36,0.06), var(--panel, #1a1f2e) 60%);
  box-shadow: 0 8px 32px rgba(245,165,36,0.22);
}
.mp-stage-5 .mp-hero-sprite { filter: drop-shadow(0 8px 22px rgba(245,165,36,0.55)); }
.mp-stage-5 .mp-hero-stage-pill {
  background: linear-gradient(135deg, #f5a524, #e08a00);
}
.mp-stage-5 .mp-hero-id .mp-pseudo {
  background: linear-gradient(90deg, #ffd95c, #f5a524);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mp-stage-5 .mp-stats .mp-stat { border: 1px solid rgba(245,165,36,0.18); }

/* Stage 6 : premium full glow + animation, look "élite" */
.mp-stage-6 #mp-content,
.mp-stage-6.mp-content {
  position: relative;
}
.mp-stage-6 .mp-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(255,217,92,0.10), rgba(167,139,250,0.06) 50%, rgba(95,221,107,0.05) 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 1px rgba(255,217,92,0.5),
    0 0 32px rgba(255,217,92,0.25),
    0 16px 60px rgba(167,139,250,0.18);
  overflow: hidden;
}
.mp-stage-6 .mp-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,217,92,0.18), transparent 50%);
  pointer-events: none;
  animation: mp-shine 6s linear infinite;
}
@keyframes mp-shine {
  0%, 100% { transform: translate(0,0); opacity: 0.8; }
  50%      { transform: translate(6%, -4%); opacity: 1; }
}
.mp-stage-6 .mp-hero-sprite {
  filter:
    drop-shadow(0 0 12px rgba(255,217,92,0.55))
    drop-shadow(0 8px 24px rgba(167,139,250,0.4));
  animation: pb-bob 2.5s ease-in-out infinite, mp-pulse-glow 3s ease-in-out infinite;
}
@keyframes mp-pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255,217,92,0.55)) drop-shadow(0 8px 24px rgba(167,139,250,0.4)); }
  50%      { filter: drop-shadow(0 0 22px rgba(255,217,92,0.85)) drop-shadow(0 10px 30px rgba(167,139,250,0.55)); }
}
.mp-stage-6 .mp-hero-stage-pill {
  background: linear-gradient(135deg, #ffd95c, #f5a524, #ff6ec4);
  background-size: 200% 200%;
  animation: mp-pill-shift 4s linear infinite;
  color: #2a1a05;
  box-shadow: 0 4px 14px rgba(255,217,92,0.5);
}
@keyframes mp-pill-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.mp-stage-6 .mp-hero-id .mp-pseudo {
  background: linear-gradient(90deg, #ffd95c, #ff6ec4 50%, #a78bfa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: mp-pseudo-shimmer 5s linear infinite;
  text-shadow: 0 0 18px rgba(255,217,92,0.3);
}
@keyframes mp-pseudo-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.mp-stage-6 .mp-stage-name {
  color: #ffd95c;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mp-stage-6 .pb-xp-fill {
  background: linear-gradient(90deg, #ffd95c, #ff6ec4, #a78bfa);
}
.mp-stage-6 .mp-intro {
  border-left-color: #ffd95c;
  background: linear-gradient(90deg, rgba(255,217,92,0.08), transparent 70%);
}
.mp-stage-6 .mp-stat {
  border: 1px solid rgba(255,217,92,0.25);
  background: linear-gradient(135deg, rgba(255,217,92,0.05), rgba(255,255,255,0.02));
}
.mp-stage-6 .mp-stat-num {
  background: linear-gradient(90deg, #ffd95c, #ff6ec4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mp-stage-6 .mp-badge {
  background: linear-gradient(135deg, rgba(255,217,92,0.25), rgba(255,140,0,0.12));
  border-color: rgba(255,217,92,0.55);
  color: #ffd95c;
  box-shadow: 0 2px 10px rgba(255,217,92,0.15);
}
.mp-stage-6 .mp-section-title {
  color: rgba(255,217,92,0.8);
}

/* ─── PlantBuddy screen : thèmes par stage ─── */

/* Titre PlantBuddy adapté */
#plantbuddy.pb-stage-1 .pb-title,
#plantbuddy.pb-stage-2 .pb-title { background: linear-gradient(90deg, #94a3b8, #64748b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#plantbuddy.pb-stage-3 .pb-title { background: linear-gradient(90deg, #5fdd6b, #3aa64c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#plantbuddy.pb-stage-4 .pb-title { background: linear-gradient(90deg, #5fdd6b, #a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#plantbuddy.pb-stage-5 .pb-title { background: linear-gradient(90deg, #ffd95c, #f5a524); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#plantbuddy.pb-stage-6 .pb-title {
  background: linear-gradient(90deg, #ffd95c, #ff6ec4, #a78bfa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: mp-pseudo-shimmer 5s linear infinite;
}

/* Stage pill name */
#plantbuddy.pb-stage-1 .pb-stage-name, #plantbuddy.pb-stage-2 .pb-stage-name { background: rgba(148,163,184,0.15); color: #94a3b8; }
#plantbuddy.pb-stage-3 .pb-stage-name { background: rgba(95,221,107,0.15); color: #5fdd6b; }
#plantbuddy.pb-stage-4 .pb-stage-name { background: rgba(95,221,107,0.18); color: #5fdd6b; }
#plantbuddy.pb-stage-5 .pb-stage-name { background: rgba(245,165,36,0.18); color: #f5a524; }
#plantbuddy.pb-stage-6 .pb-stage-name {
  background: linear-gradient(135deg, #ffd95c, #f5a524, #ff6ec4);
  background-size: 200% 200%;
  color: #2a1a05;
  animation: mp-pill-shift 4s linear infinite;
  box-shadow: 0 3px 12px rgba(255,217,92,0.4);
}

/* Carte centrale (sprite + bar) */
#plantbuddy.pb-stage-3 .pb-card { border-color: rgba(95,221,107,0.3); }
#plantbuddy.pb-stage-4 .pb-card {
  border-color: rgba(95,221,107,0.45);
  box-shadow: 0 6px 28px rgba(95,221,107,0.15);
}
#plantbuddy.pb-stage-5 .pb-card {
  border-color: rgba(245,165,36,0.4);
  background: linear-gradient(135deg, rgba(245,165,36,0.05), var(--panel, #1a1f2e) 60%);
  box-shadow: 0 8px 32px rgba(245,165,36,0.18);
}
#plantbuddy.pb-stage-6 .pb-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255,217,92,0.08), rgba(167,139,250,0.06) 50%, rgba(95,221,107,0.04) 100%);
  border: 1px solid transparent;
  box-shadow:
    0 0 0 1px rgba(255,217,92,0.5),
    0 0 36px rgba(255,217,92,0.25),
    0 16px 60px rgba(167,139,250,0.18);
  overflow: hidden;
}
#plantbuddy.pb-stage-6 .pb-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,217,92,0.18), transparent 55%);
  pointer-events: none;
  animation: mp-shine 6s linear infinite;
}

/* Sprite : effets progressifs */
#plantbuddy.pb-stage-3 .pb-sprite { filter: drop-shadow(0 6px 14px rgba(95,221,107,0.3)); }
#plantbuddy.pb-stage-4 .pb-sprite { filter: drop-shadow(0 8px 18px rgba(95,221,107,0.45)); }
#plantbuddy.pb-stage-5 .pb-sprite { filter: drop-shadow(0 8px 22px rgba(245,165,36,0.55)); }
#plantbuddy.pb-stage-6 .pb-sprite {
  filter:
    drop-shadow(0 0 14px rgba(255,217,92,0.6))
    drop-shadow(0 10px 28px rgba(167,139,250,0.4));
  animation: pb-bob 2.5s ease-in-out infinite, mp-pulse-glow 3s ease-in-out infinite;
}

/* Barre XP en mode premium */
#plantbuddy.pb-stage-5 .pb-xp-fill { background: linear-gradient(90deg, #ffd95c, #f5a524); }
#plantbuddy.pb-stage-6 .pb-xp-fill { background: linear-gradient(90deg, #ffd95c, #ff6ec4, #a78bfa); }

/* Stat numbers */
#plantbuddy.pb-stage-5 .pb-stat-num { color: #f5a524; }
#plantbuddy.pb-stage-6 .pb-stat-num {
  background: linear-gradient(90deg, #ffd95c, #ff6ec4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#plantbuddy.pb-stage-6 .pb-stat {
  border: 1px solid rgba(255,217,92,0.2);
  background: linear-gradient(135deg, rgba(255,217,92,0.05), rgba(255,255,255,0.02));
}

/* Tokens pill en mode ROSIN MASTER : plus brillant */
#plantbuddy.pb-stage-6 .pb-tokens {
  background: linear-gradient(135deg, rgba(255,217,92,0.28), rgba(255,110,196,0.15));
  border-color: rgba(255,217,92,0.6);
  box-shadow: 0 4px 18px rgba(255,217,92,0.3);
}

/* Section titles en or au stage 6 */
#plantbuddy.pb-stage-6 .pb-section-title { color: rgba(255,217,92,0.8); }

/* ─── PlantBuddy self-profile : edit panel + locked + tokens overview ─── */

#plantbuddy { padding: 16px 14px 88px; }
#pb-screen-content { display: block; }

/* État verrouillé (pas de Rosidex) */
.pb-locked {
  text-align: center;
  padding: 50px 24px;
}
.pb-locked-sprite {
  width: 120px; height: auto;
  image-rendering: pixelated;
  opacity: 0.6;
  filter: grayscale(0.5);
  margin-bottom: 18px;
}
.pb-locked-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text, #fff);
  margin: 0 0 10px;
}
.pb-locked-text {
  color: var(--text-dim, #889);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 auto 22px;
  max-width: 320px;
}
.pb-locked-cta {
  background: linear-gradient(135deg, #5fdd6b, #3aa64c);
  color: #0c1118;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(95,221,107,0.35);
}
.pb-locked-cta:active { transform: scale(0.97); }

/* Bloc édition */
.pb-edit-panel {
  margin-top: 18px;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 14px;
  padding: 16px;
}
.pb-edit-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text, #fff);
  margin-bottom: 12px;
}
.pb-edit-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: rgba(95,221,107,0.18);
  color: #5fdd6b;
  border-radius: 50%;
  font-size: 0.85rem;
}
.pb-edit-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim, #889);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.pb-edit-panel textarea {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line, #2b3245);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text, #fff);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}
.pb-edit-panel textarea:focus { outline: none; border-color: #5fdd6b; }
.pb-edit-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.pb-edit-counter {
  font-size: 0.72rem;
  color: var(--text-dim, #889);
  font-variant-numeric: tabular-nums;
}
.pb-edit-save {
  background: linear-gradient(135deg, #5fdd6b, #3aa64c);
  color: #0c1118;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.pb-edit-save:active { transform: scale(0.97); }

/* Morph picker */
.pb-morph-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pb-morph-chip {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: #a78bfa;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: capitalize;
}
.pb-morph-chip.active {
  background: rgba(167, 139, 250, 0.35);
  border-color: #a78bfa;
  color: #fff;
}

/* Vue tokens : grosse balance */
.pb-tokens-overview {
  background: linear-gradient(135deg, rgba(255,196,0,0.10), rgba(255,140,0,0.05));
  border: 1px solid rgba(255,196,0,0.3);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.pb-tokens-balance-big {
  display: flex; flex-direction: column; align-items: center;
  overflow: visible;
  min-width: 0;
}
.pb-coin-big {
  font-size: 2.2rem;
  margin-bottom: 4px;
}
.pb-balance-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffc844;
  line-height: 1.3;
  padding: 4px 6px;
  display: inline-block;
}
.pb-balance-label {
  font-size: 0.7rem;
  color: var(--text-dim, #889);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Quand stage 6, tokens overview en or premium */
#plantbuddy.pb-stage-6 .pb-tokens-overview {
  border-color: rgba(255,217,92,0.55);
  background: linear-gradient(135deg, rgba(255,217,92,0.18), rgba(255,110,196,0.1));
  box-shadow: 0 6px 28px rgba(255,217,92,0.18);
}
#plantbuddy.pb-stage-6 .pb-balance-num {
  color: #ffd95c;
  text-shadow: 0 0 14px rgba(255,110,196,0.4);
}

/* ─── Trophées (badges) : présentation propre en grid ─── */
.mp-badges-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim, #889);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 999px;
}
.mp-trophies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mp-trophy {
  position: relative;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 14px;
  padding: 16px 8px 12px;
  text-align: center;
  transition: transform 0.15s;
  overflow: hidden;
}
.mp-trophy:active { transform: scale(0.97); }
.mp-trophy-emoji {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.mp-trophy-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text, #fff);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 4px;
  min-height: 1.7em;
  display: flex; align-items: center; justify-content: center;
}
.mp-trophy-date {
  font-size: 0.62rem;
  color: var(--text-dim, #889);
  text-transform: lowercase;
  font-variant-numeric: tabular-nums;
}

/* Locked : silhouette grise */
.mp-trophy.locked {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  opacity: 0.55;
}
.mp-trophy.locked .mp-trophy-emoji {
  filter: grayscale(1) brightness(0.5);
  opacity: 0.5;
}
.mp-trophy.locked .mp-trophy-label,
.mp-trophy.locked .mp-trophy-date {
  color: rgba(255,255,255,0.3);
}

/* Tiers : couleurs progressives */
.mp-trophy.tier-bronze {
  background: linear-gradient(135deg, rgba(205,127,50,0.12), var(--panel, #1a1f2e) 70%);
  border-color: rgba(205,127,50,0.4);
  box-shadow: 0 2px 12px rgba(205,127,50,0.1);
}
.mp-trophy.tier-bronze .mp-trophy-label { color: #cd7f32; }

.mp-trophy.tier-silver {
  background: linear-gradient(135deg, rgba(192,192,192,0.12), var(--panel, #1a1f2e) 70%);
  border-color: rgba(192,192,192,0.4);
  box-shadow: 0 2px 12px rgba(192,192,192,0.08);
}
.mp-trophy.tier-silver .mp-trophy-label { color: #c8c8d0; }

.mp-trophy.tier-gold {
  background: linear-gradient(135deg, rgba(255,196,68,0.15), var(--panel, #1a1f2e) 75%);
  border-color: rgba(255,196,68,0.55);
  box-shadow: 0 4px 18px rgba(255,196,68,0.18);
}
.mp-trophy.tier-gold .mp-trophy-label { color: #ffd700; }

/* Legendary : animation pulse + gradient */
.mp-trophy.tier-legendary {
  background: linear-gradient(135deg, rgba(255,217,92,0.2), rgba(255,110,196,0.12) 60%, rgba(167,139,250,0.08));
  border-color: rgba(255,217,92,0.7);
  box-shadow:
    0 0 0 1px rgba(255,217,92,0.4),
    0 4px 22px rgba(255,217,92,0.25),
    0 0 30px rgba(255,110,196,0.15);
}
.mp-trophy.tier-legendary::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,217,92,0.18), transparent 55%);
  pointer-events: none;
  animation: mp-shine 4s linear infinite;
}
.mp-trophy.tier-legendary .mp-trophy-emoji {
  animation: mp-trophy-glow 2.5s ease-in-out infinite;
}
@keyframes mp-trophy-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,217,92,0.5)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 14px rgba(255,217,92,0.95)); transform: scale(1.08); }
}
.mp-trophy.tier-legendary .mp-trophy-label {
  background: linear-gradient(90deg, #ffd95c, #ff6ec4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ─── Comment ça marche (XP/Tokens) ─── */
.pb-howto {
  margin-top: 22px;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 14px;
  overflow: hidden;
}
.pb-howto-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text, #fff);
  list-style: none;
  user-select: none;
}
.pb-howto-summary::-webkit-details-marker { display: none; }
.pb-howto-summary:hover { background: rgba(255,255,255,0.02); }
.pb-howto-icon { font-size: 1.1rem; }
.pb-howto-chevron {
  margin-left: auto;
  color: var(--text-dim, #889);
  font-size: 1.4rem;
  transform: rotate(90deg);
  transition: transform 0.2s;
}
.pb-howto[open] .pb-howto-chevron { transform: rotate(-90deg); }

.pb-howto-content {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.pb-howto-section {
  margin-top: 16px;
}
.pb-howto-h4 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pb-howto-h4.xp     { color: #5fdd6b; }
.pb-howto-h4.token  { color: #ffc844; }
.pb-howto-h4.badge  { color: #ff8fc7; }
.pb-howto-h4.stage  { color: #7cc8ff; }
.pb-howto-h4-sub {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-dim, #889);
  text-transform: none;
}
/* Collapsible inline (Mouvements tokens, etc.) */
.pb-collapsible {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  overflow: hidden;
}
.pb-collapsible-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #fff);
  list-style: none;
  user-select: none;
}
.pb-collapsible-summary::-webkit-details-marker { display: none; }
.pb-collapsible-summary:hover { background: rgba(255,255,255,0.02); }
.pb-collapsible-title { flex: 1; }
.pb-collapsible-meta {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim, #889);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 999px;
}
.pb-collapsible-chevron {
  color: var(--text-dim, #889);
  font-size: 1.3rem;
  transform: rotate(90deg);
  transition: transform 0.2s;
  line-height: 1;
}
.pb-collapsible[open] .pb-collapsible-chevron { transform: rotate(-90deg); }
.pb-collapsible .pb-recent {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: -1px;
}

.pb-howto-section-sub {
  margin: 0 0 10px;
  font-size: 0.72rem;
  color: var(--text-dim, #889);
  letter-spacing: 0.01em;
}

/* Reward rows (XP / Token / Badges) — layout grid */
.pb-rewards-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pb-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  transition: background 0.15s;
}
.pb-reward-row.is-strong {
  background: rgba(95,221,107,0.06);
  border-color: rgba(95,221,107,0.18);
}
.pb-reward-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pb-reward-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text, #fff);
  line-height: 1.25;
}
.pb-reward-row.is-strong .pb-reward-label { font-weight: 700; }
.pb-reward-note {
  font-size: 0.7rem;
  color: var(--text-dim, #889);
  line-height: 1.2;
}
.pb-reward-amount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.pb-reward-amount.xp {
  color: #5fdd6b;
  background: rgba(95,221,107,0.1);
  border: 1px solid rgba(95,221,107,0.22);
}
.pb-reward-amount.token {
  color: #ffc844;
  background: rgba(255,200,68,0.1);
  border: 1px solid rgba(255,200,68,0.22);
}

/* Badges (double reward + tier pill) */
.pb-badge-row .pb-reward-info { gap: 4px; }
.pb-badge-rewards {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.pb-badge-tier {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  width: fit-content;
}
.pb-badge-tier.tier-bronze {
  color: #cd7f32;
  background: rgba(205,127,50,0.13);
  border: 1px solid rgba(205,127,50,0.3);
}
.pb-badge-tier.tier-silver {
  color: #c8c8d0;
  background: rgba(200,200,208,0.1);
  border: 1px solid rgba(200,200,208,0.25);
}
.pb-badge-tier.tier-gold {
  color: #ffd700;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.28);
}
.pb-badge-tier.tier-legendary {
  background: linear-gradient(135deg, rgba(255,217,92,0.18), rgba(255,110,196,0.18));
  border: 1px solid rgba(255,150,180,0.4);
  background-clip: padding-box;
  color: #ffe6a0;
}
.pb-badge-row.tier-legendary {
  background: linear-gradient(90deg, rgba(255,217,92,0.05), rgba(255,110,196,0.04));
  border-color: rgba(255,150,180,0.18);
}

/* Stages ladder */
.pb-stages-ladder {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pb-stage-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
}
.pb-stage-row.is-master {
  background: linear-gradient(135deg, rgba(124,200,255,0.1), rgba(255,217,92,0.08));
  border-color: rgba(124,200,255,0.3);
}
.pb-stage-row .pb-stage-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dim, #889);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pb-stage-row.is-master .pb-stage-num { color: #ffd95c; }
.pb-stage-row .pb-stage-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text, #fff);
}
.pb-stage-row.is-master .pb-stage-name {
  background: linear-gradient(90deg, #ffd95c, #ff8fc7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.04em;
}
.pb-stage-row .pb-stage-range {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7cc8ff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pb-howto-note-block {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: rgba(245,165,36,0.08);
  border-left: 3px solid #f5a524;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-dim, #aab);
  line-height: 1.4;
}
.pb-howto-note-block strong { color: var(--text, #fff); }

/* ─── Wallet screen ─── */
#wallet { padding-bottom: 80px; }
#wallet-content { padding: 14px; }

/* Tokens overview rendu clickable */
.pb-tokens-overview.clickable {
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
}
.pb-tokens-overview.clickable:active { transform: scale(0.98); }
.pb-tokens-overview.clickable:hover { box-shadow: 0 6px 24px rgba(255,196,0,0.15); }
.pb-tokens-cta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #ffc844;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Balance card */
.wallet-balance-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(255,196,0,0.18), rgba(255,140,0,0.08) 70%);
  border: 1px solid rgba(255,196,0,0.45);
  border-radius: 18px;
  padding: 24px 20px 22px;
  margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(255,196,0,0.15);
  overflow: visible;
  min-width: 0;
}
.wallet-coin {
  font-size: 2.6rem;
  margin-bottom: 8px;
  line-height: 1;
}
.wallet-coin .coin {
  filter: drop-shadow(0 4px 10px rgba(255,196,0,0.4));
  animation: coin-float 2.8s ease-in-out infinite;
}
.pb-coin-big { font-size: 1.6rem; line-height: 1; }
.pb-coin-big .coin {
  filter: drop-shadow(0 2px 5px rgba(255,196,0,0.3));
}
.wallet-balance-num {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.25;
  padding: 4px 6px;
  color: #ffd95c;
  text-shadow: 0 0 16px rgba(245,165,36,0.45);
  letter-spacing: -0.01em;
  display: inline-block;
  max-width: 100%;
}
.wallet-balance-label {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-dim, #889);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.wallet-balance-eq {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #ffd95c;
  font-weight: 700;
}

/* Stats earned / spent / days */
.wallet-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 16px;
}
.wallet-stat {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.wallet-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text, #fff);
}
.wallet-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim, #889);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* Convert card */
.wallet-convert-card {
  background: var(--panel, #1a1f2e);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(167,139,250,0.12);
}
.wallet-convert-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text, #fff);
}
.wallet-convert-hint {
  font-size: 0.75rem;
  color: var(--text-dim, #889);
  margin: 0 0 14px;
}
.wallet-convert-input-wrap {
  position: relative;
}
.wallet-convert-input-wrap input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 12px;
  padding: 14px 50px 14px 16px;
  color: #ffd95c;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: right;
  font-family: inherit;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}
.wallet-convert-input-wrap input:focus {
  outline: none;
  border-color: #a78bfa;
}
.wallet-convert-suffix {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  pointer-events: none;
}
.wallet-convert-arrow {
  text-align: center;
  font-size: 1.4rem;
  color: rgba(167,139,250,0.6);
  margin: 6px 0;
}
.wallet-convert-preview {
  text-align: center;
  padding: 12px;
  background: rgba(167,139,250,0.1);
  border-radius: 12px;
  border: 1px dashed rgba(167,139,250,0.3);
}
.wallet-preview-num {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(90deg, #a78bfa, #ff6ec4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.wallet-preview-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim, #889);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
  font-weight: 700;
}
.wallet-convert-actions {
  display: flex; gap: 6px;
  margin: 12px 0;
}
.wallet-quick-btn {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line, #2b3245);
  color: var(--text-dim, #aab);
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.wallet-quick-btn:hover {
  background: rgba(255,196,0,0.08);
  border-color: rgba(255,196,0,0.3);
  color: #ffc844;
}
.wallet-quick-btn:active { transform: scale(0.96); }
.wallet-convert-btn {
  width: 100%;
  background: linear-gradient(135deg, #a78bfa, #ff6ec4);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(167,139,250,0.4);
  letter-spacing: 0.02em;
}
.wallet-convert-btn:active { transform: scale(0.97); }
.wallet-convert-btn:disabled {
  background: rgba(255,255,255,0.08);
  color: var(--text-dim, #889);
  cursor: not-allowed;
  box-shadow: none;
}

.wallet-section { margin-top: 18px; }

/* ─── Fallback font emoji pour rendu cross-platform (notamment Windows desktop) ─── */
.pb-coin,
.pb-coin-big,
.wallet-coin,
.wallet-convert-suffix,
.pb-tokens,
.pb-balance-num,
.pb-balance-label,
.pb-tokens-cta,
.pb-event-amount,
.mp-badge-emoji,
.mp-trophy-emoji,
.pb-howto-icon,
.mp-stat-label,
.wallet-balance-eq,
.wallet-preview-label,
.pb-howto-amount,
.pb-howto-h4 {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Twemoji Mozilla', system-ui, -apple-system, sans-serif;
}

/* Token coin SVG pixel art + flottaison */
.coin {
  display: inline-block;
  width: 1em; height: 1em;
  vertical-align: -0.15em;
  background-image: url('assets/coin.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
  animation: coin-float 2.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes coin-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.12em); }
}
/* Désactive l'anim sur les nombreuses coins du ledger pour pas tout faire bouger */
.pb-event-amount .coin,
.pb-howto-amount .coin {
  animation: none;
  filter: none;
}

/* ─── Autocomplete breeder catalog ─── */
.ac-flag { margin-right: 6px; font-size: 0.95em; }
.ac-verified {
  display: inline-block;
  margin-left: 4px;
  color: #5fdd6b;
  font-weight: 800;
  font-size: 0.85em;
}

/* ─── Breeder link (clickable name) ─── */
.pkd-breeder-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(255,255,255,0.25);
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.pkd-breeder-link:hover { color: #5fdd6b; text-decoration-color: #5fdd6b; }
.fv-flag { font-size: 0.95em; margin-left: 4px; }

/* ─── Breeder info modal ─── */
.bi-card {
  max-width: 380px;
  padding: 22px 20px 18px;
}
.bi-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.bi-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--text, #fff);
  line-height: 1.2;
  flex: 1;
}
.bi-verified {
  display: inline-block;
  background: rgba(95,221,107,0.18);
  color: #5fdd6b;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.bi-known {
  display: inline-block;
  background: rgba(245,165,36,0.15);
  color: #f5a524;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.bi-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.88rem;
  color: var(--text-dim, #aab);
  margin-bottom: 10px;
}
.bi-flag { font-size: 1.1rem; }
.bi-country { color: var(--text, #fff); font-weight: 700; }
.bi-scene { font-style: italic; }
.bi-dot { opacity: 0.4; }
.bi-unknown { font-style: italic; color: var(--text-dim, #889); font-size: 0.82rem; }
.bi-warn {
  background: rgba(245,90,90,0.12);
  border-left: 3px solid #f55a5a;
  color: #ffb4b4;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
  font-size: 0.82rem;
  line-height: 1.45;
}
.bi-warn strong { color: #fff; }
.bi-note {
  background: rgba(255,255,255,0.04);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-dim, #aab);
  margin: 10px 0;
  line-height: 1.45;
  font-style: italic;
}
.bi-stats {
  font-size: 0.78rem;
  color: var(--text-dim, #889);
  margin-top: 6px;
}

/* ─── Breeder logo (avatar généré ou PNG override) ─── */
.bi-logo {
  position: relative;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.02em;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.15);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  letter-spacing: -0.02em;
}
.bi-logo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: rgba(0,0,0,0.2);
}
.bi-logo-ini {
  position: relative;
  z-index: 0;
  line-height: 1;
}
.bi-logo img + .bi-logo-ini { z-index: -1; }

/* Modal breeder : top row (logo + texte) */
.bi-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.bi-top-text {
  flex: 1; min-width: 0;
}
.bi-top-text .bi-header { margin-bottom: 4px; }
.bi-top-text .bi-meta   { margin-bottom: 0; }

/* ─── Making sub-nav (Calc / Fiches / Stock) ─── */
.making-subnav {
  display: flex;
  gap: 6px;
  padding: 10px 14px 6px;
  background: var(--bg, #0c1118);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.making-sub-btn {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-dim, #889);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.making-sub-btn:active { transform: scale(0.97); }
.making-sub-btn.active {
  background: var(--accent-soft, rgba(52,211,153,0.15));
  border-color: var(--accent, #34d399);
  color: var(--accent, #34d399);
}

/* ─── Stock screen ─── */
#stock { padding-bottom: 90px; }
#stock-content { padding: 14px; }

.stock-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.stock-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  color: var(--text, #fff);
}
.stock-add-btn {
  background: var(--accent-soft, rgba(52,211,153,0.18));
  color: var(--accent, #34d399);
  border: 1px solid var(--accent, #34d399);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}
.stock-add-btn:active { transform: scale(0.97); }
.stock-add-btn.primary {
  background: linear-gradient(135deg, #5fdd6b, #3aa64c);
  color: #0c1118;
  border: 0;
  padding: 14px 24px;
  font-size: 0.95rem;
  margin-top: 14px;
  box-shadow: 0 6px 22px rgba(95,221,107,0.35);
}

.stock-stats {
  display: flex; gap: 12px;
  margin-bottom: 18px;
  font-size: 0.82rem;
}
.stock-stat-total { color: var(--text-dim, #889); }
.stock-stat-low {
  background: rgba(245,90,90,0.15);
  color: #ff8585;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.stock-empty {
  text-align: center;
  padding: 50px 24px;
  color: var(--text-dim, #889);
}
.stock-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 14px;
  opacity: 0.7;
}
.stock-empty h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text, #fff);
}
.stock-empty p {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  max-width: 300px;
  margin-inline: auto;
}

.stock-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.stock-search {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0 10px;
  transition: border-color 0.15s, background 0.15s;
}
.stock-search:focus-within {
  border-color: var(--accent, #34d399);
  background: rgba(255,255,255,0.06);
}
.stock-search svg {
  color: var(--text-dim, #889);
  flex-shrink: 0;
}
.stock-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text, #fff);
  font-size: 0.88rem;
  padding: 9px 8px;
  min-width: 0;
}
.stock-search input::placeholder { color: var(--text-dim, #889); }
.stock-search-clear {
  background: transparent;
  border: 0;
  color: var(--text-dim, #889);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.stock-search-clear:hover { color: var(--text, #fff); background: rgba(255,255,255,0.06); }
.stock-sort {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text, #fff);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 28px 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23889' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  max-width: 50%;
  text-overflow: ellipsis;
}
.stock-sort:focus { outline: 0; border-color: var(--accent, #34d399); }

.stock-cat { margin-bottom: 20px; }
.stock-cat-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent, #34d399);
  margin: 0 4px 10px;
}
.stock-list {
  display: flex; flex-direction: column; gap: 8px;
}
.stock-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px 16px;
  transition: background 0.15s, border-color 0.15s;
}
.stock-card.low {
  border-color: rgba(255,107,107,0.3);
  background: linear-gradient(90deg, rgba(255,107,107,0.07), rgba(255,255,255,0.025) 35%);
}
.stock-card-info {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stock-card-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text, #fff);
  line-height: 1.25;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-card-sub {
  font-size: 0.74rem;
  color: var(--text-dim, #889);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-card-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.stock-card-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff6b6b;
  flex-shrink: 0;
  animation: stockAlertPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(255,107,107,0.5));
}
@keyframes stockAlertPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}
.stock-card-bar {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
  min-width: 40px;
}
.stock-card-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5fdd6b, #34d399);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.stock-card-bar-fill.warn { background: linear-gradient(90deg, #f5b65a, #f59e0b); }
.stock-card-bar-fill.low  { background: linear-gradient(90deg, #ff8585, #ef4444); }
.stock-card-ratio {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim, #889);
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.stock-card-ratio-sep { opacity: 0.45; margin: 0 1px; }
.stock-card-ratio-unit { opacity: 0.7; font-weight: 500; margin-left: 1px; }
.stock-card.low .stock-card-ratio { color: #ff8585; }

.stock-card-stepper {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0,0,0,0.28);
  padding: 4px;
  border-radius: 999px;
  flex-shrink: 0;
}
.stock-step {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--text, #fff);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s, transform 0.1s;
}
.stock-step:hover { background: rgba(255,255,255,0.12); }
.stock-step.minus:active { background: rgba(245,90,90,0.32); color: #ff8585; }
.stock-step.plus:active  { background: rgba(95,221,107,0.32); color: #5fdd6b; }
.stock-step:active { transform: scale(0.9); }
.stock-qty {
  min-width: 50px;
  padding: 0 6px;
  text-align: center;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.stock-qty-val {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text, #fff);
  line-height: 1;
}
.stock-qty-unit {
  font-size: 0.68rem;
  color: var(--text-dim, #889);
  font-weight: 600;
}

.stock-card-actions {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.stock-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--text-dim, #aab);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.stock-action-btn svg { flex-shrink: 0; }
.stock-action-btn:hover, .stock-action-btn:active {
  color: var(--text, #fff);
  background: rgba(255,255,255,0.08);
}
.stock-action-btn.buy {
  color: var(--accent, #34d399);
  background: rgba(95,221,107,0.08);
  border-color: rgba(95,221,107,0.22);
}
.stock-action-btn.buy:hover, .stock-action-btn.buy:active {
  background: rgba(95,221,107,0.18);
  border-color: rgba(95,221,107,0.4);
}
.stock-card.low .stock-action-btn.buy {
  background: linear-gradient(135deg, rgba(95,221,107,0.18), rgba(95,221,107,0.08));
  border-color: rgba(95,221,107,0.45);
  color: #5fdd6b;
  box-shadow: 0 0 0 1px rgba(95,221,107,0.1);
}

/* Stock form modal */
.intro-no-links-hint {
  font-size: 0.72rem;
  color: #ff8585;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.pkd-intro-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-form-card { max-width: 460px; }
.stock-form-card .field-row {
  display: flex;
  gap: 10px;
}
.stock-form-card .field-row > .field { flex: 1; min-width: 0; }
.form-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent, #34d399);
  margin: 18px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.form-section-hint {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim, #889);
}
.label-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.label-dot.orange { background: #f5b65a; box-shadow: 0 0 0 2px rgba(245,182,90,0.18); }
.label-dot.red    { background: #ff6b6b; box-shadow: 0 0 0 2px rgba(255,107,107,0.2); }
.restock-preview {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(95,221,107,0.08);
  border: 1px solid rgba(95,221,107,0.22);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text, #fff);
}
.restock-preview.empty {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  color: var(--text-dim, #889);
}
.stock-form-card .field-row {
  display: flex; gap: 8px;
}
.stock-form-card .field-row .field { flex: 1; }
.stock-form-card .modal-btn.danger {
  background: rgba(245,90,90,0.12);
  color: #ff8585;
  border: 1px solid rgba(245,90,90,0.3);
  margin-right: auto;
}

/* ─── Dropdown Making (s'ouvre au clic sur le tab Making) ─── */
.making-menu {
  position: fixed;
  bottom: 76px;
  left: 8px;
  right: auto;
  width: 160px;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(95,221,107,0.15);
  z-index: 1000;
  padding: 4px;
  animation: makingMenuIn 0.18s ease-out;
  transform-origin: bottom left;
}
.making-menu.hidden { display: none; }
@keyframes makingMenuIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.making-menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text, #fff);
  transition: background 0.12s;
}
.making-menu-item:hover { background: rgba(95,221,107,0.08); }
.making-menu-item:active { transform: scale(0.98); }
.making-menu-ico {
  font-size: 1.6rem;
  width: 36px; text-align: center;
  flex-shrink: 0;
}
.making-menu-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}
.making-menu-sub {
  font-size: 0.72rem;
  color: var(--text-dim, #889);
  margin-top: 2px;
}

/* ─── Boîte à outils (onglet bas) : menu déroulant Lexique + Ressources ─── */
.toolbox-menu {
  position: fixed;
  width: 180px;
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(95,221,107,0.15);
  z-index: 1000;
  padding: 4px;
  animation: makingMenuIn 0.18s ease-out;
  transform-origin: bottom center;
}
.toolbox-menu.hidden { display: none; }

/* ─── Consommables dans la fiche form (refondu) ─── */
.consumables-list {
  display: flex; flex-direction: column; gap: 10px;
  margin: 12px 0;
}
.consumables-empty-state {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 12px;
}
.consumables-empty-ico {
  font-size: 1.8rem;
  opacity: 0.5;
}
.consumables-empty-txt {
  font-size: 0.85rem;
  color: var(--text-dim, #889);
  font-style: italic;
}
.consumables-row {
  background: var(--panel, #1a1f2e);
  border: 1px solid var(--line, #2b3245);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.consumables-row.over {
  border-color: rgba(245,90,90,0.5);
  background: linear-gradient(135deg, rgba(245,90,90,0.06), var(--panel, #1a1f2e));
}
.consumables-row-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.consumables-name {
  flex: 1; min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #fff);
}
.consumables-del {
  width: 28px; height: 28px;
  background: rgba(245,90,90,0.1);
  border: 1px solid rgba(245,90,90,0.25);
  color: #ff8585;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.consumables-del:active { transform: scale(0.92); }
.consumables-row-body {
  display: flex; flex-direction: column; gap: 6px;
}
.consumables-stepper {
  display: flex; align-items: center; gap: 8px;
}
.consumables-step {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text, #fff);
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.consumables-step.minus:hover { background: rgba(245,90,90,0.15); color: #ff8585; }
.consumables-step.plus:hover  { background: rgba(95,221,107,0.15); color: #5fdd6b; }
.consumables-step:active { transform: scale(0.92); }
.consumables-qty {
  flex: 1; min-width: 0;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text, #fff);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  -moz-appearance: textfield;
}
.consumables-qty::-webkit-outer-spin-button,
.consumables-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.consumables-qty:focus { outline: none; border-color: var(--accent, #34d399); }
.consumables-unit {
  font-size: 0.85rem;
  color: var(--text-dim, #aab);
  font-weight: 700;
  min-width: 40px;
  text-align: left;
}
.consumables-warn {
  font-size: 0.75rem;
  color: #ff8585;
  font-weight: 700;
  padding: 4px 0 0;
}
.consumables-stock-hint {
  font-size: 0.72rem;
  color: var(--text-dim, #889);
  font-style: italic;
  padding: 2px 0 0;
}
.consumables-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, rgba(52,211,153,0.18), rgba(52,211,153,0.08));
  border: 1px dashed rgba(52,211,153,0.45);
  color: var(--accent, #34d399);
  padding: 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.12s, transform 0.08s;
}
.consumables-add-btn:hover { background: linear-gradient(135deg, rgba(52,211,153,0.28), rgba(52,211,153,0.12)); }
.consumables-add-btn:active { transform: scale(0.98); }
.consumables-add-plus {
  width: 24px; height: 24px;
  background: rgba(52,211,153,0.25);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

/* Modal picker consommable — refonte UX */
#consumable-picker-modal { z-index: 2000; }
.consumable-picker-card {
  max-width: 480px;
  width: calc(100vw - 32px);
  max-height: 80vh;
  display: flex; flex-direction: column;
  padding: 16px;
}
.consumable-picker-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.consumable-picker-header .modal-title { margin: 0; flex: 1; }
.consumable-picker-close {
  width: 32px; height: 32px;
  border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim, #889);
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.consumable-picker-close:hover {
  background: rgba(245,90,90,0.15);
  color: #ff8585;
}
.consumable-picker-search {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text, #fff);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.consumable-picker-search:focus {
  outline: none;
  border-color: var(--accent, #34d399);
}
.consumable-picker-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px 4px;
}
.consumable-picker-cat-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent, #34d399);
  margin: 12px 4px 6px;
}
.consumable-picker-cat-title:first-child { margin-top: 0; }
.consumable-picker-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-dim, #889);
  font-style: italic;
  font-size: 0.88rem;
}
.consumable-picker-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text, #fff);
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
  min-height: 56px;
}
.consumable-picker-item:hover { background: rgba(95,221,107,0.08); }
.consumable-picker-item:active { transform: scale(0.98); }
.consumable-picker-item.low { border-color: rgba(245,90,90,0.35); }
.consumable-picker-item.used {
  border-color: rgba(95,221,107,0.4);
  background: rgba(95,221,107,0.06);
}
.consumable-picker-info {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 0;
}
.consumable-picker-name {
  font-size: 0.92rem;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.consumable-picker-brand {
  font-size: 0.72rem;
  color: var(--text-dim, #889);
  font-style: italic;
}
.consumable-picker-qty {
  font-size: 0.82rem;
  color: var(--text-dim, #aab);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  flex-shrink: 0;
}
.consumable-picker-item.low .consumable-picker-qty { color: #ff8585; font-weight: 800; }
.consumable-picker-used-badge {
  display: inline-block;
  background: rgba(95,221,107,0.2);
  color: #5fdd6b;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ── Densité au cm² (résultat calc, mode flat) ── */
.density-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-top: 10px;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 10px;
}
.density-row .density-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.density-row strong {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: #34d399;
  font-weight: 700;
}
.density-row strong span {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: 4px;
  font-weight: 500;
}

/* ── Densité dans la fiche (sous le poids pressé) ── */
.ff-density-display {
  margin: -2px 0 10px;
  padding: 8px 12px;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #34d399;
  font-weight: 600;
}

/* ── Mode 'champs à remplir' fiche ── */
.fiche-sec-collapsed { 
  padding-bottom: 12px; 
  opacity: 0.6;
  transition: opacity 0.2s;
}
.fiche-sec-collapsed:hover { opacity: 0.95; }
.fiche-sec-collapsed > *:not(h3) { display: none !important; }
.fiche-sec-collapsed > h3 { 
  cursor: pointer; 
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fiche-sec-collapsed > h3::after {
  content: '✓';
  margin-left: auto;
  color: #34d399;
  font-size: 0.85em;
  font-weight: 700;
  opacity: 0.7;
}
.field.field-empty input,
.field.field-empty select,
.field.field-empty textarea {
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25) inset !important;
}
.field.field-empty .chip-row { 
  outline: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 10px;
  padding: 4px;
}
.field.field-empty label::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}
#fiche-show-all-btn.active {
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
}

/* ── Code couleur PSI matériau visé (flower) ── */
#targetPsi.psi-zone-ok {
  border-color: #34d399 !important;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35) inset, 0 0 12px rgba(52, 211, 153, 0.18) !important;
  color: #34d399;
}
#targetPsi.psi-zone-warn {
  border-color: #fb923c !important;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.4) inset, 0 0 12px rgba(251, 146, 60, 0.2) !important;
  color: #fb923c;
}
#targetPsi.psi-zone-danger {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.45) inset, 0 0 14px rgba(239, 68, 68, 0.25) !important;
  color: #ef4444;
}

/* ── Crédits parrainage ── */
.referral-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin: 12px 0;
  background: linear-gradient(95deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.02));
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 12px;
}
.referral-credits-info { display: flex; flex-direction: column; gap: 2px; }
.referral-credits-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.referral-credits-val {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: #34d399;
}
.referral-credits-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #34d399;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.referral-credits-btn:not(.disabled):hover {
  background: rgba(52, 211, 153, 0.25);
}
.referral-credits-btn.disabled,
.referral-credits-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Label de température calc avec toggle inline °C/°F ── */
.calc-temp-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.calc-temp-label .unit-toggle.small {
  flex-shrink: 0;
}

/* ── Bouton settings calculateur (header) ── */
.calc-settings-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.calc-settings-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.calc-settings-btn:active { transform: translateY(-50%) scale(0.94); }
.app-header { position: relative; }

/* ── Code couleur RH matériau (flower) ── */
#calc-raw-humidity.rh-zone-ok {
  border-color: #34d399 !important;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35) inset, 0 0 12px rgba(52, 211, 153, 0.18) !important;
  color: #34d399;
}
#calc-raw-humidity.rh-zone-mid {
  border-color: #facc15 !important;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.4) inset, 0 0 12px rgba(250, 204, 21, 0.18) !important;
  color: #facc15;
}
#calc-raw-humidity.rh-zone-warn {
  border-color: #fb923c !important;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.4) inset, 0 0 12px rgba(251, 146, 60, 0.2) !important;
  color: #fb923c;
}
#calc-raw-humidity.rh-zone-danger {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.45) inset, 0 0 14px rgba(239, 68, 68, 0.25) !important;
  color: #ef4444;
}

/* ── Drag and drop stock ── */
.stock-card { position: relative; touch-action: pan-y; }
.stock-card-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 100%;
  min-height: 44px;
  cursor: grab;
  color: var(--text-dim);
  opacity: 0.55;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stock-card-handle:hover { opacity: 1; color: var(--text); }
.stock-card-handle:active { cursor: grabbing; }
.stock-card.dragging {
  z-index: 100;
  opacity: 0.85;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 2px rgba(52,211,153,0.4);
  transition: box-shadow 0.15s, opacity 0.15s;
  pointer-events: none;
}
.stock-card.dragging .stock-card-handle { opacity: 1; color: #34d399; }

/* ── Drag stock : enfants du handle non interactifs (event sur span parent) ── */
.stock-card-handle svg,
.stock-card-handle svg * { pointer-events: none; }
/* Quand on est en drag, la card reste interactive pour recevoir les pointer events */
.stock-card.dragging { pointer-events: auto !important; }

/* ── Placeholder drag stock (réserve l'espace de la card pendant le drag) ── */
.stock-card-placeholder {
  background: rgba(52, 211, 153, 0.07);
  border: 2px dashed rgba(52, 211, 153, 0.4);
  border-radius: 14px;
  box-sizing: border-box;
  transition: background 0.15s;
}
.stock-card.dragging {
  /* Plus de pointer-events: none ; on garde la card flotante visible */
  opacity: 0.92;
  box-shadow: 0 14px 36px rgba(0,0,0,0.55), 0 0 0 2px rgba(52,211,153,0.55) !important;
  cursor: grabbing;
  transition: none;
}

/* ── Bouton 'Récupérer mes données' sur la paywall ── */
.support-link.recover-data {
  margin-top: 6px;
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}
.support-link.recover-data:hover { color: #6ee7b7; }
/* Bouton export dans Zone danger : vert pour distinguer du wipe rouge */
.wipe-btn.export-btn {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
}
.wipe-btn.export-btn:hover {
  background: rgba(52, 211, 153, 0.18);
}

/* ── Bouton import dans Zone danger ── */
.wipe-btn.import-btn {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
  color: #60a5fa;
}
.wipe-btn.import-btn:hover { background: rgba(96, 165, 250, 0.18); }
/* ── Bouton anonymiser dans Zone danger (moins destructif que Tout effacer) ── */
.wipe-btn.anon-btn {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.4);
  color: #a78bfa;
}
.wipe-btn.anon-btn:hover { background: rgba(167, 139, 250, 0.18); }

/* ── Ressources (matériel de référence + liens externes nettoyés) ── */
.res-disclaimer { font-size: 0.78rem; color: var(--text-dim, #8a8f98); line-height: 1.45; padding: 0 16px; margin: 4px 0 12px; }
.res-tabs { display: flex; gap: 8px; padding: 0 16px; margin-bottom: 14px; }
.res-tab { flex: 1; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: var(--text, #e8eaed); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.res-tab.active { background: rgba(91,140,255,0.15); border-color: rgba(91,140,255,0.5); color: #8fb0ff; }
.res-cat { margin-bottom: 18px; }
.res-cat-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim, #8a8f98); padding: 0 16px; margin: 0 0 8px; }
.res-card { display: flex; align-items: flex-start; gap: 12px; margin: 0 12px 8px; padding: 12px 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.res-card-media { display: flex; flex-direction: column; gap: 7px; flex-shrink: 0; width: 68px; }
.res-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.res-card-name { font-size: 0.92rem; font-weight: 600; color: var(--text, #e8eaed); line-height: 1.3; }
.res-card-tip { font-size: 0.8rem; color: var(--text-dim, #8a8f98); line-height: 1.4; }
.res-card-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 9px; background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.4); color: #34d399; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.res-card-link:active { transform: scale(0.97); }
.res-card-media .res-card-link { width: 100%; padding: 7px 4px; gap: 4px; }
.res-card-body .res-card-link { margin-top: 3px; }
.res-card-thumb { width: 68px; height: 68px; flex-shrink: 0; object-fit: cover; border-radius: 9px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); cursor: pointer; transition: transform 0.12s; }
.res-card-thumb:active { transform: scale(0.96); }
.res-empty { text-align: center; color: var(--text-dim, #8a8f98); font-size: 0.88rem; padding: 40px 24px; line-height: 1.5; }
.res-toolbar { padding: 0 16px; margin-bottom: 10px; }
.res-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; margin-bottom: 14px; }
.res-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: var(--text-dim, #8a8f98); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.res-chip.active { background: rgba(91,140,255,0.18); border-color: rgba(91,140,255,0.5); color: #8fb0ff; }
/* Input file dans la modal import */
#import-fiches-modal input[type=file] {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}
#import-fiches-modal textarea {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  min-height: 100px;
}

/* ── Modal choix de format d'export ── */
.export-format-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.export-format-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
}
.export-format-card:active { transform: scale(0.985); }
.export-format-card.recommended {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.4);
}
.export-format-card.recommended:hover {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.55);
}
.export-format-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.export-format-icon { font-size: 1.4rem; line-height: 1; }
.export-format-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.export-format-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}
.export-format-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-dim);
}
.export-format-desc b {
  color: #34d399;
  font-weight: 700;
}

/* ── Mode 'accès limité' (post-paywall pour récup de données) ── */
.limited-only { display: none !important; }
body.limited-access .limited-only { display: inline-flex !important; }
body.limited-access .limited-access-banner { display: flex !important; }
.limited-access-banner {
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 14px 14px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 10px;
  color: #fb923c;
  font-size: 0.78rem;
  line-height: 1.4;
}
body.limited-access .tabbar { display: none !important; }
body.limited-access .sub-status,
body.limited-access #referral-section,
body.limited-access #pokedex-settings { opacity: 0.5; pointer-events: none; }

/* ── Mode feeling Live Press ── */
.feeling-mode-row {
  padding: 16px 18px !important;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 10px;
}
.feeling-mode-label {
  font-size: 1rem !important;
  gap: 12px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
}
.feeling-mode-label input[type=checkbox] {
  width: 26px !important;
  height: 26px !important;
  width: 18px;
  height: 18px;
  accent-color: #34d399;
  cursor: pointer;
}
.feeling-mode-desc {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dim);
}
.disabled-by-feeling {
  opacity: 0.35;
  pointer-events: none;
}
.disabled-by-feeling input { background: rgba(255,255,255,0.02) !important; }

/* ── Bannière recette héritée ─────────────────────────────── */
.inspired-banner {
  margin: 10px 16px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(168,85,247,0.10));
  border: 1px solid rgba(168,85,247,0.35);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 10px;
}
.inspired-banner.hidden { display: none; }
.inspired-banner .inspired-label { flex: 1; }
.inspired-banner .inspired-label strong { color: #c4b5fd; }
.inspired-banner .inspired-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
}
.inspired-banner .inspired-remove:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* Compteur "N makers utilisent cette recette" sur la fiche du dex */
.recipe-loads-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(168,85,247,0.15);
  color: #c4b5fd;
  border: 1px solid rgba(168,85,247,0.3);
}

/* ── Actions sur fiche du dex (Utiliser cette recette) ──── */
.pkd-fiche-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px 0;
}
.pkd-fiche-actions.hidden { display: none; }
.btn-use-recipe {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(168,85,247,0.25);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn-use-recipe:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(168,85,247,0.35); }
.btn-use-recipe:active { transform: translateY(0); }

/* ── Bande presets en haut du calculateur ──────────── */
.presets-bar {
  margin: 8px 16px 14px;
  padding: 10px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(168,85,247,0.06));
  border: 1px solid rgba(168,85,247,0.25);
}
.presets-bar.hidden { display: none; }
.presets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}
.presets-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.presets-count {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(168,85,247,0.2);
  color: #ddd6fe;
}
.presets-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.preset-card {
  position: relative;
  flex: 0 0 auto;
  width: 165px;
  padding: 10px 10px 8px;
  border-radius: 12px;
  background: rgba(20,20,28,0.6);
  border: 1px solid rgba(168,85,247,0.3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-snap-align: start;
}
.preset-remove {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.preset-remove:hover { color: #fca5a5; background: rgba(255,255,255,0.04); }
.preset-strain {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  padding-right: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-by {
  font-size: 0.72rem;
  color: #c4b5fd;
}
.preset-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.preset-apply {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(124,58,237,0.25);
  color: #ddd6fe;
  border: 1px solid rgba(168,85,247,0.35);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.preset-apply:hover { background: rgba(124,58,237,0.4); }
.preset-start {
  flex: 0 0 auto;
  width: 32px;
  padding: 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
}
.preset-start:hover { filter: brightness(1.1); }

/* ── Modal recette : indicateur densité ────────────────── */
.recipe-density-row {
  display: flex;
  gap: 10px;
  margin: 8px 0 4px;
}
.recipe-density-col {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(20,20,28,0.5);
  border: 1px solid rgba(168,85,247,0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.recipe-density-col span {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.recipe-density-col strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.density-ok   { color: #34d399 !important; }
.density-warn { color: #fbbf24 !important; }
.density-bad  { color: #f87171 !important; }

/* ── Warning capacité presse insuffisante ─────────────── */
.recipe-press-warning {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.45);
  color: #fca5a5;
  font-size: 0.82rem;
  line-height: 1.4;
}
.recipe-press-warning.hidden { display: none; }
.recipe-press-warning strong { color: #fecaca; }

/* ── Niveaux de capacité presse (info → warn → danger → over) ─── */
.recipe-press-warning.press-level-info {
  background: rgba(250,204,21,0.08);
  border-color: rgba(250,204,21,0.40);
  color: #fde68a;
}
.recipe-press-warning.press-level-info strong { color: #fef3c7; }
.recipe-press-warning.press-level-warn {
  background: rgba(249,115,22,0.10);
  border-color: rgba(249,115,22,0.45);
  color: #fdba74;
}
.recipe-press-warning.press-level-warn strong { color: #fed7aa; }
.recipe-press-warning.press-level-danger,
.recipe-press-warning.press-level-over {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.50);
  color: #fca5a5;
}
.recipe-press-warning.press-level-danger strong,
.recipe-press-warning.press-level-over strong { color: #fecaca; }

/* ── Affichage permanent du PSI gauge calculé pour la recette ─── */
.recipe-press-gauge-row {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}
.recipe-press-gauge-row.hidden { display: none; }
.recipe-press-gauge-label {
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}
.recipe-press-gauge-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.recipe-press-gauge-value strong {
  font-size: 1.0rem;
  color: #fff;
}
.recipe-press-gauge-usage {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
}
.recipe-press-gauge-row.press-level-info {
  background: rgba(250,204,21,0.08);
  border-color: rgba(250,204,21,0.40);
}
.recipe-press-gauge-row.press-level-info strong { color: #fef3c7; }
.recipe-press-gauge-row.press-level-warn {
  background: rgba(249,115,22,0.10);
  border-color: rgba(249,115,22,0.45);
}
.recipe-press-gauge-row.press-level-warn strong { color: #fed7aa; }
.recipe-press-gauge-row.press-level-danger,
.recipe-press-gauge-row.press-level-over {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.50);
}
.recipe-press-gauge-row.press-level-danger strong,
.recipe-press-gauge-row.press-level-over strong { color: #fecaca; }

/* ── Photo attachment dans la modal Support et les replies ─── */
.support-photo-btn {
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.20);
  border-radius: 8px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s, border-color 0.15s;
}
.support-photo-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
}
.support-photo-preview {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  position: relative;
}
.support-photo-preview.hidden { display: none; }
.support-photo-preview img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
}
.support-photo-remove {
  background: rgba(239,68,68,0.85);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.support-photo-remove:hover { background: rgba(239,68,68,1); }

.ticket-reply-photo-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 6px 10px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.78rem;
  margin-right: 6px;
}
.ticket-reply-photo-btn:hover {
  background: rgba(255,255,255,0.10);
}
.ticket-reply-photo-preview {
  display: inline-block;
  position: relative;
  margin-left: 6px;
  vertical-align: middle;
}
.ticket-reply-photo-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.10);
}
.ticket-reply-photo-preview button {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(239,68,68,0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  cursor: pointer;
  padding: 0;
}

/* Thumbnail photo inline dans le message ticket (côté user, sa propre vue) */
.ticket-thread-photo {
  display: inline-block;
  margin-top: 6px;
  margin-right: 6px;
}
.ticket-thread-photo img {
  max-width: 180px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
}

/* ─── Lexique : barre de recherche + cartes terme/définition ─── */
.lex-toolbar {
  padding: 0 16px;
}
.lex-toolbar .search-bar {
  margin-bottom: 12px;
}
#lex-list {
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lex-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.lex-term {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 5px;
  letter-spacing: 0.2px;
}
.lex-def {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-dim);
  margin: 0;
}
.lex-card mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 1px;
}
.lex-count {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 2px 2px 10px;
  letter-spacing: 0.5px;
}
.lex-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 40px 20px;
  line-height: 1.5;
}
.lex-empty .lex-empty-term {
  color: var(--text);
  font-weight: 600;
}

/* ─── Guide : sommaire (chapitres) + lecture article, navigation fluide ─── */
#guide-list { padding: 0; }
.g-slide { animation: gSlide 0.28s ease both; }
@keyframes gSlide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.g-toc { padding: 6px 16px 28px; display: flex; flex-direction: column; gap: 10px; }
.g-pillar { margin: 16px 4px 2px; }
.g-pillar:first-child { margin-top: 4px; }
.g-pillar-name { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.g-pillar-sub { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.g-chap {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px 16px; background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 16px;
  color: var(--text); cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}
.g-chap:hover { border-color: var(--accent-soft); background: rgba(255,255,255,0.03); }
.g-chap:active { transform: scale(0.985); }
.g-chap-n { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: var(--accent); opacity: 0.85; min-width: 28px; }
.g-chap-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.g-chap-title { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.25; }
.g-chap-sub { font-size: 0.78rem; color: var(--text-muted); }
.g-chap-go { font-size: 1.5rem; line-height: 1; color: var(--text-dim); font-weight: 300; flex-shrink: 0; }
.g-reader { padding: 4px 18px 36px; }
.g-rhead { padding: 2px 0 16px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 22px; }
.g-back { background: none; border: none; color: var(--accent); font-size: 0.9rem; font-weight: 600; cursor: pointer; padding: 6px 0; margin-bottom: 14px; }
.g-rnum { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.g-rtitle { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; margin: 0; }
.g-sec { position: relative; padding-left: 36px; margin-bottom: 26px; }
.g-sec-n { position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--accent); opacity: 0.7; }
.g-sec-title { font-size: 1.1rem; font-weight: 600; color: var(--text); line-height: 1.3; margin: 0 0 9px; }
.g-sec-body { font-size: 0.96rem; line-height: 1.7; color: var(--text-dim); }
.g-sec-body p { margin: 0 0 12px; }
.g-sec-body p:last-child { margin: 0; }
.guide-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 40px 20px;
  line-height: 1.5;
}

/* Bouton info (i) + bloc d'aide depliable (ex : diametre final du puck) */
.info-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; margin-left: 2px;
  border: 1px solid var(--text-dim); border-radius: 50%;
  background: transparent; color: var(--text-dim);
  font: italic 700 11px/1 var(--mono, monospace);
  cursor: pointer; vertical-align: middle; flex: none;
}
.info-i:hover, .info-i:focus { border-color: var(--accent); color: var(--accent); outline: none; }
.field-help {
  margin: 6px 0 0; padding: 10px 12px;
  background: var(--accent-soft); border-left: 2px solid var(--accent);
  border-radius: 6px; color: var(--text-dim);
  font-size: 0.82rem; line-height: 1.5;
}

/* Décarboxylation + (ancien gummies, classes réutilisées) */
.g-intro { color: var(--text-dim); font-size: 0.88rem; line-height: 1.55; margin: 0 0 16px; }
.dc-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 10px; font-size: 0.8rem; color: var(--text-dim); }
.dc-legend span { display: flex; align-items: center; gap: 5px; }
.dc-sw { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.dc-dash { height: 0; border-top: 2px dashed var(--text-muted); background: none; }
.dc-muted { color: var(--text-muted); }
.dc-chart { background: var(--panel); border-radius: 8px; padding: 8px 6px; }
.dc-axis { margin: 6px 0 18px; font-size: 0.72rem; color: var(--text-muted); text-align: center; }
.dc-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0 0 4px; }
.dc-table th { text-align: left; color: var(--text-dim); font-weight: 500; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.dc-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); color: var(--text); }
.dc-table td:last-child { color: var(--text-dim); }
.dc-block { margin: 0 0 22px; }
.dc-badge { display: inline-block; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin: 0 0 9px; }
.dc-badge-m { color: #4cd089; background: rgba(76,208,137,0.13); }
.dc-badge-h { color: #e3a93a; background: rgba(227,169,58,0.14); }
.dc-block-h { font-size: 0.98rem; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.dc-fact { font-size: 0.74rem; color: var(--text-dim); line-height: 1.55; margin: 8px 0 0; }
.dc-heur { font-size: 0.78rem; color: var(--text-dim); line-height: 1.55; margin: 0 0 11px; }
.dc-views { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.dc-views li { font-size: 0.77rem; color: var(--text-dim); line-height: 1.5; padding-left: 11px; border-left: 2px solid var(--line); }
.dc-test { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 4px 0 16px; }
.dc-test-h { font-size: 0.9rem; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.dc-test p { font-size: 0.77rem; color: var(--text-dim); line-height: 1.55; margin: 0; }
/* Presets Puffco (guide dab) : cartes cliquables -> lien de partage puffco.app */
.puffco-grid { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.puffco-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: border-color .15s ease, background .15s ease; }
.puffco-card:active { background: rgba(255,255,255,0.03); border-color: var(--text-muted); }
.puffco-dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,0.06); }
.puffco-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.puffco-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.puffco-temp { font-size: 0.72rem; color: var(--text-muted); }
.puffco-go { flex: 0 0 auto; color: var(--text-dim); font-size: 0.95rem; }
.puffco-empty { font-size: 0.77rem; color: var(--text-muted); font-style: italic; margin: 4px 0 2px; }
.dc-sources { font-size: 0.66rem; color: var(--text-muted); line-height: 1.5; margin: 0; padding: 11px 0 0; border-top: 1px solid var(--line); }
.dc-stars { color: var(--accent); }
.dc-tag { color: var(--text-muted); font-size: 0.82em; letter-spacing: 0; }
.dc-table tr.dc-opt td { background: rgba(255,255,255,0.05); }
.dc-table-note { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; margin: 9px 0 0; }
.dc-terps { margin: 18px 0 4px; }
.dc-terps-title { font-size: 0.85rem; font-weight: 600; color: var(--text); margin: 0 0 11px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dc-terps-sub { font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }
.dc-terps-row { display: grid; grid-template-columns: 108px 1fr 46px; align-items: center; gap: 10px; margin-bottom: 9px; }
.dc-terps-info { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.dc-terps-name { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.dc-terps-aroma { font-size: 0.63rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-terps-track { height: 9px; background: var(--panel); border-radius: 5px; overflow: hidden; }
.dc-terps-bar { display: block; height: 100%; border-radius: 5px; }
.dc-terps-bp { font-size: 0.7rem; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.dc-terps-note { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; margin: 12px 0 0; }
.dc-terps-foot { font-size: 0.66rem; color: var(--text-muted); line-height: 1.45; margin: 9px 0 0; }
.dab-scale { margin: 4px 0 14px; }
.dab-bar { position: relative; display: flex; height: 26px; border-radius: 6px; overflow: hidden; }
.dab-zone { display: block; height: 100%; }
.dab-rosin { position: absolute; top: 0; bottom: 0; border: 2px solid #fff; border-radius: 4px; background: rgba(255,255,255,0.16); pointer-events: none; }
.dab-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.dab-axis { display: flex; justify-content: space-between; font-size: 0.64rem; color: var(--text-muted); margin: 5px 2px 0; }
.dab-cap { font-size: 0.72rem; color: var(--text-dim); margin: 8px 0 0; }
.dab-star { color: var(--accent); }
.dab-zones { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.dab-zones li { display: flex; align-items: center; gap: 8px; font-size: 0.77rem; }
.dab-sw { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 3px; }
.dab-zname { color: var(--text); font-weight: 600; flex: 0 0 84px; }
.dab-zr { color: var(--text-muted); font-size: 0.71rem; }
.dab-thresh { font-size: 0.77rem; color: var(--text-dim); line-height: 1.55; margin: 0 0 4px; }
.dab-sl { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 8px 0 18px; }
.dab-sl input[type=range] { width: 100%; margin: 0 0 12px; accent-color: var(--accent); }
.dab-sl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 11px; }
.dab-sl-temp { font-size: 1.05rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dab-sl-zone { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.dab-z-cold { color: #6db0ff; background: rgba(42,120,214,0.18); }
.dab-z-flavor { color: #4cd089; background: rgba(58,157,92,0.18); }
.dab-z-bal { color: #f0c04a; background: rgba(237,161,0,0.18); }
.dab-z-clouds { color: #f0925a; background: rgba(235,104,52,0.18); }
.dab-z-burn { color: #f06a6a; background: rgba(227,73,72,0.2); }
.dab-sl-row { display: flex; gap: 8px; font-size: 0.77rem; margin: 0 0 5px; line-height: 1.4; }
.dab-sl-lbl { flex: 0 0 62px; color: var(--text-muted); }
.dab-sl-row span:last-child { color: var(--text-dim); }
.dab-sl-warn { font-size: 0.77rem; color: #f06a6a; font-weight: 600; margin: 8px 0 0; }
.dab-sl-cav { font-size: 0.68rem; color: var(--text-muted); margin: 10px 0 0; font-style: italic; }
.g-out-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--panel); margin-bottom: 8px; color: var(--text-dim); }
.g-out-row strong { color: var(--text); font-size: 1.05rem; }
.g-out-hero { background: var(--accent-soft); }
.g-out-hero strong { color: var(--accent); font-size: 1.35rem; }
.g-disclaimer { margin: 16px 0 0; padding: 10px 12px; border-left: 2px solid var(--text-dim); border-radius: 6px; background: rgba(255,255,255,.03); color: var(--text-dim); font-size: 0.78rem; line-height: 1.55; }

/* ─── Cure tracker ─── */
#cure-list { padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.cure-sec {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 2px 0;
}
.cure-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 13px 15px;
  cursor: pointer;
}
.cure-card:active { transform: scale(0.985); }
.cure-card-done { opacity: 0.6; }
.cure-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 9px;
}
.cure-card-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cure-card-type {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.cure-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.cure-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.cure-card-done .cure-bar-fill { background: var(--text-dim); }
.cure-card-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ─── Détail de cure (sheet + journal) ─── */
.cure-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end; }
.cure-modal.hidden { display: none; }
.cure-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.cure-modal-sheet {
  position: relative;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
}
.cure-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.cure-modal-title { font-size: 1.08rem; font-weight: 700; color: var(--text); }
.cure-modal-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.cure-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 2px 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.cure-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.cure-act-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 9px 6px;
  cursor: pointer;
}
.cure-act-btn:active { background: rgba(255,255,255,0.1); }
.cure-act-taste { flex-basis: 100%; background: var(--accent-soft); border-color: var(--accent-dim); color: var(--accent); font-weight: 600; }
/* Carte "à déguster" + flux dégustation */
.cure-card-taste { border: 1px solid var(--accent-dim); background: linear-gradient(180deg, var(--panel), var(--accent-soft)); cursor: default; }
.cure-taste-btn { width: 100%; margin-top: 10px; background: var(--accent); color: #06140e; border: none; border-radius: 9px; padding: 10px; font-size: 0.85rem; font-weight: 600; font-family: var(--sans); cursor: pointer; }
.cure-taste-btn:active { transform: scale(0.98); }
.deg-flash { animation: degFlash 1.4s ease; border-radius: var(--radius); }
@keyframes degFlash {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
  25% { box-shadow: 0 0 0 3px rgba(52,211,153,0.55); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.cure-modal-sec {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 14px 0 4px;
}
.cure-entry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cure-entry-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  background: transparent;
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 1px;
}
.cure-entry.done .cure-entry-check { border-color: var(--accent); }
.cure-entry-main { flex: 1; min-width: 0; }
.cure-entry-txt { font-size: 0.9rem; color: var(--text); line-height: 1.35; word-break: break-word; }
.cure-entry.done .cure-entry-txt { text-decoration: line-through; color: var(--text-dim); }
.cure-entry-meta { font-family: var(--mono); font-size: 0.68rem; color: var(--text-dim); margin-top: 2px; }
.cure-entry-meta.cure-entry-due { color: var(--accent); }
.cure-entry-photo { max-width: 130px; border-radius: 8px; margin-top: 7px; display: block; cursor: pointer; }
.cure-entry-del, .cure-entry-cam {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 2px 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.cure-entry-cam svg { display: block; }
.cure-entry-cam:active, .cure-entry-del:active { color: var(--text); }
.cure-entry-note { padding-left: 2px; }
.cure-journal-empty { font-size: 0.85rem; color: var(--text-dim); padding: 14px 2px; line-height: 1.5; }
.cure-entry-noteline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  word-break: break-word;
}
.cure-entry.done .cure-entry-noteline { text-decoration: none; }
.cure-entry-panel {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.cure-entry-panel input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 8px 10px;
}
.cure-entry-panel .cure-entry-cam {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
}
.cure-entry-ok {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.cure-journal-addrow { display: flex; gap: 8px; margin-top: 12px; }
.cure-journal-addrow input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 12px;
}
.cure-journal-addbtn {
  width: 42px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* ─── Pré-sets d'instructions de cure ─── */
.cure-toolbar { padding: 0 16px 4px; display: flex; justify-content: flex-end; }
.cure-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.78rem;
  padding: 6px 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.cure-pill:active { background: rgba(255,255,255,0.1); }
.cure-sec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.cure-preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cure-preset-namebtn {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.92rem;
  padding: 2px 0;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cure-preset-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.cure-presets-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cure-presets-form input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 12px;
  font-family: inherit;
}
.cure-preset-itemrow { display: flex; gap: 8px; }
.cure-preset-itemrow #cure-preset-day {
  width: 56px;
  flex-shrink: 0;
  text-align: center;
  -moz-appearance: textfield;
}
.cure-preset-itemrow #cure-preset-day::-webkit-outer-spin-button,
.cure-preset-itemrow #cure-preset-day::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cure-preset-itemrow #cure-preset-item { flex: 1; min-width: 0; }
.cure-preset-draft-txt {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cure-entry-day {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 5px;
  padding: 1px 5px;
  margin-right: 6px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: 1px;
}
.cure-preset-savebtn {
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px;
  cursor: pointer;
}
.cure-preset-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  padding: 10px 12px;
  margin: 6px 0;
  cursor: pointer;
}
.cure-preset-pick:active { background: rgba(255,255,255,0.1); }
/* Photo chiffrée en cours de déchiffrement : placeholder discret */
img[data-encphoto] {
  background: rgba(255,255,255,0.05);
  min-height: 56px;
  min-width: 56px;
}

/* ─── Journal de cure dans la vue fiche ─── */
#fiche-view-cure-journal { padding: 0 16px; }
.fvj-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fvj-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  color: var(--accent);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.fvj-check.done { border-color: var(--accent); }
.fvj-main { flex: 1; min-width: 0; }
.fvj-txt { font-size: 0.88rem; color: var(--text); word-break: break-word; }
.fvj-txt.done { color: var(--text-muted); }
.fvj-notes-sep {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 0 2px;
}

.rosidex-update-pending {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 9px 12px;
  margin-top: 8px;
  line-height: 1.4;
}
.rosidex-update-rejected {
  font-size: 0.82rem;
  color: #f0a8b0;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px;
  padding: 9px 12px;
  margin-top: 8px;
  line-height: 1.4;
}
.fc-updstate {
  font-size: 0.72rem;
  margin-left: 5px;
  vertical-align: 1px;
}
.fc-updstate.rejected { filter: grayscale(1) sepia(1) saturate(6) hue-rotate(-25deg); }

/* ─── Sauvegarde de la clé photo ─── */
.photokey-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.photokey-box input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 10px 12px;
}
.photokey-copy {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 10px 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.photokey-copy:active { background: rgba(255,255,255,0.12); }
.photokey-warn {
  width: 100%;
  font-size: 0.8rem;
  color: #f0a8b0;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 10px;
  padding: 9px 12px;
  margin: 4px 0 0;
  line-height: 1.4;
}

.rosidex-cure-photos-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 9px 12px;
  margin: 10px 0 2px;
  line-height: 1.4;
}
.cure-ff-preset-row { display: flex; gap: 8px; align-items: center; }
.cure-ff-preset-btn {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 12px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cure-ff-preset-btn:active { background: rgba(255,255,255,0.1); }
#ff-cure-preset-list { margin-top: 6px; }

/* ─── Dégustation : échelle 0-5 + radar ─── */
.deg-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.deg-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.deg-arome { font-size: 0.85rem; color: var(--text); flex: 0 0 86px; }
.deg-rate { display: flex; gap: 9px; flex: 0 0 auto; }
.deg-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--panel-soft); border: 1.5px solid var(--line); padding: 0; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease; }
.deg-dot.on { background: var(--accent); border-color: var(--accent); }
.deg-dot:active { transform: scale(0.85); }
.deg-notes-wrap { margin-top: 6px; }
.deg-notes-wrap textarea { width: 100%; }
.deg-notes-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-family: var(--mono); margin-bottom: 6px; }
.deg-bars-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-family: var(--mono); margin-bottom: 2px; }
.deg-note-box { margin-top: 16px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.deg-note-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-family: var(--mono); margin-bottom: 6px; }
.deg-note-text { font-size: 0.9rem; color: var(--text); line-height: 1.45; white-space: pre-wrap; }
.deg-radar-wrap { padding: 8px 0 4px; display: flex; justify-content: center; }
.deg-radar { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.deg-radar-grid { fill: none; stroke: rgba(255,255,255,0.13); stroke-width: 1; }
.deg-radar-area { fill: rgba(52,211,153,0.16); stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.deg-radar-dot { fill: var(--accent); }
.deg-radar-label { fill: rgba(255,255,255,0.72); font-size: 13px; font-family: var(--sans); }
/* Barres d'intensité sous le radar (classement des arômes) */
.deg-bars { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.deg-bar-row { display: flex; align-items: center; gap: 10px; }
.deg-bar-lbl { flex: 0 0 80px; font-size: 0.85rem; color: var(--text); }
.deg-bar-track { flex: 1; height: 8px; background: var(--panel-soft); border-radius: 5px; overflow: hidden; }
.deg-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.deg-bar-val { flex: 0 0 16px; font-size: 0.8rem; color: var(--text-dim); font-family: var(--mono); text-align: right; }
/* Consensus terpènes au dos de la carte de strain */
.entry-consensus .deg-radar-wrap { padding: 2px 0 0; }
.entry-consensus .deg-bars { margin-top: 12px; padding-top: 12px; }
.entry-consensus-n { text-align: center; font-size: 0.7rem; color: var(--text-dim); font-family: var(--mono); margin-top: 10px; }
/* Toast de confirmation (dégustation enregistrée) */
.deg-toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px);
  transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: #06140e; font-weight: 600; font-size: 0.9rem;
  padding: 11px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none; z-index: 9999; max-width: 80%; text-align: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.deg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Capteur de pression live (boitier ESP32 -> ecran live-press) ── */
.live-sensor {
  width: 100%;
  max-width: 360px;
  margin: 6px auto 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.live-sensor.hidden { display: none; }
.live-sensor-cue {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 9px 18px;
  border-radius: 12px;
  background: var(--panel-elevated);
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.live-sensor-cue.under { background: rgba(92,199,255,0.16); color: #5cc7ff; }
.live-sensor-cue.ok    { background: var(--accent-soft); color: var(--accent); }
.live-sensor-cue.over  { background: rgba(239,68,68,0.16); color: var(--red); }
.live-sensor-readout {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.live-sensor-live { font-size: 30px; font-weight: 800; color: var(--text); }
.live-sensor-slash { font-size: 20px; color: var(--text-muted); }
.live-sensor-target { font-size: 22px; font-weight: 700; color: var(--live-color, var(--accent)); }
.live-sensor-unit { font-size: 12px; color: var(--text-muted); margin-left: 2px; }
.live-sensor-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: var(--panel-elevated);
  overflow: hidden;
}
.live-sensor-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 6px;
  background: var(--live-color, var(--accent));
  transition: width 0.12s linear;
}
.live-sensor-bar-target {
  position: absolute;
  top: -2px; bottom: -2px;
  left: 0%;
  width: 2px;
  background: var(--text);
  opacity: 0.85;
  z-index: 2;
}
.live-sensor-pair { font-size: 11px; color: var(--text-muted); }
.live-sensor-pair b { color: var(--text-dim); font-family: var(--mono); }

/* ── Courbe du press (capteur de pression, dans live-press) ── */
.live-sensor-chart {
  width: 100%;
  height: 110px;
  display: block;
  background: var(--panel-elevated);
  border-radius: 10px;
  margin-top: 4px;
}
.live-sensor-stats {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}
.live-sensor-stats > div {
  flex: 1;
  background: var(--panel-elevated);
  border-radius: 9px;
  padding: 7px 4px;
  text-align: center;
}
.live-sensor-stats b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.live-sensor-stats span {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Contraste du bloc capteur sur le theme sombre du live-press */
.live-sensor {
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
}
.live-sensor-chart { background: rgba(0, 0, 0, 0.35); }

/* Lisibilite renforcee du bloc capteur (glance rapide pendant le press) */
.live-sensor-live { color: #fff; }
.live-sensor-target { filter: brightness(1.15); }
.live-sensor-stats b { color: #fff; }
.live-sensor-cue.under { background: rgba(92,199,255,0.22); }
.live-sensor-cue.ok    { background: rgba(52,211,153,0.24); }
.live-sensor-cue.over  { background: rgba(239,68,68,0.22); }
#sensor-chart-curve { stroke-width: 2.6; }

/* ============================================================
   SIMULATEUR CAPTEUR — ADMIN ONLY (panneau isolé, classes .asim-*)
   Injecté par JS seulement pour isAdminUser() -> zéro impact users.
   ============================================================ */
/* Ligne jauge + timer côte à côte dans l'écran live-press (admin only via .asim-on) */
.asim-row { position:relative; z-index:2; display:flex; align-items:center; justify-content:center; gap:6px; padding:0 8px; }
/* min-width:0 = laisse les items rétrécir sous leur contenu (sinon le timer déborde
   à droite sur petit écran type iPhone 13 mini). Pas de max-width : le flex répartit
   exactement la largeur dispo (jauge un peu plus grande via le ratio de flex-grow). */
#live-press.asim-on .asim-row .live-ring-wrap { width:auto; height:auto; flex:1 1 0; min-width:0; margin:6px 0; aspect-ratio:1; animation:none; }
#live-press.asim-on .asim-gauge { flex:1.12 1 0; min-width:0; }
/* chrono + label redimensionnés pour le rond réduit de la vue admin (sinon le texte déborde du cercle) */
#live-press.asim-on .live-time { font-size:2.1rem; letter-spacing:-0.03em; }
#live-press.asim-on .live-stage-label { font-size:0.56rem; top:calc(50% + 28px); }
/* masque le vieux bloc capteur basique quand le sim admin est actif (évite le doublon) */
#live-press.asim-on #live-sensor { display:none !important; }
/* gagne de la place en vue admin : onglets d'étapes + bloc "Matériau visé" masqués
   (l'étape est déjà sous le timer, la cible est déjà sur la jauge) */
#live-press.asim-on .live-stages { display:none; }
#live-press.asim-on .live-meta { display:none; }
.asim-gauge { position:relative; width:100%; aspect-ratio:1; margin:0; }
.asim-gauge svg { width:100%; height:100%; display:block; overflow:hidden; }
.asim-gval { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; }
.asim-gcur { font-size:8px; letter-spacing:2px; color:#8b98ab; }
.asim-gnum { font-size:34px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1; transition:color .25s; }
.asim-gunit { font-size:9px; color:#8b98ab; letter-spacing:2px; margin-top:2px; }
.asim-gtgt { font-size:10px; color:#23a6f0; margin-top:4px; min-height:12px; font-variant-numeric:tabular-nums; }
.asim-gauge.at .asim-gnum { color:#2ec47a; } .asim-gauge.ov .asim-gnum { color:#f0524d; }
.asim-panel { position:relative; z-index:2; padding:2px 12px 8px; display:flex; flex-direction:column; gap:8px; }
.asim-badge2 { display:inline-block; font-size:8px; background:rgba(0,0,0,.25); color:#06121a; padding:1px 5px; border-radius:5px; font-weight:800; letter-spacing:1px; vertical-align:middle; }
.asim-cue { text-align:center; padding:10px; border-radius:12px; font-size:15px; font-weight:800; background:#0e141d; color:#8b98ab; }
.asim-cue.below { background:rgba(255,158,87,.14); color:#ff9e57; }
.asim-cue.appr { background:rgba(255,107,53,.16); color:#ff6b35; }
.asim-cue.ok { background:rgba(46,196,122,.16); color:#2ec47a; }
.asim-cue.over { background:rgba(240,82,77,.18); color:#f0524d; }
/* Boutons pompe/release = crutch de SIMULATION -> EN ABSOLU dans l'entete "Press en cours",
   discrets a droite. Le jour du vrai boitier on les enleve : aucun recadrage (hors-flux). */
#live-press.asim-on .live-header { position:relative; }
.asim-btns { position:absolute; right:12px; top:50%; transform:translateY(-50%); z-index:6; display:flex; gap:6px; }
.asim-btn { flex:0 0 auto; border:none; border-radius:9px; padding:6px 10px; font-size:11px; font-weight:800;
  font-family:inherit; color:#06121a; cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none;
  opacity:.92; box-shadow:0 2px 8px rgba(0,0,0,.4); transition:filter .12s; }
.asim-btn.pump { background:#2ec47a; } .asim-btn.rel { background:#f0524d; color:#fff; }
.asim-btn.held { filter:brightness(1.25); opacity:1; }
.asim-chartwrap { position:relative; }
.asim-chart { width:100%; height:132px; display:block; background:#0e141d; border-radius:10px; }
.asim-pill { position:absolute; right:4px; transform:translateY(-50%); background:rgba(11,15,22,.92); border:1px solid #2ec47a;
  color:#2ec47a; font-size:9px; font-weight:700; font-variant-numeric:tabular-nums; padding:1px 5px; border-radius:6px; white-space:nowrap; display:none; }
.asim-legend { display:flex; gap:12px; justify-content:center; margin-top:8px; font-size:9px; color:#8b98ab; flex-wrap:wrap; }
.asim-li { display:flex; align-items:center; gap:5px; } .asim-swatch { width:10px; height:10px; border-radius:3px; }
.asim-statrow { display:flex; gap:6px; margin-top:8px; }
.asim-stat { flex:1; background:#0e141d; border:1px solid #222c3a; border-radius:9px; padding:6px 3px; text-align:center; }
.asim-stat b { display:block; font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; }
.asim-stat span { font-size:8px; color:#8b98ab; text-transform:uppercase; letter-spacing:.4px; }

/* Armement auto : bouton "Lancer le press" illuminé quand boîtier + cible sont prêts */
.live-launch-btn.sensor-armed { box-shadow:0 0 16px rgba(52,211,153,.35); }
.live-launch-armed { font-size:9px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;
  background:rgba(4,19,12,.35); color:#04130c; padding:2px 7px; border-radius:8px; margin-left:6px;
  animation:armedPulse 2.2s ease-in-out infinite; }
@keyframes armedPulse { 0%,100% { opacity:.85; } 50% { opacity:1; } }
/* Hint "démarrage auto" sous le START du rond */
.live-start-btn .live-start-hint { font-size:0.5rem; font-weight:600; letter-spacing:.06em;
  text-transform:none; color:var(--text-dim); margin-top:3px; min-height:0.6rem; }

/* Puce "Boîtier connecté / non détecté" en haut du calculateur (admin/capteur only) */
.sensor-chip { display:inline-flex; align-items:center; gap:6px; margin:0 18px 6px; padding:4px 11px;
  border-radius:12px; background:var(--panel); border:1px solid var(--line-soft); font-size:11px;
  color:var(--text-dim); cursor:pointer; font-family:inherit; }
.sensor-chip-dot { width:7px; height:7px; border-radius:50%; background:#8b98ab; flex:0 0 auto; }
.sensor-chip.on { color:var(--text); border-color:rgba(52,211,153,.35); }
.sensor-chip.on .sensor-chip-dot { background:#34d399; box-shadow:0 0 6px #34d399; }

/* Courbe capteur sur les fiches : badge (listes) + section graphe (vue fiche) */
.fc-sensor { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px;
  margin-left:6px; border-radius:5px; background:rgba(52,211,153,.16); color:#34d399; vertical-align:-2px; flex:0 0 auto; }
.pkd-fiche-strain .fc-sensor { width:15px; height:15px; margin-left:5px; }
.fv-sensor-sec h3 .fc-sensor { margin-left:0; margin-right:6px; }
.fv-sensor-chart { width:100%; height:150px; display:block; background:rgba(0,0,0,.25); border-radius:10px; margin-top:4px; }
/* Press long : le graphe est plus large que l'écran et défile au doigt */
.fv-sensor-wrap { position:relative; margin-top:4px; }
.fv-sensor-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:10px; overscroll-behavior-x:contain; }
.fv-sensor-scroll .fv-sensor-chart { margin-top:0; }
/* Échelle PSI fixe à gauche (ne défile pas avec le graphe) */
.fv-sensor-ylab { position:absolute; inset:0; pointer-events:none; }
.fv-sensor-ylab span { position:absolute; left:4px; transform:translateY(-55%); font-size:8px;
  color:rgba(255,255,255,.5); font-family:ui-monospace,monospace; background:rgba(11,15,22,.55);
  padding:0 3px; border-radius:4px; }
/* Curseur + bulle de lecture (PSI/temps sous le doigt) */
.fv-sensor-cursor { position:absolute; top:0; bottom:20px; width:1.5px; background:rgba(255,255,255,.6); pointer-events:none; }
.fv-sensor-bubble { position:absolute; top:3px; background:rgba(11,15,22,.94); border:1px solid #2ec47a;
  color:#eaf0f7; font:10px ui-monospace,monospace; font-variant-numeric:tabular-nums; padding:2px 7px;
  border-radius:7px; pointer-events:none; white-space:nowrap; z-index:2; }
.fv-sensor-legend { display:flex; gap:10px; justify-content:center; margin-top:7px; font-size:9px; color:var(--text-dim); flex-wrap:wrap; }
.fv-sensor-legend i { width:9px; height:9px; border-radius:3px; display:inline-block; margin-right:4px; vertical-align:-1px; }
.fv-sensor-stats { display:flex; gap:8px; margin-top:8px; }
.fv-sensor-stats > div { flex:1; text-align:center; background:rgba(255,255,255,.04); border-radius:8px; padding:6px 2px; }
.fv-sensor-stats b { display:block; font-size:13px; font-variant-numeric:tabular-nums; }
.fv-sensor-stats span { font-size:8px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.4px; }
#ff-sensor-preview { margin-top:14px; }
#ff-sensor-preview:empty { display:none; }
.ff-sensor-label { font-size:12px; color:var(--text-dim); margin-bottom:6px; display:flex; align-items:center; gap:2px; }

/* Tél en paysage : jauge + timer dimensionnés en HAUTEUR (compacts), sinon ils débordent */
@media (orientation: landscape) {
  #live-press.asim-on .asim-row { gap:18px; padding:0 14px; }
  #live-press.asim-on .asim-gauge,
  #live-press.asim-on .asim-row .live-ring-wrap {
    flex:0 0 auto; width:auto; height:min(46vh, 210px); max-width:42%; aspect-ratio:1; margin:4px 0;
  }
  #live-press.asim-on .asim-panel { max-width:640px; margin:0 auto; width:100%; }
  #live-press.asim-on .asim-chart { height:120px; }
  #live-press.asim-on .asim-gnum { font-size:30px; }
}
