/* ==========================================================================
   Traject — design "Ink & Lime"
   Surfaces très arrondies, noir profond + un seul accent vert-citron.
   Aucune police externe : pile système (compatible CSP, aucun appel tiers).
   ========================================================================== */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ink: #0e1013;
  --ink-2: #1a1d23;
  --ink-3: #272b33;
  --lime: #cffb3a;
  --canvas: #eceef1;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --text: #0e1013;
  --muted: #5b616b;
  --border: rgba(14, 16, 19, .08);
  --field-border: rgba(14, 16, 19, .16);
  --good: #2f5a00;
  --good-soft: #e7f8d0;
  --bad: #9b2217;
  --bad-soft: #fde4e1;

  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --shadow-sm: 0 1px 2px rgba(14, 16, 19, .05);
  --shadow: 0 1px 2px rgba(14, 16, 19, .04), 0 16px 40px rgba(14, 16, 19, .06);
  --shadow-lg: 0 40px 100px rgba(14, 16, 19, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --green: var(--ink);
  font-family: var(--font);
  color: var(--text);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .stat strong { font-family: var(--font-display); }
h1 { font-size: 40px; letter-spacing: -.045em; font-weight: 700; line-height: 1.05; margin-bottom: 12px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
p { line-height: 1.6; }
small { font-size: 12px; color: var(--muted); font-weight: 400; }
::selection { background: var(--lime); color: var(--ink); }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Boutons ---------- */
button, .button {
  display: inline-block;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  padding: 0 24px; min-height: 46px; line-height: 46px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background .18s, box-shadow .18s;
}
button:hover, .button:hover { transform: translateY(-1px); background: var(--ink-3); }
button:active, .button:active { transform: scale(.97); }
button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.secondary { background: var(--surface-2); color: var(--ink); line-height: 46px; }
.secondary:hover { background: #e6e8ec; }
.text-button { background: none; color: var(--ink); padding: 0 4px; min-height: 40px; line-height: 40px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(14,16,19,.3); }
.text-button:hover { background: none; transform: none; text-decoration-color: var(--ink); }
.icon-button { padding: 0; width: 44px; min-height: 44px; height: 44px; line-height: 1; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-size: 22px; border-radius: 50%; }
.icon-button:hover { background: #e6e8ec; }

/* Bouton principal avec pastille verte */
header > button, .login form > button, .actions button:not(.secondary), .dialog-footer > button:not(.secondary):not(.text-button) {
  display: inline-flex; align-items: center; gap: 12px;
}
header > button::after, .login form > button::after {
  content: "+"; display: grid; place-items: center;
  width: 36px; height: 36px; margin: 5px -14px 5px 0; border-radius: 50%;
  background: var(--lime); color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1;
}
.login form > button::after { content: "→"; }
.login form > button { justify-content: space-between; width: 100%; padding: 0 8px 0 28px; min-height: 58px; font-size: 16px; }

/* ---------- Champs ---------- */
input, textarea, select {
  width: 100%; border: 1.5px solid var(--field-border); border-radius: var(--r);
  background: #fff; padding: 14px 16px; font-size: 15px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(207, 251, 58, .45); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--ink); }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
label small { line-height: 1.5; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 272px 1fr; gap: 16px; padding: 16px; min-height: 100vh; }
aside {
  background: var(--ink); color: #fff; border-radius: var(--r-xl);
  padding: 26px 16px 18px; position: sticky; top: 16px; height: calc(100vh - 32px);
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -.03em; padding: 0 10px; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--lime); color: var(--ink); font-size: 22px; font-weight: 700; }
.workspace-label, .eyebrow { font-size: 12px; letter-spacing: .1em; font-weight: 600; color: var(--muted); text-transform: uppercase; }
aside .workspace-label { margin: 34px 14px 10px; color: #8a919c; }
.nav {
  display: block; width: 100%; text-align: left; line-height: 50px; min-height: 50px;
  background: none; color: #b6bcc6; border-radius: 18px; margin-bottom: 4px; font-weight: 500; font-size: 15px; padding: 0 18px;
}
.nav:hover { background: var(--ink-2); color: #fff; transform: none; }
.nav.active { background: #fff; color: var(--ink); font-weight: 600; }
.aside-bottom { margin-top: auto; background: var(--ink-2); border-radius: 24px; padding: 16px; font-size: 13px; line-height: 1.7; color: #a3aab5; }
.aside-bottom small { color: #8a919c; margin-left: 6px; }
.aside-bottom .nav { margin: 10px 0 0; background: var(--ink-3); color: #fff; text-align: center; line-height: 44px; min-height: 44px; font-size: 14px; border-radius: 14px; padding: 0; }
.aside-bottom .nav:hover { background: #343944; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); margin-right: 8px; box-shadow: 0 0 0 4px rgba(207, 251, 58, .18); }

.main { padding: 22px 2.4vw 0; min-width: 0; max-width: 1600px; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; gap: 20px; flex-wrap: wrap; }
header .eyebrow { margin-bottom: 10px; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 14px; }
header h1 { margin: 0; font-size: 44px; }
header p { font-size: 16px; color: var(--muted); margin: 8px 0 0; }

/* ---------- Statistiques (bento) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 40px; }
.stat {
  background: var(--surface); padding: 24px; border-radius: var(--r-xl);
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 170px; box-shadow: var(--shadow);
}
.stat > span { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat strong { font-size: 40px; font-weight: 700; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat small { font-size: 12px; }
.stat:first-child { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.stat:first-child > span, .stat:first-child small { color: #a3aab5; }
.stat:first-child strong { color: var(--lime); }
.stat:first-child::after { content: ""; position: absolute; right: -40px; bottom: -50px; width: 150px; height: 150px; border-radius: 50%; border: 26px solid var(--ink-3); }

.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 26px; }
.section-heading > span { font-size: 14px; color: var(--muted); }

/* ---------- Cartes de sites ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.site-card { border-radius: var(--r-xl); padding: 12px; background: var(--surface); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.site-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(14,16,19,.05), 0 24px 54px rgba(14,16,19,.1); }
.site-cover { height: 176px; padding: 20px 22px; border-radius: 24px; background: #f4e8d4; color: #3d2814; overflow: hidden; position: relative; }
.site-cover::after { content: ""; position: absolute; right: -26px; top: 36px; width: 110px; height: 110px; border-radius: 50%; background: #e9b98a; }
.site-cover.agency { background: #14122e; color: #f1efff; }
.site-cover.agency::after { right: -30px; top: -30px; width: 130px; height: 130px; background: #3a2c8f; }
.site-cover.minimal { background: #e6eeff; color: #17305f; }
.site-cover.minimal::after { right: 16px; top: auto; bottom: -34px; width: 100px; height: 100px; border-radius: 28px; background: #c3d5ff; transform: rotate(18deg); }
.mini-nav { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; display: flex; justify-content: space-between; font-weight: 600; position: relative; z-index: 1; }
.mini-nav span { font-size: 6px; letter-spacing: 2px; }
.mini-heading { font-family: var(--serif); font-size: 29px; max-width: 220px; margin: 22px 0 14px; line-height: 1.03; max-height: 62px; overflow: hidden; position: relative; z-index: 1; }
.agency .mini-heading, .minimal .mini-heading { font-family: var(--font-display); font-weight: 700; letter-spacing: -.05em; }
.mini-lines { height: 4px; border-radius: 4px; background: currentColor; opacity: .16; width: 60%; margin-bottom: 6px; position: relative; z-index: 1; }
.mini-button { font-size: 10px; display: inline-block; margin-top: 10px; background: #b4532a; color: #fff; border-radius: 99px; padding: 6px 14px; font-weight: 600; position: relative; z-index: 1; }
.agency .mini-button { background: #8b7cff; color: #14122e; }
.minimal .mini-button { background: #1d4ed8; }
.card-body { padding: 18px 12px 8px; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title h3 { font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 6px 12px; background: var(--surface-2); color: #4a505a; white-space: nowrap; }
.badge.live { color: var(--good); background: var(--good-soft); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.domain { font-size: 14px; color: var(--muted); margin: 4px 0 20px; overflow-wrap: anywhere; }
.card-metrics { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 18px; gap: 8px; }
.card-metrics strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); margin-bottom: 2px; }
.card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 8px; }

.empty { grid-column: 1/-1; text-align: center; border: 2px dashed rgba(14,16,19,.18); border-radius: var(--r-xl); padding: 70px 20px; background: rgba(255,255,255,.5); }
.empty-symbol { display: grid; place-items: center; margin: 0 auto 22px; width: 64px; height: 64px; border-radius: 22px; background: var(--ink); color: var(--lime); font-size: 28px; }
.empty h2 { font-size: 26px; }
.empty p { font-size: 15px; color: var(--muted); margin-bottom: 24px; }

footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 22px 0; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); gap: 8px; flex-wrap: wrap; }

/* ---------- Messages ---------- */
.notice { padding: 14px 18px; border-radius: var(--r); background: var(--good-soft); font-size: 14px; color: var(--good); margin-bottom: 20px; font-weight: 500; }
.error { color: var(--bad); font-size: 13px; }
.notice.error { background: var(--bad-soft); color: var(--bad); }
.muted { font-size: 13px; color: var(--muted); }

/* ---------- Dialog (sheet) ---------- */
dialog { padding: 0; border: 0; border-radius: var(--r-xl); width: 780px; max-width: calc(100vw - 24px); max-height: 92vh; box-shadow: var(--shadow-lg); background: var(--surface-2); color: var(--ink); }
dialog[open] { animation: sheet .35s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
dialog::backdrop { background: rgba(14, 16, 19, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dialog-header, .dialog-footer { padding: 22px 30px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; }
.dialog-header { border-bottom: 1px solid var(--border); }
.dialog-header h2 { font-size: 26px; margin: 6px 0 0; }
.form-content { padding: 28px 30px; }
.form-content h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border-top: 1px solid var(--border); padding-top: 26px; margin: 16px 0 24px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.theme-choice { background: #fff; border: 0; outline: 2px solid transparent; padding: 16px; cursor: pointer; border-radius: var(--r); position: relative; transition: outline-color .15s, transform .15s var(--ease); }
.theme-choice:hover { transform: translateY(-1px); }
.theme-choice:has(:checked) { outline: 3px solid var(--ink); }
.theme-choice input { position: absolute; right: 12px; top: 14px; }
.theme-choice span { font-size: 16px; font-weight: 700; margin: 8px 0 4px; font-family: var(--font-display); }
.theme-choice small { font-size: 11px; }
.toggle { flex-direction: row; align-items: center; flex-wrap: wrap; font-weight: 450; line-height: 1.5; }
.toggle small { width: 100%; margin-left: 24px; }
.dialog-footer { position: sticky; bottom: 0; border-top: 1px solid var(--border); justify-content: flex-end; gap: 10px; }
.hint { font-size: 14px; color: var(--good); background: var(--good-soft); padding: 14px 16px; border-radius: var(--r); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: var(--mono); font-size: 12px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow: auto; background: var(--surface); border-radius: var(--r-xl); padding: 10px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { font-weight: 600; color: var(--muted); padding: 16px 18px; font-size: 13px; }
td { padding: 17px 18px; border-top: 1px solid var(--border); }
td small { display: block; margin-top: 6px; max-width: 240px; }
.mono { font-family: var(--mono); font-size: 12px; }
.empty-row { text-align: center; padding: 50px; color: var(--muted); }

/* ---------- Connexion ---------- */
.login-split { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; min-height: 100vh; }
.login-brand { flex: 1 1 460px; position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: 40px; display: flex; flex-direction: column; min-height: 520px; }
.login-brand .brand { padding: 0; position: relative; z-index: 1; }
.login-art { position: absolute; left: 0; right: 0; top: 92px; width: 100%; height: auto; }
.login-claim { margin-top: auto; padding-top: 340px; position: relative; max-width: 520px; }
.login-claim h1 { font-size: clamp(38px, 4.6vw, 60px); letter-spacing: -.05em; line-height: 1; margin-bottom: 14px; }
.login-claim h1 span { color: var(--lime); }
.login-claim p { margin: 0; font-size: 17px; color: #b6bcc6; }
.login-split > .login { flex: 1 1 380px; display: flex; flex-direction: column; justify-content: center; align-items: stretch; max-width: 440px; width: 100%; margin: 0 auto; padding: 24px; }
.login h2 { font-size: 34px; letter-spacing: -.04em; margin: 0 0 8px; }
.login-sub, .login > p { color: var(--muted); font-size: 16px; margin-bottom: 26px; }
.login form { margin-top: 0; }
.login .error { text-align: center; min-height: 20px; margin: 14px 0 0; }
.login input { min-height: 58px; border-radius: var(--r); font-size: 17px; }

/* ---------- Consentement ---------- */
.consent-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(700px 400px at 80% 0%, #e3ecc0, transparent 60%), var(--canvas); }
.login.consent { display: block; background: #fff; border-radius: var(--r-xl); padding: 36px; max-width: 560px; margin: 0; box-shadow: var(--shadow-lg); }
.consent-icon { width: 56px; height: 56px; border-radius: 20px; background: var(--ink); color: var(--lime); display: grid; place-items: center; margin-bottom: 22px; }
.consent .eyebrow { margin-bottom: 10px; }
.consent h1 { font-size: 36px; }
.consent p { font-size: 15px; line-height: 1.65; color: #3b4048; }
.consent .consent-note { background: var(--good-soft); color: var(--good); border-radius: 16px; padding: 12px 16px; font-weight: 500; margin: 14px 0 24px; }
.actions { display: flex; flex-wrap: wrap; flex-direction: column; gap: 10px; }
.consent .actions button { min-height: 56px; line-height: 56px; font-size: 16px; justify-content: center; }
.consent .actions .secondary { background: transparent; }
.consent .actions .secondary:hover { background: var(--surface-2); }

/* ---------- Vitrines publiques ---------- */
.vitrine {
  --v-bg: #f7f0e3; --v-ink: #2b2118; --v-muted: #62513f; --v-accent: #b4532a; --v-accent-ink: #fff;
  --v-soft: #f3dcc8; --v-soft-ink: #8a3a19; --v-card: #ffffff; --v-line: rgba(43, 33, 24, .14); --v-nav: rgba(255, 255, 255, .8);
  min-height: 100vh; padding: 0 clamp(20px, 6vw, 96px);
  background: var(--v-bg); color: var(--v-ink);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  font-family: var(--font);
}
.vitrine nav {
  position: sticky; top: 14px; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 22px; padding: 10px 10px 10px 26px;
  background: var(--v-nav); border: 1px solid var(--v-line); border-radius: 999px;
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  font-size: 15px;
}
.vitrine nav strong { font-family: var(--v-display, var(--serif)); font-size: 20px; letter-spacing: -.01em; }
.vitrine nav span { background: var(--v-ink); color: var(--v-bg); border-radius: 999px; padding: 0 22px; min-height: 46px; line-height: 46px; font-size: 14px; font-weight: 500; }
.vitrine main { flex: 1; position: relative; }
.vitrine .v-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 90px); margin: 0; }
.vitrine .v-copy { flex: 1 1 480px; min-width: 0; max-width: 740px; }
.vitrine .eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--v-soft-ink); background: var(--v-soft); border-radius: 99px; padding: 9px 16px; text-transform: uppercase; }
.vitrine h1 { font-family: var(--v-display, var(--serif)); font-weight: 500; font-size: clamp(44px, 6.6vw, 96px); line-height: .98; letter-spacing: -.035em; margin: 28px 0 24px; overflow-wrap: anywhere; }
.vitrine .intro { max-width: 580px; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: var(--v-muted); margin: 0 0 34px; }
.vitrine .button {
  display: inline-flex; align-items: center; gap: 14px; line-height: 1;
  background: var(--v-accent); color: var(--v-accent-ink); min-height: 60px; padding: 0 30px;
  font-size: 17px; font-weight: 600; box-shadow: 0 16px 32px color-mix(in srgb, var(--v-accent) 32%, transparent);
}
.vitrine .button:hover { background: var(--v-accent); filter: brightness(1.06); }

/* Composition décorative (classic : arche) */
.vitrine .v-art { flex: 1 1 320px; display: flex; justify-content: center; }
.vitrine .v-art { position: relative; width: 340px; height: 440px; flex: 0 1 340px; margin: 0 auto; }
.v-art i { position: absolute; display: block; }
.v-art i:nth-child(1) { inset: 0; border-radius: 170px 170px 28px 28px; background: #e9b98a; }
.v-art i:nth-child(2) { left: 50%; top: 64px; width: 130px; height: 130px; margin-left: -65px; border-radius: 50%; background: var(--v-bg); }
.v-art i:nth-child(3) { left: 0; right: 0; bottom: 0; height: 150px; border-radius: 0 0 28px 28px; background: var(--v-accent); }
.vitrine .v-hero:not(:has(.v-copy .button)) .v-art { display: none; }

/* Contenu : cartes numérotées */
.vitrine .article { max-width: 690px; font-size: 17px; line-height: 1.8; margin: 0 0 60px; }
.vitrine .article.v-cards { max-width: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 10px 0 70px; margin: 0; font-size: 17px; }
.v-card { background: var(--v-card); border-radius: 32px; padding: 34px 32px; box-shadow: 0 14px 40px rgba(60, 40, 20, .07); }
.v-card p { margin: 22px 0 0; line-height: 1.75; }
.v-num { display: block; font-family: var(--v-display, var(--serif)); font-size: 64px; line-height: 1; font-weight: 500; color: #e9b98a; }
.v-card:nth-child(3n+2) { background: var(--v-accent); color: var(--v-accent-ink); box-shadow: 0 14px 40px color-mix(in srgb, var(--v-accent) 30%, transparent); }
.v-card:nth-child(3n+2) .v-num { color: rgba(255, 255, 255, .55); }

/* Bandeau d'appel à l'action */
.v-band { background: var(--v-ink); color: var(--v-bg); border-radius: 40px; padding: clamp(36px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.v-band h2 { margin: 0; font-family: var(--v-display, var(--serif)); font-weight: 500; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; letter-spacing: -.03em; }
.v-band .button { background: var(--v-soft); color: var(--v-ink); box-shadow: none; }

.vitrine footer { border-top: 1px solid var(--v-line); margin-top: 40px; padding: 22px 0 28px; color: var(--v-muted); font-size: 13px; }
.vitrine .legal { max-width: 760px; margin-top: 30px; background: rgba(255, 255, 255, .55); border-radius: 24px; padding: 6px 22px; font-size: 14px; color: var(--v-muted); }
.vitrine .legal summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--v-ink); min-height: 52px; display: flex; align-items: center; }
.vitrine .legal p { margin: 0 0 18px; line-height: 1.7; }

/* Thème Agency */
.vitrine.agency {
  --v-bg: #0b0a1c; --v-ink: #f1efff; --v-muted: #b8b3e0; --v-accent: #8b7cff; --v-accent-ink: #0b0a1c;
  --v-soft: rgba(139, 124, 255, .2); --v-soft-ink: #d6d1ff; --v-card: #16143a; --v-line: rgba(255, 255, 255, .12); --v-nav: rgba(30, 27, 70, .7);
  --v-display: var(--font-display);
}
.vitrine.agency::before { content: ""; position: absolute; right: -180px; top: 80px; width: 640px; height: 640px; border-radius: 50%; border: 90px solid #1b1747; pointer-events: none; }
.vitrine.agency nav span { background: var(--v-accent); color: #0b0a1c; font-weight: 600; }
.vitrine.agency h1, .vitrine.agency .v-band h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.06em; line-height: .94; }
.vitrine.agency h1 { font-size: clamp(46px, 8.4vw, 108px); }
.vitrine.agency .v-art i:nth-child(1) { inset: auto; right: -60px; top: 10px; width: 300px; height: 300px; border-radius: 50%; background: transparent; border: 44px solid #8b7cff; }
.vitrine.agency .v-art i:nth-child(2) { left: 20px; top: 250px; width: 120px; height: 120px; margin: 0; background: #2a1646; }
.vitrine.agency .v-art i:nth-child(3) { display: none; }
.vitrine.agency .v-card { background: var(--v-card); border: 1px solid rgba(255, 255, 255, .1); border-radius: 36px; box-shadow: none; color: #d9d6f3; }
.vitrine.agency .v-num { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: #8b7cff; }
.vitrine.agency .v-card:nth-child(3n+2) { background: #8b7cff; color: #0b0a1c; box-shadow: none; }
.vitrine.agency .v-card:nth-child(3n+2) .v-num { color: #0b0a1c; }
.vitrine.agency .v-card p { margin-top: 56px; }
.vitrine.agency .v-band { background: #f1efff; color: #0b0a1c; }
.vitrine.agency .v-band .button { background: #0b0a1c; color: #f1efff; }
.vitrine.agency .legal { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }

/* Thème Minimal */
.vitrine.minimal {
  --v-bg: #f4f7fd; --v-ink: #101828; --v-muted: #475467; --v-accent: #1d4ed8; --v-accent-ink: #fff;
  --v-soft: #fff; --v-soft-ink: #1d4ed8; --v-card: #fff; --v-line: rgba(16, 24, 40, .1); --v-nav: rgba(255, 255, 255, .9);
  --v-display: var(--font-display);
}
.vitrine.minimal::before { content: ""; position: absolute; left: 50%; top: -260px; width: 900px; height: 900px; margin-left: -450px; border-radius: 50%; background: #e3ecff; pointer-events: none; }
.vitrine.minimal::after { content: ""; position: absolute; left: 50%; top: -120px; width: 620px; height: 620px; margin-left: -310px; border-radius: 50%; background: #d3e1ff; pointer-events: none; }
.vitrine.minimal nav, .vitrine.minimal main, .vitrine.minimal footer, .vitrine.minimal .legal { position: relative; z-index: 1; }
.vitrine.minimal nav { position: sticky; }
.vitrine.minimal nav span { background: #1d4ed8; color: #fff; }
.vitrine.minimal .v-hero { flex-direction: column; text-align: center; gap: 0; }
.vitrine.minimal .v-copy { flex: none; max-width: 820px; }
.vitrine.minimal .eyebrow { box-shadow: 0 4px 14px rgba(30, 60, 140, .1); }
.vitrine.minimal h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.06em; line-height: .96; font-size: clamp(44px, 7.6vw, 100px); }
.vitrine.minimal .intro { margin-left: auto; margin-right: auto; }
.vitrine.minimal .v-art { display: none !important; }
.vitrine.minimal .article.v-cards { max-width: 1000px; margin: 0 auto; }
.vitrine.minimal .v-card { box-shadow: 0 14px 40px rgba(30, 60, 140, .08); }
.vitrine.minimal .v-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: #e3ecff; color: #1d4ed8; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.vitrine.minimal .v-card:nth-child(3n+2) { background: #fff; color: inherit; box-shadow: 0 14px 40px rgba(30, 60, 140, .08); }
.vitrine.minimal .v-card:nth-child(3n+2) .v-num { color: #1d4ed8; }
.vitrine.minimal .v-band { max-width: 1000px; margin: 0 auto 20px; width: 100%; background: #1d4ed8; color: #fff; text-align: center; justify-content: center; flex-direction: column; }
.vitrine.minimal .v-band h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.05em; }
.vitrine.minimal .v-band .button { background: #fff; color: #1d4ed8; }
.vitrine.minimal .legal { margin-left: auto; margin-right: auto; background: #fff; width: 100%; }

.preview-banner { background: var(--ink); color: var(--lime); padding: 12px 20px; text-align: center; font-size: 13px; font-weight: 600; }

/* ---------- Guide, assistant, panneaux avancés ---------- */
.field { margin-bottom: 20px; min-width: 0; }
.field-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field-label label { display: inline; margin: 0; font-size: 14px; }
.info-wrap { display: contents; }
.info-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; min-height: 0; line-height: 1; padding: 0; border-radius: 50%; background: var(--ink); color: var(--lime); font: 700 12px/1 var(--serif); vertical-align: middle; cursor: pointer; }
.info-button:hover { background: var(--ink-3); }
.info-button[aria-expanded=true] { background: var(--lime); color: var(--ink); outline: 2px solid var(--ink); }
.help-text { display: block; flex-basis: 100%; order: 4; font-weight: 400; font-size: 13px; line-height: 1.6; background: var(--good-soft); color: var(--good); padding: 12px 14px; border-radius: var(--r); margin: 8px 0; white-space: normal; }
.toggle-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toggle-row .toggle { margin: 0; flex: 0 1 auto; }
.wizard-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 2; }
.wizard-tabs button { background: transparent; color: #3b4048; border-radius: 16px; padding: 0 10px; min-height: 48px; line-height: 1.2; text-align: left; font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.wizard-tabs button:hover { background: var(--surface-2); transform: none; }
.wizard-tabs button span { display: inline-grid; place-items: center; background: #e1e4e9; border-radius: 50%; width: 26px; height: 26px; flex-shrink: 0; font-size: 12px; }
.wizard-tabs button[aria-selected=true] { background: var(--ink); color: #fff; }
.wizard-tabs button[aria-selected=true] span { background: var(--lime); color: var(--ink); }
.step-intro { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.advanced { border-radius: var(--r); margin: 24px 0; padding: 16px 18px; background: #fff; }
.advanced > summary { font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.8; }
.advanced[open] > summary { margin-bottom: 20px; }
.advanced .field:last-child { margin-bottom: 0; }
.preset-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 24px; }
.preset-buttons button { padding: 0 16px; min-height: 38px; line-height: 38px; font-size: 12px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--field-border); }
.preset-buttons button:hover { background: var(--lime); }
.config-row { background: #fff; border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.row-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 10px; }
.row-heading strong { font-size: 14px; }
.row-heading .text-button { font-size: 12px; color: var(--bad); }
.parameter-fields { display: grid; grid-template-columns: 1fr 1.1fr 1.1fr; gap: 12px; }
.config-row .field { margin-bottom: 14px; }
.config-row .field-label, .config-row .field-label label { font-size: 12px; }
.config-row .toggle { font-size: 13px; }
.config-row > small { display: block; margin-top: 14px; font-size: 12px; }
.example-box { padding: 18px; background: var(--ink); color: #fff; border-radius: var(--r); margin: 20px 0; }
.example-box code { display: block; font-family: var(--mono); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; margin: 12px 0; color: var(--lime); }
.example-box small { display: block; font-size: 12px; line-height: 1.6; color: #a3aab5; }
.form-content .section-heading { margin: 28px 0 16px; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
.form-content .section-heading h3 { border: 0; padding: 0; margin: 0; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.dialog-footer #step-progress { margin-right: auto; font-size: 13px; color: var(--muted); }
.guide-card { padding: 28px; background: #fff; border-radius: var(--r-xl); margin-bottom: 22px; max-width: 950px; box-shadow: var(--shadow); }
.guide-card p { font-size: 15px; color: var(--muted); }
.guide-steps { padding-left: 24px; margin-bottom: 0; }
.guide-steps li { padding: 10px 0 10px 12px; }
.guide-steps li::marker { color: var(--ink); font-weight: 700; }
.guide-steps strong { font-weight: 650; font-size: 16px; }
.guide-steps p { margin: 8px 0 0; }
.guide-card a { font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
#token-status { display: block; margin: -8px 0 18px; }
#meta-credentials { border-left: 3px solid var(--lime); padding-left: 18px; margin: 20px 0; }
#simulation-result p { font-size: 13px; margin: 8px 0; }
.field-grid .field { width: 100%; }
#links-content h3 { font-size: 14px; }
#links-content code { overflow-wrap: anywhere; }

/* ---------- Overlay de la porte de routage (blanc opaque, générique) ---------- */
[data-loading-overlay] { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; background: #fff; opacity: 1; transition: opacity .3s ease-out; pointer-events: auto; display: flex; align-items: center; justify-content: center; }
.lo-ring { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #e5e7eb; border-top-color: #9ca3af; box-sizing: border-box; animation: lo-spin .9s linear infinite; }
@keyframes lo-spin { to { transform: rotate(360deg); } }

/* ---------- Listes IP & journal ---------- */
.ip-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.ip-row { display: flex; align-items: center; gap: 10px; font-size: 13px; background: #fff; border-radius: var(--r-sm); padding: 10px 14px; }
.ip-row strong { font-family: var(--mono); font-size: 12px; flex-shrink: 0; }
.ip-row span { color: var(--muted); flex: 1; overflow-wrap: anywhere; }
.ip-row .text-button { flex-shrink: 0; padding: 4px 0; }
.visitor-log { max-height: 320px; overflow: auto; border-radius: var(--r); background: #fff; margin-top: 10px; }
.visitor-log table { font-size: 12px; }
.visitor-log td, .visitor-log th { padding: 9px 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .shell { grid-template-columns: 210px 1fr; }
  .main { padding: 18px 10px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .shell { display: block; padding: 10px; }
  aside { height: auto; position: sticky; top: 10px; z-index: 20; padding: 12px 14px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; border-radius: 28px; margin-bottom: 12px; }
  aside .workspace-label { display: none; }
  .brand { font-size: 16px; white-space: nowrap; }
  .mark { width: 34px; height: 34px; }
  .nav { width: auto; font-size: 13px; padding: 0 14px; line-height: 40px; min-height: 40px; margin: 0; }
  .aside-bottom { margin: 0 0 0 auto; padding: 0; background: none; font-size: 0; }
  .aside-bottom small, .aside-bottom .dot { display: none; }
  .aside-bottom .nav { margin: 0; padding: 0 12px; font-size: 12px; }
  .main { padding: 10px 6px 0; }
  header h1, h1 { font-size: 32px; }
  header > button { min-height: 46px; line-height: 46px; }
  .stats { gap: 10px; margin: 20px 0 30px; }
  .stat { min-height: 140px; padding: 18px; }
  .stat strong { font-size: 30px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .dialog-header, .dialog-footer { padding: 18px 20px; }
  .form-content { padding: 20px; }
  .theme-choice { padding: 12px 8px; }
  .theme-choice span { font-size: 14px; }
  .theme-choice input { right: 6px; top: 6px; }
  .wizard-tabs { padding: 10px; gap: 3px; }
  .wizard-tabs button { flex-direction: column; align-items: flex-start; font-size: 10px; gap: 6px; padding: 8px 6px; }
  .parameter-fields { grid-template-columns: 1fr; }
  .dialog-footer { padding: 14px; gap: 7px; }
  .dialog-footer button { padding: 0 16px; font-size: 13px; }
  .config-row { padding: 14px; }
  .guide-card { padding: 20px; }
  .login-brand { min-height: 420px; padding: 28px; }
  .login-claim { padding-top: 260px; }
  .login.consent { padding: 26px 22px; }
  .vitrine nav { padding-left: 18px; }
  .vitrine nav span { padding: 0 14px; font-size: 12px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vitrine .v-art { display: none; }
}

/* Historiques et pagination de l'administration. */
.history-panel { margin: 24px 0; min-width: 0; }
.history-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.history-filters label { flex: 1 1 150px; min-width: 0; margin: 0; }
.history-filters input, .history-filters select { width: 100%; }
.filter-actions, .page-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.history-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.history-title { display: block; max-width: 360px; overflow-wrap: anywhere; }
.history-table td { vertical-align: top; }
.record-details { min-width: 145px; }
.record-details summary, .site-facts summary { cursor: pointer; font-weight: 600; }
.record-details[open] { min-width: min(340px, 70vw); }
.record-details dl, .record-fields { margin: 12px 0; }
.record-details dl > div, .record-fields > div { padding: 9px 0; border-bottom: 1px solid var(--border); }
.record-details dt, .record-fields dt { color: var(--muted); font-size: 12px; }
.record-details dd, .record-fields dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; max-width: 480px; }
.site-facts { margin: 16px 0; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-size: 13px; }
.pagination label { display: flex; align-items: center; gap: 8px; margin: 0; }
.pagination select { width: auto; margin: 0; }
.pagination button { padding: 8px 12px; }
@media (max-width: 640px) {
  .history-filters label { flex-basis: 100%; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .page-buttons { width: 100%; }
  .history-title { max-width: 230px; }
}
