/* Cabinet NDAO — verre liquide, repris de la charte d'atele :
   du verre épais et transparent posé sur un fond d'ambiance coloré, arête brillante, texte blanc.
   Règle de lisibilité : UNE couleur par lieu (or = Aujourd'hui, vert = À valider, bleu = Dossiers),
   le rouge est réservé aux urgences, et jamais plus d'une décision à l'écran. */
:root {
  --or: #ebba3b;
  --vert: #70cf96;
  --bleu: #7fb0ff;
  --rouge: #ff5a4f;
  --violet: #b79cff;
  --cuivre: #e8824a;
  --turquoise: #5fd6d6;
  --rose: #ff8fb8;
  --argent: #b9c2d6;
  --texte: #ffffff;
  --doux: rgba(255, 255, 255, .74);
  --lieu: var(--or);
  --rayon: 0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: #060607; }
body {
  margin: 0; color: var(--texte); min-height: 100vh;
  font: 19px/1.5 -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  padding: env(safe-area-inset-top) 0 calc(120px + env(safe-area-inset-bottom));
}
body[data-v="jour"] { --lieu: var(--or); }
body[data-v="valider"] { --lieu: var(--vert); }
body[data-v="dossiers"] { --lieu: var(--bleu); }
body[data-v="agenda"] { --lieu: var(--rose); }
body[data-v="assistant"] { --lieu: var(--cuivre); }
body[data-v="clients"] { --lieu: var(--turquoise); }

/* ── Fond d'ambiance : noir profond, une seule lueur douce de la couleur du lieu ── */
.ambiance { position: fixed; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.amb-jour { background:
  radial-gradient(55% 45% at 18% 0%, rgba(235,170,50,.30), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(235,170,50,.12), transparent 70%), #060607; }
.amb-valider { background:
  radial-gradient(55% 45% at 18% 0%, rgba(70,190,125,.30), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(70,190,125,.12), transparent 70%), #060607; }
.amb-dossiers { background:
  radial-gradient(55% 45% at 18% 0%, rgba(80,135,235,.30), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(80,135,235,.12), transparent 70%), #060607; }
.amb-assistant { background:
  radial-gradient(55% 45% at 18% 0%, rgba(232,130,74,.22), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(232,130,74,.10), transparent 70%), #060607; }
.amb-agenda { background:
  radial-gradient(55% 45% at 18% 0%, rgba(230,100,150,.30), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(230,100,150,.12), transparent 70%), #060607; }
.amb-clients { background:
  radial-gradient(55% 45% at 18% 0%, rgba(60,190,195,.30), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(60,190,195,.12), transparent 70%), #060607; }
body[data-v="agenda"] .amb-agenda, body[data-v="clients"] .amb-clients, body[data-v="assistant"] .amb-assistant,
body[data-v="jour"] .amb-jour, body[data-v="valider"] .amb-valider, body[data-v="dossiers"] .amb-dossiers { opacity: 1; }

.conteneur { max-width: 640px; margin: 0 auto; padding: 22px 18px; }
.serif { font-family: "Iowan Old Style", "Palatino", Georgia, serif; }
h1 { font-size: 32px; line-height: 1.15; margin: 10px 0 4px; letter-spacing: -0.01em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
h2 { font-size: 21px; margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lieu); box-shadow: 0 0 10px var(--lieu); }
.sous-titre { color: var(--doux); margin: 0 0 10px; }
.marque { color: var(--lieu); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.petit { font-size: 16px; color: var(--doux); }

/* ── Le verre ── */
.carte, .chiffre, button, .bouton, nav.onglets, .creneau {
  position: relative; isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.04) 42%, rgba(255,255,255,.02)),
    rgba(10, 12, 18, .26);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 0 12px rgba(255,255,255,.10),
    inset 0 -10px 16px -10px rgba(0,0,0,.40),
    0 12px 30px rgba(0,0,0,.30);
  color: var(--texte);
}
/* arête brillante : claire en haut à gauche, éteinte au milieu, reprise en bas à droite */
.carte::before, .chiffre::before, button::before, .bouton::before, nav.onglets::before, .creneau::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px; pointer-events: none; z-index: 1;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.22) 34%, rgba(255,255,255,.07) 60%, rgba(255,255,255,.75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.carte { border-radius: var(--rayon); padding: 20px; margin: 14px 0; }
.carte p { margin: 8px 0; }
.carte.urgente { background: linear-gradient(180deg, rgba(255,90,79,.38), rgba(255,90,79,.14)), rgba(30,6,6,.35); }
.carte.cliquable { cursor: pointer; }

.etiquette {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; padding: 5px 13px 5px 9px;
  border-radius: 999px; background: rgba(0,0,0,.30); color: #fff; --c: var(--lieu);
}
.etiquette::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2.6px solid var(--c); box-shadow: 0 0 8px var(--c); }
.etiquette.rouge { --c: var(--rouge); } .etiquette.vert { --c: var(--vert); } .etiquette.or { --c: var(--or); }
.etiquette.bleu { --c: var(--bleu); } .etiquette.turquoise { --c: var(--turquoise); } .etiquette.rose { --c: var(--rose); } .etiquette.violet { --c: var(--violet); }

.message {
  white-space: pre-wrap; background: rgba(0,0,0,.34); border-radius: 0; padding: 16px; font-size: 18px;
  margin: 14px 0; box-shadow: inset 0 1px 6px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.10);
}
textarea, input[type=password] {
  width: 100%; font: inherit; font-size: 18px; padding: 16px; border-radius: 0; color: #fff;
  background: rgba(0,0,0,.42); border: 2px solid var(--lieu); outline: none;
}
textarea { min-height: 240px; }
textarea::placeholder { color: rgba(255,255,255,.5); }
.bandeau { background: rgba(235,186,59,.20); border-radius: 0; padding: 12px 16px; font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(235,186,59,.55); }

.boutons { display: grid; gap: 12px; margin-top: 14px; }
.boutons.deux { grid-template-columns: 1fr 1fr; }
button, .bouton {
  font: inherit; font-weight: 700; font-size: 20px; border: 0; border-radius: 999px; padding: 17px 16px;
  min-height: 62px; cursor: pointer; text-align: center; text-decoration: none; display: block;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); transition: transform .12s ease;
}
button:active { transform: scale(.97); }
button.principal, .bouton.principal { background: linear-gradient(180deg, rgba(112,207,150,.80), rgba(47,150,96,.72)); }
button.danger { background: linear-gradient(180deg, rgba(255,90,79,.42), rgba(255,90,79,.20)), rgba(10,12,18,.26); }
button.bleu { background: linear-gradient(180deg, rgba(127,176,255,.72), rgba(59,116,224,.62)); }
button.discret { box-shadow: none; background: rgba(0,0,0,.25); font-size: 17px; min-height: 50px; padding: 10px 18px; display: inline-block; }
button.discret::before { display: none; }
button:disabled { opacity: .35; }

.chiffres { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.chiffre { border-radius: 0; padding: 16px; color: var(--doux); font-size: 17px; }
.chiffre b { display: block; font-size: 38px; line-height: 1.1; color: #fff; }
.vide { text-align: center; color: var(--doux); padding: 26px 10px; }
.cache { display: none !important; }

/* ── Barre du bas : une capsule de verre, un anneau de couleur par lieu ── */
nav.onglets {
  position: fixed; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 612px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(6, 1fr); border-radius: 32px; padding: 6px; z-index: 5;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.05)), rgba(10,12,18,.45);
}
nav.onglets button {
  background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 26px;
  font-size: 11.5px; font-weight: 600; color: var(--doux); min-height: 72px; padding: 8px 0; position: relative;
}
nav.onglets button::before { display: none; }
nav.onglets button.actif { color: #fff; background: rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
nav.onglets .ico {
  width: 38px; height: 38px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center;
  border: 2.6px solid rgba(255,255,255,.2);
}
nav.onglets .ico svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
nav.onglets button.actif .ico { border-color: var(--c); box-shadow: 0 0 10px var(--c); }
.pastille { position: absolute; top: 4px; left: 50%; margin-left: 12px; background: var(--rouge); color: #fff; border-radius: 999px;
  font-size: 13px; font-weight: 700; padding: 1px 7px; }

/* ── À valider : un seul message à la fois ── */
.compteur { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 0; }
.compteur b { font-size: 20px; }
.points { display: flex; gap: 7px; justify-content: center; margin: 10px 0 0; }
.points i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); }
.points i.ici { background: var(--vert); box-shadow: 0 0 8px var(--vert); }

.ligne-tl { border-left: 3px solid rgba(255,255,255,.25); padding: 4px 0 14px 16px; margin-left: 8px; }
.ligne-tl .date { font-size: 15px; color: var(--doux); }

/* ── Page du client ── */
.creneau { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; margin: 12px 0; padding: 18px 20px;
  font-size: 21px; border-radius: 0; }
.creneau .num { flex: 0 0 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  border: 2.6px solid var(--or); box-shadow: 0 0 10px rgba(235,186,59,.7); background: rgba(0,0,0,.25); }
.coche { width: 96px; height: 96px; margin: 26px auto 0; border-radius: 50%; display: grid; place-items: center; font-size: 46px;
  border: 4px solid var(--vert); box-shadow: 0 0 22px rgba(112,207,150,.8), inset 0 0 18px rgba(112,207,150,.35); }

/* ── Agenda : calendrier du mois ── */
.cal-barre { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 12px; }
.cal-barre .nav-m { display: flex; align-items: center; gap: 12px; }
.cal-barre .nav-m b { font-size: 21px; min-width: 170px; text-align: center; }
button.rond-btn { width: 46px; min-height: 46px; padding: 0; font-size: 24px; line-height: 1; border-radius: 50%; }
.segment { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.segment button { min-height: 40px; padding: 6px 18px; font-size: 16px; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 999px; color: var(--doux); }
.segment button::before { display: none; }
.segment button.actif { background: var(--lieu); color: #2a0716; text-shadow: none; }
.carte.cal { padding: 0; overflow: hidden; margin-top: 0; }
.mois { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; z-index: 2; }
.mois .jsem { font-size: 13px; color: var(--doux); text-align: center; padding: 12px 0 10px; text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid rgba(255,255,255,.10); }
.mois .case { min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer;
  border-right: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); transition: background .15s; }
.mois .case:nth-child(7n) { border-right: 0; }
.mois .case:hover { background: rgba(255,255,255,.05); }
.mois .case.hors { opacity: .4; }
.mois .case.choisi { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1.5px var(--lieu); }
.mois .case .n { font-size: 15px; font-weight: 700; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.mois .case.auj .n { background: var(--lieu); color: #2a0716; }
.ev-c { font-size: 13px; line-height: 1.3; padding: 3px 6px; border-left: 3px solid var(--c); background: rgba(0,0,0,.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-c b { color: var(--c); }
.ev-plus { font-size: 12px; color: var(--doux); padding-left: 6px; }
.legende { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; color: var(--doux); margin: 12px 2px 0; }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.legende span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
#detail-jour { margin-top: 8px; }
#detail-jour .petit-btn { margin-top: 6px; }
.carte.ev-l { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-left: 3px solid var(--c); margin: 10px 0; }
.carte.ev-l .h { flex: 0 0 74px; font-weight: 700; color: var(--c); }
.carte.ev-l .t { flex: 1; min-width: 0; font-weight: 600; }
@media (max-width: 760px) {
  .mois .case { min-height: 62px; padding: 4px 2px; align-items: center; }
  .mois .case .n { font-size: 14px; width: 26px; height: 26px; }
  .ev-c { font-size: 0; padding: 0; height: 5px; width: 80%; border: 0; border-radius: 3px; background: var(--c); }
  .ev-plus { display: none; }
  .cal-barre .nav-m b { font-size: 18px; min-width: 0; }
  .carte.ev-l { flex-wrap: wrap; gap: 6px 12px; }
  .carte.ev-l .t { flex-basis: 100%; order: 3; }
}

/* ── Agenda et clients ── */
.jour-titre { font-size: 19px; font-weight: 700; margin: 26px 0 4px; }
.jour-titre.auj { color: var(--violet); }
.ev { display: flex; gap: 14px; align-items: baseline; }
.ev .h { flex: 0 0 64px; font-weight: 700; font-size: 20px; }
.rond { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: 19px; border: 2.6px solid var(--turquoise); box-shadow: 0 0 10px rgba(95,214,214,.6); background: rgba(0,0,0,.25); }
.rang { display: flex; gap: 14px; align-items: center; }
input.recherche { width: 100%; font: inherit; font-size: 19px; padding: 15px 20px; border-radius: 999px; color: #fff;
  background: rgba(0,0,0,.42); border: 2px solid rgba(255,255,255,.25); outline: none; margin-top: 12px; }
input.recherche::placeholder { color: rgba(255,255,255,.55); }
a.bouton { color: #fff; }

/* ═══ Formulaires ═══ */
input.champ, select.champ {
  width: 100%; font: inherit; font-size: 18px; padding: 14px 16px; border-radius: 0; color: #fff;
  background: rgba(0,0,0,.42); border: 2px solid rgba(255,255,255,.22); outline: none;
}
input.champ:focus, select.champ:focus, textarea:focus { border-color: var(--lieu); }
select.champ option { color: #000; }
label.lib { display: block; font-size: 15px; color: var(--doux); margin: 14px 0 6px; }
.rangee { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.entete h1 { margin-bottom: 0; }
button.petit-btn { min-height: 48px; font-size: 16px; padding: 10px 18px; display: inline-block; }
.voile { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.feuille { width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 0; padding: 22px; margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)), rgba(16,18,26,.92); }
@media (min-width: 700px) { .voile { align-items: center; } }

/* ═══ Plan du jour ═══ */
.tache { display: flex; gap: 14px; align-items: flex-start; }
.tache .rond-p { flex: 0 0 14px; height: 14px; border-radius: 50%; margin-top: 7px; border: 3px solid var(--c, var(--or)); box-shadow: 0 0 10px var(--c, var(--or)); }
.tache .corps-t { flex: 1; min-width: 0; }
.tache .actions-t { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.coche-t { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.5); background: none; min-height: 0; padding: 0; flex: 0 0 30px; }
.coche-t::before { display: none; }
.grand-chiffre { font-size: 54px; font-weight: 800; line-height: 1; }

/* ═══ Assistant ═══ */
.chat { display: flex; flex-direction: column; gap: 10px; }
.fil { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 160px; max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.bulle { max-width: 86%; padding: 12px 16px; border-radius: 20px; font-size: 18px; line-height: 1.45; word-wrap: break-word; }
.bulle.moi { align-self: flex-end; background: rgba(183,156,255,.30); border-bottom-right-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.bulle.ia { align-self: flex-start; background: rgba(0,0,0,.36); border-bottom-left-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bulle.ia .fait { display: block; font-size: 13px; color: var(--doux); margin-top: 8px; }
.bulle.attente { opacity: .7; font-style: italic; }
.saisie { display: flex; gap: 10px; align-items: flex-end; }
.saisie textarea { min-height: 58px; max-height: 180px; flex: 1; resize: none; }
.saisie button { flex: 0 0 58px; min-height: 58px; padding: 0; font-size: 22px; border-radius: 50%; }
button.micro.ecoute { background: linear-gradient(180deg, rgba(255,90,79,.8), rgba(200,50,50,.7)); animation: pouls 1.2s infinite; }
@keyframes pouls { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,90,79,.6); } 50% { box-shadow: 0 0 0 14px rgba(255,90,79,0); } }
.puces { display: flex; gap: 8px; flex-wrap: wrap; }
.puces button { min-height: 44px; font-size: 15px; padding: 8px 14px; font-weight: 600; }
.orbe { width: 150px; height: 150px; margin: 10px auto; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(183,156,255,.45) 35%, rgba(80,60,180,.35) 70%);
  box-shadow: 0 0 40px rgba(183,156,255,.55), inset 0 0 30px rgba(255,255,255,.25); transition: transform .3s; font-size: 17px; font-weight: 700; text-align: center; padding: 10px; }
.orbe.ecoute { animation: respire 1.4s infinite; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), rgba(255,120,110,.5) 40%, rgba(180,50,60,.4) 75%); }
.orbe.parle { animation: respire .7s infinite; }
.orbe.pense { animation: tourne 1.6s linear infinite; }
@keyframes respire { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes tourne { from { filter: hue-rotate(0); } to { filter: hue-rotate(360deg); } }

/* ═══ Espace de travail (dossier) ═══ */
.outils-acte { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.outils-acte button { min-height: 54px; font-size: 16px; }
textarea.editeur { min-height: 60vh; font-family: "Iowan Old Style", Georgia, serif; font-size: 17px; line-height: 1.6; }

/* ═══ Ordinateur ═══ */
aside.cote { display: none; }
@media (min-width: 1000px) {
  body { padding: 0 0 30px 272px; font-size: 18px; }
  nav.onglets { display: none; }
  aside.cote { display: flex; flex-direction: column; gap: 6px; position: fixed; top: 16px; bottom: 16px; left: 16px; width: 236px;
    border-radius: 0; padding: 18px 12px; z-index: 5;
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.04)), rgba(10,12,18,.45);
    -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 12px 30px rgba(0,0,0,.3); }
  aside.cote .marque { padding: 0 12px 14px; }
  aside.cote button { display: flex; align-items: center; gap: 12px; text-align: left; background: none; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; min-height: 52px; padding: 8px 12px; border-radius: 14px; font-size: 17px; color: var(--doux); }
  aside.cote button::before { display: none; }
  aside.cote button.actif { background: rgba(255,255,255,.14); color: #fff; }
  aside.cote .ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; border: 2.4px solid rgba(255,255,255,.2); }
  aside.cote .ico svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  aside.cote button.actif .ico { border-color: var(--c); box-shadow: 0 0 10px var(--c); }
  aside.cote .pastille { position: static; margin-left: auto; }
  aside.cote .bas { margin-top: auto; }
  .conteneur { max-width: 1240px; padding: 26px 28px; }
  .deux-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 16px; }
  .atelier { display: grid; grid-template-columns: 300px minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
  .atelier > .col { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 4px; }
  .atelier > .col.centre { position: static; max-height: none; overflow: visible; }
  .fil { max-height: calc(100vh - 360px); }
  #v-valider .carte, #v-assistant .chat { max-width: 860px; }
  .voile { align-items: center; }
}
@media (min-width: 1000px) and (max-width: 1350px) {
  .atelier { grid-template-columns: 270px minmax(0, 1fr); }
  .atelier > .col.droite { grid-column: 1 / -1; position: static; max-height: none; }
}

/* ═══ Carte du dossier (vue en constellation) ═══ */
.carte-zone { display: grid; gap: 18px; margin-bottom: 18px; }
.constellation { position: relative; border-radius: 0; overflow: hidden;
  background: radial-gradient(ellipse at 25% 50%, rgba(127,176,255,.10), transparent 60%), rgba(4,8,16,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.3); }
.constellation svg { width: 100%; height: auto; aspect-ratio: 960 / 600; display: block; }
.constellation .noeud { cursor: pointer; }
.constellation .noeud rect { transition: stroke .2s, fill .2s; }
.constellation .noeud:hover rect { fill: rgba(255,255,255,.12); }
.constellation .fil-c { fill: none; stroke-linecap: round; }
.constellation .fil-c.trace { stroke-dasharray: 600; stroke-dashoffset: 600; animation: trace .9s ease forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
.constellation .feuille-c { opacity: 0; animation: apparait .45s ease forwards; }
@keyframes apparait { to { opacity: 1; } }
.constellation .orbe-d { animation: respire 4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.constellation text { font-family: -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif; fill: #fff; }
.panneau { border-radius: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.panneau .tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panneau .tuile { border-radius: 0; padding: 12px 14px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.panneau .tuile b { display: block; font-size: 30px; line-height: 1.1; }
.panneau .tuile span { font-size: 14px; color: var(--doux); }
.panneau .tuile.forte { grid-column: 1 / -1; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1.5px var(--lieu); }
.detail-noeud { border-radius: 0; padding: 14px; background: rgba(127,176,255,.10); box-shadow: inset 0 0 0 1px rgba(127,176,255,.35); }
@media (min-width: 1000px) {
  .carte-zone { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .constellation { min-height: 0; position: sticky; top: 18px; }
  .panneau .fil { max-height: 380px; border-top: 1px solid rgba(255,255,255,.10); padding-top: 12px; margin-top: 4px; }
  .atelier.bas { grid-template-columns: 300px minmax(0, 1fr); }
}

/* ═══ Défilement de cartes (dossiers et clients) ═══ */
.defile { position: relative; margin-top: 10px; outline: none; }
.defile .piste { display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  padding: 6px calc(50% - 82px) 112px; margin-bottom: -6px; scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch; }
.defile .piste::-webkit-scrollbar { display: none; }
.defile .piste.libre { scroll-snap-type: none; }
.defile .piste:active { cursor: grabbing; }
.diapo { flex: 0 0 164px; scroll-snap-align: center; cursor: pointer; position: relative; perspective: 900px;
  user-select: none; -webkit-user-select: none; }
.diapo .etiq { height: 92px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 10px 10px 2px; opacity: .4; transition: opacity .2s; }
.diapo .etiq b { font-size: 13.5px; flex-shrink: 0; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.diapo .etiq span { font-size: 12.5px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diapo .etiq i { font-style: normal; font-size: 10px; margin-top: 7px; color: var(--doux); }
.diapo .couv { height: 270px; overflow: hidden; transform-origin: top center; will-change: transform; backface-visibility: hidden;
  -webkit-backface-visibility: hidden; contain: paint; box-shadow: 0 12px 24px rgba(0,0,0,.55); outline: 1px solid rgba(255,255,255,.08); outline-offset: -1px; }
.diapo .couv svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.diapo.au-centre .etiq { opacity: 1; }
.diapo.au-centre .etiq i { color: var(--lieu); }
.diapo.au-centre .couv { outline: 2px solid var(--lieu); outline-offset: 0; }
.defile .pied { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; position: relative; z-index: 200; }
.defile .focus b { display: block; font-size: 28px; line-height: 1.2; font-family: "Iowan Old Style", Palatino, Georgia, serif; }
.defile .focus span { font-size: 15px; color: var(--doux); }
.defile .nav { display: flex; align-items: center; gap: 10px; }
.defile .nav .ouvrir { min-width: 110px; justify-content: center; }
.defile .compte-d { text-align: right; color: var(--doux); font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .defile .piste { padding: 4px calc(50% - 66px) 88px; margin-bottom: -4px; }
  .diapo { flex-basis: 132px; }
  .diapo .couv { height: 215px; }
  .defile .pied { grid-template-columns: 1fr; text-align: center; }
  .defile .nav { justify-content: center; order: 2; }
  .defile .compte-d { text-align: center; order: 3; }
  .defile .focus b { font-size: 22px; }
}

/* ═══ Bouton clair / sombre ═══ */
.ligne-marque { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
button.bouton-theme { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; font-size: 14px;
  letter-spacing: normal; text-transform: none; font-weight: 600; color: var(--texte); }
button.bouton-theme svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
aside.cote .bas button.bouton-theme { width: 100%; justify-content: center; min-height: 42px; }
@media (min-width: 1000px) { .ligne-marque .bouton-theme { display: none; } }
aside.cote button.bouton-theme { background: rgba(255,255,255,.08); border-radius: 999px; color: var(--texte); font-size: 15px; }

/* ═══ Réglages ═══ */
body[data-v="reglages"] { --lieu: var(--argent); }
.amb-reglages { background: radial-gradient(55% 45% at 18% 0%, rgba(185,194,214,.22), transparent 70%),
  radial-gradient(45% 35% at 100% 100%, rgba(185,194,214,.10), transparent 70%), #060607; }
body[data-v="reglages"] .amb-reglages { opacity: 1; }
.grille-reglages { display: grid; gap: 0 18px; }
@media (min-width: 1000px) { .grille-reglages { grid-template-columns: 1fr 1fr; align-items: start; } }
.info-reglage { font-size: 15px; margin: 10px 0 0; }
.info-reglage.ok { color: var(--vert); } .info-reglage.ko { color: var(--rouge); }
.etat-ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.rond-etat { width: 12px; height: 12px; border-radius: 50%; background: #6b6b73; flex: 0 0 12px; }
.rond-etat.on { background: var(--vert); box-shadow: 0 0 10px var(--vert); }
.inter { display: flex; align-items: center; gap: 12px; padding: 9px 0; cursor: pointer; font-size: 16px; }
.inter input { display: none; }
.inter .glissiere { flex: 0 0 46px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; }
.inter .glissiere::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.inter input:checked + .glissiere { background: var(--vert); }
.inter input:checked + .glissiere::after { transform: translateX(20px); }
.jours-choix { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.jours-choix label { cursor: pointer; }
.jours-choix input { display: none; }
.jours-choix span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 600; font-size: 15px; }
.jours-choix input:checked + span { background: var(--lieu); color: #0d0d0f; }
.suggestion { margin: 14px 0; padding: 14px 16px; background: color-mix(in srgb, var(--vert) 10%, transparent); border-left: 3px solid var(--vert); }
.ligne-imp { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 15px; }
.installer { margin-top: 18px; } .installer summary { cursor: pointer; font-weight: 600; }
.installer code, .carte code { background: rgba(255,255,255,.08); padding: 1px 6px; font-size: 13.5px; word-break: break-all; }
.etapes { padding-left: 20px; } .etapes li { margin: 12px 0; }
.saisie-cle { display: flex; gap: 8px; align-items: center; } .saisie-cle .champ { flex: 1; }
.boutons-haut { display: inline-flex; gap: 8px; align-items: center; }
button.bouton-reglages { width: 38px; min-height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
button.bouton-reglages svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1000px) { .ligne-marque .boutons-haut { display: none; } }

/* ═══ Alerte flottante (appli ouverte) ═══ */
.alerte-flottante { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -140%); z-index: 1100;
  width: min(92vw, 460px); padding: 14px 18px; border-radius: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
  background: rgba(20,20,24,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.12); transition: transform .35s cubic-bezier(.2,.9,.3,1.2); }
.alerte-flottante.visible { transform: translate(-50%, 0); }
.alerte-flottante b { font-size: 16px; } .alerte-flottante span { font-size: 14.5px; color: rgba(255,255,255,.75); }
.alerte-flottante.urgente { box-shadow: 0 16px 40px rgba(0,0,0,.5), inset 0 0 0 2px var(--rouge); }

.garde-fous { list-style:none; padding-left:0; margin:8px 0; }
.garde-fous li { margin:0 0 6px; }

/* Le carrousel garde ses plans pour lui : il ne passe jamais par-dessus une fenêtre */
.defile { position: relative; isolation: isolate; z-index: 0; }
.recherche-liste { margin-bottom: 8px; }
.ajouts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.ajouts label.petit-btn { cursor: pointer; min-height: 48px; font-size: 16px; padding: 10px 18px; display: inline-flex; align-items: center; }
/* fenêtre qui défile : l'arête brillante ne doit pas rester figée au milieu du contenu */
.feuille::before { display: none; }
.feuille { outline: 1.5px solid rgba(255,255,255,.38); outline-offset: -1.5px; }
.chiffres-conso { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chiffres-conso div { border: 1px solid rgba(255,255,255,.14); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.chiffres-conso b { font-size: 22px; }
.chiffres-conso span { font-size: 13px; opacity: .7; }

/* Programme de la semaine */
.programme-jour, .jour-prog { margin-bottom: 14px; }
.jour-prog.auj { border-color: var(--or); }
.entete-prog { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.entete-prog b { font-size: 18px; }
.bloc { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 10px 0 10px 12px; border-left: 4px solid var(--c); margin: 8px 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%); }
.bloc .h { font-weight: 700; font-size: 15px; line-height: 1.25; }
.bloc .h span { font-weight: 500; opacity: .6; }
.bloc .type { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c); margin-bottom: 2px; }
.bloc .prepare { margin: 6px 0 0; font-size: 13px; color: var(--vert); }
.bandeau-prog { border-left: 3px solid var(--or); padding: 8px 12px; margin: 0 0 14px; }
.vide-prog { border-style: dashed; }
.ligne-horaire { display: grid; grid-template-columns: 1fr 110px auto 110px; gap: 8px; align-items: center; margin: 6px 0; }
.ligne-horaire .inter { margin: 0; }
@media (max-width: 600px) { .ligne-horaire { grid-template-columns: 1fr 118px auto 118px; gap: 6px; } .ligne-horaire .inter span:last-child { font-size: 15px; } }

/* ═══════════ Style V2 (boutons, segments et lignes repris d'educ) ═══════════ */
:root { --rayon: 18px; }

/* Boutons : plus petits, plus calmes */
button:where(:not(nav button):not(.constellation button):not(.bouton-reglages):not(.bouton-theme)), .bouton { font-size: 15.5px; font-weight: 650; min-height: 46px; padding: 0 18px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-shadow: none; }
button.petit-btn, .bouton.petit-btn, .ajouts label.petit-btn { min-height: 38px; font-size: 14px; padding: 0 14px; border-radius: 13px; }
button:active, .bouton:active { transform: scale(.96); }
/* principal : blanc plein (comme educ), plus de vert */
button.principal, .bouton.principal { background: rgba(255,255,255,.94); color: #0B0B0F; font-weight: 700;
  box-shadow: 0 8px 22px rgba(0,0,0,.35); }
button.principal::before, .bouton.principal::before { display: none; }
button.bleu { background: rgba(127,176,255,.16); color: #cfe0ff; box-shadow: inset 0 0 0 1px rgba(127,176,255,.45); }
button.bleu::before { display: none; }
.rnd { width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50% !important; flex: none; }
.rnd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-b svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Titres de section : petite étiquette au lieu d'un grand titre */
h2 { font-size: 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; text-transform: uppercase;
  color: var(--doux); font-weight: 600; margin: 26px 0 10px; }
h2::before { width: 7px; height: 7px; }
h1 { font-size: 30px; }
.sous-titre { font-size: 15px; }

/* Cartes : plus serrées */
.carte { padding: 16px 18px; margin: 10px 0; border-radius: var(--rayon); }

/* Mode rodage : une fine ligne */
.bandeau.rodage { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: rgba(235,186,59,.12); box-shadow: inset 0 0 0 1px rgba(235,186,59,.4); color: #f3d68c; margin: 6px 0 4px; }
.bandeau.rodage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--or); }

/* Rangée de puces d'action en haut de l'accueil */
.actions-haut { display: flex; gap: 8px; margin: 12px 0 6px; }
.actions-haut button { flex: 1; }

/* Ligne compacte (programme, tâches) */
.ligne { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 8px 0; border-radius: 18px; }
.ligne .pt { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, var(--lieu)); box-shadow: 0 0 8px var(--c, var(--lieu)); }
.ligne .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ligne .tx b { font-size: 15.5px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ligne .tx span { font-size: 13.5px; color: var(--doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne .fl { color: var(--doux); font-size: 20px; flex: none; }
.ligne.urgente { background: linear-gradient(180deg, rgba(255,90,79,.30), rgba(255,90,79,.10)), rgba(30,6,6,.35); }
.ligne .ic { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: none;
  background: color-mix(in srgb, var(--c, var(--lieu)) 22%, transparent); color: var(--c, var(--lieu)); }
.ligne .ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ligne button.petit-btn { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.tuile-ligne { display: flex; gap: 6px; margin-top: 8px; }

/* Agenda : en-tête sur une ligne, un seul bouton + */
.entete-ag { display: flex; align-items: center; justify-content: space-between; }
.entete-ag h1 { margin: 6px 0 0; }
.menu-plus { position: absolute; right: 0; top: 64px; z-index: 50; width: 230px; padding: 6px; border-radius: 18px;
  background: rgba(22,22,28,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.14); }
.menu-plus button { width: 100%; justify-content: flex-start; background: none; box-shadow: none; min-height: 44px; font-weight: 600; border-radius: 12px; }
.menu-plus button::before { display: none; }
.menu-plus button .pt { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
#v-agenda { position: relative; }

/* Segment façon educ : pleine largeur, actif en blanc */
.segment { display: flex; width: 100%; border-radius: 16px; padding: 4px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.segment button { flex: 1; min-height: 38px; border-radius: 12px; font-size: 14px; }
.segment button.actif { background: rgba(255,255,255,.94); color: #0B0B0F; }
.cal-barre { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.nav-m { display: flex; align-items: center; justify-content: space-between; }
.nav-m b { font-size: 17px; }
.cal-barre .nav-m b::first-letter { text-transform: uppercase; }
.rond-btn { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; font-size: 18px; }

/* Dossier : rangée d'ajouts qui défile horizontalement */
.ajouts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px -18px 0; padding: 4px 18px 8px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 30px), transparent); }
.ajouts::-webkit-scrollbar { display: none; }
.ajouts > * { flex: none; white-space: nowrap; }
.ajouts .petit { font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

.carte-zone > * { min-width: 0; }
@media (min-width: 1000px) {
  .actions-haut { justify-content: flex-end; margin-top: -52px; }
  .actions-haut button { flex: none; }
  .chiffre { border-radius: var(--rayon); }
}
.cal-barre .segment { order: -1; }
.ev-l2 .h { flex: 0 0 48px; font-weight: 700; font-size: 14px; color: var(--c); font-variant-numeric: tabular-nums; }
.ev-l2 { border-left: 3px solid var(--c); }
.rangee > * { min-width: 0; }
.rangee input, .rangee select { width: 100%; min-width: 0; }
@media (max-width: 520px) { .rangee { grid-template-columns: 1fr; gap: 0; } }
.grille-reglages > * { min-width: 0; }
@media (max-width: 600px) {
  .ligne-horaire { grid-template-columns: minmax(0, 1fr) 92px auto 92px; gap: 5px; }
  .ligne-horaire input.champ { padding-left: 8px; padding-right: 4px; font-size: 15px; }
  .ligne-horaire .inter span:last-child { font-size: 14px; }
}
.ligne-horaire input.champ { padding-left: 8px; padding-right: 4px; }
@media (min-width: 1000px) { .cal-barre .segment { max-width: 420px; } .cal-barre { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; } .cal-barre .nav-m { flex: 1; min-width: 300px; } }
/* Un peu de couleur : chaque ligne et chaque chiffre prend la teinte de sa rubrique */
.carte.ligne, .chiffre[style*="--c"] {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 8%, transparent) 65%, transparent),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.02) 45%),
    rgba(10, 12, 18, .30);
}
.chiffre[style*="--c"] b { color: color-mix(in srgb, var(--c) 70%, #fff); }
.carte.ligne.urgente { background: linear-gradient(135deg, rgba(255,90,79,.45), rgba(255,90,79,.14) 70%), rgba(30,6,6,.35); }
.affaires { margin: 6px 0 2px; padding-left: 18px; font-size: 14px; color: var(--doux); line-height: 1.5; }
/* ── Nouveaux outils : fenêtres d'information, recherche dans les pièces, rangée d'outils ── */
.corps-fenetre { max-height: 62vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.corps-fenetre h3 { font-size: 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--doux); margin: 18px 0 8px; }
.corps-fenetre .ligne-imp { padding: 9px 0; gap: 10px; }
.corps-fenetre .ligne-imp.cliquable { cursor: pointer; }
.chiffres-conso.mois { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
.ligne .tx .extrait { white-space: normal; color: inherit; opacity: .88; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: color-mix(in srgb, var(--or) 55%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.ajouts.outils { margin-top: 0; }
#res-pieces { margin-top: 6px; }
.corps-fenetre .chiffres-conso b { font-size: 19px; white-space: nowrap; }

/* ═══════════ Lumière (nov. 2026) — mêmes couleurs par lieu, éléments plus vivants ═══════════
   Inspirations : pilules de verre lumineuses, tuiles en dégradé flou, orbes au bord coloré,
   halo doux autour des cartes, grain léger et lueur qui monte du bas. Thème sombre seulement. */
html:not([data-theme="clair"]) body::after {               /* grain très léger, comme une photo */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html:not([data-theme="clair"]) .ambiance::after {          /* la lueur de la rubrique monte doucement du bas */
  content: ""; position: absolute; inset: auto 0 0 0; height: 55vh; pointer-events: none;
  background: radial-gradient(90% 70% at 70% 100%, color-mix(in srgb, var(--lieu) 34%, transparent), transparent 70%);
}
.amb-jour { --lieu: var(--or); } .amb-valider { --lieu: var(--vert); } .amb-assistant { --lieu: var(--cuivre); }
.amb-agenda { --lieu: var(--rose); } .amb-clients { --lieu: var(--turquoise); } .amb-dossiers { --lieu: var(--bleu); }
.amb-reglages { --lieu: var(--argent); }

/* ── Chiffres du jour : tuiles en dégradé flou (sombre en haut, couleur qui s'allume en bas) ── */
html:not([data-theme="clair"]) .chiffre[style*="--c"] {
  border-radius: 28px; min-height: 128px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
  color: rgba(255,255,255,.86); font-weight: 600; font-size: 15px; cursor: pointer;
  background:
    radial-gradient(85% 60% at 50% -5%, #050506 35%, transparent 75%),
    radial-gradient(120% 90% at 50% 115%, color-mix(in srgb, var(--c) 95%, #fff 5%), color-mix(in srgb, var(--c) 55%, #000) 55%, #0b0b0d 90%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, rgba(255,255,255,.35)), inset 0 0 26px rgba(255,255,255,.12),
              0 0 34px -8px color-mix(in srgb, var(--c) 70%, transparent), 0 14px 30px rgba(0,0,0,.45);
}
html:not([data-theme="clair"]) .chiffre[style*="--c"]::before { display: none; }
html:not([data-theme="clair"]) .chiffre[style*="--c"] b { color: #fff; font-size: 44px; text-shadow: 0 2px 18px rgba(0,0,0,.45); }

/* ── Lignes du jour : pilules de verre, la lumière de la rubrique entre par la gauche ── */
html:not([data-theme="clair"]) .carte.ligne {
  border-radius: 999px; padding: 12px 16px 12px 14px; min-height: 66px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--c) 42%, transparent), color-mix(in srgb, var(--c) 12%, transparent) 38%, rgba(255,255,255,.02) 75%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 50%), rgba(8,9,12,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 color-mix(in srgb, var(--c) 45%, transparent),
              0 0 22px -10px color-mix(in srgb, var(--c) 80%, transparent), 0 10px 24px rgba(0,0,0,.35);
}
html:not([data-theme="clair"]) .carte.ligne::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 85%, #fff), rgba(255,255,255,.12) 35%, rgba(255,255,255,.05) 65%, color-mix(in srgb, var(--c) 45%, transparent));
}
html:not([data-theme="clair"]) .carte.ligne.urgente { --c: var(--rouge); }
/* le point devient un petit orbe, la case à cocher un anneau de verre */
html:not([data-theme="clair"]) .ligne .pt { width: 26px; height: 26px; flex: 0 0 26px;
  background: radial-gradient(circle at 35% 30%, #fff 0, color-mix(in srgb, var(--c) 70%, #fff) 22%, var(--c) 48%, color-mix(in srgb, var(--c) 40%, #000) 100%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 0 1px rgba(255,255,255,.35); }
html:not([data-theme="clair"]) .coche-t { width: 30px; height: 30px; border: 0;
  background: radial-gradient(circle, rgba(0,0,0,.55) 52%, transparent 54%), conic-gradient(from 210deg, var(--c), #fff, var(--c), color-mix(in srgb, var(--c) 30%, #000), var(--c));
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }

/* ── Boutons du haut : pilules qui diffusent leur lumière ── */
html:not([data-theme="clair"]) .actions-haut button { border-radius: 999px; }
html:not([data-theme="clair"]) .actions-haut button.bleu {
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--violet) 70%, #fff 10%), color-mix(in srgb, var(--violet) 35%, #0b0b12) 70%);
  box-shadow: 0 0 28px -4px color-mix(in srgb, var(--violet) 75%, transparent), inset 0 1px 0 rgba(255,255,255,.5); }

/* ── « Dites-le à vos agents » : carte au halo doux de la rubrique ── */
html:not([data-theme="clair"]) .carte:has(#dictee) {
  border-radius: 30px; background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.06), transparent 60%), #0a0a0c;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lieu) 55%, transparent), inset 0 0 36px color-mix(in srgb, var(--lieu) 30%, transparent),
              0 0 40px -12px color-mix(in srgb, var(--lieu) 70%, transparent);
}
html:not([data-theme="clair"]) .carte:has(#dictee)::before { display: none; }
html:not([data-theme="clair"]) .carte:has(#dictee) textarea { border-radius: 20px; }

/* ── À valider vide : orbe entouré d'anneaux en pointillés ── */
html:not([data-theme="clair"]) .coche { position: relative;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), color-mix(in srgb, var(--lieu) 75%, #fff) 25%, color-mix(in srgb, var(--lieu) 55%, #000) 75%);
  border: 0; box-shadow: 0 0 40px color-mix(in srgb, var(--lieu) 60%, transparent), inset 0 0 0 1.5px rgba(255,255,255,.4); }
html:not([data-theme="clair"]) .coche::after { content: ""; position: absolute; inset: -18px; border-radius: 50%; border: 1.5px dotted rgba(255,255,255,.35); }

/* ── Assistant : orbe flou au bord coloré, puces à pastille, zone d'écriture lumineuse ── */
html:not([data-theme="clair"]) .orbe {
  width: 170px; height: 170px; position: relative; overflow: hidden; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5);
  background:
    radial-gradient(60% 45% at 50% 18%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(55% 70% at 45% 70%, #1b1240 10%, transparent 70%),
    radial-gradient(circle at 50% 50%, #c9b6ff, #7a5cf0 55%, #2a1d63 100%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--violet) 80%, #fff), inset 0 0 30px rgba(255,255,255,.35),
              0 0 60px -6px color-mix(in srgb, var(--violet) 80%, transparent);
}
html:not([data-theme="clair"]) .orbe::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(40% 25% at 50% 92%, rgba(255,210,240,.55), transparent 70%); mix-blend-mode: screen; }
html:not([data-theme="clair"]) .chat .puces button {
  border-radius: 999px; padding-left: 40px; font-weight: 600;
  background: radial-gradient(circle at 20px 50%, #fff 0, var(--p, #ffb38f) 4px, color-mix(in srgb, var(--p, #ffb38f) 60%, #000) 10px, transparent 11px), rgba(255,255,255,.07);
}
html:not([data-theme="clair"]) .chat .puces button:nth-child(5n+1) { --p: #ffb38f; }
html:not([data-theme="clair"]) .chat .puces button:nth-child(5n+2) { --p: #c9a8ff; }
html:not([data-theme="clair"]) .chat .puces button:nth-child(5n+3) { --p: #8fd9ff; }
html:not([data-theme="clair"]) .chat .puces button:nth-child(5n+4) { --p: #ff9fc8; }
html:not([data-theme="clair"]) .chat .puces button:nth-child(5n+5) { --p: #9ff0c0; }
html:not([data-theme="clair"]) .saisie {
  position: relative; overflow: hidden; padding: 10px; border-radius: 28px; align-items: flex-end;
  background: #0b0b0e; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.5);
}
html:not([data-theme="clair"]) .saisie::after {                     /* onde de lumière au bas de la zone d'écriture */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -30px; height: 70px; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--lieu) 75%, #fff 10%), color-mix(in srgb, var(--lieu) 35%, transparent) 45%, transparent 72%);
  filter: blur(10px); opacity: .75; animation: onde 6s ease-in-out infinite alternate;
}
@keyframes onde { from { transform: translateX(-8%) scaleY(.85); } to { transform: translateX(8%) scaleY(1.15); } }
html:not([data-theme="clair"]) .saisie > * { position: relative; z-index: 1; }
html:not([data-theme="clair"]) .saisie textarea { background: transparent; border: 0; box-shadow: none; outline: none; min-height: 52px; }
html:not([data-theme="clair"]) .saisie button { border-radius: 18px; flex-basis: 52px; min-height: 52px; background: rgba(255,255,255,.08); }
html:not([data-theme="clair"]) .saisie button.envoi { background: color-mix(in srgb, var(--lieu) 55%, #111); box-shadow: 0 0 20px -4px var(--lieu); }
html:not([data-theme="clair"]) .bulle.ia { border-radius: 22px 22px 22px 8px; background: rgba(255,255,255,.06); }
@media (prefers-reduced-motion: reduce) { .saisie::after { animation: none; } }


/* ═══════════ Finale (validée sur maquettes) : bulles de verre à billes, feuille blanche, chemises ═══════════ */
/* Billes et étiquette : dans chaque ligne du jour et de l'agenda */
.grappe { position: relative; width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; overflow: hidden;
  background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.30); }
.grappe i { position: absolute; border-radius: 50%; }
.grappe i:first-child { left: 7px; top: 9px; width: 30px; height: 30px;
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--c) 55%, #fff) 28%, var(--c) 62%, color-mix(in srgb, var(--c) 35%, #000)); }
.grappe i:last-child { left: 26px; top: 24px; width: 21px; height: 21px;
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--c) 45%, #fff) 32%, color-mix(in srgb, var(--c) 80%, #000) 80%); }
.puce-t { display: inline-block; align-self: flex-start; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--c); color: #0b0b0d; margin-bottom: 4px; width: fit-content; }
.ligne .tx { display: flex; flex-direction: column; min-width: 0; }
html:not([data-theme="clair"]) .carte.ligne { min-height: 78px; padding: 10px 18px 10px 10px;
  background:
    radial-gradient(60% 120% at 10% 50%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 0 0 1.5px rgba(255,255,255,.22),
              inset 0 -3px 14px color-mix(in srgb, var(--c) 55%, transparent), 0 0 34px -12px var(--c); }
html:not([data-theme="clair"]) .carte.ligne::before { display: none; }
html:not([data-theme="clair"]) .ligne .coche-t { width: 34px; height: 34px; flex: 0 0 34px; margin: 0 10px; }
.bulle-ev { border-left: 0 !important; }
.bulle-ev .h { flex: none; font: 200 26px/1 -apple-system, "SF Pro Display", system-ui, sans-serif; color: inherit; white-space: nowrap; }

/* Votre journée : anneau lumineux */
.carte.journee { display: flex; align-items: center; gap: 14px; border-radius: 30px; }
.carte.journee small { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--lieu); }
.carte.journee b { font-size: 16px; line-height: 1.3; }
.anneau { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(color-mix(in srgb, var(--lieu) 60%, #fff), var(--lieu), color-mix(in srgb, var(--lieu) 30%, transparent), color-mix(in srgb, var(--lieu) 60%, #fff)); }
.anneau span { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #0b0a08; color: #fff;
  font: 200 28px/1 -apple-system, "SF Pro Display", system-ui, sans-serif; }
html:not([data-theme="clair"]) .carte.journee { background: #0b0a08;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lieu) 55%, transparent), inset 0 0 40px color-mix(in srgb, var(--lieu) 22%, transparent), 0 0 40px -10px var(--lieu); }
html:not([data-theme="clair"]) .carte.journee::before { display: none; }
html:not([data-theme="clair"]) .anneau { box-shadow: 0 0 30px -6px var(--lieu); }
/* Les quatre chiffres sur une rangée */
html:not([data-theme="clair"]) .chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
html:not([data-theme="clair"]) .chiffre[style*="--c"] { min-height: 88px; padding: 10px; border-radius: 24px; font-size: 11.5px; line-height: 1.2; }
html:not([data-theme="clair"]) .chiffre[style*="--c"] b { font: 300 27px/1.1 -apple-system, "SF Pro Display", system-ui, sans-serif; }

/* À valider : le texte préparé est une feuille blanche posée sur la carte (le texte reste exactement celui qui partira) */
.message { position: relative; background: linear-gradient(160deg, #ffffff, #eef0f3); color: #1b1f27; border-radius: 16px; padding: 22px 20px;
  font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 17.5px; line-height: 1.6; margin: 22px 4px 18px; transform: rotate(-.8deg);
  box-shadow: 9px 9px 0 -1px #d9dde3, 0 22px 44px rgba(0,0,0,.45); }
.orbe-n { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dotted color-mix(in srgb, var(--texte) 45%, transparent); }
.orbe-n span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 300 14px/1 system-ui; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--lieu) 45%, #000), #08100b 75%); box-shadow: inset 0 0 0 1px var(--lieu), 0 0 14px -2px var(--lieu); }
.boutons.gestes { display: flex; align-items: flex-start; gap: 12px; }
.gestes .envoyer { flex: 1; min-height: 68px; border-radius: 999px; font-size: 19px; }
.gestes .geste { flex: 0 0 76px; min-height: 0; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--doux); }
.gestes .geste::before { display: none; }
.gestes .geste svg { width: 64px; height: 64px; padding: 21px; border-radius: 50%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; color: var(--texte);
  background: color-mix(in srgb, var(--texte) 9%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px color-mix(in srgb, var(--texte) 14%, transparent); }
html:not([data-theme="clair"]) .gestes .envoyer { color: #062012; background: radial-gradient(120% 160% at 50% 0%, #c9f7da, var(--vert) 55%, #2f7a4e);
  box-shadow: 0 0 40px -6px var(--vert), inset 0 1px 0 rgba(255,255,255,.7); }
html:not([data-theme="clair"]) .gestes .envoyer::before { display: none; }
html:not([data-theme="clair"]) #v-valider .carte { border-radius: 32px; background: #08100b;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--vert) 55%, transparent), inset 0 0 60px color-mix(in srgb, var(--vert) 20%, transparent), 0 0 60px -14px var(--vert); }
html:not([data-theme="clair"]) #v-valider .carte::before { display: none; }

/* Assistant : vos messages en pilule lumineuse */
html:not([data-theme="clair"]) .bulle.moi { border-radius: 24px 24px 8px 24px; background: linear-gradient(135deg, #a68bff, #5b3fd0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 24px -8px #8f6cff; }

/* Clients et dossiers : des chemises dans le même défilement */
.diapo .couv { overflow: visible; box-shadow: none; outline: none !important; contain: none; }
.chemise { position: relative; width: 100%; height: 100%; }
.chemise .dos { position: absolute; left: 0; right: 0; top: 16px; bottom: 0; border-radius: 22px; background: var(--g); }
.chemise .papier { position: absolute; left: 14%; right: 11%; top: 4px; height: 40%; border-radius: 10px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); padding: 10px 10px 0; }
.chemise .papier.f2 { background: #e4e7ec; transform: rotate(-5deg); left: 11%; right: 15%; box-shadow: none; }
.chemise .papier i { display: block; height: 4px; border-radius: 2px; background: #dfe2e7; margin-bottom: 7px; width: 85%; }
.chemise .papier i:first-child { width: 55%; background: #c9cdd4; } .chemise .papier i:last-child { width: 70%; }
.chemise .rabat { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; border-radius: 22px; padding: 30px 12px 12px; display: flex; flex-direction: column; color: #fff;
  clip-path: polygon(0 11%, 46% 11%, 58% 0, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.12)), linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 0 0 1.5px rgba(255,255,255,.25); }
.chemise.d .rabat { clip-path: polygon(0 0, 50% 0, 62% 11%, 100% 11%, 100% 100%, 0 100%); }
.chemise .rabat small { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .9; text-shadow: 0 1px 6px rgba(0,0,0,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chemise .rabat b { font: 700 40px/1.05 "Iowan Old Style", Palatino, Georgia, serif; text-shadow: 0 2px 10px rgba(0,0,0,.45); margin-top: 2px; }
.chemise .rabat em { margin-top: auto; align-self: flex-start; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.5); }
.chemise .rabat em.al { background: #ff5d52; }
.diapo.au-centre .chemise .dos { box-shadow: 0 0 34px -6px var(--lieu), 0 14px 26px rgba(0,0,0,.5); }


/* ═══════════ Sobre (26 nov. 2026) — le thème sombre reprend les formes du thème clair ═══════════
   Demande : plus de bulles ni de halos partout en sombre ; mêmes cartes nettes qu'en clair, couleurs sombres.
   L'assistant quitte le violet pour un cuivre accordé à l'or du cabinet ; zone d'écriture en carte, onde de lumière en bas. */
/* Seul le contour change : coins arrondis comme en clair, au lieu de la pilule. L'intérieur (billes, étiquettes, lueurs) reste. */
html:not([data-theme="clair"]) .carte.ligne { border-radius: 26px; }
html:not([data-theme="clair"]) .carte.journee { border-radius: 26px; }
html:not([data-theme="clair"]) .carte:has(#dictee) { border-radius: 26px; }
html:not([data-theme="clair"]) #v-valider .carte { border-radius: 26px; }
html:not([data-theme="clair"]) .gestes .envoyer { border-radius: 22px; }
html:not([data-theme="clair"]) .actions-haut button { border-radius: 22px; }
html:not([data-theme="clair"]) .actions-haut button.bleu { color: #fff; background: #0b0b0d;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55), inset 0 1px 0 rgba(255,255,255,.25); }

/* Assistant */
html:not([data-theme="clair"]) .orbe { width: 132px; height: 132px; text-shadow: none; color: #fff;
  background: radial-gradient(circle at 50% 120%, var(--cuivre), #3a1a0c 55%, #0d0a09 80%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 44px -14px var(--cuivre); }
html:not([data-theme="clair"]) .orbe::after { display: none; }
html:not([data-theme="clair"]) .chat .puces button { border-radius: 18px; }
html:not([data-theme="clair"]) .bulle.moi { border-radius: 22px 22px 8px 22px; background: linear-gradient(135deg, #f0a06c, #b4541f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 24px -10px var(--cuivre); }
.saisie { flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 28px; background: color-mix(in srgb, var(--texte) 5%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--texte) 12%, transparent); }
.saisie textarea { flex: 1 0 100%; min-height: 64px; background: transparent; border: 0; box-shadow: none; outline: none; padding: 6px 8px; }
.saisie button { flex: 0 0 48px; min-height: 48px; border-radius: 16px; display: grid; place-items: center; }
.saisie button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.saisie button.envoi { margin-left: auto; }
html:not([data-theme="clair"]) .saisie { background: #0c0b0b; padding: 12px; }
html:not([data-theme="clair"]) .saisie::after { left: 8%; right: 8%; bottom: -34px; height: 84px; opacity: .9;
  background: radial-gradient(50% 50% at 50% 50%, #fff3e6, var(--cuivre) 30%, color-mix(in srgb, var(--cuivre) 35%, transparent) 55%, transparent 74%); }
html:not([data-theme="clair"]) .saisie button { flex-basis: 48px; min-height: 48px; border-radius: 16px; background: rgba(255,255,255,.10); color: #fff; }
html:not([data-theme="clair"]) .saisie button.envoi { background: rgba(255,255,255,.14); box-shadow: none; }
html[data-theme="clair"] .saisie { background: rgba(255,255,255,.8); }
html[data-theme="clair"] .saisie button.envoi { background: #0d0d0f; color: #fff; }
html[data-theme="clair"] .saisie textarea { background: transparent !important; border: 0 !important; box-shadow: none !important; }

/* Sombre : plus de reflets sur les contours (comme en clair). L'intérieur ne change pas. */
html:not([data-theme="clair"]) .carte::before, html:not([data-theme="clair"]) .chiffre::before, html:not([data-theme="clair"]) button::before,
html:not([data-theme="clair"]) .bouton::before, html:not([data-theme="clair"]) nav.onglets::before, html:not([data-theme="clair"]) .creneau::before {
  background: rgba(255,255,255,.14); }
html:not([data-theme="clair"]) .carte.ligne {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 -3px 14px color-mix(in srgb, var(--c) 55%, transparent), 0 0 34px -12px var(--c); }
html:not([data-theme="clair"]) .chiffre[style*="--c"] {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, rgba(255,255,255,.14)), 0 0 34px -8px color-mix(in srgb, var(--c) 70%, transparent), 0 14px 30px rgba(0,0,0,.45); }
html:not([data-theme="clair"]) .grappe { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
html:not([data-theme="clair"]) .actions-haut button.bleu { box-shadow: inset 0 0 0 1px rgba(255,255,255,.30); }
html:not([data-theme="clair"]) .chemise .rabat { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }

/* Sombre : AUCUN contour (ni blanc ni coloré), comme en clair. Formes un peu plus rectangulaires. Billes, étiquettes et lueurs intérieures conservées. */
html:not([data-theme="clair"]) .carte::before, html:not([data-theme="clair"]) .chiffre::before, html:not([data-theme="clair"]) button::before,
html:not([data-theme="clair"]) .bouton::before, html:not([data-theme="clair"]) nav.onglets::before, html:not([data-theme="clair"]) .creneau::before { display: none !important; }
html:not([data-theme="clair"]) .carte { border: 0; border-radius: 20px; box-shadow: 0 12px 30px rgba(0,0,0,.30); }
html:not([data-theme="clair"]) .carte.ligne { border-radius: 20px;
  box-shadow: inset 0 -3px 14px color-mix(in srgb, var(--c) 45%, transparent), 0 0 30px -14px var(--c); }
html:not([data-theme="clair"]) .carte.journee { border-radius: 20px; box-shadow: inset 0 0 40px color-mix(in srgb, var(--lieu) 22%, transparent); }
html:not([data-theme="clair"]) .carte:has(#dictee) { border-radius: 20px; box-shadow: inset 0 0 36px color-mix(in srgb, var(--lieu) 26%, transparent); }
html:not([data-theme="clair"]) #v-valider .carte { border-radius: 20px; box-shadow: inset 0 0 60px color-mix(in srgb, var(--vert) 20%, transparent); }
html:not([data-theme="clair"]) .chiffre[style*="--c"] { border-radius: 18px; box-shadow: 0 14px 30px rgba(0,0,0,.40); }
html:not([data-theme="clair"]) .grappe { box-shadow: none; }
html:not([data-theme="clair"]) button, html:not([data-theme="clair"]) .bouton { border: 0; box-shadow: none; }
html:not([data-theme="clair"]) .actions-haut button, html:not([data-theme="clair"]) .actions-haut button.bleu { border-radius: 16px; color: #fff;
  background: rgba(255,255,255,.09); box-shadow: none; }
html:not([data-theme="clair"]) nav.onglets { border: 0; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
html:not([data-theme="clair"]) nav.onglets button { box-shadow: none; }
html:not([data-theme="clair"]) .saisie { box-shadow: 0 18px 40px rgba(0,0,0,.5); }
html:not([data-theme="clair"]) .chemise .rabat { box-shadow: none; }
html:not([data-theme="clair"]) .orbe { box-shadow: 0 0 44px -14px var(--cuivre); }
html:not([data-theme="clair"]) .gestes .envoyer { box-shadow: 0 0 40px -10px var(--vert); }


/* ═══════════ Accueil en constellation : trois cercles autour d'un anneau d'encre ═══════════ */
.constel { position: relative; height: 360px; margin: 6px 0 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.constel .liens { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.constel .liens line { stroke: color-mix(in srgb, var(--texte) 22%, transparent); stroke-width: 1.2; transition: all .7s cubic-bezier(.34,1.4,.5,1); }
.constel .liens line.on { stroke: color-mix(in srgb, var(--lieu) 80%, transparent); stroke-width: 1.6; }
.encre { position: absolute; width: 170px; height: 170px; translate: -50% -50%; color: var(--texte); opacity: .92; pointer-events: none;
  rotate: var(--rot, 0deg); transition: rotate 1s cubic-bezier(.34,1.35,.5,1), left .6s, top .6s; }
html:not([data-theme="clair"]) .encre { color: #efe6d8; }
.encre svg { width: 100%; height: 100%; overflow: visible; animation: respire-encre 7s ease-in-out infinite; }
.encre.eclabousse svg { animation: eclabousse .9s cubic-bezier(.3,1.6,.5,1), respire-encre 7s ease-in-out .9s infinite; }
@keyframes respire-encre { 0%, 100% { scale: 1; } 50% { scale: 1.035; } }
@keyframes eclabousse { 0% { scale: .86; filter: blur(1.5px); } 55% { scale: 1.08; } 100% { scale: 1; filter: none; } }
.constel .noeud { position: absolute; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; min-height: 0;
  background: none !important; box-shadow: none !important; border: 0; color: var(--texte); font-size: 13px; font-weight: 650; cursor: grab; z-index: 2;
  transition: left .7s cubic-bezier(.34,1.4,.5,1), top .7s cubic-bezier(.34,1.4,.5,1); }
.constel .noeud::before { display: none !important; }
.constel .noeud.tenu { transition: none; cursor: grabbing; z-index: 3; }
.constel .noeud .boule { position: relative; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--c) 40%, #fff) 0, var(--c) 42%, color-mix(in srgb, var(--c) 45%, #000) 100%);
  box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--c) 80%, transparent); transition: width .6s cubic-bezier(.34,1.5,.5,1), height .6s cubic-bezier(.34,1.5,.5,1); }
.constel .noeud .boule svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.constel .noeud.choisi .boule { width: 88px; height: 88px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 28%, transparent), 0 14px 34px -8px var(--c); }
.constel .noeud.choisi .boule svg { width: 32px; height: 32px; }
.constel .noeud .nb { position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center;
  font-size: 12px; background: var(--texte); color: var(--fond, #0b0b0d); }
.constel .noeud .nb:empty { display: none; }
.constel .noeud.vu:not(.choisi) .boule::after { content: "✓"; position: absolute; bottom: -2px; left: -2px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; background: var(--vert); color: #062012; }
.consigne-j { text-align: center; font-size: 14px; color: var(--doux); margin: 4px 0 10px; }
.consigne-j.fini { color: var(--vert); font-weight: 650; }
.volet { display: none; }
.volet.ouvert { display: block; animation: monte .55s cubic-bezier(.3,1.3,.5,1); }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
html[data-theme="clair"] .constel .noeud .nb { background: #0d0d0f; color: #fff; }
@media (prefers-reduced-motion: reduce) { .encre, .constel .noeud, .volet.ouvert, .encre svg { animation: none !important; transition: none !important; } }
/* L'anneau est en verre orange, comme les pilules lumineuses : même rendu en clair et en sombre */
.encre, html:not([data-theme="clair"]) .encre { opacity: 1; filter: drop-shadow(0 0 16px rgba(255,96,32,.55)) drop-shadow(0 0 40px rgba(255,70,20,.25)); }
html[data-theme="clair"] .encre { filter: drop-shadow(0 6px 18px rgba(255,90,30,.35)); }
.constel .liens line.on { stroke: rgba(255,140,70,.75); }
html[data-theme="clair"] .constel .noeud, html[data-theme="clair"] .constel button.noeud { background: none !important; box-shadow: none !important; border: 0 !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* Accueil : le défilement de la page reste libre sur les cercles, et l'anneau ne se redessine plus à chaque image */
.constel, .constel .noeud { touch-action: pan-y; }
.encre { will-change: transform; transition: rotate .9s cubic-bezier(.34,1.35,.5,1); }
.encre svg, .encre.eclabousse svg { animation: none; }
.encre.eclabousse { animation: rebond .7s cubic-bezier(.3,1.5,.5,1); }
@keyframes rebond { 0% { scale: .88; } 55% { scale: 1.07; } 100% { scale: 1; } }
.constel .noeud { will-change: left, top; }
.constel .liens line { transition: none; }
