/*
Theme Name:   Pixevent Carnet
Theme URI:    https://pixevent.fr
Description:  Thème enfant de « Minimal » au design système « Carnet d'atelier » : papier millimétré, encre bleu nuit, un seul coup de crayon rouge, IBM Plex Sans / Condensed / Mono. Thème « Papier » (clair) par défaut, « Calque de nuit » (sombre) au clic. Tous les gabarits, types de contenu, champs ACF, formulaires et quiz restent ceux du thème parent.
Author:       Pixevent
Author URI:   https://pixevent.fr
Template:     minimal-theme
Version:      1.2.0
Requires at least: 6.3
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  pixevent-carnet
*/

/* ═══════════════════════════════════════════════════════════════════
   1. TOKENS — the parent's design tokens remapped to the Carnet system.
   `html:root` beats the parent's `:root` and the Customizer's inline CSS.
   Papier (light) is the default; Calque de nuit with data-theme="dark".
   ═══════════════════════════════════════════════════════════════════ */
html:root {
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
  --font-sans:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif:   var(--font-sans);           /* parent body font → sans */
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-xs:   0.75rem;                       /* 12px — mono labels */
  --text-sm:   0.875rem;                      /* 14px — small */
  --text-base: 1.0625rem;                     /* 17px — body */
  --text-md:   1.25rem;                       /* 20px — lead */
  --tracking-caps: 0.08em;
  --leading-body: 1.6;

  --container: 1200px;
  --radius:    0;
  --radius-lg: 0;
  --radius-field: 2px;
  --dur:       80ms;

  --grid-step: 8px;
  --grid-step-major: 40px;
}

html:root:not([data-theme="dark"]) {
  color-scheme: light;
  --color-bg:           #f4f1e8;   /* paper-100 */
  --color-bg-elev:      #fbf9f3;   /* paper-200 */
  --color-surface:      #fbf9f3;   /* paper-200 */
  --color-surface-2:    #ebe6d8;   /* paper-300 */
  --color-text:         #1b2a4a;   /* ink */
  --color-muted:        #56617a;   /* ink-muted */
  --color-faint:        #56617a;   /* same: keeps 5.5:1 */
  --color-border:       #bcc6d6;   /* grid-major (hairlines) */
  --color-border-strong:#1b2a4a;   /* ink (controls) */
  --color-accent:       #a8350f;   /* signal-strong */
  --color-accent-hover: #8a2b0c;
  --color-on-accent:    #fbf9f3;   /* on-signal */
  --color-accent-soft:  rgba(214, 69, 27, 0.08);
  --color-accent-line:  rgba(168, 53, 15, 0.45);
  --color-good:         #2f6b3a;   /* success */
  --color-error:        #a8350f;
  --color-error-soft:   rgba(214, 69, 27, 0.08);

  --signal:      #d6451b;
  --highlight:   #f3d34a;
  --on-highlight:#1b2a4a;
  --grid-minor:  #dde2ea;
  --grid-major:  #bcc6d6;
  --shadow-offset: 4px 4px 0 #1b2a4a;
  --shadow-offset-lg: 8px 8px 0 #1b2a4a;
  --shadow-pop: 4px 4px 0 #1b2a4a;
}

html:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg:           #111a2c;
  --color-bg-elev:      #1a2540;
  --color-surface:      #1a2540;
  --color-surface-2:    #22304f;
  --color-text:         #ece7da;
  --color-muted:        #a3acbf;
  --color-faint:        #a3acbf;
  --color-border:       #33425f;
  --color-border-strong:#ece7da;
  --color-accent:       #f2734a;
  --color-accent-hover: #f6916f;
  --color-on-accent:    #111a2c;
  --color-accent-soft:  rgba(242, 115, 74, 0.12);
  --color-accent-line:  rgba(242, 115, 74, 0.45);
  --color-good:         #7cc48a;
  --color-error:        #f2734a;
  --color-error-soft:   rgba(242, 115, 74, 0.12);

  --signal:      #f2734a;
  --highlight:   #8a7420;
  --on-highlight:#ece7da;
  --grid-minor:  #1f2b45;
  --grid-major:  #33425f;
  --shadow-offset: 4px 4px 0 #000000;
  --shadow-offset-lg: 8px 8px 0 #000000;
  --shadow-pop: 4px 4px 0 #000000;
}
/* Parent dims photos in dark mode — keep them crisp */
:root[data-theme="dark"] img:not([src$=".svg"]),
:root:not([data-theme="light"]) img:not([src$=".svg"]) { filter: none; }

/* The millimetre paper, reused on hero, CTA and placeholders */
.home-hero,
.fl-hero,
.fl-cta,
.not-found,
.card--cta {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size:
    var(--grid-step-major) var(--grid-step-major),
    var(--grid-step-major) var(--grid-step-major),
    var(--grid-step) var(--grid-step),
    var(--grid-step) var(--grid-step);
}

/* ═══════════════════════════════════════════════════════════════════
   2. BASE
   ═══════════════════════════════════════════════════════════════════ */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3, h4 { font-weight: 600; }
a:hover { color: var(--color-accent); }
::selection { background: var(--highlight); color: var(--on-highlight); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 0; }
html { scrollbar-color: var(--color-border) var(--color-bg); }

/* Display headings — IBM Plex Sans Condensed */
.home-hero__title,
.post-title,
.archive-header h1,
.page-header h1,
.not-found h1,
.tools-index__title,
.fl-hero__title,
.fl-section-title,
.fl-cta__title,
.entry-content h2,
.tool-content h2,
.author-box__name,
.tool-header__content h1,
.card__title,
.nav-title,
.profile-card__name,
.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Mono labels — the retro wink: small caps annotations */
.eyebrow, .section-label, .archive-type, .card__cat, .home-hero__badge,
.fl-eyebrow, .author-box__eyebrow, .share-label, .cats-label, .tags-label,
.nav-label, .widget-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

/* The red pixel, used as a bullet before labels */
.card__cat::before,
.archive-type::before,
.fl-eyebrow::before,
.related-posts > .related-posts__title::before,
.widget-title::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--signal);
  vertical-align: 1px;
}

/* ═══════════════════════════════════════════════════════════════════
   3. PRIMITIVES — buttons, links, tags, fields
   ═══════════════════════════════════════════════════════════════════ */
.btn, .fl-btn, .devis-form__submit, .location-map__load, .contact-form__submit {
  min-height: 48px;
  padding: 14px 24px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  transition: transform var(--dur), box-shadow var(--dur);
}
.btn:hover, .fl-btn:hover, .devis-form__submit:hover:not(:disabled),
.location-map__load:hover, .contact-form__submit:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-offset);
}
.btn--primary, .fl-btn:not(.fl-btn--outline), .devis-form__submit, .location-map__load, .contact-form__submit {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}
.btn--primary:hover, .fl-btn:not(.fl-btn--outline):hover,
.devis-form__submit:hover:not(:disabled), .location-map__load:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}
.btn--ghost { border-style: dashed; color: var(--color-muted); }

.link-arrow, .read-more, .home-hero__cta, .location-map__link, .fl-project__link, .tool-card__cta {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-accent);
}
.link-arrow:hover, .read-more:hover, .home-hero__cta:hover,
.location-map__link:hover, .fl-project__link:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 4px;
}

/* Tags: the only rounded thing — label pills */
.tag, .cat-list a, .tag-list a, .fl-stack__tag, .sidebar-stack__tag, .fl-project__tags {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--color-surface);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}
.tag:hover, .cat-list a:hover, .tag-list a:hover {
  border-color: var(--color-text);
  color: var(--color-text);
  background: var(--color-surface);
}

.status-pill, .fl-status {
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--color-good);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.field-input, .search-form__input, .tools-search input, .articles-select-wrap select,
.devis-form__field input[type="text"], .devis-form__field input[type="email"],
.devis-form__field input[type="tel"], .devis-form__field textarea,
.devis-form select, .contact-form input, .contact-form textarea {
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-field);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
}
.search-form__input:focus, .tools-search input:focus, .articles-select-wrap select:focus,
.devis-form__field input:focus, .devis-form__field textarea:focus {
  border-color: var(--color-text);
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════
   4. HEADER — topbar + sticky navigation bar on paper
   ═══════════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 12px;
}
.topbar__inner { min-height: 40px; padding-block: 2px; }
.topbar-social a, .footer-social a, .theme-toggle {
  border-radius: 0;
  width: 34px;
  height: 34px;
  color: var(--color-text);
}
.topbar-social a:hover, .footer-social a:hover, .theme-toggle:hover {
  background: var(--color-surface);
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-border-strong);
}
.lang-switcher__toggle { border-radius: 0; font-family: var(--font-mono); font-size: 12px; }
.lang-switcher__dropdown {
  border-radius: 0;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-strong);
  box-shadow: var(--shadow-offset);
}
.lang-switcher__dropdown a { font-family: var(--font-mono); font-size: 12px; }

.site-header {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.site-header .site-container { min-height: 68px; padding-block: 12px; }

/* Brand: « pixevent » in mono with the red pixel */
.site-title a {
  display: inline-flex;
  align-items: flex-end;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--color-text);
  text-decoration: none;
}
.site-title__icon { display: none; }
.site-title a::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 0 5px 3px;
  background: var(--signal);
}
.site-title a:hover { color: var(--color-text); }
.site-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text);
}
.site-nav a:hover { color: var(--color-accent); }
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.site-nav .menu-cta > a {
  border-radius: 0;
  border: 1.5px solid var(--color-accent);
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: 10px 18px;
  text-decoration: none;
}
.site-nav .menu-cta > a:hover { box-shadow: var(--shadow-offset); transform: translate(-2px, -2px); }
.sub-menu {
  border-radius: 0;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-strong);
  box-shadow: var(--shadow-offset);
}
.mobile-menu-toggle { border-radius: 0; border-color: var(--color-border-strong); font-family: var(--font-mono); }

@media (max-width: 960px) {
  .header-menu { background: var(--color-bg); border-bottom: 1.5px solid var(--color-border-strong); }
}

/* Reading progress bar (parent) — a red pencil line */
#reading-progress-bar { background: var(--signal); box-shadow: none; height: 3px; }

/* ═══════════════════════════════════════════════════════════════════
   5. LAYOUT & SIDEBAR
   ═══════════════════════════════════════════════════════════════════ */
.page-layout { padding-top: var(--space-8); }

/* Profile card — a « fiche technique » window */
.profile-card {
  position: relative;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-offset-lg);
  padding: 52px 24px 24px;
}
.profile-card::before {
  content: "PROFIL.TXT";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.profile-card::after {
  content: "■ □ □";
  position: absolute;
  right: 16px; top: 0;
  height: 36px;
  display: flex;
  align-items: center;
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 12px;
}
.profile-card__photo img { border-radius: 0; border: 1px solid var(--color-border); filter: none; }
.profile-card__name { font-size: 1.75rem; line-height: 1.05; }
.profile-card__role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.profile-card__tagline { color: var(--color-muted); }
.profile-card__actions { justify-items: stretch; }
.profile-card__actions .link-arrow { justify-content: center; }

.sidebar-widgets .widget {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 24px;
}

/* ═══════════════════════════════════════════════════════════════════
   6. HOME — hero on graph paper + article index
   ═══════════════════════════════════════════════════════════════════ */
.home-hero { border-bottom: 1px solid var(--color-border); }

.home-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.home-hero__eyebrow > * { background: var(--color-bg); }
.home-hero__badge {
  border-radius: 0;
  padding: 3px 8px;
  background: var(--highlight) !important;
  color: var(--on-highlight);
  font-weight: 600;
}
.home-hero__meta-cat { color: var(--color-text); }

.home-hero__title {
  font-size: clamp(2.75rem, 1.6rem + 4.2vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.home-hero__title-link { text-decoration: none; }
.home-hero__title-link:hover .home-hero__title {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 4px;
  text-underline-offset: 10px;
}
.home-hero__excerpt {
  color: var(--color-text);
  font-size: var(--text-md);
  line-height: 30px;
  background: var(--color-bg);
  width: fit-content;
}
.home-hero__reading-time { font-family: var(--font-mono); color: var(--color-muted); background: var(--color-bg); }
.home-hero__cta { background: var(--color-bg); }

.home-hero__image-wrap {
  display: block;
  aspect-ratio: 21 / 9;
  max-height: 380px;
  border-radius: 0;
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-offset);
  overflow: hidden;
}
.home-hero__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}

/* Filters bar */
.articles-controls {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 12px;
  gap: 12px;
}
.articles-select-wrap select { font-family: var(--font-mono); font-size: 13px; min-height: 44px; }
.articles-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); }
.articles-reset { border-radius: 0; border: 1.5px solid var(--color-border-strong); }

/* Cards — paper index cards, lifted on hover with the hard shadow */
.card-grid { gap: 40px; border: 0; }
.card {
  border-radius: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: none;
  padding: 0;
  overflow: hidden;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
}
.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-offset);
  border-color: var(--color-border-strong);
  background: var(--color-surface);
}
.card__img-wrap { border-radius: 0; border-bottom: 1px solid var(--color-border); aspect-ratio: 16 / 9; }
.card--wide .card__img-wrap { aspect-ratio: auto; align-self: stretch; height: 100%; min-height: 240px; border-bottom: 0; border-right: 1px solid var(--color-border); }
.card--wide .card__img-wrap img { position: static; height: 100%; min-height: 240px; }
@media (max-width: 760px) {
  .card--wide .card__img-wrap { aspect-ratio: 16 / 9; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .card--wide .card__img-wrap img { min-height: 0; }
}
.card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 24px; }
.card__cat { color: var(--color-muted); display: inline-flex; align-items: center; }
.card__title { font-size: 1.5rem; line-height: 1.2; }
.card--wide .card__title { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.05; }
.card__title a { color: var(--color-text); text-decoration: none; }
.card__title a:hover, .card:hover .card__title, .card:hover .card__title a { color: var(--color-text); }
.card__excerpt { color: var(--color-muted); font-size: 16px; line-height: 25px; }
.card__footer {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  border-top: 1px dashed var(--color-border);
}

/* In-grid call to action — a « fiche » on graph paper */
.card--cta { border: 1.5px solid var(--color-border-strong); box-shadow: var(--shadow-offset-lg); }
.card--cta:hover { box-shadow: var(--shadow-offset-lg); transform: none; }
.card--cta__inner { background: var(--color-surface); margin: 24px; padding: 24px; border: 1px solid var(--color-border); }
.card--cta__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); }
.card--cta__title { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.05; color: var(--color-text); }
.card--cta__btn {
  display: inline-block;
  border: 1.5px solid var(--color-accent);
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: 0;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--dur), box-shadow var(--dur);
}
.card--cta__btn:hover { color: var(--color-on-accent); transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); }

/* Pagination */
.pagination .page-numbers {
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
}
.pagination a.page-numbers:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); color: var(--color-text); }
.pagination .page-numbers.current {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ═══════════════════════════════════════════════════════════════════
   7. ARTICLE
   ═══════════════════════════════════════════════════════════════════ */
.post-title {
  font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.post-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.post-meta a { color: var(--color-accent); }
.post-header { position: relative; padding-top: 28px; }
.post-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 8px;
  height: 8px;
  background: var(--signal);
}

/* Featured image — a photo pinned in the notebook: same width as the text,
   a thin paper mount, an ink hairline and a mono figure label underneath. */
.single-article .featured-image,
.featured-image {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 32px 0 56px;
  padding: 8px;
  aspect-ratio: auto;
  border: 1px solid var(--color-border-strong);
  border-radius: 0;
  background: var(--color-surface);
  box-shadow: none;
  overflow: visible;
}
.featured-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}
.featured-image::after {
  content: "FIG. 01";
  position: absolute;
  left: -1px;
  top: 100%;
  padding: 4px 8px;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* Reading typography */
.entry-content { font-size: 1.0625rem; line-height: 1.6; }
.entry-content p, .entry-content li { color: var(--color-text); }
.entry-content strong { color: var(--color-text); font-weight: 600; }
/* Sections — numbered like the design system's « SECTION 01 » labels */
.single-article .entry-content { counter-reset: carnet-section; }
.entry-content h2, .tool-content h2 {
  margin-top: 2.5em;
  padding-top: 16px;
  border-top: 1.5px solid var(--color-border-strong);
  font-size: clamp(1.625rem, 1.35rem + 0.9vw, 2rem);
  line-height: 1.15;
  text-wrap: pretty;
}
.single-article .entry-content h2::before {
  counter-increment: carnet-section;
  content: "SECTION " counter(carnet-section, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}
.entry-content h3, .tool-content h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; letter-spacing: 0; }
.entry-content h4, .tool-content h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.entry-content a, .tool-content a, .page-intro a, .fl-prose a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-line);
  text-underline-offset: 3px;
}
.entry-content a:hover { color: var(--color-text); text-decoration-color: var(--signal); }
.entry-content mark, .entry-content .has-inline-color.has-highlight-color {
  background: var(--highlight);
  color: var(--on-highlight);
  padding: 0 4px;
}

.entry-content ul > li::marker { content: "■  "; font-size: 0.7em; color: var(--signal); }
.entry-content ol > li::marker { font-family: var(--font-mono); font-size: 0.9em; font-weight: 600; color: var(--signal); }

.entry-content blockquote,
.entry-content .wp-block-quote {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--signal);
  border-radius: 0;
  background: var(--color-surface);
  padding: 20px 24px;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-style: normal;
  line-height: 1.5;
}
.entry-content blockquote cite { font-family: var(--font-mono); font-style: normal; font-size: 12px; color: var(--color-muted); }
.entry-content .wp-block-pullquote { border-color: var(--color-border-strong); font-family: var(--font-display); }

.entry-content code, .entry-content kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  border-radius: 0;
  background: var(--color-surface-2);
  color: var(--color-text);
  padding: 0.1em 0.35em;
}
.entry-content pre, .entry-content .wp-block-code {
  border-radius: 0;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface-2);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 22px;
}
.entry-content pre code { color: var(--color-text); background: none; padding: 0; }

.entry-content figure img, .entry-content > img, .entry-content p > img { border-radius: 0; }
.entry-content .wp-element-caption, .entry-content .wp-caption-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}
.entry-content table { border: 1.5px solid var(--color-border-strong); }
.entry-content th { background: var(--color-text); color: var(--color-bg); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.entry-content th, .entry-content td { border-color: var(--color-border); }
.entry-content hr, .entry-content .wp-block-separator { background: none; border: 0; border-top: 1px dashed var(--color-border); height: 0; }
.entry-content .wp-block-button__link {
  border-radius: 0;
  border: 1.5px solid var(--color-accent);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}
.entry-content .wp-block-button__link:hover { color: var(--color-on-accent); transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); }

/* Drop cap — off: the Carnet system has no ornament */
.single-article .entry-content > p:first-of-type::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  margin: 0;
  padding: 0;
  line-height: inherit;
  color: inherit;
  font-weight: inherit;
}

/* Share, footer, author, related, prev/next */
.share-btn { border-radius: 0; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); }
.share-btn:hover { color: var(--color-text); background: var(--color-surface); transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); }
.share-btn--copied { border-color: var(--color-good); color: var(--color-good); }
.post-footer { border-top: 1.5px solid var(--color-border-strong); }

.author-box {
  border-radius: 0;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  box-shadow: var(--shadow-offset-lg);
}
.author-box__photo img, .author-box__photo .avatar { border-radius: 0; filter: none; }
.author-box__name { font-size: 2rem; line-height: 1; }

.related-posts > .related-posts__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.related-posts__list { gap: 24px; border: 0; }
.related-posts__link {
  border-radius: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-transform: none;
  letter-spacing: 0;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
}
.related-posts__link:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); border-color: var(--color-border-strong); background: var(--color-surface); }
.related-posts__date { font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); }
.related-posts__link .related-posts__title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--color-text); }
.related-posts__link:hover .related-posts__title { color: var(--color-text); }

.post-navigation { border-top: 1.5px solid var(--color-border-strong); border-bottom: 1px solid var(--color-border); }
.nav-title { font-size: 1.5rem; line-height: 1.15; }
.post-navigation a:hover .nav-title { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.nav-label { color: var(--color-accent); }

/* ═══════════════════════════════════════════════════════════════════
   7b. POST SIDEBAR — « SOMMAIRE.TXT » + « PARTAGER.TXT »
   Built by assets/carnet.js. Wide screens only; on narrow screens the
   summary becomes a collapsed box above the text.
   ═══════════════════════════════════════════════════════════════════ */
.single-article .entry-content h2,
.single-article .entry-content h3 { scroll-margin-top: 110px; }

@media (min-width: 1100px) {
  .page-layout.page-layout--reading.has-side {
    max-width: calc(var(--reading, 42rem) + 280px + 64px + 2 * var(--gutter, 2.5rem));
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 64px;
  }
  .page-layout.has-side > .carnet-side {
    position: sticky;
    top: 96px;
    align-self: start;
    display: grid;
    gap: 24px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 0 8px 8px 0;   /* room for the hard shadow */
  }
  .admin-bar .page-layout.has-side > .carnet-side { top: 128px; }
  .carnet-side .carnet-win__title { display: none; }
  .carnet-side .carnet-win__bar { cursor: default; pointer-events: none; }
  /* The sidebar replaces the share row under the title */
  .page-layout.has-side .single-article .post-header + .share-block { display: none; }
}

/* A « window » from an old OS: ink title bar, paper body */
.carnet-win {
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  box-shadow: var(--shadow-offset);
}
.carnet-win__bar {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 0 16px;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.carnet-win__bar::-webkit-details-marker { display: none; }

/* Summary */
.carnet-toc__list { list-style: none; margin: 0; padding: 8px 0; }
.carnet-toc__item { margin: 0; }
.carnet-toc__item a {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 8px 16px 8px 20px;
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}
.carnet-toc__item--h3 a { padding-left: 52px; font-size: 13px; }
.carnet-toc__num {
  flex: none;
  min-width: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--signal);
}
.carnet-toc__item a:hover { color: var(--color-text); background: var(--color-surface-2); }
.carnet-toc__item a[aria-current] { color: var(--color-text); font-weight: 500; }
.carnet-toc__item a[aria-current]::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--signal);
}
.carnet-toc__top {
  display: block;
  padding: 10px 16px 12px;
  border-top: 1px dashed var(--color-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent);
  text-decoration: none;
}
.carnet-toc__top:hover { color: var(--color-text); }

/* Share: a 2-column grid of square buttons, copy link full width */
.carnet-share__list {
  list-style: none;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.carnet-share__item { margin: 0; position: relative; }
.carnet-share__item--wide { grid-column: 1 / -1; }
.carnet-share__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
}
.carnet-share__btn svg { flex: none; width: 16px; height: 16px; }
.carnet-share__btn:hover,
.carnet-share__btn:focus-visible {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-offset);
}
.carnet-share__btn--copy { justify-content: center; border-color: var(--color-border-strong); }
.carnet-share__btn--copy.is-copied { border-color: var(--color-good); color: var(--color-good); }
.carnet-share__status {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Narrow screens: the summary as a collapsed box above the text */
@media (max-width: 1099.98px) {
  .single-article .carnet-toc { margin: 0 0 40px; }
  .single-article .carnet-toc .carnet-win__file,
  .single-article .carnet-toc .carnet-win__dots { display: none; }
  .single-article .carnet-toc .carnet-win__bar { cursor: pointer; min-height: 48px; font-size: 13px; text-transform: uppercase; }
  .single-article .carnet-toc .carnet-win__bar::after { content: "+"; font-size: 18px; line-height: 1; }
  .single-article .carnet-toc .carnet-win[open] .carnet-win__bar::after { content: "−"; }
}

/* ═══════════════════════════════════════════════════════════════════
   8. ARCHIVES, SEARCH, 404, PAGES
   ═══════════════════════════════════════════════════════════════════ */
.archive-header h1, .page-header h1 { font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4rem); line-height: 1.02; }
.archive-header h1 em { font-style: normal; background: var(--highlight); color: var(--on-highlight); padding: 0 8px; }
.archive-type { color: var(--color-muted); display: inline-flex; align-items: center; }
.archive-grid > li { border-color: var(--color-border); }
.entry-title { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
.entry-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); }

.not-found h1 { font-size: clamp(3rem, 2rem + 5vw, 6rem); line-height: 0.95; }
body.error404 .not-found h1 { font-size: clamp(3.5rem, 2rem + 7vw, 8rem); }

.search-form__submit { border-radius: 0; background: var(--color-accent); color: var(--color-on-accent); }
.search-form__submit:hover { background: var(--color-accent-hover); }

.location-map-block, .location-map__consent, .location-map__iframe-wrap { border-radius: 0; }

/* ═══════════════════════════════════════════════════════════════════
   9. TOOLS (« Les outils que j'utilise »)
   ═══════════════════════════════════════════════════════════════════ */
.tools-index__title { font-size: clamp(2.75rem, 1.6rem + 4vw, 5rem); line-height: 0.98; }
.tools-index__count { color: var(--signal); font-family: var(--font-mono); }
.tools-filter__pill {
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.tools-filter__pill:hover { border-color: var(--color-text); color: var(--color-text); }
.tools-filter__pill.is-active,
.tools-filter__pill[aria-current="page"] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}
.tools-list { border-top: 1.5px solid var(--color-border-strong); }
.tools-list__link { border-bottom-color: var(--color-border); transition: background var(--dur); }
.tools-list__link:hover { background: var(--color-surface); }
.tools-list__icon img, .tools-list__icon-placeholder { border-radius: 0; }
.tools-list__name { font-family: var(--font-display); font-weight: 600; }
.tools-list__cat { font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); }

.tool-card__link {
  border-radius: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
}
.tool-card__link:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); border-color: var(--color-border-strong); background: var(--color-surface); }
.tool-card__icon img, .tool-header__icon img { border-radius: 0; }
.tool-thumbnail { border-radius: 0; border: 1.5px solid var(--color-border-strong); }
.breadcrumb { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--color-muted); }

/* ═══════════════════════════════════════════════════════════════════
   10. FREELANCE PAGE (« Qui suis-je ? »)
   ═══════════════════════════════════════════════════════════════════ */
.fl-page > section + section { border-top: 1px solid var(--color-border); }
.fl-eyebrow { display: inline-flex; align-items: center; gap: 0; color: var(--color-muted); }
.fl-hero__title { font-size: clamp(3rem, 1.8rem + 5vw, 6rem); line-height: 0.95; letter-spacing: -0.02em; }
.fl-hero__subtitle { color: var(--color-text); }
.fl-hero__image { border-radius: 0; border: 1.5px solid var(--color-border-strong); box-shadow: var(--shadow-offset-lg); }
.fl-hero__image img { filter: none; }
.fl-pitch__photo { border-radius: 0; }

.fl-section-title { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); line-height: 1.05; }

.fl-services__grid { gap: 40px; border: 0; }
.fl-service-card {
  border-radius: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: none;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
}
.fl-service-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-offset); border-color: var(--color-border-strong); background: var(--color-surface); }
.fl-service-card__icon { border-radius: 0; color: var(--signal); background: transparent; }
.fl-service-card__title { font-family: var(--font-display); font-weight: 600; }

.fl-project__visual { border-radius: 0; border: 1px solid var(--color-border); }
.fl-project__title { font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.1; }
.fl-project__tags { color: var(--color-muted); border-color: var(--color-border); }

.fl-testimonial { border-radius: 0; border: 1px solid var(--color-border); background: var(--color-surface); }
.fl-testimonial__quote { font-family: var(--font-sans); }
.fl-testimonial__quote::before { color: var(--signal); }
.fl-testimonial__photo { border-radius: 0; }

.fl-cta { color: var(--color-text); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.fl-cta__title { font-size: clamp(2.5rem, 1.8rem + 3vw, 4rem); line-height: 1; max-width: 16ch; }
.fl-cta__title, .fl-cta__text { background: var(--color-bg); width: fit-content; }
.fl-cta__text { color: var(--color-muted); }
.fl-cta__links a { color: var(--color-accent); }
.fl-cta .fl-btn,
.fl-cta .fl-btn--outline {
  padding: 20px 32px;
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 18px;
}
.fl-cta .fl-btn:hover,
.fl-cta .fl-btn--outline:hover { color: var(--color-on-accent); }

/* ═══════════════════════════════════════════════════════════════════
   11. FORMS (quote / contact / quiz) — square, ink-bordered
   ═══════════════════════════════════════════════════════════════════ */
.devis-form, .contact-form, .quiz, .quiz-card, .quiz-question {
  border-radius: 0 !important;
}
.devis-form__field label, .contact-form label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════
   12. FOOTER — the paper-300 strip
   ═══════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-muted);
}
.footer-brand__name {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--color-text);
  text-decoration: none;
}
.footer-brand__name::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 3px;
  background: var(--signal);
}
.footer-brand__name:hover { color: var(--color-text); }
.footer-brand__name > span[aria-hidden="true"] { display: none; }
.footer-brand__tagline { font-family: var(--font-sans); font-size: 14px; color: var(--color-muted); }
.footer-bottom { border-top: 1px solid var(--color-border); letter-spacing: 0.04em; font-size: 12px; text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════════════
   13. MOTION
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
