/* ==========================================================================
   MEMORIXX.NET — Clean, Modern & Professional Healthcare Web Application
   ========================================================================== */

:root {
  /* Rich Clinical & High-Trust Palette */
  --primary: #0f172a;          /* Slate 900 */
  --primary-hover: #1e293b;
  --accent: #2563eb;           /* High-Trust Medical Royal Blue */
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-subtle: #dbeafe;
  
  --success: #059669;          /* Emerald Green */
  --success-light: #ecfdf5;
  --warning: #d97706;          /* Warm Amber */
  --warning-light: #fffbeb;
  --danger: #dc2626;           /* Rose Red */
  --danger-light: #fef2f2;

  /* Surfaces & Canvas */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Typography System */
  --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-base);
  --font-scale: 1;

  /* Premium Multi-Layer Elevation & Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 35px -6px rgba(15, 23, 42, 0.1);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.high-contrast {
  --bg-main: #000000;
  --bg-card: #121212;
  --bg-surface: #1e1e1e;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-color: #333333;
  --primary: #38bdf8;
  --accent: #60a5fa;
}

body.large-text {
  --font-scale: 1.15;
}

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

html {
  font-size: calc(16.5px * var(--font-scale));
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

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

button {
  font-family: var(--font-base);
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   TOP BAR (CLEANED / REMOVED AS REQUESTED)
   ========================================================================== */
.top-bar {
  display: none !important;
}

/* ==========================================================================
   HEADER & NAVIGATION BAR (MODERN, CLEAN, POLISHED)
   ========================================================================== */

.main-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03);
}

.main-header .container {
  max-width: 1400px;
  width: 100%;
  padding: 0 1.5rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  gap: 1.25rem;
}

/* Logo Area */
.logo-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.logo-area:hover .logo-badge {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.1;
  white-space: nowrap;
}

.logo-accent {
  color: var(--accent);
}

.logo-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
  white-space: nowrap;
}

/* Nav links */
.simple-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: #334155;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.nav-link.active {
  background-color: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.nav-link.nav-link-connexion {
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  margin-left: 0.35rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

.nav-link.nav-link-connexion:hover {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-link.nav-link-admin {
  color: #d97706 !important;
  font-weight: 700;
}

/* Header Right: Language Switcher & Mobile Menu */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
  gap: 2px;
}

.btn-lang {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-lang:hover {
  color: #0f172a;
}

.btn-lang.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-weight: 700;
}

.mobile-menu-toggle {
  display: none;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   BUTTONS SYSTEM (CLEAN, MODERN, POLISHED)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary {
  background: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
  background: #ffffff;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background-color: var(--border-color);
}

/* ==========================================================================
   PROGRAMME MEMOIRE 30 JOURS (DESIGN PREMIUM AMÉLIORÉ)
   ========================================================================== */

/* Hero Banner & Stats Dashboard */
.program-hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e1b4b 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.3);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 992px) {
  .program-hero-card {
    grid-template-columns: 1fr;
  }
}

.program-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fbbf24;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.program-hero-content h1 {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.program-hero-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 650px;
}

.program-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.program-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.25rem;
}

.program-stat-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  flex-shrink: 0;
  color: #ffffff;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  display: block;
}

/* Modern Exercise Card Icon */
.ex-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
}

.ex-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.stat-details {
  flex: 1;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-subtext {
  font-size: 0.75rem;
  color: #38bdf8;
  margin-top: 0.15rem;
}

.stat-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-top: 0.35rem;
  overflow: hidden;
}

.stat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* 5 Gestes Quotidiens Checklist */
.habit-tracker-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.habits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.habit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  padding: 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.habit-item:hover {
  border-color: var(--primary);
  background: #f1f5f9;
}

.habit-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.habit-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-main);
}

.habit-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Toolbar & Filters */
.program-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 1rem 0;
}

.program-filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.program-search-box input {
  padding: 0.45rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  font-size: 0.9rem;
  width: 260px;
  outline: none;
  transition: var(--transition);
}

.program-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Week Cards */
.program-week-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.program-week-header {
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.week-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.program-week-header h3 {
  color: #ffffff;
  font-size: 1.3rem;
  margin: 0;
}

.week-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.week-progress-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.program-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
}

.program-day-box {
  background-color: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.program-day-box:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.program-day-box.completed {
  background-color: #f0fdf4;
  border-color: #22c55e;
}

.program-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.day-pill {
  font-size: 0.75rem;
  font-weight: 800;
  background-color: #e0e7ff;
  color: #1e3a8a;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.day-pill.done {
  background-color: #dcfce7;
  color: #15803d;
}

.day-cat-pill {
  font-size: 0.72rem;
  background-color: #f1f5f9;
  color: #64748b;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-weight: 600;
}

.day-time-badge {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.day-main-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.program-day-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--text-main);
}

.program-day-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.day-score-tag {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  margin: 0.75rem 0 0.5rem 0;
}

.btn-day-action {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.6rem;
  margin-top: 0.75rem;
  border-radius: 8px;
  font-weight: 700;
}

/* Session Modal & Interactive Widgets */
.session-interactive-box {
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.word-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1rem 0;
}

.word-chip {
  background: #1e3a8a;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
}

.session-timer-display {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--primary);
  background: #fff;
  padding: 0.35rem 1.25rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

/* ==========================================================================
   STORY DOMAIN BLOCKS — Immobilier & Santé Naturelle
   ========================================================================== */

.story-domain-block {
  border-radius: 16px;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15,23,42,0.07);
  border: 1px solid #e2e8f0;
}

/* Header band */
.story-domain-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}
.immobilier-block .story-domain-header { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); color: #fff; }
.sante-block     .story-domain-header { background: linear-gradient(135deg, #064e3b 0%, #059669 100%); color: #fff; }

.story-domain-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  flex-shrink: 0;
}
.story-domain-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  display: block;
}
.story-domain-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.story-domain-title { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }

/* Body */
.story-domain-body {
  padding: 1.25rem 1.25rem 1.5rem;
  background: #fff;
}

/* Achievement list */
.story-achiev-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.story-achiev-list li {
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  border-left: 3px solid #2563eb;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #1e293b;
}
.sante-block .story-achiev-list li { border-left-color: #059669; }

/* Demos row */
.story-demos-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.story-demos-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}
.story-demo-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  text-decoration: none;
  color: #1e3a5f;
  transition: all 0.2s ease;
}
.story-demo-card:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}
.story-demo-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  flex-shrink: 0;
}
.story-demo-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: block;
}
.story-demo-info { flex: 1; }
.story-demo-title { font-size: 0.88rem; font-weight: 700; color: #1e3a5f; line-height: 1.3; }
.story-demo-sub { font-size: 0.75rem; color: #2563eb; margin-top: 0.1rem; font-weight: 500; }
.story-demo-arrow { font-size: 1.1rem; color: #2563eb; flex-shrink: 0; font-weight: 700; }

/* Santé description */
.story-domain-desc {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.65;
  margin: 0 0 1.1rem;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 3px solid #059669;
}

/* Press grid */
.press-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.press-item-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.2s ease;
  border: 1px solid;
}
.press-item-card           { background: #fafafa;  border-color: #e5e7eb; }
.press-item-card.press-item-science { background: #f0f9ff;  border-color: #bae6fd; }
.press-item-card.press-item-fr      { background: #fdf4ff;  border-color: #e9d5ff; }
.press-item-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,0.1); transform: translateY(-1px); filter: brightness(0.97); }

.press-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 1.2;
}
.press-pill-news    { background: #e2e8f0; color: #1e293b; }
.press-pill-science { background: #dbeafe; color: #1e40af; }
.press-pill-fr      { background: #f3e8ff; color: #6b21a8; }

.press-item-body { flex: 1; }
.press-item-source {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.press-item-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}
.press-item-arrow { font-size: 1rem; color: #64748b; flex-shrink: 0; }
.press-item-card:hover .press-item-arrow { color: #0f172a; }

/* Inline link */
.inline-link { color: #2563eb; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.inline-link:hover { color: #1d4ed8; }

/* ==========================================================================
   DIAPO LINK CARDS (remplace les iframes goiania3d)
   ========================================================================== */

.diapo-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
.diapo-link-card:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37,99,235,0.1);
  transform: translateY(-1px);
}
.diapo-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  flex-shrink: 0;
}
.diapo-link-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: block;
}
.diapo-link-text { flex: 1; }
.diapo-link-arrow { font-size: 1.1rem; color: #2563eb; flex-shrink: 0; }
.diapo-print-fallback { display: none; }
@media print {
  .diapo-link-card { display: none !important; }
  .diapo-print-fallback { display: block; font-size: 0.85rem; color: #333; padding: 0.5rem 0; }
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-featured {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 16px -2px rgba(37, 99, 235, 0.08);
}

.badge-target {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  border: 1px solid #a7f3d0;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Story Preview Card (Jean-Marc) */
.card-story-preview {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
}

.story-preview-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.story-avatar {
  width: 82px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.story-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #eff6ff;
  color: #2563eb;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* Call to Action Card */
.cta-auth-card {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}

.cta-shield-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--accent);
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.cta-title {
  color: #0f172a;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 1.75rem auto;
  line-height: 1.6;
}

.cta-badges-row {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.health-checklist {
  list-style: none;
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  color: #334155;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.view-section {
  display: none;
  padding: 2rem 0 3rem 0;
}

.view-section.active {
  display: block;
}

/* Hero Panel (Modern, Clean, High-End) */
.hero-box {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.06), 0 1px 3px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 820px;
}

.hero-desc {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-trust-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.88rem;
  color: #64748b;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Memory Game Grid */
.memory-game-container {
  max-width: 650px;
  margin: 0 auto;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  user-select: none;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, border-color 0.3s ease;
  perspective: 1000px;
}

.memory-card:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.25);
}

.memory-card.flipped {
  background: #ffffff;
  border-color: var(--accent);
  transform: rotateY(180deg);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

.memory-card.matched {
  background: #ecfdf5;
  border-color: var(--success);
  transform: scale(1.02);
  animation: pulseMatch 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulseMatch {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1.02); }
}

.time-input-box {
  background-color: var(--bg-surface);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  margin-top: 1.25rem;
}

.input-num {
  width: 70px;
  height: 48px;
  font-size: 1.35rem;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Admin Sidebar Layout */
.admin-layout-simple {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-sidebar-nav {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-nav-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.admin-nav-item.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Forms & Tables */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-control { width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font-base); }

.admin-table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--border-color); text-align: left; }
.data-table th { background-color: var(--bg-surface); font-weight: 700; }

.exercise-badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background-color: #dbeafe;
  color: #1e40af;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background-color: #ffffff; padding: 1.75rem; border-radius: var(--radius-lg); max-width: 600px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); }

/* Chart Container */
.chart-container {
  width: 100%;
  height: 240px;
  position: relative;
}

/* Footer */
.main-footer {
  margin-top: auto;
  background-color: var(--bg-card);
  border-top: 2px solid var(--border-color);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

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

/* Mobile Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 1.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  background: var(--border-color);
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1200px) {
  .logo-tagline {
    display: none;
  }
  .nav-link {
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .desktop-lang-switcher {
    display: none !important;
  }

  .header-content {
    flex-wrap: wrap;
    position: relative;
  }

  .simple-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
  }

  .simple-nav.mobile-open {
    display: flex;
    animation: fadeInDown 0.25s ease forwards;
  }

  .simple-nav.mobile-open .mobile-lang-bar {
    display: flex !important;
    padding: 0.75rem 0.5rem 0.25rem 0.5rem;
    border-top: 1px solid var(--border-color);
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    white-space: normal;
  }

  .hero-box {
    padding: 2.25rem 1.5rem !important;
  }

  .hero-title {
    font-size: 1.85rem !important;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .program-stats-grid {
    grid-template-columns: 1fr;
  }

  .habits-grid {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

@media (max-width: 576px) {
  .hero-box {
    padding: 1.75rem 1.25rem !important;
  }

  .hero-title {
    font-size: 1.5rem !important;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .logo-title {
    font-size: 1.5rem;
  }

  .logo-tagline {
    display: none;
  }

  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .memory-card {
    font-size: 1.8rem;
    border-radius: 8px;
  }

  #toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    max-width: 100%;
  }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TOAST NOTIFICATIONS SYSTEM
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 5px solid var(--accent);
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 380px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left-color: var(--success); background: #f0fdf4; color: #166534; }
.toast-error { border-left-color: var(--danger); background: #fef2f2; color: #991b1b; }
.toast-warning { border-left-color: var(--warning); background: #fffbeb; color: #92400e; }
.toast-info { border-left-color: var(--accent); background: #eff6ff; color: #1e40af; }

/* Role Badges */
.badge-role-admin {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.78rem;
}

.badge-role-user {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.78rem;
}

.badge-role-visitor {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.78rem;
}



/* ==========================================================================
   ALZHEIMER, MON DÉFI / MEU DESAFIO — PRINT STYLES & ARTICLE RULES
   ========================================================================== */
@page {
  size: 21cm 29.7cm;
  margin: 2cm;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .top-bar, .main-header, .main-footer, .no-print, button, .btn {
    display: none !important;
  }
  .view-section:not(#view-story) {
    display: none !important;
  }
  #view-story {
    display: block !important;
    padding: 0 !important;
  }
  #view-story .card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
}
