/* ===== Polices =====
   Inter (texte, 400 à 600) et JetBrains Mono (code, identifiants, chiffres), auto-hébergées
   (public/fonts, licence SIL OFL 1.1 : OFL-inter.txt et OFL-jetbrains-mono.txt). Aucune requête externe. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  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: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  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: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations');
  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: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

/* ===== Jetons =====
   Calme et lisible pour un public non technique. Accent par défaut : bleu « encre » (#8cbfe6 en sombre,
   #1f5f8b en clair). --page-bg : fond de page complet (couleur, dégradé ou image), surchargeable par /brand.css.
   BRAND_ACCENT (via /brand.css) peut le remplacer : --accent, avec --accent-on pour le texte dessus.
   Aucune couleur en dur dans les composants. */
:root {
  color-scheme: dark;
  --a: var(--accent, #8cbfe6);
  --accent-strong: var(--a);                                    /* boutons et surfaces principales */
  --on-accent: var(--accent-on, #0b1016);                       /* texte sur --accent-strong */
  --accent-text: var(--accent-ink, color-mix(in srgb, var(--a) 40%, white));
  --accent-soft: color-mix(in srgb, var(--a) 14%, var(--surface));
  --accent-ring: color-mix(in srgb, var(--a) 55%, transparent);

  --bg: #0f141b;
  --bg-2: #0b1016;
  --surface: #151c25;
  --surface-solid: #151c25;
  --surface-2: #1b2430;
  --border: #232d3a;
  --border-2: #33404f;
  --field-border: #6f7c8d;
  --text: #e8edf3;
  --muted: #9aa6b5;
  --dim: #7f8b9a;
  --warn-bg: rgb(242 176 51 / .13);
  --warn-border: rgb(242 176 51 / .4);
  --warn-text: #f7c766;
  --danger: #ff8a8a;
  --shadow: 0 1px 0 rgb(255 255 255 / .02) inset, 0 1px 2px rgb(0 0 0 / .5);
  --shadow-pop: 0 2px 8px rgb(0 0 0 / .5), 0 24px 48px -16px rgb(0 0 0 / .8);
  --header-bg: rgb(15 20 27 / .9);
  --page-bg: var(--brand-bg, var(--bg));   /* --brand-bg : BRAND_BACKGROUND via /brand.css */
  --overlay: rgb(0 0 0 / .65);
  --qr-bg: #ffffff;               /* un QR code et une capture restent sur fond blanc */

  --radius: 12px;
  --radius-sm: 8px;
  --container: 1160px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --focus: 0 0 0 3px var(--accent-ring);

  /* Alias conservés (utilisés par /support) */
  --cyan: var(--accent-text);
  --link: var(--accent-text);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --a: var(--accent, #1f5f8b);
    --on-accent: var(--accent-on, #ffffff);
    --accent-text: color-mix(in srgb, var(--a) 70%, black);
    --accent-soft: color-mix(in srgb, var(--a) 11%, var(--surface));
    --accent-ring: color-mix(in srgb, var(--a) 35%, transparent);
    --bg: #eef1f5;
    --bg-2: #f8fafc;
    --surface: #ffffff;
    --surface-solid: #ffffff;
    --surface-2: #f2f5f8;
    --border: #dde3ea;
    --border-2: #c6cfda;
    --field-border: #8793a3;
    --text: #172030;
    --muted: #556173;
    --dim: #6f7b8b;
    --warn-bg: #fff7e0;
    --warn-border: #e0b84a;
    --warn-text: #7a5600;
    --danger: #b42318;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-pop: 0 12px 32px rgba(16, 24, 40, .18);
    --header-bg: rgba(255, 255, 255, .86);
    --overlay: rgba(16, 24, 40, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; min-height: 100%; background: var(--page-bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
}
body > .site-footer { margin-top: auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
strong, b { font-weight: 600; }
button { font: inherit; }
input, select, textarea { caret-color: var(--accent-text); }
::selection { background: var(--accent-strong); color: var(--on-accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
h1:focus-visible, h2:focus-visible, main:focus-visible { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; font-weight: 600; border-radius: var(--radius-sm); border: 1px solid var(--border-2); }
.skip-link:focus { top: 12px; }

.grad-text { color: var(--accent-text); }
/* Petite étiquette discrète */
.eyebrow { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .6rem; }
.eyebrow-dark { color: var(--accent-text); }

@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Boutons ===== */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: var(--radius-sm); padding: 14px 22px; min-height: 52px; transition: background .2s, color .2s, box-shadow .2s, transform .15s, border-color .2s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent-strong); color: var(--on-accent); box-shadow: var(--shadow); }
.btn-primary:hover { color: var(--on-accent); background: color-mix(in srgb, var(--accent-strong) 88%, black); }
.btn-primary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent-text); color: var(--text); background: var(--accent-soft); }
.btn-block { width: 100%; justify-content: space-between; text-align: left; padding: 14px 20px; }
.btn svg { flex: none; width: 18px; height: 18px; }

.link-btn, .link-plain {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 2px; cursor: pointer;
  color: var(--muted); font-size: .84rem; font-weight: 400; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); text-underline-offset: 4px;
}
.link-btn:hover, .link-plain:hover { color: var(--text); text-decoration-color: currentColor; }
.link-btn svg, .link-plain svg { width: 16px; height: 16px; flex: none; }

/* ===== En-tête ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { height: 26px; width: auto; }
.brand-logo { max-height: 32px; width: auto; height: auto; }
.brand-mark { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-strong); color: var(--on-accent); }
.brand-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.brand-tag { font-size: .75rem; font-weight: 500; color: var(--muted); padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.header-nav { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 1px solid var(--border); cursor: pointer; border-radius: var(--radius-sm);
  color: var(--text); font-size: .8rem; padding: 6px 10px; min-height: 40px; transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--border-2); background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; flex: none; color: var(--accent-text); }
@media (max-width: 359px) { .icon-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* Lien de la page /support */
.nav-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font-size: .84rem; padding: 8px 10px; cursor: pointer; text-decoration: none; border-radius: var(--radius-sm); }
.nav-link:hover { color: var(--text); }
.nav-webmail { color: var(--text); border: 1px solid var(--border); margin-left: 6px; padding: 8px 14px; }
.nav-webmail:hover { border-color: var(--border-2); }
.nav-webmail svg { width: 14px; height: 14px; }
@media (max-width: 520px) { .brand-tag { display: none; } }

/* ===== Mise en page ===== */
main { flex: 1 0 auto; }
.narrow { max-width: 680px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.view-head { margin-bottom: 22px; }
.view-head h1 { font-size: clamp(1.3rem, 5.2vw, 1.65rem); margin-bottom: .3em; }
.view-head p { color: var(--muted); margin: 0; }

/* ===== Accueil (étape 1) ===== */
.home { padding: 36px 0 48px; }
@media (min-width: 720px) { .home { padding: clamp(24px, 8vh, 84px) 0 clamp(24px, 6vh, 64px); } }
.start-card { max-width: 480px; margin: 0 auto; padding: 32px 20px 22px; box-shadow: var(--shadow-pop); position: relative; animation: in .35s ease; }
@media (min-width: 720px) { .start-card { padding: 40px 36px 28px; } }
.start-card h1 { font-size: clamp(1.5rem, 6vw, 1.9rem); margin-bottom: .4em; letter-spacing: -.01em; }
.card-sub { color: var(--muted); margin-bottom: 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: 8px; }
.optional { color: var(--muted); font-weight: 400; }
.field input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--field-border); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 52px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: var(--dim); }
.field input:hover { border-color: var(--muted); }
.field input:focus { border-color: var(--accent-text); box-shadow: var(--focus); }
.field input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field-error { display: flex; align-items: flex-start; gap: 8px; color: var(--danger); font-size: .86rem; margin: 8px 0 0; }
/* Une erreur n'est jamais signalée par la couleur seule : pastille « ! » + texte. */
.field-error::before { content: "!"; content: "!" / ""; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border: 2px solid currentColor; border-radius: 50%; font-size: .7rem; font-weight: 700; line-height: 1; }
.field-help { color: var(--muted); font-size: .82rem; margin: 6px 0 0; }
.privacy-note { color: var(--muted); font-size: .78rem; text-align: center; margin: 16px 0 0; }

/* Mot de passe (option « vérifier la connexion ») : bouton Afficher/Masquer dans le champ. */
.pw-wrap { position: relative; }
.field .pw-wrap input { padding-right: 116px; font-family: var(--mono); font-size: .98rem; letter-spacing: .02em; }
.field .pw-wrap input[type="password"] { letter-spacing: .12em; }
.pw-toggle {
  position: absolute; top: 6px; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: .82rem; font-weight: 500; cursor: pointer;
}
.pw-toggle:hover { background: var(--accent-soft); }
.pw-toggle svg { width: 17px; height: 17px; color: var(--accent-text); }
.pw-toggle .pw-hide, .pw-toggle[aria-pressed="true"] .pw-show { display: none; }
.pw-toggle[aria-pressed="true"] .pw-hide { display: block; }
.skip-check { text-align: center; margin: 8px 0 0; }
.btn.is-busy { cursor: progress; opacity: .85; }
.btn.is-busy svg { display: none; }
.btn.is-busy::after { content: ""; flex: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* Résultat de la vérification : une ligne par service, qui passe de « en cours » au résultat. */
.check-card { --ok: var(--accent-text); --bad: var(--danger); --warn: var(--warn-text); }
.check-head { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; margin-bottom: 18px; }
.check-head h1 { font-size: clamp(1.3rem, 5.4vw, 1.6rem); margin: 0; letter-spacing: -.01em; }
.check-who { grid-column: 2; margin: 2px 0 0; color: var(--muted); font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }
.check-badge { grid-row: span 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.check-badge svg { width: 22px; height: 22px; }
.check-badge.is-ok { background: var(--accent-strong); color: var(--on-accent); }
.check-badge.is-bad { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 45%, transparent); }
.check-badge.is-warn { background: var(--warn-bg); color: var(--warn-text); box-shadow: inset 0 0 0 1.5px var(--warn-border); }
.check-badge.is-busy { border: 3px solid var(--accent-soft); border-top-color: var(--accent-text); animation: spin .9s linear infinite; }

.check-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.check-row { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.check-svc { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.check-svc svg { width: 19px; height: 19px; }
.check-main { min-width: 0; }
.check-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; margin: 6px 0 0; }
.check-name { font-weight: 600; font-size: .95rem; }
.check-state { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; }
.check-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.check-ic svg { width: 12px; height: 12px; }
.check-row.is-ok .check-state { color: var(--ok); }
.check-row.is-ok .check-ic { background: var(--accent-strong); color: var(--on-accent); }
.check-row.is-bad .check-state { color: var(--bad); }
.check-row.is-bad .check-ic { background: var(--bad); color: var(--surface); }
.check-row.is-warn .check-state { color: var(--warn); }
.check-row.is-warn .check-ic { background: var(--warn); color: var(--surface); }
.check-row.is-idle .check-state { color: var(--dim); font-weight: 500; }
.check-row.is-idle .check-ic { border: 1.5px solid currentColor; }
.check-row.is-idle .check-ic svg { width: 10px; height: 10px; }
.check-row.is-busy .check-state { color: var(--muted); font-weight: 500; }
.check-row.is-busy .check-ic { border: 2px solid var(--border-2); border-top-color: var(--accent-text); animation: spin .8s linear infinite; width: 16px; height: 16px; margin: 2px; }
.check-row.is-ok .check-svc { color: var(--accent-text); background: var(--accent-soft); }
.check-msg { color: var(--muted); font-size: .88rem; margin: 6px 0 0; max-width: 60ch; }
.check-notice { padding: 14px 0 2px; border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; }
.check-notice p { margin: 0 0 .6em; }
.check-actions { margin-top: 20px; }
.check-wait { color: var(--muted); font-size: .84rem; margin: 0; }
.check-alt { text-align: center; margin: 8px 0 0; }
.check-help { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--border); }
.check-help svg { color: var(--accent-text); }
@media (max-width: 479px) {
  .check-line { flex-direction: column; align-items: flex-start; }
  .check-head { column-gap: 12px; }
  .check-badge { width: 40px; height: 40px; }
}


/* ===== Assistant ===== */
.wizard { padding: 22px 0 24px; }
.wizard-top { margin-bottom: 26px; }
.stepper { list-style: none; display: flex; gap: 6px; margin: 0 0 12px; padding: 0; }
.stepper li { flex: 1; min-width: 0; }
.stepper a { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; position: relative; color: var(--muted); font-size: .8rem; text-decoration: none; white-space: nowrap; }
.stepper a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: var(--border); transition: background .4s; }
.stepper a[href]:hover { color: var(--text); }
.stepper span { width: 22px; height: 22px; flex: none; display: grid; place-items: center; font-size: .72rem; border: 1px solid var(--border-2); border-radius: 50%; color: var(--muted); }
.stepper em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.stepper li.done a, .stepper li.current a { color: var(--text); }
.stepper li.done a::after, .stepper li.current a::after { background: var(--accent-strong); }
.stepper li.done span { background: var(--accent-soft); border-color: var(--accent-text); color: var(--text); }
.stepper li.current span { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.stepper li.current em { color: var(--accent-text); font-weight: 600; }
@media (max-width: 520px) { .stepper li:not(.current) em { display: none; } .stepper li { flex: 0 0 auto; } .stepper li:not(.current) a { min-width: 38px; } .stepper li.current { flex: 1; } }
.who { margin: 0; font-size: .8rem; color: var(--muted); display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.who-email { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.who-edit { flex: none; color: var(--accent-text); }

/* Apparition des vues (animation sur les enfants) */
.fade-in > * { animation: in .35s ease; }

/* Étape 2 : appareils */
.devices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .devices { gap: 14px; } }
.device {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  min-height: 140px; padding: 24px 10px 20px; color: var(--text); text-decoration: none; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
}
@media (min-width: 720px) { .device { min-height: 170px; } }
.device:hover { border-color: var(--accent-text); color: var(--text); }
.device:active { transform: scale(.98); }
.device-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-text); }
.device-icon svg { width: 30px; height: 30px; }
.device-name { font-size: 1rem; line-height: 1.25; }
.device.is-detected { border-color: var(--accent-text); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-text); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-strong); color: var(--on-accent); white-space: nowrap; }
.device .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }

/* Étape 3 : applications */
.apps { display: grid; gap: 12px; }
.app-card {
  position: relative; display: flex; gap: 14px; align-items: center; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.app-card:hover { border-color: var(--accent-text); color: var(--text); }
.app-card.is-recommended { flex-wrap: wrap; align-items: flex-start; border-color: var(--accent-text); background: var(--accent-soft); padding: 26px 18px 18px; box-shadow: 0 0 0 1px var(--accent-text); }
.app-card .badge { position: absolute; top: -12px; left: 18px; }
.app-icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); }
.is-recommended .app-icon { background: var(--surface); }
.app-icon svg { width: 26px; height: 26px; }
.app-body { flex: 1; min-width: 0; }
.app-title { display: block; font-weight: 600; font-size: 1.05rem; }
.app-desc { display: block; font-size: .84rem; color: var(--muted); }
.is-recommended .app-desc { color: var(--muted); }
.app-arrow { flex: none; color: var(--dim); transition: color .2s, transform .2s; }
.app-card:hover .app-arrow, .app-row:hover .app-arrow { color: var(--accent-text); transform: translateX(3px); }
.app-go { flex: 1 1 100%; margin-top: 6px; justify-content: space-between; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.tag svg { width: 12px; height: 12px; color: var(--accent-text); }

.apps-more { margin-top: 28px; }
.apps-more h2 { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.app-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-top-width: 0; background: var(--surface); transition: border-color .2s, background .2s; }
.apps-more h2 + .app-row { border-top-width: 1px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.app-row:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.apps-more h2 + .app-row:last-child { border-radius: var(--radius-sm); }
.app-row:hover { color: var(--text); background: var(--surface-2); }
.app-row-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; color: var(--accent-text); }
.app-row-icon svg { width: 22px; height: 22px; }
.app-row-title { display: block; font-weight: 600; font-size: .95rem; }

.opts { margin-top: 24px; font-size: .84rem; color: var(--muted); }
.opts summary { cursor: pointer; list-style: none; padding: 6px 0; }
.opts summary::-webkit-details-marker { display: none; }
.opts summary strong { color: var(--text); font-weight: 600; }
.opts summary u, .qr-mini summary u { color: var(--accent-text); text-underline-offset: 3px; margin-left: 4px; }
.services { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 10px 0 0; padding: 0; min-width: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--border-2); border-radius: 999px; font-size: .84rem; color: var(--muted); background: var(--surface); transition: all .2s; }
.chip svg { width: 16px; height: 16px; }
.chip input:checked + span { color: var(--text); background: var(--accent-soft); border-color: var(--accent-text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.view-back { margin: 20px 0 0; }
.view-back a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; text-decoration: none; }
.view-back a:hover { color: var(--text); }
.view-back svg { width: 16px; height: 16px; }

/* QR code compact (ordinateur uniquement) */
.qr-mini { margin: 20px 0; font-size: .84rem; color: var(--muted); }
.view-head + .qr-mini { margin-top: 0; }
.qr-mini summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 4px 0; }
.qr-mini summary::-webkit-details-marker { display: none; }
.qr-mini summary svg { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.qr-mini-body { display: flex; align-items: center; gap: 16px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); max-width: 460px; }
.qr-code, .sup-qr-code { position: relative; }
.qr-code { flex: none; width: 112px; height: 112px; padding: 5px; background: var(--qr-bg); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.qr-code svg { width: 100%; height: 100%; }
.qr-mini-body p { margin: 0; font-size: .82rem; }
.qr-mini-body strong { color: var(--text); }
@media (max-width: 719px) { .qr-mini { display: none; } }

/* Étape 4 : guide */
.guide-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.guide-head h1 { font-size: clamp(1.2rem, 4.8vw, 1.5rem); margin: 0; }
.guide-kicker { margin: 0 0 2px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.guide-desc { color: var(--muted); font-size: .88rem; margin: 2px 0 0; }
.callout { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--accent-text); border-radius: var(--radius-sm); background: var(--accent-soft); font-size: .86rem; color: var(--text); margin: 0 0 14px; }
.callout svg { flex: none; width: 20px; height: 20px; color: var(--accent-text); margin-top: 2px; }
.callout p:last-child { margin: 0; }
.callout-warn { border-color: var(--warn-border); border-left-color: var(--warn-border); background: var(--warn-bg); color: var(--warn-text); }
.callout-warn svg { color: var(--warn-text); }

/* Guide : une étape à la fois (progression en haut, Précédent / Suivant en bas, capture à droite) */
.guide-name { margin: 0; font-size: clamp(1.2rem, 4.8vw, 1.5rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.guide-intro { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.container.wide { max-width: 1040px; }
.wide .guide-head, .wide .guide-intro, .wide .callout { max-width: 680px; }
.gcard { overflow: hidden; }
.gprogress { padding: 16px 16px 0; }
.gprogress-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.gprogress-sec { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: .98rem; }
.gprogress-sec svg { width: 18px; height: 18px; flex: none; color: var(--accent-text); }
.gprogress-n { flex: none; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gbar { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.gbar i { display: block; height: 100%; width: var(--pct, 0%); border-radius: 2px; background: var(--accent-strong); transition: width .3s ease; }
.gstage { padding: 20px 16px 22px; }
.gstage.go-next { animation: slide-next .25s ease-out; }
.gstage.go-prev { animation: slide-prev .25s ease-out; }
@keyframes slide-next { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.gbody { display: grid; gap: 18px; min-width: 0; }
.gmain { min-width: 0; }
.gbody:not(.has-shot) .gmain { max-width: 720px; }
.gmain .sub { color: var(--muted); font-size: .86rem; margin: 10px 0 0; }
.gmain a { font-weight: 600; }
.gmain .btn { font-weight: 600; }
.gtext { font-size: 1.1rem; line-height: 1.6; margin: 0 0 6px; overflow-wrap: anywhere; }
.gshot { margin: 0; min-width: 0; }
.gshot-link { display: block; cursor: zoom-in; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--qr-bg); overflow: hidden; }
.gshot img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.gshot figcaption { margin-top: 8px; font-size: .78rem; color: var(--muted); }
.gnav { display: flex; gap: 10px; margin-top: 14px; }
.gnav .btn { flex: 1; justify-content: center; min-height: 48px; }
.gnav .btn-primary { flex: 1.4; }
.gfinish { margin: 14px 0 0; text-align: center; }
@media (min-width: 720px) {
  .gprogress { padding: 20px 28px 0; }
  .gstage { padding: 26px 28px 30px; }
  .gnav { justify-content: space-between; }
  .gnav .btn, .gnav .btn-primary { flex: 0 0 auto; min-width: 150px; }
  .gnav .btn-primary { order: 2; }
}
@media (min-width: 960px) {
  .gbody.has-shot { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: start; }
  .gbody.has-shot .gshot { position: sticky; top: 16px; }
}
@media (max-width: 719px) {
  .gnav { position: sticky; bottom: 0; z-index: 20; margin: 14px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 97%, transparent); border-top: 1px solid var(--border); backdrop-filter: blur(6px); }
}
@media (max-width: 479px) { .gprogress { padding: 14px 12px 0; } .gstage { padding: 18px 12px 20px; } }
.guide-intro { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.gtext { font-size: 1.04rem; line-height: 1.65; margin: 0 0 6px; }
.ui { font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 4px; padding: 0 5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.val { font-family: var(--mono); font-size: .94em; font-weight: 600; color: var(--accent-text); overflow-wrap: anywhere; }

.guide-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 16px 0 0; }

.fields { display: grid; gap: 8px; margin: 14px 0 4px; }
.kv { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 9px 9px 14px; min-width: 0; }
.kv-main { flex: 1; min-width: 0; }
.kv-label { display: block; font-size: .78rem; color: var(--muted); }
.kv-label small { font-size: .72rem; color: var(--accent-text); margin-left: 4px; }
.kv-value { display: block; font-variant-numeric: tabular-nums; font-family: var(--mono); font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; color: var(--text); }
.kv-value.is-secret { font-family: var(--sans); color: var(--muted); font-weight: 400; font-style: italic; }
.kv-value.is-secret::before { content: "•••• "; content: "•••• " / ""; font-style: normal; letter-spacing: .1em; color: var(--dim); }
.copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--surface-solid); color: var(--text); border-radius: var(--radius-sm); padding: 8px 12px; font-size: .8rem; min-height: 40px;
  transition: background .2s, color .2s, border-color .2s;
}
.copy:hover { border-color: var(--accent-text); background: var(--accent-soft); }
.copy svg { width: 15px; height: 15px; color: var(--accent-text); }
.copy.is-done { background: var(--accent-strong); color: var(--on-accent); border-color: var(--accent-strong); }
.copy.is-done svg { color: var(--on-accent); }
.copy-icon { padding: 0; width: 40px; justify-content: center; }
@media (max-width: 479px) { .kv { padding-left: 12px; gap: 8px; } .kv-value { font-size: .84rem; } .copy:not(.copy-icon) { padding: 8px 10px; } }

.download-box { margin: 16px 0 6px; padding: 16px; background: var(--accent-soft); border: 1px solid var(--accent-text); border-radius: var(--radius); }
.download-box .btn { width: 100%; }
.download-meta { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.download-meta strong { color: var(--text); }

/* Écran final */
.done-card { padding: 34px 20px 24px; text-align: center; }
@media (min-width: 720px) { .done-card { padding: 44px 40px 30px; } }
.done-icon {
  position: relative; width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent);
  background: var(--accent-soft);
}
.done-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--accent-strong); }
.done-icon svg { position: relative; z-index: 1; width: 26px; height: 26px; }
.done-card h1 { font-size: clamp(1.45rem, 6vw, 1.9rem); margin-bottom: .35em; }
.done-lead { color: var(--muted); margin: 0 auto 24px; max-width: 30em; }
.next-card { text-align: left; padding: 16px; border: 1px solid var(--accent-text); border-radius: var(--radius); background: var(--accent-soft); margin-bottom: 14px; }
.next-card p { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }
.next-card strong { color: var(--text); }
.done-actions { display: grid; gap: 8px; justify-items: center; }
.tips { text-align: left; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; font-size: .84rem; color: var(--muted); }
.tips summary { cursor: pointer; color: var(--text); padding: 4px 0; }
.tips summary::marker { color: var(--accent-text); }
.tips ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.tips li::marker { color: var(--accent-text); }

/* ===== Panneaux (paramètres, aide) ===== */
.panel {
  padding: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--sans);
  width: min(560px, calc(100% - 24px)); max-height: min(86vh, 860px); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); overflow: hidden;
}
.panel[open] { display: flex; flex-direction: column; animation: in .2s ease both; }
.panel::backdrop { background: var(--overlay); }
@media (max-width: 599px) {
  .panel { width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0; border-bottom: 0; border-left: 0; border-right: 0; border-radius: var(--radius) var(--radius) 0 0; }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--border); flex: none; }
.panel-head h2 { font-size: 1.1rem; margin: 0; }
.panel-close { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: none; color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.panel-close:hover { border-color: var(--accent-text); background: var(--accent-soft); }
.panel-close svg { width: 18px; height: 18px; }
.panel-body { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.panel-lead { color: var(--muted); font-size: .84rem; margin-bottom: 16px; }
.panel-foot { margin: 16px 0 0; font-size: .86rem; }

.params { display: grid; gap: 18px; }
.pgroup h3 { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 0 0 6px; }
.pgroup h3 svg { width: 18px; height: 18px; color: var(--accent-text); }
.pgroup h3 small { font-size: .75rem; color: var(--muted); font-weight: 400; }
.pgroup .kv { border-width: 0 0 1px; border-radius: 0; background: none; padding: 6px 0; }
.pgroup .kv:last-child { border-bottom: 0; }
.kv-compact .kv-main { display: flex; align-items: baseline; gap: 10px; }
.kv-compact .kv-label { flex: 0 0 130px; font-size: .74rem; }
.kv-compact .kv-value { font-size: .86rem; min-width: 0; }
.kv-compact .copy-icon { width: 40px; min-height: 40px; height: 40px; }
@media (max-width: 420px) { .kv-compact .kv-main { display: block; } }

.support-box { padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.support-box p { color: var(--muted); font-size: .86rem; margin: 0 0 10px; }
.support-lines { display: grid; gap: 8px; }
@media (min-width: 520px) { .support-lines { grid-template-columns: 1fr 1fr; } }
.support-line { display: flex; align-items: center; gap: 10px; color: var(--text); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .88rem; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); min-height: 48px; transition: border-color .2s, background .2s; }
.support-line:hover { color: var(--text); border-color: var(--accent-text); background: var(--accent-soft); }
.support-line svg { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.support-box .support-hours, .support-box .support-address { margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
.support-address { color: var(--muted); }
.faq-title { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 13px 32px 13px 0; font-weight: 600; font-size: .9rem; position: relative; }
.faq summary:hover { color: var(--accent-text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-body { padding: 0 0 6px; color: var(--muted); font-size: .86rem; }
.faq-body strong { color: var(--text); }

/* ===== Pied de page (une ligne, compact) ===== */
.site-footer { flex: none; border-top: 1px solid var(--border); background: var(--surface); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .8rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
.footer-inner > span { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 20px; min-height: 28px; }
.footer-org { color: var(--text); font-weight: 600; }
.footer-org:empty { display: none; }
.footer-contact { gap: 0 20px; }
.footer-contact:not(:has(a:not([hidden]))) { display: none; }
.site-footer a { color: var(--muted); text-decoration: none; gap: 7px; }
.site-footer a svg { width: 15px; height: 15px; flex: none; color: var(--dim); transition: color .2s; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer a:hover svg { color: var(--accent-text); }
.footer-note { color: var(--dim); }
@media (min-width: 760px) {
  .footer-inner { flex-direction: row; justify-content: flex-start; gap: 0 24px; text-align: left; }
  .footer-inner > .footer-contact { flex: 1; justify-content: flex-start; }
  .footer-inner > span { min-height: 40px; }
  .footer-org + .footer-contact::before { content: ""; width: 1px; height: 16px; background: var(--border-2); margin-right: 4px; }
  .footer-note { margin-left: auto; }
}

/* ===== Divers ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: .88rem; padding: 12px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); transition: opacity .2s, transform .2s; z-index: 80; max-width: calc(100% - 32px); overflow-wrap: anywhere;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 18px; margin: 24px 0; }
.fade-in { animation: fade .3s ease; }
/* Opacité seule sur .view. */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sr-copy { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }

.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 24px; }
.notfound img { height: 44px; width: auto; margin-bottom: 18px; }
.notfound .brand-mark { width: 48px; height: 48px; margin: 0 auto 18px; border-radius: var(--radius); }
.notfound .brand-mark svg { width: 26px; height: 26px; }
.notfound p { color: var(--muted); }

/* ===== Captures d'écran (discrètes, dépliables) ===== */

/* ===== Cibles tactiles : 40 px au minimum ===== */
.link-btn, .link-plain, .nav-link, .view-back a, .who-edit,
.opts summary, .qr-mini summary, .guide-links a,
.site-footer a, .chip span, .stepper a { display: inline-flex; align-items: center; min-height: 40px; }
.stepper a { display: flex; }
.chip span { display: inline-flex; }
/* .tips garde sa puce native (list-item) ; .opts reste en bloc pour conserver les espaces entre texte, gras et lien. */
.tips summary { display: list-item; min-height: 40px; padding: 9px 0; }
.opts summary { display: block; min-height: 40px; padding: 9px 0; }

/* ===== Logos de marque (couleurs officielles ; Apple suit la couleur du texte). Thème sombre par défaut. ===== */
.brand { color: var(--text); }
.brand.b-win, .brand.b-outlook, .brand.b-tb { color: #3d9bff; }
.brand.b-android { color: #3DDC84; }
.brand.b-gmail { color: #EA4335; }
.brand.b-samsung { color: #7d95ff; }
@media (prefers-color-scheme: light) {
  .brand.b-win, .brand.b-outlook { color: #0078D4; }
  .brand.b-tb { color: #0A84FF; }
  .brand.b-samsung { color: #1428A0; }
}
.device-icon svg.brand { width: 32px; height: 32px; }
.app-icon svg.brand { width: 28px; height: 28px; }
.app-row-icon svg.brand { width: 24px; height: 24px; }
svg.brand.b-wide { width: 42px; height: auto; }
.app-icon svg.brand.b-wide { width: 40px; }
.app-row-icon svg.brand.b-wide { width: 32px; }
