/* ==========================================================================
   LEVA — feuille de style de l'outil de suivi
   Couleurs : charte LEVA v1.3 (6 couleurs + teintes claires dérivées).
   Typo : Inter Tight si installée, sinon police système (hébergement des polices à valider).
   Mobile d'abord : le poseur l'utilise sur téléphone, sur chantier.
   ========================================================================== */

:root {
  --green: #344f45; --gold: #d8ae6e; --coral: #ff6f4e; --sea: #1fb5a8; --bg: #fffcf5; --ink: #1b1a18;
  --paper: #ffffff; --card: #f7f2e8; --line: #ebe4d6; --muted: #5b5852;
  --gold-hover: #cfa161; --gold-soft: #f5ebdb; --coral-soft: #ffe3da; --sea-soft: #d8f5f1; --green-soft: #e4ece8;
  --erreur: #b23a1e; /* corail assombri : lisible sur fond clair */
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 32px); --r-btn: 8px; --r-card: 20px; --header-h: 64px; --menu-w: 220px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 500; font-size: 0.9375rem; margin-bottom: 8px; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aide { color: var(--muted); font-size: 0.875rem; }
.facultatif { color: var(--muted); font-weight: 400; font-size: 0.8125rem; }
.erreur { color: var(--erreur); font-size: 0.875rem; }
.marge { margin-bottom: 16px; }
.en-ligne { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.lien-evitement { position: absolute; left: 8px; top: -48px; padding: 8px 12px; background: var(--ink); color: #fff; border-radius: var(--r-btn); z-index: 10; }
.lien-evitement:focus { top: 8px; }

/* Barre de la démo */
.demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px var(--gutter); background: var(--ink); color: #fff; font-size: 0.875rem; }
.demo strong { font-weight: 600; color: var(--gold); }
.demo a { color: #fff; }
.demo__liens { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; }
.dans-cadre .demo { display: none; }
.message.message--demo { background: var(--gold-soft); border-left-color: var(--gold); font-weight: 600; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1.5px solid transparent; border-radius: var(--r-btn); font-weight: 500; text-decoration: none; cursor: pointer; background: none; color: var(--ink); transition: background-color .15s, border-color .15s; }
.btn--gold { background: var(--gold); }
.btn--gold:hover { background: var(--gold-hover); }
.btn--contour { border-color: var(--ink); }
.btn--contour:hover { background: var(--gold-soft); }
.btn--discret { border-color: var(--line); }
.btn--discret:hover { border-color: var(--ink); }
.btn--lien { min-height: 0; padding: 0; border: 0; color: var(--green); text-decoration: underline; }
.btn--danger { color: var(--erreur); }
.btn--petit { min-height: 36px; padding: 6px 12px; font-size: 0.9375rem; }
.btn--plein { width: 100%; min-height: 48px; }

/* Formulaires */
.formulaire { display: grid; gap: 16px; }
.champ { display: grid; gap: 6px; align-content: start; }
.champ > label:first-child, .champ > span:first-child, .champ__label { font-weight: 500; font-size: 0.9375rem; }
.champ input:not([type=checkbox]):not([type=radio]), .champ select, .champ textarea, .select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--paper); font-size: 1rem;
}
.champ input[type=file] { padding: 8px; }
.champ textarea { min-height: 100px; resize: vertical; line-height: 1.45; }
.champ input:focus, .champ select:focus, .champ textarea:focus, .select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.select { width: auto; }
.grille-2 { display: grid; gap: 16px; }
.grille-3 { display: grid; gap: 12px; }
.champ--large { grid-column: 1 / -1; }
@media (min-width: 640px) { .grille-2 { grid-template-columns: 1fr 1fr; } .grille-3 { grid-template-columns: 2fr 2fr 1fr; } }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label, .case { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--paper); cursor: pointer; }
.choix label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choix input, .case input { accent-color: var(--green); width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.case { border: 0; padding: 4px 0; background: none; align-items: flex-start; }
.case input { margin-top: 2px; }
.alerte { padding: 12px 14px; border-left: 4px solid var(--coral); border-radius: var(--r-btn); background: var(--coral-soft); font-size: 0.9375rem; display: grid; gap: 6px; }
.alerte--info { border-left-color: var(--sea); background: var(--sea-soft); }
.alerte--or { border-left-color: var(--gold); background: var(--gold-soft); }
.alerte ul { margin: 0; padding-left: 18px; }
.barre-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.message { padding: 12px 14px; border-radius: var(--r-btn); background: var(--green-soft); border-left: 4px solid var(--green); }
.message--info { background: var(--sea-soft); border-left-color: var(--sea); }
.message--error { background: var(--coral-soft); border-left-color: var(--coral); }
.code-saisie input { font-size: 1.5rem !important; letter-spacing: .3em; text-align: center; max-width: 240px; }

/* Connexion */
.connexion { min-height: calc(100dvh - 40px); display: grid; place-items: center; padding: var(--gutter); }
.connexion__carte { width: 100%; max-width: 420px; display: grid; gap: 20px; padding: clamp(24px, 6vw, 40px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); }
.connexion__logo { width: 126px; }
.connexion__titre { font-size: 1.75rem; font-weight: 600; }
.connexion__intro { color: var(--muted); margin-top: -12px; }
.connexion__aide { color: var(--muted); font-size: 0.875rem; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--erreur); font-size: 0.875rem; }

/* Espace équipe */
.entete { position: sticky; top: 0; z-index: 5; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
.entete__logo img { width: 70px; }
.entete__utilisateur { display: flex; align-items: center; gap: 8px; min-width: 0; }
.entete__utilisateur form { margin: 0; }
.entete__nom { color: var(--muted); font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
@media (min-width: 640px) { .entete__nom { display: inline; } }
.menu { display: flex; gap: 6px; padding: 10px var(--gutter); background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu__titre { display: none; }
.menu__liste { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.menu__liste a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-btn); color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 500; }
.menu__liste a:hover { background: var(--gold-soft); }
.menu__liste a[aria-current="page"] { background: var(--green); color: #fff; }
.compte { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 0.75rem; text-align: center; }
.compte--alerte { background: var(--coral); color: #fff; }
.contenu { padding: 20px var(--gutter) 64px; max-width: 1240px; min-width: 0; }
@media (min-width: 768px) {
  .cadre { display: grid; grid-template-columns: var(--menu-w) minmax(0, 1fr); min-height: calc(100dvh - var(--header-h)); }
  .menu { display: block; position: sticky; top: var(--header-h); align-self: start; height: calc(100dvh - var(--header-h)); padding: 20px 12px; border-bottom: 0; border-right: 1px solid var(--line); }
  .menu__titre { display: block; margin: 0 0 6px 12px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
  .menu__liste { flex-direction: column; gap: 2px; margin-bottom: 22px; }
  .contenu { padding-top: 28px; }
}
.tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page__titre { font-size: 1.5rem; font-weight: 600; }
@media (min-width: 768px) { .page__titre { font-size: 1.75rem; } }
.sous-titre { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
.tete__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tete__actions form { margin: 0; }
.retour { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.retour:hover { color: var(--ink); }

/* Outils de liste */
.outils { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.recherche { flex: 1 1 260px; position: relative; }
.recherche input { width: 100%; min-height: 44px; padding: 8px 12px 8px 38px; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--paper); font-size: 1rem; }
.recherche input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.recherche svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--gold-soft); font-size: 0.875rem; }
.chip a { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none; font-size: 1rem; }
.chip a:hover { background: rgba(27, 26, 24, .08); }

/* Lignes de liste */
.colonnes { display: none; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ligne { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.ligne:hover { border-color: var(--gold); }
.ligne__lien { position: absolute; inset: 0; border-radius: inherit; }
.ligne > :not(.ligne__lien) { position: relative; pointer-events: none; min-width: 0; }
.ligne .epingle-zone { pointer-events: auto; grid-column: 2; grid-row: 1; margin: 0; }
.ligne__contact { grid-column: 1; grid-row: 1; display: grid; }
.ligne__contact strong { font-weight: 600; }
.ligne__statut { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ligne__titre { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.ligne .ligne__action { pointer-events: auto; grid-column: 1 / -1; }
.ligne__action form { margin: 0; }
.action-attente { display: inline-block; font-size: 0.875rem; color: var(--muted); font-style: italic; }
@media (min-width: 900px) {
  .colonnes, .ligne { grid-template-columns: 36px minmax(0, 1.2fr) minmax(0, .75fr) minmax(0, 1.3fr) minmax(170px, auto); align-items: center; }
  .ligne .ligne__action { grid-column: 5; grid-row: 1; justify-self: end; text-align: right; }
  .colonnes { display: grid; gap: 12px; padding: 0 17px 6px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
  .ligne .epingle-zone { grid-column: 1; grid-row: 1; }
  .ligne__contact { grid-column: 2; }
  .ligne__statut { grid-column: 3; grid-row: 1; flex-direction: column; align-items: flex-start; }
  .ligne__titre { grid-column: 4; grid-row: 1; flex-wrap: nowrap; }
}
.ville { color: var(--muted); font-size: 0.9375rem; }
.epingle { border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.epingle:hover { background: var(--gold-soft); color: var(--ink); }
.epingle svg { fill: none; }
.epingle--on { color: var(--green); }
.epingle--on svg { fill: currentColor; }
.epingle--grand { width: auto; height: 44px; display: inline-flex; gap: 6px; padding: 0 14px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 500; }

.badge { --dot: var(--sea); display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--sea-soft); font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.badge--termine, .badge--signe, .badge--paye, .badge--signee, .badge--envoye-ok { --dot: var(--green); background: var(--green-soft); }
.badge--perdu, .badge--refuse, .badge--echec { --dot: var(--coral); background: var(--coral-soft); }
.badge--archive, .badge--annule, .badge--brouillon, .badge--simule { --dot: var(--muted); background: var(--card); }
.badge--demande, .badge--vu, .badge--attente_client, .badge--attente_poseur { --dot: var(--gold); background: var(--gold-soft); }

.avatars { display: inline-flex; flex-shrink: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; background: var(--gold-soft); border: 2px solid var(--paper); margin-left: -7px; }
.avatar:first-child { margin-left: 0; }
.avatar--tech { background: var(--sea-soft); }
.sans-resp { font-size: 0.8125rem; font-weight: 500; color: var(--erreur); white-space: nowrap; }
.vide { display: grid; gap: 12px; justify-items: center; padding: 40px 24px; background: var(--card); border-radius: var(--r-card); text-align: center; }
.vide__titre { color: var(--muted); }

/* Fiche projet */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.onglets a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.onglets a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--green); }
.grille-projet { display: grid; gap: 16px; align-items: start; }
.colonne { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 1040px) { .grille-projet { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.carte { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.carte h2 { font-size: 1.0625rem; font-weight: 600; }
.carte h3 { font-size: 1rem; font-weight: 600; }
.carte__tete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.carte--douce { background: var(--card); }
.infos { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.infos dt { color: var(--muted); }
.infos dd { margin: 0; overflow-wrap: anywhere; }
.personnes { list-style: none; margin: 0; padding: 0; display: grid; }
.personne { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.personne:first-child { border-top: 0; padding-top: 0; }
.personne__nom { font-weight: 600; color: var(--ink); text-decoration: none; }
.coord { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.9375rem; margin-top: 2px; }
.coord a { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.journal { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.journal li { position: relative; }
.journal li::before { content: ""; position: absolute; left: -22px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--gold); }
.journal time { display: block; color: var(--muted); font-size: 0.8125rem; }
.element { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.element__tete { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; }
.element__tete strong { font-size: 1.0625rem; }
.montant { font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.ligne-infos { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 0.9375rem; }
.empile { display: grid; gap: 10px; }
details > summary { cursor: pointer; color: var(--green); font-weight: 500; }
.preuve { margin: 8px 0 0; padding: 12px; border-radius: 12px; background: var(--card); font-size: 0.875rem; overflow-wrap: anywhere; }
.tableau { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tableau th, .tableau td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.tableau th { color: var(--muted); font-weight: 600; font-size: 0.8125rem; border-top: 0; }
.table-scroll { overflow-x: auto; }
.totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.total { padding: 14px; border-radius: 14px; background: var(--card); }
.total strong { display: block; font-size: 1.25rem; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.galerie a { display: block; }
.galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--card); }
.fil { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bulle { padding: 12px 14px; border-radius: 14px; background: var(--card); max-width: 560px; white-space: pre-line; }
.bulle--client { background: var(--sea-soft); margin-left: auto; }
.bulle__meta { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; }
.etape { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.etape__puce { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); flex-shrink: 0; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }
.etape--faite .etape__puce { background: var(--green); border-color: var(--green); color: #fff; }
.etape--actuelle .etape__puce { border-color: var(--gold); background: var(--gold-soft); }
.etape--actuelle .etape__titre { font-weight: 600; }
.etape__detail { display: block; color: var(--muted); font-size: 0.875rem; }

/* Procès-verbal imprimable */
.pv { max-width: 760px; display: grid; gap: 16px; }
@media print { .demo, .entete, .menu, .retour, .pas-imprimer { display: none !important; } .cadre { display: block; } body { background: #fff; } }

/* Espace client */
.client { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.client__entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
.client__logo { width: 76px; }
.client__contenu { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 28px var(--gutter) 56px; display: grid; gap: 18px; align-content: start; }
.client h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem); font-weight: 600; }
.client__bonjour { color: var(--muted); font-size: 1.0625rem; }
.entoure { position: relative; display: inline-block; padding: 0 .12em; }
.entoure::after { content: ""; position: absolute; inset: -.14em -.22em -.1em; border: 2.5px solid var(--coral); border-radius: 50%; transform: rotate(-3deg); pointer-events: none; }
.client__projets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.client__projet { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; }
.client__projet:hover { border-color: var(--gold); }
.client__projet span { display: grid; gap: 2px; }
.a-faire { display: grid; gap: 8px; }
.a-faire a { justify-content: space-between; }
.interlocuteur { display: flex; gap: 14px; align-items: center; }
.interlocuteur__photo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; font-weight: 600; font-size: 1.125rem; }
.interlocuteur__nom { font-weight: 600; font-size: 1.0625rem; }
.client__pied { padding: 28px var(--gutter); background: var(--green); color: #fff; text-align: center; display: grid; gap: 6px; }
.client__promesse { font-family: "Caveat", var(--font); font-size: 1.35rem; line-height: 1.3; }
.client__mention { font-size: 0.875rem; opacity: .85; }
.paiement-montant { font-size: 2.25rem; font-weight: 600; }
.cadre-signature { width: 100%; max-width: 600px; aspect-ratio: 600 / 220; border: 2px dashed var(--green); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
.cartes-client { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.carte-client { display: grid; gap: 2px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.carte-client:hover { border-color: var(--gold); }
.carte-client strong { font-size: 1.75rem; line-height: 1.1; }
.carte-client__titre { font-weight: 600; }
.point-non-lu { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); margin-right: 6px; vertical-align: middle; }
.jauge { position: relative; height: 12px; border-radius: 999px; background: var(--card); overflow: hidden; display: flex; }
.jauge span { display: block; height: 100%; }
.jauge__paye { background: var(--green); }
.jauge__demande { background: var(--gold); }
.calcul { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--card); font-size: 0.9375rem; }
.calcul strong { font-size: 1.0625rem; }
.evt-client { color: var(--green); font-weight: 600; }

/* Écran « Aujourd'hui » */
.colonnes-jour { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .colonnes-jour { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.colonne-jour { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-card); background: var(--card); }
.colonne-jour__titre { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.tache { display: grid; gap: 6px; justify-items: start; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 14px; }
.tache--urgente { border-left-color: var(--coral); }
.tache--lien { color: var(--ink); text-decoration: none; border-left-color: var(--green); }
.tache--lien:hover { border-color: var(--gold); border-left-color: var(--green); }
.tache__projet { color: var(--ink); text-decoration: none; }
.tache__projet:hover { text-decoration: underline; }
.tache form { margin: 0; }
.vide-jour { color: var(--muted); font-size: 0.9375rem; padding: 10px 4px; }

/* Fiche projet : bandeau d'action, fil du dossier, panneau */
.bandeau-action { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: var(--gold-soft); border: 1px solid var(--gold); }
.bandeau-action--client { background: var(--sea-soft); border-color: var(--sea); }
.bandeau-action__texte { display: grid; gap: 2px; }
.bandeau-action__texte strong { font-size: 1.0625rem; }
.bandeau-action form { margin: 0; }
.dossier { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1040px) { .dossier { grid-template-columns: minmax(0, 1fr) 320px; } .panneau-dossier { position: sticky; top: calc(var(--header-h) + 16px); } }
.fil-dossier { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.fil-dossier > li { position: relative; }
.fil-dossier > li::before { content: ""; position: absolute; left: -30px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--gold); }
.fil-dossier > li.fait::before { background: var(--green); border-color: var(--green); }
.fil-dossier__date { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; }
.fil-dossier .element { gap: 8px; }
.mini-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.mini-galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.panneau-dossier { display: grid; gap: 12px; }
.ajouter { display: grid; gap: 6px; }
.element--attente { border-color: var(--gold); background: var(--gold-soft); }

/* Alertes en direct (signature, paiement) */
.alertes-direct { position: fixed; top: 80px; right: 16px; z-index: 60; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.alerte-direct { padding: 16px; border-radius: 18px; background: var(--paper); border: 2px solid var(--gold); box-shadow: 0 18px 40px rgba(27, 26, 24, .25); display: grid; gap: 8px; transform: translateX(120%); transition: transform .35s ease; }
.alerte-direct.visible { transform: translateX(0); }
.alerte-direct__titre { font-weight: 700; color: var(--green); }
.alerte-direct__actions { display: flex; gap: 8px; }

/* Conversation façon messagerie */
.conversation { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.conversation__fil { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; }
.conv-msg { align-self: flex-start; max-width: 82%; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--card); }
.conv-msg--moi { align-self: flex-end; background: var(--green); color: #fff; border-radius: 18px 18px 4px 18px; }
.conv-msg__meta { display: block; font-size: .75rem; opacity: .75; margin-bottom: 3px; }
.conv-msg__texte { white-space: pre-line; overflow-wrap: anywhere; }
.conv-msg__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; margin-top: 6px; }
.conv-msg__photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.conv-vide { text-align: center; padding: 20px; }
.conversation__saisie { display: grid; gap: 8px; padding: 10px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--paper); }
.conversation__saisie textarea { width: 100%; border: 0; resize: vertical; min-height: 48px; font-size: 1rem; background: transparent; }
.conversation__saisie textarea:focus { outline: none; }
.conversation__outils { display: flex; align-items: center; gap: 10px; }
.conversation__outils .btn--gold { margin-left: auto; }
.conv-joindre { cursor: pointer; }
.bulle-flottante { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 64px; height: 64px; padding: 0; border-radius: 50%; border: 3px solid var(--paper); background: var(--green); display: block; box-shadow: 0 10px 24px rgba(27, 26, 24, .3); cursor: pointer; text-decoration: none; transition: transform .15s; }
.bulle-flottante:hover { transform: scale(1.06); }
.bulle-flottante__avatar { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.bonhomme { display: block; width: 100%; height: 100%; }
.bulle-flottante__nb { position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; border: 2px solid var(--paper); background: var(--coral); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.bulle-flottante__nb[hidden] { display: none; }
.bulle-flottante--secoue { animation: bulle-secoue .6s ease; }
@keyframes bulle-secoue { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg) scale(1.08); } 45% { transform: rotate(10deg) scale(1.08); } 70% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .bulle-flottante--secoue { animation: none; } }
.son-bloque { position: fixed; left: 16px; bottom: 20px; z-index: 61; padding: 10px 16px; border: 1.5px solid var(--green); border-radius: 999px; background: var(--paper); color: var(--green); font-weight: 600; font-size: .9375rem; box-shadow: 0 10px 24px rgba(27, 26, 24, .2); cursor: pointer; }
.conv-vu { align-self: flex-end; margin-top: -6px; padding-right: 6px; font-size: .75rem; color: var(--muted); list-style: none; }
.alerte-direct--message { border-color: var(--green); }
.alerte-direct--message .alerte-direct__titre, .alerte-direct--message .alerte-direct__texte { cursor: pointer; }
.alerte-direct--message .alerte-direct__texte { overflow-wrap: anywhere; }

/* Documents */
.badge--visible { --dot: var(--green); background: var(--green-soft); }
.badge--masque { --dot: var(--muted); background: var(--card); white-space: normal; }
.documents { display: grid; gap: 8px; }
.documents h3 { font-size: .9375rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.document-ligne { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); text-decoration: none; }
.document-ligne:hover { border-color: var(--gold); }
.document-ligne__icone { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.document-ligne__texte { display: grid; gap: 2px; min-width: 0; flex: 1; }
.document-ligne__voir { flex-shrink: 0; color: var(--green); font-size: .875rem; font-weight: 500; }
.tiroir { position: fixed; right: 20px; bottom: 92px; z-index: 41; width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 120px); display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 20px 50px rgba(27, 26, 24, .25); }
.tiroir[hidden] { display: none; }
.tiroir__tete { display: flex; align-items: center; justify-content: space-between; }
.tiroir .conversation__fil { max-height: 45vh; }
.ajouter a { justify-content: flex-start; }

/* Boîte de démo */
.demo-page { max-width: 1100px; margin: 0 auto; padding: 24px var(--gutter) 64px; display: grid; gap: 20px; }
.guide { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.envoi { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.envoi pre { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 0.9375rem; overflow-wrap: anywhere; }

/* Notifications push (espace client) */
.push-carte > div { display: grid; gap: 10px; }
.push-etapes { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.push-etapes li::marker { color: var(--green); font-weight: 700; }
.push-carte [data-etat]:not([hidden]) ~ .push-installer { border-top: 1px solid var(--line); padding-top: 14px; }
