:root {
  --bg: #f6f4ef;
  --bg-alt: #efebe2;
  --text: #1f2a37;
  --muted: #5b6675;
  --accent: #a34c25; /* #b5562b (logo) foncé : contraste 4,5:1 au moins sur --bg-alt, PageSpeed 18/11/2026 */
  --accent-text: #ffffff;
  --accent-soft: #f3e2d8;
  --card: #ffffff;
  --border: #e3ded3;
  --ok: #2f7d4f;
  --ok-soft: #2f7d4f;
  --ok-bg: #e2f1e7;
  --ok-strong: #ffffff;
  --bad: #ffffff;
  --bad-soft: #c0392b;
  --alerte: #c0392b;
  --avertir: #a35d00;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181f;
    --bg-alt: #181d25;
    --text: #eef1f5;
    --muted: #a3adbb;
    --accent: #e58a5c;
    --accent-text: #14181f;
    --accent-soft: #3a2a22;
    --card: #1c222b;
    --border: #2c3440;
    --ok: #6cc18e;
    --ok-bg: #1b3326;
    --ok-soft: #2a6b44;
    --ok-strong: #c9f2d7;
    --bad: #ffd2cc;
    --bad-soft: #7a2e27;
    --alerte: #ff8a7a;
    --avertir: #f2b25c;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  /* Un mot plus long que la ligne (« gegevensbeschermingsautoriteit » sur téléphone) passe à la ligne au lieu de
     faire défiler la page de côté (test navigateur du 10/11/2026, nl/cgu.html à 390 px). */
  overflow-wrap: break-word;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); }
img, svg { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--border); background: var(--card); position: sticky; top: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 700; letter-spacing: 0.02em; color: var(--accent); text-decoration: none; font-size: 1.1rem; }
.nav { display: flex; gap: 6px 18px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
/* Bouton « Devenir bêta-testeur » à droite du menu des pages publiques, au style du bouton secondaire de l'accueil
   (.btn.secondary). Caché une fois connecté (classe nav-connecte, voir navDeconnexion dans api.js). */
.nav a.nav-cta { border: 1px solid var(--accent); color: var(--accent); background: transparent; font-weight: 600; padding: 6px 14px; border-radius: 10px; }
.nav a.nav-cta:hover { background: var(--accent-soft); }
.nav-connecte .nav a.nav-cta { display: none; }
/* Arrivée par ce bouton : le formulaire ne passe pas sous le menu fixe. */
#candidature { scroll-margin-top: 40px; }
/* Titre de l'accueil : retour à la ligne voulu sur grand écran seulement, sinon « vente, » reste seul sur sa ligne. */
@media (max-width: 600px) { .hero h1 br { display: none; } }

/* Menu mobile : les liens passent sous un bouton */
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px; color: var(--text); cursor: pointer; line-height: 0; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icone-fermer, .menu-ouvert .nav-toggle .icone-ouvrir { display: none; }
.menu-ouvert .nav-toggle .icone-fermer { display: block; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-header .nav-publique { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
  .site-header.menu-ouvert .nav-publique { display: flex; }
  .nav-publique a { padding: 12px 0; border-top: 1px solid var(--border); font-size: 1rem; }
  .site-header .nav-publique .lang { align-self: flex-start; margin-top: 12px; padding: 4px 10px; }
  .nav-publique a.nav-cta { margin-top: 12px; padding: 12px 14px; border-top: 1px solid var(--accent); text-align: center; }
}

/* Boutons */
.btn {
  display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  padding: 10px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; font-size: 0.95rem;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* En route vers la page de paiement : points animés, plus de clic possible */
.btn.chargement { pointer-events: none; }
.points { display: inline-block; width: 1.2em; text-align: left; }
.points::after { content: '...'; animation: points 1.2s infinite; }
@keyframes points { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@media (prefers-reduced-motion: reduce) { .points::after { animation: none; } }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 18px; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 0 0 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
/* Vitrine de l'accueil : logos des agences qui l'ont demandé (api/vitrine.php), sous l'appel à l'action. */
section.vitrine { padding-top: 0; }
.vitrine h2 { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin-bottom: 20px; }
.vitrine-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.vitrine-logos li { background: #fff; border: 1px solid var(--border); border-radius: 10px; width: 160px; height: 80px; padding: 10px 14px; display: flex; align-items: center; justify-content: center; }
.vitrine-logos a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.vitrine-logos img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 480px) { .vitrine-logos li { width: 130px; height: 66px; } }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; }

.hero { padding: 80px 0 64px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.badge { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; color: var(--muted); }
/* Accueil : blocs plus serrés que sur les autres pages. */
.accueil section { padding: 44px 0; }
.accueil .hero { padding: 64px 0 36px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 32px; }
.grid.trois { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--muted); }
.card .icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 12px; }

.steps { counter-reset: step; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 12px;
}

/* Tableau comparatif */
.table-wrap { overflow-x: auto; margin-top: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
th:not(:first-child), td:not(:first-child) { text-align: center; }
td.yes, td.no, td.mid { white-space: normal; position: relative; }
.mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 1rem;
  vertical-align: middle;
}
td.yes .mark { background: var(--ok-soft); color: var(--ok-strong, var(--ok)); }
td.no .mark { background: var(--bad-soft); color: var(--bad); }
td.mid .mark { background: var(--bg-alt); color: var(--muted); }
td.no, td.mid { color: var(--muted); }
td[tabindex] { cursor: help; outline: none; }
.tip {
  position: absolute; left: 50%; bottom: calc(100% - 10px); transform: translateX(-50%);
  width: max-content; max-width: 180px; padding: 6px 10px; border-radius: 8px; z-index: 2;
  background: var(--text); color: var(--bg); font-size: 0.82rem; line-height: 1.35;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
td:hover .tip, td:focus .tip { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
th.us, td.us { background: var(--accent-soft); }

/* Tarifs */
.pricing { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 32px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); }
.plan .price { font-size: 2.4rem; font-weight: 700; margin: 8px 0 0; }
.plan .price small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan .per-unit { margin: 2px 0 0; font-size: 0.9rem; }
.plan ul { padding: 0; list-style: none; margin: 20px 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; color: var(--muted); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan .tag { display: inline-block; background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }
.pack { display: grid; grid-template-columns: 1fr 260px; gap: 12px 32px; align-items: center; margin-top: 18px; scroll-margin-top: 84px; }
.pack h3 { margin-top: 0; }
.pack.featured { border: 2px solid var(--accent); margin-top: 32px; }
.pack .tag { display: inline-block; background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }
.pack ul { padding: 0; list-style: none; margin: 12px 0 0; }
.pack li { padding: 4px 0 4px 26px; position: relative; color: var(--muted); }
.pack li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.pack .price { font-size: 2rem; font-weight: 700; margin: 0; }
.pack .price small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pack .per-unit { margin: 2px 0 14px; font-size: 0.9rem; }
/* Offre de lancement du compromis d'essai : ancien prix barré, et sa date de fin. */
.prix-barre { position: relative; display: inline-block; color: var(--muted); font-weight: 400; text-decoration: none; margin-right: 4px; }
.prix-barre::after { content: ""; position: absolute; left: -6%; right: -6%; top: 50%; border-top: 2px solid var(--accent); transform: rotate(-18deg); }
.pack .prix-barre { font-size: 1.4rem; }
.plan .prix-barre { font-size: 1.6rem; }
.bandeau-offre { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; margin: 28px 0 0; padding: 12px 18px; border-radius: 12px; background: var(--accent-soft); }
.bandeau-offre strong { color: var(--accent); }
.bandeau-offre .garantie { margin: 0; background: var(--card); }
.offre { display: inline-block; margin: 0 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.85rem; }
@media (max-width: 640px) { .pack { grid-template-columns: 1fr; } }
.garantie { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; padding: 4px 14px 4px 5px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.garantie svg { width: 22px; height: 22px; flex-shrink: 0; }
.garantie svg path { stroke: var(--card); }
.garantie-rappel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); font-size: 0.9rem; }
.garantie-rappel .garantie { margin: 0; background: var(--card); }
.card .garantie-rappel { margin-top: 16px; }
/* Demande de remboursement du compromis d'essai */
.remboursement { max-width: 720px; margin: 0 auto; text-align: left; }
.remboursement h2 { margin: 28px 0 4px; font-size: 1.15rem; }
.remboursement h2:first-of-type { margin-top: 8px; }
.remboursement fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.remboursement legend { font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; padding: 0; }
.remboursement .aide { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.remboursement .requis { color: var(--alerte); }
.choix-liste { display: grid; gap: 8px; }
.choix-liste .check { margin: 0; color: var(--text); }
.choix-note { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-note label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; }
.choix-note label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.compteur { margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); text-align: right; }
.compteur.ok { color: var(--ok); }
.remboursement .accords { margin-top: 24px; display: grid; gap: 10px; }
.remboursement .accords .check { margin: 0; color: var(--text); }
.remboursement [aria-invalid="true"] { border-color: var(--alerte); }
.remboursement div[aria-invalid="true"], .remboursement .check[aria-invalid="true"] { outline: 2px solid var(--alerte); outline-offset: 4px; border-radius: 8px; }
.note { border-left: 3px solid var(--accent); background: var(--card); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); margin-top: 28px; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Formulaires */
.auth { max-width: 440px; margin: 48px auto; }
.aide-mdp { display: block; margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.tabs { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.tabs button { flex: 1; padding: 10px; border: none; background: var(--card); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
label { display: block; font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.9rem; color: var(--muted); }
.check input { margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.google { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--card); color: var(--text); border-color: var(--border); }
.captcha { border: 1px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 16px; }
.message { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 0.9rem; display: none; }
.message.show { display: block; }
.actualites { max-width: 560px; margin: 24px auto 0; text-align: left; }
.actualites .ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.actualites .ligne input { flex: 1 1 220px; width: auto; }

/* Outil */
.workspace { display: flex; flex-direction: column; gap: 20px; padding: 32px 0 64px; }
.mode-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 4px; background: var(--card); }
.mode-toggle button { border: none; background: transparent; color: var(--muted); padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.mode-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.mode-toggle button:disabled { opacity: 0.6; cursor: not-allowed; }
.mode-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.jauge { font-size: 0.78rem; color: var(--muted); line-height: 1.3; min-width: 130px; }
.jauge-barre { height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; margin: 4px 0 3px; }
/* Coût du dossier en dollars, pour le seul compte de l'administrateur (app.html). */
#cout-admin { padding: 3px 10px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
#cout-admin[hidden] { display: none; }
.jauge-barre span { display: block; height: 100%; background: var(--accent); opacity: 0.7; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px 16px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color 0.15s; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); }
.dropzone strong { color: var(--text); }
.files { list-style: none; padding: 0; margin: 12px 0 0; }
.files li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; font-size: 0.9rem; background: var(--bg); }
.files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files button { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.chat { display: flex; flex-direction: column; min-height: 460px; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.chat-head h3 { margin: 0; }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.chat-log { flex: 1; overflow-y: auto; overflow-anchor: none; display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 12px 0; max-height: 520px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 0.95rem; white-space: pre-wrap; }
.bubble.bot { background: var(--bg); border: 1px solid var(--border); align-self: flex-start; }
.bubble.user { background: var(--accent); color: var(--accent-text); align-self: flex-end; }
.bubble-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; white-space: normal; }
.chat-form { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.chat-form input { flex: 1; }
.chat-attach { flex-shrink: 0; width: 44px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chat-attach:hover { color: var(--accent); border-color: var(--accent); }
.chat-attach svg { width: 20px; height: 20px; }
.chat-attach.signal { animation: volet-signal 1.4s ease-out 0.8s 2; }
.chat.over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.credits { font-size: 0.9rem; color: var(--muted); }

/* Mon espace : compte, puis équipe */
.compte { max-width: 560px; margin-bottom: 40px; }
.compte h2, .equipe-titre { font-size: 1.35rem; }
.compte-infos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0 20px; }
.compte-infos dt { color: var(--muted); font-size: 0.9rem; }
.compte-infos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.equipe .compte-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) {
  .compte-infos { grid-template-columns: 1fr; gap: 2px; }
  .compte-infos dd { margin-bottom: 8px; }
}

/* Mon espace : en-tête des documents (données de l'agence, logo, Mon en-tête) */
.profil { margin-bottom: 40px; }
.profil h2 { font-size: 1.35rem; }
.profil > .muted { margin-top: 8px; }
.profil input:disabled { opacity: 0.75; cursor: not-allowed; }
.profil-label { display: block; font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; }
.profil-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.profil-actions { margin-top: 20px !important; }
.parametre { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.parametre:first-of-type { margin-top: 20px; padding-top: 0; border-top: 0; }
.parametre > label:first-child { margin-top: 0; }
.logo-zone { display: flex; gap: 16px; align-items: center; }
.logo-cadre { flex: none; width: 220px; height: 110px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 0.85rem; }
.logo-cadre img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.logo-boutons label.btn { margin: 0; cursor: pointer; }
.logo-boutons small { flex-basis: 100%; }
@media (max-width: 480px) { .logo-zone { flex-wrap: wrap; } }
.profil-apercu-titre { font-size: 1rem; margin: 28px 0 10px; }
.entete-apercu { border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #1a1a1a; padding: 20px; text-align: center; font-size: 0.85rem; line-height: 1.5; }
.card .entete-apercu p { margin: 0; color: #1a1a1a; }
.card .entete-apercu p.muted { color: #666; }
.entete-apercu img { max-width: 180px; max-height: 70px; object-fit: contain; display: block; margin: 0 auto 10px; }
.entete-apercu .apercu-nom { font-weight: 700; font-size: 1rem; }
.entete-apercu .apercu-personne { margin-top: 10px !important; font-weight: 600; }
@media (max-width: 480px) {
  .profil-duo { grid-template-columns: 1fr; }
}

/* Mon espace : réserve de compromis supplémentaires */
.reserve { max-width: 560px; margin-bottom: 40px; }
.reserve h2 { font-size: 1.35rem; }
.reserve-packs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 16px; }
.reserve-packs .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 12px; padding-bottom: 12px; }
.reserve-packs small { font-weight: 400; opacity: 0.85; }

/* Équipe */
.equipe { padding-top: 32px; padding-bottom: 64px; }
.equipe #owner { padding: 0; }
.equipe .table-wrap { margin-top: 16px; }
.equipe table { min-width: 0; }
.equipe td:first-child { overflow-wrap: anywhere; }
.equipe td:last-child { text-align: right; }
.equipe-places { margin: 16px 0 0; font-weight: 600; }
.equipe-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.equipe-invite { margin-top: 24px; max-width: 560px; }
.equipe-invite-row { display: flex; gap: 8px; }
.equipe-invite-row input { flex: 1; min-width: 0; }
.equipe .card p { margin: 0; }
.equipe #full { margin-top: 10px; }
@media (max-width: 600px) {
  .equipe thead { display: none; }
  .equipe tr { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .equipe tr:last-child { border-bottom: none; }
  .equipe td { padding: 0; border: none; text-align: left; }
  .equipe td:first-child { flex-basis: 100%; font-weight: 600; }
  .equipe td:nth-child(2), .equipe td:nth-child(3) { color: var(--muted); font-size: 0.9rem; }
  .equipe td:nth-child(3)::before { content: attr(data-label) ": "; }
  :lang(fr) .equipe td:nth-child(3)::before { content: attr(data-label) " : "; }
  .equipe td:last-child { flex-basis: 100%; text-align: left; }
  .equipe-actions { justify-content: flex-start; margin-top: 6px; }
}

/* Mon espace : menu des rubriques à gauche, une rubrique affichée à la fois */
.espace-cadre { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
.espace-menu { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 88px; }
.espace-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.espace-menu a:hover { background: var(--card); color: var(--text); }
.espace-menu a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.espace-menu a[hidden] { display: none; }
.espace-contenu .rubrique { max-width: 640px; margin-bottom: 0; }
.espace-contenu #rubrique-equipe { max-width: none; }
.espace-contenu .equipe-titre { margin-top: 0; }
.compte-equipe { margin-bottom: 16px !important; }
.reserve-solde { margin-top: 12px !important; font-weight: 600; color: var(--text) !important; }
.reserve #reserve-info { margin-top: 12px; }
@media (max-width: 800px) {
  .espace-cadre { grid-template-columns: 1fr; gap: 20px; }
  .espace-menu { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .espace-menu a { border: 1px solid var(--border); background: var(--card); padding: 8px 12px; font-size: 0.9rem; }
  .espace-menu a[aria-current="page"] { border-color: var(--accent); }
}

/* Volets repliables : le formulaire à gauche, les pièces à droite.
   Replié, un volet devient une bande avec » ou « pour le rouvrir. */
.container { transition: max-width 0.8s ease-in-out; }
body.wide .container { max-width: 1480px; }
.volet { position: relative; padding: 0; overflow: hidden; }
/* Volet des pièces absent tant que le compromis n'est pas lancé (app.html). */
.workspace > .volet.absent { display: none !important; }
.volet-corps { padding: 24px; }
.volet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.volet-head h3 { margin: 0; }
/* Pièces du dossier en grand (pieces.js) : le volet couvre presque tout l'écran, le reste s'assombrit derrière. */
.volet-head > .volet-agrandir { margin-left: auto; }
.volet-agrandir { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); border-radius: 8px; cursor: pointer; }
.volet-agrandir[hidden] { display: none; }
.volet-agrandir:hover, .volet-agrandir[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.volet-agrandir svg { width: 18px; height: 18px; }
.volet-agrandir .icone-reduire, .volet-agrandir[aria-pressed="true"] .icone-agrandir { display: none; }
.volet-agrandir[aria-pressed="true"] .icone-reduire { display: block; }
.workspace > .volet.pieces.plein { position: fixed; inset: 16px; z-index: 60; max-width: 1400px; margin: 0 auto; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5); transition: none; }
.volet.pieces.plein .volet-corps { height: 100%; display: flex; flex-direction: column; }
.volet.pieces.plein .piece-view { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
body.pieces-plein::after { content: ''; position: fixed; inset: 0; z-index: 55; background: rgba(15, 20, 28, 0.45); }
body.pieces-plein { overflow: hidden; }
.volet-replier { flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); border-radius: 8px; font: inherit; font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer; }
.volet-replier:hover, .volet-rail:hover .volet-fleche { color: var(--accent); border-color: var(--accent); }
.volet-rail { display: none; width: 100%; align-items: center; gap: 10px; padding: 14px 18px; border: none; background: var(--card); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.volet-rail:hover { background: var(--accent-soft); }
.volet-rail[aria-disabled="true"] { cursor: not-allowed; }
.volet-rail[aria-disabled="true"]:hover { background: var(--card); }
.volet-rail[aria-disabled="true"] .volet-fleche, .volet-rail[aria-disabled="true"]:hover .volet-fleche { color: var(--muted); border-color: var(--border); opacity: 0.5; }
.volet-fleche { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--accent); font-size: 1.15rem; font-weight: 700; line-height: 1; }
@keyframes volet-signal { from { box-shadow: 0 0 0 0 var(--accent); } to { box-shadow: 0 0 0 12px transparent; } }
.pieces .volet-corps { display: flex; flex-direction: column; }
.card .pieces-empty { margin: 0; color: var(--muted); }
.card .pieces-attente { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.card .pieces-lancer p { margin: 0 0 14px; }
.card .pieces-perime { margin: 0 0 12px; padding: 6px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--muted); font-size: 0.8rem; }
.pieces-avertissement { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: 0.85rem; }
.card .pieces-avertissement p { flex-basis: 100%; margin: 0; color: var(--text); }
.spinner { width: 20px; height: 20px; flex-shrink: 0; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Écran étroit : volets empilés, un volet replié devient une barre */
@media (max-width: 899px) {
  .volet.replie .volet-corps { display: none; }
  .volet.replie .volet-rail { display: flex; }
  .pieces .volet-corps { min-height: 460px; }
}

/* Écran large : volets côte à côte, repli animé lentement en largeur */
@media (min-width: 900px) {
  .workspace { flex-direction: row; height: calc(100vh - 64px); min-height: 620px; padding-bottom: 32px; }
  .workspace > .card { flex: 1 1 0; min-width: 0; transition: flex-grow 0.8s ease-in-out, flex-basis 0.8s ease-in-out; }
  .workspace > .card.principal { flex-grow: 2; }
  /* Questions ouvertes : le formulaire prend la plus grande place. */
  .workspace.questions > .card.principal { flex-grow: 3; }
  .workspace > .volet.replie { flex: 0 0 56px; }
  .volet-corps { height: 100%; min-width: 320px; overflow-y: auto; opacity: 1; transition: opacity 0.4s ease 0.5s; }
  .volet.replie .volet-corps { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s 0.3s; }
  .volet-rail { display: flex; position: absolute; inset: 0; flex-direction: column; justify-content: flex-start; gap: 14px; padding: 18px 0; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s 0.3s; }
  .volet.replie .volet-rail { opacity: 1; visibility: visible; transition: opacity 0.4s ease 0.5s; }
  .volet-titre { writing-mode: vertical-rl; font-size: 0.9rem; letter-spacing: 0.02em; }
  .chat { min-height: 0; }
  .chat-log, .piece-view { max-height: none; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .container, .workspace > .card, .volet-corps, .volet-rail { transition: none !important; }
  .chat-attach.signal { animation: none; }
}
.card .pieces-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-size: 0.85rem; }
.pieces-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.pieces-tabs button { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; padding: 6px 12px; font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-align: left; line-height: 1.3; }
.pieces-tabs button small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.pieces-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pieces-tabs button[aria-selected="true"] small { color: var(--accent-text); opacity: 0.85; }
.piece-view { flex: 1; overflow-y: auto; max-height: 560px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 16px; font-size: 0.92rem; }
.card .piece-view p { margin: 0 0 10px; color: var(--text); }
.piece-page { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 22px 24px; font-family: Georgia, "Times New Roman", serif; }
.piece-page h4 { margin: 16px 0 6px; font-size: 1rem; }
.piece-page h4:first-child { margin-top: 0; text-align: center; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.04em; }
/* Aperçu d'un document Word : une page blanche, comme à l'impression, quel que soit le thème. */
.piece-word { background: #fff; color: #1f1f1f; border-color: #d9dde3; font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 0.88rem; line-height: 1.45; padding: 28px 30px; }
.card .piece-word p { color: #1f1f1f; margin: 0 0 7px; text-align: justify; hyphens: auto; }
.card .piece-word .pw-centre { text-align: center; hyphens: none; }
.card .piece-word .pw-rubrique { margin: 18px 0 7px; color: #2f5d8a; font-size: 0.92rem; font-weight: 700; text-transform: uppercase; }
.piece-word .pw-sous { margin: 12px 0 5px; font-size: 0.88rem; font-weight: 700; }
.piece-word .pw-image { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
.piece-word .pw-cadre { border: 1px solid #404040; padding: 8px 10px; margin: 0 0 12px; }
.card .piece-word .pw-cadre p { margin: 0 0 4px; text-align: left; }
.card .piece-word .pw-cadre p:last-child { margin-bottom: 0; }
.card .piece-word .pw-cadre.pw-tableau { width: 80%; margin: 0 auto; padding: 14px 20px 8px; border: 0; border-left: 4px solid #2f5d8a; background: #f2f5f9; }
.card .piece-word .pw-cadre.pw-tableau p { margin: 0 0 7px; }
/* Titres des parties : un bandeau teinté avec un trait d'accent (les anciens projets les mettaient entre deux filets). */
.card .piece-word .pw-bande, .card .piece-word .pw-filets { margin: 32px 0 16px 4px; padding: 7px 14px; border: 0; border-left: 4px solid #2f5d8a; background: #eaf0f6; color: #2f5d8a; font-size: 0.88rem; font-weight: 700; text-align: left; text-transform: none; white-space: pre-line; }
.card .piece-word .pw-filets { font-size: 1.04rem; }
/* Titre de la page de garde : la première ligne en très grand, la suite plus petite (tailles reprises du Word). */
.card .piece-word .pw-titre { margin: 0 0 13px; padding: 0; border: 0; background: none; text-align: center; text-transform: none; color: #1f1f1f; white-space: pre-line; font-size: 0.88rem; font-weight: 400; line-height: 1.2; hyphens: none; }
.card .piece-word .pw-titre-garde, .card .piece-word .pw-filets.pw-titre { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1.25; }
.piece-word .pw-accent { width: 54px; border: 0; border-top: 3px solid #b85a2b; margin: 0 auto 24px; }
.piece-word .pw-filet { border: 0; border-top: 1px solid #2f5d8a; margin: 22px 0 22px; }
.card .piece-word .pw-suspendu { padding-left: 1.6em; text-indent: -1.6em; white-space: pre-wrap; tab-size: 1.6em; text-align: left; margin: 12px 0; }
.card .piece-word .pw-conseil { width: 80%; margin: 24px auto 48px; color: #595959; }
.piece-word mark { background: #fff35c; color: inherit; padding: 0 1px; }
/* Mise en forme reprise du Word : tabulation (numéro d'article puis son titre), puces, tableaux de plusieurs cases. */
.piece-word .pw-tab { display: inline-block; width: 1.4em; }
.card .piece-word .pw-puce { position: relative; text-align: left; }
.piece-word .pw-puce-signe { position: absolute; left: 0; }
.piece-word .pw-grille { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.piece-word .pw-grille td { vertical-align: middle; padding: 6px 10px; }
.card .piece-word .pw-grille td p, .card .piece-word .pw-grille td h5 { margin: 0; text-align: left; }
/* Surcouche du projet (balises.js) : champ à remplir, liste de choix, zone d'hypothèses à trier. */
.piece-word .pw-champ { color: #5f6b78; background: #f1f4f8; border: 1px dashed #9aa7b5; border-radius: 3px; padding: 0 3px; }
.piece-word .pw-zone { border-bottom: 1px dashed #b85a2b; background: #fcf6f2; }
.piece-word .pw-zone-bloc { border-left: 3px dashed #b85a2b; background: #fcf6f2; padding: 6px 10px 1px; margin: 0 0 10px; }
/* Saisie dans l'aperçu (pieces.js) : passages cliquables, et le petit formulaire qui s'ouvre sous leur paragraphe. */
.piece-word .pw-saisie { cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.piece-word .pw-champ.pw-saisie:hover, .piece-word .pw-champ.pw-saisie:focus-visible { color: #b85a2b; background: #fbeee6; border-color: #b85a2b; border-style: solid; outline: none; }
.piece-word .pw-zone.pw-saisie:hover, .piece-word .pw-zone-bloc.pw-saisie:hover, .piece-word .pw-saisie:focus-visible { background: #f8e5d9; outline: none; }
.piece-word .pw-editeur { margin: 6px 0 14px; padding: 12px 14px; border: 1px solid #b85a2b; border-radius: 10px; background: #fffaf6; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.35); font-size: 0.92rem; color: #1f2933; text-align: left; text-transform: none; font-weight: 400; letter-spacing: normal; }
.piece-word .pw-editeur-titre { margin: 0 0 8px; font-weight: 600; color: #b85a2b; }
.piece-word .pw-editeur-passage { margin: 0 0 10px; padding: 6px 10px; border-left: 3px solid #e6c3ad; background: #fff; color: #3b4652; }
.piece-word .pw-editeur-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.piece-word .pw-editeur-option { padding: 5px 10px; border: 1px solid #d5dbe2; border-radius: 8px; background: #fff; color: #1f2933; font: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; }
.piece-word .pw-editeur-long { flex-direction: column; }
.piece-word .pw-editeur-long .pw-editeur-option { width: 100%; padding: 8px 12px; line-height: 1.4; }
.piece-word .pw-editeur-option:hover, .piece-word .pw-editeur-option:focus-visible { border-color: #b85a2b; color: #b85a2b; outline: none; }
.piece-word .pw-editeur-champ { width: 100%; padding: 7px 10px; border: 1px solid #c5ccd4; border-radius: 8px; background: #fff; color: #1f2933; font: inherit; font-size: 0.9rem; resize: vertical; }
.piece-word .pw-editeur-erreur { margin: 8px 0 0; color: #b42318; font-size: 0.85rem; }
.piece-word .pw-editeur-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.piece-word .pw-editeur-pied .pw-edition-supprimer { margin-left: auto; color: #b42318; }
/* Aperçu du Word : édition libre d'un paragraphe (crayon au survol, double-clic) et commentaires à résoudre */
.piece-word .pw-outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin: -12px 0 16px; padding: 6px 10px; border-radius: 8px; background: #f4f6f8; color: #5b6673; font-size: 0.8rem; text-align: left; }
.piece-word .pw-outils .lien { font-size: 0.8rem; }
.piece-word .pw-editable { position: relative; }
.piece-word .pw-editable:hover { background: #fbf6f2; box-shadow: -6px 0 0 #fbf6f2, 6px 0 0 #fbf6f2; }
.piece-word .pw-crayon { position: absolute; top: 0; right: -26px; width: 22px; height: 22px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #b85a2b; cursor: pointer; opacity: 0; transition: opacity 0.15s; font: 0.85rem/1 sans-serif; }
.piece-word .pw-crayon::before { content: '✎'; }
.piece-word .pw-editable:hover > .pw-crayon, .piece-word .pw-crayon:focus-visible { opacity: 1; }
.piece-word .pw-crayon:hover, .piece-word .pw-crayon:focus-visible { border-color: #e6c3ad; background: #fff; outline: none; }
@media (hover: none) { .piece-word .pw-crayon { opacity: 0.55; } }
.piece-word .pw-en-edition { opacity: 0.45; }
.piece-word .pw-edition-barre { display: flex; gap: 4px; margin-bottom: 6px; }
.piece-word .pw-edition-forme { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid #d5dbe2; border-radius: 6px; background: #fff; color: #1f2933; font: inherit; font-size: 0.88rem; cursor: pointer; }
.piece-word .pw-edition-forme:hover, .piece-word .pw-edition-forme:focus-visible { border-color: #b85a2b; color: #b85a2b; outline: none; }
.piece-word .pw-edition-g { font-weight: 700; }
.piece-word .pw-edition-i { font-style: italic; }
.piece-word .pw-edition-s { text-decoration: underline; }
.piece-word .pw-edition-texte { min-height: 64px; max-height: 50vh; overflow-y: auto; padding: 8px 10px; border: 1px solid #c5ccd4; border-radius: 8px; background: #fff; color: #1f1f1f; font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 0.9rem; line-height: 1.45; white-space: pre-wrap; tab-size: 4; outline: none; }
.piece-word .pw-edition-texte:focus { border-color: #b85a2b; box-shadow: 0 0 0 2px #f3d9c9; }
.piece-word .pw-commente { background: #fdf7e8; box-shadow: -6px 0 0 #fdf7e8, 6px 0 0 #fdf7e8; }
.piece-word .pw-commentaires { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 12px 18px; }
.piece-word .pw-commentaire { padding: 8px 12px; border-left: 3px solid #d9a441; border-radius: 0 8px 8px 0; background: #fdf7e8; color: #3b4652; font-size: 0.82rem; text-align: left; text-transform: none; font-weight: 400; letter-spacing: normal; }
.piece-word .pw-commentaire p { margin: 0 0 6px; }
.piece-word .pw-commentaire-auteur { font-weight: 700; color: #8a6514; font-size: 0.75rem; }
.piece-word .pw-commentaire-texte { white-space: pre-line; }
.piece-word .pw-commentaire .btn { padding: 3px 10px; font-size: 0.78rem; }
.piece-word del { color: #c0392b; }
.piece-word ins { color: #1e7b34; }
.piece-word ins.recente { background: #d9f2df; border-radius: 2px; animation: recente 2.4s ease-out 2; }
@keyframes recente { 50% { background: #a8e0b6; } }
/* Pièces gardées dans le navigateur : rappel discret sous le titre du volet */
.card .pieces-sauve { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pieces-sauve .coche { color: var(--ok); font-weight: 700; }
.attente-duree { margin-left: auto; font-style: normal; font-size: 0.8rem; opacity: 0.8; }
/* Assistant : attente dans le fil (roue et phrases qui défilent) et questions sur les points à trancher */
.bubble.attente { display: flex; align-items: center; gap: 12px; color: var(--muted); font-style: italic; }
.attente-texte { transition: opacity 0.3s; }
.attente-texte.change { opacity: 0; }
.bubble.questions { width: 85%; white-space: normal; }
.card .questions-rang { margin: 0 0 4px; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.card .questions-texte { margin: 0 0 12px; color: var(--text); font-weight: 600; white-space: pre-wrap; }
.card .questions-consigne { margin: -6px 0 8px; color: var(--muted); font-size: 0.85rem; }
.questions-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.questions-options button { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt); color: var(--text); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; }
/* Une case à cocher devant chaque option : on voit qu'elle se coche, et qu'on peut en cocher plusieurs. */
.questions-options button::before { content: ''; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 4px; background: var(--card); }
.questions-options button:hover, .questions-options button:focus-visible { border-color: var(--accent); color: var(--accent); }
.questions-options button.choisie { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.questions-options button.choisie::before { content: '✓'; display: flex; align-items: center; justify-content: center; border-color: var(--accent); background: var(--accent); color: var(--accent-text); font-size: 0.75rem; font-weight: 700; }
input.questions-libre { width: 100%; }
.questions-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.questions-liens { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.88rem; }
/* Questions d'avant la rédaction (et points à trancher) : un formulaire complet et serré, par rubriques, avec les suites
   qui apparaissent sous la réponse qui les amène et le bouton d'envoi toujours visible en bas du fil. */
.chat-log:has(.formulaire) { padding-bottom: 0; }
.bubble.questions.formulaire { width: 100%; max-width: none; padding: 0; background: var(--card); white-space: normal; align-self: stretch; }
.fq-tete { padding: 14px 20px 2px; }
.card .fq-consigne { margin: 0; color: var(--muted); font-size: 0.84rem; }
.fq-rubrique { padding: 0 20px; }
.card .fq-titre { margin: 20px 0 2px; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.fq-question { min-width: 0; padding: 10px 0 8px; }
.card .fq-texte { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; color: var(--text); font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
/* Numéro discret ; une coche une fois la question répondue. */
.fq-numero { flex: none; min-width: 18px; color: var(--muted); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: color 0.2s; }
.fq-question.repondue > .fq-texte .fq-numero { color: var(--ok); font-size: 0; }
.fq-question.repondue > .fq-texte .fq-numero::before { content: '✓'; font-size: 0.82rem; }
.card .fq-attendu { margin: -3px 0 7px 26px; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.fq-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-left: 26px; }
label.fq-option { position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); font-weight: 400; font-size: 0.86rem; line-height: 1.35; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
label.fq-option:hover { border-color: var(--accent); }
label.fq-option.cochee { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* La case reste pour le clavier et les lecteurs d'écran ; seule la pastille se voit. */
.fq-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
label.fq-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Plusieurs réponses possibles : une petite coche devant les options cochées. */
.fq-options:not(.fq-unique) label.fq-option.cochee::before { content: '✓'; font-size: 0.75rem; }
.fq-options .fq-libre { flex: 1 1 220px; width: auto; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 0.87rem; line-height: 1.4; }
.fq-options textarea.fq-libre { flex-basis: 100%; resize: none; overflow: hidden; min-height: 34px; }
/* Avec des options, le champ de précision reste discret : un simple trait, qui s'affirme au focus ou quand une option
   demande une précision. */
.fq-options .fq-libre.fq-precision { flex: 1 1 140px; padding: 4px 4px; border: none; border-bottom: 1px dashed var(--border); border-radius: 0; background: transparent; }
.fq-options .fq-libre.fq-precision:focus, .fq-options .fq-libre.fq-attendu-champ { border-bottom: 1px solid var(--accent); outline: none; }
.fq-options .fq-libre.fq-attendu-champ { flex-basis: 100%; }
.fq-options .fq-libre:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.fq-options .fq-libre.fq-precision:focus { box-shadow: none; }
.card .fq-controle { margin: 5px 0 0 26px; color: var(--avertir); font-size: 0.8rem; line-height: 1.4; }
.card .fq-controle.ok { color: var(--ok); }
.fq-question.fq-douteuse > .fq-options .fq-libre { border-color: var(--avertir); }
.fq-question .fq-suite { margin: 6px 0 0 26px; padding: 4px 0 0 12px; border-left: 2px solid var(--accent-soft); }
.fq-suite .fq-options, .fq-suite .fq-attendu, .fq-suite .fq-controle { padding-left: 0; margin-left: 0; }
.card .fq-suite .fq-texte { font-size: 0.87rem; font-weight: 500; margin-bottom: 6px; }
.fq-suite.apparait { animation: fq-apparait 0.35s ease-out; }
@keyframes fq-apparait { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fq-pied { position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px 20px; border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; background: var(--card); }
/* La barre de l'assistant (trombone, champ de texte), au pied du formulaire pendant les questions : l'envoi se fait par Entrée. */
.fq-pied .chat-form.dans-questions { flex: 1 1 240px; min-width: 0; border-top: 0; padding-top: 0; }
.fq-pied .chat-form.dans-questions > button[type="submit"] { display: none; }
.card .fq-alerte { flex-basis: 100%; margin: 0; color: var(--alerte); font-size: 0.84rem; font-weight: 600; }
.card .fq-alerte.fq-avertissement { color: var(--avertir); }
.fq-avance { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 0.8rem; }
.fq-jauge { display: block; width: 160px; max-width: 100%; height: 4px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.fq-jauge span { display: block; height: 100%; background: var(--accent); transition: width 0.3s ease; }
@media (max-width: 560px) { .fq-rubrique, .fq-tete { padding-left: 14px; padding-right: 14px; } .fq-options, .card .fq-attendu, .card .fq-controle { padding-left: 0; margin-left: 0; } .fq-question .fq-suite { margin-left: 8px; } }
@media (prefers-reduced-motion: reduce) { .fq-suite.apparait { animation: none; } .fq-jauge span { transition: none; } }
.mail-head { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.mail-head dt { color: var(--muted); font-weight: 600; }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-pj { border: 1px solid var(--border); background: var(--card); color: var(--accent); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 0.85rem; cursor: pointer; margin: 0 6px 4px 0; }
.mail-pj:disabled { color: var(--muted); cursor: default; }
.mail-body { white-space: pre-wrap; }
.piece-table { min-width: 0; }
.piece-table td { padding: 8px 10px; }
.piece-table td:last-child { text-align: right; white-space: nowrap; }
.piece-table tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.piece-list { margin: 0; padding-left: 20px; }
.piece-list li { margin-bottom: 8px; }
.piece-list-titre { margin: 18px 0 8px; font-size: 1em; }
.piece-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Contenu légal */
.legal { max-width: 780px; padding: 48px 16px 64px; }
.legal h2 { font-size: 1.3rem; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); }
.draft { background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; font-size: 0.9rem; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* Masque l'espace tant que la session n'est pas vérifiée */
body.loading main { visibility: hidden; }
[hidden] { display: none !important; }

.captcha-box { margin-top: 16px; }
altcha-widget { --altcha-max-width: 100%; --altcha-color-base: var(--bg); --altcha-color-text: var(--text); --altcha-color-border: var(--border); --altcha-border-radius: 10px; }

/* Choix de la langue */
.nav .lang { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }

/* Administration */
.admin { padding-top: 32px; padding-bottom: 64px; }
.admin .auth h1 { font-size: 1.6rem; }
.admin h2 { font-size: 1.35rem; margin-top: 40px; }
.admin .table-wrap { margin-top: 12px; position: relative; }
.admin th, .admin td { padding: 10px 12px; }
.admin td { white-space: nowrap; }
.admin td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 180px; }
.admin-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.admin-head h1 { font-size: 1.8rem; margin: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-actions select { width: auto; }
.admin-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 24px; }
.admin-kpi { padding: 18px; }
.admin-kpi strong { display: block; font-size: 1.6rem; margin: 4px 0; overflow-wrap: anywhere; }
.admin-kpi p:first-child { font-size: 0.85rem; font-weight: 600; }
.admin-kpi p:last-child:not(:first-child) { font-size: 0.85rem; }

/* Guides (pages piliers) */
.guide { padding: 40px 0 64px; }
.guide-container { max-width: 780px; }
.guide section { padding: 0; margin-top: 40px; }
.guide h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.guide h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.guide p, .guide li { font-size: 1.02rem; }
.guide ul, .guide ol { padding-left: 22px; }
.guide li { margin: 6px 0; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); }
.guide-meta { color: var(--muted); font-size: 0.9rem; margin: 16px 0 0; }
.guide-toc { margin-top: 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.guide-toc-titre { font-weight: 700; margin: 0 0 6px; }
.guide-toc ol { margin: 0; }
.guide-toc li { margin: 3px 0; font-size: 0.95rem; }
.guide ul.checklist { list-style: none; padding-left: 0; }
.guide ul.checklist li { position: relative; padding-left: 30px; }
.guide ul.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 0.8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.guide ol.timeline { list-style: none; padding-left: 0; counter-reset: etape; border-left: 2px solid var(--border); margin-left: 12px; }
.guide ol.timeline li { counter-increment: etape; position: relative; padding: 0 0 14px 28px; }
.guide ol.timeline li::before {
  content: counter(etape); position: absolute; left: -13px; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 0.8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.guide blockquote { margin: 16px 0; padding: 16px 20px; background: var(--card); border-left: 4px solid var(--accent); border-radius: 8px; }
.guide .table-wrap table { min-width: 520px; }
.guide .table-wrap td:not(:first-child), .guide .table-wrap th:not(:first-child) { text-align: left; }
.guide-cta { margin-top: 48px; padding: 28px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--border); }
.guide-cta h2 { margin-top: 0; }
.guide-cta p { color: var(--text); }
.guide-cta .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.guide-sources ul { padding-left: 22px; }
.guide-avertissement { font-size: 0.88rem; margin-top: 18px; }
.guide-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.guide-card:hover { border-color: var(--accent); }
.guide-card h3 { margin: 0; }
.guide-lire { margin-top: auto; padding-top: 10px; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.guide-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.guide-recherche { max-width: 760px; margin-top: 24px; scroll-margin-top: 88px; }
.guide-recherche-champs { display: flex; flex-wrap: wrap; gap: 10px; }
.guide-recherche input { flex: 1 1 260px; width: auto; padding: 12px 14px; font-size: 1rem; }
.guide-recherche select { flex: 0 1 300px; width: auto; padding: 12px 14px; font-size: 1rem; cursor: pointer; }
@media (max-width: 600px) { .guide-recherche select { flex-basis: 100%; } }
.guide-recherche-compte { font-size: 0.88rem; margin: 8px 0 0; }
.guide-recherche-vide { margin-top: 20px; }
.guide-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; }
.guide-pagination button { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 0.95rem; cursor: pointer; }
.guide-pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.guide-pagination button[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.guide-pagination button:disabled { opacity: 0.4; cursor: default; }

/* Tarifs : collaborateurs à retirer avant de passer à une formule plus petite */
.retrait { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); padding: 24px; width: calc(100% - 32px); max-width: 520px; }
.retrait::backdrop { background: rgba(0, 0, 0, 0.45); }
.retrait h2 { font-size: 1.25rem; margin: 0 0 10px; }
.retrait-liste { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; }
.retrait-liste label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-weight: 400; overflow-wrap: anywhere; cursor: pointer; }
.retrait-liste small { flex-basis: 100%; padding-left: 26px; }
.retrait-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

/* Dossiers en cours : fiches de « Mes compromis » */
.chat-boutons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dossier-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dossier-nom { overflow-wrap: anywhere; }
.dossier-conservation .btn { margin-left: 4px; }
.conservation-proche { color: var(--alerte); font-weight: 700; }
button.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.dossier-attente { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); }
.attente-item { display: inline-flex; align-items: center; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); }
.dossiers-erreur { color: var(--accent); font-weight: 600; }

/* Page « Mes compromis » et compteur du menu */
.nav-compteur { display: inline-block; min-width: 1.5em; margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: 1px; }
.compromis-page { max-width: 860px; }
.compromis-page .lead { margin: 0 0 24px; }
.compromis-pourquoi { border-left: 4px solid var(--accent); }
.compromis-pourquoi h2 { font-size: 1.15rem; margin: 0 0 8px; }
.card.compromis-pourquoi p { font-size: 0.95rem; }
.card.compromis-pourquoi p + p { margin-top: 10px; }
.compromis-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.compromis-boutons { margin: 24px 0 0; }
.compromis-mdp { margin-top: 16px; }
.card.compromis-mdp p { margin: 12px 0 0; }
.compromis-liste { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 24px 0 0; padding: 0; }
.compromis-item { display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.compromis-item h2 { font-size: 1.2rem; margin: 0; }
.compromis-item .dossier-conservation, .compromis-item .dossier-attente { font-size: 0.9rem; }
.card .compromis-meta { font-size: 0.85rem; }
.compromis-item .compromis-actions { margin-top: 4px; }
.compromis-vide { color: var(--muted); }
/* Visite guidée (demo.html) : les explications à gauche, l'écran de l'application à droite */
.demo { padding-top: 40px; padding-bottom: 64px; }
.demo-intro { max-width: 760px; margin-bottom: 28px; }
.demo-intro h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.demo-intro .lead { margin: 0; }
.demo-cadre { scroll-margin-top: 84px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); grid-template-areas: "guide ecran" "nav ecran"; grid-template-rows: auto 1fr; gap: 0 28px; align-items: start; }
.demo-guide { grid-area: guide; scroll-margin-top: 80px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.demo-guide h2 { font-size: 1.35rem; margin: 6px 0 10px; }
.card.demo-guide p { color: var(--text); }
.card.demo-guide p + p { margin-top: 10px; }
.demo-etape { margin: 0; color: var(--accent) !important; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.demo-points { display: flex; gap: 6px; margin: 10px 0 4px; }
.demo-points button { width: 26px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: var(--border); cursor: pointer; }
.demo-points button[aria-current="step"], .demo-points button.vu { background: var(--accent); }
.demo-points button.vu:not([aria-current]) { opacity: 0.45; }
.demo-nav { grid-area: nav; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 0 24px 24px; background: var(--card); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.demo-nav .btn { flex: 1 1 auto; text-align: center; }
.demo-nav .demo-clavier { flex-basis: 100%; margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }
.demo-fin { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.demo-fin .btn { text-align: center; }
.demo-ecran { grid-area: ecran; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); overflow: hidden; box-shadow: 0 12px 32px rgba(31, 42, 55, 0.08); }
.demo-barre { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--card); font-size: 0.8rem; color: var(--muted); }
.demo-barre .feux { display: flex; gap: 5px; }
.demo-barre .feux span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.demo-barre .adresse { flex: 1; min-width: 0; padding: 3px 10px; border-radius: 6px; background: var(--bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-fictif { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.demo-vue { padding: 20px; height: min(640px, calc(100vh - 150px)); min-height: 480px; overflow-y: auto; }
.demo-vue > .card { padding: 20px; }
.demo-vue .chat { min-height: 0; }
.demo-vue .chat-log { max-height: none; overflow: visible; }
.demo-vue .piece-view { max-height: 560px; }
.demo-vue select:disabled, .demo-vue textarea[readonly], .demo-vue input:disabled { opacity: 1; cursor: default; }
.demo-vue .files li { animation: demo-apparait 0.35s ease-out both; }
.demo-manque { border-style: dashed !important; color: var(--muted); }
.demo-manque strong, .demo-recap strong { color: var(--alerte); font-weight: 600; }
.demo-vue .btn.demo-signal { animation: demo-signal 1.4s ease-out infinite; }
@keyframes demo-signal { from { box-shadow: 0 0 0 0 var(--accent); } to { box-shadow: 0 0 0 12px transparent; } }
@keyframes demo-apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-vue .bubble { animation: demo-apparait 0.35s ease-out both; }
.demo-vue .bubble blockquote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--ok); background: var(--card); border-radius: 0 8px 8px 0; white-space: normal; }
.demo-vue .bubble blockquote ins { text-decoration: none; color: var(--ok); }
.demo-progression { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 4px 0 0; }
.demo-progression span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s linear; }
.demo-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-size: 0.85rem; }
.demo-vue .piece-word .pw-champ.demo-cible { animation: demo-signal 1.4s ease-out infinite; }
.demo-vue .demo-note .lien { margin-left: 4px; }
.demo-vue .chat-log > .chat-form { display: none; }
.demo-relecture { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 14px; align-items: start; }
.demo-commentaire { border-left: 3px solid #c99a1e; background: #fff8e1; color: #3b3320; border-radius: 0 8px 8px 0; padding: 8px 10px; font-size: 0.8rem; line-height: 1.4; }
.demo-commentaire + .demo-commentaire { margin-top: 10px; }
.demo-commentaire strong { display: block; font-size: 0.75rem; color: #8a6a12; }
@media (max-width: 899px) {
  .demo-cadre { grid-template-columns: 1fr; grid-template-areas: "guide" "ecran" "nav"; gap: 0; }
  .demo-guide { border-bottom: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
  .demo-nav { position: sticky; top: auto; bottom: 0; z-index: 5; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 -6px 20px rgba(31, 42, 55, 0.08); }
  .demo-nav .demo-clavier { display: none; }
  .demo-vue { padding: 12px; height: auto; min-height: 0; max-height: 65vh; }
  .demo-vue > .card { padding: 16px; }
  .demo-relecture { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-vue .files li, .demo-vue .bubble, .demo-vue .btn.demo-signal, .demo-vue .pw-champ.demo-cible { animation: none; }
}
/* Démo : en-tête de l'agence en tête du projet Word, comme docx_entete(). */
.piece-word .pw-entete { text-align: center; color: #404040; font-size: 0.75rem; line-height: 1.35; padding-bottom: 10px; margin-bottom: 30px; }
.card .piece-word .pw-entete p { margin: 0; text-align: center; color: #404040; hyphens: none; }
.piece-word .pw-logo { display: block; width: 170px; height: auto; margin: 0 auto 8px; }
.card .piece-word .pw-entete .pw-agence { font-weight: 700; font-size: 1rem; }
.card .piece-word .pw-entete .pw-personne { font-weight: 700; margin-top: 8px; }

/* Feedback « Proposer une amélioration » (Mes compromis, feedback.js) */
.feedback { margin-top: 24px; scroll-margin-top: 96px; }
@media (max-width: 760px) { .feedback { scroll-margin-top: 140px; } }
.card.feedback p { margin: 0; }
.feedback fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.feedback legend { font-weight: 600; font-size: 0.9rem; margin: 0 0 6px; padding: 0; }
.feedback .aide { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.feedback .feedback-rappel { margin-top: 16px; }
.card.feedback .dossiers-erreur { margin-top: 12px; }
.card.feedback .compromis-actions { margin-top: 16px; }

/* À propos : badges de confiance, compacts (icône, titre, une ligne) */
.confiance { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); margin-top: 32px; }
.confiance > div { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.confiance svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--accent); }
.confiance p { margin: 0; }
.confiance strong { display: block; font-size: 0.95rem; }
.confiance span { display: block; font-size: 0.85rem; color: var(--muted); }
.apropos-texte { max-width: 720px; }
.apropos-texte p { color: var(--muted); }
.apropos-texte p strong { color: var(--text); }
.contact { margin-top: 24px; }
.contact .piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Webinaires de lancement */
.webinaire { max-width: 640px; margin: 0 auto; text-align: left; }
.webinaire fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.webinaire legend { font-weight: 600; font-size: 0.9rem; margin: 0 0 8px; padding: 0; }
.seances { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.seances label { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; }
.seances label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.seances label.passee { opacity: 0.5; cursor: not-allowed; }
.seances input { margin-top: 4px; }
.seances strong { display: block; }
.seances span span { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.webinaire .duo { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.webinaire .check { margin-top: 18px; }
.webinaire .piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.programme { max-width: 640px; margin: 24px auto 0; padding-left: 1.2em; text-align: left; color: var(--muted); }
.programme li { margin: 6px 0; }

/* Affiche du webinaire dans le haut de l'accueil : colonne de droite sur grand écran, sous les boutons sinon */
.affiche { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; max-width: 380px; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--accent); color: var(--text); text-decoration: none;
  background: linear-gradient(160deg, var(--accent-soft), var(--card) 65%); box-shadow: 0 12px 32px -18px var(--accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease; }
.affiche:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px var(--accent); }
.affiche-direct { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.affiche-direct .point { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); animation: direct 1.8s infinite; }
@keyframes direct { 70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.affiche-titre { font-size: 1.35rem; line-height: 1.2; }
.affiche-texte { color: var(--muted); font-size: 0.92rem; }
.affiche-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.affiche .date { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.affiche .jour { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--accent); }
.affiche .mois { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.affiche .heure { margin-top: 4px; font-size: 0.82rem; color: var(--muted); }
.affiche-rebours { font-size: 0.85rem; font-weight: 600; text-align: center; }
.affiche-rebours:empty { display: none; }
.affiche .btn { text-align: center; }
@media (min-width: 960px) {
  /* Texte, boutons et badges à gauche, l'un sous l'autre ; la hauteur en plus de l'affiche va sous les badges. */
  .hero-webinaire .container { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto auto auto 1fr; column-gap: 48px; align-items: start; }
  .hero-webinaire .container > * { grid-column: 1 / -1; }
  .hero-webinaire .container > .lead, .hero-webinaire .container > .actions, .hero-webinaire .container > .badges { grid-column: 1; }
  .hero-webinaire .affiche { grid-column: 2; grid-row: 3 / span 3; margin-top: 4px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .affiche, .affiche-direct .point { transition: none; animation: none; } }

/* Mail mis en forme (mails.js) : la lettre telle qu'elle partira, sur fond blanc comme dans une messagerie. */
.mail-lettre { background: #ffffff; color: #1f2a37; border: 1px solid var(--border); border-radius: 6px; padding: 22px 24px; }
.mail-lettre a { color: #a34c25; }
.card .mail-lettre p, .card .mail-lettre li { color: inherit; }

/* Programme bêta : accès par invitation (beta-testeur.html), demande d'avis (avis.html, Mon espace) */
.beta-acces { text-align: left; margin: 32px auto 0; }
.beta-acces h2 { font-size: 1.25rem; margin: 0 0 6px; }
.beta-acces input#code { text-transform: uppercase; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.beta-google { text-align: center; }
.beta-google .etoiles { font-size: 2rem; letter-spacing: 6px; color: #f5b301; margin: 8px 0 16px; }
.beta-avis { border-left: 3px solid var(--accent); }
.beta-avis h2 { font-size: 1.15rem; margin: 0 0 6px; }
.beta-avis .btn { margin-top: 12px; }
.admin-invitation { margin-bottom: 16px; }
.admin-creer { margin-top: 16px; }
.admin-creer .admin-invitation { margin: 14px 0 0; }
/* Tableau qui tient dans la largeur de la page, sans défilement horizontal : les cellules passent à la ligne. */
.admin .admin-ajuste { overflow-x: visible; }
.admin .admin-ajuste table { width: 100%; }
.admin .admin-ajuste td, .admin .admin-ajuste th { white-space: normal; }
.admin .admin-ajuste td { overflow-wrap: anywhere; }
.admin .admin-ajuste .btn { white-space: nowrap; }
.admin .admin-ajuste td:first-child { min-width: 0; }
.admin .admin-ajuste td.admin-texte { min-width: 0; max-width: none; }
.admin td.admin-etat .btn { display: block; margin: 6px auto 0; }
.admin-menu { display: flex; flex-wrap: wrap; gap: 4px 8px; border-bottom: 1px solid var(--border); margin-top: 28px; }
.admin-menu a { padding: 10px 14px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.admin-menu a:hover { color: var(--text); }
.admin-menu a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.admin-sousmenu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.admin-sousmenu a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.admin-sousmenu a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.admin-badge { display: inline-block; min-width: 1.4em; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--alerte); color: #ffffff; font-size: 0.75rem; line-height: 1.5; text-align: center; }
.admin-panneau { padding: 0; }
.admin-panneau h2 { margin-top: 24px; }
.admin-panneau > .admin-kpis { margin-top: 20px; }
.admin td.admin-texte { white-space: pre-line; min-width: 220px; max-width: 360px; text-align: left; }
.admin td.admin-actions-cellule { white-space: nowrap; }
#candidature .piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#candidature h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 8px; }
.beta-google { margin-bottom: 24px; }

/* Bandeau « Pas de connexion internet » (api.js, bandeauReseau) : en bas de l'écran, au-dessus de tout. Couleurs fixes, texte
   blanc lisible (contraste 4,5:1 au moins) en thème clair comme sombre. */
#bandeau-reseau { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 10px; background: #b0342a; color: #ffffff; font-size: 0.92rem; font-weight: 500; line-height: 1.4;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45); }
#bandeau-reseau.retour { background: #2f7d4f; }
#bandeau-reseau[hidden] { display: none; }
