/* Polices hébergées sur le site (licence SIL Open Font License) */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/atkinson-400i.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }
/* Mise en page : une colonne de lecture ; chaque étape = texte + capture d'écran dans un cadre de téléphone,
   côte à côte sur grand écran, l'une sous l'autre sur téléphone. Couleurs reprises de l'application. */
:root {
  --bg: #f3f6f4;          /* fond de l'application */
  --paper: #ffffff;
  --ink: #1f2433;
  --muted: #5b6472;
  --line: #dde5df;
  --green: #1e6b34;       /* vert des logos */
  --green-deep: #185828;
  --green-soft: #e8f3ea;
  --gold: #b7791f;        /* hermines du logo de Locmaria : conseils */
  --gold-soft: #fbf3e2;
  --phone: #1f2433;
  --on-green: #ffffff;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Roboto, Arial, sans-serif;
  --step: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111814; --paper: #19221c; --ink: #e8efe9; --muted: #a3b0a7; --line: #2b3830;
    --green: #5cc27a; --green-deep: #7fd699; --green-soft: #1d3325; --gold: #e0b25a; --gold-soft: #2e2716;
    --phone: #0a0f0c; --on-green: #0f1a13; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111814; --paper: #19221c; --ink: #e8efe9; --muted: #a3b0a7; --line: #2b3830;
  --green: #5cc27a; --green-deep: #7fd699; --green-soft: #1d3325; --gold: #e0b25a; --gold-soft: #2e2716;
  --phone: #0a0f0c; --on-green: #0f1a13; color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--step); line-height: 1.6; }
.wrap { max-width: 46rem; margin: 0 auto; padding-inline: 16px; padding-block: 0 4rem; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.4rem); color: var(--green-deep); letter-spacing: 0.01em; }
h3 { font-size: 1.45rem; color: var(--ink); }
p { margin: 0; }
strong { font-weight: 700; }
a { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* En-tête */
.cover { padding-block: 2.2rem 1.6rem; display: grid; gap: 1.1rem; }
.cover-top { display: flex; align-items: center; gap: 14px; }
.cover-top img { width: 64px; height: 64px; border-radius: 16px; }
.kicker { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); font-weight: 700; }
h1 { font-size: clamp(2.5rem, 2rem + 2.4vw, 3.4rem); color: var(--ink); }
.lead { font-size: 1.15rem; max-width: 36rem; }
.need { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; display: grid; gap: 0.7rem; }
.need h2 { font-size: 1.5rem; color: var(--ink); }
.need ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.need li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.6rem; align-items: start; }
.need .ico { width: 2rem; height: 2rem; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; font-weight: 700; color: var(--green-deep); font-size: 1rem; }
.url { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; background: var(--green-soft); color: var(--green-deep); padding: 0.05rem 0.45rem; border-radius: 6px; white-space: nowrap; }

/* Sommaire */
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.toc a { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; background: var(--paper); border: 1px solid var(--line); color: var(--ink); padding: 0.45rem 0.8rem; border-radius: 999px; font-weight: 700; font-size: 0.98rem; }
.toc span { font-family: var(--font-display); color: var(--green); font-size: 1.1rem; }

/* Parties */
section.part { padding-block: 2.6rem 0.5rem; display: grid; gap: 1.3rem; scroll-margin-top: 1rem; }
.part-head { display: grid; gap: 0.4rem; border-top: 3px solid var(--green); padding-top: 0.9rem; }
.part-no { font-family: var(--font-display); font-weight: 700; color: var(--green); font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; }
.part-head p { color: var(--muted); }

/* Étapes */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem; display: grid; gap: 1rem; grid-template-columns: 1fr; break-inside: avoid; }
.step.has-shot { grid-template-columns: minmax(0, 1fr) 13.5rem; align-items: start; }
.step-text { display: grid; gap: 0.55rem; min-width: 0; align-content: start; }
.step-title { display: flex; gap: 0.7rem; align-items: baseline; }
.step-title::before { counter-increment: step; content: counter(step); flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--green); color: var(--on-green); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; display: grid; place-items: center; transform: translateY(0.35rem); }
.unnumbered .step-title::before { content: none; }
.step-text ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.btnlike { display: inline-block; font-weight: 700; background: var(--green); color: var(--on-green); border-radius: 8px; padding: 0 0.45rem; font-size: 0.95em; white-space: nowrap; }
.chiplike { display: inline-block; font-weight: 700; border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: 0 0.45rem; font-size: 0.95em; white-space: nowrap; }
.tip { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 0.6rem 0.8rem; border-radius: 0 10px 10px 0; font-size: 0.98rem; }
.tip b { color: var(--gold); }

/* Capture d'écran dans un cadre de téléphone */
figure.phone { margin: 0; justify-self: center; width: 100%; max-width: 13.5rem; display: grid; gap: 0.4rem; }
figure.phone .frame { background: var(--phone); border-radius: 26px; padding: 7px; box-shadow: 0 10px 24px -14px rgba(20, 40, 28, 0.55); }
figure.phone img { display: block; width: 100%; height: auto; border-radius: 20px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
figure.phone figcaption { font-size: 0.82rem; color: var(--muted); text-align: center; }

/* Illustrations (menus du téléphone) dessinées en HTML */
.mock { justify-self: center; width: 100%; max-width: 13.5rem; background: var(--phone); border-radius: 26px; padding: 7px; }
.mock .scr { background: #fafafa; color: #222; border-radius: 20px; min-height: 16rem; padding: 0.7rem; display: grid; align-content: start; gap: 0.55rem; font-family: Roboto, "Segoe UI", Arial, sans-serif; font-size: 0.86rem; line-height: 1.35; }
.mock .bar { display: flex; align-items: center; gap: 6px; background: #eceff1; border-radius: 999px; padding: 0.35rem 0.6rem; }
.mock .bar .addr { flex: 1; color: #333; }
.mock .menu { background: #fff; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,0.18); display: grid; }
.mock .menu div { padding: 0.5rem 0.75rem; border-bottom: 1px solid #eee; }
.mock .menu div:last-child { border-bottom: 0; }
.mock .hl { outline: 3px solid #e3a008; outline-offset: -3px; border-radius: 8px; background: #fff7e0; font-weight: 700; }
.mock .dots { font-weight: 900; font-size: 1.1rem; line-height: 1; padding: 0 0.3rem; }
.mock .ring { outline: 3px solid #e3a008; border-radius: 8px; }
.mock .dialog { background: #fff; border-radius: 14px; padding: 0.8rem; box-shadow: 0 4px 16px rgba(0,0,0,0.2); display: grid; gap: 0.5rem; }
.mock .app { display: flex; align-items: center; gap: 0.5rem; }
.mock .app img { width: 2.2rem; height: 2.2rem; border-radius: 9px; }
.mock .actions { display: flex; justify-content: flex-end; gap: 0.8rem; color: #1a73e8; font-weight: 700; }
.mock .home { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem 0.4rem; padding-top: 0.6rem; justify-items: center; }
.mock .home span { width: 100%; max-width: 2.3rem; aspect-ratio: 1; border-radius: 10px; background: #d7dde2; }
.mock .home figure { margin: 0; display: grid; justify-items: center; gap: 2px; font-size: 0.6rem; width: 100%; min-width: 0; text-align: center; }
.mock .home figure img { width: 100%; max-width: 2.3rem; aspect-ratio: 1; height: auto; border-radius: 10px; }
.mock .home figure.me { outline: 3px solid #e3a008; outline-offset: 3px; border-radius: 10px; }
.mock .ios-bar { margin-top: auto; display: flex; justify-content: space-around; background: #f1f1f3; border-radius: 12px; padding: 0.4rem; color: #007aff; font-size: 1.1rem; }
.mock .sheet { background: #fff; border-radius: 12px; display: grid; }
.mock .sheet div { padding: 0.5rem 0.75rem; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.mock .ios-head { display: flex; justify-content: space-between; color: #007aff; font-weight: 600; }
.mock-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 0.35rem; }
.mock-col { display: grid; justify-items: center; }

/* Onglets Android / iPhone */
.os-switch { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; justify-self: start; }
.os-switch button { font: inherit; font-weight: 700; border: 0; background: transparent; color: var(--ink); padding: 0.5rem 1.1rem; border-radius: 999px; cursor: pointer; }
.os-switch button[aria-selected="true"] { background: var(--green); color: var(--on-green); }
.os-panel { display: grid; gap: 1rem; }
.os-label { display: none; }

/* Questions */
.faq { display: grid; gap: 0.6rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1rem; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 0.5rem; }
.foot { margin-top: 3rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); padding-top: 1rem; }

@media (max-width: 640px) {
  .step.has-shot { grid-template-columns: 1fr; }
  figure.phone, .mock { max-width: 15rem; }
}
@media print {
  :root { --bg: #ffffff; }
  body { font-size: 11.5pt; }
  .wrap { max-width: none; padding-block: 0; }
  .toc, .os-switch { display: none; }
  .os-panel[hidden] { display: grid !important; }
  .os-label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--green-deep); }
  /* Blocs simples à l'impression : les grilles coupées entre deux pages se chevauchent dans Chrome */
  section.part, .os-panel, .steps, .faq, .cover { display: block; }
  section.part { break-before: page; padding-top: 0; }
  section.part.first { break-before: auto; margin-top: 6mm; }
  .part-head, .os-label, .cover > * { margin-bottom: 4mm; }
  .os-panel + .os-panel { break-before: page; }
  .os-label, .part-head { break-after: avoid; }
  .mock .home { gap: 0.35rem 0.2rem; }
  .step { margin-bottom: 4mm; padding: 4mm; }
  .step.has-shot { grid-template-columns: minmax(0, 1fr) 40mm; }
  figure.phone, .mock { max-width: 40mm; }
  figure.phone .frame, .mock { border-radius: 18px; padding: 5px; }
  figure.phone img { border-radius: 14px; }
  .mock .scr { min-height: 0; font-size: 7.5pt; border-radius: 14px; }
  .faq details { margin-bottom: 3mm; }
  .step, .faq details, .need { break-inside: avoid; }
  .faq details > p { display: block; }
  figure.phone .frame, .mock { box-shadow: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Page hébergée : réglages de base (fournis ailleurs par l'hébergeur de la page publiée) */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px; }
.site-links a { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; font-weight: 700; border-radius: 999px; padding: 0.5rem 0.95rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.site-links a.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
@media print { .site-links { display: none; } }

/* Anciens styles en ligne */
.i1 { text-align:center !important; padding-top:1.2rem !important; }
.i2 { width:3rem !important; border-radius:12px !important; }
.i3 { font-weight:700 !important; margin-top:.3rem !important; }
.i4 { align-content:center !important; }
.i5 { color:#666 !important; }
.i6 { color:#555 !important; }
.i7 { padding:0 .3rem !important; }
.i8 { min-height:16rem !important; }
.i9 { text-align:center !important; padding-top:1.4rem !important; }
.i10 { margin-top:auto !important; }
.i11 { text-align:center !important; }
.i12 { padding:0 .35rem !important; }
.i13 { background:#e9e9ee !important; }
.i14 { color:#222 !important; }
.i15 { padding:0 .25rem !important; }
.i16 { justify-content:flex-start !important; gap:.6rem !important; }
.i17 { width:2.4rem !important; border-radius:9px !important; }
.i18 { color:#888 !important; }
