/* ═══════════════════════════════════════════════════════════
   kaimen.ma — maquette page d'accueil
   Palette dérivée du logo : rouge brique, ardoise, pierre, crème, or
   ═══════════════════════════════════════════════════════════ */

:root{
  /* surfaces */
  --paper:         #faf8f4;   /* fond de page, blanc chaud */
  --white:         #ffffff;
  --surface-2:     #f4f2ec;
  --cream:         #f7f2e4;

  /* traits */
  --line:          #e6e2d9;
  --line-strong:   #d5d0c3;

  /* encre */
  --ink:           #1e2a35;
  --ink-2:         #56646f;
  --ink-3:         #8b959f;

  /* marque */
  --red:           #a61f26;
  --red-dark:      #7c1418;
  --red-soft:      rgba(166,31,38,.08);
  --slate:         #2c4356;
  --gold:          #b8892b;
  --stone:         #c3c2b4;

  /* sémantique */
  --ok:            #157a4e;
  --warn:          #9a6b12;

  --radius:        10px;
  --radius-sm:     7px;

  --shadow-1:      0 1px 2px rgba(30,42,53,.05);
  --shadow-2:      0 2px 10px rgba(30,42,53,.07);
  --shadow-3:      0 6px 24px rgba(30,42,53,.10);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 58px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

a{ color:inherit; text-decoration:none; }
a:hover{ color:var(--red); }
h1,h2,h3{ margin:0; font-weight:600; }
ol,ul{ margin:0; padding:0; list-style:none; }
button{ font:inherit; color:inherit; background:none; border:none; cursor:pointer; }
svg{ fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.mono{ font-family:var(--mono); font-size:.92em; }

/* ───────────────────────── en-tête ───────────────────────── */

.topbar{
  position:sticky; top:0; z-index:50;
  height:var(--header-h);
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}

.topbar-inner{
  max-width:1520px; height:100%; margin:0 auto;
  padding:0 20px;
  display:flex; align-items:center; gap:26px;
}

.brand{ display:flex; align-items:center; gap:10px; flex:none; }
.brand:hover{ color:var(--ink); }
.brand-mark{ width:30px; height:30px; display:block; border-radius:50%; }

.brand-name{
  font-family:var(--serif);
  font-size:20px; letter-spacing:.2px; color:var(--ink);
}
.brand-tld{ color:var(--red); }

.topnav{ display:flex; gap:22px; font-size:13.5px; color:var(--ink-2); }
.topnav a{ padding:3px 0; border-bottom:2px solid transparent; }
.topnav a:hover{ color:var(--ink); }
.topnav a.is-active{ color:var(--ink); font-weight:500; border-bottom-color:var(--red); }

.topbar-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }

.search{ position:relative; }
.search svg{ position:absolute; left:11px; top:50%; transform:translateY(-50%); width:14px; height:14px; color:var(--ink-3); }
.search input{
  width:310px; height:34px;
  padding:0 12px 0 31px;
  background:var(--surface-2); color:var(--ink);
  border:1px solid transparent; border-radius:99px;
  font-size:13px; outline:none;
  transition:background .15s, border-color .15s;
}
.search input::placeholder{ color:var(--ink-3); }
.search input:focus{ background:var(--white); border-color:var(--line-strong); box-shadow:var(--shadow-1); }

/* boutons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  height:34px; padding:0 15px;
  border-radius:99px; font-size:13px; font-weight:500;
  border:1px solid transparent; white-space:nowrap;
  transition:background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn .i{ width:14px; height:14px; }
.btn-ghost{ border-color:var(--line-strong); color:var(--ink-2); background:var(--white); }
.btn-ghost:hover{ border-color:var(--ink-3); color:var(--ink); }
.btn-red{
  background:var(--red); color:#fff; font-weight:600;
  box-shadow:var(--shadow-1);
}
.btn-red:hover{ background:var(--red-dark); color:#fff; box-shadow:var(--shadow-2); }
.btn-sm{ height:31px; padding:0 13px; font-size:12.5px; }
.btn-wide{ width:100%; height:37px; }

/* ───────────────────────── grille ───────────────────────── */

.layout{
  max-width:1520px; margin:0 auto;
  padding:22px 20px 60px;
  display:grid;
  grid-template-columns:282px minmax(0,1fr) 300px;
  gap:22px;
  align-items:start;
}

.rail{ display:flex; flex-direction:column; gap:16px; position:sticky; top:calc(var(--header-h) + 22px); }

.panel{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:15px;
  box-shadow:var(--shadow-1);
}

.panel-head{ display:flex; align-items:baseline; gap:8px; margin-bottom:12px; }
.panel-head h2{
  font-family:var(--serif); font-size:16.5px; font-weight:600; letter-spacing:.2px;
}
.panel-sub{ margin-left:auto; font-size:11.5px; color:var(--ink-3); }
.panel-foot{
  display:block; margin-top:12px; padding-top:11px;
  border-top:1px solid var(--line);
  font-size:12.5px; color:var(--ink-2); font-weight:500;
}
.panel-foot:hover{ color:var(--red); }

/* ─────────── panthéon ─────────── */

.hof-tabs{ display:flex; gap:3px; margin-bottom:10px; background:var(--surface-2); padding:3px; border-radius:99px; }
.hof-tab{
  flex:1; height:27px; border-radius:99px;
  font-size:12px; color:var(--ink-2);
  transition:background .15s, color .15s;
}
.hof-tab.is-active{ background:var(--white); color:var(--ink); font-weight:500; box-shadow:var(--shadow-1); }

.hof-list{ display:flex; flex-direction:column; gap:1px; }
.hof-list.is-hidden{ display:none; }

.hof-item{
  display:flex; align-items:center; gap:10px;
  padding:6px; border-radius:var(--radius-sm);
  cursor:pointer;
}
.hof-item:hover{ background:var(--surface-2); }

.rank{
  flex:none; width:15px; text-align:center;
  font-family:var(--mono); font-size:11px; color:var(--ink-3);
}
.rank-1{ color:var(--gold); font-weight:700; }
.rank-2{ color:#8d949b; font-weight:700; }
.rank-3{ color:#a97449; font-weight:700; }

.hof-body{ min-width:0; display:flex; flex-direction:column; }
.hof-title{
  font-size:12.7px; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.hof-meta{ font-size:11px; color:var(--ink-3); display:flex; align-items:center; gap:5px; }
.acc{ color:var(--ok); font-weight:600; }

.ico-up{
  display:inline-block; width:9px; height:9px;
  border-left:4.5px solid transparent; border-right:4.5px solid transparent;
  border-bottom:7px solid var(--ink-3);
}

/* jetons pièces & avatars */
.coin-chip, .avatar{
  flex:none; width:28px; height:28px; border-radius:50%;
  display:grid; place-items:center;
  font-size:11px; font-weight:600; color:#3a2f16;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 2px rgba(0,0,0,.18), 0 0 0 1px rgba(30,42,53,.07);
}
.coin-chip[data-tone="gold"], .avatar[data-tone="gold"]{ background:linear-gradient(150deg,#f2e0b2,#d5ae5c 55%,#a8822f); }
.coin-chip[data-tone="silver"], .avatar[data-tone="silver"]{ background:linear-gradient(150deg,#f2f3f4,#ccd2d8 55%,#9aa4ad); color:#2b3440; }
.coin-chip[data-tone="copper"], .avatar[data-tone="copper"]{ background:linear-gradient(150deg,#eabb98,#c38154 55%,#8f5c33); color:#33200f; }
.coin-chip.lg{ width:38px; height:38px; font-size:14px; }
.avatar.sm{ width:20px; height:20px; font-size:9px; }

/* ─────────── échelle de Sheldon ─────────── */

.scale-list{ display:flex; flex-direction:column; gap:7px; }
.scale-list li{ display:flex; align-items:center; gap:10px; font-size:12px; color:var(--ink-2); }
.scale-list b{ flex:none; width:76px; text-align:center; }

/* pastilles de note */
.g{
  display:inline-block; padding:1.5px 6px; border-radius:5px;
  font-family:var(--mono); font-size:10.5px; font-weight:700; letter-spacing:.3px;
  border:1px solid;
}
.g-ms{ background:rgba(21,122,78,.08);  color:#157a4e; border-color:rgba(21,122,78,.22); }
.g-au{ background:rgba(36,96,143,.08);  color:#24608f; border-color:rgba(36,96,143,.22); }
.g-xf{ background:rgba(154,107,18,.08); color:#9a6b12; border-color:rgba(154,107,18,.22); }
.g-vf{ background:rgba(138,83,38,.08);  color:#8a5326; border-color:rgba(138,83,38,.22); }
.g-lo{ background:rgba(98,108,120,.08); color:#626c78; border-color:rgba(98,108,120,.22); }

/* ───────────────────────── fil des scans ───────────────────────── */

.feed{ display:flex; flex-direction:column; gap:18px; min-width:0; }

.feed-head{ display:flex; align-items:center; gap:12px; }
.feed-tabs{ display:flex; gap:2px; }
.feed-tab{
  height:31px; padding:0 13px; border-radius:99px;
  font-size:13px; color:var(--ink-2);
  display:inline-flex; align-items:center; gap:6px;
  transition:background .15s, color .15s;
}
.feed-tab:hover{ color:var(--ink); background:var(--surface-2); }
.feed-tab.is-active{
  background:var(--white); color:var(--ink); font-weight:500;
  box-shadow:inset 0 0 0 1px var(--line), var(--shadow-1);
}
.feed-head .btn{ margin-left:auto; }
.dot{ width:6px; height:6px; border-radius:50%; background:var(--warn); }

/* ─────────── carte de scan ─────────── */

.scan{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow-1);
  transition:box-shadow .2s, border-color .2s;
}
.scan:hover{ box-shadow:var(--shadow-2); border-color:var(--line-strong); }

.scan-head{ display:flex; align-items:center; gap:12px; padding:14px 16px; }

.scan-id{ min-width:0; }
.scan-id h3{ font-family:var(--serif); font-size:17px; letter-spacing:.2px; }
.scan-sub{
  margin:2px 0 0; font-size:12px; color:var(--ink-3);
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
}
.scan-sub a{ color:var(--ink-2); font-weight:500; }
.scan-sub a:hover{ color:var(--red); }
.cert{ font-family:var(--mono); font-size:11px; color:var(--ink-2); }

.verified{
  display:inline-block; width:13px; height:13px; border-radius:50%;
  background:var(--ok); position:relative; vertical-align:-2px;
}
.verified::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(45deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%) no-repeat 3px 1px/6px 6px,
    linear-gradient(-45deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%) no-repeat 4px 4px/5px 5px;
}

.scan-flags{ margin-left:auto; display:flex; gap:6px; flex:none; }
.tag{
  padding:3px 9px; border-radius:99px;
  font-size:10.5px; font-weight:600; letter-spacing:.3px; text-transform:uppercase;
  border:1px solid;
}
.tag-ok{ color:var(--ok); border-color:rgba(21,122,78,.25); background:rgba(21,122,78,.06); }
.tag-new{ color:var(--red); border-color:rgba(166,31,38,.25); background:var(--red-soft); }
.tag-warn{ color:var(--warn); border-color:rgba(154,107,18,.28); background:rgba(154,107,18,.07); }

/* ─────────── visionneuse 3D + surcouche ─────────── */

.viewer{
  position:relative;
  aspect-ratio:16/10;
  background:
    radial-gradient(70% 70% at 50% 42%, #ffffff 0%, #f3f1ea 55%, #e8e5db 100%);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.viewer .coin-canvas{
  position:absolute; inset:0; width:100%; height:100%;
  display:block; cursor:grab; touch-action:none;
  opacity:0; transition:opacity .5s ease;
}
.viewer.is-ready .coin-canvas{ opacity:1; }
.viewer.is-grabbing .coin-canvas{ cursor:grabbing; }

/* indice d'interaction, effacé au premier glisser */
.viewer .hint{
  position:absolute; left:50%; bottom:14px; transform:translateX(-50%);
  display:flex; align-items:center; gap:6px;
  padding:4px 11px; border-radius:99px;
  font-size:11px; color:var(--ink-3);
  background:rgba(255,255,255,.7); border:1px solid rgba(30,42,53,.07);
  backdrop-filter:blur(6px);
  pointer-events:none;
  transition:opacity .45s ease;
}
.viewer.is-touched .hint{ opacity:0; }
.hint svg{ width:12px; height:12px; }

.viewer .loading{
  position:absolute; inset:0; display:grid; place-items:center;
  font-size:12.5px; color:var(--ink-3);
  font-variant-numeric:tabular-nums;
  pointer-events:none;
}

.viewer-fallback::after{
  content:"Rendu 3D indisponible (WebGL désactivé)";
  position:absolute; inset:0; display:grid; place-items:center;
  font-size:12.5px; color:var(--ink-3);
}

/* la surcouche ne doit pas voler le geste de rotation : seuls les jetons sont cliquables */
.overlay{
  position:absolute; inset:0;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:12px;
  pointer-events:none;
}
.ov-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.ov-bottom{ align-items:flex-end; }
.overlay > .ov-row > *{ pointer-events:auto; }

/* jetons de note */
.grade{
  display:flex; flex-direction:column; gap:1px;
  padding:8px 12px 9px;
  min-width:118px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(10px);
  border:1px solid rgba(30,42,53,.10);
  border-radius:10px;
  box-shadow:var(--shadow-2);
  outline:none;
  transition:box-shadow .15s, border-color .15s, background .15s;
}
.grade:hover, .grade:focus-visible{ background:#fff; border-color:rgba(30,42,53,.2); box-shadow:var(--shadow-3); }
.grade-com{ text-align:right; align-items:flex-end; }

.grade-label{
  display:flex; align-items:center; gap:5px;
  font-size:9.5px; font-weight:700; letter-spacing:.9px; text-transform:uppercase;
  color:var(--ink-3);
}
.grade-ai .grade-label{ color:var(--slate); }
.grade-com .grade-label{ color:var(--red); }

.ai-dot{
  width:6px; height:6px; border-radius:50%; background:var(--slate);
  box-shadow:0 0 0 3px rgba(44,67,86,.13);
}

.grade-value{
  font-family:var(--mono); font-size:24px; font-weight:700; letter-spacing:-.6px;
  line-height:1.15;
  background:none !important; border:0 !important; padding:0;
}
.grade-value.g-ms{ color:#157a4e; }
.grade-value.g-au{ color:#24608f; }
.grade-value.g-xf{ color:#9a6b12; }
.grade-value.g-vf{ color:#8a5326; }

.grade-meta{ font-size:10.5px; color:var(--ink-3); }

/* votes */
.votes{
  display:flex; align-items:center; gap:2px;
  padding:3px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(10px);
  border:1px solid rgba(30,42,53,.10);
  border-radius:99px;
  box-shadow:var(--shadow-2);
}
.vote{
  display:inline-flex; align-items:center; gap:6px;
  height:28px; padding:0 12px; border-radius:99px;
  font-size:12.5px; color:var(--ink-2);
  transition:background .14s, color .14s;
}
.vote svg{ width:15px; height:15px; fill:none; stroke-width:1.5; }
.vote:hover{ background:var(--surface-2); color:var(--ink); }
.vote.up.is-on{ color:var(--ok); background:rgba(21,122,78,.1); }
.vote.up.is-on svg{ fill:rgba(21,122,78,.18); }
.vote.down.is-on{ color:var(--red); background:var(--red-soft); }
.vote.down.is-on svg{ fill:rgba(166,31,38,.16); }
.vote .count{ font-variant-numeric:tabular-nums; }

.open{
  display:inline-flex; align-items:center; gap:10px;
  height:35px; padding:0 14px; border-radius:99px;
  font-size:12.5px; font-weight:500; color:var(--ink);
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(10px);
  border:1px solid rgba(30,42,53,.10);
  box-shadow:var(--shadow-2);
  transition:background .15s, border-color .15s, color .15s;
}
.open:hover{ background:var(--red); border-color:var(--red); color:#fff; }
.open:hover .open-comments{ color:rgba(255,255,255,.8); border-right-color:rgba(255,255,255,.3); }
.open-comments{
  display:inline-flex; align-items:center; gap:5px;
  padding-right:11px;
  border-right:1px solid var(--line-strong);
  color:var(--ink-3);
  transition:color .15s, border-color .15s;
}
.open-comments svg{ width:13px; height:13px; }

.credit{
  margin:0; padding:10px 16px 12px;
  font-size:11px; color:var(--ink-3);
  background:var(--paper);
}
.credit a{ color:var(--ink-2); text-decoration:underline; text-decoration-color:var(--line-strong); text-underline-offset:2px; }

.feed-end{ padding:2px 0 0; }

/* ───────────────────────── colonne de droite ───────────────────────── */

.pitch{ background:linear-gradient(180deg, var(--cream), var(--white) 70%); border-color:var(--line-strong); }
.pitch h2{ font-family:var(--serif); font-size:18px; margin-bottom:11px; }
.steps{ display:flex; flex-direction:column; gap:9px; margin-bottom:14px; }
.steps li{ font-size:12.3px; color:var(--ink-2); line-height:1.45; }
.steps b{ color:var(--red); margin-right:5px; font-family:var(--mono); font-size:11px; }

.pulse{
  margin-left:auto; width:7px; height:7px; border-radius:50%; background:var(--ok);
  box-shadow:0 0 0 0 rgba(21,122,78,.5);
  animation:pulse 2.2s infinite;
}
@keyframes pulse{
  70%{ box-shadow:0 0 0 7px rgba(21,122,78,0); }
  100%{ box-shadow:0 0 0 0 rgba(21,122,78,0); }
}

.live-list{ display:flex; flex-direction:column; gap:10px; }
.live-list li{
  display:flex; align-items:center; gap:7px; flex-wrap:wrap;
  font-size:12px; color:var(--ink-3); line-height:1.35;
}
.live-list b{ color:var(--ink-2); font-weight:500; }
.live-list a{ color:var(--ink); font-weight:500; }

.stats{ display:flex; justify-content:space-between; text-align:center; gap:8px; }
.stat{ display:flex; flex-direction:column; gap:1px; }
.stat b{ font-family:var(--serif); font-size:18px; color:var(--red); }
.stat span{ font-size:10.5px; color:var(--ink-3); }

/* ───────────────────────── pied de page ───────────────────────── */

.foot{
  max-width:1520px; margin:0 auto; padding:22px 20px 34px;
  border-top:1px solid var(--line);
  display:flex; gap:18px; flex-wrap:wrap;
  font-size:12px; color:var(--ink-3);
}
.foot nav{ margin-left:auto; display:flex; gap:18px; }

/* ───────────────────────── pages de compte ───────────────────────── */

.auth{ min-height:100vh; display:grid; place-items:center; padding:44px 20px; }
.auth-inner{ width:100%; max-width:396px; }

.auth-brand{ display:flex; flex-direction:column; align-items:center; gap:13px; margin-bottom:28px; }
.auth-brand img{
  width:92px; height:92px; border-radius:50%;
  box-shadow:0 4px 18px rgba(30,42,53,.13);
}
.auth-brand .brand-name{ font-size:27px; }

.auth-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px 24px 24px;
  box-shadow:var(--shadow-2);
}
.auth-card h1{ font-family:var(--serif); font-size:20px; text-align:center; }
.auth-sub{ margin:5px 0 21px; text-align:center; font-size:12.5px; color:var(--ink-3); }

.field{ margin-bottom:15px; }
.field label{ display:block; font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.field input{
  width:100%; height:39px; padding:0 12px;
  background:var(--white); color:var(--ink);
  border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  font-size:13.5px; font-family:inherit; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.field input::placeholder{ color:var(--ink-3); }
.field input:focus{ border-color:var(--slate); box-shadow:0 0 0 3px rgba(44,67,86,.11); }
.field-note{ margin:6px 0 0; font-size:11px; color:var(--ink-3); }

.auth-card .btn{ width:100%; height:41px; margin-top:7px; font-size:13.5px; }

.auth-alt{
  margin-top:18px; padding-top:16px;
  border-top:1px solid var(--line);
  text-align:center; font-size:12.5px; color:var(--ink-3);
}
.auth-alt a{ color:var(--red); font-weight:500; }
.auth-back{ display:block; margin-top:20px; text-align:center; font-size:12.5px; color:var(--ink-3); }

/* messages */
.notice{
  display:flex; gap:10px; align-items:flex-start;
  padding:12px 14px; margin-bottom:19px;
  border:1px solid; border-radius:var(--radius-sm);
  font-size:12.8px; line-height:1.45;
}
.notice svg{ width:16px; height:16px; flex:none; margin-top:1px; }
.notice-warn{ background:rgba(154,107,18,.07); border-color:rgba(154,107,18,.3); color:#7d560e; }

/* écran de confirmation d'inscription */
.sent{ text-align:center; }
.sent .seal{
  width:56px; height:56px; margin:2px auto 16px;
  border-radius:50%; display:grid; place-items:center;
  background:rgba(21,122,78,.09); color:var(--ok);
}
.sent .seal svg{ width:26px; height:26px; stroke-width:1.5; }
.sent h1{ margin-bottom:9px; }
.sent p{ margin:0 auto; font-size:13px; color:var(--ink-2); line-height:1.5; max-width:300px; }
.sent .addr{ font-weight:600; color:var(--ink); }
.sent .resend{ margin-top:18px; font-size:12px; color:var(--ink-3); }

.is-off{ display:none !important; }

/* ─── fiche d'un scan ─── */
.detail-back{ font-size:12.5px; color:var(--ink-3); }
.detail-back:hover{ color:var(--red); }

.comments .panel-head{ margin-bottom:14px; }

.comment-list{ display:flex; flex-direction:column; }
.comment{
  display:flex; gap:10px; align-items:flex-start;
  padding:11px 0;
  border-top:1px solid var(--line);
}
.comment:first-child{ border-top:0; padding-top:2px; }
.comment-body{ min-width:0; }
.comment-author{ margin:0; font-size:12px; font-weight:600; color:var(--ink-2); }
.comment-text{ margin:2px 0 0; font-size:13.5px; color:var(--ink); word-break:break-word; }

.comment-empty{ margin:0; font-size:13px; color:var(--ink-3); }

.comment-cta{
  margin:15px 0 0; padding-top:14px;
  border-top:1px solid var(--line);
  font-size:12.5px; color:var(--ink-3);
}
.comment-cta a{ color:var(--red); font-weight:500; }

/* ─── dépôt d'un scan ─── */
.qr-card{ text-align:center; }
.qr-instruction{
  margin:10px auto 20px; max-width:302px;
  font-size:13px; color:var(--ink-2); line-height:1.5;
}
.qr{
  display:block; margin:0 auto;
  width:220px; height:220px; padding:12px;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm);
  image-rendering:pixelated;   /* les modules restent nets à la réduction */
}
.qr-ref{ margin:17px 0 0; font-size:11.5px; color:var(--ink-3); }

/* ───────────────────────── adaptatif ───────────────────────── */

@media (max-width:1280px){
  .layout{ grid-template-columns:262px minmax(0,1fr); }
  .rail-right{ display:none; }
  .search input{ width:220px; }
}
@media (max-width:980px){
  .layout{ grid-template-columns:1fr; }
  .rail{ position:static; }
  .rail-left{ order:2; }
  .feed{ order:1; }
  .topnav, .search{ display:none; }
}
@media (max-width:640px){
  .viewer{ aspect-ratio:4/3; }
  .scan-flags{ display:none; }
  .grade{ min-width:100px; padding:6px 10px; }
  .grade-value{ font-size:20px; }
  .open-comments{ display:none; }
}
