/* Articles et index, direction C « Atelier ».
   Jetons, base, en-tête et pied repris de landing.html et des articles déjà migrés
   (cfe-micro-entrepreneur-2026.html, facturation-electronique-obligatoire-2026-freelances.html). */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  --sable: oklch(95.4% 0.018 82);
  --sable-fonce: oklch(91.5% 0.024 80);
  --papier: oklch(99% 0.006 85);
  --encre: oklch(22% 0.012 70);
  --encre-douce: oklch(40% 0.014 70);
  --encre-pale: oklch(48% 0.014 70);
  --bleu: oklch(38% 0.13 264);
  --bleu-fonce: oklch(31% 0.12 264);
  --bleu-voile: oklch(93% 0.03 264);
  --ocre: oklch(77% 0.14 76);
  --trait: oklch(84% 0.02 78);

  --f-titre: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --f-texte: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --t-xs: 0.875rem;
  --t-s: 1rem;
  --t-m: 1.125rem;
  --t-l: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --t-xl: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);

  --rayon: 18px;
  --rayon-plein: 999px;
  --marge: clamp(1rem, 0.5rem + 3vw, 2.5rem);
  --largeur: 72rem;
  --lecture: 46rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--sable);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: var(--t-m);
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--f-titre); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--bleu); text-underline-offset: 3px; }
a:hover { color: var(--bleu-fonce); }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; border-radius: 6px; }
.enveloppe { width: 100%; max-width: var(--largeur); margin: 0 auto; padding-inline: var(--marge); }
.lien-evitement { position: absolute; left: -9999px; }
.lien-evitement:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--papier); padding: 0.5rem 1rem; }

/* ── Boutons ───────────────────────────────────────────────── */
.bouton, .cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.6rem;
  border-radius: var(--rayon-plein);
  background: var(--bleu); color: var(--papier);
  font-weight: 600; font-size: var(--t-s); text-decoration: none;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bouton:hover { background: var(--bleu-fonce); color: var(--papier); }
.cta-btn { background: var(--ocre); color: var(--encre); }
.cta-btn:hover { background: oklch(71% 0.14 76); color: var(--encre); }

/* ── En-tête ───────────────────────────────────────────────── */
.entete { padding-block: 1.25rem; }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.marque { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--encre); text-decoration: none; font-family: var(--f-titre); font-weight: 800; font-size: 1.2rem; }
.marque svg { flex: none; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.bouton) { display: none; color: var(--encre); text-decoration: none; font-weight: 500; font-size: var(--t-s); }
.nav a:not(.bouton):hover { text-decoration: underline; }
.nav .bouton { min-height: 44px; padding: 0.55rem 1.2rem; background: var(--encre); }
.nav .bouton:hover { background: oklch(32% 0.012 70); }
@media (min-width: 860px) { .nav a:not(.bouton) { display: inline; } }

/* ── Fil d'Ariane ──────────────────────────────────────────── */
.breadcrumb { width: 100%; max-width: var(--lecture); margin: 0 auto; padding: 0.5rem var(--marge) 0; font-size: var(--t-xs); color: var(--encre-pale); }
.breadcrumb a { color: var(--encre-douce); }
.breadcrumb span { margin-inline: 0.4rem; }
.breadcrumb--large { max-width: var(--largeur); }

/* ── Article ───────────────────────────────────────────────── */
.article-wrap { width: 100%; max-width: var(--lecture); margin: 0 auto; padding: 1.25rem var(--marge) clamp(3rem, 2rem + 4vw, 5rem); }
.article-cat { display: inline-block; font-size: var(--t-xs); font-weight: 600; color: var(--encre-pale); letter-spacing: 0.02em; }
.article-title { margin-top: 0.75rem; font-size: var(--t-xl); font-weight: 800; }
.article-desc { margin-top: 1.25rem; font-size: var(--t-l); line-height: 1.45; color: var(--encre-douce); }

.article-content { margin-top: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.article-content > * + * { margin-top: 1rem; }
.article-content h2 { margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); font-size: var(--t-l); font-weight: 800; }
.article-content h3 { margin-top: 2rem; font-size: var(--t-m); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.article-content > :first-child { margin-top: 0; }
.article-content ul, .article-content ol { padding-left: 1.25rem; }
.article-content li + li { margin-top: 0.5rem; }
.article-content li::marker { color: var(--bleu); font-weight: 600; }

.article-content .encadre {
  margin-top: 1.25rem; padding: 1rem 1.15rem;
  border-left: 4px solid var(--ocre); border-radius: 0 14px 14px 0;
  background: var(--papier);
}
.article-content .sources {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); padding-top: 1.25rem;
  border-top: 1px solid var(--trait);
  font-size: var(--t-xs); color: var(--encre-pale);
}

/* Appel vers l'app, comme le bloc .suite des articles migrés */
.cta-box { margin-top: 2.5rem; padding: clamp(1.5rem, 1rem + 2vw, 2rem); border-radius: 24px; background: var(--bleu); color: var(--papier); }
.cta-box h3 { font-size: var(--t-l); font-weight: 800; }
.cta-box p { margin-top: 0.75rem; color: oklch(92% 0.025 264); }
.cta-box .cta-btn { margin-top: 1.25rem; }
.cta-box .cta-note { font-size: var(--t-xs); color: oklch(88% 0.03 264); }

/* ── Index des articles ────────────────────────────────────── */
.page-wrap { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 1.25rem var(--marge) clamp(3rem, 2rem + 4vw, 5rem); }
.page-title { font-size: var(--t-xl); font-weight: 800; }
.page-desc { margin-top: 1.25rem; max-width: 60ch; font-size: var(--t-l); line-height: 1.45; color: var(--encre-douce); }
.acces-libre { display: inline-block; margin-top: 1rem; padding: 0.5rem 0.9rem; border-radius: 14px; background: var(--bleu-voile); color: var(--bleu-fonce); font-size: var(--t-xs); }
.acces-libre strong { font-weight: 600; }

.search-zone { margin-top: 2rem; display: grid; gap: 1rem; }
.search-bar {
  display: flex; align-items: center; gap: 0.6rem;
  max-width: 36rem; padding-inline: 1rem;
  background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon-plein);
}
.search-bar:focus-within { outline: 3px solid var(--ocre); outline-offset: 3px; }
.search-icon { display: inline-flex; flex: none; color: var(--encre-pale); }
#search-input {
  flex: 1; min-width: 0; min-height: 48px;
  border: 0; background: transparent;
  font: inherit; font-size: var(--t-s); color: var(--encre);
}
#search-input:focus-visible { outline: none; }
#search-input::placeholder { color: var(--encre-pale); }
.cat-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-btn {
  min-height: 44px; padding: 0.5rem 1rem;
  border: 1px solid var(--trait); border-radius: var(--rayon-plein);
  background: transparent; color: var(--encre);
  font: inherit; font-size: var(--t-xs); font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cat-btn:hover { background: var(--papier); }
.cat-btn.active { background: var(--encre); border-color: var(--encre); color: var(--papier); }

.no-results { display: none; padding-block: 3rem; color: var(--encre-douce); }
.no-results strong { display: block; margin-bottom: 0.5rem; font-family: var(--f-titre); font-size: var(--t-l); color: var(--encre); }

/* Une suite d'entrées séparées par un filet, pas des cartes */
.cat-section { margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.cat-title { padding-bottom: 0.75rem; border-bottom: 2px solid var(--encre); font-family: var(--f-titre); font-size: var(--t-l); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
.articles-grid { display: grid; column-gap: 2.5rem; }
@media (min-width: 820px) { .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.article-card { display: flex; flex-direction: column; gap: 0.4rem; padding-block: 1.25rem; border-bottom: 1px solid var(--trait); color: var(--encre); text-decoration: none; }
.article-card h3 { font-size: var(--t-m); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.article-card p { font-size: var(--t-s); color: var(--encre-douce); }
.article-card-arrow { margin-top: auto; padding-top: 0.25rem; font-size: var(--t-xs); font-weight: 600; color: var(--bleu); }
.article-card:hover { color: var(--encre); }
.article-card:hover h3 { color: var(--bleu); text-decoration: underline; text-underline-offset: 3px; }

/* ── Pied de page ──────────────────────────────────────────── */
.pied { padding-block: 3rem; font-size: var(--t-xs); color: var(--encre-pale); }
.pied .enveloppe { display: grid; gap: 1.25rem; }
.pied nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.pied a { color: var(--encre-douce); }
