/* ===========================================================
   InstantApp - Common CSS (extrait pour cache long + dédup)
   ===========================================================
   Variables, reset, typographie, base components partagés
   entre les pages publiques. Permet d'alléger les <style>
   inline et de bénéficier du Cache-Control 30 jours.
   =========================================================== */

:root {
  --yellow: #ffe01b;
  --yellow-hover: #e6ca18;
  --black: #111827;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green-50: #f0fdf4;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --orange-50: #fff7ed;
  --orange-500: #f97316;
  --accent: #0072c6;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* Typographie de base */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip-link accessibilité (gain WCAG AA) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* Boutons partagés */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--yellow); color: var(--black); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-hover); }
.btn-primary:disabled { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; }
.btn-secondary { background: var(--white); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); }
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }

/* Réduire les mouvements (accessibilité, prefers-reduced-motion) */
@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;
  }
}
