/* ============================================================
   SCRUM — _shared.css
   Palette OKLCH "Broadcast Floor" dark vert + fluid responsive
   Référence canonique : index.html (:root + globals)
   Pages secondaires : blog, blog-pourquoi-scrum, tarifs, privacy,
                       mentions-legales, roadmap, livrables, comment-ca-marche
   ============================================================ */

/* ============ FONTS — Bunny (RGPD friendly, EU-resident) ============ */
@import url("https://fonts.bunny.net/css?family=geist:400,500,600,700|jetbrains-mono:400,500|fraunces:400,500,600,700,400i,500i,600i,700i|caveat:500,600,700&display=swap");

/* ============ DESIGN TOKENS — single source (tokens.css) ============ */
@import "tokens.css";

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
}

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(17px, 1.1vw, 22px);
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--accent-bg); color: var(--accent-hi); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-hi); }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 5rem); letter-spacing: -0.04em; font-weight: 800; line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.7rem); letter-spacing: -0.025em; }

p { text-wrap: pretty; }

/* ============ CONTAINERS ============ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: clamp(920px, 55vw, 1400px); margin: 0 auto; padding: 0 var(--gutter); }
.container-legal { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }

/* ============ TYPOGRAPHY UTILS ============ */
.eyebrow {
  font-family: var(--f-mono);
  font-size: clamp(0.76rem, 0.88vw, 0.98rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--warm);
  text-transform: uppercase;
  display: inline-block;
}

.eyebrow-pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent-hi);
  border-radius: 99px;
  font-family: var(--f-mono);
  font-size: clamp(0.76rem, 0.85vw, 0.92rem);
  margin-bottom: 1.5rem;
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 4vw, 5rem);
}
.section-head .label .eyebrow { margin-bottom: 0.65rem; }
.section-head .label .num {
  font-family: var(--f-mono);
  font-size: clamp(0.76rem, 0.88vw, 0.98rem);
  color: var(--muted);
  letter-spacing: 0.06em;
}
.section-head h2 { max-width: 22ch; color: var(--text); }

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 1rem; }
}

/* ============ NAV ============ */
header.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 70%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in oklch, var(--rule) 50%, transparent);
  transition: background 0.3s ease;
}
header.site.scrolled {
  background: color-mix(in oklch, var(--bg) 92%, transparent);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: clamp(64px, 4.5vw, 88px);
  gap: 1rem;
}

.logo {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.06rem, 1.15vw, 1.4rem);
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo-mark {
  width: clamp(24px, 1.8vw, 32px); height: clamp(24px, 1.8vw, 32px);
  display: inline-grid; place-items: center;
  background: var(--accent);
  color: var(--bg-deeper);
  border-radius: 6px;
  font-size: clamp(0.76rem, 0.85vw, 1rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}
.logo-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex; gap: clamp(1.5rem, 2.2vw, 2.8rem);
  font-size: clamp(0.92rem, 1vw, 1.15rem);
  color: var(--text-soft);
}
.nav-links a { position: relative; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a.current { color: var(--text); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: clamp(0.55rem, 0.7vw, 0.85rem) clamp(1rem, 1.2vw, 1.5rem);
  background: var(--text);
  color: var(--bg-deeper);
  border-radius: 8px;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  font-weight: 600;
  letter-spacing: -0.011em;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover { background: var(--accent); color: var(--bg-deeper); }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ---- Menu hamburger mobile (auto-installé par nav.js, <880px) ---- */
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--text);
    background: transparent; border-radius: 10px;
    border: 1px solid color-mix(in oklch, var(--rule) 70%, transparent);
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ''; display: block; width: 20px; height: 2px; border-radius: 2px;
    background: var(--text); transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
  .nav-toggle-bars::after  { position: absolute; top: 6px;  left: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }
  .nav-panel {
    position: fixed; left: 0; right: 0; top: clamp(64px, 4.5vw, 88px); z-index: 49;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: #071708; /* fallback sans color-mix/oklch */
    background: color-mix(in oklch, var(--bg) 97%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--rule);
    max-height: calc(100vh - clamp(64px, 4.5vw, 88px));
    max-height: calc(100dvh - clamp(64px, 4.5vw, 88px));
    overflow-y: auto;
  }
  .nav-panel[hidden] { display: none; }
  .nav-panel-inner { display: flex; flex-direction: column; gap: 0.15rem; max-width: var(--maxw); margin: 0 auto; }
  .nav-panel-inner a { padding: 0.9rem 0.25rem; font-size: 1.08rem; color: var(--text-soft); border-bottom: 1px solid var(--rule-soft); }
  .nav-panel-inner a:hover { color: var(--text); }
  .nav-panel-cta { margin-top: 0.85rem; justify-content: center; border-bottom: none; }
  html.nav-open { overflow: hidden; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: clamp(0.85rem, 1vw, 1.2rem) clamp(1.3rem, 1.6vw, 2.2rem);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.05vw, 1.2rem);
  letter-spacing: -0.011em;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hi) 55%, var(--warm) 130%);
  color: var(--bg-deeper);
  box-shadow:
    0 6px 18px -6px color-mix(in oklch, var(--accent) 60%, transparent),
    0 2px 6px -2px color-mix(in oklch, var(--warm) 30%, transparent),
    0 1px 0 color-mix(in oklch, var(--text) 12%, transparent) inset;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-hi) 0%, var(--warm) 80%);
  opacity: 0; transition: opacity 0.25s ease; z-index: -1;
}
.btn-primary:hover {
  transform: translateY(-1px);
  color: var(--bg-deeper);
  box-shadow:
    0 10px 26px -8px color-mix(in oklch, var(--accent) 70%, transparent),
    0 4px 10px -2px color-mix(in oklch, var(--warm) 40%, transparent),
    0 1px 0 color-mix(in oklch, var(--text) 16%, transparent) inset;
}
.btn-primary:hover::after { opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: color-mix(in oklch, var(--text) 30%, transparent);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: color-mix(in oklch, var(--text) 6%, transparent);
  color: var(--text);
}

.btn .arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn.lg { padding: clamp(1rem, 1.2vw, 1.4rem) clamp(1.6rem, 2vw, 2.6rem); font-size: clamp(1rem, 1.1vw, 1.25rem); }

/* ============ FOOTER ============ */
footer.site {
  border-top: 1px solid var(--rule);
  padding: clamp(2.5rem, 4vw, 5rem) 0 1.5rem;
  font-size: clamp(0.86rem, 0.95vw, 1.05rem);
  color: var(--muted);
  background: var(--bg-deeper);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(2.5rem, 3vw, 4rem);
  margin-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p {
  font-size: clamp(0.88rem, 0.95vw, 1.08rem);
  line-height: 1.55; max-width: 28ch;
  color: var(--text-soft);
}
.footer-col h5, .footer-col h2 {
  font-family: var(--f-mono);
  font-size: clamp(0.74rem, 0.85vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: var(--text-soft); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-legal {
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule-soft);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  font-family: var(--f-mono);
  font-size: clamp(0.74rem, 0.85vw, 0.95rem);
  letter-spacing: 0.02em;
  color: var(--muted);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Compact single-line footer for legal pages */
footer.site-mini {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  margin-top: 4rem;
  background: var(--bg-deeper);
  text-align: center;
  font-size: clamp(0.8rem, 0.85vw, 0.95rem);
  color: var(--muted);
}
footer.site-mini a { color: var(--muted); margin: 0 0.7rem; }
footer.site-mini a:hover { color: var(--accent); }

/* ============ REVEAL ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
  .reveal.in, .reveal.visible { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
