/* ═══════════════════════════════════════════════════════════════════
   ATELIER — Système de design partagé
   Direction : carnet d'atelier, papier crème, encre chaude, serif éditorial
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,300;1,6..72,400;1,6..72,500;1,6..72,600&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* ── Papier / encre ── */
  --paper:        #F5EFE3;   /* crème principal */
  --paper-2:      #EBE2D0;   /* crème plus saturé */
  --paper-3:      #DDD0B6;   /* kraft */
  --paper-warm:   #FBF6EB;   /* lumière */
  --ink:          #1B1813;   /* encre noire chaude */
  --ink-2:        #2C2620;
  --ink-3:        #4A4138;
  --muted:        #7A6D5C;
  --muted-2:      #9A8B77;
  --rule:         #C9BCA0;   /* filet */
  --rule-soft:    #D9CDB4;

  /* ── Accents ── */
  --copper:       #B84A20;   /* cuivre brûlé (accent principal) */
  --copper-2:     #D26A2E;
  --copper-soft:  #F2D9C3;
  --copper-wash:  #FBE9D8;
  --forest:       #1F3329;   /* vert atelier (secondaire) */
  --forest-2:     #2D4938;
  --moss:         #5E7A5E;
  --stamp:        #A6342A;   /* rouge tampon */
  --gold:         #B58A3A;
  --gold-soft:    #E8D6A8;
  --slate:        #2A2F36;

  /* ── États ── */
  --success:      #4A6B3E;
  --success-bg:   #E4E9D8;
  --warn:         #A0691E;
  --warn-bg:      #F2E1C5;
  --danger:       #993028;
  --info:         #2F4E78;

  /* ── Typo ── */
  --font-serif:   'Newsreader', 'Source Serif Pro', Georgia, serif;
  --font-sans:    'Geist', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Forme ── */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* ── Ombres : douces, chaudes, jamais bleues ── */
  --shadow-1:  0 1px 2px rgba(50,30,10,0.06), 0 1px 1px rgba(50,30,10,0.04);
  --shadow-2:  0 4px 14px -2px rgba(50,30,10,0.10), 0 2px 6px rgba(50,30,10,0.06);
  --shadow-3:  0 18px 40px -12px rgba(50,30,10,0.22), 0 6px 16px rgba(50,30,10,0.10);
  --shadow-4:  0 30px 70px -20px rgba(40,20,5,0.35), 0 10px 30px rgba(40,20,5,0.18);

  /* ── Mesures ── */
  --measure-narrow: 56ch;
  --measure: 68ch;
  --measure-wide: 84ch;
}

/* ═══════════════════════════════════════════════════════════════════
   RESET + BASE
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* Texture papier subtile — appliquée sur body */
body.has-grain::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(120,90,60,0.04) 0.5px, transparent 1px),
    radial-gradient(circle at 75% 70%, rgba(120,90,60,0.03) 0.5px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(120,90,60,0.025) 0.5px, transparent 1px);
  background-size: 7px 7px, 11px 11px, 5px 5px;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
::selection { background: var(--copper); color: var(--paper-warm); }

/* ═══════════════════════════════════════════════════════════════════
   TYPOGRAPHIE — système éditorial
   ═══════════════════════════════════════════════════════════════════ */

.display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 0.98;
}
.display-xl  { font-size: clamp(3.2rem, 8vw, 6.2rem); font-weight: 400; }
.display-lg  { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 400; }
.display-md  { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 500; line-height: 1.05; }
.display-sm  { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; line-height: 1.1; }

.italic { font-style: italic; }
.serif  { font-family: var(--font-serif); }
.sans   { font-family: var(--font-sans); }
.mono   { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--copper);
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink-2);
  letter-spacing: -0.015em;
}

p { color: var(--ink-3); }
p + p { margin-top: 1em; }

.text-muted { color: var(--muted); }
.text-ink   { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.shell-narrow { max-width: 880px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}
.rule-dashed {
  height: 0;
  border: 0;
  border-top: 1px dashed var(--rule);
}

/* ═══════════════════════════════════════════════════════════════════
   COMPOSANTS — chrome & boutons
   ═══════════════════════════════════════════════════════════════════ */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.chip.copper { background: var(--copper-wash); border-color: var(--copper-soft); color: var(--copper); }
.chip.forest { background: rgba(31,51,41,0.08); border-color: rgba(31,51,41,0.18); color: var(--forest); }
.chip.dot::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--copper); }
.chip.forest.dot::before { background: var(--forest); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 99px;
  font-weight: 500;
  font-size: 0.93rem;
  letter-spacing: -0.005em;
  transition: transform .15s ease, box-shadow .2s ease, background .15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper-warm);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, var(--shadow-2);
}
.btn-primary:hover { background: var(--copper); text-decoration: none; }
.btn-copper {
  background: var(--copper);
  color: var(--paper-warm);
  box-shadow: var(--shadow-2);
}
.btn-copper:hover { background: var(--ink); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { background: var(--paper-warm); text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════════
   LOGO — marque "atelier"
   ═══════════════════════════════════════════════════════════════════ */

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--copper-2);
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-1);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
}
.brand-name .ital { font-style: italic; color: var(--copper); }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   ÉLÉMENTS DÉCORATIFS — tampons, étiquettes, fiches
   ═══════════════════════════════════════════════════════════════════ */

/* Tampon "validé" */
.stamp {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 4px;
  transform: rotate(-3deg);
  opacity: 0.85;
  background: transparent;
}
.stamp::before { content:'✓'; font-size: 0.9rem; }

/* Étiquette papier (folio number) */
.folio {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Filet décoratif numéroté pour titre de section */
.section-marker {
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 24px;
}
.section-marker .num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 0.8;
  font-feature-settings: "lnum";
}
.section-marker .line { flex: 1; height: 1px; background: var(--rule); }

/* Carte papier */
.card {
  background: var(--paper-warm);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.card.flat:hover { transform: none; box-shadow: var(--shadow-1); }

/* Window chrome — pour mettre en scène une capture */
.window {
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-3);
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, #EAE0CB, #DFD3B8);
  border-bottom: 1px solid var(--rule);
}
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.15); }
.window-bar .d1 { background: #E07360; }
.window-bar .d2 { background: #E6B65A; }
.window-bar .d3 { background: #7CB45F; }
.window-bar .addr {
  margin-left: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255,255,255,0.5);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--rule-soft);
}
.window-body { background: #fff; }
.window-body img { width: 100%; display: block; }

/* Phone frame minimaliste */
.phone {
  width: 290px;
  border-radius: 38px;
  padding: 10px;
  background: var(--ink);
  box-shadow: var(--shadow-4);
  position: relative;
}
.phone::before {
  content: '';
  position: absolute;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: 76px; height: 22px;
  background: var(--ink);
  border-radius: 16px;
  z-index: 2;
}
.phone-screen {
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 9/19.5;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ═══════════════════════════════════════════════════════════════════
   ICONS — SVG inline stroke style
   ═══════════════════════════════════════════════════════════════════ */

.icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { font-size: 1.4rem; }
.icon-xl { font-size: 2rem; }

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS — apparition au scroll
   ═══════════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════ */

@media print {
  body.has-grain::before { display: none; }
  .reveal { opacity: 1; transform: none; }
}
