/* ============================================================
   ouiasso : design system v2 (modern · warm · Notion-ish)
   ============================================================ */

:root {
  /* Palette : clean white + black + blue (default) */
  --ink: #16181d;
  --ink-2: #3a3e46;
  --muted: #6f757e;
  --line: #ececf0;
  --line-2: #e1e1e7;
  --paper: #ffffff;
  --paper-2: #f7f7f8;
  --paper-3: #efeff2;

  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --primary-ink: #ffffff;

  /* Soft category accents : used for module icons & illustrative spots.
     Each has a pastel bg + saturated foreground. */
  --c-blue-bg:    #dbeafe;  --c-blue-fg:    #2563eb;
  --c-green-bg:   #dcfce7;  --c-green-fg:   #16a34a;
  --c-yellow-bg:  #fef3c7;  --c-yellow-fg:  #b45309;
  --c-pink-bg:    #fce7f3;  --c-pink-fg:    #be185d;
  --c-purple-bg:  #ede9fe;  --c-purple-fg:  #7c3aed;
  --c-orange-bg:  #ffedd5;  --c-orange-fg:  #c2410c;
  --c-teal-bg:    #ccfbf1;  --c-teal-fg:    #0d9488;

  /* Typography : Nunito everywhere */
  --font-display: "Nunito", system-ui, sans-serif;
  --font-sans: "Nunito", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Sizing */
  --container: 1240px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(20,20,30,0.04), 0 1px 1px rgba(20,20,30,0.03);
  --shadow: 0 4px 12px -4px rgba(20,20,30,0.06), 0 2px 4px rgba(20,20,30,0.04);
  --shadow-lg: 0 24px 48px -16px rgba(20,20,30,0.15), 0 8px 16px -8px rgba(20,20,30,0.08);
}

/* Tweak: palette variants */
[data-palette="blue"] { --primary: #2563eb; --primary-soft: #dbeafe; }
[data-palette="indigo"] { --primary: #4f46e5; --primary-soft: #e0e7ff; }
[data-palette="emerald"] { --primary: #059669; --primary-soft: #d1fae5; }
[data-palette="rose"] { --primary: #e11d48; --primary-soft: #ffe4e6; }

/* Tweak: typo */
[data-typo="modern"] {
  --font-display: "Nunito", system-ui, sans-serif;
}
[data-typo="serif"] {
  --font-display: "Instrument Serif", Georgia, serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
p { margin: 0; text-wrap: pretty; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 700px) {
  .container, .container-wide { padding: 0 20px; }
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  font-weight: 800;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.05em;
  padding-top: 1px;
}
.logo-asso { color: var(--muted); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--paper-2); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: white;
}
.btn-primary:hover { background: #000; }
.btn-accent {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 2px 6px -2px color-mix(in oklab, var(--primary) 50%, transparent);
}
.btn-accent:hover { filter: brightness(0.96); box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 12px -2px color-mix(in oklab, var(--primary) 50%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-outline {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-outline:hover { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }

/* ---------- Tag / chip / eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--primary);
  font-weight: 700;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.chip:hover { background: var(--paper-3); }
.chip.is-active { background: var(--ink); color: white; border-color: var(--ink); }
.chip.is-accent { background: var(--primary); color: white; }

/* ---------- Section ---------- */
section { padding: 96px 0; position: relative; }
section.tight { padding: 48px 0; }
section.bg-paper-2 { background: var(--paper-2); }
section.bg-ink {
  background: #0f1115;
  color: #e8e9ec;
}
section.bg-ink h1, section.bg-ink h2, section.bg-ink h3, section.bg-ink h4 { color: white; }
section.bg-ink .eyebrow { color: #9aa2b3; }
section.bg-ink .eyebrow::before { background: var(--primary); }
section.bg-primary { background: var(--primary); color: white; }
section.bg-primary h1, section.bg-primary h2 { color: white; }
section.bg-primary .eyebrow { color: rgba(255,255,255,0.85); }
section.bg-primary .eyebrow::before { background: white; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 56px;
  max-width: 720px;
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 52px);
}
.section-head p {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
}
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Card ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }

/* ---------- Module card ---------- */
.module-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-height: 168px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.2,.7,.2,1), border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.module-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.module-card .module-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--c-blue-bg);
  color: var(--c-blue-fg);
}
.module-card .module-icon svg { width: 22px; height: 22px; }
.module-card .module-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.012em;
  line-height: 1.2;
}
.module-card .module-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.module-card .module-cat {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  font-weight: 600;
}
.module-card[data-cat-color="rouge"] .module-icon { background: var(--c-pink-bg); color: var(--c-pink-fg); }
.module-card[data-cat-color="cobalt"] .module-icon { background: var(--c-blue-bg); color: var(--c-blue-fg); }
.module-card[data-cat-color="moutarde"] .module-icon { background: var(--c-yellow-bg); color: var(--c-yellow-fg); }
.module-card[data-cat-color="olive"] .module-icon { background: var(--c-green-bg); color: var(--c-green-fg); }
.module-card[data-cat-color="rose"] .module-icon { background: var(--c-purple-bg); color: var(--c-purple-fg); }
.module-card[data-cat-color="ciel"] .module-icon { background: var(--c-teal-bg); color: var(--c-teal-fg); }

/* ---------- Modules grid ---------- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 14px;
}
.module-popular {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--paper-2);
  color: var(--ink-2);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

/* ---------- Modules interactive variant ---------- */
.modules-interactive {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
}
.modules-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  max-height: 520px;
  overflow: auto;
  border-right: 1px solid var(--line);
}
.modules-list-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.modules-list-row:hover { background: var(--paper-2); }
.modules-list-row.is-active { background: var(--paper-2); }
.modules-list-icon svg { width: 22px; height: 22px; color: var(--ink-2); }
.modules-list-name { font-weight: 700; font-size: 15px; }
.modules-list-cat {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 600;
}
.modules-preview {
  padding: 36px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: preview-in 0.2s ease;
}
.modules-preview h3 { font-size: 28px; margin-top: 20px; }
.modules-preview-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-blue-bg);
  color: var(--c-blue-fg);
}
.modules-preview-icon svg { width: 30px; height: 30px; }
.modules-preview-icon[data-cat-color="rouge"]    { background: var(--c-pink-bg); color: var(--c-pink-fg); }
.modules-preview-icon[data-cat-color="cobalt"]   { background: var(--c-blue-bg); color: var(--c-blue-fg); }
.modules-preview-icon[data-cat-color="moutarde"] { background: var(--c-yellow-bg); color: var(--c-yellow-fg); }
.modules-preview-icon[data-cat-color="olive"]    { background: var(--c-green-bg); color: var(--c-green-fg); }
.modules-preview-icon[data-cat-color="rose"]     { background: var(--c-purple-bg); color: var(--c-purple-fg); }
.modules-preview-icon[data-cat-color="ciel"]     { background: var(--c-teal-bg); color: var(--c-teal-fg); }
@keyframes preview-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Stamp (now a small soft badge) ---------- */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.stamp-lg {
  width: 88px; height: 88px;
  font-size: 24px;
  border-radius: 22px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0f1115;
  color: #e8e9ec;
  padding: 80px 0 32px;
}
.site-footer h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #9aa2b3;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { color: rgba(255,255,255,0.72); font-size: 14.5px; transition: color 0.15s ease; }
.site-footer ul a:hover { color: white; }
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-cols .logo { color: white; }
.footer-cols .logo .logo-asso { color: #9aa2b3; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
}

/* ---------- Utilities ---------- */
.hide-mobile {}
@media (max-width: 700px) { .hide-mobile { display: none; } }

@media (max-width: 900px) {
  .nav { display: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  section { padding: 64px 0; }
}
