/* === Marianne — typographie officielle République française === */
@font-face {
  font-family: 'Marianne';
  src: url('/fonts/Marianne-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('/fonts/Marianne-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('/fonts/Marianne-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('/fonts/Marianne-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('/fonts/Spectral-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('/fonts/Spectral-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* === Reset mobile-first minimal === */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  background-color: #f6f6f6;
  color: #161616;
  font-family: 'Marianne', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Safe area insets iOS (notch / home indicator) */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
#root {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
/* Minimum tap target 44x44 px (Apple HIG) */
button, a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* Disable iOS double-tap zoom on inputs */
input, select, textarea {
  font-size: 16px; /* prevents zoom on focus iOS */
}

/* === Respect motion preferences === */
@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;
  }
}

/* === Safe area utilities === */
.safe-top { padding-top: env(safe-area-inset-top); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.safe-bottom-nav {
  padding-bottom: calc(env(safe-area-inset-bottom) + 72px);
}

/* === Animations utilitaires === */
@keyframes shake-x {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.animate-shake-x { animation: shake-x 320ms cubic-bezier(.36,.07,.19,.97) both; }

@keyframes pop-scale {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.animate-pop-scale { animation: pop-scale 300ms ease-out both; }

@keyframes confetti-fall {
  0% { transform: translateY(-40px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up 320ms ease-out both; }

/* === Scrollbar discrète === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.16); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }
