@import "tailwindcss";

@theme {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Custom palette matching FASO ZAK SONG NOOMA warm soil and golden sun */
  --color-faso-soil: #5c2c16;
  --color-faso-earth: #803b1e;
  --color-faso-gold: #e6a100;
  --color-faso-green: #006f41;
  --color-faso-red: #da291c;
  --color-faso-sand: #fbf8f3;

  --color-stone-150: #ededec;
  --color-stone-850: #211d1b;
}

/* Définition des polices avec font-display: swap et métriques de secours calibrées anti-CLS */
@font-face {
  font-family: 'FasoSans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  size-adjust: 100%;
  ascent-override: normal;
  descent-override: normal;
  line-gap-override: normal;
  src: local('system-ui'), local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI'), local('Roboto'), sans-serif;
}

@variant dark (&:where(.dark, .dark *));

@layer base {
  :root {
    --text-primary-contrast: #1a1513;   /* Ratio ~17.4:1 sur fond sable #fbf8f3 (WCAG AAA) */
    --text-secondary-contrast: #44403c; /* Ratio ~8.8:1 sur fond sable (WCAG AAA) */
    --text-muted-contrast: #57534e;     /* Ratio ~6.2:1 sur fond sable (WCAG AA) */
    --focus-ring-color: #d97706;        /* Anneau de focus visible et accessible */
    --focus-ring-offset: 2px;
  }
  .dark {
    --text-primary-contrast: #f5f5f4;   /* Ratio ~17.1:1 sur fond sombre #0c0a09 (WCAG AAA) */
    --text-secondary-contrast: #d6d3d1; /* Ratio ~11.8:1 sur fond sombre (WCAG AAA) */
    --text-muted-contrast: #a8a29e;     /* Ratio ~7.2:1 sur fond sombre (WCAG AA) */
    --focus-ring-color: #f59e0b;
  }

  /* Règle d'accessibilité WCAG AA : garantie de contrastes >= 4.5:1 en mode clair */
  :root:not(.dark) .text-stone-400,
  :root:not(.dark) .text-slate-400,
  :root:not(.dark) .text-gray-400,
  :root:not(.dark) .text-neutral-400,
  :root:not(.dark) .text-zinc-400 {
    color: #57534e !important; /* stone-600: ratio 5.6:1 sur #fbf8f3 (WCAG AA) */
  }

  :root:not(.dark) .text-stone-300,
  :root:not(.dark) .text-slate-300,
  :root:not(.dark) .text-gray-300 {
    color: #78716c !important; /* stone-500: ratio >= 4.5:1 */
  }

  :root:not(.dark) .text-amber-500,
  :root:not(.dark) .text-yellow-500,
  :root:not(.dark) .text-amber-400 {
    color: #92400e !important; /* amber-800: ratio 5.2:1 sur fond clair */
  }

  :root:not(.dark) .text-emerald-400 {
    color: #065f46 !important; /* emerald-800: ratio > 5.0:1 sur fond clair */
  }

  html {
    font-size: 100%; /* 16px par défaut, respecte le réglage de zoom du navigateur */
    min-height: 100%;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    text-size-adjust: 100%;
  }

  body {
    min-height: 100dvh;
    margin: 0;
    background-color: #fbf8f3;
    color: #1a1513;
    font-family: var(--font-sans);
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  html.dark body {
    background-color: #0c0a09;
    color: #f5f5f4;
  }

  #root {
    min-height: 100dvh;
  }

  /* Règles strictes de prévention du Cumulative Layout Shift (CLS <= 0.1) */
  img, svg:not([width]), video, iframe, embed, object {
    max-width: 100%;
    height: auto;
  }

  /* Préservation automatique du ratio géométrique pour les balises avec dimensions intrinsèques */
  img[width][height] {
    aspect-ratio: auto;
  }

  /* Ratio vidéo réservé pour éviter les sauts de contenu lors du chargement des embeds */
  iframe[src*="youtube.com"],
  iframe[src*="youtube-nocookie.com"] {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
  }

  /* Navigation au clavier : styles :focus-visible nets et contrastés sur tous les éléments interactifs */
  :focus-visible {
    outline: 3px solid var(--focus-ring-color, #d97706) !important;
    outline-offset: var(--focus-ring-offset, 2px) !important;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible,
  [role="button"]:focus-visible,
  [tabindex]:focus-visible {
    outline: 3px solid #d97706 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.25) !important;
  }

  html.dark a:focus-visible,
  html.dark button:focus-visible,
  html.dark input:focus-visible,
  html.dark select:focus-visible,
  html.dark textarea:focus-visible,
  html.dark summary:focus-visible,
  html.dark [role="button"]:focus-visible,
  html.dark [tabindex]:focus-visible {
    outline-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35) !important;
  }

  img,
  video,
  canvas,
  svg {
    max-width: 100%;
  }

  img,
  video {
    height: auto;
  }

  button,
  input,
  select,
  textarea,
  summary,
  [role="button"] {
    min-block-size: 24px;
    min-inline-size: 24px;
  }
}

/* Respect des préférences de réduction de mouvement (Accessibilité et Sobriété Numérique) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Server-rendered public shell: readable before JavaScript and dimensionally
   close to the interactive layout, reducing both FCP and layout movement. */
.initial-shell {
  min-height: 100dvh;
  background: #fcfaf7;
  color: #1c1917;
}

.initial-shell__brand {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid #e7e5e4;
  background: #fff;
}

.initial-shell__mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #6f330f;
  color: #fff;
  font-weight: 900;
}

.initial-shell__content {
  width: min(100% - 32px, 1024px);
  margin: 24px auto;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #e7d4bd;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(28 25 23 / 0.06);
}

.initial-shell__content h1 {
  max-width: 850px;
  margin: 0;
  color: #1c1917;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.initial-shell__content h2 {
  margin: 28px 0 8px;
  color: #1c1917;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.25;
}

.initial-shell__content p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #44403c;
  font-size: 1rem;
  line-height: 1.65;
}

.initial-shell__eyebrow {
  color: #6f330f !important;
  font-size: 0.82rem !important;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.initial-shell__content nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.initial-shell__content nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid #6f330f;
  border-radius: 12px;
  color: #6f330f;
  font-weight: 750;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Below-the-fold sections keep a stable intrinsic size while the browser
   postpones layout and paint work until they approach the viewport. */
.deferred-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

/* Touch interfaces receive the recommended 44px target without inflating
   ordinary inline links inside paragraphs. */
@media (pointer: coarse) {
  button,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  summary,
  [role="button"],
  nav a,
  [role="tab"] {
    min-block-size: 44px;
    min-inline-size: 44px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    min-block-size: 24px;
    min-inline-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(128, 59, 30, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 59, 30, 0.4);
}

/* GLOBAL DARK MODE OVERRIDES */
html.dark {
  background-color: #0c0a09;
}

html.dark body {
  background-color: #0c0a09;
  color: #f5f5f4;
}

/* Base card backgrounds & borders overrides */
html.dark .bg-white,
html.dark .bg-stone-50,
html.dark .bg-stone-100\/50,
html.dark .bg-\[\#fcfaf7\],
html.dark .bg-orange-50\/40,
html.dark .bg-gradient-to-br.from-slate-50 {
  background-color: #1c1917 !important; /* stone-900 */
  background-image: none !important;
  color: #f5f5f4 !important;
}

/* Specific component containers styled white in light mode */
html.dark .bg-\[\#fcfaf7\] {
  background-color: #1c1917 !important;
}

/* Texts overrides for high-contrast accessibility */
html.dark .text-stone-700,
html.dark .text-stone-800,
html.dark .text-\[\#1a1513\],
html.dark .text-\[\#1c1917\],
html.dark .text-stone-900,
html.dark .text-\[\#0c2340\],
html.dark .text-stone-600,
html.dark .text-gray-900,
html.dark .text-gray-700,
html.dark .text-gray-600 {
  color: #e7e5e4 !important; /* stone-200 */
}

html.dark .text-gray-400,
html.dark .text-stone-500,
html.dark .text-stone-400,
html.dark .text-gray-500 {
  color: #a8a29e !important; /* stone-400 */
}

/* Borders and lines dark theme tuning */
html.dark div,
html.dark .border,
html.dark button,
html.dark header,
html.dark footer,
html.dark section,
html.dark hr {
  border-color: #2e2a24 !important; /* darker stone borders to blend nicely */
}

/* Soft contrast panels like alerts to dark mode variants */
html.dark .bg-emerald-50,
html.dark .bg-emerald-500\/5,
html.dark .from-emerald-50\/60,
html.dark .to-teal-50\/30 {
  background: rgba(16, 185, 129, 0.08) !important;
  background-image: none !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}

html.dark .text-emerald-900,
html.dark .text-emerald-850,
html.dark .text-emerald-800,
html.dark .text-emerald-700 {
  color: #a7f3d0 !important;
}

html.dark .bg-amber-50,
html.dark .bg-amber-100 {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}

html.dark .text-amber-900,
html.dark .text-\[\#5c2c16\],
html.dark .text-amber-800 {
  color: #fde68a !important;
}

/* Search suggestions box & active panels */
html.dark .bg-stone-100,
html.dark .bg-orange-100\/30,
html.dark .bg-\[\#fcfaf7\] {
  background-color: #292524 !important; /* stone-800 */
  color: #f5f5f4 !important;
}

/* Custom Scrollbars dark adaptation */
html.dark ::-webkit-scrollbar-thumb {
  background: rgba(230, 161, 0, 0.25);
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 161, 0, 0.45);
}

/* Accessibility Focus Outlines (WCAG Level AA) */
:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
}

/* Accessibility contrast boosters for light mode to prevent low contrast warnings */
html:not(.dark) .text-gray-400,
html:not(.dark) .text-stone-400 {
  color: #6b6661 !important; /* Satisfies WCAG AA contrast (>= 4.5:1) on white/sand background */
}

html:not(.dark) .text-gray-500,
html:not(.dark) .text-stone-500 {
  color: #5c5752 !important; /* Deeper gray for excellent readability (>= 7.5:1) on white/sand background */
}

/* Semantic text colors on light panels. These replacements retain the brand
   hue while meeting WCAG AA for normal-size copy on white and sand. */
html:not(.dark)
  :where(.bg-white, .bg-stone-50, .bg-stone-100, .bg-amber-50, .bg-orange-50)
  :where(.text-amber-400, .text-amber-500, .text-amber-600, .text-orange-400, .text-orange-500) {
  color: #854d0e !important;
}

html:not(.dark)
  :where(.bg-white, .bg-stone-50, .bg-stone-100, .bg-emerald-50, .bg-teal-50)
  :where(.text-emerald-400, .text-emerald-500, .text-emerald-600, .text-teal-400, .text-teal-500) {
  color: #0f6455 !important;
}

html:not(.dark)
  :where(.bg-white, .bg-stone-50, .bg-stone-100, .bg-red-50)
  :where(.text-red-400, .text-red-500, .text-red-600) {
  color: #b42318 !important;
}

/* Colorblind Accessibility Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-critical {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-success {
  background-color: #dcfce7;
  color: #166534;
}

.colorblind .status-critical {
  background: #111;
  color: #fff;
  border: 2px dashed #fff;
}

.colorblind .status-success {
  background: #fff;
  color: #111;
  border: 2px solid #111;
}

/* Specific contrast boosters for emerald/teal/light green text in light mode */
html:not(.dark) .text-emerald-400,
html:not(.dark) .text-emerald-500,
html:not(.dark) .text-emerald-600,
html:not(.dark) .text-teal-400,
html:not(.dark) .text-teal-500,
html:not(.dark) .text-teal-600,
html:not(.dark) .text-emerald-300,
html:not(.dark) .text-emerald-700\/90,
html:not(.dark) .text-emerald-800\/90,
html:not(.dark) .text-\[\#52d288\],
html:not(.dark) [class*="text-emerald-450"],
html:not(.dark) [class*="text-emerald-500"],
html:not(.dark) [class*="text-emerald-400"],
html:not(.dark) [class*="text-teal-400"],
html:not(.dark) [class*="text-[#52d288]"],
html:not(.dark) [class*="text-[#72a898]"],
html:not(.dark) [class*="text-[#72A898]"],
html:not(.dark) [class*="text-[#69a191]"],
html:not(.dark) [class*="text-[#69A191]"],
html:not(.dark) [style*="#72a898"],
html:not(.dark) [style*="#72A898"],
html:not(.dark) [style*="114, 168, 152"],
html:not(.dark) [style*="#69a191"],
html:not(.dark) [style*="#69A191"],
html:not(.dark) [style*="105, 161, 145"],
html:not(.dark) [style*="#7fb0a2"],
html:not(.dark) [style*="#7fB0A2"],
html:not(.dark) [style*="127, 176, 162"],
html:not(.dark) [style*="#7cad9f"],
html:not(.dark) [style*="#7cAD9F"],
html:not(.dark) [style*="#7CAD9F"],
html:not(.dark) [style*="124, 173, 159"],
html:not(.dark) [style*="#70a697"],
html:not(.dark) [style*="#70A697"],
html:not(.dark) [style*="112, 166, 151"] {
  color: #0f766e !important; /* Elegant high-contrast deep teal that passes WCAG AA (>= 5.3:1) on emerald-50 (#ecfdf5) and on white (#ffffff) */
}

/* Let's make sure that if the contrast checker encounters #70a697, #72a898, #69a191 or #7cad9f on white, we override it or make it #055160 / #0f766e */
html:not(.dark) [style*="#70a697"],
html:not(.dark) [style*="#70A697"],
html:not(.dark) [style*="112, 166, 151"],
html:not(.dark) [style*="#72a898"],
html:not(.dark) [style*="#72A898"],
html:not(.dark) [style*="114, 168, 152"],
html:not(.dark) [style*="#69a191"],
html:not(.dark) [style*="#69A191"],
html:not(.dark) [style*="105, 161, 145"],
html:not(.dark) [style*="#7fb0a2"],
html:not(.dark) [style*="#7fB0A2"],
html:not(.dark) [style*="#7cad9f"],
html:not(.dark) [style*="#7cAD9F"],
html:not(.dark) [style*="#7CAD9F"],
html:not(.dark) [style*="124, 173, 159"] {
  color: #0f766e !important;
  fill: #0f766e !important;
}

/* 📖 MODE LECTURE FACILE (Easy Reading) ACCESSIBILITY OVERRIDES */
.easy-reading {
  font-size: 1.15rem !important; /* Increase baseline font size */
}

.easy-reading p {
  font-size: 1.25rem !important; /* Extremely legible paragraphs */
  line-height: 1.8 !important; /* Ample line height for easy parsing */
  font-weight: 500 !important; /* Thicker weight for readability */
}

/* High contrast support */
html:not(.dark) .easy-reading p,
html:not(.dark) .easy-reading span,
html:not(.dark) .easy-reading li,
html:not(.dark) .easy-reading label {
  color: #0c0a09 !important; /* Use deep charcoal/pure black for ultimate contrast (> 10:1) */
}

html.dark .easy-reading p,
html.dark .easy-reading span,
html.dark .easy-reading li,
html.dark .easy-reading label {
  color: #fafaf9 !important; /* Off-white for dark mode high contrast */
}

.easy-reading h1,
.easy-reading h2,
.easy-reading h3,
.easy-reading h4 {
  font-size: 1.55rem !important;
  font-weight: 800 !important;
}

html:not(.dark) .easy-reading h1,
html:not(.dark) .easy-reading h2,
html:not(.dark) .easy-reading h3,
html:not(.dark) .easy-reading h4 {
  color: #000000 !important; /* Obsidian black */
}

html.dark .easy-reading h1,
html.dark .easy-reading h2,
html.dark .easy-reading h3,
html.dark .easy-reading h4 {
  color: #ffffff !important;
}

.easy-reading button,
.easy-reading select,
.easy-reading input {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
}

/* Hardened borders for clear separation and contrast visual accessibility */
.easy-reading .border,
.easy-reading [class*="border-"] {
  border-color: #1c1917 !important;
  border-width: 2px !important;
}

html.dark .easy-reading .border,
html.dark .easy-reading [class*="border-"] {
  border-color: #d6d3d1 !important;
  border-width: 2px !important;
}

.easy-reading svg {
  stroke-width: 2.5px !important; /* Chunky outlines for easy visibility */
}

/* Custom responsive adaptation for the Virtual Advisor (Chat) in Fullscreen Mode */
#panel-chat {
  height: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#panel-chat.is-fullscreen {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* On mobile viewports: header has dynamic wrapped heights (approx 200px to 260px) */
@media (max-width: 767px) {
  #panel-chat.is-fullscreen {
    height: calc(100vh - 240px);
  }
}

/* Active headers on tablet viewports: header height reaches approx 160px */
@media (min-width: 768px) and (max-width: 1023px) {
  #panel-chat.is-fullscreen {
    height: calc(100vh - 160px);
  }
}

/* Active headers on desktop viewports: header is much tighter (approx 100px - 110px) */
@media (min-width: 1024px) {
  #panel-chat.is-fullscreen {
    height: calc(100vh - 110px);
  }
}

/* ==========================================================================
   WCAG AA COMPLIANCE & MODE GROS CARACTÈRES RULES
   ========================================================================== */

/* Automatically scale up all content elements when large font size classes are toggled on the html element */
html.text-lg p,
html.text-lg li,
html.text-lg td,
html.text-lg th,
html.text-lg blockquote,
html.text-lg figcaption,
html.text-lg .font-sans:not(h1):not(h2):not(h3):not(h4) {
  font-size: 1.05rem !important; /* ~16.8px (excellent readability) */
  line-height: 1.65 !important;
}

html.text-lg span:not(.font-mono),
html.text-lg div:not(.font-mono):not(.recharts-wrapper):not(svg):not(canvas),
html.text-lg button,
html.text-lg select,
html.text-lg input,
html.text-lg label,
html.text-lg a {
  font-size: 0.95rem !important; /* ~15.2px */
}

html.text-xl p,
html.text-xl li,
html.text-xl td,
html.text-xl th,
html.text-xl blockquote,
html.text-xl figcaption,
html.text-xl .font-sans:not(h1):not(h2):not(h3):not(h4) {
  font-size: 1.2rem !important; /* ~19.2px (high visibility for low-vision users) */
  line-height: 1.7 !important;
}

html.text-xl span:not(.font-mono),
html.text-xl div:not(.font-mono):not(.recharts-wrapper):not(svg):not(canvas),
html.text-xl button,
html.text-xl select,
html.text-xl input,
html.text-xl label,
html.text-xl a {
  font-size: 1.1rem !important; /* ~17.6px */
}

/* Enforce accessible focus outline on interactive elements */
:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3.5px solid #005fcc !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(0, 95, 204, 0.28) !important;
}

/* Contrast adjustment overrides for secondary texts to meet 4.5:1 ratio */
.text-stone-500, .text-gray-500 {
  color: #5c5752 !important; /* Ensure min 4.5:1 on sand/white bg */
}
html.dark .text-stone-400, html.dark .text-gray-400 {
  color: #c4c1bc !important; /* High contrast stone text on dark canvas */
}

/* ==========================================================================
   MODE CONTRASTE ÉLEVÉ (WCAG 2.1 Level AAA Compliance Overrides)
   ========================================================================== */

/* Light Theme High Contrast */
html.high-contrast {
  --color-faso-soil: #000000 !important;
  --color-faso-earth: #000000 !important;
  --color-faso-gold: #000000 !important;
  --color-faso-green: #000000 !important;
  --color-faso-red: #000000 !important;
  --color-faso-sand: #ffffff !important;
  background-color: #ffffff !important;
  color: #000000 !important;
}

html.high-contrast body {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Dark Theme High Contrast */
html.high-contrast.dark {
  --color-faso-soil: #ffffff !important;
  --color-faso-earth: #ffffff !important;
  --color-faso-gold: #ffff00 !important;
  --color-faso-green: #00ff00 !important;
  --color-faso-red: #ff0000 !important;
  --color-faso-sand: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff !important;
}

html.high-contrast.dark body {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* Enforce solid contrast colors across layout components */
html.high-contrast .bg-white,
html.high-contrast .bg-stone-50,
html.high-contrast .bg-stone-100,
html.high-contrast .bg-stone-150,
html.high-contrast .bg-stone-200,
html.high-contrast .bg-orange-50,
html.high-contrast .bg-emerald-50,
html.high-contrast .bg-\[\#fcfaf7\],
html.high-contrast .bg-stone-900,
html.high-contrast .bg-stone-950,
html.high-contrast .bg-stone-850,
html.high-contrast [class*="bg-"] {
  background-color: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

html.high-contrast.dark .bg-white,
html.high-contrast.dark .bg-stone-50,
html.high-contrast.dark .bg-stone-100,
html.high-contrast.dark .bg-stone-150,
html.high-contrast.dark .bg-stone-200,
html.high-contrast.dark .bg-\[\#fcfaf7\],
html.high-contrast.dark .bg-stone-900,
html.high-contrast.dark .bg-stone-950,
html.high-contrast.dark .bg-stone-850,
html.high-contrast.dark [class*="bg-"] {
  background-color: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

/* Font color overrides to prevent low-contrast colors */
html.high-contrast *,
html.high-contrast p,
html.high-contrast span,
html.high-contrast h1,
html.high-contrast h2,
html.high-contrast h3,
html.high-contrast h4,
html.high-contrast h5,
html.high-contrast h6,
html.high-contrast label,
html.high-contrast button,
html.high-contrast select,
html.high-contrast input,
html.high-contrast a,
html.high-contrast li {
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.high-contrast.dark *,
html.high-contrast.dark p,
html.high-contrast.dark span,
html.high-contrast.dark h1,
html.high-contrast.dark h2,
html.high-contrast.dark h3,
html.high-contrast.dark h4,
html.high-contrast.dark h5,
html.high-contrast.dark h6,
html.high-contrast.dark label,
html.high-contrast.dark button,
html.high-contrast.dark select,
html.high-contrast.dark input,
html.high-contrast.dark a,
html.high-contrast.dark li {
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Clear visual outlines for interactive elements in High Contrast */
html.high-contrast button,
html.high-contrast select,
html.high-contrast input,
html.high-contrast a {
  border: 2px solid #000000 !important;
  background-color: #ffffff !important;
}

html.high-contrast.dark button,
html.high-contrast.dark select,
html.high-contrast.dark input,
html.high-contrast.dark a {
  border: 2px solid #ffffff !important;
  background-color: #000000 !important;
}

/* Outlines for focused elements for keyboard navigation */
html.high-contrast *:focus-visible,
html.high-contrast a:focus-visible,
html.high-contrast button:focus-visible,
html.high-contrast input:focus-visible,
html.high-contrast select:focus-visible {
  outline: 4px solid #ff0000 !important;
  outline-offset: 3px !important;
}

html.high-contrast.dark *:focus-visible,
html.high-contrast.dark a:focus-visible,
html.high-contrast.dark button:focus-visible,
html.high-contrast.dark input:focus-visible,
html.high-contrast.dark select:focus-visible {
  outline: 4px solid #ffff00 !important;
  outline-offset: 3px !important;
}

/* ==========================================================================
   READER MODE / FULL-SCREEN READING SUPPORT
   Ensures legal texts and long-form content render comfortably at any width.
   ========================================================================== */
.reader-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: #fbf8f3;
  color: #1c1917;
  overflow-y: auto;
  padding: clamp(16px, 3vw, 40px);
}

html.dark .reader-fullscreen {
  background: #0c0a09;
  color: #f5f5f4;
}

.reader-fullscreen article,
.reader-fullscreen .prose {
  max-width: 78ch;
  margin-inline: auto;
  font-size: clamp(1rem, 1.4vw + 0.5rem, 1.25rem);
  line-height: 1.75;
  hyphens: auto;
  word-break: normal;
}

.reader-fullscreen p {
  margin-block: 0.85em;
  text-align: justify;
}

.reader-fullscreen h1,
.reader-fullscreen h2,
.reader-fullscreen h3 {
  line-height: 1.25;
  margin-top: 1.5em;
}

/* Justification & interline confortables pour l'ensemble des conseillers */
[data-conseiller-response] {
  line-height: 1.6;
  hyphens: auto;
}

@media (min-width: 768px) {
  [data-conseiller-response] {
    text-align: justify;
  }
}

/* Améliore la lisibilité des tableaux juridiques */
table.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.legal-table th,
table.legal-table td {
  padding: 0.6em 0.8em;
  border: 1px solid #e7e5e4;
  text-align: left;
  vertical-align: top;
}
html.dark table.legal-table th,
html.dark table.legal-table td {
  border-color: #2e2a24;
}
table.legal-table thead th {
  background: #f5f5f4;
  font-weight: 700;
}
html.dark table.legal-table thead th {
  background: #1c1917;
}

/* Quiz Full-Screen Ergonomics — questions plus lisibles sur petits écrans */
.quiz-question-block {
  padding: clamp(12px, 2vw, 20px);
}
.quiz-question-block .quiz-question-title {
  font-size: clamp(1rem, 1.1vw + 0.7rem, 1.15rem);
  line-height: 1.55;
}

/* Support des zones tactiles élargies sur les certificats interactifs */
.certificate-preview {
  aspect-ratio: 1.414 / 1;
  border-radius: 24px;
  background: linear-gradient(140deg, #fff7ea, #fdf4e5 55%, #f2e6cf);
  border: 2px solid #d5a05f;
  padding: clamp(20px, 4vw, 40px);
  color: #4a2a10;
  overflow: hidden;
  position: relative;
}
html.dark .certificate-preview {
  background: linear-gradient(140deg, #241a10, #1c150c 55%, #171009);
  color: #f7dfb0;
  border-color: #7a5023;
}

/* Boutons flottants — meilleure visibilité en mode plein écran */
.fab-emergency {
  position: fixed;
  bottom: clamp(18px, 3vw, 28px);
  right: clamp(18px, 3vw, 28px);
  z-index: 60;
}

/* Masquer proprement le loader initial une fois React monté */
#root:has(> :not(.initial-shell)) .initial-shell {
  display: none;
}


/* ==========================================================================
   FASO ZAK SONG NOOMA — DESIGN SYSTEM 2026
   Modern civic interface layer. This section intentionally sits last so it
   can refine legacy utility combinations without changing business behavior.
   ========================================================================== */

:root {
  --fzn-canvas: #f7f3ed;
  --fzn-surface: rgba(255, 255, 255, 0.92);
  --fzn-surface-solid: #fffdf9;
  --fzn-surface-soft: #f3ece3;
  --fzn-text: #221711;
  --fzn-muted: #6d625b;
  --fzn-border: rgba(91, 60, 40, 0.14);
  --fzn-brand: #713617;
  --fzn-brand-strong: #55260d;
  --fzn-gold: #d39b23;
  --fzn-green: #176346;
  --fzn-blue: #315b74;
  --fzn-shadow-sm: 0 12px 34px -24px rgba(61, 34, 19, 0.42);
  --fzn-shadow-md: 0 24px 60px -34px rgba(61, 34, 19, 0.42);
  --fzn-shadow-lg: 0 36px 90px -48px rgba(61, 34, 19, 0.52);
  --fzn-radius: 24px;
}

html.dark {
  --fzn-canvas: #100d0b;
  --fzn-surface: rgba(28, 25, 23, 0.9);
  --fzn-surface-solid: #1c1917;
  --fzn-surface-soft: #211d1a;
  --fzn-text: #faf8f5;
  --fzn-muted: #b9b0aa;
  --fzn-border: rgba(255, 255, 255, 0.09);
  --fzn-brand: #f4bd64;
  --fzn-brand-strong: #ffd38d;
  --fzn-gold: #e7ae45;
  --fzn-green: #6fca9d;
  --fzn-blue: #8cc4df;
  --fzn-shadow-sm: 0 16px 38px -26px rgba(0, 0, 0, 0.8);
  --fzn-shadow-md: 0 28px 70px -38px rgba(0, 0, 0, 0.9);
  --fzn-shadow-lg: 0 40px 100px -48px rgba(0, 0, 0, 0.95);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(211, 155, 35, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(23, 99, 70, 0.08), transparent 26rem),
    var(--fzn-canvas);
  color: var(--fzn-text);
}

html.dark body {
  background:
    radial-gradient(circle at 12% 0%, rgba(211, 155, 35, 0.08), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(23, 99, 70, 0.07), transparent 24rem),
    var(--fzn-canvas);
}

::selection {
  background: rgba(211, 155, 35, 0.28);
  color: var(--fzn-text);
}

.app-shell {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 24rem),
    transparent !important;
}

html.dark .app-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 22rem) !important;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.65;
  background-image:
    linear-gradient(rgba(113, 54, 23, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 54, 23, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--fzn-border) !important;
  background: color-mix(in srgb, var(--fzn-surface-solid) 98%, transparent) !important;
  box-shadow: 0 4px 20px -15px rgba(56, 30, 16, 0.35) !important;
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
}

.app-topbar__inner {
  width: min(100%, 88rem);
  margin-inline: auto;
}

.app-connection-status {
  display: inline-flex;
  min-height: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  margin-inline-start: auto;
  padding: 0.25rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.app-connection-status:hover {
  transform: translateY(-1px);
}

.app-connection-status--online {
  border-color: rgba(5, 150, 105, 0.2);
  background: rgba(236, 253, 245, 0.82);
  color: #047857;
}

.app-connection-status--offline {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(255, 251, 235, 0.9);
  color: #a16207;
}

html.dark .app-connection-status--online {
  background: rgba(6, 78, 59, 0.28);
  color: #6ee7b7;
}

html.dark .app-connection-status--offline {
  background: rgba(120, 53, 15, 0.28);
  color: #fcd34d;
}

.app-primary-nav {
  width: min(100%, 88rem);
  margin-inline: auto;
  scrollbar-width: none;
}

.app-primary-nav::-webkit-scrollbar {
  display: none;
}

.app-primary-nav__list {
  min-width: 0;
}

.app-nav-tab {
  position: relative;
  border: 1px solid var(--fzn-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  transform: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease !important;
}

.app-nav-tab:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--fzn-shadow-sm) !important;
}

.app-nav-tab--active {
  border-color: transparent !important;
  background: linear-gradient(135deg, #7a3b19, #5a280f) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px -18px rgba(90, 40, 15, 0.72) !important;
}

html.dark .app-nav-tab--active {
  background: linear-gradient(135deg, #9f662c, #744216) !important;
  color: #fffaf4 !important;
}

.app-main {
  width: min(100%, 88rem) !important;
  padding-inline: clamp(1rem, 2.5vw, 2rem) !important;
  padding-block: clamp(1rem, 2vw, 1.75rem) !important;
}

.app-accessibility-card {
  border: 1px solid rgba(211, 155, 35, 0.22) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(251, 247, 241, 0.86)) !important;
  box-shadow: var(--fzn-shadow-sm) !important;
  backdrop-filter: blur(10px);
}

html.dark .app-accessibility-card {
  background: linear-gradient(135deg, rgba(35, 30, 27, 0.92), rgba(24, 21, 19, 0.9)) !important;
}

.app-page-panel {
  min-width: 0;
  animation: fzn-page-enter 330ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fzn-page-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-footer {
  border-top: 1px solid var(--fzn-border) !important;
  background: color-mix(in srgb, var(--fzn-surface-solid) 88%, transparent) !important;
  backdrop-filter: blur(12px);
}

.app-mobile-nav {
  left: 12px !important;
  right: 12px !important;
  bottom: 10px !important;
  border: 1px solid var(--fzn-border) !important;
  border-radius: 22px !important;
  background: color-mix(in srgb, var(--fzn-surface-solid) 90%, transparent) !important;
  box-shadow: 0 22px 56px -28px rgba(54, 28, 13, 0.72) !important;
  overflow: visible;
  backdrop-filter: saturate(150%) blur(18px);
}

.app-mobile-sheet {
  left: 12px !important;
  right: 12px !important;
  bottom: 84px !important;
  border: 1px solid var(--fzn-border) !important;
  border-radius: 28px !important;
  background: var(--fzn-surface-solid) !important;
  box-shadow: 0 34px 85px -28px rgba(33, 16, 7, 0.8) !important;
}

.app-panic-fab {
  box-shadow: 0 18px 40px -18px rgba(185, 28, 28, 0.7) !important;
}

/* Shared component modernization across all application pages. */
#main-content :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: var(--fzn-border) !important;
  border-radius: 14px !important;
  background-color: color-mix(in srgb, var(--fzn-surface-solid) 92%, transparent) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 26px -25px rgba(50, 29, 18, 0.45);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#main-content :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: rgba(113, 54, 23, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(211, 155, 35, 0.13) !important;
}

#main-content :where(.bg-white.rounded-2xl, .bg-white.rounded-3xl, .bg-white.rounded-\[2rem\], .dark\:bg-stone-900.rounded-2xl, .dark\:bg-stone-900.rounded-3xl) {
  border-color: var(--fzn-border) !important;
  box-shadow: var(--fzn-shadow-sm);
}

#main-content :where(button, a)[class*="transition"] {
  transition-duration: 180ms !important;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

#main-content :where(button, a):not(:disabled):active {
  transform: translateY(1px);
}

#main-content table:not(.recharts-wrapper table) {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--fzn-border);
  border-radius: 16px;
  background: var(--fzn-surface-solid);
}

#main-content table th {
  background: color-mix(in srgb, var(--fzn-surface-soft) 80%, transparent);
  color: var(--fzn-text);
  font-weight: 800;
}

#main-content table th,
#main-content table td {
  border-color: var(--fzn-border) !important;
}

/* Home page */
.fzn-home {
  padding-bottom: 1rem;
}

.fzn-hero {
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 240, 0.92) 55%, rgba(239, 248, 244, 0.92)) !important;
}

html.dark .fzn-hero {
  background:
    linear-gradient(135deg, rgba(31, 27, 24, 0.98), rgba(30, 25, 20, 0.98) 55%, rgba(20, 31, 27, 0.96)) !important;
}

.fzn-hero__glow {
  position: absolute;
  width: 27rem;
  height: 27rem;
  top: -13rem;
  right: -8rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(211, 155, 35, 0.22), rgba(211, 155, 35, 0) 68%);
  filter: blur(2px);
}

.fzn-hero__glow::after {
  content: "";
  position: absolute;
  width: 23rem;
  height: 23rem;
  left: -18rem;
  top: 18rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(23, 99, 70, 0.16), rgba(23, 99, 70, 0) 68%);
}

.fzn-hero__panel {
  backdrop-filter: blur(16px);
}

.fzn-flow-step {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.fzn-flow-step:hover {
  transform: translateX(3px);
  border-color: rgba(211, 155, 35, 0.4) !important;
  box-shadow: var(--fzn-shadow-sm);
}

.fzn-section-kicker {
  margin: 0;
  color: var(--fzn-brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fzn-button {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.fzn-button:hover {
  transform: translateY(-2px);
}

.fzn-button--primary {
  background: linear-gradient(135deg, #7a3b19, #56250d) !important;
  box-shadow: 0 16px 32px -20px rgba(93, 42, 15, 0.82);
}

.fzn-button--primary:hover {
  box-shadow: 0 20px 38px -20px rgba(93, 42, 15, 0.9);
}

.fzn-button--secondary {
  border-color: rgba(113, 54, 23, 0.24) !important;
  background: rgba(255, 255, 255, 0.68) !important;
  box-shadow: var(--fzn-shadow-sm);
}

html.dark .fzn-button--secondary {
  background: rgba(28, 25, 23, 0.72) !important;
}

.fzn-feature-card {
  border-color: var(--fzn-border) !important;
  box-shadow: var(--fzn-shadow-sm);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, border-color 220ms ease;
}

.fzn-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--fzn-shadow-md);
}

.fzn-feature-card--amber:hover { border-color: rgba(211, 155, 35, 0.38) !important; }
.fzn-feature-card--green:hover { border-color: rgba(23, 99, 70, 0.34) !important; }
.fzn-feature-card--blue:hover { border-color: rgba(49, 91, 116, 0.34) !important; }

.fzn-feature-card--amber .fzn-feature-icon { background: #fff3d8; color: #7a3b19; }
.fzn-feature-card--green .fzn-feature-icon { background: #e7f5ee; color: #176346; }
.fzn-feature-card--blue .fzn-feature-icon { background: #e9f2f7; color: #315b74; }
html.dark .fzn-feature-card--amber .fzn-feature-icon { background: rgba(211,155,35,.12); color: #f3c877; }
html.dark .fzn-feature-card--green .fzn-feature-icon { background: rgba(23,99,70,.16); color: #7ed4aa; }
html.dark .fzn-feature-card--blue .fzn-feature-icon { background: rgba(49,91,116,.2); color: #9bc9df; }

.fzn-soft-section {
  border: 1px solid rgba(113, 54, 23, 0.1);
  background:
    linear-gradient(135deg, rgba(244, 236, 227, 0.82), rgba(251, 248, 244, 0.92) 52%, rgba(234, 245, 239, 0.78));
}

html.dark .fzn-soft-section {
  border-color: var(--fzn-border);
  background: linear-gradient(135deg, rgba(42, 34, 29, 0.9), rgba(29, 26, 24, 0.96) 52%, rgba(23, 36, 31, 0.82));
}

.fzn-counselor-card {
  box-shadow: var(--fzn-shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.fzn-counselor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fzn-shadow-md);
}

.fzn-counselor-card--amber { border-color: rgba(211, 155, 35, 0.28); background: rgba(255, 248, 230, 0.84); color: #713617; }
.fzn-counselor-card--rose { border-color: rgba(190, 70, 82, 0.22); background: rgba(255, 241, 242, 0.84); color: #9b2f3d; }
.fzn-counselor-card--emerald { border-color: rgba(23, 99, 70, 0.22); background: rgba(235, 247, 240, 0.86); color: #176346; }
html.dark .fzn-counselor-card--amber { background: rgba(78, 49, 20, 0.28); color: #f1c777; }
html.dark .fzn-counselor-card--rose { background: rgba(78, 32, 39, 0.25); color: #f2a3ad; }
html.dark .fzn-counselor-card--emerald { background: rgba(22, 65, 48, 0.26); color: #8bd5b2; }

.fzn-counselor-icon {
  background: color-mix(in srgb, currentColor 11%, transparent);
}

.fzn-step-card {
  box-shadow: var(--fzn-shadow-sm);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.fzn-step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(113, 54, 23, 0.24) !important;
  box-shadow: var(--fzn-shadow-md);
}

.fzn-trust-panel {
  box-shadow: var(--fzn-shadow-md);
}

.fzn-trust-panel__aside {
  border-left: 1px solid rgba(23, 99, 70, 0.13);
  background: linear-gradient(145deg, #edf8f2, #f7f2e9);
}

html.dark .fzn-trust-panel__aside {
  border-left-color: rgba(111, 202, 157, 0.1);
  background: linear-gradient(145deg, rgba(19, 57, 42, 0.42), rgba(50, 37, 22, 0.34));
}

.fzn-limits-panel {
  border-color: rgba(211, 155, 35, 0.28) !important;
  background: linear-gradient(135deg, rgba(255, 249, 235, 0.88), rgba(255, 253, 249, 0.94));
  box-shadow: var(--fzn-shadow-sm);
}

html.dark .fzn-limits-panel {
  background: linear-gradient(135deg, rgba(64, 46, 19, 0.28), rgba(28, 25, 23, 0.92));
}

/* Static pre-hydration shell updated to visually match the interactive app. */
.initial-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(211, 155, 35, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(23, 99, 70, 0.08), transparent 26rem),
    #f7f3ed;
}

.initial-shell__brand {
  min-height: 82px;
  border-bottom: 1px solid rgba(91, 60, 40, 0.12);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(16px);
}

.initial-shell__mark {
  border-radius: 14px;
  background: linear-gradient(135deg, #7a3b19, #56250d);
  box-shadow: 0 14px 28px -18px rgba(90, 40, 15, 0.8);
}

.initial-shell__content {
  width: min(100% - 32px, 1180px);
  margin: clamp(20px, 4vw, 44px) auto;
  border-color: rgba(91, 60, 40, 0.14);
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--fzn-shadow-lg);
}

.initial-shell__content nav a {
  border-color: rgba(113, 54, 23, 0.22);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
}

@media (max-width: 767px) {
  .app-main {
    padding: 0.85rem 0.85rem 6.5rem !important;
  }

  .app-accessibility-card {
    align-items: stretch !important;
    border-radius: 22px !important;
  }

  .fzn-hero {
    border-radius: 26px !important;
  }

  .fzn-hero__glow {
    width: 20rem;
    height: 20rem;
    top: -10rem;
    right: -10rem;
  }

  .fzn-trust-panel__aside {
    border-left: 0;
    border-top: 1px solid rgba(23, 99, 70, 0.13);
  }

  .initial-shell__content {
    border-radius: 24px;
  }
}

@media (min-width: 768px) {
  .app-primary-nav {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-primary-nav__list {
    flex-wrap: nowrap !important;
  }

  .app-nav-tab {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-page-panel,
  .fzn-feature-card,
  .fzn-flow-step,
  .fzn-step-card,
  .fzn-button,
  .app-nav-tab {
    animation: none !important;
    transform: none !important;
  }
}

.fzn-brand-logo > svg,
.fzn-brand-logo > img {
  filter: drop-shadow(0 10px 14px rgba(72, 35, 16, 0.13));
}

.fzn-brand-logo__title {
  color: #2b1a12 !important;
}

html.dark .fzn-brand-logo__title {
  color: #fff8ef !important;
}

.fzn-brand-logo__subtitle {
  color: #176346 !important;
}

html.dark .fzn-brand-logo__subtitle {
  color: #84d0ac !important;
}

/* Cross-page visual normalization for legacy screens. */
#main-content :where(.bg-slate-50, .bg-gray-50) {
  background-color: color-mix(in srgb, var(--fzn-surface-soft) 68%, transparent) !important;
}

#main-content :where([role="tablist"]):not(.app-primary-nav__list) {
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--fzn-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--fzn-surface-soft) 72%, transparent);
}

#main-content :where([role="tab"]):not(.app-nav-tab) {
  border-radius: 12px !important;
}

#main-content :where(.shadow-sm, .shadow-xs, .shadow-md) {
  --tw-shadow-color: transparent;
}

#main-content :where(.overflow-x-auto) {
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 54, 23, 0.3) transparent;
}

#main-content :where(h1, h2, h3) {
  text-wrap: balance;
}

#main-content :where(p, li) {
  text-wrap: pretty;
}

/* Preserve the dedicated high-contrast experience over the visual theme. */
html.high-contrast :where(
  .app-shell,
  .app-topbar,
  .app-accessibility-card,
  .app-footer,
  .app-mobile-nav,
  .app-mobile-sheet,
  .fzn-hero,
  .fzn-hero__panel,
  .fzn-soft-section,
  .fzn-feature-card,
  .fzn-counselor-card,
  .fzn-step-card,
  .fzn-trust-panel,
  .fzn-trust-panel__aside,
  .fzn-limits-panel,
  .fzn-flow-step
) {
  background: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html.high-contrast.dark :where(
  .app-shell,
  .app-topbar,
  .app-accessibility-card,
  .app-footer,
  .app-mobile-nav,
  .app-mobile-sheet,
  .fzn-hero,
  .fzn-hero__panel,
  .fzn-soft-section,
  .fzn-feature-card,
  .fzn-counselor-card,
  .fzn-step-card,
  .fzn-trust-panel,
  .fzn-trust-panel__aside,
  .fzn-limits-panel,
  .fzn-flow-step
) {
  background: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

html.high-contrast .fzn-hero__glow,
html.high-contrast .app-shell::before {
  display: none !important;
}

@media (max-width: 420px) {
  .app-mobile-nav {
    left: 7px !important;
    right: 7px !important;
  }

  .app-mobile-nav > div {
    height: 62px !important;
  }

  .app-mobile-nav button span {
    font-size: 9px;
  }

  .fzn-home h1 {
    font-size: clamp(2.15rem, 11vw, 3rem) !important;
  }
}

.app-header-actions {
  scrollbar-width: none;
}
.app-header-actions::-webkit-scrollbar { display: none; }

.app-mobile-sheet :where(button.rounded-xl) {
  border-color: var(--fzn-border) !important;
  background-color: color-mix(in srgb, var(--fzn-surface-soft) 66%, transparent) !important;
  box-shadow: none;
}

.app-mobile-sheet :where(button.rounded-xl):hover {
  background-color: color-mix(in srgb, var(--fzn-surface-soft) 88%, transparent) !important;
}

.app-mobile-nav button {
  border-radius: 14px;
}

@media (max-width: 767px) {
  .app-brand-row {
    width: 100%;
    align-items: center !important;
    justify-content: space-between;
    gap: 0.75rem !important;
  }

  .app-brand-row > button:first-child {
    align-self: flex-start;
  }

  .app-header-actions {
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
  }

  .app-header-actions > * {
    flex: 0 0 auto;
  }

  .app-topbar .fzn-brand-logo__title {
    max-width: 13.5rem;
  }

  .app-topbar .fzn-brand-logo > div > span:last-child {
    display: none !important;
  }
}

/* Shared overlays, menus and loading states */
.fzn-modal-backdrop {
  animation: fzn-fade-in 160ms ease-out both;
}

.fzn-modal-panel {
  border-color: var(--fzn-border) !important;
  background: var(--fzn-surface-solid) !important;
  box-shadow: 0 34px 100px -38px rgba(28, 14, 6, 0.75) !important;
  animation: fzn-modal-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fzn-toast {
  animation: fzn-toast-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fzn-skeleton {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--fzn-surface-soft) 88%, #d8d0c8) !important;
}

.fzn-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: fzn-shimmer 1.35s ease-in-out infinite;
}

html.dark .fzn-skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}

.app-language-selector__trigger,
.app-language-selector__menu {
  border-color: var(--fzn-border) !important;
  background-color: var(--fzn-surface-solid) !important;
}

.app-language-selector__menu {
  box-shadow: var(--fzn-shadow-md) !important;
  animation: fzn-menu-in 150ms ease-out both;
}

@keyframes fzn-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fzn-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fzn-toast-in {
  from { opacity: 0; transform: translate(-50%, 10px) scale(.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes fzn-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fzn-shimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .fzn-modal-backdrop,
  .fzn-modal-panel,
  .fzn-toast,
  .app-language-selector__menu,
  .fzn-skeleton::after {
    animation: none !important;
  }
}

/* ==========================================================================
   Navigation Hub 2026-08-07
   Keeps the primary navigation compact while making every application space
   directly discoverable on desktop, tablet and mobile.
   ========================================================================== */

.app-primary-nav {
  position: relative;
  overflow: visible !important;
  flex-wrap: wrap;
}

.app-primary-nav__list {
  flex: 1 1 42rem;
  min-width: 0;
  flex-wrap: wrap !important;
}

.app-primary-nav__utilities {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-nav-explorer {
  border-style: dashed !important;
}

.app-nav-explorer__count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  padding-inline: 0.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.app-desktop-nav-backdrop {
  background: rgba(31, 18, 10, 0.16);
  backdrop-filter: blur(1px);
}

.app-desktop-nav-hub {
  top: calc(100% + 0.7rem);
  left: 50%;
  width: min(calc(100vw - 2rem), 88rem);
  max-height: min(72vh, 46rem);
  transform: translateX(-50%);
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid var(--fzn-border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--fzn-surface-solid) 97%, transparent);
  box-shadow: 0 32px 90px -34px rgba(43, 22, 10, 0.76);
  backdrop-filter: saturate(145%) blur(22px);
  -webkit-backdrop-filter: saturate(145%) blur(22px);
}

.app-nav-hub__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-nav-hub__eyebrow {
  margin: 0 0 0.2rem;
  color: var(--fzn-brand);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.app-nav-hub__title {
  margin: 0;
  color: var(--fzn-text);
  font-family: var(--font-display, inherit);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1.2;
}

.app-nav-hub__subtitle {
  max-width: 42rem;
  margin: 0.3rem 0 0;
  color: var(--fzn-text-muted, #78716c);
  font-size: 0.76rem;
  line-height: 1.45;
}

.app-nav-hub__close {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--fzn-border);
  border-radius: 12px;
  background: var(--fzn-surface-soft);
  color: var(--fzn-text);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.app-nav-hub__close:hover {
  transform: rotate(3deg);
  background: color-mix(in srgb, var(--fzn-surface-soft) 72%, var(--fzn-brand) 8%);
}

.app-nav-hub__search {
  display: flex;
  min-height: 2.85rem;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0 0.9rem;
  border: 1px solid var(--fzn-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--fzn-surface-soft) 75%, transparent);
  color: var(--fzn-text-muted, #78716c);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.app-nav-hub__search:focus-within {
  border-color: rgba(113, 54, 23, 0.48);
  background: var(--fzn-surface-solid);
  box-shadow: 0 0 0 4px rgba(211, 155, 35, 0.12);
}

.app-nav-hub__search input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: var(--fzn-text);
  font-size: 0.82rem;
  font-weight: 650;
  box-shadow: none !important;
}

.app-nav-hub__search input::placeholder {
  color: color-mix(in srgb, var(--fzn-text-muted, #78716c) 80%, transparent);
  font-weight: 550;
}

.app-nav-hub__groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.app-nav-hub__group {
  min-width: 0;
}

.app-nav-hub__group-title {
  margin: 0 0 0.45rem;
  padding-inline: 0.15rem;
  color: var(--fzn-text-muted, #78716c);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.app-nav-hub__items {
  display: grid;
  gap: 0.4rem;
}

.app-nav-hub__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 3.65rem;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.58rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--fzn-text);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.app-nav-hub__item:hover,
.app-nav-hub__item:focus-visible {
  transform: translateY(-1px);
  border-color: var(--fzn-border);
  background: color-mix(in srgb, var(--fzn-surface-soft) 82%, transparent);
  box-shadow: 0 12px 28px -24px rgba(58, 29, 12, 0.66);
}

.app-nav-hub__item--active {
  border-color: rgba(113, 54, 23, 0.2);
  background: linear-gradient(135deg, rgba(211, 155, 35, 0.13), rgba(23, 99, 70, 0.08));
}

.app-nav-hub__icon {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--fzn-brand) 10%, var(--fzn-surface-soft));
  color: var(--fzn-brand);
}

.app-nav-hub__item--active .app-nav-hub__icon {
  background: linear-gradient(135deg, #7a3b19, #5a280f);
  color: #fff;
}

.app-nav-hub__copy {
  min-width: 0;
}

.app-nav-hub__copy strong,
.app-nav-hub__copy small {
  display: block;
  min-width: 0;
}

.app-nav-hub__copy strong {
  overflow: hidden;
  color: var(--fzn-text);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav-hub__copy small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.16rem;
  color: var(--fzn-text-muted, #78716c);
  font-size: 0.64rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.app-nav-hub__chevron {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--fzn-text-muted, #78716c) 70%, transparent);
  transition: transform 160ms ease;
}

.app-nav-hub__item:hover .app-nav-hub__chevron {
  transform: translateX(2px);
}

.app-nav-hub__empty {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px dashed var(--fzn-border);
  border-radius: 16px;
  color: var(--fzn-text-muted, #78716c);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.app-nav-hub__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--fzn-border);
}

.app-nav-hub__quick-actions button {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  gap: 0.48rem;
  padding: 0.55rem 0.78rem;
  border: 1px solid var(--fzn-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--fzn-surface-soft) 72%, transparent);
  color: var(--fzn-text);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.app-nav-hub__quick-actions button:hover,
.app-nav-hub__quick-actions button:focus-visible {
  border-color: rgba(113, 54, 23, 0.35);
  background: color-mix(in srgb, var(--fzn-surface-soft) 86%, var(--fzn-brand) 4%);
}

/* Mobile compact dock: Accueil, Chat, Compétences, Profil, Plus. */
.app-mobile-nav {
  padding: 0 !important;
}

.app-mobile-nav__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 4.15rem;
  align-items: stretch;
  gap: 0.18rem;
  padding: 0.3rem;
}

.app-mobile-nav__item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 3.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.28rem 0.12rem;
  border: 0;
  border-radius: 16px !important;
  background: transparent;
  color: var(--fzn-text-muted, #78716c);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-mobile-nav__item span {
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: 0.59rem !important;
  font-weight: 780;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-mobile-nav__item--active {
  background: linear-gradient(145deg, rgba(122, 59, 25, 0.12), rgba(211, 155, 35, 0.11));
  color: var(--fzn-brand);
}

html.dark .app-mobile-nav__item--active {
  background: linear-gradient(145deg, rgba(211, 155, 35, 0.16), rgba(122, 59, 25, 0.13));
  color: #f1c777;
}

.app-mobile-nav__item:active {
  transform: scale(0.97);
}

.app-mobile-nav__more::after {
  content: "";
  position: absolute;
  top: 0.52rem;
  right: 0.85rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #d39b23;
  box-shadow: 0 0 0 2px var(--fzn-surface-solid);
}

.app-mobile-sheet {
  max-height: min(82vh, 44rem) !important;
  padding-bottom: 0 !important;
}

.app-mobile-sheet__handle {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  padding: 0.48rem 0 0.12rem;
}

.app-mobile-sheet__handle span {
  width: 2.6rem;
  height: 0.25rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fzn-text-muted, #78716c) 32%, transparent);
}

.app-mobile-sheet__header {
  flex: 0 0 auto;
  padding: 0.6rem 1rem 0.55rem;
}

.app-mobile-sheet__search-wrap {
  flex: 0 0 auto;
  padding: 0 1rem 0.72rem;
  border-bottom: 1px solid var(--fzn-border);
}

.app-mobile-sheet__search-wrap .app-nav-hub__search {
  margin-top: 0.45rem;
}

.app-mobile-sheet__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.8rem 1rem 1rem;
  scrollbar-width: thin;
}

.app-mobile-sheet__content .app-nav-hub__group + .app-nav-hub__group {
  margin-top: 1rem;
}

.app-mobile-hub-grid {
  grid-template-columns: minmax(0, 1fr);
}

.app-mobile-sheet__content .app-nav-hub__item {
  min-height: 3.8rem;
  border-color: var(--fzn-border);
  background: color-mix(in srgb, var(--fzn-surface-soft) 55%, transparent);
}

.app-mobile-sheet__utilities {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.65rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--fzn-border);
  background: color-mix(in srgb, var(--fzn-surface-solid) 96%, transparent);
}

.app-mobile-sheet__utility {
  display: flex;
  min-width: 0;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--fzn-border);
  border-radius: 12px;
  background: var(--fzn-surface-soft);
  color: var(--fzn-text);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.app-mobile-sheet__utility--danger {
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(254, 226, 226, 0.72);
  color: #b91c1c;
}

html.dark .app-mobile-sheet__utility--danger {
  background: rgba(127, 29, 29, 0.2);
  color: #fca5a5;
}

@media (min-width: 430px) and (max-width: 767px) {
  .app-mobile-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-mobile-sheet__content .app-nav-hub__item {
    min-height: 4.25rem;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .app-primary-nav__list {
    flex-basis: 100%;
  }

  .app-primary-nav__utilities {
    width: 100%;
    justify-content: flex-start;
  }

  .app-nav-hub__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) and (max-width: 1380px) {
  .app-nav-hub__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 370px) {
  .app-mobile-nav {
    left: 4px !important;
    right: 4px !important;
  }

  .app-mobile-nav__inner {
    gap: 0;
    padding-inline: 0.15rem;
  }

  .app-mobile-nav__item span {
    font-size: 0.54rem !important;
  }

  .app-mobile-nav__more::after {
    right: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-nav-hub__item,
  .app-nav-hub__close,
  .app-mobile-nav__item,
  .app-nav-hub__chevron {
    transition: none !important;
    transform: none !important;
  }
}

/* Prompt 25: Skip-links accessibilité clavier */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #713617;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: 0 0 6px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  outline: 2px solid #e6a100;
  outline-offset: 1px;
}

.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Styles de listes à puces enrichies et tableaux (LMS & Champs pédagogiques)
   ========================================================================== */

/* Puces personnalisées dans l'éditeur et le rendu sécurisé */
.rich-text-content ul[data-bullet-style="circle"],
.safe-rich-text ul[data-bullet-style="circle"],
ul[data-bullet-style="circle"] {
  list-style-type: circle !important;
}

.rich-text-content ul[data-bullet-style="square"],
.safe-rich-text ul[data-bullet-style="square"],
ul[data-bullet-style="square"] {
  list-style-type: square !important;
}

.rich-text-content ul[data-bullet-style="dash"],
.safe-rich-text ul[data-bullet-style="dash"],
ul[data-bullet-style="dash"] {
  list-style-type: "— " !important;
}

.rich-text-content ul[data-bullet-style="arrow"],
.safe-rich-text ul[data-bullet-style="arrow"],
ul[data-bullet-style="arrow"] {
  list-style-type: "➔ " !important;
}

.rich-text-content ul[data-bullet-style="check"],
.safe-rich-text ul[data-bullet-style="check"],
ul[data-bullet-style="check"] {
  list-style-type: "✓ " !important;
}

.rich-text-content ul[data-bullet-style="star"],
.safe-rich-text ul[data-bullet-style="star"],
ul[data-bullet-style="star"] {
  list-style-type: "★ " !important;
}

.rich-text-content ul[data-bullet-style="diamond"],
.safe-rich-text ul[data-bullet-style="diamond"],
ul[data-bullet-style="diamond"] {
  list-style-type: "◆ " !important;
}

.rich-text-content ul[data-bullet-style="disc"],
.safe-rich-text ul[data-bullet-style="disc"],
ul[data-bullet-style="disc"] {
  list-style-type: disc !important;
}

/* Tableaux pour l'éditeur et l'affichage des cours */
.rich-text-content table,
.safe-rich-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  border: 1px solid #d6d3d1;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  overflow: hidden;
}

.dark .rich-text-content table,
.dark .safe-rich-text table {
  border-color: #44403c;
}

.rich-text-content th,
.safe-rich-text th {
  border: 1px solid #d6d3d1;
  background-color: #f5f5f4;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  text-align: left;
  color: #1c1917;
}

.dark .rich-text-content th,
.dark .safe-rich-text th {
  border-color: #44403c;
  background-color: #292524;
  color: #fafaf9;
}

.rich-text-content td,
.safe-rich-text td {
  border: 1px solid #e7e5e4;
  padding: 0.5rem 0.75rem;
  vertical-align: top;
  color: #292524;
}

.dark .rich-text-content td,
.dark .safe-rich-text td {
  border-color: #44403c;
  color: #e7e5e4;
}

.rich-text-content tr:nth-child(even),
.safe-rich-text tr:nth-child(even) {
  background-color: #fafaf9;
}

.dark .rich-text-content tr:nth-child(even),
.dark .safe-rich-text tr:nth-child(even) {
  background-color: #1c1917;
}

.rich-text-content table th p,
.rich-text-content table td p,
.safe-rich-text table th p,
.safe-rich-text table td p {
  margin: 0;
}
