/* ==========================================================================
   AGIR ANTIFASCISTE — STYLES
   Charte : couleurs « papier journal » + titres arrondis.
   Couleurs : modifiez les variables ci-dessous (clair puis sombre).
   ========================================================================== */

/* Source Serif 4 (licence SIL OFL 1.1, voir assets/fonts/OFL-source-serif-4.txt), servie par le site lui-même :
   aucune police n'est chargée ailleurs. Deux découpages : latin (français) et latin étendu (ř, ğ, ł…). */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700 800; font-display: swap; src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-serif-4-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700 800; font-display: swap; src: url("fonts/source-serif-4-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --surface-2: #F1ECE1;
  --text: #17140F;
  --muted: #645D52;
  --border: #E4DCCD;
  --border-strong: #C8BDA8;
  --accent: #A3121B;       /* rouge du logo */
  --accent-soft: #F6E4E2;
  --accent-2: #A3121B;     /* mot mis en avant dans le grand titre */
  --logo-red: #C30001;     /* rouge exact du drapeau du logo */
  --on-accent: #FFFFFF;
  --good: #22633F;
  --good-soft: #E3EFE4;
  --t1: #A3121B; --t1-soft: #F6E4E2;
  --t2: #8A4B0C; --t2-soft: #F5EAD9;
  --t3: #4E4A44; --t3-soft: #ECE8E1;
  --t0: #22633F; --t0-soft: #E3EFE4;
  --public: #5B3F8C; --public-soft: #ECE6F5; /* violet neutre de l'étiquette « Service public » */
  --qm-pub: #1A7F7A; --qm-act: #2F62B3; --qm-four: #8A6A12; /* liens de la carte : publicité, actionnariat, fournisseur */
  --shadow: none;
  --shadow-lg: 0 20px 60px rgba(23, 20, 15, .18);
  --focus: #1F5FD1;
  --radius: 6px;
  --radius-sm: 4px;
  --measure: 760px; /* largeur commune des blocs de texte */

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* Titres à empattements, comme une une de journal (polices déjà présentes sur l'appareil, rien n'est téléchargé).
     Le nom du site garde sa police arrondie (--font-brand). Pour revenir aux anciens titres : --font-display: var(--font-brand). */
  --font-display: "Source Serif 4", "Iowan Old Style", "Charter", Cambria, Georgia, "Times New Roman", serif;
  /* Texte courant à empattements ; les commandes (boutons, champs, menus, étiquettes) restent en linéale système */
  --font-text: "Source Serif 4", "Iowan Old Style", "Charter", Cambria, Georgia, serif;
  --font-brand: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -.015em;
  --em-style: normal;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100D; --surface: #1B1915; --surface-2: #23201B; --text: #F2EDE3; --muted: #ADA597;
    --border: #2F2B25; --border-strong: #463F35; --accent: #F0504F; --accent-soft: #3A1A1B; --accent-2: #F0504F; --on-accent: #1B0A0B;
    --logo-red: #E5262B;
    --good: #78CF98; --good-soft: #17271C;
    --t1: #F0504F; --t1-soft: #3A1A1B; --t2: #F2B46A; --t2-soft: #33250F; --t3: #C2BBAF; --t3-soft: #2A2620; --t0: #78CF98; --t0-soft: #17271C;
    --public: #C4AEF0; --public-soft: #2A2337; --qm-pub: #5CC6BC; --qm-act: #8DB7FF; --qm-four: #E0BF5F;
    --shadow: none; --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
    --focus: #8DB7FF; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100D; --surface: #1B1915; --surface-2: #23201B; --text: #F2EDE3; --muted: #ADA597;
  --border: #2F2B25; --border-strong: #463F35; --accent: #F0504F; --accent-soft: #3A1A1B; --accent-2: #F0504F; --on-accent: #1B0A0B;
  --logo-red: #E5262B;
  --good: #78CF98; --good-soft: #17271C;
  --t1: #F0504F; --t1-soft: #3A1A1B; --t2: #F2B46A; --t2-soft: #33250F; --t3: #C2BBAF; --t3-soft: #2A2620; --t0: #78CF98; --t0-soft: #17271C;
  --public: #C4AEF0; --public-soft: #2A2337; --qm-pub: #5CC6BC; --qm-act: #8DB7FF; --qm-four: #E0BF5F;
  --shadow: none; --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
  --focus: #8DB7FF; color-scheme: dark;
}

/* Taille du texte (bouton « AA ») */
/* La page défile toujours au niveau de la fenêtre, avec une barre de défilement toujours visible */
html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-y: scroll; }
html[data-size="1"] { font-size: 112.5%; }
html[data-size="2"] { font-size: 125%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; /* navigateurs anciens */
  overflow-x: clip;   /* coupe le débordement sans transformer body en zone de défilement */
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) / 2); font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
cite { font-style: italic; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; }
button, input, select, textarea, .btn, .mainnav, .tool, .tag, .chip, .card-cat, .card-src, .owner-btn small, .alts h4,
.stats, .hero-private, .search-help, .q-count, .q-map-legend, .footer, .toast, .oi-n, .oi-st { font-family: var(--font-sans); }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: .6em 1em; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 1180px; } /* même largeur que le catalogue */

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; transition: transform .3s ease; }
.logo svg { width: 100%; height: 100%; display: block; }
.logo .logo-trait { fill: none; stroke: var(--text); }   /* même couleur que « Agir » : noir en clair, clair en sombre */
.logo .logo-plein { fill: var(--text); stroke: none; }
.logo .logo-barres { fill: var(--logo-red); stroke: none; }
.brand:hover .logo { transform: rotate(-8deg); }
.brand-name { font-family: var(--font-brand); font-weight: 700; font-size: 1.55rem; line-height: 1; letter-spacing: -.01em; }
.brand-name span { color: var(--logo-red); font-weight: 800; }

.mainnav { display: none; gap: 4px; margin-left: auto; }
.mainnav a { color: var(--text); text-decoration: none; font-size: .95rem; padding: .5em .8em; border-radius: 999px; white-space: nowrap; }
.mainnav a:hover { background: var(--surface-2); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
@media (min-width: 1200px) { .mainnav { display: flex; } .tools { margin-left: 8px; } .menu-btn { display: none !important; } }

.tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: background .15s, border-color .15s, transform .15s;
}
.tool:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tool:active { transform: scale(.96); }
.tool svg { width: 20px; height: 20px; }
.tool-progress { color: var(--good); }
.progress-lbl { display: none; font-weight: 500; color: var(--muted); }
@media (min-width: 600px) { .progress-lbl { display: inline; } }
.tool-progress svg { stroke-width: 2.6; }
.aa { font-family: var(--font-brand); font-size: .95rem; }
.aa span { font-size: 1.25em; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }

@media (max-width: 1199px) {
  .mainnav.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; box-shadow: var(--shadow);
  }
  .mainnav.open a { padding: .85em 1em; font-size: 1.05rem; }
}
@media (max-width: 480px) {
  .topbar-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 1.2rem; line-height: 1.05; }
  .brand-name span { display: block; }
  .tools { gap: 4px; }
  .tool { min-width: 40px; height: 40px; padding: 0 8px; }
}

/* ---------- Accueil ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: 1em; }
.eyebrow--quote { font-size: clamp(1.05rem, .9rem + .7vw, 1.45rem); letter-spacing: .06em; }

/* Paragraphes justifiés, façon gazette (la césure évite les trous dans les colonnes) */
.prose p, .lead, .hero-why, .section-lead, .manifesto p, .rules li, .research li > p:nth-of-type(3), .tips p, .research-nuance, .callout {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
/* Sauf les listes et coordonnées, plus lisibles alignées à gauche : « Méthode », « Éditeur et hébergement » */
.no-justify, .no-justify p, .no-justify li, .no-justify dd { text-align: left; }
/* Colonnes de journal sur grand écran */
@media (min-width: 1000px) {
  .cols { column-count: 2; column-gap: 48px; column-rule: 1px solid var(--border); }
  .cols > * { break-inside: avoid; }
  .cols h3 { break-after: avoid; }
  .cols > :first-child { margin-top: 0; }
  .cols .col-span { column-span: all; }
  .cols > div { margin-bottom: 1.4em; }
  .cols > div > h3:first-child { margin-top: 0; }
  .cols .legal { grid-template-columns: 170px 1fr; }
}
.hero h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(2.5rem, 1.4rem + 5vw, 5rem); line-height: 1.02; letter-spacing: var(--display-tracking); margin-bottom: .35em; }
.hero h1 em { font-style: var(--em-style); color: var(--accent-2); }
.lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--muted); max-width: var(--measure); }

.search { position: relative; margin-top: 32px; max-width: var(--measure); }
.search input {
  width: 100%; height: 68px; padding: 0 64px 0 58px;
  font: inherit; font-size: 1.2rem; color: var(--text);
  background: var(--surface); border: 2px solid var(--border-strong); border-radius: 999px;
  box-shadow: var(--shadow); appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted); opacity: .8; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: var(--muted); pointer-events: none; }
.search-kbd { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 600 .85rem var(--font-sans); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 8px; pointer-events: none; }
.search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.search-clear svg { width: 18px; height: 18px; }
.search-clear[hidden] { display: none; }
.search.has-value .search-kbd { display: none; }
@media (hover: none) { .search-kbd { display: none; } }
.search-help { color: var(--muted); font-size: .9rem; margin: 10px 0 0 24px; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.quick-label { color: var(--muted); font-size: .95rem; margin-right: 4px; }
.quick button, .chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: .45em 1em; font-size: .95rem; cursor: pointer; min-height: 40px;
  transition: background .15s, border-color .15s;
}
.quick button:hover, .chip:hover { border-color: var(--border-strong); background: var(--surface-2); }

.results { margin-top: 28px; }
.results:empty { display: none; }
.results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.results-head p { margin: 0; color: var(--muted); }
.noresult { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 24px; max-width: var(--measure); }
.alt-results { margin-top: 24px; background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 30%, var(--border)); border-radius: var(--radius); padding: 20px 22px; }
.alt-results h3 { font-size: 1.05rem; color: var(--good); margin-bottom: 12px; }
.alt-results-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .alt-results-list { grid-template-columns: repeat(2, 1fr); } }
.alt-results .alt { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; border-left-color: var(--good); }
.alt-used { font-size: .85rem !important; margin-top: 4px !important; }
.noresult h3 { font-size: 1.2rem; }

/* Les chiffres du catalogue, dits en une phrase plutôt qu'en tableau de bord */
.stats { margin: 40px 0 0; padding-top: 14px; border-top: 1px solid var(--border-strong); max-width: var(--measure); color: var(--muted); font-size: .97rem; }
.stats strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { margin-bottom: 36px; }
.section-lead { color: var(--muted); font-size: 1.125rem; }
.prose { }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose .contact-wrap { text-align: right; margin: -1em 12px 0 0; } /* à droite, sans coller au filet entre les colonnes */
.privacy { border-top: 1px solid var(--border); padding-top: 1.2em; }
/* Sens du logo : petit encart discret, logo à gauche du texte */
.logo-sens { display: flex; gap: 18px; align-items: flex-start; border-top: 1px solid var(--border); padding-top: 1.2em; margin-bottom: 1.4em; }
.logo-sens .logo { width: 56px; height: 56px; margin-top: .15em; }
.logo-sens h3 { margin-top: 0; }
.logo-sens p { margin-bottom: 0; }
@media (max-width: 480px) { .logo-sens { gap: 12px; } .logo-sens .logo { width: 36px; height: 36px; } .logo-sens p { text-align: left; } }
.callout { background: var(--surface); border-left: 4px solid var(--accent); padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 1.5em; }

/* Les quatre comportements observés : une liste numérotée, façon sommaire de journal */
.pillars { list-style: none; padding: 0; margin: 24px 0 32px; counter-reset: p; display: grid; gap: 0 48px; }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
.pillars li { counter-increment: p; position: relative; padding: 14px 0 14px 2.4em; border-top: 1px solid var(--border-strong); color: var(--muted); }
.pillars li::before { content: counter(p); position: absolute; left: 0; top: 10px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.6rem; line-height: 1; color: var(--accent); }
.pillars strong { color: var(--text); }

/* ---------- Démarche ---------- */
.hero-why { max-width: var(--measure); color: var(--muted); font-size: 1rem; border-left: 3px solid var(--logo-red); padding-left: 14px; margin-top: 4px; }
.hero-why a { font-weight: 600; white-space: nowrap; }
.intro-fear { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); line-height: 1.45; }
.rules { padding: 0; margin: 0 0 8px; list-style: none; counter-reset: r; display: grid; gap: 10px; }
.rules li { counter-increment: r; position: relative; padding: 14px 18px 14px 56px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.rules li::before { content: counter(r); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }

/* ---------- Travaux de recherche ---------- */
.research-title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.35rem; margin: 40px 0 16px; }
.research { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .research { grid-template-columns: repeat(2, 1fr); } }
.research li { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.research p { margin: 0; }
.research li > p:nth-of-type(3) { color: var(--muted); font-size: .97rem; }
.research-who { font-weight: 800; font-size: 1.05rem; }
.research-who span { display: block; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-top: 2px; }
.research-work { font-size: .93rem; }
.research a { margin-top: auto; padding-top: 6px; font-size: .93rem; font-weight: 600; }
.research-nuance { margin: 18px 0 8px; font-size: .97rem; color: var(--muted); }
.research-nuance strong { color: var(--text); }

/* ---------- Filtres ---------- */
.filters { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.chips { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip { white-space: nowrap; flex-shrink: 0; }
/* Bloc justifié : app.js répartit les boutons en lignes équilibrées (au moins 5 par ligne) */
.chip-break { flex-basis: 100%; height: 0; }
.chips.is-balanced .chip { flex: 1 1 auto; text-align: center; }
@media (min-width: 900px) { .chip { font-size: .88rem; padding: .4em .7em; } }
.chip[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { opacity: .6; font-size: .85em; margin-left: 4px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.select { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 600; flex: 1 1 200px; max-width: 280px; }
.select select { font: inherit; font-size: 1rem; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); height: 46px; padding: 0 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 46px; cursor: pointer; font-size: .97rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font-weight: 600; cursor: pointer; text-decoration: none; font-size: .97rem;
}
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; font-size: .95rem; }
.count { color: var(--muted); margin: 0 0 16px; font-weight: 600; }

/* ---------- Fiches ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s; scroll-margin-top: 100px; min-width: 0;
}
.card:hover { border-color: var(--border-strong); }
.card.is-done { background: color-mix(in srgb, var(--good-soft) 55%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--border)); }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--focus); } 100% { box-shadow: var(--shadow); } }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.card-cat { font-size: .82rem; color: var(--muted); font-weight: 600; }
.card h3 { font-size: 1.2rem; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.owner-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer;
}
.owner-btn:hover { border-color: var(--border-strong); }
.owner-btn .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.owner-btn .who small { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.owner-btn .who strong { font-size: 1rem; overflow-wrap: anywhere; }
.owner-btn .who { margin-right: auto; }
.owner-btn .tag { flex-shrink: 0; }
.owner-btn svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.dialog-inner > .tag { display: inline-block; }
.card-note { font-size: .95rem; color: var(--muted); margin: 0; }
.card-src { font-size: .82rem; color: var(--muted); margin: -6px 0 0; }
.verif { white-space: nowrap; }
.verif.is-old { color: var(--accent); font-weight: 600; }
.alts h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--good); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.alts h4 svg { width: 16px; height: 16px; stroke-width: 2.6; }
.alts ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.alt { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 3px solid var(--good-soft); }
.alt-name { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.alt-name a { color: var(--text); text-decoration-color: var(--border-strong); }
.alt-name a:hover { color: var(--accent); }
.alt-name a::after { content: " ↗"; color: var(--muted); font-weight: 400; font-size: .85em; }
.alt p { margin: 0; font-size: .93rem; color: var(--muted); line-height: 1.45; }
/* Étiquettes : distinguées par leur libellé, en texte neutre encadré. Seul le statut coopératif garde le vert,
   qui a un sens sur la carte (propriétaire sans lien relevé). */
.tag { font-size: .72rem; font-weight: 700; padding: .05em .5em; border-radius: var(--radius-sm); background: transparent; border: 1px solid var(--border-strong); color: var(--muted); white-space: nowrap; }
.tag-coop { background: var(--t0-soft); border-color: transparent; color: var(--t0); }
.alts-more { margin-top: 4px; }
.card-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.done-btn {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--border-strong); background: transparent; cursor: pointer; font-weight: 600; font-size: .95rem;
}
.done-btn svg { width: 18px; height: 18px; stroke-width: 2.6; }
.done-btn[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: var(--surface); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: transparent; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.more-wrap { text-align: center; margin-top: 24px; }

/* ---------- Propriétaires : index dense ---------- */
.owners-index { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 40px; column-rule: 1px solid var(--border); }
@media (min-width: 640px) { .owners-index { columns: 2; } }
@media (min-width: 1000px) { .owners-index { columns: 3; } }
.owners-index li { break-inside: avoid; display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px dotted var(--border-strong); }
.owners-index li[hidden] { display: none; }
.oi-name { background: none; border: 0; padding: 4px 0; margin: 0; text-align: left; cursor: pointer; font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: .2em; min-height: 32px; }
.oi-name:hover { color: var(--accent); text-decoration-color: currentColor; }
.oi-name.is-coop { color: var(--good); }
.oi-n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.oi-st { font-size: .75rem; color: var(--muted); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 .4em; white-space: nowrap; }

/* ---------- Trop cher ---------- */
.tips { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 16px; }
@media (min-width: 720px) { .tips { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tips { grid-template-columns: repeat(3, 1fr); } }
.tips li { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--border); }
.tips h3 { color: var(--good); }
.tips p { margin: 0; color: var(--muted); }
.manifesto { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.5; border-top: 2px solid var(--text); padding-top: 28px; }

.constitution { margin: 8px 0 0; padding: 22px 26px; background: var(--surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--logo-red); border-radius: var(--radius); }
.constitution p { margin: 0 0 12px; font-style: italic; }
.constitution footer { font-family: var(--font-sans); font-size: .9rem; color: var(--muted); }

/* ---------- Progression ---------- */
.progress-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.progress-big { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 600; line-height: 1.1; margin-bottom: .3em; }
.bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 16px 0 20px; }
.bar span { display: block; height: 100%; background: var(--good); border-radius: 999px; transition: width .5s ease; }
.done-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.done-list li { background: var(--good-soft); color: var(--good); border-radius: 999px; padding: .3em .4em .3em .9em; font-weight: 600; font-size: .93rem; display: flex; align-items: center; gap: 4px; }
.done-list button { border: 0; background: transparent; color: inherit; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.done-list button:hover { background: color-mix(in srgb, var(--good) 18%, transparent); }
.done-list svg { width: 14px; height: 14px; }
.progress-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Transparence ---------- */
.sources { margin-top: 2em; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; }
.sources summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.sources ul { padding-left: 1.2em; font-size: .93rem; }

/* ---------- Mentions légales ---------- */
.legal { display: grid; grid-template-columns: 1fr; gap: 4px 24px; margin: 0 0 1em; }
@media (min-width: 640px) { .legal { grid-template-columns: 240px 1fr; } }
.legal dt { font-weight: 700; color: var(--muted); font-size: .93rem; margin-top: 10px; }
.legal dd { margin: 0; }
@media (min-width: 640px) { .legal dd { margin-top: 10px; } }
.todo { background: var(--t2-soft); color: var(--t2); font-weight: 700; font-size: .85em; padding: .1em .5em; border-radius: var(--radius-sm); }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .93rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.footer p { margin: 0; }

/* ---------- Fenêtre propriétaire ---------- */
.dialog {
  border: 0; padding: 0; border-radius: 20px; background: var(--surface); color: var(--text);
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(10, 12, 14, .55); backdrop-filter: blur(3px); }
.dialog[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-inner { padding: 28px; overflow: auto; max-height: calc(100vh - 48px); }
@media (max-width: 600px) { .dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; } .dialog-inner { padding: 22px 18px 28px; max-height: 92vh; } }
.dlg-close { position: sticky; top: 0; float: right; margin: -8px -8px 0 8px; background: var(--surface-2); z-index: 2; }
.dialog h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); margin-top: 8px; }
.dlg-role { color: var(--muted); font-weight: 600; }
.dlg-resume { font-size: 1.1rem; }
.pillar-block { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.pillar-block h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.pillar-block ul { padding-left: 1.1em; margin: 0; }
.pillar-block li { margin-bottom: .5em; }
.dlg-brands { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.dlg-brands li { background: var(--surface-2); border-radius: 999px; padding: .2em .8em; font-size: .9rem; }
.dlg-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---------- Notification ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; z-index: 200;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Touches « journal » ---------- */
.card, .progress-card { border-color: var(--border-strong); }
.section-head h2 { border-top: 3px solid var(--text); padding-top: .4em; }

/* ---------- Accueil : appel au parcours ---------- */
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.btn-big { min-height: 54px; padding: 0 26px; font-size: 1.08rem; }
.hero-alt { color: var(--text); font-weight: 600; text-underline-offset: .2em; }
.hero-private { color: var(--muted); font-size: .9rem; margin-top: 12px; }

/* ---------- Parcours « Ma cartographie » ---------- */
.cartographie { max-width: 880px; scroll-margin-top: 90px; }
/* Le bilan prend toute la largeur de la page, pour donner de la place à la carte ; les textes gardent une largeur de lecture */
.cartographie:has(.q-result) { max-width: none; }
.q-result > p, .q-result > .q-good, .q-map-panel > * { max-width: 80ch; }
.q-map-panel > .qm-p-hint { max-width: none; } /* une seule ligne d'invite, sur toute la largeur de la carte */
.cartographie h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.2; margin: 0 0 .4em; }
.cartographie h3:focus { outline: none; }
.q-intro p { font-size: 1.1rem; max-width: var(--measure); margin-bottom: 20px; }
.q-intro .btn { margin: 0 8px 8px 0; }
.q-step, .q-result { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: clamp(18px, 4vw, 32px); }
.q-progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.q-progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s; }
.q-count { color: var(--muted); font-size: .88rem; font-weight: 600; margin: 10px 0 14px; }
.q-help { color: var(--muted); margin-bottom: 18px; }
.q-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.q-top-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.q-top-tools .linkbtn { font-size: .88rem; }

/* Menu latéral « Mes réponses » */
.q-d-tab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; z-index: 60;
  font: inherit; font-size: .9rem; font-weight: 600; padding: 14px 9px; border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.q-d-tab:hover { background: var(--surface-2); }
.q-d-tab[hidden], .q-drawer[hidden], .q-d-backdrop[hidden] { display: none; }
.q-d-count { writing-mode: horizontal-tb; background: var(--accent); color: var(--on-accent); border-radius: 999px; min-width: 1.6em; padding: .05em .45em; font-size: .8rem; text-align: center; }
.q-d-backdrop { position: fixed; inset: 0; z-index: 140; background: rgb(0 0 0 / .35); }
.q-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; width: min(400px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .2s ease; }
.q-drawer.is-open { transform: none; }
.q-d-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.q-d-head h2 { font-size: 1.25rem; margin: 0; }
.q-d-help { color: var(--muted); font-size: .88rem; margin: 6px 16px 10px; }
.q-d-body { flex: 1; overflow-y: auto; border-top: 1px solid var(--border); overscroll-behavior: contain; }
.q-d-sec { border-bottom: 1px solid var(--border); }
.q-d-sec summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: .95rem; display: flex; gap: 8px; align-items: baseline; }
.q-d-sec summary:hover { background: var(--surface-2); }
.q-d-q { flex: 1; }
.q-d-n { color: var(--muted); font-weight: 600; }
.q-d-in { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.q-d-picked, .q-d-res { display: flex; flex-wrap: wrap; gap: 6px; }
.q-d-in .chip { white-space: normal; text-align: left; font-size: .88rem; padding: .3em .8em; min-height: 0; }
.q-d-picked .chip::after { content: "✕"; margin-left: .45em; font-size: .8em; opacity: .7; }
.q-d-res .chip[aria-pressed="true"]::before { content: "✓ "; }
.q-d-search { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); height: 42px; padding: 0 12px; }
.q-d-sub { margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.q-d-sub:empty { display: none; }
.q-d-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { .q-drawer { transition: none; } }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chips .chip { white-space: normal; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.q-chip[aria-pressed="true"]::before { content: "✓ "; }
.q-other { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.q-other-label { font-weight: 600; font-size: .95rem; }
.q-other input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); height: 46px; padding: 0 12px; }
.q-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.q-suggest .chip { white-space: normal; text-align: left; }
.q-suggest-owner { color: var(--muted); font-weight: 400; }
.chip:hover .q-suggest-owner { color: inherit; }
.q-none { color: var(--muted); font-size: .92rem; margin: 0; }
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.q-picked { color: var(--muted); font-size: .9rem; text-align: center; }
.q-sum { font-size: 1.05rem; max-width: var(--measure); margin-bottom: 20px; }
/* Bilan : chiffres clés, chaînes de liens, faits, habitudes, changements */
.q-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 40%), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 0 0 8px; }
.q-metric { background: var(--bg); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.q-metric strong { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.q-metric span { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.q-sec { font-family: var(--font-display); font-size: 1.2rem; margin: 30px 0 6px; }
.q-hint { color: var(--muted); font-size: .92rem; margin: 0 0 10px; max-width: var(--measure); }
.q-chains, .q-branches, .q-facts, .q-changes { list-style: none; margin: 0; padding: 0; }
.q-chain { border-top: 1px solid var(--border); padding: 14px 0 12px; }
.q-chain-head, .q-branch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.q-branches { margin: 8px 0 0 14px; padding-left: 14px; border-left: 2px solid var(--border-strong); display: grid; gap: 8px; }
.q-pill { display: inline-block; font: inherit; font-size: .9rem; line-height: 1.3; padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-align: left; }
.q-pill-brand { font-weight: 600; }
.q-pill-owner { cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: .2em; }
.q-pill-owner:hover { border-color: var(--text); }
.q-pill-owner.is-key, .q-pill-person { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.q-pill-owner.is-good { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.q-pill-media { color: var(--muted); }
.q-pill-good { background: var(--good-soft); border-color: var(--good); color: var(--good); cursor: pointer; margin: 0 6px 6px 0; }
.q-pill-note { font-weight: 400; font-size: .82em; }
.q-rel { color: var(--muted); font-size: .88rem; }
.q-date { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.q-others { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 14px; }
.q-others-brands { margin-right: 6px; }
.q-facts { display: grid; gap: 10px; }
@media (min-width: 720px) { .q-facts, .q-changes { grid-template-columns: repeat(2, 1fr); } }
.q-fact, .q-change { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.q-fact p { margin: 0; }
.q-fact-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.q-fact-via { color: var(--muted); font-size: .85rem; }
.q-fact .linkbtn { align-self: flex-start; margin-top: auto; }
.q-good { margin: 0; }
.q-changes { display: grid; gap: 10px; }
.q-change p { margin: 0; }
.q-change-desc { color: var(--muted); font-size: .92rem; }
.q-change-cut { font-size: .85rem; color: var(--accent); font-weight: 600; }
.q-change .done-btn { flex: 0 0 auto; align-self: flex-start; margin-top: auto; } /* sans grandir avec la hauteur de la carte */
/* Carte des liens (dessinée par assets/carte.js) */
.q-map-wrap { margin: 18px 0 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.q-map { width: 100%; overflow-x: auto; position: relative; }
.qm-svg { display: block; max-width: none; font-family: var(--font-sans); }
.q-map-tip { display: none; margin: 0; padding: 8px 14px 0; font-size: .82rem; color: var(--muted); }
.q-map-wrap:has(.q-map.is-wide) .q-map-tip { display: block; }
.qm-edge { fill: none; stroke-width: 1.8; transition: opacity .2s; }
.qm-e-achat { stroke: var(--muted); stroke-opacity: .5; stroke-linecap: round; }
.qm-e-medias { stroke: var(--muted); stroke-dasharray: 3 3; }
.qm-e-publicite { stroke: var(--qm-pub); }
.qm-e-actionnaire, .qm-e-participation { stroke: var(--qm-act); }
.qm-e-relation { stroke: var(--public); }
.qm-e-fournisseur { stroke: var(--qm-four); }
.qm-ah.qm-e-fournisseur { fill: var(--qm-four); } .qm-key.qm-e-fournisseur { border-color: var(--qm-four); }
.qm-e-politique { stroke: var(--accent); }
.qm-ah { stroke: none; }
.qm-ah.qm-e-medias { fill: var(--muted); } .qm-ah.qm-e-publicite { fill: var(--qm-pub); } .qm-ah.qm-e-politique { fill: var(--accent); }
.qm-ah.qm-e-actionnaire, .qm-ah.qm-e-participation { fill: var(--qm-act); } .qm-ah.qm-e-relation { fill: var(--public); }
.qm-node { cursor: pointer; outline: none; transition: opacity .2s; }
.qm-node circle { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.qm-node text { text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.qm-label { font-size: 12.5px; font-weight: 700; fill: var(--text); }
.qm-sub { font-size: 11px; fill: var(--muted); }
.qm-code { text-anchor: middle; font-weight: 700; letter-spacing: .02em; fill: var(--muted); pointer-events: none; }
.qm-node.is-key .qm-code, .qm-person .qm-code { fill: var(--accent); }
.qm-node.is-good .qm-code { fill: var(--good); }.q-map-pays { margin: 0; padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .85rem; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.q-map-pays label { font-weight: 600; color: var(--text); }
.q-map-pays select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); height: 34px; padding: 0 8px; }
.qm-root circle { fill: var(--text); stroke: none; }
.qm-root-label { fill: var(--bg); stroke: none !important; font-weight: 800; font-size: 13px; }
.qm-owner.is-key circle, .qm-person circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; }
.qm-owner.is-key .qm-label, .qm-person .qm-label { fill: var(--accent); }
.qm-owner.is-good circle, .qm-alt circle { fill: var(--good-soft); stroke: var(--good); }
.qm-owner.is-good .qm-label, .qm-alt .qm-label { fill: var(--good); }
.qm-media circle { fill: var(--bg); stroke: var(--muted); stroke-dasharray: 2 2; }
.qm-media .qm-label { font-weight: 600; fill: var(--muted); font-size: 11.5px; }
.qm-via circle { fill: var(--qm-pub); stroke: none; }
.qm-others circle { fill: var(--bg); stroke: var(--muted); stroke-dasharray: 3 2; }
.qm-others .qm-label { fill: var(--muted); }
.qm-p-others { display: flex; flex-wrap: wrap; gap: 6px; }
.qm-node:hover circle, .qm-node:focus-visible circle { stroke-width: 3.5; }
.qm-node:focus-visible circle { stroke: var(--focus); }
.qm-svg.has-sel .qm-node:not(.is-on), .qm-svg.has-sel .qm-edge:not(.is-on) { opacity: .15; }
.qm-node.is-sel circle { stroke-width: 4; }
.q-map-intro { margin: 0; padding: 12px 14px 0; font-size: .9rem; color: var(--muted); background: var(--surface); }
.q-map-intro strong { color: var(--text); }
.q-key-red { color: var(--accent); font-weight: 600; } .q-key-green { color: var(--good); font-weight: 600; }
.q-map-legend { list-style: none; margin: 0; padding: 10px 14px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; font-size: .82rem; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface); }
.q-map-legend li { display: flex; align-items: center; gap: 6px; }
.qm-key { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.qm-key.qm-e-achat { border-color: var(--muted); opacity: .6; } .qm-key.qm-e-medias { border-top-style: dashed; border-color: var(--muted); }
.qm-key.qm-e-publicite { border-color: var(--qm-pub); } .qm-key.qm-e-actionnaire { border-color: var(--qm-act); }
.qm-key.qm-e-relation { border-color: var(--public); } .qm-key.qm-e-politique { border-color: var(--accent); }
.q-map-panel { background: var(--surface); border-top: 1px solid var(--border); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-height: 70px; }
.q-map-panel p, .qm-p-links { margin: 0; }
.qm-p-title { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.qm-p-via, .qm-p-hint { color: var(--muted); font-size: .9rem; }
.qm-p-links { padding-left: 18px; display: grid; gap: 4px; font-size: .95rem; }
.qm-p-fact { font-size: .95rem; }
.qm-p-sec { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; display: grid; gap: 4px; }
.qm-p-sec p { margin: 0; }
.qm-p-h { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.qm-p-paths, .qm-p-facts { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .95rem; }
.qm-p-facts .tag { margin-right: 4px; }
.qm-p-btn { align-self: flex-start; margin-top: 4px; }
.q-text { margin: 26px 0 0; border-top: 1px solid var(--border); padding-top: 12px; }
.q-text summary { cursor: pointer; font-weight: 600; }
.q-text[open] summary { margin-bottom: 8px; }
.q-private { color: var(--muted); font-size: .9rem; margin: 24px 0 14px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) {
  .q-nav .btn { padding: 0 14px; }
  .q-actions .btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
}

/* ---------- Impression : liste de courses compacte ---------- */
@media print {
  .topbar, .hero, .section:not(#catalogue), .filters, .footer, .card-foot, .dialog, .toast, .more-wrap, .section-head .section-lead, .q-d-tab, .q-drawer, .q-d-backdrop, .q-top-tools { display: none !important; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .section { padding: 0; } .section-alt { background: #fff; }
  .grid { display: block; columns: 2; column-gap: 16px; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #bbb; padding: 8px 10px; margin-bottom: 8px; gap: 4px; background: #fff !important; }
  .alt p, .card-note, .owner-btn svg, .tag { display: none; }
  .owner-btn { background: none; padding: 0; }
  .alt-name a::after { content: ""; }
  a { color: #000; text-decoration: none; }
  /* Bilan de la cartographie imprimé seul */
  body.print-cartographie .section { display: none !important; }
  body.print-cartographie #cartographie { display: block !important; }
  body.print-cartographie #cartographie .section-head, .q-actions, .q-change .done-btn, .q-fact .linkbtn, .q-hint { display: none !important; }
  body.print-cartographie .q-result { border: 0; padding: 0; }
  body.print-cartographie .q-chain, body.print-cartographie .q-fact, body.print-cartographie .q-change { break-inside: avoid; background: #fff; border-color: #bbb; }
  body.print-cartographie .q-pill { border-color: #999; background: #fff; color: #000; text-decoration: none; }
  body.print-cartographie .q-fact-head .tag { display: inline; border: 1px solid #999; padding: 0 4px; }
  body.print-cartographie .q-map-tip, body.print-cartographie .q-text summary, body.print-cartographie .qm-p-btn { display: none !important; }
  body.print-cartographie .q-map-wrap { break-inside: avoid; background: #fff; border-color: #bbb; }
}
