/* Espace apporteur Paperclip AI — clair par défaut, sombre au choix. */
:root, :root[data-theme="clair"] {
  --bg: #f5f6fb;
  --bg2: #eceefa;
  --card: #ffffff;
  --card2: #f8f9fd;
  --border: #e3e6f0;
  --border2: #d3d8e8;
  --text: #171a2c;
  --muted: #646b80;
  --accent: #4c4aff;
  --accent2: #7c5cff;
  --accent-soft: rgba(76, 74, 255, .09);
  --accent-text: #3b39e0;
  --ok: #0f8a5f;   --ok-bg: #e7f7f0;
  --warn: #a65a00; --warn-bg: #fff4e0;
  --danger: #c42b3b; --danger-bg: #fdecee;
  --info: #3b4fd8; --info-bg: #ecefff;
  --paid: #0b7a54; --paid-bg: #d9f5e9;
  --shadow: 0 1px 2px rgba(23, 26, 44, .05), 0 8px 24px rgba(23, 26, 44, .05);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="sombre"] {
  --bg: #0d0f17;
  --bg2: #141726;
  --card: #161a28;
  --card2: #1b2031;
  --border: #252b3e;
  --border2: #323a52;
  --text: #e8eaf2;
  --muted: #9098ad;
  --accent: #6e6cff;
  --accent2: #9d7bff;
  --accent-soft: rgba(110, 108, 255, .14);
  --accent-text: #a5a4ff;
  --ok: #4fd1a1;   --ok-bg: rgba(79, 209, 161, .12);
  --warn: #fbbf4d; --warn-bg: rgba(251, 191, 77, .12);
  --danger: #ff7a88; --danger-bg: rgba(255, 122, 136, .12);
  --info: #9aa8ff; --info-bg: rgba(154, 168, 255, .12);
  --paid: #5ee0ad; --paid-bg: rgba(94, 224, 173, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
.logo-sombre { display: none; }
:root[data-theme="sombre"] .logo-sombre { display: block; }
:root[data-theme="sombre"] .logo-clair { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 16.5px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
small { font-size: 12.5px; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: var(--muted); }
.muted { color: var(--muted); }
.vert { color: var(--ok); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--card); padding: 8px 12px; border-radius: 8px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Menu */
:root { --sb-w: 252px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 40;
  display: flex; flex-direction: column; gap: 4px; padding: 22px 14px 16px;
  background: var(--card); border-right: 1px solid var(--border);
  overflow-y: auto;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.sb-brand { padding: 2px 10px 0; }
.sb-espace { margin: 6px 10px 18px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sb-nav { display: flex; flex-direction: column; gap: 3px; }
.sb-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: var(--muted); font: inherit; font-weight: 600; font-size: 14.5px;
  text-decoration: none; cursor: pointer; text-align: left;
}
.sb-link:hover { background: var(--card2); color: var(--text); }
.sb-link.active { background: var(--accent-soft); color: var(--accent-text); }
.sb-link.sb-cta {
  margin-bottom: 12px; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 18px rgba(76, 74, 255, .28);
}
.sb-link.sb-cta:hover { filter: brightness(1.07); color: #fff; }
.sb-link.sb-cta.active { color: #fff; }
.ico { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sb-bas { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.sb-bas form { margin: 0; }
.sb-qui { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; min-width: 0; }
.sb-qui-txt { display: flex; flex-direction: column; min-width: 0; }
.sb-qui-txt strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-qui-txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.mtop, .voile { display: none; }

.page { margin-left: var(--sb-w); padding: 34px 40px 28px; max-width: calc(var(--sb-w) + 1180px); }
.pied { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.pied a { color: var(--muted); }

@media (max-width: 900px) {
  .mtop {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    height: 58px; padding: 0 12px; background: var(--card); border-bottom: 1px solid var(--border);
  }
  .mtop .brand img { height: 26px; }
  .icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; }
  .icon-btn .ico { width: 22px; height: 22px; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.ouvert { transform: none; }
  .voile { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8, 10, 20, .45); }
  body.bloque { overflow: hidden; }
  .page { margin-left: 0; padding: 22px 16px 24px; }
}

/* ------------------------------------------------------- Titres, cartes */
.tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sous { margin: 6px 0 0; color: var(--muted); }
.fil { margin: 0 0 10px; font-size: 14px; }
.fil a { color: var(--muted); text-decoration: none; }
.fil a:hover { color: var(--text); }
.carte {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px;
}
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.carte-tete h2 { display: flex; align-items: center; gap: 10px; }
.carte-tete h2 small { font-weight: 500; font-size: 13px; }
.lien-fort { font-weight: 700; font-size: 14px; text-decoration: none; }
.num {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--accent-text); background: var(--accent-soft);
}
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grille-2.large-gauche { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.grille-2 > * { min-width: 0; }
@media (max-width: 1150px) { .grille-2, .grille-2.large-gauche { grid-template-columns: 1fr; } }
.vide { text-align: center; color: var(--muted); padding: 30px 16px; }
.vide p { margin: 0 0 14px; }
.aide { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }

/* ----------------------------------------------------------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border2);
  background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 14.5px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent-text); }
.btn.primaire { border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 18px rgba(76, 74, 255, .25); }
.btn.primaire:hover { filter: brightness(1.07); color: #fff; }
.btn.large { width: 100%; padding: 13px 18px; font-size: 15.5px; }

/* --------------------------------------------------- Messages, bandeaux */
.flash, .bandeau { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14.5px; border: 1px solid transparent; }
.flash.ok, .bandeau.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.flash.erreur, .bandeau.danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.bandeau.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.bandeau.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.bandeau.muted { background: var(--card2); color: var(--text); border-color: var(--border); }
.bandeau a { color: inherit; font-weight: 700; margin-left: 4px; }

.pastille {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.pastille::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pastille.ok { background: var(--ok-bg); color: var(--ok); }
.pastille.warn { background: var(--warn-bg); color: var(--warn); }
.pastille.info { background: var(--info-bg); color: var(--info); }
.pastille.danger { background: var(--danger-bg); color: var(--danger); }
.pastille.paid { background: var(--paid-bg); color: var(--paid); }
.pastille.muted { background: var(--card2); color: var(--muted); border: 1px solid var(--border); }

/* ---------------------------------------------------------------- KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-v { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.kpi-s { font-size: 12.5px; color: var(--muted); }
.kpi.accent { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: 0; color: #fff; }
.kpi.accent .kpi-l, .kpi.accent .kpi-s { color: rgba(255, 255, 255, .82); }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .kpi-v { font-size: 23px; } .kpi { padding: 14px 16px; } }

/* ------------------------------------------------------ Liste de fiches */
.liste-fiches { display: flex; flex-direction: column; }
.fl {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 12px 10px; border-radius: 12px; color: inherit; text-decoration: none;
}
.liste-fiches > * + * { border-top: 1px solid var(--border); }
.liste-fiches > div > .fl, .liste-fiches > .fl { border-top: 0; }
.fl:hover { background: var(--card2); }
.fl-avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: var(--accent-text); background: var(--accent-soft); }
.fl-main { display: flex; flex-direction: column; min-width: 0; }
.fl-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-main small { color: var(--muted); }
.fl-com { text-align: right; min-width: 110px; font-size: 14px; }
@media (max-width: 640px) {
  .fl { grid-template-columns: 36px minmax(0, 1fr); row-gap: 6px; }
  .fl-avatar { width: 36px; height: 36px; grid-row: span 2; align-self: start; }
  .fl-statut, .fl-com { grid-column: 2; text-align: left; min-width: 0; }
  .fl-statut { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
}
.filtres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filtres button {
  border: 1px solid var(--border); background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.filtres button span { margin-left: 4px; opacity: .7; }
.filtres button.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

/* --------------------------------------------------- Comment ça marche */
.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.etapes li { display: flex; gap: 14px; }
.etapes p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* -------------------------------------------------------- Formulaires */
.form { display: flex; flex-direction: column; gap: 14px; }
.grille-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grille-champs .plein { grid-column: 1 / -1; }
.grille-champs .etroit { max-width: 160px; }
@media (max-width: 640px) { .grille-champs { grid-template-columns: 1fr; } .grille-champs .etroit { max-width: none; } }
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ > span { font-size: 13.5px; font-weight: 700; }
.champ > span small { font-weight: 500; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--card2);
  border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
input[readonly] { color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.coche { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.coche.important { margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.choix { display: grid; gap: 10px; margin-bottom: 14px; }
.choix.deux { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .choix.deux { grid-template-columns: 1fr; } }
.choix-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--border); cursor: pointer; background: var(--card);
}
.choix-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choix-item span { display: flex; flex-direction: column; gap: 2px; }
.choix-item small { color: var(--muted); font-size: 13px; }
.fiche-form .carte { margin-bottom: 16px; }
.envoi { display: flex; align-items: center; gap: 18px; padding: 4px 2px 0; }
.envoi .aide { margin: 0; flex: 1; }
.envoi .btn { width: auto; min-width: 220px; }
@media (max-width: 640px) { .envoi { flex-direction: column; align-items: stretch; } .envoi .btn { width: 100%; } }

.recherche { position: relative; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--border2); }
.recherche .aide { margin: 6px 0 0; }
.rech-res {
  position: absolute; left: 0; right: 0; top: 74px; z-index: 20; list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--border2); border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow-y: auto;
}
.rech-res li { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.rech-res li small { color: var(--muted); }
.rech-res li:hover, .rech-res li:focus { background: var(--accent-soft); outline: none; }
.rech-res li.rien { cursor: default; color: var(--muted); }

.fichier { position: relative; display: flex; align-items: center; padding: 11px 14px; border: 1.5px dashed var(--border2); border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.fichier input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fichier:hover { border-color: var(--accent); color: var(--accent-text); }
.depot { flex-direction: row; flex-wrap: wrap; }
.depot .fichier { flex: 1 1 220px; }

/* ----------------------------------------------------- Fiche prospect */
.frise { list-style: none; margin: 0 0 20px; padding: 18px 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.frise li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-top: 22px; color: var(--muted); min-width: 0; }
.frise li::before { content: ""; position: absolute; top: 7px; left: 16px; right: -8px; height: 2px; background: var(--border2); }
.frise li:last-child::before { display: none; }
.frise .pt { position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border2); background: var(--card); z-index: 1; }
.frise strong { font-size: 13.5px; color: var(--text); }
.frise small { font-size: 12px; }
.frise li.fait .pt { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.frise li.fait::before { background: var(--accent); }
.frise li.encours .pt { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.frise li.stop .pt { background: var(--muted); border-color: var(--muted); }
.frise li:not(.fait):not(.encours):not(.stop) strong { color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
  .frise { grid-template-columns: 1fr; gap: 0; padding: 16px 18px; }
  .frise li { padding: 0 0 16px 28px; }
  .frise li::before { top: 16px; left: 7px; right: auto; bottom: -2px; width: 2px; height: auto; }
  .frise li:last-child { padding-bottom: 0; }
}
.montant { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.montant > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.montant > div + div { border-top: 1px solid var(--border); }
.montant .total { background: var(--card2); font-weight: 700; }
.montant .total strong { font-size: 18px; }
.ok-ligne { color: var(--ok); font-weight: 700; margin: 14px 0 0; }
.doc { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--card2); border: 1px solid var(--border); }
.doc > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.doc small { color: var(--muted); }
.doc .ico { width: 26px; height: 26px; color: var(--accent-text); }
@media (max-width: 520px) { .doc { flex-wrap: wrap; } .doc .btn { width: 100%; } }
.infos { margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.infos > div { min-width: 0; }
.infos .plein { grid-column: 1 / -1; }
.infos dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.infos dd { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 560px) { .infos { grid-template-columns: 1fr; } }
.preuve { padding: 12px 14px; border-radius: 12px; background: var(--card2); border: 1px solid var(--border); font-size: 13px; }
.preuve p { margin: 0 0 4px; }
.preuve p:last-child { margin: 0; }
.journal { list-style: none; margin: 0; padding: 0; }
.journal li { position: relative; display: flex; gap: 12px; padding: 0 0 16px 4px; }
.journal li::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 0; width: 2px; background: var(--border); }
.journal li:last-child::before { display: none; }
.journal .pt { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.journal div { display: flex; flex-direction: column; }
.journal strong { font-size: 14px; font-weight: 600; }
.journal small { color: var(--muted); }

.essentiel { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.essentiel > div { padding: 14px 16px; border-radius: 12px; background: var(--card2); border: 1px solid var(--border); }
.essentiel h3 { margin: 0 0 6px; }
.essentiel p { margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------ Pages publiques */
/* Plein écran : grand hexagone violet aux bords arrondis à gauche. Il tourne
   d'un tiers de tour toutes les 2 s ; les illustrations y sont accrochées et
   tournent avec lui. Seuls les gros titres changent, en fondu. */
body.public { min-height: 100vh; background: var(--card); overflow-x: hidden; }
.vt-scene { min-height: 100vh; }
.vt { position: relative; overflow: hidden; width: 100%; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(400px, 1fr); background: var(--card); }

/* ---- Vitrine */
.vt-vitrine { position: relative; min-height: 100vh; color: #fff; isolation: isolate; }
/* Grand hexagone qui déborde en haut, en bas et à gauche ; sa pointe
   droite marque la limite avec le formulaire. */
.vt-hexa {
  --S: max(165vh, 1060px);
  position: absolute; z-index: -1; right: -1vw; top: calc(50% - var(--S) / 2);
  width: var(--S); height: var(--S); transform: rotate(30deg); will-change: transform;
}
.vt-hexa-forme { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 30px 60px rgba(61, 54, 214, .3)); }
/* Illustrations accrochées au bord de l'hexagone, tous les 120°. Placée à
   l'angle θ et tournée de θ : quand l'hexagone l'amène à l'angle α (en bas à
   droite), elle est droite. -30° compense la base de .vt-hexa. L'opacité est
   réglée en continu par app.js selon la distance à α. */
.vt-attache {
  --a: 22deg;
  position: absolute; left: 50%; top: 50%; width: min(520px, 62vh); aspect-ratio: 480 / 460; translate: -50% -50%;
  transform: rotate(calc(var(--t) - 30deg)) translateX(calc(var(--S) * .29)) rotate(calc(-1 * var(--a)));
  opacity: 0;
}
.vt-attache.a0 { --t: 22deg; }
.vt-attache.a1 { --t: 142deg; }
.vt-attache.a2 { --t: 262deg; }
.vt-attache .vt-illu { width: 100%; height: 100%; overflow: visible; }
.vt-illu .ui-carte { filter: drop-shadow(0 18px 30px rgba(24, 18, 90, .22)); }
.vt-logo { position: absolute; top: 38px; left: 56px; }
.vt-logo img { height: 42px; width: auto; }
.vt-logo .vt-logo-couleur { display: none; }

/* Titres en tapis roulant, entraînés par app.js au même rythme que
   l'hexagone : celui qui part sort du cadre par la gauche, le suivant le
   suit de près. Pas de fondu : hors du violet, le blanc ne se voit plus. */
.vt-titres {
  position: absolute; left: 56px; top: 14vh; height: 2.3em; overflow: hidden; /* largeur posée par app.js */
  font-family: "Archivo", "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 900;
  font-size: clamp(40px, min(5.4vw, 9vh), 100px);
}
.vt-grand {
  position: absolute; left: 0; top: 0; margin: 0; width: max-content; white-space: nowrap;
  font: inherit; line-height: 1.02; letter-spacing: -.035em; will-change: transform;
}
.vt-grand:not(.actif) { visibility: hidden; }

/* ---- Formulaire */
.vt-form { position: relative; z-index: 6; isolation: isolate; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 56px 56px 30px 40px; min-width: 0; }
.vt-form-in { position: relative; width: 100%; max-width: 400px; }
/* Couleurs floues juste derrière les champs : c'est ce que le verre
   déforme et sature (sans rien derrière, du verre ne se voit pas). */
.vt-champs { position: relative; isolation: isolate; }
.vt-champs::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -40px 40px; pointer-events: none;
  background: radial-gradient(160px 90px at 18% 30%, rgba(124, 92, 255, .5), transparent 70%),
              radial-gradient(170px 90px at 82% 22%, rgba(157, 123, 255, .42), transparent 70%),
              radial-gradient(180px 100px at 60% 78%, rgba(91, 76, 255, .4), transparent 70%),
              radial-gradient(140px 80px at 10% 85%, rgba(179, 157, 255, .4), transparent 70%);
  filter: blur(14px);
}
:root[data-theme="sombre"] .vt-champs::before { opacity: .7; }
.vt-marque { display: inline-block; margin-bottom: 44px; }
.vt-marque img { height: 30px; width: auto; }
.vt-surtitre { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); }
.vt-titre { font-size: 50px; font-weight: 800; line-height: 1.02; letter-spacing: -.035em; margin: 0 0 34px; }
.vt-intro { margin: 14px 0 28px; color: var(--muted); }
.vt-champs { display: flex; flex-direction: column; gap: 18px; }
.vt-champ { display: flex; flex-direction: column; gap: 8px; }
.vt-lib { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vt-lib a { text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 13px; text-decoration: none; }
.vt-saisie { position: relative; display: flex; align-items: center; }
.vt-saisie > svg { position: absolute; left: 18px; width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.vt-saisie input {
  position: relative; height: 60px; padding: 0 52px; border-radius: 30px; font-size: 15.5px; color: var(--text);
  /* Verre liquide : translucide, flou + saturation de ce qu'il y a derrière,
     liseré clair, reflet en haut et ombre de contact douce. */
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .22));
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .35),
              inset 0 0 22px rgba(255, 255, 255, .35), 0 10px 28px -10px rgba(76, 74, 255, .28), 0 1px 2px rgba(20, 20, 60, .06);
  transition: box-shadow .25s ease, background .25s ease;
}
.vt-saisie::after {
  content: ""; position: absolute; left: 18px; right: 18px; top: 3px; height: 45%; border-radius: 30px 30px 60% 60% / 30px 30px 100% 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); pointer-events: none; opacity: .6;
}
:root[data-theme="sombre"] .vt-saisie input {
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 20px rgba(255, 255, 255, .05), 0 10px 28px -12px rgba(0, 0, 0, .6);
}
:root[data-theme="sombre"] .vt-saisie::after { opacity: .12; }
.vt-saisie input:focus {
  outline: none; border-color: rgba(255, 255, 255, .9);
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .35));
  box-shadow: inset 0 1.5px 0 #fff, inset 0 0 22px rgba(255, 255, 255, .45), 0 0 0 4px rgba(124, 92, 255, .18), 0 14px 32px -10px rgba(76, 74, 255, .4);
}
.vt-saisie > svg, .vt-oeil { z-index: 1; }
.vt-oeil { position: absolute; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; cursor: pointer; display: grid; place-items: center; }
.vt-oeil svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.vt-oeil.on svg { stroke: var(--accent); }
.vt-go {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; padding: 0 8px 0 26px;
  border: 0; border-radius: 22px; background: #16172b; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 16px 30px -12px rgba(22, 23, 43, .6); transition: transform .2s ease, box-shadow .2s ease;
}
:root[data-theme="sombre"] .vt-go { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.vt-go i { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #9d7bff, #4c4aff); transition: transform .25s ease; }
.vt-go i svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vt-go:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -12px rgba(22, 23, 43, .65); }
.vt-go:hover i { transform: translateX(3px); }
.vt-note { margin: 26px 0 0; color: var(--muted); font-size: 13.5px; }
.vt-pied { width: 100%; max-width: 400px; margin: 40px 0 0; font-size: 13px; color: var(--muted); }
.vt-pied a { color: var(--muted); }

/* Les autres pages publiques (bienvenue, mot de passe oublié, erreur…) */
.pub-titre { font-size: 34px; font-weight: 600; letter-spacing: -.03em; margin: 0; line-height: 1.1; }
.pub-sous { color: var(--muted); margin: 10px 0 24px; }
.pub-lien { margin: 20px 0 0; font-size: 14px; }
.pub-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.vt-form .form input:not([type="checkbox"]) { height: 54px; border-radius: 16px; border-color: transparent; background: var(--bg); box-shadow: inset 3px 3px 7px rgba(30, 30, 80, .07); }
.vt-form .form input:focus { border-color: var(--accent); background: var(--card); }
.vt-form .btn.primaire { height: 58px; border-radius: 20px; }
.texte p { margin: 0 0 12px; font-size: 14.5px; }

@media (max-width: 1200px) {
  .vt { grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr); }
  .vt-attache { display: none; }
}
@media (max-width: 900px) {
  .vt { grid-template-columns: 1fr; }
  .vt-vitrine { min-height: 380px; overflow: hidden; }
  .vt-hexa { --S: 330px; right: auto; left: calc(50% - var(--S) / 2); top: calc(205px - var(--S) / 2); }
  .vt-titres { left: calc(50% - 150px); top: 205px; width: 300px; translate: 0 -50%; font-size: 34px; }
  .vt-grand { left: 0; width: 100%; text-align: center; }
  .vt-logo { top: 22px; left: 22px; }
  .vt-logo img { height: 28px; }
  .vt-logo .vt-logo-blanc { display: none; }
  .vt-logo .vt-lc { display: block; }
  :root[data-theme="sombre"] .vt-logo .vt-lc { display: none; }
  :root[data-theme="sombre"] .vt-logo .vt-ls { display: block; }
  .vt-form { padding: 34px 22px 26px; }
  .vt-marque { display: none; }
  .vt-titre { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-vitrine *, .vt-vitrine *::before { animation: none !important; transition-duration: .01s !important; }
}
