/* ============================================================
   NOOMA — Feuille de style partagée
   Chargée sur toutes les pages. Contient : polices, tokens,
   reset, layout, typographie, composants (nav, boutons, cartes,
   badges, formulaires, footer), utilitaires décoratifs.
   Le CSS spécifique à chaque page vit dans assets/css/<page>.css.
   ============================================================ */

/* ---------- Polices (auto-hébergées) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plexmono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/plexmono-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/fredoka.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --bg: #12100c;
  --bg-alt: #171310;
  --surface: #1c1812;
  --surface-2: #241e16;
  --line: rgba(245, 239, 224, 0.1);
  --line-soft: rgba(245, 239, 224, 0.06);

  --gold: #e3b24c;
  --gold-light: #f4ce6b;
  --gold-deep: #b9862c;
  --gold-pale: #f8dfa0;
  --gold-ink: #2a2010;

  --majorelle: #5a4fdb;
  --majorelle-light: #7d74e6;
  --majorelle-ink: #14122a;

  --teal: #2fa89a;
  --teal-light: #5cc2b5;
  --teal-ink: #0e2422;

  --ink: #f5efe0;
  --ink-soft: #b8af9c;
  --ink-faint: #7d7566;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --font-wordmark: 'Fredoka', ui-rounded, var(--font-body);

  --container: 1180px;
  --nav-h: 68px;
  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; }
.measure { max-width: 62ch; }

/* Ambient background glow — fixed, contained, never a diffuse wash */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 760px 480px at 12% -6%, rgba(227,178,76,0.12), transparent 62%),
    radial-gradient(ellipse 620px 420px at 88% 6%, rgba(244,206,107,0.07), transparent 60%),
    radial-gradient(ellipse 700px 460px at 100% 60%, rgba(90,79,219,0.06), transparent 62%),
    radial-gradient(ellipse 640px 420px at 6% 78%, rgba(47,168,154,0.04), transparent 60%),
    radial-gradient(ellipse 900px 600px at 50% 100%, rgba(227,178,76,0.05), transparent 65%);
}

#dust-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; }
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
main { position: relative; z-index: 1; }
@media (max-width: 520px) { .wrap { padding: 0 20px; } }

.dotgrid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(245,239,224,0.09) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, black 0%, transparent 75%);
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: '';
  width: 15px; height: 15px; flex: none;
  display: inline-block;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><circle cx='16' cy='20' r='10.5' stroke='%23F4CE6B' stroke-width='3.5' fill='none'/><circle cx='24' cy='20' r='10.5' stroke='%23F4CE6B' stroke-width='3.5' fill='none'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  animation: orbitSlow 16s linear infinite;
}
@keyframes orbitSlow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .eyebrow::before { animation: none; } }
.eyebrow.pro { color: var(--majorelle-light); }
.eyebrow.pro::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><circle cx='16' cy='20' r='10.5' stroke='%237D74E6' stroke-width='3.5' fill='none'/><circle cx='24' cy='20' r='10.5' stroke='%237D74E6' stroke-width='3.5' fill='none'/></svg>"); }
.eyebrow.staff { color: var(--teal-light); }
.eyebrow.staff::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><circle cx='16' cy='20' r='10.5' stroke='%235CC2B5' stroke-width='3.5' fill='none'/><circle cx='24' cy='20' r='10.5' stroke='%235CC2B5' stroke-width='3.5' fill='none'/></svg>"); }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 48px;
  max-width: 780px;
  position: relative;
  padding: 4px 0 4px 22px;
}
.section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-light), transparent 85%);
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 14px; }
.section-head .lede { color: var(--ink-soft); font-size: 16.5px; margin-top: 6px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; padding-left: 0; }
.section-head.center::before { display: none; }

section { padding: 88px 0; position: relative; }
.section-tight { padding: 56px 0; }
section + section { border-top: 1px solid var(--line-soft); }
section + section::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  width: 130px; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  opacity: 0.7;
}
.no-seam + section::before { display: none; }

/* Reveal-on-scroll: toggled by main.js via IntersectionObserver */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(18, 16, 12, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.nav-mark { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.nav-mark .rings { width: 22px; height: 22px; flex: none; }
.nav-mark .word { font-family: var(--font-wordmark); font-weight: 600; font-size: 19px; letter-spacing: 0.01em; line-height: 1; }
.nav-mark .tag {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line); line-height: 1; white-space: nowrap;
}
@media (max-width: 720px) { .nav-mark .tag { display: none; } }

.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px; color: var(--ink-soft);
  padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-color: var(--gold-light); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
@media (max-width: 900px) { .nav-links { display: none; } }

.nav-burger {
  display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; align-items: center; justify-content: center; cursor: pointer;
}
.nav-burger span, .nav-burger::before, .nav-burger::after { content: ''; display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: transform .25s ease, opacity .25s ease; }
.nav-burger::before { position: absolute; transform: translateY(-6px); }
.nav-burger::after { position: absolute; transform: translateY(6px); }
.nav-burger[aria-expanded="true"] span { opacity: 0; }
.nav-burger[aria-expanded="true"]::before { transform: translateY(0) rotate(45deg); }
.nav-burger[aria-expanded="true"]::after { transform: translateY(0) rotate(-45deg); }
@media (max-width: 900px) { .nav-burger { display: flex; } }

.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 45;
  background: var(--bg); transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column; padding: 40px 28px; gap: 4px;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a { font-family: var(--font-display); font-size: 26px; font-weight: 600; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.nav-mobile .btn { margin-top: 24px; align-self: flex-start; }
body.nav-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--gold-ink); box-shadow: 0 8px 24px -8px rgba(227,178,76,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(227,178,76,.65); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn-outline.pro:hover { border-color: var(--majorelle-light); color: var(--majorelle-light); }
.btn-ghost { background: transparent; color: var(--ink-soft); padding-left: 4px; padding-right: 4px; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Badges ---------- */
.badge {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
}
.badge.client { background: rgba(227,178,76,.13); color: var(--gold-light); border: 1px solid rgba(227,178,76,.3); }
.badge.pro { background: rgba(90,79,219,.16); color: var(--majorelle-light); border: 1px solid rgba(90,79,219,.35); }
.badge.staff { background: rgba(47,168,154,.15); color: var(--teal-light); border: 1px solid rgba(47,168,154,.35); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  transition: transform .25s ease, border-color .25s ease;
}
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role-card { position: relative; overflow: hidden; }
.role-card:hover { transform: translateY(-4px); }
.role-card::before { content: ''; position: absolute; inset: 0; opacity: .5; background: radial-gradient(120px 90px at 90% -10%, var(--accent), transparent 70%); pointer-events: none; }
.role-card.client { --accent: rgba(227,178,76,.35); }
.role-card.client:hover { border-color: rgba(227,178,76,.45); }
.role-card.pro { --accent: rgba(90,79,219,.4); }
.role-card.pro:hover { border-color: rgba(90,79,219,.5); }
.role-card.staff { --accent: rgba(47,168,154,.4); }
.role-card.staff:hover { border-color: rgba(47,168,154,.5); }
.role-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; position: relative; }
.role-card p { font-size: 13.5px; color: var(--ink-soft); margin-top: 10px; position: relative; line-height: 1.55; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; color: var(--ink); font-size: 14.5px; width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-light); outline: none; }
.field .error { font-size: 12px; color: #e2836b; min-height: 1em; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #e2836b; }
.field-hint { font-size: 12px; color: var(--ink-faint); }

.form-glass {
  position: relative;
  background: rgba(28, 24, 18, 0.5);
  border: 1px solid rgba(245, 239, 224, 0.14);
  border-radius: 18px;
  padding: 30px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 20px 50px -24px rgba(0,0,0,0.6);
}
.form-glass::before {
  content: ''; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: linear-gradient(135deg, rgba(244,206,107,0.35), transparent 40%, transparent 60%, rgba(244,206,107,0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* Honeypot — hidden from sighted users and keyboard/AT, catches bots that autofill every field */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: 13.5px; margin-top: 14px; display: none; }
.form-status.success { display: block; color: var(--teal-light); }
.form-status.error { display: block; color: #e2836b; }

/* ---------- Footer ---------- */
footer.site-foot { border-top: 1px solid var(--line-soft); padding: 64px 0 32px; position: relative; z-index: 1; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.foot-brand .nav-mark { margin-bottom: 14px; }
.foot-brand p { color: var(--ink-soft); font-size: 14px; max-width: 32ch; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; }
.foot-col ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: var(--ink-soft); transition: color .2s ease; }
.foot-col a:hover { color: var(--gold-light); }
.foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .04em; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Signature rings (logo motif), shared across pages ---------- */
@keyframes ringDraw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes ringFadeIn { to { opacity: 1; } }
.rings-inline { width: 100%; height: 100%; overflow: visible; }

/* ---------- Animated icon language (loupe, agenda, ciseaux, étincelle) ---------- */
.icon-tile { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; }
.icon-tile svg { width: 40px; height: 40px; overflow: visible; }

@keyframes scissorTop { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); } }
@keyframes scissorBot { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(16deg); } }
.icon-scissors .blade-top { transform-origin: 20px 17px; animation: scissorTop 2.2s ease-in-out infinite; }
.icon-scissors .blade-bot { transform-origin: 20px 17px; animation: scissorBot 2.2s ease-in-out infinite; }

@keyframes pageFlip { 0%, 40%, 100% { transform: rotateY(0deg); } 65% { transform: rotateY(-140deg); } }
.icon-calendar { perspective: 80px; }
.icon-calendar .page { transform-origin: 30px 12px; animation: pageFlip 3.4s ease-in-out infinite; transform-style: preserve-3d; }

@keyframes loupePulse { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.08) rotate(-4deg); } }
.icon-loupe .glass-grp { transform-origin: 17px 17px; animation: loupePulse 2.6s ease-in-out infinite; }

@keyframes sparkleTwinkle { 0%, 100% { transform: scale(0.85) rotate(0deg); opacity: 0.55; } 50% { transform: scale(1.12) rotate(20deg); opacity: 1; } }
@keyframes sparkleTwinkleSmall { 0%, 100% { opacity: 0.2; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1); } }
.icon-sparkle .spark-main { transform-origin: 20px 20px; animation: sparkleTwinkle 2.4s ease-in-out infinite; }
.icon-sparkle .spark-mini { transform-origin: center; animation: sparkleTwinkleSmall 2.4s ease-in-out .5s infinite; }

@keyframes personPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.icon-silhouette .person-grp { transform-origin: 20px 22px; animation: personPulse 2.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .icon-scissors .blade-top, .icon-scissors .blade-bot,
  .icon-calendar .page, .icon-loupe .glass-grp,
  .icon-sparkle .spark-main, .icon-sparkle .spark-mini,
  .icon-silhouette .person-grp { animation: none; }
}

/* ---------- Misc utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: var(--gold-ink);
  padding: 10px 18px; border-radius: 8px; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 16px; }
