/* ==========================================================================
   docWeb — design pro, mobile-first
   Inspiration structurelle (asso) : tokens, hero, sections, drawer, dark mode
   Ton plus corporate : rayons discrets, typo mesurée, pas de "poster"
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef1f5;
  --ink: #1a1d24;
  --muted: #5a6170;
  --primary: #1a5fbf;
  --primary-strong: #144a96;
  --accent: #c9951a;
  --accent-soft: #d4a84b;
  --line: #dde2ea;
  --shadow: 0 1px 2px rgba(26, 29, 36, 0.04), 0 12px 32px rgba(26, 29, 36, 0.06);
  --header-bg: rgba(246, 247, 249, 0.9);
  --focus: #1a5fbf;
  --btn-fg: #ffffff;
  --btn-primary-bg: #1a5fbf;
  --btn-primary-hover: #144a96;
  --radius-sm: 0.25rem;
  --radius-md: 0.35rem;
  --radius-lg: 0.45rem;
  --max-width: 72rem;
  --measure: 42rem;
  --header-h: 4.75rem;   /* plus d’air vertical dans l’en-tête */
  --touch: 2.75rem;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;

  /* Échelle de type équilibrée (rien en dessous de ~15px hors cas rare) */
  --fs-xs: 0.9375rem;   /* 15px — meta / eyebrow min */
  --fs-sm: 1rem;        /* 16px */
  --fs-base: 1.0625rem; /* 17px — corps */
  --fs-md: 1.125rem;    /* 18px — emphase légère */
  --fs-lg: 1.25rem;     /* 20px — titres de bloc / colonnes footer */
  --fs-xl: 1.4rem;      /* 22px — sous-titres */
  --fs-2xl: 1.55rem;    /* 25px — marque footer */
  --font-size: var(--fs-base);
  --brand-size: 1.85rem; /* docWeb bien lisible face au menu */
}

/* Mode sombre adouci : gris ardoise, pas de noir pur — moins agressif pour les yeux */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1f2a;           /* fond doux, pas noir */
  --surface: #242b38;      /* cartes un cran plus claires */
  --surface-soft: #2c3444;
  --ink: #dce2ec;          /* texte moins blanc éclatant */
  --muted: #a8b0c0;
  --primary: #6ba3f0;      /* bleu lisible sur fond sombre */
  --primary-strong: #8bb8f5;
  --accent: #d4b056;       /* or adouci */
  --accent-soft: #c4a04a;
  --line: #3d4658;         /* bordures plus visibles */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 10px 28px rgba(0, 0, 0, 0.22);
  --header-bg: rgba(26, 31, 42, 0.94);
  --focus: #6ba3f0;
  --btn-fg: #ffffff;       /* texte boutons primaires toujours clair */
  --btn-primary-bg: #3d7fd4;
  --btn-primary-hover: #4d8fdf;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: 1.65;
  transition: background-color 160ms ease, color 160ms ease;
}

body.menu-open {
  overflow: hidden;
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-strong);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  margin: 0 0 0.65em;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
h3 { font-size: var(--fs-lg); }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

blockquote {
  margin: 1.35em 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-style: normal;
}

blockquote p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  margin: 1.25em 0 1.5em;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

thead { background: var(--primary); color: #fff; }


th, td {
  padding: 0.7em 0.85em;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  min-width: 6.5rem;
}

tbody tr:nth-child(even) { background: var(--surface-soft); }
tbody tr:last-child td { border-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.75em 0;
}

/* --- Layout --- */
.wrap,
.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

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

/* Brand — wordmark docWeb (logo dW retiré du chrome pour l’instant) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.35rem 0;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand:hover { color: inherit; text-decoration: none; }

/* dW réservé au favicon / usage futur — masqué dans header/footer */
.brand__logo,
.site-header .brand__logo,
.site-footer .brand__logo {
  display: none;
}

.brand__doc { color: var(--primary); }
.brand__web { color: var(--accent); }

.brand__copy {
  display: grid;
  gap: 0.2rem;
  line-height: 1.15;
  justify-items: center; /* centre Info & méthode sous docWeb */
  text-align: center;
}

.brand__name {
  font-size: var(--brand-size);
  line-height: 1.12;
  font-weight: 700;
  text-align: center;
}

.brand__tag {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

/* Skip */
.skip-link {
  position: fixed;
  z-index: 200;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--bg);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  z-index: 90;
  top: 0;
  min-height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.site-header__bar {
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0 58%, var(--accent) 58% 100%);
}

.site-header__inner,
.header-inner {
  display: flex;
  min-height: calc(var(--header-h) - 2px);
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  /* air haut / bas — l’en-tête respire */
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-button {
  display: inline-grid;
  width: var(--touch);
  height: var(--touch);
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.theme-icon {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: -0.28rem -0.2rem 0 -0.12rem var(--surface);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  width: 1.05rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before { top: -0.35rem; }
.menu-icon::after { top: 0.35rem; }

/* Desktop nav hidden on mobile */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  justify-content: flex-end;
  margin-inline: 0.5rem 0.25rem;
}

.desktop-nav a {
  display: inline-flex;
  min-height: 2.6rem;
  padding: 0.45rem 0.85rem;
  align-items: center;
  color: var(--ink);
  font-size: var(--fs-md); /* menu top — indépendant du footer */
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--primary);
}

.desktop-nav a[aria-current="page"] {
  font-weight: 700;
}

.desktop-nav .nav-cta {
  margin-left: 0.35rem;
  padding-inline: 0.85rem;
  background: var(--primary);
  color: #fff;
  font-weight: 650;
}

.desktop-nav .nav-cta:hover {
  background: var(--primary-strong);
  color: #fff;
}



/* Drawer mobile */
.nav-drawer {
  position: fixed;
  z-index: 120;
  inset: 0 auto 0 0;
  display: flex;
  width: min(88vw, 20rem);
  padding: 1rem;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform 220ms ease;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  font-weight: 700;
  font-size: var(--fs-md);
}

.main-nav {
  display: grid;
  gap: 0.15rem;
  padding: 1.1rem 0;
}

.main-nav a {
  display: flex;
  min-height: var(--touch);
  padding: 0.55rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.main-nav a::after {
  content: "→";
  opacity: 0.35;
  font-weight: 400;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--ink);
}

.drawer-cta {
  margin-top: auto;
}

.nav-overlay {
  position: fixed;
  z-index: 110;
  inset: 0;
  border: 0;
  background: rgba(10, 14, 22, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn,
.button {
  display: inline-flex;
  min-height: 2.85rem;
  padding: 0.65rem 1.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--btn-primary-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}

.btn:hover,
.button:hover {
  background: var(--btn-primary-hover);
  color: var(--btn-fg);
  text-decoration: none;
}

/* Sombre : boutons bien visibles (fond bleu net + texte blanc) */
[data-theme="dark"] .btn:not(.btn--secondary):not(.btn--ghost):not(.button-secondary),
[data-theme="dark"] .button:not(.button-secondary) {
  background: var(--btn-primary-bg);
  border-color: #5a96e0;
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

[data-theme="dark"] .btn:not(.btn--secondary):not(.btn--ghost):hover,
[data-theme="dark"] .button:not(.button-secondary):hover {
  background: var(--btn-primary-hover);
  border-color: #7aaff0;
  color: #ffffff;
}

.btn--secondary,
.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.btn--secondary:hover,
.button-secondary:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
  color: var(--primary);
}

[data-theme="dark"] .btn--secondary,
[data-theme="dark"] .button-secondary {
  background: var(--surface-soft);
  border-color: #5a6578;
  color: var(--ink);
}

[data-theme="dark"] .btn--secondary:hover,
[data-theme="dark"] .button-secondary:hover {
  background: #353e50;
  border-color: var(--primary);
  color: #c5dbf8;
}

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.btn--ghost:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

[data-theme="dark"] .btn--ghost {
  border-color: #5a6578;
  color: var(--ink);
}

[data-theme="dark"] .btn--ghost:hover {
  background: var(--surface-soft);
  color: #fff;
}

[data-theme="dark"] .desktop-nav .nav-cta {
  background: var(--btn-primary-bg);
  color: #ffffff !important;
  border: 1px solid #5a96e0;
}

[data-theme="dark"] .desktop-nav .nav-cta:hover {
  background: var(--btn-primary-hover);
  color: #ffffff !important;
}

[data-theme="dark"] thead {
  color: #ffffff;
}

.btn-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

/* ==========================================================================
   Hero & sections
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.25rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero {
  padding: 2.25rem 0 2.75rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  max-width: 20ch;
  margin: 0.75rem 0 1rem;
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.hero h1 span {
  color: var(--accent);
}

.hero-lead,
.page-lead,
.lede {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.65;
}

.hero-note {
  display: flex;
  margin-top: 1.5rem;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.hero-visual {
  position: relative;
  min-height: 18.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(135deg, var(--surface-soft) 0%, transparent 55%),
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--accent) 28%, transparent) 0 18%, transparent 45%),
    radial-gradient(circle at 18% 72%, color-mix(in srgb, var(--primary) 22%, transparent) 0 16%, transparent 42%);
}

.visual-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
}

.visual-card {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(6px);
}

.visual-card .card-number {
  margin-bottom: 0.4rem;
  font-size: var(--fs-sm);
}

.visual-card strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.visual-card span:not(.card-number) {
  display: block;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.45;
}

.section {
  padding: 2.25rem 0;
}

.section--alt,
.section-soft {
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head,
.section-heading {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
  max-width: 40rem;
}

.section__head h2,
.section-heading h2 {
  margin: 0.35rem 0 0;
  color: var(--ink);
}

.section__head p,
.section-heading p {
  margin: 0;
  color: var(--muted);
}

/* Cards / pillars */
.pillars,
.card-grid {
  display: grid;
  gap: 0.85rem;
}

.pillar,
.card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
}

.card--feature {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, var(--surface)) 0%, var(--surface) 48%);
}

.card__label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card__meta,
.post-meta {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.card-number {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.pillar h3,
.card h3 {
  margin: 0 0 0.4em;
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 700;
}

/* Titres des 3 idées (ex. « On ne s’improvise pas ») — un cran au-dessus du corps */
.pillar h3 {
  font-size: clamp(1.2rem, 1.5vw, 1.35rem);
  line-height: 1.3;
}

.pillar p,
.card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-md);
}

.card h2 {
  color: var(--ink);
  margin-bottom: 0.4em;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.home-grid {
  display: grid;
  gap: 0.85rem;
}

/* CTA panel */
.cta-panel {
  display: grid;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  align-items: center;
}

.cta-panel h2 {
  margin: 0 0 0.4rem;
  font-size: var(--fs-xl);
}

.cta-panel p {
  margin: 0;
  color: var(--muted);
}

/* Page head */
.page-head {
  padding: 1.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.page-head__inner {
  max-width: 44rem;
}

.breadcrumb {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.page-head h1 {
  margin-bottom: 0.45em;
}

/* Article */
.article-layout {
  padding: 1.75rem 0 2.75rem;
}

.article-layout__grid {
  display: grid;
  gap: 1.5rem;
}

.article-body {
  max-width: var(--measure);
  font-size: var(--fs-md);
}

.article-body > h2 {
  margin-top: 2em;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
  color: var(--primary);
  font-size: var(--fs-xl);
}

.article-body > h2:first-of-type {
  margin-top: 0;
}

.article-body h3 {
  margin-top: 1.4em;
  color: var(--ink);
}

.lead-box {
  border-left-color: var(--accent);
  font-weight: 600;
}

.toc {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.toc h2 {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.1em;
  font-size: var(--fs-sm);
}

.toc a {
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--primary);
}

.toc--mobile { margin-bottom: 1.5rem; }
.toc--desktop { display: none; }
.article-aside { display: none; }

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.article-end {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

/* Article list */
.article-list {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list a.card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s;
}

.article-list a.card:hover {
  border-color: var(--primary);
}

/* Form (legacy helpers) */
.form {
  max-width: 28rem;
  display: grid;
  gap: 1rem;
}

/* ==========================================================================
   Contact — structure type lannonceur.fr (carte centrée, labels empilés)
   ========================================================================== */
.page-contact .contact-main {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vh, 3.5rem) 1rem clamp(2.5rem, 7vh, 4rem);
  flex: 1;
}

.contact-card {
  width: min(47.5rem, 100%);
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card .eyebrow {
  margin-bottom: 0.65rem;
}

.contact-card h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.12;
}

.contact-intro {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.65;
}

.contact-form {
  display: grid;
  gap: 1.1rem;
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 650;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 400;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
  background: #1e2430;
  border-color: #4a5468;
}

[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus {
  background: #252c3a;
  border-color: var(--primary);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.contact-form textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.5;
}

.contact-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.35rem;
}

.contact-form .btn:disabled,
.contact-form button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  filter: none;
}

[data-theme="dark"] .contact-form .btn:disabled,
[data-theme="dark"] .contact-form button:disabled {
  opacity: 0.8;
  background: #4a6fa8;
  border-color: #6a8fc4;
  color: #eef4fc;
}

.contact-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

@media (max-width: 40rem) {
  .contact-card {
    padding: 1.75rem 1.25rem;
  }

  .contact-actions .btn {
    width: 100%;
  }
}

@media (min-width: 64rem) {
  .contact-card {
    padding: 2.75rem 2.5rem;
  }

  .contact-form {
    gap: 1.25rem;
  }

  .contact-form textarea {
    min-height: 11rem;
  }
}

/* Footer — style pro type lannonceur.fr (pas de soulignement) */
.site-footer {
  margin-top: auto;
  padding: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-md);
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--primary);
  text-decoration: none; /* pas d’underline — plus pro */
}

/* marque footer : jamais soulignée */
.site-footer .footer-logo,
.site-footer .footer-logo:hover,
.site-footer .brand,
.site-footer .brand:hover {
  text-decoration: none;
  color: inherit;
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
  min-height: 8.25rem;
  padding: 1.75rem 0;
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 0.5rem;
}

.footer-logo {
  display: inline-block;
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-decoration: none !important;
}

.footer-logo .brand__doc { color: var(--primary); }
.footer-logo .brand__web { color: var(--accent); }

.footer-baseline {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.55;
  font-weight: 500;
}

.footer-copy {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.footer-menu {
  display: grid;
  gap: 1.25rem;
}

.footer-column {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.35rem; /* moins d’air entre les liens */
}

/* Titres de colonnes = un cran au-dessus des liens */
.footer-column strong {
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 0.2rem; /* léger écart titre → liens */
}

/* Sélecteur bien ciblé : ne touche PAS au menu du header */
.site-footer .footer-column a {
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.35;
  font-weight: 500;
  text-decoration: none;
  min-height: 0;
  padding: 0.15rem 0;
}

/* Réseaux : garder des cibles un peu plus larges pour les icônes */
.footer-column--social {
  gap: 0.45rem;
}

.site-footer .footer-column a:hover {
  color: var(--primary);
}

/* Icônes réseaux — sobres, pro */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.footer-social a:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
  color: var(--primary);
}

.footer-social svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  display: block;
}

[data-theme="dark"] .footer-social a {
  background: var(--surface-soft);
  border-color: #4a5468;
}

[data-theme="dark"] .footer-social a:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: #353e50;
}

/* legacy aliases if any remain */
.footer-grid,
.site-footer__inner,
.footer-links,
.site-footer__links,
.footer-bottom,
.footer-intro {
  /* no-op fallbacks avoided — structure nouvelle */
}

/* ==========================================================================
   TABLETTE ≥ 640px
   ========================================================================== */
@media (min-width: 40rem) {
  .pillars,
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-list {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 2.75rem 0 3.25rem;
  }

  .hero-visual {
    min-height: 18rem;
  }

  .cta-panel {
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   ≥ 768px — nav desktop
   ========================================================================== */
@media (min-width: 48rem) {
  .menu-button {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .pillars,
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-grid {
    grid-template-columns: 1.45fr 1fr;
    gap: 1rem;
    align-items: stretch;
  }

  .footer-inner {
    grid-template-columns: minmax(14rem, 1fr) auto;
    gap: 2rem;
    align-items: start;
    padding: 1.85rem 0;
  }

  .footer-menu {
    grid-template-columns: repeat(3, minmax(8rem, auto));
    gap: 0.75rem 1.75rem;
    justify-content: end;
  }

  .footer-column + .footer-column {
    padding-left: 1.5rem;
  }

  .footer-column + .footer-column::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2.1rem;
    bottom: 0;
    width: 1px;
    background: var(--line);
  }

  /* Dernière colonne (Réseaux) bien calée à droite du bloc menu */
  .footer-column--social {
    min-width: 8.5rem;
  }

  table {
    display: table;
    overflow: visible;
  }

  th, td {
    min-width: 0;
  }
}

/* ==========================================================================
   PC ≥ 1024px — tailles confort lecture écran large
   ========================================================================== */
@media (min-width: 64rem) {
  :root {
    --fs-xs: 1rem;
    --fs-sm: 1.0625rem;
    --fs-base: 1.125rem;  /* 18px */
    --fs-md: 1.2rem;
    --fs-lg: 1.3rem;      /* titres colonnes footer, h3 */
    --fs-xl: 1.45rem;
    --fs-2xl: 1.7rem;
    --font-size: var(--fs-base);
    --brand-size: 2.05rem; /* docWeb plus présent en PC */
    --header-h: 5.35rem;
    --measure: 44rem;
  }

  .site-header__inner,
  .header-inner {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    gap: 1.75rem;
  }

  .desktop-nav {
    gap: 0.3rem;
    margin-inline: 1rem 0.5rem;
  }

  .desktop-nav a {
    font-size: 1.15rem; /* menu top plus lisible en PC */
    padding: 0.5rem 0.95rem;
  }

  .brand__tag {
    font-size: 0.75rem;
  }

  .brand__name {
    letter-spacing: -0.03em;
  }

  .wrap,
  .container {
    width: min(calc(100% - 3.5rem), var(--max-width));
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.75rem;
  }

  .hero {
    padding: 3.5rem 0 4rem;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .section {
    padding: 3rem 0;
  }

  .pillar,
  .card {
    padding: 1.35rem 1.4rem;
  }

  .article-layout__grid {
    grid-template-columns: minmax(0, 1fr) 15.5rem;
    gap: 2.5rem;
    align-items: start;
  }

  .article-body {
    max-width: 46rem;
    line-height: 1.7;
  }

  .toc--mobile {
    display: none;
  }

  .article-aside {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 0.85rem);
  }

  .toc--desktop {
    display: block;
  }

  .footer-inner {
    min-height: 8.5rem;
    padding: 2.15rem 0;
    gap: 2.25rem;
  }

  .footer-column {
    gap: 0.3rem;
  }

  .footer-column strong {
    font-size: var(--fs-lg);
  }

  .site-footer .footer-column a {
    font-size: 1.05rem; /* footer seulement — menu top intact */
    padding: 0.12rem 0;
  }

  .pillar h3 {
    font-size: 1.35rem;
  }
}

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