/* Journal Anonyme — Site vitrine & admin */
:root {
  --primary: #5B4FD9;
  --primary-dark: #4a3fc4;
  --primary-soft: rgba(91, 79, 217, 0.08);
  --text: #1a1a2e;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-soft: 0 10px 40px -10px rgba(91, 79, 217, 0.15);
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

/* ========== Landing optimisée ========== */

/* Hero — Mobile First */
.hero {
  padding: 2.5rem 0 3rem;
  text-align: center;
  min-height: 0;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  max-width: 36rem;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.875rem, 5.5vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* Boutons stores */
.cta-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cta-store-row-center {
  justify-content: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.1s;
}

.btn-store:hover {
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.btn-store:active {
  transform: translateY(0);
}

.btn-store-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.btn-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn-store-text small {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.btn-apple { color: var(--text); }
.btn-google { color: var(--text); }

/* Mockup app */
.hero-mockup {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.mockup-device {
  position: relative;
  border-radius: 2.25rem;
  padding: 0.75rem;
  background: linear-gradient(145deg, #1a1a2e 0%, #2d2d44 100%);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.05);
}

.mockup-screen {
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 9 / 19.5;
}

.mockup-content {
  padding: 2rem 1rem 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mockup-bar {
  height: 6px;
  width: 36%;
  margin: 0 auto 0.5rem;
  border-radius: 3px;
  background: var(--border);
}

.mockup-card {
  height: 4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mockup-card.short {
  height: 2.5rem;
}

/* Preuve sociale */
.social-proof {
  padding: 1.5rem 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-proof-text {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.social-proof-text strong {
  color: var(--primary);
  font-weight: 700;
}

/* Section Fonctionnalités */
.section-features {
  padding: 3.5rem 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 32rem;
  margin: -0.5rem auto 2.5rem;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.section-features .feature-card {
  background: var(--card);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.section-features .feature-card:hover {
  box-shadow: var(--shadow-soft);
  border-color: rgba(91, 79, 217, 0.2);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--primary);
  opacity: 0.9;
}

.section-features .feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-features .feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.feature-dashboard {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.feature-stat {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.feature-stat strong {
  color: var(--primary);
  font-weight: 700;
}

/* CTA final */
.section-cta {
  padding: 3.5rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--card) 100%);
}

.store-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* Animation au scroll (fade-in) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Legal pages */
.legal-page {
  padding: 2rem 0 4rem;
}

.legal-page h1 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.legal-page p, .legal-page li {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page .updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Admin */
.admin-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: var(--text);
  color: white;
  padding: 0.75rem 1rem;
}

.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header a {
  color: rgba(255,255,255,0.9);
}

.admin-header a:hover {
  color: white;
}

.admin-main {
  flex: 1;
  padding: 1.5rem 0;
}

.login-box {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.login-box h2 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.login-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.login-box .btn {
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.login-box .login-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.login-box .forgot-link {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.login-box .error {
  color: #dc2626;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.admin-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.admin-card h2 {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.admin-card .card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.card-head-row h2 {
  padding: 0;
  border: none;
  background: none;
  margin: 0;
}

/* Onglets admin */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
}

.admin-tab:hover {
  color: var(--text);
  background: var(--bg);
}

.admin-tab.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--bg);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Stats dashboard */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Filtres */
.filter-row {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.filter-row label {
  margin-right: 1rem;
  cursor: pointer;
}

/* Boutons petits */
.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* Tableau admin */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
}

.admin-table tr.user-disabled {
  opacity: 0.7;
}

.admin-table tr.user-disabled td:first-child {
  text-decoration: line-through;
}

.btn-disable {
  background: #b91c1c;
  color: white;
}

.btn-activate {
  background: #059669;
  color: white;
}

.badge-ok { background: #d1fae5; color: #065f46; }
.badge-disabled { background: #fee2e2; color: #991b1b; }
.badge-moderator { background: #dbeafe; color: #1e40af; }

.admin-card .body {
  padding: 1.25rem;
}

.report-item, .alert-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.report-item:last-child, .alert-item:last-child {
  border-bottom: none;
}

.report-item .meta, .alert-item .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.report-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.report-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.report-content-preview {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow-y: auto;
}

.report-content-text {
  white-space: pre-wrap;
}

.report-content-muted {
  color: var(--text-muted);
  font-style: italic;
}

.report-moderator-note {
  margin: 0.75rem 0;
}

.report-moderator-note label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.report-note-input {
  width: 100%;
  max-width: 40rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.report-moderator-note .report-save-note {
  margin-top: 0.25rem;
}

.report-outcome-message {
  margin: 0.75rem 0;
}

.report-outcome-message label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.report-outcome-input {
  width: 100%;
  max-width: 40rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 0.25rem;
}

/* Liste compacte signalements */
.reports-compact-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.report-row:hover {
  background: var(--bg);
}

.report-row-unread {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
}

.report-row--pending {
  border-color: #dc2626;
  border-width: 2px;
  background: #fef2f2;
}

.report-row--pending:hover {
  background: #fee2e2;
}

.report-row-title {
  font-weight: 600;
  color: var(--text);
}

.report-row-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.report-modal[hidden] {
  display: none;
}

.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.report-modal-content {
  position: relative;
  width: 100%;
  max-width: 42rem;
  max-height: 90vh;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.report-modal-close {
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
}

.report-modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.report-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  font-size: 0.95rem;
}

.report-modal-section {
  margin-bottom: 1.25rem;
}

.report-modal-section:last-child {
  margin-bottom: 0;
}

.report-modal-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.moderation-history {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px dashed var(--border);
  padding-left: 1rem;
}

.moderation-history li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.moderation-history li:last-child {
  border-bottom: none;
}

.moderation-history .history-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.btn-dismiss {
  background: var(--text-muted);
  color: white;
}

.btn-approve {
  background: #dc2626;
  color: white;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-actioned { background: #d1fae5; color: #065f46; }
.badge-dismissed { background: var(--border); color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Landing — tablette et desktop */
@media (min-width: 768px) {
  .hero {
    padding: 3.5rem 0 4rem;
    text-align: left;
  }
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
  }
  .hero-content {
    margin: 0;
    flex: 1;
    max-width: none;
  }
  .hero h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
  }
  .hero-lead {
    font-size: 1.125rem;
  }
  .cta-store-row {
    justify-content: flex-start;
  }
  .hero-mockup {
    flex-shrink: 0;
    max-width: 260px;
    margin: 0;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero-inner {
    gap: 4rem;
  }
  .hero-mockup {
    max-width: 300px;
  }
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

@media (max-width: 640px) {
  .hero { padding: 2.25rem 0 2.5rem; }
  .section { padding: 2rem 0; }
  .section-features { padding: 2.5rem 0; }
  .section-cta { padding: 2.5rem 0; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .btn-store { width: 100%; justify-content: center; }
  .site-footer .container { flex-direction: column; }
}


.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-tab {
  border: 1px solid rgba(91, 79, 217, 0.12);
  background: rgba(255,255,255,0.82);
  color: var(--text);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px -18px rgba(26,26,46,0.45);
}

.admin-tab.active {
  background: linear-gradient(135deg, #1a1a2e 0%, #5B4FD9 100%);
  color: #fff;
  border-color: transparent;
}

.admin-card-emphasis {
  border: 1px solid rgba(91, 79, 217, 0.12);
  box-shadow: 0 22px 48px -30px rgba(26,26,46,0.45);
}

.card-head-row-stack {
  align-items: flex-start;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 800;
}

.section-intro {
  margin-top: 0.35rem;
  color: var(--text-muted);
  max-width: 760px;
}

.admin-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font: inherit;
}

.admin-input-search {
  max-width: 360px;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: rgba(91, 79, 217, 0.06);
  border: 1px solid rgba(91, 79, 217, 0.12);
  border-radius: 14px;
}

.table-responsive-elevated {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.admin-table-users td {
  vertical-align: top;
}

.user-cell-primary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.user-cell-secondary {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.user-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.subscription-chip-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.subscription-tier,
.subscription-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.subscription-tier-gratuit { background: #e2e8f0; color: #334155; }
.subscription-tier-accompagnement { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.subscription-tier-premium { background: rgba(245, 158, 11, 0.18); color: #92400e; }
.subscription-status-active { background: rgba(16, 185, 129, 0.14); color: #047857; }
.subscription-status-trial { background: rgba(6, 182, 212, 0.14); color: #0f766e; }
.subscription-status-grace_period { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.subscription-status-expired { background: rgba(239, 68, 68, 0.14); color: #b91c1c; }
.subscription-status-cancelled { background: rgba(100, 116, 139, 0.18); color: #475569; }
.subscription-status-free { background: rgba(148, 163, 184, 0.18); color: #475569; }

.table-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.subscriptions-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1.25rem;
}

.subscriptions-sidebar,
.subscriptions-detail {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 1rem;
}

.sidebar-hint {
  margin: 0.7rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.subscription-user-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 70vh;
  overflow-y: auto;
}

.subscription-user-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem;
  cursor: pointer;
  font: inherit;
}

.subscription-user-item.active {
  border-color: rgba(91, 79, 217, 0.35);
  box-shadow: 0 18px 30px -24px rgba(91, 79, 217, 0.8);
  background: linear-gradient(180deg, rgba(91, 79, 217, 0.08) 0%, #fff 100%);
}

.subscription-user-item span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.subscription-user-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.detail-empty-state,
.detail-loading {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
}

.subscription-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.subscription-header-badges {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}

.subscription-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-subcard {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 1rem;
}

.subscription-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 280px;
  overflow-y: auto;
}

.history-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.8);
  padding: 0.75rem 0.85rem;
}

.subscription-form {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
}

.subscription-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .subscriptions-shell,
  .subscription-detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .subscription-detail-header {
    flex-direction: column;
  }

  .subscription-header-badges {
    align-items: flex-start;
  }
}

/* ========== Public docs / support pages ========== */

body.public-doc-body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: #17272e;
  background:
    radial-gradient(circle at top left, rgba(243, 198, 107, 0.22), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(221, 109, 77, 0.12), transparent 18%),
    linear-gradient(180deg, #f7f0e8 0%, #fcfaf6 36%, #f4efe7 100%);
}

.public-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(247, 240, 232, 0.82);
  border-bottom: 1px solid rgba(23, 39, 46, 0.08);
}

.public-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #17272e;
}

.public-brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.95rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #12303a 0%, #1f4752 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 24px 40px rgba(18, 48, 58, 0.14);
}

.public-brand-copy strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.public-brand-copy span {
  display: block;
  color: #5d6f77;
  font-size: 0.82rem;
  font-weight: 700;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.public-nav a {
  color: #5d6f77;
  font-size: 0.94rem;
  font-weight: 800;
}

.public-nav a:hover,
.public-nav a:focus-visible,
.public-nav a.is-current {
  color: #12303a;
  text-decoration: none;
}

.public-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: #12303a;
  color: #fff !important;
  box-shadow: 0 18px 28px rgba(18, 48, 58, 0.16);
}

.public-doc-main {
  padding: 3rem 0 4rem;
}

.public-doc-hero {
  margin-bottom: 1.25rem;
  padding: 2rem;
  border-radius: 2rem;
  background: linear-gradient(135deg, rgba(18, 48, 58, 0.96) 0%, rgba(31, 71, 82, 0.92) 54%, rgba(221, 109, 77, 0.7) 100%);
  color: #fff;
  box-shadow: 0 30px 60px rgba(18, 48, 58, 0.17);
}

.public-doc-kicker {
  display: inline-block;
  color: rgba(243, 198, 107, 0.94);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-doc-hero h1 {
  margin: 0.55rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 15ch;
}

.public-doc-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
  margin: 0;
}

.public-doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(240px, 0.22fr);
  gap: 1rem;
  align-items: start;
}

.public-doc-card,
.public-doc-aside {
  border-radius: 1.6rem;
  border: 1px solid rgba(23, 39, 46, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 40px rgba(18, 48, 58, 0.08);
}

.public-doc-card {
  padding: 1.6rem;
}

.public-doc-aside {
  position: sticky;
  top: 102px;
  padding: 1.2rem;
}

.public-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.public-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(18, 48, 58, 0.06);
  color: #12303a;
  font-size: 0.82rem;
  font-weight: 800;
}

.public-doc-content h2,
.public-doc-content h3 {
  letter-spacing: -0.03em;
  color: #17272e;
}

.public-doc-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.45rem;
}

.public-doc-content h3 {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.08rem;
}

.public-doc-content p,
.public-doc-content li {
  color: #4d6068;
  line-height: 1.8;
}

.public-doc-content ul,
.public-doc-content ol {
  padding-left: 1.2rem;
  margin: 0.65rem 0 1rem;
}

.public-doc-content a {
  color: #12303a;
  font-weight: 700;
}

.public-doc-content strong {
  color: #17272e;
}

.public-note,
.public-warning,
.public-danger,
.public-info-box,
.public-contact-box,
.public-support-box {
  margin: 1.2rem 0;
  padding: 1.1rem 1.15rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(23, 39, 46, 0.08);
  background: rgba(255,255,255,0.92);
}

.public-warning {
  background: rgba(243, 198, 107, 0.18);
  border-color: rgba(209, 139, 29, 0.18);
}

.public-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.14);
}

.public-info-box {
  background: rgba(18, 48, 58, 0.05);
}

.public-contact-box,
.public-support-box {
  display: grid;
  gap: 0.5rem;
}

.public-contact-box h2,
.public-support-box h2,
.public-note h2,
.public-warning h2,
.public-danger h2 {
  margin-top: 0;
}

.public-mail {
  font-size: 1.16rem;
  font-weight: 800;
}

.public-side-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.public-side-links a {
  display: block;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(18, 48, 58, 0.05);
  color: #12303a;
  font-weight: 800;
}

.public-side-links a:hover {
  background: rgba(18, 48, 58, 0.09);
  text-decoration: none;
}

.public-back-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.public-back-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(18, 48, 58, 0.07);
  color: #12303a;
  font-weight: 800;
}

.public-footer {
  padding: 2rem 0 3rem;
}

.public-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(23, 39, 46, 0.1);
  padding-top: 1.5rem;
  color: #5d6f77;
  font-size: 0.93rem;
}

.public-footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.public-footer-links a {
  color: #5d6f77;
  font-weight: 800;
}

@media (max-width: 920px) {
  .public-doc-layout {
    grid-template-columns: 1fr;
  }

  .public-doc-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .public-header-inner,
  .public-nav,
  .public-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .public-doc-main {
    padding-top: 2rem;
  }

  .public-doc-hero,
  .public-doc-card,
  .public-doc-aside {
    padding: 1.2rem;
    border-radius: 1.3rem;
  }

  .public-doc-meta,
  .public-back-row,
  .public-footer-links {
    gap: 0.65rem;
  }
}
