/* Styles hors Tailwind partagés par toutes les pages (index, mentions légales). */

:root { color-scheme: light; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body {
  background-color: #fbf9f8;
  color: #1b1c1c;
  font-family: 'Lexend', system-ui, sans-serif;
  /* faint washi paper grain */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.25 0 0 0 0 0.23 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.32'/></svg>");
  background-size: 220px 220px;
  background-attachment: fixed;
}
::selection { background: rgba(139, 0, 0, 0.18); }

/* Polices auto-hébergées (copiées depuis uchigo.app, voir CLAUDE.md) :
   pas de Google Fonts, donc pas de transfert d'IP à Google. */
@font-face { font-family: 'Epilogue'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/epilogue.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/lexend.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho B1'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/shippori-mincho-b1-500.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho B1'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/shippori-mincho-b1-700.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho B1'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/shippori-mincho-b1-800.woff2') format('woff2'); }
@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400 500; font-display: block; src: url('/fonts/material-symbols-outlined.woff2') format('woff2'); }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal; font-size: 24px;
  letter-spacing: normal; text-transform: none; display: inline-block;
  white-space: nowrap; word-wrap: normal; direction: ltr;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none; line-height: 1;
}
.material-symbols-outlined.filled { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* Stitch primitives */
.tactile-card {
  background: #fbf9f8;
  border: 1px solid #e3beb8;
  border-radius: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(27, 28, 28, 0.04);
}
.brush-accent { position: relative; overflow: hidden; }
.brush-accent::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, transparent 50%, #8b0000 50%);
  opacity: 0.12; pointer-events: none;
}
.brush-accent-strong::before { opacity: 0.5; }

/* Ink-press buttons */
.btn-base {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'Epilogue', system-ui, sans-serif;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  font-size: 0.8125rem;
  border-radius: 0.75rem; min-height: 52px; padding: 0 1.5rem;
  transition: all 0.15s ease;
  user-select: none;
}
.btn-primary { background: #8b0000; color: #fff; box-shadow: 0 4px 0 0 #610000; }
.btn-primary:hover { background: #610000; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 0 0 0 #610000; }
.btn-secondary {
  background: #fff; color: #1b1c1c;
  border: 2px solid rgba(142, 112, 107, 0.4);
  box-shadow: 0 2px 0 rgba(142, 112, 107, 0.25);
}
.btn-secondary:hover { border-color: #8e706b; background: #e4e2e2; }
.btn-secondary:active { transform: translateY(2px); box-shadow: 0 0 0 0 rgba(142, 112, 107, 0.25); }

.eyebrow {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: #5a403c;
}
.eyebrow-crimson { color: #8b0000; }

.heading-brush { position: relative; display: inline-block; font-family: 'Epilogue', system-ui, sans-serif; font-weight: 700; }
.heading-brush::after {
  content: ''; display: block; width: 2.5rem; height: 4px;
  background: #8b0000; margin-top: 8px; border-radius: 2px;
}

.obi-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 5px 10px 3px; border-radius: 4px;
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.obi-chip sup {
  top: -0.2em; font-size: 0.7em;
}
.obi-chip::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><filter id='c'><feTurbulence type='turbulence' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23c)' opacity='0.5'/></svg>");
  mix-blend-mode: overlay; opacity: 0.4; pointer-events: none;
}

/* Phone frame for screenshots/mockups */
.phone {
  width: 280px; aspect-ratio: 9 / 19;
  border-radius: 36px; padding: 10px;
  background: #1b1c1c;
  box-shadow:
    0 30px 60px -20px rgba(27, 28, 28, 0.35),
    0 8px 20px -8px rgba(97, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 26px; overflow: hidden;
  background: #fbf9f8;
  position: relative;
}

/* Flip mockup card */
.flip-scene { perspective: 1600px; }
.flip-card {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
}
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face.back { transform: rotateY(180deg); transform-style: preserve-3d; }

/* Leitner boxes diagram */
.box-stack { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.box {
  position: relative; aspect-ratio: 3 / 4;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #e3beb8;
  box-shadow: inset 0 0 0 1px rgba(27,28,28,0.04);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0.5rem;
}
.box-tab {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: #8b0000; color: #fff;
  font-family: 'Epilogue', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.08em;
  padding: 0.125rem 0.5rem; border-radius: 4px;
}
.box .interval {
  font-family: 'Epilogue', sans-serif; font-weight: 600;
  color: #5a403c; font-size: 0.7rem; letter-spacing: 0.05em;
}
.box-card {
  width: 70%; height: 18%;
  background: #fbf9f8; border: 1px solid #e3beb8; border-radius: 3px;
  margin-bottom: 0.25rem;
}

/* Focus ring */
:focus-visible { outline: 2px solid #8b0000; outline-offset: 3px; border-radius: 4px; }

/* Subtle hairline */
.hairline { height: 1px; background: rgba(142, 112, 107, 0.18); width: 100%; }

/* Hide elements based on language */
html[lang='fr'] [data-lang='en'] { display: none; }
html[lang='en'] [data-lang='fr'] { display: none; }
