/*
 * Le guide de la carte de fidélité digitale.
 *
 * Une publication, pas un produit : une seule colonne de lecture, un texte en
 * serif, du noir sur blanc et un bleu marine sourd pour les liens. Ni
 * dégradé, ni ombre, ni carte flottante : rien qui rappelle l'interface de
 * volcanfidelite.fr, pour que la recommandation finale se lise comme un
 * conseil et non comme une vitrine déguisée.
 *
 * Source Serif 4 est servie depuis ce domaine (licence SIL OFL 1.1, voir
 * fonts/OFL.txt) : aucune adresse IP de visiteur ne part chez un tiers. Les
 * éléments d'interface (sommaire, boutons, légendes) prennent la police
 * système de l'appareil.
 */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4-latin-opsz-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: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, 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: 200 900;
  font-display: swap;
  src: url('/fonts/source-serif-4-latin-opsz-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;
}

:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --ink-mute: #6b6b6b;
  --rule: #e2e2e2;
  --accent: #1f3a5f;
  --accent-deep: #142840;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.7;
  font-optical-sizing: auto;
}

@media (max-width: 520px) {
  body {
    font-size: 1.125rem;
  }
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-deep);
  text-decoration-thickness: 2px;
}

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

.column {
  width: 100%;
  max-width: 712px;
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.skip:focus {
  left: 8px;
}

/* Interface (sommaire, boutons, légendes) : police système, plus petite. */
.ui,
.meta,
.toc,
figcaption,
.recommendation__label,
.site-footer,
.masthead__by {
  font-family: var(--sans);
}

/* ---------- Bandeau ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-block: 18px;
}

.masthead__title {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.masthead__title:hover {
  color: var(--ink);
  text-decoration: none;
}

.masthead__by {
  color: var(--ink-mute);
  font-size: 0.8125rem;
  text-decoration: none;
}

.masthead__by:hover {
  color: var(--ink);
}

/* ---------- Titres et texte ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.125rem, 1.55rem + 2.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(1.625rem, 1.35rem + 1.2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  margin: 36px 0 8px;
  font-size: 1.25rem;
  line-height: 1.35;
}

p,
ul,
ol {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

ul,
ol {
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.45em;
  padding-left: 0.2em;
}

li::marker {
  color: var(--ink-mute);
}

.article-head {
  padding-block: 56px 32px;
}

@media (min-width: 720px) {
  .article-head {
    padding-top: 80px;
  }
}

.meta {
  margin-bottom: 20px;
  color: var(--ink-mute);
  font-size: 0.875rem;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.3125rem;
  line-height: 1.55;
}

@media (max-width: 520px) {
  .lede {
    font-size: 1.1875rem;
  }
}

.anchor-link {
  font-size: 0.9375rem;
  font-weight: 600;
}

section {
  padding-top: 48px;
  margin-top: 48px;
  border-top: 1px solid var(--rule);
}

.emphasis {
  margin-top: 28px;
  font-size: 1.3125rem;
  font-style: italic;
  line-height: 1.5;
}

blockquote {
  margin: 0 0 1.1em;
  padding-left: 20px;
  border-left: 3px solid var(--ink);
  font-size: 1.3125rem;
  font-style: italic;
}

.photo {
  max-width: 420px;
  margin: 32px 0 0;
}

/* La photo est affichée entière, telle que fournie : on borne sa largeur,
   jamais on ne la recadre. */
.photo img {
  width: 100%;
}

figcaption {
  margin-top: 10px;
  color: var(--ink-mute);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ---------- Sommaire ---------- */

.toc {
  padding: 20px 0 4px;
  border-top: 1px solid var(--ink);
  font-size: 0.9375rem;
}

.toc__title {
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.toc li {
  margin-bottom: 4px;
}

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

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Recommandation finale ---------- */

.recommendation {
  margin-top: 32px;
  padding: 28px 24px 24px;
  border: 1px solid var(--ink);
}

@media (min-width: 720px) {
  .recommendation {
    padding: 36px 40px 32px;
  }
}

.recommendation__label {
  margin-bottom: 4px;
  color: var(--ink-mute);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recommendation h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.recommendation__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}

.recommendation__note {
  margin: 14px 0 0;
  color: var(--ink-mute);
  font-size: 0.8125rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.btn--secondary {
  color: var(--accent);
}

.btn--secondary:hover {
  background: #f3f5f8;
}

@media (max-width: 520px) {
  .recommendation__actions .btn {
    width: 100%;
  }
}

/* ---------- Questions ---------- */

.faq {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  position: relative;
  padding: 18px 36px 18px 0;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 16px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

/* ---------- Pied de page ---------- */

.site-footer {
  margin-top: 72px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--rule);
  color: var(--ink-mute);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.site-footer a {
  color: var(--ink-soft);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer__links li {
  margin: 0;
  padding: 0;
}

/* ---------- Mentions légales et page introuvable ---------- */

.legal {
  padding-block: 56px 24px;
}

.legal h1 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.5rem);
}

.legal h2 {
  margin: 36px 0 8px;
  font-size: 1.25rem;
}

.legal p {
  color: var(--ink-soft);
}

/* ---------- Pages du guide : fil d'Ariane, renvois ---------- */

.crumbs {
  margin-bottom: 14px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 0.8125rem;
}

.crumbs a {
  color: var(--ink-mute);
}

.note {
  padding: 14px 18px;
  background: #f6f6f6;
  color: var(--ink-soft);
  font-size: 1rem;
}

.more {
  margin-top: -0.4em;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.jump {
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--ink-mute);
}

.related {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.related__title {
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related__home {
  font-weight: 600;
}

.related ul {
  margin: 0;
  padding-left: 1.1em;
}
