/* Vadibe — Admin v2. Palette « Île rouge » de l'app. */
:root {
  --forest: #10231C; --forest-deep: #0B1A14; --moss: #1A3329; --moss-light: #234236; --line: #2C4A3E;
  --sand: #F3EBDD; --sand-muted: #B9C2B5; --clay: #E07A4F; --clay-deep: #A9472A; --vanilla: #E8C46A;
  --ok: #7FC8A0; --danger: #F08A6C; --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--forest); color: var(--sand); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
a { color: var(--clay); text-decoration: none; }
a:hover { color: #F09A73; text-decoration: underline; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.4px; margin: 0 0 20px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
h3 { font-size: 15px; margin: 0 0 12px; color: var(--vanilla); }
code { background: var(--moss-light); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--sand-muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.small-text { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 8px; }

/* Structure */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--forest-deep); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 12px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 800; font-size: 24px; color: var(--sand); padding: 0 10px 20px; letter-spacing: -0.5px; }
.brand span { font-size: 12px; font-weight: 600; color: var(--clay); letter-spacing: 0; margin-left: 4px; }
.brand:hover { text-decoration: none; color: var(--sand); }
.brand.big { font-size: 32px; padding: 0 0 6px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: var(--sand-muted); padding: 10px 12px; border-radius: 12px; min-height: 44px; }
.sidebar nav a:hover { background: var(--moss); color: var(--sand); text-decoration: none; }
.sidebar nav a.active { background: var(--moss); color: var(--sand); font-weight: 600; }
.sidebar nav a.active svg { color: var(--clay); }
.badge { margin-left: auto; background: var(--clay); color: var(--forest); font-size: 12px; border-radius: 99px; padding: 1px 8px; }
.me { border-top: 1px solid var(--line); padding: 14px 10px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.me strong { display: block; font-size: 14px; }
.me small { color: var(--sand-muted); font-size: 12px; }
.content { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1200px; }
.test-banner { background: var(--vanilla); color: var(--forest); font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 10px; margin-bottom: 16px; }

/* Cartes, stats */
.card { background: var(--moss); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--moss); border-radius: var(--radius); padding: 16px; }
.stat .value { font-size: 28px; font-weight: 800; }
.stat .label { color: var(--sand-muted); font-size: 13px; }
.stat.accent .value { color: var(--vanilla); }
.question-today { background: var(--clay); color: var(--forest); }
.question-today small { font-weight: 700; letter-spacing: .6px; font-size: 12px; }
.question-today p { font-size: 20px; font-weight: 700; margin: 6px 0 8px; }
.question-today .link { color: var(--forest); font-weight: 600; }

/* Tableaux */
.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--vanilla); padding: 12px 14px; border-bottom: 1px solid var(--line); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.removed td { opacity: .5; }
.who { display: flex; align-items: center; gap: 10px; color: var(--sand); font-weight: 600; }
.who img, .who .ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--moss-light); flex-shrink: 0; }
.who small { display: block; font-weight: 400; color: var(--sand-muted); font-size: 12px; }
audio { height: 34px; max-width: 260px; vertical-align: middle; }

/* Pastilles, boutons */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--moss-light); color: var(--sand); }
.pill.ok { background: rgba(127, 200, 160, .18); color: var(--ok); }
.pill.danger { background: rgba(240, 138, 108, .18); color: var(--danger); }
.pill.warn { background: rgba(232, 196, 106, .18); color: var(--vanilla); }
.pill.muted { color: var(--sand-muted); }
.pill.accent { background: var(--vanilla); color: var(--forest); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--moss-light); color: var(--sand); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--sand-muted); text-decoration: none; color: var(--sand); }
.btn.primary { background: var(--clay); border-color: var(--clay); color: var(--forest); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--vanilla); outline-offset: 2px; }
form.inline { display: inline; margin: 0 4px 4px 0; }
.link { font-weight: 600; }

/* Formulaires */
input, select { background: var(--forest); color: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; min-height: 44px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { flex: 1; min-width: 200px; }
.form-grid { display: grid; gap: 8px; max-width: 640px; }
.form-grid label { font-size: 13px; color: var(--sand-muted); }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; background: rgba(127, 200, 160, .15); color: var(--ok); }
.flash.error { background: rgba(240, 138, 108, .15); color: var(--danger); }
.flash.warn { background: rgba(232, 196, 106, .15); color: var(--vanilla); }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 16px 0; }

/* Profil */
.profile-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 24px; margin: 14px 0 0; }
.facts dt { font-size: 12px; color: var(--sand-muted); }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.bio { white-space: normal; margin: 0 0 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-grid.dense { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo { padding: 0; overflow: hidden; margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--moss-light); }
.photo figcaption { padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* Connexion */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--moss); padding: 28px; border-radius: 22px; display: grid; gap: 10px; }
.login-card label { font-size: 13px; color: var(--sand-muted); margin-top: 6px; }
.login-card .btn { margin-top: 10px; min-height: 48px; }

/* Mobile */
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar nav a span { font-size: 13px; }
  .brand { padding-bottom: 10px; }
  .content { padding: 20px 16px 48px; }
}

/* Formulaires étendus (réglages, membre, régions) */
textarea { background: var(--forest); color: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; width: 100%; resize: vertical; }
input[type="color"] { width: 56px; height: 44px; padding: 4px; cursor: pointer; }
input[type="file"] { min-height: auto; padding: 8px; }
input:disabled, textarea:disabled, select:disabled { opacity: .6; }
.settings-form { display: grid; gap: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 20px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 13px; color: var(--sand-muted); }
.field.wide { grid-column: 1 / -1; }
.field input { width: 100%; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--sand); font-size: 15px; min-height: 44px; cursor: pointer; }
label.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--clay); }
.form-grid textarea, .form-grid input, .form-grid select { width: 100%; }
.form-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: none; gap: 12px 18px; }
.form-grid.two > div { display: grid; gap: 6px; }
.form-grid .span2 { grid-column: 1 / -1; }
.edit-box summary { cursor: pointer; min-height: 32px; list-style-position: inside; }
.edit-box[open] summary { margin-bottom: 14px; }
.edit-box hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.wrap-actions { align-items: center; }
.wrap-actions input { min-height: 32px; padding: 4px 10px; }
.upload-row { align-items: center; margin-top: 12px; }
.upload-row label { font-weight: 600; }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.region { padding: 0; overflow: hidden; }
.region img, .region .ph-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--moss-light); }
.region-body { padding: 12px; display: grid; gap: 6px; }
.region-preview { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }

/* ── Corrections de mise en page (réglages, fiche membre, régions) ── */
/* Réglages : sélecteurs de couleur compacts, code à côté ; bouton d'enregistrement à sa taille */
.field input[type="color"] { width: 56px; flex: none; }
.field .row { flex-wrap: nowrap; }
.settings-form > .btn.primary { justify-self: start; min-width: 240px; min-height: 48px; position: sticky; bottom: 16px; }
/* Fiche membre : les informations s'étalent sur plusieurs colonnes */
.profile-head > div:first-child { flex: 1 1 420px; min-width: 0; }
.profile-head .actions { flex: 0 0 auto; }
.edit-box summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--moss-light); border: 1px solid var(--line); list-style: none; }
.edit-box summary::-webkit-details-marker { display: none; }
.edit-box summary::before { content: "✎"; color: var(--clay); }
.edit-box[open] summary { background: var(--clay); color: var(--forest); border-color: var(--clay); }
.edit-box[open] summary::before { color: var(--forest); }
/* Grilles de cartes : pas de marge en plus de l'espacement de la grille, hauteurs alignées */
.photo-grid > .card, .region-grid > .card { margin-bottom: 0; }
.photo img, .region img, .region .ph-img { background: var(--moss-light); }
.region { display: flex; flex-direction: column; }
.region-body { flex: 1; align-content: start; }
.region-body .row { margin-top: auto; padding-top: 4px; }
.region-body .pill { justify-self: start; }
.push-status { padding: 12px 16px; font-size: 14px; }

/* Statistiques */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 18px; }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar .b { width: 100%; max-width: 28px; background: var(--clay); border-radius: 6px 6px 2px 2px; }
.bar .v { font-size: 11px; color: var(--sand-muted); min-height: 14px; }
.bar .k { font-size: 10px; color: var(--sand-muted); writing-mode: vertical-rl; transform: rotate(180deg); height: 34px; }
.hbar { display: grid; grid-template-columns: 160px 1fr 50px; align-items: center; gap: 12px; padding: 6px 0; }
.hbar .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 12px; background: var(--moss-light); border-radius: 99px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--vanilla); border-radius: 99px; }
.hbar b { text-align: right; }

/* Page Premium : liste de contrôle et longues adresses */
.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.checklist li { margin: 4px 0; }
.small-text code { word-break: break-all; }

/* ══ Modernisation 2026-10 : navigation mobile, tableau de bord, photos ══════════════ */
body { -webkit-font-smoothing: antialiased; }
h1 { font-size: 30px; letter-spacing: -0.6px; }
.lead { margin: -8px 0 18px; max-width: 760px; }

/* Logo « vad|||be » */
.brand { display: flex; align-items: baseline; gap: 0; font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-weight: 900; font-size: 26px; letter-spacing: -0.6px; padding: 4px 10px 18px; }
.brand .bars { display: inline-flex; align-items: center; gap: .07em; height: .78em; margin: 0 .05em; align-self: center; transform: translateY(.04em); }
.brand .bars b { display: block; width: .11em; border-radius: .1em; background: #FD672C; height: .42em; }
.brand .bars b:nth-child(2) { height: .78em; }
.brand > span { font-family: -apple-system, system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); background: var(--clay); border-radius: 99px; padding: 2px 7px; margin-left: 8px; align-self: center; }

/* Barre latérale */
.sidebar { padding: 18px 12px 14px; overflow-y: auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.close-nav { display: none; }
.sidebar nav a { font-weight: 500; transition: background .15s, color .15s; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(224,122,79,.18), rgba(224,122,79,.04)); box-shadow: inset 3px 0 0 var(--clay); }
.badge.soft { background: var(--vanilla); }
.me { align-items: center; justify-content: flex-start; gap: 10px; }
.me > div { flex: 1; min-width: 0; }
.me strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--sand-muted); }
.icon-link:hover { background: var(--moss); color: var(--clay); text-decoration: none; }
.topbar, .nav-backdrop { display: none; }

/* Avatars */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--moss-light); display: inline-grid; place-items: center; }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.avatar.initial { background: linear-gradient(135deg, #2E5546, #1F4034); color: var(--sand); font-weight: 800; font-size: 16px; box-shadow: inset 0 0 0 1px rgba(243,235,221,.08); }
.who > span { display: flex; flex-direction: column; min-width: 0; }
.who small { margin-top: 1px; }

/* Cartes de chiffres */
.stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid transparent; color: var(--sand); transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--line); text-decoration: none; color: var(--sand); transform: translateY(-1px); }
.stat-icon { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--moss-light); color: var(--clay); }
.stat-icon svg { width: 20px; height: 20px; }
.stat .value { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .label { font-size: 13px; line-height: 1.3; }
.stat.accent .stat-icon { color: var(--vanilla); }
.stat.alert { border-color: rgba(240,138,108,.45); background: linear-gradient(135deg, rgba(224,122,79,.16), var(--moss) 70%); }
.stat.alert .value { color: var(--clay); }
.question-today { border-radius: 22px; padding: 22px 24px; background: linear-gradient(135deg, #E07A4F, #D06A41); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 28px; }
.section-head h2 { margin: 0 0 12px; }

/* Tableau → cartes sur mobile */
.table-wrap { border: 1px solid var(--line); background: var(--moss); }
.table-cards th { background: rgba(11,26,20,.25); }
.table-cards tbody tr { transition: background .12s; }
.table-cards tbody tr:hover { background: rgba(243,235,221,.03); }
.table-cards td { padding: 12px 14px; }
.pill { padding: 3px 10px; }

/* Onglets */
.photo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--forest-deep); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--sand-muted); font-weight: 600; white-space: nowrap; }
.tabs a:hover { color: var(--sand); text-decoration: none; }
.tabs a.active { background: var(--moss-light); color: var(--sand); }
.tabs a b { font-size: 12px; background: rgba(243,235,221,.08); border-radius: 99px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.tabs a.active b { background: var(--clay); color: var(--forest); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.ok { background: rgba(127,200,160,.14); border-color: rgba(127,200,160,.5); color: var(--ok); }
.btn.ok:hover { background: rgba(127,200,160,.24); color: var(--ok); border-color: var(--ok); }
.btn.danger:hover { background: rgba(240,138,108,.12); color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .55; cursor: progress; }

/* Grille de photos à modérer */
.photo-grid.moderation { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.moderation .photo { border: 1px solid var(--line); display: flex; flex-direction: column; transition: opacity .2s, transform .2s; }
.moderation .photo.leaving { opacity: 0; transform: scale(.94); }
.photo-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--moss-light); cursor: zoom-in; }
.photo-open img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; transition: transform .25s; }
.photo-open:hover img { transform: scale(1.03); }
.photo-open { overflow: hidden; }
.photo-open .zoom { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(11,26,20,.72); color: var(--sand); display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.photo-open:hover .zoom, .photo-open:focus-visible .zoom { opacity: 1; }
.photo-open .tag { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(11,26,20,.75); color: var(--sand); }
.photo-open .tag.ok { left: auto; right: 8px; color: var(--ok); }
.photo-open .tag svg { width: 12px; height: 12px; }
.moderation figcaption { padding: 12px; gap: 10px; flex: 1; }
.moderation .who { font-size: 14px; }
.photo-actions { display: flex; gap: 6px; margin-top: auto; }
.photo-actions form { flex: 1; display: flex; }
.photo-actions form:last-child { flex: 0 0 auto; }
.photo-actions .btn { width: 100%; }
.photo-actions .btn.danger span { display: none; }
.photo-actions form:only-child { flex: 1; }
.photo-actions form:only-child .btn.danger span { display: inline; }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 40px 20px; color: var(--sand-muted); text-align: center; }
.empty svg { width: 36px; height: 36px; color: var(--ok); }
.empty p { margin: 0; }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(6,14,11,.94); display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center; padding: 12px; }
.lightbox[hidden] { display: none; }
body.lb-open { overflow: hidden; }
.lb-top { grid-column: 1 / -1; width: 100%; display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px; }
.lb-name { font-weight: 700; font-size: 16px; color: var(--sand); }
.lb-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.lb-img { grid-column: 2; grid-row: 2; max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(243,235,221,.18); background: rgba(26,51,41,.85); color: var(--sand); display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: var(--moss-light); }
.lb-btn[hidden] { display: none; }
.lb-prev { grid-column: 1; grid-row: 2; }
.lb-next { grid-column: 3; grid-row: 2; }
.lb-actions { grid-column: 1 / -1; grid-row: 3; display: flex; gap: 10px; justify-content: center; padding-top: 14px; flex-wrap: wrap; }
.lb-actions .btn { min-height: 46px; padding: 0 18px; }
.lb-actions .btn[hidden] { display: none; }

/* Message temporaire */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s, transform .2s; background: var(--sand); color: var(--forest); font-weight: 600; padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Mobile ── */
@media (max-width: 920px) {
  .shell { flex-direction: column; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; background: rgba(11,26,20,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar .brand { padding: 0; font-size: 22px; }
  .topbar-title { margin-left: auto; color: var(--sand-muted); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .menu-btn, .close-nav { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--moss); color: var(--sand); display: grid; place-items: center; cursor: pointer; flex: none; }
  .menu-btn svg, .close-nav svg { width: 20px; height: 20px; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; width: min(300px, 86vw); height: 100%; transform: translateX(-102%); transition: transform .25s ease; border-right: 1px solid var(--line); border-bottom: 0; padding-top: max(14px, env(safe-area-inset-top)); }
  .sidebar nav { flex-direction: column; flex-wrap: nowrap; }
  .sidebar nav a span { font-size: 15px; }
  .sidebar .brand { padding-bottom: 10px; }
  .close-nav { display: grid; }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.4); }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .content { padding: 18px 14px 48px; }
  .content > h1 { font-size: 26px; margin-bottom: 14px; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 14px; row-gap: 2px; }
  .stat-icon { grid-row: auto; width: 34px; height: 34px; border-radius: 11px; margin-bottom: 8px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat .value { font-size: 22px; }
  .stat .label { font-size: 12px; }
  .question-today p { font-size: 18px; }
  /* Tableau en cartes : une carte par membre */
  .table-wrap.card { background: transparent; border: 0; overflow: visible; }
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody { display: block; }
  .table-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; background: var(--moss); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px; }
  .table-cards td { display: block; padding: 0; border: 0; font-size: 14px; }
  .table-cards td.cell-main { grid-column: 1 / -1; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
  .table-cards td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--vanilla); margin-bottom: 2px; }
  .photo-grid.moderation { grid-template-columns: 1fr 1fr; gap: 10px; }
  .moderation figcaption { padding: 10px; }
  .photo-actions .btn.small { min-height: 40px; }
  .photo-open .zoom { opacity: 1; width: 30px; height: 30px; }
  .photo-toolbar { flex-direction: column; align-items: stretch; }
  .photo-toolbar .btn { width: 100%; }
  .photo-toolbar form { margin: 0; }
  .tabs { display: flex; }
  .tabs a { flex: 1; justify-content: center; padding: 0 8px; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding: 10px; }
  .lb-img { grid-column: 1; max-height: calc(100vh - 190px); }
  .lb-prev, .lb-next { grid-row: 2; grid-column: 1; align-self: center; z-index: 1; width: 42px; height: 42px; }
  .lb-prev { justify-self: start; } .lb-next { justify-self: end; }
  .lb-meta { display: none; }
  .lb-actions .btn { flex: 1; }
}
body.lb-open .toast { bottom: 96px; }

/* ── Fiche membre (2026-10) ── */
.back-link{display:inline-block;margin:-6px 0 12px}
.avatar.xl{width:120px;height:120px;font-size:44px}
.member-hero{display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:start;padding:20px}
.hero-photo{position:relative;width:150px;aspect-ratio:4/5;border-radius:20px;overflow:hidden;border:0;padding:0;background:var(--moss-light);cursor:zoom-in;display:block}
.hero-photo img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s}
.hero-photo:hover img{transform:scale(1.04)}
.hero-photo.empty{display:grid;place-items:center;cursor:default}
.hero-photo .zoom{position:absolute;right:8px;bottom:8px;width:32px;height:32px;border-radius:50%;background:rgba(11,26,20,.72);color:var(--sand);display:grid;place-items:center}
.hero-main{min-width:0;display:grid;gap:10px;align-content:start}
.hero-name{margin:0;font-size:28px;letter-spacing:-.5px;line-height:1.1;word-break:break-word}
.hero-name span{font-weight:600;color:var(--sand-muted)}
.hero-sub{margin:0}
.hero-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:4px}
.hero-stats div{background:var(--forest);border:1px solid var(--line);border-radius:14px;padding:10px 12px;display:grid}
.hero-stats b{font-size:20px;line-height:1.1}
.hero-stats span{font-size:11.5px;color:var(--sand-muted)}
.hero-actions{display:grid;gap:8px;min-width:210px}
.hero-actions form.inline{margin:0}
.member-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:14px;align-items:start}
.member-main,.member-side{display:grid;gap:14px;min-width:0}
.member-main > .card,.member-side > .card,.member-main > .cols{margin:0}
.card-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:12px}
.card-head h3{margin:0}
.card-foot{margin-top:12px}
.cols.tight{margin-top:0}
.photo-grid.member{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.photo-grid.member .photo{margin:0;display:flex;flex-direction:column;gap:6px;background:none}
.photo-grid.member .photo-open{border-radius:14px}
.photo-grid.member .photo-actions{display:flex;gap:6px;flex-wrap:wrap}
.photo-grid.member .photo-actions form{flex:1;margin:0;display:flex}
.photo-grid.member .photo-actions .btn{width:100%}
.upload-row{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.answer-list,.report-list{list-style:none;margin:0;padding:0;display:grid}
.answer-list li,.report-list li{padding:12px 0;border-bottom:1px solid var(--line);display:grid;gap:8px}
.answer-list li:last-child,.report-list li:last-child{border-bottom:0;padding-bottom:0}
.answer-list li:first-child,.report-list li:first-child{padding-top:0}
.answer-list li.removed{opacity:.5}
.answer-q{font-weight:600;line-height:1.35}
.answer-q .date{display:inline-block;font-size:11px;font-weight:700;color:var(--vanilla);background:rgba(232,196,106,.12);border-radius:8px;padding:2px 7px;margin-right:8px}
.answer-play{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.answer-play form.inline{margin:0}
.report-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.report-list p{margin:0;font-size:13px}
.facts.stacked{grid-template-columns:1fr;gap:10px;margin:0}
.premium-form input[type=number]{width:84px}
.premium-form{margin:10px 0}
.member-side .edit-box .form-grid{max-width:none}
.stack-actions{display:grid;gap:8px}
.stack-actions form.inline{margin:0}
.pw-form{display:flex;gap:8px}
.pw-form input{flex:1;min-width:0;min-height:36px;padding:6px 10px}
@media (max-width:1100px){
  .member-grid{grid-template-columns:1fr}
}
@media (max-width:760px){
  .member-hero{grid-template-columns:1fr;justify-items:start}
  .hero-photo{width:100%;max-width:260px}
  .hero-actions{min-width:0;width:100%}
  .hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-name{font-size:24px}
  .photo-grid.member{grid-template-columns:1fr 1fr}
}
.photo-grid.member .photo-actions{flex-wrap:nowrap;gap:5px}
.photo-grid.member .photo-actions form.inline{margin:0;min-width:0}
.photo-grid.member .photo-actions .btn{padding:0 6px;font-size:12px;min-height:32px}
.photo-grid.member .photo figcaption.photo-actions{flex-direction:row;padding:0}
.member-main > *,.member-side > *{min-width:0}
.cols.tight{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))}
.member-main audio{max-width:100%}
