/* Espace musique : accueil, Services, Articles (et pages d'articles, pages de services). L'espace pro a son propre style (pro/pro.css).
   Palette reprise du jeu ; typographie : Space Grotesk (titres) + Archivo (texte). */

:root {
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;

  --paper: #f4f1e6;
  --paper-2: #ebe5d2;
  --paper-light: #fbf9f2;
  --ink: #1e3a31;
  --ink-2: #2b4a40;
  --ink-deep: #142b24;
  --muted: #56675e;
  --line: rgba(30, 58, 49, .18);
  --signal: #ef784e;
  --signal-text: #b8471f;
  --on-dark: #f4f1e6;
  --on-dark-muted: #b7c6bc;
  --perso: #a18ac4;
  --perso-text: #6f58a0;

  --font-head: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  /* Clair uniquement : le mode sombre automatique des navigateurs ne doit pas inverser le site */
  color-scheme: only light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-family: var(--font-head); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--signal-text); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  padding: 12px 16px; border-radius: 8px;
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.icon {
  display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -.2em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- En-tête et onglets ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--ink);
}

/* Logo officiel JK : monogramme + nom « Josly Karmaa » */
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand-mark { display: block; width: auto; height: 40px; }
.brand-name { display: block; width: auto; height: 15px; }

.tabs { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; text-decoration: none; font: 600 .95rem/1 var(--font-head);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.tabs a:hover { background: var(--paper-2); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Indicateur de lecture : une voiture qui avance sur le bord de l'en-tête */
.progress { position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; pointer-events: none; }
.progress-fill { position: absolute; inset: 0; background: var(--signal); transform-origin: left; transform: scaleX(var(--p, 0)); }
.progress-car {
  position: absolute; left: 0; bottom: -9px;
  display: grid; place-items: center; width: 30px; height: 21px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink);
  transform: translateX(calc(var(--p, 0) * (100vw - 30px)));
}
.progress-car .icon { width: 16px; height: 16px; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px;
  border: 1.5px solid var(--ink); border-radius: 10px;
  font: 600 1rem/1 var(--font-head); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon-ur { transform: translate(2px, -2px); }
.btn:hover .icon-r { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--signal); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--signal); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--signal); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }

.btn-signal { background: var(--signal); border-color: var(--signal); color: var(--ink-deep); box-shadow: 5px 5px 0 var(--paper); }
.btn-signal:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--paper); }
.btn-signal:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--paper); }

.btn-ghost-dark { background: transparent; color: var(--on-dark); border-color: rgba(244, 241, 230, .5); }
.btn-ghost-dark:hover { background: rgba(244, 241, 230, .08); }

.btn-sm { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: .92rem; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .78rem/1.2 var(--font-head); letter-spacing: .16em; text-transform: uppercase;
}
.kicker i { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--signal)); }

/* ---------- Illustrations (stickers, voir stickers.js) ---------- */

.sticker { position: relative; display: block; margin: 0; aspect-ratio: 1; pointer-events: none; translate: 0 var(--py, 0px); }
.js-stickers .sticker { opacity: 0; scale: .86; transition: opacity .6s var(--ease), scale .8s cubic-bezier(.34, 1.56, .64, 1); }
.js-stickers .sticker.is-in { opacity: 1; scale: 1; }
.sticker-float { position: absolute; inset: 0; animation: sticker-float 6.5s ease-in-out infinite; animation-delay: var(--float-delay, 0s); }
.sticker img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  opacity: 0; transform: scale(.7) rotate(-6deg); transform-origin: 50% 90%;
  filter: drop-shadow(0 16px 18px rgba(20, 43, 36, .18));
  transition: opacity .4s var(--ease), transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
.sticker img.is-active { opacity: 1; transform: none; }
.sticker img.is-leaving { opacity: 0; transform: scale(.9) rotate(5deg) translateY(12px); transition-duration: .35s; }
@keyframes sticker-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-10px) rotate(1.2deg); }
}

/* ---------- Hero de l'accueil ---------- */

.hero-wrap { position: relative; overflow: hidden; border-bottom: 1.5px solid var(--ink); }
.hero-wrap::before,
.page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-wrap::before {
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 72% 45%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 72% 45%, #000 25%, transparent 75%);
}

.hero {
  position: relative; max-width: var(--max); margin: 0 auto;
  min-height: calc(100svh - var(--header-h));
  padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(48px, 8vh, 88px);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(40px, 5vw, 88px); align-items: center;
}

.hello { margin-top: 28px; font: 500 1.25rem/1.3 var(--font-head); }
.hero h1 {
  margin-top: 10px;
  font-weight: 700; font-size: clamp(3rem, 1.4rem + 6vw, 6.75rem); line-height: .94; letter-spacing: -.05em;
}
.hero h1 em,
.page-head h1 em {
  font-style: normal; padding: 0 .06em; margin: 0 -.06em;
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--signal) 55%, transparent) 60% 88%, transparent 88%);
}
.lede { margin-top: 28px; max-width: 34em; font-size: 1.125rem; color: var(--ink-2); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px 18px; }

/* L'avatar dépasse de derrière la table de mixage */
.hero-visual { --avatar-w: min(36%, 220px); position: relative; isolation: isolate; margin-top: calc(var(--avatar-w) * 1.5 - 3.5rem); }
.sticker-avatar { position: absolute; z-index: 0; right: 7%; bottom: calc(100% - 3.5rem); width: var(--avatar-w); aspect-ratio: 2 / 3; }

/* Carte du hero : la table de mixage des services (générée dans site.js) */
.hero-card {
  position: relative; z-index: 1;
  display: block; overflow: hidden; color: var(--ink); text-decoration: none;
  background: var(--ink); border: 1.5px solid var(--ink); border-radius: 18px;
  box-shadow: 8px 8px 0 var(--signal); transform: rotate(-1.5deg);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hero-card:hover { transform: rotate(0deg) translate(-3px, -3px); box-shadow: 11px 11px 0 var(--signal); }
.hero-card:focus-visible { outline-offset: 6px; border-radius: 18px; }
.card-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--paper);
  font: 600 .72rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase;
}
.card-bar-top { border-bottom: 1.5px solid var(--ink); }
.card-bar-bottom { padding: 12px 12px 12px 16px; border-top: 1.5px solid var(--ink); font-size: 1rem; letter-spacing: -.01em; text-transform: none; }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.card-go {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 .95rem/1 var(--font-head);
}
.card-go .icon { transition: transform .2s var(--ease); }
.hero-card:hover .card-go .icon { transform: translate(2px, -2px); }
.card-frame { display: block; }
.card-frame svg { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; }

.mx-shade { transform-box: fill-box; transform-origin: top; animation: mx-level var(--d, 2.4s) ease-in-out infinite alternate; }
@keyframes mx-level {
  0% { transform: scaleY(.78); }
  25% { transform: scaleY(.38); }
  50% { transform: scaleY(.62); }
  75% { transform: scaleY(.3); }
  100% { transform: scaleY(.55); }
}
.mx-tag { font: 700 22px/1 var(--font-head); letter-spacing: .06em; text-anchor: middle; }
.mx-name { font: 500 12px/1 var(--font-body); fill: var(--on-dark-muted); text-anchor: middle; }

/* ---------- Chapitres de l'accueil ---------- */

.chapter { --c: var(--signal); --c-text: var(--signal-text); position: relative; padding: clamp(72px, 10vw, 136px) 0; border-bottom: 1.5px solid var(--ink); }
.chapter-inner { position: relative; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.chapter-music { --c: var(--perso); --c-text: var(--perso-text); background: color-mix(in srgb, var(--perso) 10%, var(--paper)); }

.chapter-head { display: grid; grid-template-columns: minmax(120px, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px); align-items: start; }
.chapter-num {
  font: 700 clamp(4.5rem, 2rem + 9vw, 10rem)/.8 var(--font-head); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px var(--c);
}
.chapter-head .kicker { color: var(--c-text); }
.chapter h2 { margin-top: 16px; font-weight: 700; font-size: clamp(2.4rem, 1.3rem + 4vw, 4.75rem); line-height: .98; letter-spacing: -.045em; }
.chapter-lede { margin-top: 20px; max-width: 36em; font-size: 1.125rem; color: var(--ink-2); }
.chapter-head + .article-list { margin-top: 56px; }

.chapter-cta {
  margin-top: 56px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  padding-bottom: 4px; border-bottom: 2px solid var(--c);
  font: 600 1.05rem/1.2 var(--font-head); text-decoration: none;
}
.chapter-cta .icon { transition: transform .2s var(--ease); }
.chapter-cta:hover .icon { transform: translateX(4px); }

/* Services (accueil) : un accès à chaque service */
.service-cards { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.service-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 22px 20px 56px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper);
  text-decoration: none; box-shadow: 4px 4px 0 var(--c);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.service-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--c); }
.service-card-tag { align-self: flex-start; padding: 5px 8px; border-radius: 6px; background: var(--c); color: var(--ink-deep); font: 700 .75rem/1 var(--font-head); letter-spacing: .1em; }
/* Le nom passe sous l'illustration du coin, même quand les cartes sont étroites */
.service-card-name { margin-top: 30px; font: 700 1.35rem/1.1 var(--font-head); letter-spacing: -.02em; }
/* L'illustration de la carte dépasse du coin supérieur droit et bouge au survol */
.sticker-card { position: absolute; top: -34px; right: 10px; width: 108px; }
.sticker-card .sticker-float { animation: none; }
.service-card:hover .sticker-card img.is-active { transform: translateY(-6px) rotate(-6deg) scale(1.08); }
.service-card-pitch { font-size: .97rem; color: var(--muted); }
.service-card-partner { margin-top: -4px; font: 600 .75rem/1.2 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Structure partenaire d'un service (ex. MOOVO pour l'IA) */
.partner-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 5px 12px 5px 14px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper);
  font: 500 .95rem/1 var(--font-head);
}
.partner-badge strong { font-weight: 700; letter-spacing: .1em; }
.partner-logo { display: block; width: auto; height: 30px; }
.sp-partner-logo { display: block; width: min(260px, 70%); height: auto; margin-top: 28px; }
.service-card .icon { position: absolute; left: 20px; bottom: 20px; transition: transform .2s var(--ease); }
.service-card:hover .icon { transform: translateX(4px); }

/* Contact : l'illustration se tient sur la liste et la montre du doigt */
.contact-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.sticker-contact { flex: none; width: clamp(130px, 15vw, 200px); aspect-ratio: 2 / 3; margin-bottom: -1px; }
.contact-links { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.contact-top + .contact-links { position: relative; margin-top: 0; }
.contact-links li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-links span { font: 600 .8rem/1.2 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-links a { font: 600 clamp(1.2rem, 1rem + 1vw, 1.75rem)/1.2 var(--font-head); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--signal); }
.contact-empty { margin-top: 24px; color: var(--muted); }

.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
  font-size: .92rem; color: var(--muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 14px; }
.footer-brand img { display: block; width: auto; height: 52px; }
.to-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; }
.to-top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- En-tête des onglets Services et Articles ---------- */

.page-head { --c: var(--signal); position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); border-bottom: 1.5px solid var(--ink); }
.page-head::before {
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 20%, transparent 70%);
}
#tab-articles .page-head { --c: var(--perso); }
.page-head h1 { margin-top: 18px; max-inline-size: 14ch; font-weight: 700; font-size: clamp(2.8rem, 1.4rem + 5.5vw, 6rem); line-height: .95; letter-spacing: -.05em; }
/* L'illustration se tient sur la ligne du bas de l'en-tête, à droite du texte */
.page-head { --head-art: clamp(220px, 30vw, 400px); }
.page-head .chapter-inner { padding-right: calc(var(--gutter) + var(--head-art)); }
.sticker-head { position: absolute; right: var(--gutter); bottom: calc(-1 * clamp(40px, 6vw, 72px)); width: var(--head-art); }

/* ---------- Onglet Services ---------- */

.service-index { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.service-index a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 6px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper);
  font: 600 .95rem/1 var(--font-head); text-decoration: none; transition: background-color .2s var(--ease);
}
.service-index a:hover { background: var(--paper-2); }
.service-index a span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: var(--ink-deep); font-size: .75rem; }

.service { position: relative; padding: clamp(64px, 8vw, 112px) 0; border-bottom: 1.5px solid var(--ink); }
.service:nth-child(even) { background: color-mix(in srgb, var(--c) 9%, var(--paper)); }
.service-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.service-tag {
  display: block;
  font: 700 clamp(4rem, 2rem + 7vw, 8.5rem)/.85 var(--font-head); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px var(--c);
}
/* Illustrations du service, devant le sigle en contour */
.service-visual { position: relative; width: min(100%, 360px); margin-bottom: 24px; }
.service-visual .service-tag { position: absolute; left: -2%; top: 4%; }
.sticker-service { width: 100%; }
.service h2 { margin-top: 14px; font-weight: 700; font-size: clamp(2.2rem, 1.3rem + 3vw, 3.75rem); line-height: 1; letter-spacing: -.04em; }
.service-pitch { margin-top: 16px; max-width: 26ch; font: 500 1.25rem/1.4 var(--font-head); color: var(--ink-2); }
.service-intro { font-size: 1.15rem; line-height: 1.65; }
.service-body h3 { margin-top: 32px; font: 600 .78rem/1.2 var(--font-head); letter-spacing: .16em; text-transform: uppercase; }
.service-includes { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.service-includes li { position: relative; padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); }
.service-includes li::before { content: ""; position: absolute; left: 0; top: 21px; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.service-for { margin-top: 24px; color: var(--ink-2); }
.service-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 16px; }

.process { padding: clamp(64px, 8vw, 112px) 0; border-bottom: 1.5px solid var(--ink); }
.process h2 { margin-top: 16px; font-weight: 700; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1; letter-spacing: -.04em; }
.process-steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.process-steps li { padding: 24px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 .9rem/1 var(--font-head); }
.process-steps h3 { margin-top: 18px; font-size: 1.35rem; letter-spacing: -.02em; }
.process-steps p { margin-top: 8px; color: var(--muted); }

.cta-band { padding: clamp(64px, 8vw, 112px) 0; background: var(--ink); color: var(--on-dark); }
.cta-band :focus-visible { outline-color: var(--signal); }
.cta-band h2 { font-weight: 700; font-size: clamp(2.4rem, 1.3rem + 4vw, 4.75rem); line-height: .98; letter-spacing: -.045em; }
.cta-band .chapter-lede { color: var(--on-dark-muted); }
.cta-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px; }
.cta-empty { color: var(--on-dark-muted); }
/* L'illustration se tient sur le bord bas du bandeau */
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; }
.sticker-cta { width: clamp(150px, 20vw, 260px); aspect-ratio: 2 / 3; margin-bottom: calc(-1 * clamp(64px, 8vw, 112px)); }
.sticker-cta img { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }

/* ---------- Onglet Articles ---------- */

.articles-section { padding: clamp(48px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); }
.filters { margin-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent;
  font: 600 .9rem/1 var(--font-head); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { background: var(--paper-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.article-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.article-link {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.article-link.has-cover { grid-template-columns: 9.5rem 8rem minmax(0, 1fr) auto; align-items: start; }
.article-link:hover .article-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--signal); }
.article-link:hover .icon-r { transform: translateX(4px); }
.article-date { font: 600 .8rem/1.4 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* Couvertures affichées en entier (photos comme illustrations détourées), sur un fond teinté */
.article-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 6px; background: color-mix(in srgb, var(--perso) 12%, var(--paper)); border: 1.5px solid var(--ink); border-radius: 8px; }
.article-main { display: grid; gap: 6px; }
.article-cat { font: 600 .75rem/1.2 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--perso-text); }
.article-title { font: 700 clamp(1.3rem, 1rem + 1vw, 1.8rem)/1.15 var(--font-head); letter-spacing: -.02em; text-wrap: balance; }
.article-sum { max-width: 60ch; color: var(--muted); }
.article-side { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: .9rem; color: var(--muted); }
.article-side .icon { color: var(--ink); transition: transform .2s var(--ease); }
.draft-chip { padding: 3px 8px; border-radius: 999px; background: #f2c14e; color: var(--ink-deep); font: 600 .72rem/1.2 var(--font-head); }

.empty-state { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: 760px; padding: 40px; border: 1.5px dashed var(--ink); border-radius: 16px; }
.sticker-empty { flex: none; width: 190px; margin-bottom: -40px; }
.empty-title { font: 700 1.6rem/1.2 var(--font-head); letter-spacing: -.02em; }
.empty-state p + p { margin-top: 8px; color: var(--muted); }
.empty-state .chapter-cta { margin-top: 24px; }

/* ---------- Onglet Contact ---------- */

.contact-page { padding: clamp(48px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); }
.contact-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-h { font: 700 1.5rem/1.15 var(--font-head); letter-spacing: -.02em; }
.contact-h + .contact-links { margin-top: 20px; }
/* Les coordonnées restent visibles pendant qu'on remplit le formulaire */
.contact-direct { position: sticky; top: calc(var(--header-h) + 32px); }

/* Formulaire : prépare le message, envoyé ensuite depuis WhatsApp ou la messagerie (voir site.js) */
.contact-form { padding: clamp(24px, 3vw, 36px); border: 1.5px solid var(--ink); border-radius: 16px; background: var(--paper); box-shadow: 6px 6px 0 var(--signal); }
.contact-form[hidden] { display: none; }
.contact-form-intro { margin-top: 8px; color: var(--muted); }
.field { display: grid; gap: 8px; margin-top: 20px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field label { font: 600 .95rem/1.2 var(--font-head); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 10px;
  background-color: var(--paper-light); color: var(--ink); font: 400 1rem/1.4 var(--font-body);
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  appearance: none; padding-right: 44px; cursor: pointer;
  background: var(--paper-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a31' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
}
.field :focus-visible { outline-offset: 1px; border-radius: 10px; }
.field [aria-invalid] { border-color: var(--signal-text); box-shadow: 0 0 0 1.5px var(--signal-text); }
.field-hint { font-size: .9rem; color: var(--muted); }
.form-error { margin-top: 16px; font-weight: 600; color: var(--signal-text); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 28px; }

/* ---------- Page d'article ---------- */

.article { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 .95rem/1 var(--font-head); text-decoration: none; }
.back-link .icon { transition: transform .2s var(--ease); }
.back-link:hover .icon { transform: translateX(-3px); }
.draft-badge { display: table; margin-top: 16px; padding: 6px 10px; border-radius: 6px; background: #f2c14e; color: var(--ink-deep); font: 600 .8rem/1.2 var(--font-head); }
.article-head .kicker { --c: var(--perso); margin-top: 28px; color: var(--perso-text); }
.article-head h1 { margin-top: 14px; font-weight: 700; font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4rem); line-height: 1.02; letter-spacing: -.04em; }
.article-summary { margin-top: 20px; font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); }
.article-meta { margin-top: 20px; padding-bottom: 28px; border-bottom: 1.5px solid var(--ink); font-size: .92rem; color: var(--muted); }
.article-cover { margin: 32px 0 0; padding: 24px; background: color-mix(in srgb, var(--perso) 12%, var(--paper)); border: 1.5px solid var(--ink); border-radius: 14px; }
.article-cover img { display: block; width: auto; max-width: 100%; max-height: 440px; height: auto; margin: 0 auto; border-radius: 8px; }

.article-body { margin-top: 36px; font-size: 1.15rem; line-height: 1.75; }
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 { margin-top: 2em; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); line-height: 1.15; letter-spacing: -.02em; }
.article-body h3 { margin-top: 1.7em; font-size: 1.3rem; line-height: 1.2; }
.article-body h4 { margin-top: 1.5em; font-size: 1.1rem; }
.article-body a { text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-body a:hover { color: var(--signal-text); }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: .4em; }
.article-body li::marker { color: var(--signal-text); }
.article-body blockquote { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--signal); }
.article-body blockquote p { font: 500 1.35rem/1.45 var(--font-head); }
.article-body blockquote p + p { margin-top: .7em; }
.article-body figure { margin: 2em 0; }
.article-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.article-body figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.article-body hr { height: 1.5px; margin: 2.5em 0; border: 0; background: var(--line); }
.article-body pre { overflow-x: auto; padding: 18px 20px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: .9rem; line-height: 1.6; }
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.article-body :not(pre) > code { padding: .12em .4em; border-radius: 5px; background: var(--paper-2); }
.embed iframe { display: block; width: 100%; border: 0; border-radius: 12px; }
.embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-spotify iframe { height: 152px; }
.embed-album iframe, .embed-playlist iframe, .embed-artist iframe { height: 352px; }

.article-foot { margin-top: 64px; padding-top: 28px; border-top: 1.5px solid var(--ink); }
.share { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.article-foot .chapter-cta { margin-top: 40px; }

/* ---------- Pages de service (générées dans services/<id>/) ---------- */

.sp-hero { position: relative; overflow: hidden; padding: clamp(32px, 6vw, 88px) 0 clamp(40px, 6vw, 88px); border-bottom: 1.5px solid var(--ink); background: color-mix(in srgb, var(--c) 10%, var(--paper)); }
.sp-hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.sp-hero .back-link { display: flex; width: fit-content; margin-bottom: 20px; }
.sp-hero h1 { margin-top: 14px; font-weight: 700; font-size: clamp(3rem, 1.6rem + 5.4vw, 6.25rem); line-height: .94; letter-spacing: -.05em; }
.sp-pitch { margin-top: 18px; max-width: 24ch; font: 600 clamp(1.3rem, 1.1rem + .8vw, 1.75rem)/1.3 var(--font-head); letter-spacing: -.01em; }
.sp-hero .lede { margin-top: 18px; }
.sp-visual { position: relative; }
.sp-visual .service-tag { position: absolute; left: 0; top: 2%; font-size: clamp(5rem, 3rem + 9vw, 12rem); }
.sticker-hero { width: 100%; max-width: 520px; margin-left: auto; }

.sp-section { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1.5px solid var(--ink); }
.sp-tinted { background: color-mix(in srgb, var(--c) 8%, var(--paper)); }
.sp-section h2 { font-weight: 700; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1; letter-spacing: -.04em; }
.sp-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.sp-prose p { max-width: 62ch; font-size: 1.2rem; line-height: 1.7; }
.sp-prose p + p { margin-top: 1em; }

.sp-includes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sp-includes li { padding: 28px 24px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); box-shadow: 4px 4px 0 var(--c); }
.sp-num { display: inline-block; padding: 6px 9px; border-radius: 6px; background: var(--c); color: var(--ink-deep); font: 700 .85rem/1 var(--font-head); letter-spacing: .12em; }
.sp-includes h3 { margin-top: 18px; font-size: 1.35rem; letter-spacing: -.02em; }
.sp-includes p { margin-top: 8px; color: var(--muted); }

.sp-plans { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.sp-plans li { position: relative; overflow: hidden; padding: 34px 24px 28px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); }
.sp-plans li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--c); }
.sp-plans h3 { margin-top: 18px; font-size: 1.45rem; letter-spacing: -.02em; }
.sp-plans p { margin-top: 8px; color: var(--muted); }
.sp-plans-note { margin-top: 28px; max-width: 60ch; color: var(--ink-2); }
.sp-plans-cta { margin-top: 24px; }

.sp-steps { position: relative; list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.sp-steps::before { content: ""; position: absolute; top: 21px; left: 22px; right: calc((100% - 72px) / 4 - 22px); height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 10px, transparent 10px 18px); }
.sp-steps li { position: relative; }
.sp-dot { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--c); color: var(--ink-deep); font: 700 1rem/1 var(--font-head); }
.sp-steps h3 { margin-top: 18px; font-size: 1.25rem; letter-spacing: -.01em; }
.sp-steps p { margin-top: 6px; color: var(--muted); }

.sp-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }
.sp-columns.is-single { grid-template-columns: minmax(0, 1fr); }
.sp-columns.is-single .sp-list { columns: 2; column-gap: clamp(32px, 6vw, 96px); }
.sp-list li { break-inside: avoid; }
.sp-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.sp-list li { position: relative; padding: 16px 0 16px 30px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.sp-list li::before { content: ""; position: absolute; left: 0; top: 23px; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.sp-section .article-list { margin-top: 32px; }
.sp-section .service-cards { margin-top: 64px; }

/* ---------- Page introuvable (404) ---------- */

.not-found { padding: clamp(48px, 8vw, 112px) 0; border-bottom: 1.5px solid var(--ink); }
.not-found-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.not-found h1 { margin-top: 16px; font-weight: 700; font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.5rem); line-height: .95; letter-spacing: -.05em; }
.sticker-404 { width: 100%; max-width: 360px; aspect-ratio: 2 / 3; justify-self: center; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-card { max-width: 640px; }
  .service-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .chapter-head { grid-template-columns: minmax(0, 1fr); }
  .chapter-num { font-size: 4.5rem; }
  .service-inner, .process-steps { grid-template-columns: minmax(0, 1fr); }
  .article-link, .article-link.has-cover { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .article-thumb { max-width: 320px; }

  /* Illustrations des en-têtes : sous le texte, posées sur la ligne du bas */
  .page-head .chapter-inner { display: flex; flex-direction: column; align-items: flex-start; padding-right: var(--gutter); }
  .sticker-head { position: relative; order: 9; right: auto; bottom: auto; align-self: flex-end; width: min(62%, 300px); margin: 16px 0 calc(-1 * clamp(40px, 6vw, 72px)); }
  .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .sticker-cta { justify-self: end; margin-top: -24px; }
  .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-direct { position: static; }

  .sp-hero-inner, .sp-split, .sp-includes, .sp-columns, .not-found-inner { grid-template-columns: minmax(0, 1fr); }
  .sticker-404 { max-width: 220px; }
  .sp-columns.is-single .sp-list { columns: 1; }
  .sp-visual { max-width: 420px; justify-self: center; width: 100%; }
  .sp-steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sp-steps::before { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 10px, transparent 10px 18px); }
  .sp-steps li { padding-left: 64px; }
  .sp-dot { position: absolute; left: 0; top: 0; }
  .sp-steps h3 { margin-top: 8px; }
}

@media (max-width: 720px) {
  /* Les onglets passent sur une deuxième ligne */
  :root { --header-h: 108px; }
  .site-header { flex-wrap: wrap; align-content: center; gap: 6px 8px; }
  .tabs {
    order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
    overflow-x: auto; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 1 0 auto; justify-content: center; padding: 0 8px; }
}

@media (max-width: 560px) {
  .hero-actions .btn { width: 100%; }
  .hero-card { transform: none; box-shadow: 5px 5px 0 var(--signal); }
  .hero-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--signal); }
  .service-cards { grid-template-columns: minmax(0, 1fr); }
  .service-cards li + li { margin-top: 24px; }
  .empty-state { flex-direction: column; align-items: flex-start; padding: 28px 20px; }
  .sticker-empty { align-self: flex-end; width: 150px; margin-bottom: -28px; }
  .hero-visual { --avatar-w: 40%; }
  .sticker-contact { width: 38%; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .form-actions .btn { width: 100%; }
}

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