/* ========================================================================
   PHOTOS-MISSION FSRDC - Design Institutionnel Luxueux
   Direction : clair ivoire/marine/or premium · sombre noir profond élégant
   ======================================================================== */

:root {
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;

  /* === Surfaces & fonds === */
  --bg: #f6f3ec;                     /* ivoire chaud */
  --bg-2: #efeae0;                   /* sable */
  --bg-3: #fefcf7;                   /* crème pure */
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --surface-3: #f1ede4;
  --surface-hover: #f6f1e7;

  /* === Bordures === */
  --border: #e8e1d1;
  --border-strong: #d6cdb8;
  --hairline: #efe9da;               /* filets ultra-fins */

  /* === Texte === */
  --text: #1a2238;                   /* bleu nuit, jamais noir pur */
  --text-soft: #4d5872;
  --text-faint: #8c93a8;
  --text-on-dark: #f6f3ec;

  /* === Bleu marine institutionnel === */
  --primary: #0a1f4d;                /* marine profond */
  --primary-soft: #16336e;
  --primary-deep: #061232;
  --primary-ghost: rgba(10,31,77,.06);
  --primary-tint: rgba(10,31,77,.04);

  /* === Or véritable (pas jaune criard) === */
  --gold: #a87f2e;                   /* or antique */
  --gold-soft: #c9a253;
  --gold-deep: #7d5d22;
  --gold-ghost: rgba(168,127,46,.08);
  --gold-tint: rgba(201,162,83,.12);

  /* === États === */
  --success: #1d6f4e; --success-bg: #e3f1ea;
  --warning: #8a5a0e; --warning-bg: #fbf2dc;
  --danger: #962b25; --danger-bg: #f7e2df;
  --info: #0a1f4d; --info-bg: #e6e9f1;

  /* === Ombres signature (multi-couches très faibles = premium) === */
  --shadow-xs: 0 1px 1px rgba(26,34,56,.03), 0 1px 2px rgba(26,34,56,.04);
  --shadow-sm: 0 1px 2px rgba(26,34,56,.04), 0 3px 8px rgba(26,34,56,.05);
  --shadow-md: 0 2px 6px rgba(26,34,56,.04), 0 12px 28px rgba(26,34,56,.07);
  --shadow-lg: 0 6px 18px rgba(26,34,56,.06), 0 28px 60px rgba(26,34,56,.12);
  --shadow-xl: 0 14px 40px rgba(26,34,56,.10), 0 40px 90px rgba(26,34,56,.18);
  --shadow-primary: 0 8px 24px rgba(10,31,77,.20);
  --shadow-gold: 0 8px 22px rgba(168,127,46,.22);
  --shadow-inner: inset 0 1px 0 rgba(255,255,255,.6);

  /* === Géométrie === */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --sidebar-w: 276px;

  /* === Mouvement === */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --t-xfast: .12s;
  --t-fast: .2s;
  --t-med: .35s;
  --t-slow: .6s;
}

[data-theme="dark"] {
  /* Noir profond élégant, pas tech-bleu */
  --bg: #0d0e10;
  --bg-2: #0a0b0d;
  --bg-3: #131418;
  --surface: #16181d;
  --surface-2: #1c1f25;
  --surface-3: #22262d;
  --surface-hover: #20242b;

  --border: #2a2e36;
  --border-strong: #3b414c;
  --hairline: #21242a;

  --text: #f3ede0;                   /* ivoire chaud, pas blanc bleu */
  --text-soft: #b8b0a0;
  --text-faint: #79756d;

  --primary: #8da9e6;                /* bleu lumineux mais doux */
  --primary-soft: #a3b9ed;
  --primary-deep: #6989cb;
  --primary-ghost: rgba(141,169,230,.10);
  --primary-tint: rgba(141,169,230,.06);

  --gold: #d4a754;                   /* or qui brille dans le sombre */
  --gold-soft: #e5bc6f;
  --gold-deep: #b08938;
  --gold-ghost: rgba(212,167,84,.10);
  --gold-tint: rgba(212,167,84,.14);

  --success: #5fc89e; --success-bg: rgba(29,111,78,.18);
  --warning: #e0a653; --warning-bg: rgba(138,90,14,.22);
  --danger: #e6786f; --danger-bg: rgba(150,43,37,.22);
  --info: #8da9e6; --info-bg: rgba(141,169,230,.13);

  --shadow-xs: 0 1px 1px rgba(0,0,0,.4);
  --shadow-sm: 0 2px 4px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.4);
  --shadow-md: 0 4px 10px rgba(0,0,0,.5), 0 14px 32px rgba(0,0,0,.45);
  --shadow-lg: 0 10px 26px rgba(0,0,0,.55), 0 30px 68px rgba(0,0,0,.6);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.65), 0 50px 100px rgba(0,0,0,.7);
  --shadow-primary: 0 10px 30px rgba(0,0,0,.55);
  --shadow-gold: 0 10px 28px rgba(212,167,84,.20);
  --shadow-inner: inset 0 1px 0 rgba(255,255,255,.04);
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(ellipse 85% 60% at 92% -10%, var(--gold-tint), transparent 65%),
    radial-gradient(ellipse 70% 50% at 0% 105%, var(--primary-tint), transparent 60%);
  background-attachment: fixed;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.018em;
  color: var(--text);
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--primary); text-decoration: none; }
::selection { background: var(--gold-tint); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== Écran d'auth ===== */
.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
}
.auth-screen::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 20% 25%, var(--primary-ghost), transparent 70%),
    radial-gradient(ellipse 45% 35% at 85% 75%, var(--gold-ghost), transparent 70%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: var(--shadow-xl);
  animation: authIn .7s var(--ease-out);
}
.auth-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(140deg, var(--gold-soft), transparent 40%, transparent 60%, var(--primary) 110%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .4;
  pointer-events: none;
}
@keyframes authIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.auth-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.auth-logo img { max-width: 180px; height: auto; }
.auth-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 4px;
}
.auth-sub {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 32px;
}
.auth-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  display: none;
  border-left: 3px solid var(--danger);
}
.auth-error.show { display: block; animation: shake .4s; }
@keyframes shake { 0%,100%{transform:none} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* ===== Champs de formulaire ===== */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea { background: var(--surface-2); }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--border-strong); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ghost);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field input[disabled], .field select[disabled] { opacity: .55; cursor: not-allowed; }

/* ===== Boutons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .01em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease),
              background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 50%);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
  pointer-events: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
  color: #fff;
  box-shadow: var(--shadow-primary), var(--shadow-inner);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(10,31,77,.28), var(--shadow-inner); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #2a1f08;
  box-shadow: var(--shadow-gold), var(--shadow-inner);
}
.btn-gold:hover { box-shadow: 0 12px 32px rgba(168,127,46,.32), var(--shadow-inner); }
.btn-ghost {
  background: var(--surface);
  color: var(--text-soft);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-faint);
}
.btn-danger {
  background: var(--danger); color: #fff;
  box-shadow: 0 8px 20px rgba(150,43,37,.25), var(--shadow-inner);
}
.btn-success {
  background: var(--success); color: #fff;
  box-shadow: 0 8px 20px rgba(29,111,78,.25), var(--shadow-inner);
}
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] {
  opacity: .45; cursor: not-allowed;
  transform: none !important; box-shadow: none !important;
}

/* ===== Shell ===== */
.shell { display: none; }
.shell.active {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100dvh;
  animation: fade var(--t-med) var(--ease);
}
.main { display: flex; flex-direction: column; min-width: 0; }

/* ===== Sidebar ===== */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  position: relative;
}
.sidebar::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-tint) 40%, var(--gold-tint) 60%, transparent);
  opacity: .6;
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 6px 12px 24px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
}
.brand-logo {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: center;
}
.brand-logo img {
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
}
.brand-app {
  padding: 18px 12px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  flex-shrink: 0;
  background: linear-gradient(140deg, var(--primary-soft), var(--primary-deep));
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  box-shadow: var(--shadow-primary);
  overflow: hidden;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  display: block;
  line-height: 1.1;
  letter-spacing: -.015em;
}
.brand-text span {
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-section {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 22px 14px 10px;
}
.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: transparent;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.nav-btn svg {
  width: 19px; height: 19px;
  flex-shrink: 0;
  stroke-width: 1.7;
  transition: transform var(--t-med) var(--ease);
}
.nav-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.nav-btn:hover svg { transform: scale(1.08); }
.nav-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.nav-btn.active svg { color: var(--gold-soft); }
.nav-btn[disabled] { opacity: .35; cursor: not-allowed; pointer-events: none; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-foot .actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  flex: 1;
  min-width: 0;
  text-align: left;
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.user-chip:hover {
  border-color: var(--gold-soft);
  background: var(--surface-hover);
}
.user-chip .u-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip .u-role {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: .03em;
}
.user-chip > div:last-child {
  min-width: 0;
  overflow: hidden;
}
.identity-mini {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-soft);
  position: relative;
  overflow: hidden;
}
.identity-mini::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--gold-soft), var(--gold));
  border-radius: 2px;
}
.identity-mini strong {
  color: var(--text);
  display: block;
  font-size: 13.5px;
  margin: 2px 0;
  font-family: var(--font-display);
  font-weight: 500;
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 36px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-title h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.topbar-title p {
  font-size: 13.5px;
  color: var(--text-faint);
  margin-top: 3px;
  font-weight: 400;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: translateY(-1px);
  border-color: var(--border-strong);
}
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.8; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-deep) 55%, var(--gold-deep));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  box-shadow: var(--shadow-inner);
}

/* ===== Content ===== */
.content {
  padding: 36px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}
.view { display: none; }
.view.active {
  display: block;
  animation: viewIn var(--t-slow) var(--ease-out);
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
/* Cascades pour les enfants des vues actives */
.view.active .metric,
.view.active .photo-card,
.view.active .wf-step,
.view.active .role-card,
.view.active .access-card,
.view.active .panel {
  animation: cardRise .55s var(--ease-out) backwards;
}
.view.active .metric:nth-child(1), .view.active .photo-card:nth-child(1), .view.active .wf-step:nth-child(1), .view.active .role-card:nth-child(1), .view.active .access-card:nth-child(1) { animation-delay: .04s; }
.view.active .metric:nth-child(2), .view.active .photo-card:nth-child(2), .view.active .wf-step:nth-child(2), .view.active .role-card:nth-child(2), .view.active .access-card:nth-child(2) { animation-delay: .09s; }
.view.active .metric:nth-child(3), .view.active .photo-card:nth-child(3), .view.active .wf-step:nth-child(3), .view.active .role-card:nth-child(3), .view.active .access-card:nth-child(3) { animation-delay: .14s; }
.view.active .metric:nth-child(4), .view.active .photo-card:nth-child(4), .view.active .wf-step:nth-child(4), .view.active .role-card:nth-child(4), .view.active .access-card:nth-child(4) { animation-delay: .19s; }
.view.active .metric:nth-child(5), .view.active .photo-card:nth-child(5), .view.active .access-card:nth-child(5) { animation-delay: .24s; }
.view.active .photo-card:nth-child(n+6), .view.active .access-card:nth-child(n+6), .view.active .metric:nth-child(n+6) { animation-delay: .28s; }

/* ===== Section headers ===== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.section-head p {
  color: var(--text-faint);
  font-size: 14px;
  margin-top: 4px;
  font-weight: 400;
}

/* ===== Workflow steps ===== */
.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}
.wf-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.wf-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wf-step .wf-num {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--primary);
  font-weight: 500;
  font-style: italic;
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}
.wf-step .wf-num::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  margin-top: 8px;
  border-radius: 2px;
}
.wf-step h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}
.wf-step p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ===== Metrics ===== */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.metric:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.metric::before {
  content: "";
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 3px;
  background: linear-gradient(var(--primary), var(--primary-soft));
  border-radius: 0 3px 3px 0;
}
.metric::after {
  content: "";
  position: absolute;
  right: -28px; top: -28px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--primary-ghost);
  transition: transform var(--t-slow) var(--ease);
}
.metric:hover::after { transform: scale(1.3); }
.metric .m-label {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.metric .m-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  margin-top: 10px;
  letter-spacing: -.025em;
  line-height: 1;
}
.metric .m-foot {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 6px;
}
.metric.accent-gold::before { background: linear-gradient(var(--gold), var(--gold-soft)); }
.metric.accent-gold::after { background: var(--gold-ghost); }
.metric.accent-warn::before { background: var(--warning); }
.metric.accent-warn::after { background: var(--warning-bg); }
.metric.accent-success::before { background: var(--success); }
.metric.accent-success::after { background: var(--success-bg); }
.metric.accent-danger::before { background: var(--danger); }
.metric.accent-danger::after { background: var(--danger-bg); }

/* ===== Panels ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-med) var(--ease);
  overflow: hidden;
}
.panel:hover { box-shadow: var(--shadow-sm); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--hairline);
}
.panel-head h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.015em;
}
.panel-body { padding: 24px; }
.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-bottom: 30px;
}
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Photo grid & cards ===== */
.toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}
.search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
[data-theme="dark"] .search-box input { background: var(--surface-2); }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ghost); }
.search-box svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-faint);
}
.toolbar select {
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease);
}
[data-theme="dark"] .toolbar select { background: var(--surface-2); }
.toolbar select:hover { border-color: var(--border-strong); }
.view-toggle {
  display: inline-flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
[data-theme="dark"] .view-toggle { background: var(--surface-2); }
.view-toggle button {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-faint);
  font-size: 13px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.view-toggle button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 20px;
}
.photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.photo-thumb {
  aspect-ratio: 4 / 3;
  background: var(--surface-3);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.photo-card:hover .photo-thumb img { transform: scale(1.06); }
.photo-thumb .ph-empty {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
}
.photo-thumb .ph-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
}
.photo-thumb .ph-fav {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  color: var(--text-faint);
  border: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.photo-thumb .ph-fav:hover { transform: scale(1.1); color: var(--gold); }
.photo-thumb .ph-fav.on { color: var(--gold); background: rgba(255,255,255,.95); }
.photo-meta { padding: 16px; }
.pm-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-sub {
  font-size: 12px;
  color: var(--text-faint);
}
.pm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.warn { background: var(--warning-bg); color: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.neutral { background: var(--surface-3); color: var(--text-soft); }
.badge.gold { background: var(--gold-tint); color: var(--gold-deep); }
.tag-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .01em;
}

/* ===== Liste photos (vue liste) ===== */
.photo-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.photo-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 16px;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--t-fast) var(--ease);
}
.photo-row:last-child { border-bottom: none; }
.photo-row:hover { background: var(--surface-hover); }
.photo-row .pr-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
  flex-shrink: 0;
}
.photo-row .pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-row .pr-title { font-weight: 600; font-size: 14px; }
.photo-row .pr-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* ===== Uploader ===== */
.uploader {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
  background: var(--bg-3);
}
[data-theme="dark"] .uploader { background: var(--surface-2); }
.uploader:hover, .uploader.drag {
  border-color: var(--primary);
  background: var(--primary-tint);
}
.uploader svg { width: 36px; height: 36px; color: var(--text-faint); margin-bottom: 10px; }
.uploader p { color: var(--text-soft); }
.uploader strong { color: var(--text); font-weight: 600; }
.up-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 8px;
}

/* ===== Modales ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,10,20,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 24px;
}
.modal-overlay.show { display: grid; animation: fade var(--t-med) var(--ease); }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(580px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--t-med) var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
  z-index: 2;
}
.modal-head h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.015em;
}
.modal-body { padding: 26px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .field { margin: 0; }
.form-grid .full { grid-column: 1 / -1; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--hairline);
  position: sticky;
  bottom: 0;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.check-row label { font-size: 13.5px; color: var(--text-soft); }

/* ===== Toasts ===== */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 400px;
  font-size: 13.5px;
  animation: slidein .35s var(--ease-out);
}
@keyframes slidein {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}
.toast.ok { border-left-color: var(--success); }
.toast.warn { border-left-color: var(--warning); }
.toast.err { border-left-color: var(--danger); }

/* ===== Lightbox ===== */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(6,10,20,.92);
  display: none;
  place-items: center;
  z-index: 150;
  padding: 36px;
}
.lb.show { display: grid; animation: fade var(--t-med) var(--ease); }
.lb img { max-width: 100%; max-height: 100%; border-radius: var(--radius); box-shadow: var(--shadow-xl); }
.lb .x, .lb .nav, .lb .dl {
  position: absolute;
  background: rgba(255,255,255,.10);
  border: none;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
}
.lb .x:hover, .lb .nav:hover, .lb .dl:hover {
  background: rgba(255,255,255,.20);
  transform: scale(1.05);
}
.lb .x { top: 24px; right: 28px; width: 46px; height: 46px; font-size: 22px; }
.lb .nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 28px; }
.lb .nav.prev { left: 24px; }
.lb .nav.next { right: 24px; }
.lb .lb-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 40px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
}

/* ===== Empty states ===== */
.empty {
  text-align: center;
  padding: 60px 30px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty svg { width: 48px; height: 48px; opacity: .35; margin-bottom: 12px; }
.empty p { font-size: 14px; }

/* ===== Spinner ===== */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Roles & access ===== */
.role-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.role-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.role-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary);
}
.role-card.r-valid::before { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.role-card.r-contrib::before { background: var(--success); }
.role-card.r-lect::before { background: var(--text-faint); }
.role-card strong { font-family: var(--font-display); font-size: 16px; font-weight: 500; }
.role-card p { font-size: 12.5px; color: var(--text-soft); margin-top: 8px; line-height: 1.55; }

.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.access-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.access-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.access-card .ac-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.access-card .ac-name { font-weight: 600; font-size: 14.5px; }
.access-card .ac-mail { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.access-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.access-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

/* ===== Activités ===== */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.activity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.activity-card h4 { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.activity-card .a-sub { font-size: 12.5px; color: var(--text-faint); margin-bottom: 14px; }
.activity-card .a-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-soft);
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

/* ===== Chart placeholders (canvas wrappers) ===== */
.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}
.chart-box h3 {
  font-size: 15.5px;
  font-weight: 500;
  margin-bottom: 14px;
}
.chart-box canvas { max-width: 100%; }

/* ===== Menu mobile (scrim + slide) ===== */
.menu-toggle { display: none; }
.sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(6,10,20,.5); z-index: 30; backdrop-filter: blur(4px); }
.sidebar-scrim.show { display: block; animation: fade var(--t-fast); }

@media (max-width: 980px) {
  .shell.active { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform var(--t-med) var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: grid; }
  .topbar { padding: 18px 22px; }
  .content { padding: 22px; }
  .topbar-title h2 { font-size: 22px; }
}

/* ===== Petits utilitaires ===== */
.hidden { display: none !important; }
.muted { color: var(--text-faint); }
hr { border: none; height: 1px; background: var(--hairline); margin: 18px 0; }

/* ===== Effet brillant subtil sur survol (or-élégant) ===== */
.gold-shine {
  position: relative;
  overflow: hidden;
}
.gold-shine::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.18), transparent);
  transition: left 1s var(--ease);
}
.gold-shine:hover::after { left: 130%; }

/* ===== Classes JS supplémentaires ===== */

/* Auth page extras */
.auth-wrap { display: contents; }
.auth-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--gold-tint);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.auth-flag { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }
.auth-flag span { width: 28px; height: 4px; border-radius: 2px; }
.auth-flag span:nth-child(1) { background: #007aff; }
.auth-flag span:nth-child(2) { background: #f7d12a; }
.auth-flag span:nth-child(3) { background: #ce1126; }

/* Loader centré */
.center-load {
  min-height: 60dvh;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  gap: 14px;
}
.center-load .spinner {
  border-color: var(--border);
  border-top-color: var(--primary);
  width: 28px; height: 28px;
}

/* Filtres */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Diagramme à barres (évolution mensuelle) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 10px;
  padding: 10px 0 30px;
  position: relative;
}
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  height: 100%;
  position: relative;
}
.bar {
  width: 70%;
  max-width: 38px;
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
  border-radius: 6px 6px 0 0;
  transition: height var(--t-slow) var(--ease-out), background var(--t-fast);
  min-height: 4px;
  box-shadow: var(--shadow-xs);
}
.bar:hover { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); }
.bar-label {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 500;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* Barres horizontales (répartitions) */
.hbar-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.hbar-row:last-child { border-bottom: none; }
.hbar-label {
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hbar-track {
  background: var(--surface-3);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.hbar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--primary-soft), var(--gold));
  border-radius: 999px;
  transition: width var(--t-slow) var(--ease-out);
  transform-origin: left;
}
.hbar-val {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  min-width: 30px;
  text-align: right;
}

/* Dépôts récents (item liste) */
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--t-fast) var(--ease);
}
.recent-item:last-child { border-bottom: none; }
.recent-thumb {
  width: 48px; height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-3);
  flex-shrink: 0;
}
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-info { flex: 1; min-width: 0; }
.ri-title {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ri-sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Liste de tâches (actions prioritaires) */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.task-list > div:hover {
  border-color: var(--border-strong);
  transform: translateX(2px);
}
.task-list .num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--primary);
  min-width: 24px;
  text-align: center;
}

/* Toasts détaillés */
.t-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--info-bg);
  color: var(--info);
  flex-shrink: 0;
}
.toast.ok .t-icon { background: var(--success-bg); color: var(--success); }
.toast.warn .t-icon { background: var(--warning-bg); color: var(--warning); }
.toast.err .t-icon { background: var(--danger-bg); color: var(--danger); }
.t-msg { flex: 1; min-width: 0; }

/* Lightbox détaillée */
.lightbox { position: fixed; inset: 0; z-index: 150; display: none; }
.lightbox.show { display: block; animation: fade var(--t-med) var(--ease); }
.lb-stage {
  position: absolute;
  inset: 0;
  background: rgba(6,10,20,.94);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 70px 80px;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-xl);
}
.lb-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 2;
  color: #fff;
  background: linear-gradient(rgba(0,0,0,.5), transparent);
}
.lb-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.lb-nomfichier {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
  font-family: monospace;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  z-index: 2;
}
.lb-nav:hover { background: rgba(255,255,255,.20); transform: translateY(-50%) scale(1.05); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Badge externe sur photo */
.ph-badge-ext {
  position: absolute;
  bottom: 12px; left: 12px;
  padding: 4px 9px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  z-index: 2;
  border: 1px solid var(--gold-tint);
}

/* Actions photo (boutons sous photo-meta) */
.photo-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  margin-top: 10px;
}
.photo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

/* Tableaux génériques */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-wrap th {
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  border-bottom: 1px solid var(--hairline);
}
.table-wrap td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tbody tr { transition: background var(--t-fast) var(--ease); }
.table-wrap tbody tr:hover { background: var(--surface-hover); }

/* Points (dots) génériques */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 6px;
  vertical-align: middle;
}
