/* =============================================================================
   AMPIRELINK — base : identité AMPIRE (commune avec AMPIRE ACCOUNT)
   Design « Everything. Connected. » : nuit profonde, ciel étoilé, rayon lumineux en diagonale,
   titres Archivo Black en majuscules, texte Inter, accent bleu ciel.
   Thème sombre par défaut, thème clair via [data-theme="light"] (bouton de thème, mémorisé).
   ============================================================================= */
:root {
  --bg: #04070d; --sky-a: #0e3a57; --sky-b: rgba(14, 165, 233, .10); --panel: #0a111d;
  --surface: rgba(255, 255, 255, .045); --surface-2: rgba(255, 255, 255, .075); --surface-3: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .18);
  --txt: #f1f5f9; --txt-2: #cbd5e1; --muted: #8b9ab0;
  --accent: #38bdf8; --accent-2: #0ea5e9; --ink: #03121f; --glow: rgba(56, 189, 248, .45); --accent-soft: rgba(56, 189, 248, .12);
  --accent-line: rgba(56, 189, 248, .25);
  --input: rgba(255, 255, 255, .05); --track: rgba(0, 0, 0, .55);
  --ok: #22c55e; --ok-bg: rgba(34, 197, 94, .13); --bad: #f87171; --bad-bg: rgba(248, 113, 113, .13);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .12);
  --shadow: 0 30px 80px -24px rgba(0, 0, 0, .7);
  --side: rgba(4, 7, 13, .78);
  --star: 1;
  --display: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 24px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #eaf2f9; --sky-a: #c9e8fb; --sky-b: rgba(14, 165, 233, .12); --panel: #ffffff;
  --surface: rgba(255, 255, 255, .78); --surface-2: rgba(255, 255, 255, .95); --surface-3: #e7eef6;
  --line: rgba(10, 25, 45, .09); --line-2: rgba(10, 25, 45, .18);
  --txt: #08111f; --txt-2: #2b3a4f; --muted: #5f6f84;
  --accent: #0ea5e9; --accent-2: #0284c7; --ink: #ffffff; --glow: rgba(14, 165, 233, .35); --accent-soft: rgba(14, 165, 233, .1);
  --accent-line: rgba(14, 165, 233, .3);
  --input: #ffffff; --track: rgba(10, 25, 45, .07);
  --ok: #16a34a; --ok-bg: #e5f7ec; --bad: #dc2626; --bad-bg: #fdecec; --warn: #b45309; --warn-bg: #fef3c7;
  --shadow: 0 24px 60px -28px rgba(15, 40, 80, .3);
  --side: rgba(255, 255, 255, .82);
  --star: 0;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--txt);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
  transition: background .3s; isolation: isolate;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--ink); }
[hidden] { display: none !important; }
.icon { flex: none; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 1000;
  background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
.skip-link:focus { top: 12px; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Ciel : halo, étoiles, rayon en diagonale ---- */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 65% at 25% -5%, var(--sky-a) 0%, transparent 62%), radial-gradient(70% 55% at 100% 100%, var(--sky-b), transparent 65%);
}
.sky svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.beam { stroke-width: 1.4; }
.beam-glow { stroke-width: 7; opacity: .10; }
.beam-s0 { stop-color: var(--accent); stop-opacity: 0; }
.beam-s1 { stop-color: var(--accent); stop-opacity: .75; }
.beam-s2 { stop-color: var(--accent); stop-opacity: .55; }
[data-theme="light"] .beam { opacity: .55; }
.star { position: absolute; border-radius: 50%; background: #fff; opacity: calc(var(--o) * var(--star)); animation: tw var(--d) ease-in-out infinite; animation-delay: var(--l); }
@keyframes tw { 50% { opacity: calc(var(--o) * .2 * var(--star)); } }

/* ---- Thèmes photo (bleu, or, rose) : accueil, connexion, inscription ----
   Seuls l'arrière-plan et la couleur d'accent changent ; la mise en page reste identique.
   Le logo AMPIRELINK suit la couleur choisie (« LINK » bleu, or ou rose ; « AMPIRE » reste blanc argenté). */
.fond-theme { background: #04070d; }
[data-theme="light"] .fond-theme { background: #eaf2f9; }
.fond-ampire {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  --img: url("../img/fonds/bleu-horizontal.jpg");
  --voile: linear-gradient(90deg, rgba(4, 7, 13, .66) 0%, rgba(4, 7, 13, .5) 45%, rgba(4, 7, 13, .3) 100%);
  background: #04070d;
}
.fond-ampire::before, .fond-ampire::after { content: ""; position: absolute; inset: 0; }
.fond-ampire::before { background: var(--img) center / cover no-repeat; }
.fond-ampire::after { background: var(--voile); }
/* Mode clair : la même image, inversée en version claire (fond blanc, vagues de la couleur choisie) */
[data-theme="light"] .fond-ampire { background: #f4f8fc; }
[data-theme="light"] .fond-ampire::before { filter: invert(1) hue-rotate(180deg) saturate(1.25) brightness(1.04); }
[data-couleur="or"] .fond-ampire, [data-couleur="rose"] .fond-ampire {   /* photos plus lumineuses : voile un peu plus dense */
  --voile: linear-gradient(90deg, rgba(4, 7, 13, .74) 0%, rgba(4, 7, 13, .58) 45%, rgba(4, 7, 13, .36) 100%);
}
[data-couleur="or"] .fond-ampire { --img: url("../img/fonds/or-horizontal.jpg"); }
[data-couleur="rose"] .fond-ampire { --img: url("../img/fonds/rose-horizontal.jpg"); }
@media (orientation: portrait) {
  .fond-ampire { --img: url("../img/fonds/bleu-vertical.jpg"); --voile: radial-gradient(140% 70% at 50% 50%, rgba(4, 7, 13, .62), rgba(4, 7, 13, .38)); }
  [data-couleur="or"] .fond-ampire, [data-couleur="rose"] .fond-ampire { --voile: radial-gradient(140% 70% at 50% 50%, rgba(4, 7, 13, .7), rgba(4, 7, 13, .45)); }
  [data-couleur="or"] .fond-ampire { --img: url("../img/fonds/or-vertical.jpg"); }
  [data-couleur="rose"] .fond-ampire { --img: url("../img/fonds/rose-vertical.jpg"); }
}
[data-theme="light"] .fond-ampire, [data-theme="light"][data-couleur] .fond-ampire { --voile: radial-gradient(130% 80% at 40% 50%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12)); }

[data-couleur="or"] .fond-theme {
  --accent: #f5b942; --accent-2: #d98c10; --ink: #1d1203; --glow: rgba(245, 185, 66, .45);
  --accent-soft: rgba(245, 185, 66, .13); --accent-line: rgba(245, 185, 66, .3);
}
[data-couleur="rose"] .fond-theme {
  --accent: #ff5cb8; --accent-2: #e11d8a; --ink: #22030f; --glow: rgba(255, 92, 184, .45);
  --accent-soft: rgba(255, 92, 184, .13); --accent-line: rgba(255, 92, 184, .3);
}
[data-theme="light"][data-couleur="or"] .fond-theme {
  --accent: #a16207; --accent-2: #854d0e; --ink: #ffffff; --glow: rgba(202, 138, 4, .3);
  --accent-soft: rgba(202, 138, 4, .1); --accent-line: rgba(161, 98, 7, .3);
}
[data-theme="light"][data-couleur="rose"] .fond-theme {
  --accent: #be185d; --accent-2: #9d174d; --ink: #ffffff; --glow: rgba(219, 39, 119, .3);
  --accent-soft: rgba(219, 39, 119, .1); --accent-line: rgba(190, 24, 93, .3);
}
/* le logo ne change pas de couleur */
.fond-theme .logo { --accent: #38bdf8; --glow: rgba(56, 189, 248, .45); }
[data-theme="light"] .fond-theme .logo { --accent: #0ea5e9; --glow: rgba(14, 165, 233, .35); }
/* verre un peu plus opaque sur la photo : textes et champs restent lisibles */
.fond-theme .glass { background: rgba(6, 10, 18, .55); }
[data-theme="light"] .fond-theme .glass { background: rgba(255, 255, 255, .82); }
.fond-theme .chip { background: rgba(6, 10, 18, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
[data-theme="light"] .fond-theme .chip { background: rgba(255, 255, 255, .75); }
.fond-theme .hero h1, .fond-theme .hero .caps, .fond-theme .hero-hint, .fond-theme .eyebrow { text-shadow: 0 1px 14px rgba(0, 0, 0, .55); }
[data-theme="light"] .fond-theme .hero h1, [data-theme="light"] .fond-theme .hero .caps,
[data-theme="light"] .fond-theme .hero-hint, [data-theme="light"] .fond-theme .eyebrow { text-shadow: none; }

/* ---- Sélecteur de couleur : trois pastilles ---- */
.couleurs { display: inline-flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.couleur {
  position: relative; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent;
  background-clip: padding-box; transition: transform .2s, box-shadow .2s;
}
.couleur::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; } /* zone tactile 44 px */
.couleur.c-bleu { background-image: linear-gradient(135deg, #7dd3fc, #2563eb); }
.couleur.c-or { background-image: linear-gradient(135deg, #fde68a, #d97706); }
.couleur.c-rose { background-image: linear-gradient(135deg, #f9a8d4, #db2777); }
.couleur:hover { transform: scale(1.1); }
.couleur[aria-pressed="true"] { border-color: var(--txt); box-shadow: 0 0 0 2px var(--accent-line), 0 0 16px -2px var(--glow); }
@media (max-width: 360px) {
  .couleurs { gap: 4px; padding: 4px; }
  .couleur { width: 22px; height: 22px; }
  .couleur::after { inset: -6px; }
}

/* ---- Typographie ---- */
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .98; letter-spacing: -.005em; }
.hl { color: var(--accent); text-shadow: 0 0 36px var(--glow); font-style: normal; }
.eyebrow { margin: 0; font-size: 12.5px; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; color: var(--txt-2); }
.eyebrow.hl { color: var(--accent); font-weight: 700; letter-spacing: .24em; text-shadow: none; }
.caps { text-transform: uppercase; letter-spacing: .07em; line-height: 1.75; color: var(--txt-2); }
.muted { color: var(--muted); }
.display.two span { display: block; white-space: nowrap; }
.display.two i { font-style: normal; }
.grad { color: var(--accent); text-shadow: 0 0 36px var(--glow); }

/* ---- Logo (identique à AMPIRE ACCOUNT) ---- */
.logo {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  font-family: var(--display); font-size: 24px; line-height: 1; text-transform: uppercase;
  color: var(--txt); white-space: nowrap; letter-spacing: .005em; text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--txt); }
.logo { flex-direction: row; align-items: center; gap: .42em; }
.logo-mark { width: 1.75em; height: 1.75em; flex: none; filter: drop-shadow(0 0 10px rgba(56, 189, 248, .35)); }
.logo-txt { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: .84; }
.logo em { font-style: normal; color: var(--accent); }
.logo-txt::after { content: ""; align-self: stretch; height: 4px; border-radius: 4px; background: var(--accent); margin-top: 3px; box-shadow: 0 0 16px var(--glow); }
.logo.sm { font-size: 19px; }
/* Logotype PNG : même largeur que l'ancien logo texte (7,1 em), proportions d'origine (768 × 96).
   Une seule image est téléchargée : celle du thème affiché. */
.logo-img {
  display: block; flex: none; width: 7.1em; height: auto; aspect-ratio: 8 / 1;
  background: url("../img/logo/ampirelink-bleu.png") left center / contain no-repeat;
}
[data-couleur="or"] .logo-img { background-image: url("../img/logo/ampirelink-or.png"); }
[data-couleur="rose"] .logo-img { background-image: url("../img/logo/ampirelink-rose.png"); }
/* mode clair : léger contour sombre pour que « AMPIRE » (blanc argenté) reste lisible sur fond clair */
[data-theme="light"] .logo-img { filter: drop-shadow(0 0 .6px rgba(8, 17, 31, .95)) drop-shadow(0 1px 2px rgba(8, 17, 31, .45)); }
.logo.sm .logo-txt::after { height: 3px; margin-top: 2px; }

/* ---- Boutons ---- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; letter-spacing: .02em; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s, opacity .2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--ink);
  box-shadow: 0 14px 34px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { color: var(--ink); box-shadow: 0 18px 44px -10px var(--glow); transform: translateY(-1px); }
.btn-outline, .btn-ghost { border-color: var(--line-2); color: var(--txt); background: transparent; }
.btn-outline:hover, .btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); color: var(--txt); }
.btn-soft { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: rgba(248, 113, 113, .3); }
.btn-danger:hover { background: rgba(248, 113, 113, .22); color: var(--bad); }
.btn-caps { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: 13.5px; }
.btn-xl { min-height: 60px; padding: 0 32px; font-size: 14.5px; }
.btn-sm { min-height: 38px; padding: 0 15px; font-size: 13px; }
.btn-block { width: 100%; min-height: 52px; border-radius: 16px; font-size: 15.5px; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 46px; height: 46px; border-radius: 15px; display: inline-grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--txt-2);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: .2s; text-decoration: none;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--txt); text-decoration: none; }
.icon-btn:disabled { opacity: .6; }
.theme-ico { display: grid; place-items: center; min-width: 20px; min-height: 20px; }
.langues {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px; height: 46px; border-radius: 15px; flex: none;
  background: var(--surface); border: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.langues a {
  display: inline-grid; place-items: center; min-width: 34px; height: 36px; padding: 0 6px; border-radius: 11px;
  font: 800 12px/1 var(--body); letter-spacing: .06em; color: var(--muted); text-decoration: none; transition: .2s;
}
.langues a:hover { color: var(--txt); text-decoration: none; }
.langues a.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
@media (max-width: 420px) { .langues { height: 42px; padding: 3px; } .langues a { min-width: 30px; height: 34px; font-size: 11px; } }
.btn-icon {
  width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  display: inline-grid; place-items: center; transition: background .15s, color .15s, border-color .15s;
}
.btn-icon:hover { background: var(--surface-2); color: var(--txt); border-color: var(--line-2); }
.btn-icon.danger:hover { background: var(--bad-bg); color: var(--bad); border-color: rgba(248, 113, 113, .4); }

/* ---- Verre ---- */
.glass {
  background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow);
}

/* ---- Barre du haut (accueil, identification, pages d'information) ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 26px; padding-bottom: 26px; position: relative; z-index: 5; }
.topnav { display: flex; align-items: center; gap: 34px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.topnav a { color: var(--muted); white-space: nowrap; }
.topnav a:hover { color: var(--txt); text-decoration: none; }
.top-r { display: flex; align-items: center; gap: 12px; }
.top-r .btn { min-height: 48px; }
.top-r .btn-sm { min-height: 46px; padding: 0 18px; }

/* ---- Pastilles ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--txt);
}
.chip i { font-style: normal; color: var(--accent); }

/* ---- Pied de page ---- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 34px; padding-bottom: 44px; color: var(--muted); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--txt); text-decoration: none; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.back:hover { color: var(--txt); text-decoration: none; }

/* ---- Formulaires ---- */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-bottom: 16px; }
.field > label, .label { font-weight: 600; font-size: 14px; color: var(--txt-2); }
.field .hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 12px 16px;
  background: var(--input); border: 1px solid var(--line); border-radius: 16px;
  color: var(--txt); font-size: 16px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 23px, calc(100% - 17px) 23px; background-size: 5px 5px; background-repeat: no-repeat;
}
.select option { background: var(--panel); color: var(--txt); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .75; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input[type=password] { letter-spacing: .12em; }
.input[type=password]:placeholder-shown { letter-spacing: normal; }
.field.has-error .input, .field.has-error .textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 13.5px; font-weight: 600; margin: 0; line-height: 1.45; }
.field-error:empty { display: none; }
.field-ok { color: var(--ok); font-size: 13.5px; font-weight: 600; margin: 0; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin: 0; }
.counter.over { color: var(--bad); }

.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center;
}
.pw-toggle:hover { color: var(--txt); background: var(--surface-2); }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--txt-2); cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; flex: none;
  border: 1.5px solid var(--line-2); background: var(--input); display: grid; place-items: center; cursor: pointer; transition: .15s;
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 5px; height: 10px; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check a { font-weight: 600; text-decoration: underline; }

.form-alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 16px;
  border-radius: 16px; font-size: 14px; font-weight: 600; line-height: 1.45; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--txt);
}
.form-alert.err { background: var(--bad-bg); border-color: rgba(248, 113, 113, .35); }
.form-alert.err .icon { color: var(--bad); }
.form-alert.ok { background: var(--ok-bg); border-color: rgba(34, 197, 94, .35); }
.form-alert.ok .icon { color: var(--ok); }
.form-alert.info { background: var(--accent-soft); border-color: var(--accent-line); }
.form-alert.info .icon { color: var(--accent); }
.form-alert .icon { margin-top: 1px; }

/* Champ avec icône à gauche (connexion, inscription) */
.ifield { position: relative; }
.ifield .input { padding-left: 46px; }
.ifield-ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); display: flex; color: var(--muted); pointer-events: none; }
.ifield:focus-within .ifield-ic { color: var(--accent); }
.addr-field .ifield-ic { position: static; transform: none; margin-right: 10px; }
.addr-field:focus-within .ifield-ic { color: var(--accent); }

/* Champ d'adresse « domaine/ma-page » (inscription, réglages) */
.addr-field {
  display: flex; align-items: center; min-height: 52px; padding: 0 6px 0 16px;
  background: var(--input); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, box-shadow .2s;
}
.addr-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.has-error .addr-field { border-color: var(--bad); }
.addr-prefix { color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.addr-field input { flex: 1; min-width: 0; min-height: 50px; background: none; border: 0; outline: 0; padding: 0 10px 0 2px; font-weight: 700; font-size: 16px; color: var(--txt); }
.addr-field input::placeholder { color: var(--muted); font-weight: 500; opacity: .75; }

/* Interrupteur (lien visible / masqué) */
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--line); transition: .25s; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .25s;
}
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px -4px var(--glow); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Messages courts */
.toast-host {
  position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 300; display: grid; gap: 8px; justify-items: center; width: min(92vw, 440px); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 13px 18px; border-radius: 16px;
  background: var(--panel); color: var(--txt); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-weight: 600; font-size: 14px; animation: toast-in .25s ease-out;
}
.toast .icon { flex: none; color: var(--ok); }
.toast.err .icon { color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Pages d'erreur (404, 503…) */
.error-body { min-height: 100vh; }
.error-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; padding: 40px var(--gutter); }
.error-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 560px; }
.error-card { width: 100%; max-width: 560px; border-radius: 30px; padding: 38px 34px; text-align: center; }
.error-code { margin: 14px 0 8px; font-size: clamp(64px, 14vw, 104px); line-height: 1; color: var(--accent); text-shadow: 0 0 46px var(--glow); }
.error-card h1 { margin: 0 0 12px; font-size: clamp(22px, 4vw, 30px); line-height: 1.05; }
.error-card p:not(.eyebrow):not(.error-code) { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

.show-s { display: none !important; }
@media (max-width: 1200px) {
  .topnav { display: none !important; }
}
@media (max-width: 1000px) {
  .hide-m { display: none !important; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .topbar { padding-top: 20px; padding-bottom: 20px; }
  .logo { font-size: 19px; }
  .logo-txt::after { height: 3px; margin-top: 2px; }
  .top-r { gap: 8px; }
  .top-r .btn { min-height: 42px; padding: 0 16px; font-size: 12px; }
  .hide-s { display: none !important; }
  .show-s { display: inline-flex !important; }
  .eyebrow { letter-spacing: .24em; font-size: 11.5px; }
  .chips { gap: 8px; }
  .chip { font-size: 11px; padding: 8px 13px; }
  .foot { flex-direction: column; }
  .error-card { padding: 28px 22px; border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
