/* Fouine — feuille unique des pages /fouine.
   Aucune police externe, aucun script, aucune ressource d'un autre domaine :
   tout ce que la page charge vient de /fouine/. Palette sans couleur d'accent,
   sauf le bouton d'achat. Servie depuis quartz/static/ par des réécritures
   Vercel : tous les chemins de la page sont ABSOLUS (/fouine/…). */

:root {
  --bg: #fbfaf8;
  --surface: #f4f2ee;
  --border: #dcd8d0;
  --text: #1b1b19;
  --muted: #55534e;
  --mark: #f0e0bd;
  --accent: #7a4a12;          /* 7,46:1 sur blanc */
  --accent-text: #ffffff;
  --shot-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1b1b1a;
    --border: #33322f;
    --text: #eceae6;
    --muted: #a9a69f;
    --mark: #45381f;
    --accent: #d9a441;        /* 8,42:1 sur #121211 */
    --accent-text: #121211;
    --shot-bg: #1b1b1a;
  }
}

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

html {
  scroll-padding-top: 5.5rem;   /* l'en-tête colle : les ancres s'arrêtent dessous */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 3px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border-radius: 0.25rem;
  padding: 0.08em 0.32em;
}

mark { background: var(--mark); color: var(--text); padding: 0 0.15em; }

/* ————— Gabarit ————— */

.zone {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

section { padding-block: 3.5rem; }
section + section { border-top: 1px solid var(--border); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.3125rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.intro { color: var(--muted); }

.evite {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 20;
}
.evite:focus { left: 0; }

/* ————— En-tête ————— */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding-block: 0.5rem;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0;
  margin-right: auto;
}
.marque img { width: 28px; height: 28px; border-radius: 6px; }

nav.site ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.site a {
  display: inline-block;
  padding: 0.6rem 0.5rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}
nav.site a:hover { color: var(--text); text-decoration: underline; }
nav.site .bouton { color: var(--accent-text); font-size: 0.9375rem; }

/* ————— Boutons ————— */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 0.5rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.bouton:hover { opacity: 0.88; }
.bouton.achat { background: var(--accent); color: var(--accent-text); }
nav.site .bouton { min-height: 2.5rem; padding: 0.5rem 0.9rem; }

.essai { display: block; margin-top: 0.9rem; font-size: 0.9375rem; color: var(--muted); }
.mention { margin-top: 0.6rem; font-size: 0.875rem; color: var(--muted); }

/* ————— Héros ————— */

.heros { padding-top: 3.5rem; text-align: center; }
.heros h1 {
  font-size: clamp(2rem, 6.2vw, 3.25rem);
  margin-inline: auto;
}
.heros h1 .deux { display: block; color: var(--muted); }
.chapo {
  margin: 1.25rem auto;
  font-size: 1.1875rem;
  color: var(--muted);
}
.heros .intro { margin-inline: auto; }

/* ————— Captures ————— */

figure { margin: 2.5rem 0 0; }
figure img {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--shot-bg);
}
figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.heros figcaption { text-align: center; }

figure.etroite { max-width: 30rem; }
figure.etroite img { border-radius: 0.5rem; }

/* ————— Rangées : un texte, une capture large dessous ————— */

.rangee { padding-block: 2.5rem; }
.rangee + .rangee { border-top: 1px solid var(--border); }
.rangee p { color: var(--muted); }
.rangee figure { margin-top: 1.75rem; }

/* ————— Ailleurs sur le Mac ————— */

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem 1.75rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}
.apps li { display: flex; gap: 0.85rem; align-items: flex-start; }
.apps img { width: 44px; height: 44px; flex: none; }
.apps b { display: block; font-weight: 600; }
.apps span { color: var(--muted); font-size: 0.9375rem; }

.encart {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 1.75rem;
}
.encart h3 { margin: 0 0 0.25rem; }
.encart p { color: var(--muted); }

.assistant-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.assistant-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.assistant-logos img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.assistant-title-group h3 {
  margin: 0;
  font-size: 1.25rem;
}
.assistant-sous-titre {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ————— Carrousel de formats (CSS seul) ————— */

.carrousel { margin-top: 1.75rem; }

/* Deux pistes IDENTIQUES posées côte à côte dans un conteneur flex : chacune
   glisse de sa propre largeur, donc quand la première a fini de sortir, la
   seconde est exactement là où la première a commencé. La boucle est
   invisible. Sans `display: flex` ici, les deux <ul> s'empileraient. */
.bande {
  display: flex;
  overflow: hidden;
  padding-block: 0.75rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3rem,
                                      #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3rem,
                              #000 calc(100% - 3rem), transparent);
}

/* Pas de `gap` : l'écart est PORTÉ PAR chaque élément (margin-right), y compris
   le dernier, sinon la jointure entre les deux pistes saute d'un demi-écart. */
.piste {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: defile 64s linear infinite;
}
.bande.retour .piste { animation-direction: reverse; }
.bande:hover .piste,
.piste:focus-within { animation-play-state: paused; }

@keyframes defile {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.piste li {
  flex: none;
  width: 5.5rem;
  margin-right: 0.5rem;
  text-align: center;
}
.piste img { width: 40px; height: 40px; margin: 0 auto; display: block; }
.piste span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ————— Tableau comparatif ————— */

.cadre-table {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
}
.cadre-table:focus-visible { outline-offset: 0; }

table.compare {
  border-collapse: collapse;
  width: 100%;
  min-width: 46rem;
  font-size: 0.9375rem;
}
table.compare th,
table.compare td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
table.compare thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-size: 0.875rem;
  white-space: nowrap;
}
table.compare tbody th {
  position: sticky;
  left: 0;
  background: var(--bg);
  font-weight: 600;
  width: 14rem;
  min-width: 14rem;
  border-right: 1px solid var(--border);
}

/* Sur un téléphone, la colonne des intitulés reste collée mais mange moins
   de place : sinon il ne reste rien à lire des sept produits. */
@media (max-width: 30rem) {
  table.compare { font-size: 0.875rem; min-width: 42rem; }
  table.compare tbody th { width: 9.5rem; min-width: 9.5rem; }
  table.compare th, table.compare td { padding: 0.5rem 0.55rem; }
}
table.compare thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
table.compare .nous { background: var(--surface); }
table.compare tbody th.nous { background: var(--surface); }
table.compare tr:last-child th,
table.compare tr:last-child td { border-bottom: 0; }
.oui { font-weight: 600; }
.non { color: var(--muted); }

.note-table { margin-top: 0.9rem; font-size: 0.875rem; color: var(--muted); }

.pas { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.pas li { border-top: 1px solid var(--border); padding: 0.85rem 0; color: var(--muted); }
.pas li:last-child { border-bottom: 1px solid var(--border); }
.pas b { color: var(--text); }

/* ————— Prix ————— */

.prix { text-align: center; }
.montant {
  font-size: clamp(3rem, 10vw, 4.5rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0.5rem 0 0.25rem;
}
.prix .conditions { font-size: 1.125rem; margin-bottom: 1.5rem; }
.prix .apres {
  margin: 1.5rem auto 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ————— Questions ————— */

details { border-top: 1px solid var(--border); padding: 0.5rem 0; }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; padding: 0.6rem 0; min-height: 2.75rem; font-weight: 600; }
details p { color: var(--muted); padding-bottom: 0.5rem; }

/* ————— Pied ————— */

footer.site {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
footer.site h2 { font-size: 1rem; margin-top: 1.75rem; color: var(--text); }
footer.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
footer.site li a { display: inline-block; padding: 0.5rem 0; min-height: 2.75rem; }
.copyright { margin-top: 1.75rem; }

/* ————— Pages courtes (merci) ————— */

.courte { padding-block: 4rem 3rem; }
.courte h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
.courte ol { padding-left: 1.25rem; }
.courte li { margin-bottom: 0.75rem; }
.courte .intro { font-size: 1.125rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  /* Immobile : une seule piste, qu'on fait défiler à la main si on veut. */
  .bande { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .piste[aria-hidden="true"] { display: none; }
}

/* ————— L'assistant : exemples et échange réel ————— */

.encart .exemples {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--muted);
}
.encart .exemples li { margin-bottom: 0.6rem; }
.encart .exemples b { color: var(--text); font-weight: 600; }

.encart h4 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.4rem;
  color: var(--text);
}
.encart .mcp-privacy {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--muted);
}
.encart .mcp-privacy li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}
.encart .mcp-privacy b {
  color: var(--text);
  font-weight: 600;
}
.encart .lien-fleche {
  display: inline-block;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Échange stylisé avec bulles et icône AGY pour l'assistant */
figure.dialogue {
  margin: 1.75rem 0;
}
.dialogue .message {
  margin-bottom: 0.85rem;
}
.dialogue .question-wrap {
  display: flex;
  justify-content: flex-end;
}
.dialogue .reponse-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.dialogue .avatar-agy {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.2rem;
  background: var(--bg);
  padding: 2px;
  border: 1px solid var(--border);
}
.dialogue .reponse-contenu {
  flex: 1;
}
.dialogue .nom-assistant {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
  margin-left: 0.2rem;
}
.dialogue p {
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.dialogue .question {
  background: var(--text);
  color: var(--bg);
  margin-left: 2rem;
  border-bottom-right-radius: 0.25rem;
}
.dialogue .reponse {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-top-left-radius: 0.25rem;
}
.dialogue figcaption {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ————— Par métier ————— */

.metiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.metier {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.35rem 1.45rem;
  background: var(--surface);
}
.metier h3 { font-size: 1.125rem; margin-bottom: 0.65rem; }
.metier p { color: var(--muted); font-size: 0.9375rem; }
.metier-points {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.metier-points li {
  margin-bottom: 0.65rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}
.metier-points li:last-child {
  margin-bottom: 0;
}
.metier-points b {
  color: var(--text);
  font-weight: 600;
}
.metier.large { grid-column: 1 / -1; }
.metier figure { margin-top: 1.25rem; }
.metier .deux-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.metier .deux-figures figure { margin: 0; }

/* ————— Pages de texte (privacy, terms) ————— */

.doc { padding-block: 3rem; }
.doc h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
.doc h2 { margin-top: 2.25rem; font-size: 1.375rem; }
.doc h3 { margin-top: 1.5rem; font-size: 1.125rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.5rem; }
.doc table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.doc thead th { background: var(--surface); }
.doc pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
}
.doc pre code { background: none; padding: 0; }
.doc blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.doc .dated { font-size: 0.875rem; color: var(--muted); }
