/* ==========================================================================
   Kenako — Reset & primitives typographiques
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.015em; margin: 0; line-height: 1.15; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--primary-strong); text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--primary); }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }

/* Masquer visuellement sans masquer aux lecteurs d'écran */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--sp-3); top: -60px; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px;
  border-radius: var(--r-md); font-weight: 600; text-decoration: none;
  transition: top var(--t-base);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

/* --- Utilitaires typographiques ----------------------------------------- */
.display   { font-family: var(--font-display); font-size: var(--fs-display); line-height: 1; letter-spacing: -.025em; }
.serif     { font-family: var(--font-display); font-weight: 500; }
.num       { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.eyebrow   { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.muted     { color: var(--ink-2); }
.dim       { color: var(--ink-3); }
.lead      { font-size: var(--fs-lg); color: var(--ink-2); line-height: 1.6; }
.tiny      { font-size: var(--fs-sm); }
.strong    { font-weight: 600; }
.truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2   { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Utilitaires de disposition ----------------------------------------- */
.stack     { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.stack-sm  { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.stack-lg  { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
.row       { display: flex; align-items: center; gap: var(--sp-3); }
.row-wrap  { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.between   { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.spacer    { flex: 1; }
.center    { display: grid; place-items: center; }
.hide      { display: none !important; }

@media (max-width: 767px)  { .desktop-only { display: none !important; } }
@media (min-width: 768px)  { .mobile-only  { display: none !important; } }

/* --- Animations partagées ------------------------------------------------ */
@keyframes ken-spin   { to { transform: rotate(360deg); } }
@keyframes ken-shimmer{ 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes ken-rise   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ken-sheet  { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ken-fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes ken-pop    { 0% { transform: scale(.86); opacity: 0; } 60% { transform: scale(1.03); } 100% { transform: scale(1); opacity: 1; } }
@keyframes ken-pulse  { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.anim-rise { animation: ken-rise var(--t-slow) both; }
.anim-fade { animation: ken-fade var(--t-base) both; }

/* --- Barres de défilement discrètes -------------------------------------- */
.scroll-x {
  display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.scroll-x::-webkit-scrollbar { display: none; }
