/* ═══════════════════════════════════════════════
   VCP Feedback — Design System v17
   Néo-Rétro × Mansion Press
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 1. Variables (tokens) ── */
:root {
  /* Palette v17 */
  --bg: #f4e8d0;
  --text: #2d2d2d;
  --accent: #e85d26;
  --accent-dark: #c94a1a;
  --petrol: #1b4f6c;
  --dark: #2d2d2d;
  --dark-light: #4a4a4a;
  --muted: #7a6b50;
  --muted-light: #c9b896;
  --surface: #fff;
  --border: #2d2d2d;
  --border-width: 3px;

  /* Aliases (compatibilité) */
  --cream: #f4e8d0;
  --orange: #e85d26;
  --orange-light: #f27d4e;

  /* Sentiments */
  --positive: #3a7d44;
  --negative: #c0392b;
  --neutral: #7f8c8d;
  --suggestion: #e67e22;

  /* Catégories */
  --cat-content: #8e44ad;
  --cat-ecommerce: #e85d26;
  --cat-community: #1b4f6c;
  --cat-design: #e74c3c;
  --cat-tech: #2d2d2d;

  /* Statuts */
  --status-new: #e85d26;
  --status-discussed: #1b4f6c;
  --status-planned: #27ae60;
  --status-rejected: #95a5a6;
  --status-done: #2ecc71;

  /* Typo */
  --font-heading: 'Bebas Neue', sans-serif;
  --font-body: 'Space Mono', monospace;
  --ls-heading: 0.08em;
  --ls-nav: 0.15em;

  /* Dimensions */
  --radius: 0;
  --radius-circle: 50%;
  --transition: 0.2s ease;
}

/* ── 2. Base ── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Film grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

/* Pas de grain sur la page templates (le prototype a son propre grain) */
body.page-templates::before { display: none; }
/* Sauf en fullscreen où on le restaure */
body.page-templates.fullscreen-mode::before { display: block; }

/* ── 3. Typo ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: var(--ls-heading);
  line-height: 1.1;
  text-transform: uppercase;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

a { color: var(--petrol); text-decoration: none; }
a:hover { color: var(--accent); }

/* ── 4. Layout ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── 5. Header ── */
.header {
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: var(--border-width) solid var(--dark);
}
.header-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: var(--ls-heading);
  color: var(--text);
  text-transform: uppercase;
}
.header-brand span { color: var(--accent); }
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.header-nav a {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  font-weight: 700;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--accent); }
.header-nav a.active { color: var(--accent); }
.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.btn-logout {
  background: none;
  border: var(--border-width) solid var(--dark);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-logout:hover { border-color: var(--accent); color: var(--accent); }

/* ── 6. Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: var(--border-width) solid var(--border);
  margin-bottom: 1rem;
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition);
}
.card-link:hover .card { border-color: var(--accent); }

/* ── 7. Formulaires ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}
.form-group .hint {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
textarea { min-height: 80px; resize: vertical; }

.radio-group, .pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.radio-group label, .pill-group label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 400;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.radio-group label:has(input:checked),
.pill-group label:has(input:checked) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.radio-group input, .pill-group input { display: none; }

/* ── 8. Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}
.btn-primary:hover { background: var(--surface); color: var(--text); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--dark);
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}
.btn-secondary:hover { background: var(--dark); color: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); }
.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  text-transform: none;
}
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: var(--muted);
  font-size: 1rem;
  transition: color var(--transition);
}
.btn-icon:hover { color: var(--text); }

/* ── 9. Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-orange { background: rgba(232, 93, 38, 0.12); color: var(--accent); }
.badge-petrol { background: rgba(27, 79, 108, 0.12); color: var(--petrol); }
.badge-green { background: rgba(46, 204, 113, 0.12); color: #27ae60; }
.badge-gray { background: rgba(149, 165, 166, 0.12); color: #7f8c8d; }
.badge-red { background: rgba(192, 57, 43, 0.12); color: var(--negative); }

/* Badges catégorie */
.badge-content { background: rgba(142, 68, 173, 0.12); color: var(--cat-content); }
.badge-ecommerce { background: rgba(232, 93, 38, 0.12); color: var(--cat-ecommerce); }
.badge-community { background: rgba(27, 79, 108, 0.12); color: var(--cat-community); }
.badge-design { background: rgba(231, 76, 60, 0.12); color: var(--cat-design); }
.badge-tech { background: rgba(45, 45, 45, 0.12); color: var(--cat-tech); }

/* Badges statut */
.badge-new { background: rgba(232, 93, 38, 0.15); color: var(--status-new); }
.badge-discussed { background: rgba(27, 79, 108, 0.15); color: var(--status-discussed); }
.badge-planned { background: rgba(39, 174, 96, 0.15); color: var(--status-planned); }
.badge-rejected { background: rgba(149, 165, 166, 0.15); color: var(--status-rejected); }
.badge-done { background: rgba(46, 204, 113, 0.15); color: var(--status-done); }

/* Badges sentiment */
.badge-positive { color: var(--positive); }
.badge-negative { color: var(--negative); }
.badge-neutral { color: var(--neutral); }
.badge-suggestion { color: var(--suggestion); }

/* ── 10. Onglets ── */
.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.tab-btn.active {
  background: var(--dark);
  color: var(--bg);
  border-color: var(--dark);
}

/* ── 11. Toast ── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--dark);
  color: var(--bg);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  border: var(--border-width) solid var(--dark);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}
.toast-success { border-left: var(--border-width) solid var(--positive); }
.toast-error { border-left: var(--border-width) solid var(--negative); }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ── 12. Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 45, 45, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border: var(--border-width) solid var(--dark);
  animation: slideUp 0.25s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-header h3 { margin: 0; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0.2rem;
}
.modal-close:hover { color: var(--text); }
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── 13. Annotation card ── */
.annotation {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  position: relative;
  border: var(--border-width) solid var(--border);
}
.annotation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}
.annotation-meta {
  font-size: 0.7rem;
  color: var(--muted);
}
.annotation-comment {
  font-size: 0.85rem;
  line-height: 1.5;
}
.annotation-zone {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--petrol);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--muted-light);
}

/* ── 14. Menu déroulant ── */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  min-width: 120px;
  z-index: 100;
  overflow: hidden;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item--danger { color: var(--negative); }
.dropdown-item--danger:hover { background: rgba(192, 57, 43, 0.08); }

/* ── 15. Idea card ── */
.idea-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: var(--border-width) solid var(--border);
  margin-bottom: 0.75rem;
  transition: border-color var(--transition);
}
.idea-card:hover { border-color: var(--accent); }
.idea-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.idea-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.idea-desc {
  font-size: 0.85rem;
  color: var(--dark-light);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.idea-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.idea-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.voted {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.comment-toggle {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.comment-toggle:hover { color: var(--text); }

/* ── 16. Commentaires ── */
.comments-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--muted-light);
}
.comments-section[hidden] { display: none; }
.comment-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--muted-light);
  font-size: 0.8rem;
}
.comment-item:last-child { border-bottom: none; }
.comment-author {
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--petrol);
}
.comment-date {
  font-size: 0.65rem;
  color: var(--muted);
}
.comment-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.comment-form input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
}
.comment-form .btn { flex-shrink: 0; }

/* ── 17. Filtre / Tri ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.filters select {
  width: auto;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

/* ── 18. Template preview ── */
.template-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border);
  background: var(--bg);
  margin-bottom: 1rem;
}
.template-preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 810px;
  border: none;
  transform-origin: top left;
  pointer-events: none;
}
.template-preview-link {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: var(--dark);
  color: var(--bg);
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  z-index: 2;
  opacity: 0.8;
}
.template-preview-link:hover { opacity: 1; color: var(--bg); }

/* ── 19. Login ── */
.login-box {
  max-width: 380px;
  margin: 3rem auto;
  text-align: center;
}
.login-box h1 { margin-bottom: 0.5rem; }
.login-box p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }

/* ── 19a. Login Footer ── */
.login-footer {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.login-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.login-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.login-social a:hover { color: var(--text); }
.login-sep { color: var(--muted); opacity: 0.4; }
.login-ar6 {
  display: inline-flex;
  align-items: baseline;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--petrol);
  opacity: 0.35;
}
.ar6-a { position: relative; z-index: 3; }
.ar6-r { position: relative; z-index: 2; margin-left: -7px; }
.ar6-6 { position: relative; z-index: 1; margin-left: -5px; opacity: 0.5; }

/* ── 19a-2. Site Footer (global) ── */
.site-footer {
  padding: 2rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

/* ── 19a-3. AR6 Watermark ── */
.ar6-watermark {
  position: fixed;
  top: -12vh;
  left: -8vw;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 60vw;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--petrol);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  display: inline-flex;
  align-items: baseline;
}
.ar6-watermark .ar6-r { margin-left: -0.15em; }
.ar6-watermark .ar6-6 { margin-left: -0.1em; opacity: 0.5; }

/* ── 19b. Login OTP ── */
.login-step { text-align: left; }
.otp-input {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3em;
  padding: 0.7rem 1rem;
}
.otp-info {
  font-size: 0.8rem;
  color: var(--positive);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.otp-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}
.otp-resend {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--petrol);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.otp-resend:hover { color: var(--accent); }
.otp-resend.disabled, .otp-resend:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}
.otp-timer {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── 20. Hub cards ── */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.hub-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: var(--border-width) solid var(--border);
  text-align: center;
  transition: border-color var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hub-card:hover { border-color: var(--accent); }

/* Rotating gradient border — Idea Board card */
.hub-card-glow {
  position: relative;
  border: none;
  padding: calc(1.5rem + var(--border-width));
  overflow: hidden;
  z-index: 0;
}
.hub-card-glow::before {
  content: '';
  position: absolute;
  inset: -50%;
  z-index: -2;
  background: conic-gradient(
    var(--accent) 0%,
    var(--petrol) 25%,
    var(--accent) 50%,
    var(--petrol) 75%,
    var(--accent) 100%
  );
  animation: glow-rotate 4s linear infinite;
}
.hub-card-glow::after {
  content: '';
  position: absolute;
  inset: var(--border-width);
  z-index: -1;
  background: var(--surface);
}
@keyframes glow-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hub-card-icon {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--petrol);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}
.hub-card h3 { margin-bottom: 0.3rem; }
.hub-card p { font-size: 0.8rem; color: var(--muted); }
.hub-card .badge { margin-top: 0; }

/* Hub card — Idea Board enriched */
.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.75rem;
}
.hub-card-top h3 { margin-bottom: 0; }
.hub-card-top a {
  text-decoration: none;
  color: inherit;
}
.hub-card-top a:hover { color: var(--accent); }
.hub-ideas-list {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hub-idea-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--muted-light);
  text-decoration: none;
  color: inherit;
  font-size: 0.78rem;
  transition: color 0.15s;
}
.hub-idea-item:last-child { border-bottom: none; }
.hub-idea-item:hover { color: var(--accent); }
.hub-idea-votes {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--petrol);
  min-width: 2rem;
}
.hub-idea-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 21. Hub template gallery ── */
.tpl-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.tpl-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border-width) solid var(--border);
  transition: border-color var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.tpl-card:hover {
  border-color: var(--accent);
}

.tpl-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border-bottom: var(--border-width) solid var(--border);
}

.tpl-thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: none;
  transform-origin: top left;
  pointer-events: none;
}

.tpl-card-info {
  padding: 0.5rem 0.6rem 0.25rem;
}

.tpl-card-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpl-card-name {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-card .badge {
  margin: 0.15rem 0.6rem 0.5rem;
  align-self: flex-start;
}

/* Hub bottom: ideas + activity */
.hub-bottom {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
.hub-bottom .hub-card { margin: 0; }
.hub-activity { min-width: 0; }
.hub-activity .card { margin-bottom: 0; }

/* ── 22. Activity feed ── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--muted-light);
  font-size: 0.8rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.activity-item:hover { background: rgba(0,0,0,0.04); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.activity-text { color: var(--dark-light); }
.activity-date { font-size: 0.65rem; color: var(--muted); }

/* ── 23. Sentiment dots ── */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  flex-shrink: 0;
  vertical-align: middle;
}
.dot-positive { background: var(--positive); }
.dot-negative { background: var(--negative); }
.dot-neutral { background: var(--neutral); }
.dot-suggestion { background: var(--suggestion); }

.dot-lg {
  width: 10px;
  height: 10px;
}

/* ── 24. Empty state ── */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}
.empty-state-icon {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.35;
  letter-spacing: var(--ls-heading);
}
.empty-state p { font-size: 0.85rem; }

/* ── 25. Section title ── */
.section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--petrol);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: var(--border-width) solid var(--border);
}

/* ── 26. Priority vote ── */
.priority-select {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.priority-btn {
  padding: 0.25rem 0.5rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}
.priority-btn:hover { border-color: var(--accent); }
.priority-btn.selected { background: var(--petrol); color: #fff; border-color: var(--petrol); }

/* ── 27. Responsive ── */
@media (max-width: 1024px) {
  .tpl-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .tpl-gallery { grid-template-columns: repeat(2, 1fr); }
  .hub-bottom { grid-template-columns: 1fr; }
  .container-wide { padding: 0 0.75rem; }
  .header { flex-wrap: wrap; }
  .hub-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
  .container { padding: 0 0.75rem; }
  .modal { margin: 0.5rem; padding: 1rem; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters select { width: 100%; }
  .idea-actions { gap: 0.5rem; }
}

/* ── 28. Utilitaires ── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.flex-between .filters { margin: 0; }
.gap-1 { gap: 0.5rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.modal-sm { max-width: 360px; }
.modal-xs { max-width: 320px; }

/* ── 29. Annotation replies (threads) ── */
.ann-card-replies {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--muted-light);
  margin-top: 0.4rem;
}

.reply-toggle {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--petrol);
  cursor: pointer;
  padding: 0;
}
.reply-toggle:hover { text-decoration: underline; }

.ann-card .reply-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.ann-card .reply-btn:hover { color: var(--accent); }

.ann-replies-container { padding: 0 0.75rem 0.5rem; }
.ann-replies-container[hidden] { display: none; }

.reply-thread { margin-top: 0.4rem; }
.reply-thread[data-depth="0"] { padding-left: 0; }
.reply-thread[data-depth="1"] { padding-left: 1rem; border-left: 3px solid var(--accent); }
.reply-thread[data-depth="2"] { padding-left: 1rem; border-left: 3px solid var(--petrol); }

.reply-item {
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--muted-light);
}
.reply-item:last-child { border-bottom: none; }

.reply-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
}
.reply-author { font-weight: 700; }
.reply-date { color: var(--muted); }
.reply-content { font-size: 0.78rem; margin: 0.2rem 0; }

.reply-form-inline { margin-top: 0.4rem; }
.reply-form-inline textarea {
  width: 100%;
  font-size: 0.78rem;
  padding: 0.4rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  resize: vertical;
  min-height: 2.5rem;
}
.reply-form-inline textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

/* ── 30. Markdown editor ── */
.md-editor { border: var(--border-width) solid var(--border); border-radius: var(--radius); }
.md-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--muted-light);
  padding: 0 0.5rem;
}
.md-tab {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.md-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.md-help { margin-left: auto; font-size: 0.75rem; color: var(--muted); text-decoration: none; }
.md-help:hover { color: var(--accent); }

.md-editor textarea {
  width: 100%;
  border: none;
  padding: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  min-height: 6rem;
  resize: vertical;
}
.md-editor textarea:focus { outline: none; }

.md-counter { text-align: right; padding: 0 0.5rem 0.3rem; font-size: 0.65rem; color: var(--muted); }
.md-preview { padding: 0.75rem; font-size: 0.8rem; min-height: 4rem; }
.md-preview h3 { font-family: var(--font-heading); margin: 0.5rem 0 0.25rem; }
.md-preview a { color: var(--petrol); text-decoration: underline; }
.md-preview ul, .md-preview ol { padding-left: 1.2rem; margin: 0.3rem 0; }
.md-preview blockquote { border-left: 3px solid var(--accent); padding-left: 0.5rem; color: var(--muted); margin: 0.3rem 0; }
.md-preview code { background: var(--bg); padding: 0.1rem 0.3rem; font-size: 0.75rem; }

.md-help-content {
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  font-size: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.md-help-content code { background: var(--surface); padding: 0.15rem 0.4rem; border: 1px solid var(--muted-light); }

/* ── 31. Resources ── */
.resource-add {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.resource-input {
  flex: 1;
  padding: 0.3rem 0.5rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.78rem;
}
.resource-input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

.resource-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--muted-light);
  font-size: 0.78rem;
}
.resource-icon { font-size: 0.9rem; }
.resource-link { flex: 1; color: var(--petrol); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-link:hover { text-decoration: underline; }

.idea-resources { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--muted-light);
  border-radius: var(--radius);
  color: var(--petrol);
  text-decoration: none;
  transition: border-color var(--transition);
}
.resource-chip:hover { border-color: var(--accent); }

/* Markdown rendu dans les cartes idées */
.md-rendered { font-size: 0.85rem; }
.md-rendered h3 { font-family: var(--font-heading); font-size: 0.9rem; margin: 0.3rem 0 0.15rem; }
.md-rendered a { color: var(--petrol); }
.md-rendered ul, .md-rendered ol { padding-left: 1.2rem; margin: 0.2rem 0; }
.md-rendered blockquote { border-left: 3px solid var(--accent); padding-left: 0.5rem; color: var(--muted); }
.md-rendered code { background: var(--bg); padding: 0.1rem 0.2rem; font-size: 0.75rem; }
.md-rendered p { margin: 0.25rem 0; }

/* ── 32. Mes annotations (Hub) ── */
.my-ann-group { margin-bottom: 0.75rem; }
.my-ann-group:last-child { margin-bottom: 0; }
.my-ann-group-header {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  background: var(--bg);
  border-bottom: 1px solid var(--muted-light);
}
.my-ann-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--muted-light);
  transition: background var(--transition);
}
.my-ann-item:last-child { border-bottom: none; }
.my-ann-item:hover { background: var(--bg); }
.my-ann-text { flex: 1; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-ann-date { font-size: 0.7rem; color: var(--muted); flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   Split Layout — Annotation visuelle
   ═══════════════════════════════════════════════ */

/* Page templates : full viewport flex column */
.page-templates {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Split container */
.split-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.split-left {
  flex: 7;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.split-right {
  flex: 3;
  min-width: 300px;
  max-width: 420px;
  border-left: var(--border-width) solid var(--border);
  overflow-y: auto;
  background: var(--surface);
}

/* Toolbar above prototype */
.split-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  border-bottom: var(--border-width) solid var(--border);
  background: var(--bg);
  gap: 0.5rem;
  flex-shrink: 0;
}

.split-toolbar .tabs { margin: 0; padding: 0; }
.split-toolbar-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-shrink: 0;
}

/* Prototype container + iframe */
.prototype-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.prototype-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Annotation overlay ── */
.annotation-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.annotation-overlay.active {
  pointer-events: none;
  background: rgba(45, 45, 45, 0.04);
}

/* Crosshair cursor on iframe when inspecting */
.prototype-container.inspecting iframe {
  cursor: crosshair;
}

/* Instruction hint when entering annotation mode */
.inspect-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--dark);
  color: var(--bg);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-align: center;
  flex-shrink: 0;
}
.inspect-hint::before {
  content: '\2316';
  font-size: 1.1rem;
  opacity: 0.7;
}

/* Selection rectangle */
.selection-rect {
  display: none;
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(232, 93, 38, 0.08);
  pointer-events: none;
  z-index: 11;
}

/* ── Pins ── */
.pin {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  z-index: 12;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.pin:hover {
  transform: translate(-50%, -50%) scale(1.4);
  z-index: 13;
}

.pin-positive { background: var(--positive); }
.pin-negative { background: var(--negative); }
.pin-neutral { background: var(--neutral); }
.pin-suggestion { background: var(--suggestion); }

/* Dim pins in annotation mode */
.annotation-overlay.active .pin {
  pointer-events: none;
  opacity: 0.25;
}

/* Annotate button active state */
.btn-annotate-active {
  background: var(--negative) !important;
  color: #fff !important;
  border-color: var(--negative) !important;
}
.btn-annotate-active:hover {
  background: #b02c1f !important;
}

/* ── Right panel ── */
.panel-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--petrol);
  margin: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-bottom: var(--border-width) solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 5;
}

.panel-header select {
  width: auto;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.panel-body { padding: 0.75rem; }

/* Selector preview */
.selector-preview {
  border-radius: var(--radius);
  background: #1a1a1a;
  color: #E85D26;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.selector-preview code {
  font-family: var(--font-body);
  font-size: 0.7rem;
  line-height: 1.4;
  white-space: nowrap;
}

/* Selector in annotation cards */
.ann-card-selector {
  margin-top: 0.3rem;
}
.ann-card-selector code {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--muted);
  word-break: break-all;
}

.capture-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

/* ── Annotation cards (right panel) ── */
.ann-card {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--muted-light);
  cursor: pointer;
  transition: background 0.15s ease;
}
.ann-card:hover { background: var(--bg); }
.ann-card.highlight {
  background: rgba(232, 93, 38, 0.08);
  transition: background 0.15s ease;
}

.ann-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.ann-card-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-circle);
  font-family: var(--font-body);
  font-size: 0.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.ann-card-author {
  font-weight: 700;
  font-size: 0.75rem;
}

.ann-card-meta {
  font-size: 0.6rem;
  color: var(--muted);
}

.ann-card-comment {
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* Category badge */
.ann-cat {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius);
  font-weight: 700;
}
.ann-cat-structure { background: rgba(27, 79, 108, 0.12); color: var(--petrol); }
.ann-cat-contenu { background: rgba(142, 68, 173, 0.12); color: var(--cat-content); }
.ann-cat-design { background: rgba(231, 76, 60, 0.12); color: var(--cat-design); }
.ann-cat-autre { background: rgba(45, 45, 45, 0.12); color: var(--dark-light); }

/* Screenshot toggle & container */
.ann-card-screenshot {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0.4rem;
  border: 1px solid var(--muted-light);
}
.ann-card-screenshot img {
  width: 100%;
  display: block;
}

.ann-card-toggle-ss {
  font-size: 0.65rem;
  color: var(--petrol);
  cursor: pointer;
  margin-top: 0.3rem;
  user-select: none;
}
.ann-card-toggle-ss:hover { color: var(--accent); }

/* ── Fullscreen mode ── */
.page-templates.fullscreen-mode .header,
.page-templates.fullscreen-mode .split-toolbar,
.page-templates.fullscreen-mode .split-right,
.page-templates.fullscreen-mode .inspect-hint {
  display: none !important;
}
.page-templates.fullscreen-mode .split-left {
  flex: 1;
}
.page-templates.fullscreen-mode .prototype-container {
  flex: 1;
}

/* FAB (Floating Action Button) */
.fab-group {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}
.page-templates.fullscreen-mode .fab-group {
  display: flex;
}

.fab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}

.fab-annotate {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.fab-annotate:hover {
  background: var(--surface);
  color: var(--text);
}

.fab-exit {
  background: var(--dark);
  color: var(--bg);
  border-color: var(--dark);
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}
.fab-exit:hover {
  border-color: var(--accent);
}

/* ── Split layout responsive ── */
@media (max-width: 1024px) {
  .split-layout {
    flex-direction: column;
    height: auto;
  }
  .page-templates {
    overflow: auto;
    height: auto;
  }
  .split-left {
    height: 55vh;
    min-height: 350px;
  }
  .split-right {
    min-width: 0;
    max-width: none;
    border-left: none;
    border-top: var(--border-width) solid var(--border);
    max-height: 50vh;
  }
}
