/* ============================================================
 *  Peerly — Base
 *  v8.0.0
 * ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-md);
  font-weight: var(--weight-normal);
  color: var(--md-on-surface);
  background: var(--md-surface);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11', 'cv02';
}

/* ============================================================
 *  Titres
 * ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}
h1 { font-size: var(--text-3xl); line-height: var(--leading-3xl); }
h2 { font-size: var(--text-xl);  line-height: var(--leading-xl); }
h3 { font-size: var(--text-lg);  line-height: var(--leading-lg); }
h4 { font-size: var(--text-md);  line-height: var(--leading-md); }

/* Monospace helpers */
.mono { font-family: var(--font-mono); font-feature-settings: 'zero'; }

/* ============================================================
 *  App container
 * ============================================================ */
#app {
  height: 100dvh;
  width: 100vw;
  position: relative;
}

.view { display: none; height: 100%; width: 100%; }
.view.active { display: flex; }

/* ============================================================
 *  Grain subtil (donne de la matière aux fonds plats)
 *  Imperceptible consciemment, mais humanise l'ensemble
 * ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
 *  Scrollbar
 * ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--md-outline-variant);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--md-outline);
  background-clip: padding-box;
}

::selection {
  background: var(--md-primary);
  color: var(--md-on-primary);
}

/* ============================================================
 *  Focus visible (accessibilité + cohérence)
 * ============================================================ */
:focus-visible {
  outline: 2px solid var(--md-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
 *  Reset spécifique
 * ============================================================ */
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}
input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}