/* ============================================================
   QUADENCE — Feuille de style
   ============================================================ */

:root {
  --accent: #2E3FD1;
  --ink: #16161A;
  --bg: #FAFAF7;
  --line: rgba(22, 22, 26, 0.08);
  --muted: rgba(22, 22, 26, 0.65);
  --faint: rgba(22, 22, 26, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }

a { color: var(--ink); }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: "Space Grotesk", sans-serif; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.mono { font-family: "IBM Plex Mono", monospace; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: clamp(20px, 5vw, 64px); padding-right: clamp(20px, 5vw, 64px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px clamp(20px, 5vw, 64px);
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; grid-template-columns: repeat(2, 6px); grid-template-rows: repeat(2, 6px); gap: 2px; }
.brand-mark span { width: 6px; height: 6px; background: var(--ink); }
.brand-mark span:first-child { background: var(--accent); }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); font-size: 14px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink); opacity: 0.65; transition: opacity 0.2s, color 0.2s; }
.site-nav a:hover { opacity: 1; color: var(--accent); }
.site-nav a.active { opacity: 1; color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(140px, 22vh, 220px); padding-bottom: clamp(80px, 14vh, 160px); }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(22,22,26,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,22,26,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 75%);
}
.hero-inner { position: relative; animation: qd-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.kicker { font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 24px; }
.hero h1 { font-size: clamp(56px, 11vw, 132px); line-height: 0.98; letter-spacing: -0.04em; }
.page-hero h1 { font-size: clamp(40px, 7vw, 80px); }
.lede { font-size: clamp(18px, 2.4vw, 24px); line-height: 1.5; max-width: 34em; margin: 32px 0 0; color: rgba(22,22,26,0.72); text-wrap: pretty; }

.cta-row { display: flex; align-items: center; gap: 20px; margin-top: 48px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); text-decoration: none;
  font-size: 15px; font-weight: 500; padding: 14px 28px; border-radius: 2px;
  border: none; cursor: pointer; font-family: "Instrument Sans", sans-serif;
  transition: background 0.25s ease;
}
.btn:hover { background: var(--accent); color: var(--bg); }
.link-plain { color: var(--ink); text-decoration: none; font-size: 15px; border-bottom: 1px solid rgba(22,22,26,0.3); padding-bottom: 2px; }
.link-plain:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(64px, 10vh, 120px); padding-bottom: clamp(64px, 10vh, 120px); border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(40px, 6vh, 72px); }
.section-head .num { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--accent); }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); }

/* ---------- Cartes piliers ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--bg); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 18px; }
.pillar h3 { font-size: 21px; letter-spacing: -0.01em; }
.pillar p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; text-wrap: pretty; }
.cell-mark { display: grid; grid-template-columns: repeat(2, 10px); gap: 3px; }
.cell-mark i { width: 10px; height: 10px; border: 1px solid rgba(22,22,26,0.3); }
.cell-mark i.on { background: var(--accent); border-color: var(--accent); }

/* ---------- Cartes produits ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  border: 1px solid rgba(22,22,26,0.15); padding: clamp(28px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 16px; min-height: 220px;
  text-decoration: none; color: var(--ink);
  transition: border-color 0.25s ease;
}
.card:hover { border-color: var(--accent); color: var(--ink); }
.card.placeholder { border-style: dashed; border-color: rgba(22,22,26,0.25); }
.card .tag { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.12em; color: var(--faint); }
.card h3 { font-size: 20px; letter-spacing: -0.01em; }
.card p { font-size: 15px; line-height: 1.6; color: rgba(22,22,26,0.55); margin: 0; }
.card .meta { margin-top: auto; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--accent); }

/* ---------- Listes de points ---------- */
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(28px, 4vw, 48px); }
.point { display: flex; flex-direction: column; gap: 12px; }
.point .n { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--accent); }
.point h3 { font-size: 19px; }
.point p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; text-wrap: pretty; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-email {
  font-family: "Space Grotesk", sans-serif; font-size: clamp(20px, 3vw, 28px); font-weight: 500;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(22,22,26,0.25);
  align-self: flex-start; padding-bottom: 4px; letter-spacing: -0.01em;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
form[data-cfg-form] { display: flex; flex-direction: column; gap: 14px; }
form[data-cfg-form] input, form[data-cfg-form] textarea {
  font-family: "Instrument Sans", sans-serif; font-size: 15px; padding: 14px 16px;
  border: 1px solid rgba(22,22,26,0.18); background: transparent; border-radius: 2px;
  color: var(--ink); outline: none; resize: vertical;
}
form[data-cfg-form] input:focus, form[data-cfg-form] textarea:focus { border-color: var(--accent); }
form[data-cfg-form] .btn { align-self: flex-start; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 32px; padding-bottom: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.site-footer .fname { font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 500; }
.site-footer [data-cfg-socials] { display: flex; gap: 24px; font-size: 13px; }
.site-footer [data-cfg-socials] a { color: rgba(22,22,26,0.5); text-decoration: none; }
.site-footer [data-cfg-socials] a:hover { color: var(--accent); }

/* ---------- Motif modulaire ---------- */
.module-motif { display: grid; grid-template-columns: repeat(3, 22px); gap: 6px; }
.module-motif i { width: 22px; height: 22px; border: 1px solid rgba(22,22,26,0.25); }
.module-motif i.fill { background: var(--ink); border-color: var(--ink); }
.module-motif i.acc { background: var(--accent); border-color: var(--accent); }
.module-motif i.dash { border-style: dashed; }

/* ---------- Animations ---------- */
@keyframes qd-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-inner { animation: none; }
}
