/* ===========================================
   CONJUGUE-MOI - Global Accessibility Styles
   =========================================== */

/* CSS Variables for Accessibility */
:root {
  --line-spacing: 1.5;
  --letter-spacing: 0em;
}

/* Apply line spacing globally */
body {
  line-height: var(--line-spacing);
  letter-spacing: var(--letter-spacing);
}

/* High Contrast Mode */
.high-contrast {
  --bg-primary: #ffffff;
  --bg-secondary: #000000;
  --text-primary: #000000;
  --text-secondary: #ffffff;
  --border-color: #000000;
}

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

.high-contrast * {
  border-color: #000000 !important;
}

.high-contrast a,
.high-contrast button {
  text-decoration: underline !important;
}

.high-contrast .bg-indigo-600,
.high-contrast .bg-indigo-500,
.high-contrast .bg-violet-600,
.high-contrast .bg-violet-500 {
  background-color: #000000 !important;
  color: #ffffff !important;
}

.high-contrast .text-indigo-600,
.high-contrast .text-violet-600 {
  color: #000000 !important;
  font-weight: bold !important;
}

.high-contrast .bg-slate-50,
.high-contrast .bg-slate-100,
.high-contrast .bg-gray-50,
.high-contrast .bg-gray-100 {
  background-color: #ffffff !important;
  border: 2px solid #000000 !important;
}

/* Reduce Motion Mode */
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.reduce-motion .blob-animation,
.reduce-motion .float-animation {
  animation: none !important;
}

/* Dyslexia Font Mode - OpenDyslexic */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.0/OpenDyslexic-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.0/OpenDyslexic-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

.dyslexia-font body,
.dyslexia-font * {
  font-family: 'OpenDyslexic', 'Comic Sans MS', 'Arial', sans-serif !important;
}

.dyslexia-font {
  word-spacing: 0.15em;
  letter-spacing: 0.05em;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid #6366f1;
  outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #4f46e5;
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s;
}

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

/* Tailwind animate-in utilities */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInFromRight {
  from { transform: translateX(8px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.animate-in {
  animation-duration: 200ms;
  animation-fill-mode: both;
}

.fade-in {
  animation-name: fadeIn;
}

.slide-in-from-top-2 {
  animation-name: slideInFromTop;
}

.slide-in-from-right-2 {
  animation-name: slideInFromRight;
}

.duration-200 {
  animation-duration: 200ms;
}
