/* ==========================================================================
   LEYA CONCEPT IA — Système visuel
   Direction : Suisse éditorial (lignée Pentagram / Vignelli)
   --------------------------------------------------------------------------
   SYSTÈME DÉCLARÉ — ne pas dévier sans décision explicite.

   Couleurs   : crème #F4F1EA (fond) · encre #14110E (texte) · rouge #C8322A
                (accent, uniquement numéros de section + liens) · filet #D3CEC3
   Typo       : Archivo (titres, 600/700) + Public Sans (texte, 400/500/600)
   Échelle    : 12 / 14 / 16 / 20 / 26 / 34 / 46 / 64 px — pas d'autre taille
   Rythme     : grille 12 colonnes, gouttière 32px, sections séparées par un
                filet 1px, numérotées en folio rouge
   Interdits  : dégradés, ombres portées, coins arrondis > 2px, emoji, icônes
                décoratives, photos de banque d'images
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- 2. Jetons ---------- */
:root {
  --cream:  #F4F1EA;
  --ink:    #14110E;
  --red:    #C8322A;
  --rule:   #D3CEC3;
  --muted:  #55503F;
  --faint:  #857F6E;
  --paper:  #FAF8F4;

  --f-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-text:    "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 32px;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1280px;
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}
::selection { background: var(--red); color: var(--cream); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* Masqué visuellement sans sortir du flux : évite toute barre de défilement parasite. */
.skip {
  position: absolute; top: 0; left: 0;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
  background: var(--ink); color: var(--cream);
  padding: 12px 20px; font-size: 14px; font-weight: 600; z-index: 100;
}
.skip:focus {
  width: auto; height: auto; overflow: visible;
  clip-path: none; white-space: normal;
}

/* ---------- 4. Grille ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- 5. Typographie ---------- */
.h-xl, .h-lg, .h-md, .h-sm { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.03; text-wrap: balance; }
.h-xl { font-size: clamp(38px, 6.2vw, 64px); }
.h-lg { font-size: clamp(30px, 4.2vw, 46px); }
.h-md { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.025em; line-height: 1.1; }
.h-sm { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }

.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--muted); max-width: 58ch; text-wrap: pretty; }
p { max-width: 68ch; text-wrap: pretty; }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
}
.folio {
  font-family: var(--f-display); font-weight: 700; font-size: 14px;
  letter-spacing: .04em; color: var(--red);
}

/* ---------- 6. En-tête ---------- */
.masthead { border-bottom: 1px solid var(--ink); position: sticky; top: 0; background: var(--cream); z-index: 50; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.wordmark {
  font-family: var(--f-display); font-weight: 700; font-size: 15px;
  letter-spacing: .01em; white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 48px; /* cible tactile */
}
.wordmark span { color: var(--red); }

.nav ul { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--red); }

.nav-toggle { display: none; }

/* ---------- 7. Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 13px 26px;
  font-family: var(--f-text); font-size: 15px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 8. Sections ---------- */
.section { padding-block: clamp(56px, 7vw, 96px); border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.section-head { display: grid; grid-template-columns: 88px 1fr; gap: var(--gutter); margin-bottom: 44px; align-items: start; }
.section-head .folio { padding-top: 9px; }
@media (max-width: 700px) {
  .section-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 32px; }
  .section-head .folio { padding-top: 0; }
}

/* ---------- 9. Héros ---------- */
.hero { padding-block: clamp(52px, 8vw, 104px) clamp(44px, 6vw, 72px); }
.hero .h-xl { max-width: 17ch; margin-bottom: 24px; }
.hero .lede { margin-bottom: 34px; }
.hero-meta {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 8px 32px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--faint);
}

/* ---------- 10. Réponse directe (bloc GEO) ---------- */
.answer {
  border-left: 2px solid var(--red);
  padding: 4px 0 4px 22px;
  margin-bottom: 34px;
  max-width: 62ch;
}
.answer p { font-size: 17px; line-height: 1.55; color: var(--ink); }

/* ---------- 11. Secteurs ---------- */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.sectors > * { background: var(--cream); padding: 26px 24px 28px; display: flex; flex-direction: column; }
.sectors a:hover { background: var(--paper); }
.sectors .n { font-family: var(--f-display); font-weight: 700; font-size: 13px; color: var(--red); margin-bottom: 14px; }
.sectors h3 { margin-bottom: 10px; }
.sectors p { font-size: 14.5px; line-height: 1.55; color: var(--muted); flex: 1; }
.sectors .go { margin-top: 18px; font-size: 13.5px; font-weight: 600; }
.sectors .go::after { content: " →"; color: var(--red); }
@media (max-width: 860px) { .sectors { grid-template-columns: 1fr; } }

/* ---------- 12. Liste de problèmes ---------- */
.problems { display: grid; grid-template-columns: 88px 1fr; gap: var(--gutter); }
.problems ol { border-top: 1px solid var(--rule); }
.problems li { border-bottom: 1px solid var(--rule); padding: 22px 0; display: grid; grid-template-columns: 44px 1fr; gap: 20px; }
.problems .idx { font-family: var(--f-mono); font-size: 12px; color: var(--red); padding-top: 5px; letter-spacing: .06em; }
.problems h3 { margin-bottom: 6px; }
.problems p { font-size: 15px; color: var(--muted); }
@media (max-width: 700px) {
  .problems { grid-template-columns: 1fr; }
  .problems li { grid-template-columns: 32px 1fr; gap: 14px; }
}

/* ---------- 13. Tableau comparatif ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 15px; }
table.compare caption { text-align: left; font-size: 13px; color: var(--faint); padding-bottom: 14px; font-family: var(--f-mono); letter-spacing: .04em; }
table.compare th, table.compare td { text-align: left; padding: 15px 18px 15px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.compare thead th { font-family: var(--f-display); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--ink); color: var(--ink); }
table.compare tbody th { font-weight: 500; color: var(--muted); font-size: 14px; width: 30%; }
table.compare .yes { font-weight: 600; }
table.compare .yes::before { content: "— "; color: var(--red); }
table.compare .no { color: var(--faint); }

/* ---------- 14. Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.steps > li { background: var(--cream); padding: 24px 22px 28px; }
.steps .n { font-family: var(--f-display); font-weight: 700; font-size: 34px; color: var(--red); line-height: 1; margin-bottom: 16px; letter-spacing: -.03em; }
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 15. Emplacements (témoignages, photos) ---------- */
.slot {
  border: 1px dashed var(--rule); background: var(--paper);
  padding: 24px 22px; display: flex; flex-direction: column; gap: 10px;
}
.slot .slot-tag {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
}
.slot p { font-size: 15px; color: var(--faint); font-style: italic; }
.slot .slot-who { font-family: var(--f-mono); font-size: 11.5px; color: var(--faint); letter-spacing: .04em; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
@media (max-width: 860px) { .slots { grid-template-columns: 1fr; } }

/* ---------- 15b. Bande photo — un seul visuel par page, jamais décoratif ---------- */
.photo-band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.photo-band img { width: 100%; max-height: 420px; object-fit: cover; }
.photo-band figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px var(--pad);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--faint);
}
.photo-band figcaption .tag { color: var(--red); }
@media (max-width: 540px) { .photo-band figcaption { flex-direction: column; gap: 4px; } }

/* ---------- 15c. Grille photo — captures d'un site livré, preuve concrète ---------- */
.photo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin-top: 28px;
}
.photo-grid figure { background: var(--cream); }
.photo-grid img { width: 100%; height: 190px; object-fit: cover; }
.photo-grid figcaption {
  padding: 8px 12px 12px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .05em; color: var(--faint);
}
@media (max-width: 860px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 16. FAQ ---------- */
.faq { border-top: 1px solid var(--rule); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--f-display); font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 17px;
  font-family: var(--f-display); font-size: 24px; font-weight: 400; color: var(--red); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 22px; }
.faq p { font-size: 15.5px; color: var(--muted); }
.faq p + p { margin-top: 12px; }

/* ---------- 17. Appel final ---------- */
.cta-band { background: var(--ink); color: var(--cream); padding-block: clamp(52px, 6vw, 84px); }
.cta-band .h-lg { margin-bottom: 18px; max-width: 20ch; }
.cta-band .lede { color: #B9B2A2; margin-bottom: 32px; }
.cta-band .btn { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.cta-band .btn:hover { background: var(--red); color: var(--cream); border-color: var(--red); }
.cta-band .btn-ghost { background: transparent; color: var(--cream); border-color: #4A4438; }
.cta-band .btn-ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.cta-note { margin-top: 26px; font-size: 13.5px; color: #857F6E; max-width: 56ch; }

/* ---------- 18. Pied de page ---------- */
.foot { border-top: 1px solid var(--ink); padding-block: 48px 36px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--gutter); }
.foot h2 { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; font-weight: 400; }
.foot li { margin-bottom: 8px; }
.foot a:hover { color: var(--red); }
.foot address { font-style: normal; color: var(--muted); line-height: 1.7; }
.foot-base { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 12.5px; color: var(--faint); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- 19. Navigation mobile ---------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 48px; min-height: 48px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
    font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink);
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--ink);
    padding: 8px var(--pad) 24px;
  }
  .nav[data-open="true"] { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-bottom: 1px solid var(--rule); }
  .nav a { display: block; padding: 15px 0; font-size: 16px; border-bottom: 0; }
  .nav .btn { margin-top: 18px; width: 100%; }
}

/* ---------- 20. Impression ---------- */
@media print {
  .masthead, .cta-band, .nav-toggle { display: none; }
  body { background: #fff; font-size: 11pt; }
}

/* ==========================================================================
   21. BLOG — index, filtres, article
   ========================================================================== */

/* --- Filtres par rubrique --- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters a {
  font-size: 13px; font-weight: 500; letter-spacing: .01em;
  padding: 9px 16px; min-height: 40px; display: inline-flex; align-items: center;
  border: 1px solid var(--rule);
}
.filters a:hover { border-color: var(--ink); }
.filters a[aria-current="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* --- Liste d'articles --- */
.posts { border-top: 1px solid var(--ink); }
.posts > li { border-bottom: 1px solid var(--rule); }
.posts article { display: grid; grid-template-columns: 132px 1fr 150px; gap: var(--gutter); padding: 26px 0; align-items: start; }
.posts .post-date { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--faint); padding-top: 5px; }
.posts h3 { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 8px; }
.posts h3 a:hover { color: var(--red); }
.posts .post-excerpt { font-size: 15px; color: var(--muted); max-width: 62ch; }
.posts .post-cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--red); padding-top: 6px; }
.posts .post-read { font-family: var(--f-mono); font-size: 11.5px; color: var(--faint); margin-top: 8px; display: block; }
@media (max-width: 900px) {
  .posts article { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .posts .post-date { padding-top: 0; }
  .posts .post-cat { padding-top: 0; }
}

/* --- Article --- */
.article-head { padding-block: clamp(40px, 5vw, 64px) 34px; border-bottom: 1px solid var(--rule); }
.breadcrumb { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--faint); margin-bottom: 22px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/ "; color: var(--rule); }
.breadcrumb a:hover { color: var(--red); }
.article-head h1 { max-width: 20ch; margin-bottom: 20px; }
.byline {
  display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--faint);
  padding-top: 18px; border-top: 1px solid var(--rule);
}

.prose { max-width: 68ch; padding-block: 44px 56px; font-size: 17px; line-height: 1.68; }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-family: var(--f-display); font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--rule); }
.prose h3 { font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 34px; }
.prose ul, .prose ol { padding-left: 0; }
.prose li { padding-left: 26px; position: relative; margin-top: 10px; }
.prose ul li::before { content: "—"; position: absolute; left: 0; color: var(--red); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n) "."; position: absolute; left: 0; color: var(--red); font-family: var(--f-mono); font-size: 13px; top: 3px; }
.prose a { border-bottom: 1px solid var(--red); }
.prose a:hover { color: var(--red); }
.prose blockquote { border-left: 2px solid var(--red); padding-left: 22px; font-size: 19px; line-height: 1.5; color: var(--ink); }
.prose figure { margin-top: 32px; }
.prose figcaption { font-family: var(--f-mono); font-size: 11.5px; color: var(--faint); margin-top: 10px; line-height: 1.5; }
.prose .table-scroll { margin-top: 28px; }
.prose table.compare { min-width: 480px; }

/* --- Encadré réponse directe (GEO) en tête d'article --- */
.tldr { background: var(--paper); border: 1px solid var(--rule); padding: 24px 26px; margin-bottom: 8px; }
.tldr h2 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 400; margin: 0 0 12px; border: 0; padding: 0; }
.tldr p { font-size: 16.5px; line-height: 1.6; margin: 0; }
.tldr p + p { margin-top: 10px; }

/* --- Pied d'article : suite de lecture --- */
.article-foot { border-top: 1px solid var(--ink); padding-block: 40px 8px; }
.next-read { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.next-read > a { background: var(--cream); padding: 24px 22px 26px; }
.next-read > a:hover { background: var(--paper); }
.next-read .lbl { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); display: block; margin-bottom: 10px; }
.next-read h3 { font-family: var(--f-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
@media (max-width: 700px) { .next-read { grid-template-columns: 1fr; } }

/* ==========================================================================
   22. FORMULAIRE
   ========================================================================== */
.form { max-width: 560px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field label span { color: var(--red); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font-family: var(--f-text); font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 0;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--ink); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); }
.field .hint { display: block; font-size: 13px; color: var(--faint); margin-top: 6px; }

.field-check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin-bottom: 26px; }
.field-check input { width: 22px; height: 22px; min-height: 22px; margin-top: 2px; accent-color: var(--red); }
.field-check label { font-size: 13.5px; font-weight: 400; line-height: 1.5; color: var(--muted); margin: 0; }

@media (max-width: 900px) {
  .form { max-width: none; }
  #contenu .wrap > div[style*="grid-template-columns:1.15fr"] { grid-template-columns: 1fr !important; gap: 44px !important; }
}

/* --- Page d'accusé de réception --- */
.confirm { padding-block: clamp(64px, 9vw, 120px); }
.confirm .h-lg { max-width: 18ch; margin-bottom: 20px; }
