/* Outil de l'Équipe 2. Charte legeek.tech : papier ivoire, encre, un seul accent orange, Manrope.
   Un seul mouvement dans tout l'outil : le passage de surligneur sur la carte ou le post-it qui vient d'arriver
   (créé, restauré, ou rejoint depuis la recherche). Un lavis à la teinte de son auteur la traverse de gauche à
   droite, tient, puis s'efface, en deux secondes. Il est joué par Motion (public/motion.js, licence MIT) depuis
   « passer » dans app.js ; cette feuille ne contient ni « transition » ni « animation ».
   Sans Motion, ou si le système demande moins de mouvement (« prefers-reduced-motion »), rien ne bouge : la classe
   « vient » marque la carte pendant les mêmes deux secondes (bordure et fond teintés ; pour un post-it, un cadre
   plein sur les quatre côtés), puis tombe d'un coup. Le défilement qui y mène est instantané dans les deux cas.
   Partout ailleurs, un changement d'état est immédiat. */
@font-face {
  font-family: "Manrope";
  src: url("/manrope.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
:root {
  --papier: #f7f4ee; --papier-2: #efeae0; --blanc: #ffffff;
  --encre: #2a2520; --corps: #4a443d; --sourdine: #6f6860; --doux: #a8a298;
  --filet: rgba(42, 37, 32, .10); --regle: rgba(42, 37, 32, .20);
  /* --accent-texte : l'orange de la charte assombri d'un cran (#c24a17 → #b9440f) pour tenir 4,5:1 en petit texte sur ivoire. */
  --accent: #e8602a; --accent-texte: #b9440f; --accent-pale: #fcebe2;
  --vert: #2b6a4a; --vert-pale: #e3f0e7; --ambre: #8a5a00; --ambre-pale: #fbefcf;
  --rouge: #a3271d; --rouge-pale: #fbe9e7;
  --rayon: 14px; --rayon-petit: 9px;
  --police: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 272px;
}
/* Une couleur par membre : elle signe ses saisies et, plus loin, ses post-its. */
.m1 { --teinte: #f6d977; } .m2 { --teinte: #f4bfd0; } .m3 { --teinte: #b5d6f2; }
.m4 { --teinte: #bfe3c4; } .m5 { --teinte: #d9c9ef; } .m6 { --teinte: #ecd3b3; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--corps);
  font: 500 1rem/1.55 var(--police); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, strong { color: var(--encre); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: 0 0 .5em; }
h1::after { content: ""; display: block; width: 48px; height: 3px; border-radius: 2px; background: var(--accent); margin-top: 14px; }
h2 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; margin: 0; }
h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; margin: 0; }
p { margin: 0 0 .8em; }
a { color: var(--accent-texte); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
/* Ce que le navigateur dessine lui-même prend aussi la charte : sélection, curseur de saisie, barres de défilement. */
/* La sélection est un voile orange qui laisse au texte sa couleur : il reste lisible sur le papier comme sur l'encre du rail. */
::selection { background: rgba(232, 96, 42, .24); }
:root { caret-color: var(--accent-texte); scrollbar-color: var(--doux) transparent; }

/* La ligne de contexte se lit SOUS le titre (date, phase, auteur) : plus aucun surtitre en capitales au-dessus d'un titre. */
.contexte { font-size: .86rem; font-weight: 600; color: var(--sourdine); margin: 0 0 .9em; }
.contexte b { color: var(--accent-texte); font-weight: 800; }
.chapeau { font-size: 1.05rem; color: var(--corps); max-width: 62ch; margin: 0 0 1.4em; }
.aide { color: var(--sourdine); font-size: .86rem; }
.vide { color: var(--sourdine); background: var(--papier-2); border-radius: var(--rayon); padding: 22px; text-align: center; margin: 0 0 12px; }

/* --- Coquille ------------------------------------------------------------- */
body.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.rail {
  background: var(--encre); color: #d9d2c5; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  padding: 22px 14px 14px; display: flex; flex-direction: column; gap: 14px;
}
.rail .marque { display: block; padding: 0 10px; text-decoration: none; color: inherit; }
.rail .marque strong { display: block; color: #fff; font-size: 1.4rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.rail .marque span { display: block; color: var(--doux); font-size: .82rem; margin-top: 3px; }
.rail nav { display: flex; flex-direction: column; gap: 1px; }
/* Les trois phases du travail : repliées au repos, chacune s'ouvre sur ses rubriques. */
.rail .phases-rail { display: flex; flex-direction: column; gap: 1px; margin: 9px 0; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.rail .phase > summary { list-style: none; cursor: pointer; user-select: none; min-height: 32px; }
.rail .phase[open] > summary .attend { display: none; } /* phase ouverte : le point est déjà sur la rubrique qui attend */
.rail .phase > summary::-webkit-details-marker { display: none; }
.rail .phase > summary b { width: 20px; flex: none; text-align: center; font-size: .78rem; font-weight: 800; color: #f28c5f; } /* l'orange éclairci d'un cran pour rester lisible en petit sur l'encre */
.rail .phase > summary svg.ico { width: 14px; height: 14px; stroke-width: 2.2; color: var(--doux); }
.rail .phase[open] > summary svg.ico { transform: rotate(90deg); }
.rail .phase[open] > summary { color: #fff; }
.rail .phase > a.nav { padding-left: 40px; margin-top: 1px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--rayon-petit); color: #d9d2c5; text-decoration: none; font-weight: 600; font-size: .9rem; line-height: 1.3; }
.nav:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav.actif { background: var(--papier); color: var(--encre); font-weight: 800; }
.nav .nom { flex: 1; }
.nav .compte { font-size: .78rem; font-weight: 700; color: var(--doux); }
.nav.actif .compte { color: var(--sourdine); }
/* Le raccourci de la recherche, montré comme une touche. */
.nav kbd.compte { font-family: inherit; line-height: 1.5; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 5px; }
.nav.actif kbd.compte { border-color: var(--regle); }
.nav .attend { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.rail .pied-rail { margin-top: auto; padding: 12px 10px 14px; margin-bottom: -14px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: -14px; background: var(--encre); }
.rail .qui { display: flex; align-items: center; gap: 10px; }
.rail .qui .nom { flex: 1; min-width: 0; }
.rail .qui strong { color: #fff; display: block; line-height: 1.2; }
.rail .qui span.role { color: var(--doux); font-size: .82rem; }
.rail button.discret { color: #d9d2c5; min-width: 40px; min-height: 40px; justify-content: center; margin-right: -8px; }
.rail button.discret:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.rail .bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail .bas p { margin: 0; }
.signature-legeek { font-size: .78rem; font-weight: 600; color: var(--doux); letter-spacing: -.01em; }
.signature-legeek i { color: var(--accent); font-style: normal; }

.colonne { min-width: 0; }
main#vue { max-width: 920px; margin: 0 auto; padding: 44px 48px 96px; }
/* Les deux bandeaux du haut restent collés ensemble : « connexion perdue » au-dessus, « nouveautés » en dessous. */
.bandeaux { position: sticky; top: 0; z-index: 6; }
#nouveautes, #hors-ligne { padding: 10px 48px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: .92rem; }
#nouveautes { background: var(--encre); color: #fff; }
#nouveautes button { background: var(--papier); color: var(--encre); border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
/* Connexion perdue : fond ambre pâle et texte encre (plus de 12:1), pour ne pas le confondre avec une erreur de saisie. */
#hors-ligne { background: var(--ambre-pale); color: var(--encre); box-shadow: inset 0 0 0 1px var(--ambre); }
#hors-ligne button { background: var(--encre); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; min-height: 44px; font-weight: 700; }

.barre-haut, .onglets { display: none; }

/* --- Éléments communs ------------------------------------------------------- */
.carte { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 18px 20px; margin: 0 0 12px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teinte, var(--papier-2)); color: var(--encre); font-weight: 800; font-size: .95rem; flex: none; }
.avatar.petit { width: 24px; height: 24px; font-size: .72rem; }
.avatar.grand { width: 52px; height: 52px; font-size: 1.3rem; }

button { cursor: pointer; border: 1px solid transparent; border-radius: 10px; background: none; }
button:disabled { opacity: .5; cursor: default; }
/* Pendant un appel : le bouton actionné s'estompe (règle ci-dessus) ; ses voisins, figés le temps de la réponse,
   gardent leur aspect pour que la carte ne clignote pas à chaque geste. */
button[aria-busy="true"], button[data-fige]:disabled { cursor: progress; }
button[data-fige]:disabled { opacity: 1; }
button.principal { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent-texte); color: #fff; font-weight: 700; padding: 10px 18px; min-height: 44px; }
button.principal:hover { background: var(--encre); }
button.secondaire { display: inline-flex; align-items: center; gap: 8px; background: var(--blanc); border-color: var(--regle); color: var(--encre); font-weight: 700; padding: 9px 14px; min-height: 44px; }
button.secondaire:hover { border-color: var(--encre); }
button.discret { display: inline-flex; align-items: center; gap: 6px; color: var(--sourdine); font-weight: 600; font-size: .86rem; padding: 7px 8px; min-height: 36px; border-radius: 8px; }
button.discret:hover { background: var(--papier-2); color: var(--encre); }
button.discret svg.ico { width: 17px; height: 17px; }
button.danger:hover { background: var(--rouge-pale); color: var(--rouge); }
button.valider { color: var(--vert); }
button.valider:hover { background: var(--vert-pale); color: var(--vert); }

.segment { display: inline-flex; background: var(--papier-2); border-radius: 10px; padding: 3px; gap: 2px; }
.segment button { font-size: .86rem; font-weight: 700; color: var(--sourdine); padding: 6px 12px; min-height: 34px; border-radius: 8px; }
.segment button:hover { color: var(--encre); }
.segment button.actif { background: var(--blanc); color: var(--encre); box-shadow: 0 0 0 1px var(--filet); }

.pastille { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 99px; background: var(--papier-2); color: var(--corps); white-space: nowrap; }
.pastille svg.ico { width: 13px; height: 13px; stroke-width: 2.4; }
.pastille.vert { background: var(--vert-pale); color: var(--vert); }
.pastille.ambre { background: var(--ambre-pale); color: var(--ambre); }
.pastille.encre { background: var(--encre); color: #fff; }
.pastille.trait { background: none; box-shadow: inset 0 0 0 1px var(--regle); color: var(--sourdine); }
/* Mode démonstration : une mise en garde, donc l'ambre des avertissements, pas l'orange de la marque. */
.pastille.demo { background: var(--ambre-pale); color: var(--ambre); }

label, .etiquette { display: block; font-weight: 700; font-size: .86rem; color: var(--encre); margin: 0 0 6px; }
input[type=text], input[type=password], input[type=url], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--regle); border-radius: 10px; background: var(--blanc); color: var(--encre);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); border-radius: 10px; }
textarea { resize: vertical; min-height: 5.2em; line-height: 1.5; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent-texte); flex: none; }
.ligne { margin: 0 0 16px; }
.ligne.type-case { display: flex; gap: 10px; align-items: center; flex-direction: row-reverse; justify-content: flex-end; }
.ligne.type-case label { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* --- Entrée ------------------------------------------------------------------ */
.entree { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.entree-recit { background: var(--encre); color: #d9d2c5; padding: 56px 48px; display: flex; flex-direction: column; }
.entree-recit h1 { color: #fff; font-size: clamp(2.4rem, 1.5rem + 3.5vw, 3.6rem); }
.entree-recit .contexte { color: var(--doux); }
.entree-recit .chapeau { color: #d9d2c5; }
.entree-recit ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.entree-recit li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: baseline; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 14px; }
.entree-recit li b { color: #fff; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.entree-recit .signature-legeek { margin-top: auto; padding-top: 32px; }
.entree-saisie { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; max-width: 600px; }
.entree-saisie h2 { font-size: 1.6rem; letter-spacing: -.03em; margin: 0 0 6px; }
.entree-saisie form { margin-top: 22px; }
.entree-saisie .aide { margin: 8px 0 18px; }
/* Dans le formulaire, l'aide passe au-dessus du champ : le champ et son bouton se touchent presque,
   et tiennent ensemble dans ce que le clavier d'un téléphone laisse voir. */
.entree-saisie form .aide { margin: -2px 0 8px; }
.entree-saisie form input { margin-bottom: 12px; }
.membres { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 18px; }
.choix-membre { display: flex; align-items: center; gap: 12px; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 12px 14px; text-align: left; min-height: 64px; }
.choix-membre:hover { border-color: var(--encre); }
.choix-membre.actif { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-pale); }
.choix-membre strong { display: block; line-height: 1.2; }
.choix-membre .role { color: var(--sourdine); font-size: .84rem; font-weight: 600; }

/* --- Accueil ------------------------------------------------------------------ */
.salut { margin-bottom: 28px; }
.mission { display: flex; align-items: center; gap: 14px; margin: 0; }
.mission p { margin: 0; max-width: 54ch; }
.mission strong { display: block; }
.bloc { margin: 0 0 40px; }
.bloc > .tete-bloc { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.tete-bloc a { font-size: .86rem; font-weight: 700; white-space: nowrap; }
.duo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; margin: 0 0 40px; }
.duo .carte { margin: 0; }
.carte.jouer { padding: 6px 8px; }
.carte.jouer h2 { padding: 14px 12px 8px; }
.rangee { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--encre); font-weight: 600; }
.rangee + .rangee { box-shadow: 0 -1px 0 var(--filet); }
a.rangee:hover { background: var(--papier); }
.rangee .chiffre { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--accent-pale); color: var(--accent-texte); font-weight: 800; }
.rangee .nom { flex: 1; }
.rangee .nom small { display: block; color: var(--sourdine); font-weight: 500; font-size: .84rem; }
.rangee svg.ico { color: var(--doux); }
.carte.echeance { background: var(--encre); color: #d9d2c5; border-color: var(--encre); display: flex; flex-direction: column; gap: 4px; }
.echeance .jours { color: #fff; font-size: 3.4rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.echeance .jours small { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--doux); margin-left: 8px; }
.echeance strong { color: #fff; }
.echeance a { color: #fff; font-weight: 700; margin-top: auto; padding-top: 14px; }

.parcours { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.parcours li { position: relative; }
.parcours a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 2px 8px; text-decoration: none; color: var(--sourdine); font-size: .76rem; font-weight: 700; border-radius: 8px; }
.parcours a:hover { background: var(--papier-2); color: var(--encre); }
.parcours li::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: var(--regle); }
.parcours li:first-child::before { left: 50%; } .parcours li:last-child::before { right: 50%; }
.parcours li.passee::before { background: var(--encre); }
.parcours li.prochaine:not(:first-child)::before { background: linear-gradient(to right, var(--encre) 50%, var(--regle) 50%); }
.parcours .point { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--papier); border: 2px solid var(--regle); }
.parcours .passee .point { background: var(--encre); border-color: var(--encre); }
.parcours .prochaine .point { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-pale); }
.parcours .prochaine a { color: var(--encre); }
.parcours .rendu .point { border-radius: 4px; }
.parcours .mot { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-texte); min-height: 1em; line-height: 1; }

.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.phases .carte { margin: 0; padding: 16px 10px 8px; }
.phases h3 { padding: 0 10px 10px; display: flex; gap: 8px; align-items: baseline; }
.phases h3 b { color: var(--accent-texte); font-size: .8rem; font-weight: 800; letter-spacing: .06em; }
.rubrique-ligne { display: block; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--encre); }
.rubrique-ligne:hover { background: var(--papier); }
.rubrique-ligne .haut { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: .93rem; }
.rubrique-ligne .haut span:last-child { color: var(--sourdine); }
.jauge { display: block; height: 4px; border-radius: 2px; background: var(--papier-2); margin: 8px 0 4px; overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--vert); border-radius: 2px; }
.rubrique-ligne small { color: var(--sourdine); font-size: .78rem; font-weight: 600; }

.pied-rail .pastille { align-self: flex-start; }
.equipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
/* La couleur du membre fait tout le tour de sa carte (pas de liseré sur un seul côté d'une boîte arrondie). */
.membre { display: flex; flex-direction: column; gap: 10px; margin: 0; border-color: transparent; box-shadow: inset 0 0 0 2px var(--teinte); }
.membre .qui { display: flex; align-items: center; gap: 12px; }
.membre .qui strong { display: block; line-height: 1.2; }
.membre .role { color: var(--sourdine); font-size: .84rem; font-weight: 600; }
.membre .mission-courte { font-size: .86rem; margin: 0; }
.membre button { align-self: flex-start; margin: auto 0 -6px -8px; white-space: nowrap; font-size: .82rem; }
.membre button svg.ico { display: none; }
/* Bloc replié de l'accueil (« L'équipe ») : une ligne au repos, le contenu à la demande. */
details.repli > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
details.repli > summary::-webkit-details-marker { display: none; }
details.repli > summary h2 { flex: 1; }
details.repli > summary svg.ico { width: 16px; height: 16px; stroke-width: 2.2; color: var(--sourdine); }
details.repli[open] > summary svg.ico { transform: rotate(90deg); }
details.repli[open] > summary { margin-bottom: 14px; }
details.repli > summary:hover h2 { text-decoration: underline; text-underline-offset: 3px; }
.activite { list-style: none; margin: 0; padding: 0; }
.activite li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--filet); font-size: .92rem; }
.activite a { color: var(--encre); text-decoration: none; }
.activite a:hover { text-decoration: underline; }
.activite a { flex: 1; min-width: 0; }
.activite .aide { display: block; }
.activite .heure { white-space: nowrap; }

/* --- Rubrique et cartes ---------------------------------------------------------- */
.rubrique { margin-bottom: 44px; }
.rubrique > h2 { font-size: 1.3rem; margin: 0 0 6px; }
.barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.barre .pousse { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.element { padding: 18px 20px 12px; }
.element.supprime { opacity: .6; }
/* Élément créé ou restauré à l'instant : bordure pleine et fond teinté pendant deux secondes (voir l'en-tête du fichier).
   Sur ce fond, le texte secondaire (--sourdine) tient encore 4,7:1. */
.element.vient:not(.passe) { border-color: var(--accent); background: var(--accent-pale); }
/* Le passage de surligneur (classe « passe », posée par « passer » dans app.js quand Motion joue) remplace cette
   marque fixe sur une carte. Le lavis est une couche sous le texte : la teinte de l'auteur à 36 % sur le blanc de la
   carte, ce qui garde 4,5:1 au texte secondaire et à l'orange du texte sur les six teintes ; sans auteur connu, le
   fond pâle de la marque fixe. Un post-it garde son cadre à l'encre pendant le passage (plus bas, « .postit.vient ») :
   le lavis y est un voile blanc sur la teinte, ou le fond pâle sur un post-it blanc accepté de l'assistant. */
.vient.passe { position: relative; isolation: isolate; }
.passage { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: var(--accent-pale); }
.passage.de-membre { background: color-mix(in srgb, var(--teinte) 36%, transparent); }
.postit > .passage { background: rgba(255, 255, 255, .5); }
.postit.accepte > .passage { background: var(--accent-pale); }
.element:focus-visible { border-radius: var(--rayon); }
.element .tete { display: flex; gap: 14px; align-items: flex-start; }
.element .tete h3 { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.04rem; }
.element .etat { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vote { display: inline-flex; flex-direction: column; align-items: center; gap: 0; min-width: 46px; padding: 6px 8px; border: 1px solid var(--regle); border-radius: 10px; background: var(--blanc); color: var(--encre); font-weight: 800; line-height: 1.1; }
.vote svg.ico { width: 16px; height: 16px; stroke-width: 2.4; }
.vote:hover { border-color: var(--encre); }
.vote.actif { background: var(--accent-pale); border-color: var(--accent); color: var(--accent-texte); }
.champs { margin: 14px 0 0; display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 8px 18px; }
.champs dt { color: var(--sourdine); font-size: .8rem; font-weight: 700; padding-top: 2px; }
.champs dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--corps); }
.case { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; font-size: .9rem; color: var(--encre); margin: 14px 0 0; cursor: pointer; }
.pied { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--filet); }
.signe { display: inline-flex; align-items: center; gap: 8px; color: var(--sourdine); font-size: .82rem; font-weight: 600; }
.pied .actions { margin: 0; gap: 2px; }
.pied .actions .plus { display: none; }
.panneau { margin-top: 12px; padding: 16px; background: var(--papier); border-radius: 10px; }
.tete-panneau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fil { list-style: none; padding: 0; margin: 0 0 12px; }
.fil li { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.fil .bulle { flex: 1; background: var(--blanc); border: 1px solid var(--filet); border-radius: 4px 12px 12px 12px; padding: 8px 12px; }
.fil .texte { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fil .signe { justify-content: space-between; width: 100%; }
.commenter { display: flex; gap: 8px; align-items: flex-end; }
.commenter textarea { min-height: 46px; }
.histo { list-style: none; margin: 0; padding: 0; }
.histo li { padding: 8px 0; border-top: 1px solid var(--filet); font-size: .9rem; }
.histo summary { cursor: pointer; color: var(--accent-texte); font-weight: 700; font-size: .86rem; margin-top: 4px; }
.histo dl { display: grid; grid-template-columns: minmax(110px, 170px) 1fr; gap: 4px 14px; margin: 8px 0; }
.histo dt { color: var(--sourdine); font-size: .8rem; font-weight: 700; }
.histo dd { margin: 0; white-space: pre-wrap; }
.alerte { background: var(--rouge-pale); color: var(--rouge); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.conflit-champ { font-size: .86rem; margin: 6px 0 0; color: var(--rouge); }
.conflit-champ q { color: var(--encre); }
.ajout { border-color: var(--accent); }
.ajout h3, .edition h3 { margin: 0 0 16px; font-size: 1.05rem; }
details.corbeille { margin-top: 20px; color: var(--sourdine); }
details.corbeille > summary { cursor: pointer; font-weight: 700; font-size: .9rem; padding: 8px 0; }

/* --- Séances et documents --------------------------------------------------------- */
.retour { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; text-decoration: none; margin: 0 0 18px; }
.retour:hover { text-decoration: underline; }
.liste-seances { list-style: none; margin: 0; padding: 0; }
.seance { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--encre); background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); margin: 0 0 8px; }
.seance:hover { border-color: var(--encre); }
.seance .date { text-align: center; line-height: 1; }
.seance .date b { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; }
.seance .date span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--sourdine); }
.seance strong { display: block; line-height: 1.3; }
.seance .aide { display: block; margin-top: 2px; }
.seance.passee { background: none; }
.seance.passee .date b { color: var(--sourdine); }
.seance.prochaine { border-color: var(--accent); }
.documents { list-style: none; margin: 0 0 28px; padding: 0; }
.documents a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--encre); background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); margin: 0 0 8px; }
.documents a:hover { border-color: var(--encre); }
.documents a > span { flex: 1; }
.documents strong { display: block; line-height: 1.3; }
.documents svg.ico { color: var(--accent-texte); }
.sous-titre { margin: 28px 0 12px; }

/* --- Recherche --------------------------------------------------------------------- */
/* Un champ, une ligne de bilan, puis les lignes de résultat (mêmes lignes que la liste des documents). */
.chercher { max-width: 560px; margin: 0 0 10px; }
.champ-loupe { position: relative; }
.champ-loupe svg.ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sourdine); pointer-events: none; }
.champ-loupe input { padding-left: 44px; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
#bilan-recherche { margin: 0; min-height: 1.4em; }
.recherche .sous-titre span { margin-left: 8px; font-size: .86rem; font-weight: 700; color: var(--sourdine); }
.resultats a > span { min-width: 0; overflow-wrap: anywhere; }
.resultats .aide { display: block; margin-top: 2px; }
.resultats a > svg.ico { color: var(--sourdine); }
/* Le mot trouvé : fond teinté, texte à l'encre (plus de 12:1), sans changer la graisse pour ne pas décaler la ligne. */
mark { background: var(--accent-pale); color: var(--encre); border-radius: 3px; padding: 1px 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.document { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 28px 32px; margin-bottom: 14px; overflow-x: auto; }
.document h1 { font-size: 1.6rem; }
.document h2 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.document h3 { margin: 1.3em 0 .4em; }
.document li::marker { color: var(--accent-texte); }
.document table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .88rem; }
.document th, .document td { border-bottom: 1px solid var(--filet); padding: 8px 10px; text-align: left; vertical-align: top; }
.document th { color: var(--encre); font-weight: 800; border-bottom: 2px solid var(--encre); }
.document blockquote { margin: 1em 0; padding: 12px 16px; background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon-petit); }

/* --- Boîte à outils -------------------------------------------------------------------- */
main#vue.large { max-width: 1280px; }
.canevas-ligne { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); margin: 0 0 8px; text-decoration: none; color: var(--encre); }
a.canevas-ligne:hover { border-color: var(--encre); }
.canevas-ligne .nom { flex: 1; min-width: 0; }
.canevas-ligne strong { display: block; line-height: 1.3; }
.canevas-ligne .aide { display: block; }
.canevas-ligne > svg.ico:first-child { color: var(--accent-texte); }
.pile { display: inline-flex; padding-left: 6px; }
.pile .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--blanc); }
.tete-famille { margin: 0 0 14px; }
.tete-famille h2 { font-size: 1.25rem; }
.tete-famille .aide { margin: 4px 0 0; max-width: 62ch; font-size: .92rem; }
.famille.lean { background: var(--encre); border-radius: 20px; padding: 26px 24px 24px; margin-left: -24px; margin-right: -24px; }
.famille.lean h2 { color: #fff; }
.famille.lean .tete-famille .aide { color: #d9d2c5; }
.famille.lean .contexte { color: #d9d2c5; display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.famille.lean .contexte svg.ico { width: 16px; height: 16px; color: #f28c5f; }
.outils-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.outil-tuile { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 16px; text-decoration: none; color: var(--encre); }
.outil-tuile:hover { border-color: var(--encre); }
.famille.lean .outil-tuile { border-color: transparent; }
.famille.lean .outil-tuile:hover { box-shadow: 0 0 0 2px var(--accent); }
.outil-tuile .forme { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--papier-2); color: var(--encre); }
.famille.lean .outil-tuile .forme { background: var(--accent-pale); color: var(--accent-texte); }
.outil-tuile strong { line-height: 1.3; }
.outil-tuile .aide { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.outil-tuile .pastille { margin-top: auto; }

.lancer { margin: 0 0 32px; }
.lancer-form { border-color: var(--accent); margin-bottom: 32px; }
.lancer-form h3 { margin: 0 0 16px; font-size: 1.05rem; }
.fiche { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 40px; }
.fiche .carte { margin: 0; }
.fiche .entier { grid-column: 1 / -1; }
.fiche h2, .carte.humain h2, .carte.conclusion h2 { font-size: 1rem; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.fiche p, .carte.humain p { margin: 0; }
.fiche ol, .fiche ul { margin: 0; padding-left: 20px; }
.fiche li { margin: 0 0 6px; }
.fiche li::marker { color: var(--accent-texte); font-weight: 800; }
.carte.humain { background: var(--accent-pale); border-color: transparent; }
.carte.humain h2 svg.ico { color: var(--accent-texte); }
.lien-externe { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; }
.lien-externe svg.ico { width: 16px; height: 16px; }

.question-outil { font-weight: 700; color: var(--encre); max-width: 72ch; margin: 0 0 18px; }
.canevas .contexte a { color: var(--accent-texte); }
.legende { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--encre); background: var(--blanc); border: 1px solid var(--filet); border-radius: 99px; padding: 3px 10px 3px 4px; }
.puce b { color: var(--sourdine); }
.plan { display: grid; gap: 10px; margin: 0 0 16px; }
.plan.grille { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.plan.matrice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan.colonnes { grid-template-columns: repeat(var(--n), minmax(210px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
.plan.avec-axes { grid-template-columns: 20px minmax(0, 1fr); gap: 6px; }
.grille-matrice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.axe-x, .axe-y { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sourdine); text-align: center; }
.axe-y { writing-mode: vertical-rl; transform: rotate(180deg); }
.axe-x { grid-column: 2; }
.case-canevas { background: var(--papier-2); border-radius: var(--rayon); padding: 14px; min-height: 150px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.case-canevas header h3 { font-size: .95rem; display: flex; gap: 8px; align-items: baseline; }
.case-canevas header h3 b { color: var(--accent-texte); font-size: .8rem; font-weight: 800; }
.case-canevas header p { margin: 2px 0 0; font-size: .82rem; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; align-content: start; }
.plan.colonnes .notes { grid-template-columns: 1fr; }
.postit { background: var(--teinte, var(--blanc)); color: var(--encre); border-radius: 3px 3px 14px 3px; padding: 10px 10px 6px; min-height: 96px; margin: 0; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 0 rgba(42, 37, 32, .18), 0 8px 10px -8px rgba(42, 37, 32, .3); }
.postit .texte { margin: 0; flex: 1; font-size: .9rem; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.postit .bas { display: flex; align-items: center; gap: 2px; }
.postit .auteur { font-size: .72rem; font-weight: 800; margin-right: auto; }
.postit textarea { min-height: 64px; padding: 6px 8px; font-size: .9rem; font-weight: 600; line-height: 1.35; background: rgba(255, 255, 255, .75); border-color: rgba(42, 37, 32, .3); border-radius: 6px; }
button.mini { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 30px; min-height: 30px; padding: 4px 6px; border-radius: 7px; font-size: .76rem; font-weight: 800; color: var(--encre); }
button.mini svg.ico { width: 15px; height: 15px; }
button.mini:hover { background: rgba(42, 37, 32, .12); }
button.mini.actif, button.mini.plein { background: var(--encre); color: #fff; }
button.mini.plein { padding: 4px 10px; }
button.poser { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 96px; border: 1.5px dashed var(--regle); border-radius: 3px 3px 14px 3px; color: var(--sourdine); font-weight: 700; font-size: .86rem; }
button.poser:hover { border-color: var(--encre); color: var(--encre); background: rgba(255, 255, 255, .5); }
.carte.conclusion { margin-top: 24px; }
.texte-conclusion { white-space: pre-wrap; color: var(--encre); font-weight: 600; font-size: 1.02rem; margin: 12px 0; }
.carte.edition h3 { margin: 0 0 16px; }

/* --- Messages ----------------------------------------------------------------------- */
#avis { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 20; max-width: min(420px, calc(100vw - 40px)); }
.avis { background: var(--encre); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 24px rgba(42, 37, 32, .25); }
.avis.erreur { background: var(--rouge); }
/* Avis avec une action (« Annuler » après une suppression) : le texte à gauche, le bouton à droite. */
.avis.avec-action { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; }
.avis.avec-action span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.avis button { flex: none; background: var(--papier); color: var(--encre); border: 0; border-radius: 8px; padding: 6px 14px; min-height: 44px; font-weight: 700; }
.avis button:hover { background: var(--accent-pale); }
#hors-ligne button:hover { background: var(--accent-texte); }

/* --- Téléphone et tablette ------------------------------------------------------------ */
@media (max-width: 900px) {
  body.app { display: block; padding-bottom: 76px; }
  .rail { display: none; }
  .barre-haut { display: flex; align-items: center; gap: 10px; background: var(--encre); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 7; }
  .barre-haut a.marque { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; flex: 1; }
  .barre-haut a.marque span { color: var(--doux); font-weight: 600; font-size: .82rem; margin-left: 6px; letter-spacing: 0; }
  .onglets { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; background: var(--blanc); border-top: 1px solid var(--regle); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .onglets a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; min-height: 52px; border-radius: 10px; text-decoration: none; color: var(--sourdine); font-size: .72rem; font-weight: 700; }
  .onglets a.actif { color: var(--encre); background: var(--papier-2); }
  .onglets a.actif svg.ico { color: var(--accent-texte); }
  main#vue { padding: 26px 16px 40px; }
  .bandeaux { top: 56px; }
  #nouveautes, #hors-ligne { padding: 10px 16px; }
  #hors-ligne button, .avis button, #nouveautes button { min-height: 44px; }
  #avis { bottom: 88px; right: 12px; left: 12px; max-width: none; }
  .duo, .phases { grid-template-columns: 1fr; }
  /* Au téléphone, le formulaire doit se voir sans défiler : le récit se réduit au titre et à la phrase. */
  .entree { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .entree-recit { padding: 20px 20px 18px; }
  .entree-recit ul, .entree-recit .signature-legeek, .entree-recit .contexte { display: none; }
  .entree-recit h1 { font-size: 1.75rem; margin-bottom: .45em; }
  .entree-recit h1::after { margin-top: 10px; }
  .entree-recit .chapeau { margin: 0; font-size: .95rem; }
  /* « --clavier » : hauteur du clavier à l'écran, posée par le script quand il s'ouvre. Elle allonge la page
     pour que le champ et son bouton puissent remonter au-dessus de lui. */
  .entree-saisie { padding: 24px 20px calc(48px + var(--clavier, 0px)); justify-content: flex-start; }
  .entree-saisie h2 { font-size: 1.35rem; }
  .entree-saisie form { margin-top: 16px; }
  .membres { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .choix-membre { padding: 8px 10px; gap: 8px; min-height: 56px; min-width: 0; }
  .choix-membre > span:last-child { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
  .champs, .histo dl { grid-template-columns: 1fr; gap: 2px; }
  .champs dd { margin-bottom: 10px; }
  .parcours { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 6px; }
  .parcours li:nth-child(4n + 1)::before { left: 50%; } .parcours li:nth-child(4n)::before { right: 50%; }
  .element { padding: 16px 16px 10px; }
  .element .tete { flex-wrap: wrap; }
  .element .etat { width: 100%; justify-content: flex-start; order: 3; }
  .barre .pousse { margin-left: 0; width: 100%; }
  .barre .pousse .principal { flex: 1; }
  .commenter { flex-direction: column; align-items: stretch; }
  .seance { grid-template-columns: 52px minmax(0, 1fr); }
  .seance .pastille { grid-column: 2; justify-self: start; }
  .document { padding: 18px 16px; }
  .principal .complement { display: none; }
  .parcours li.prochaine:nth-child(4n + 1)::before { background: var(--regle); }
  /* Chaque action de carte garde son nom : l'icône au-dessus, le mot en dessous, comme dans la barre d'onglets du bas.
     Cinq noms ne tiennent pas sur une rangée de 375 px (mesuré : 320 px pour 309) : « Historique » et « Supprimer »,
     les deux gestes rares, se rangent derrière « Plus » et s'ouvrent sur une seconde rangée. */
  .pied .actions { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 2px 0; }
  .pied .actions .plus { display: inline-flex; }
  .pied .actions .rare { display: none; order: 1; }
  .pied .actions.ouvert .rare { display: inline-flex; }
  /* Saut de rangée avant les deux gestes rares : ils restent ensemble, « Supprimer » seul à droite, loin des autres. */
  .pied .actions.ouvert::before { content: ""; order: 1; flex-basis: 100%; }
  .pied .actions.ouvert .plus { background: var(--papier-2); color: var(--encre); }
  .pied .actions button.discret { flex-direction: column; justify-content: center; gap: 2px; min-width: 44px; min-height: 48px; padding: 5px 3px; font-size: .75rem; font-weight: 700; line-height: 1.2; position: relative; }
  .pied .actions button.discret b { position: absolute; top: 2px; left: calc(50% + 9px); font-size: .75rem; line-height: 1; color: var(--accent-texte); }
  .vote { min-width: 48px; min-height: 48px; justify-content: center; }
  .plan.colonnes { grid-template-columns: 1fr; overflow-x: visible; }
  .plan.grille { grid-template-columns: 1fr; }
  .grille-matrice, .plan.matrice { gap: 6px; }
  .case-canevas { padding: 10px; min-height: 0; }
  .plan.colonnes .notes, .plan.liste .notes, .plan.grille .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .canevas .barre .pousse { justify-content: space-between; }
}
@media (max-width: 900px) {
  .fiche { grid-template-columns: 1fr; }
  .famille.lean { margin-left: -8px; margin-right: -8px; padding: 20px 12px 14px; border-radius: 16px; }
  .onglets a { font-size: .72rem; }
}
/* --- Cours du brevet ---------------------------------------------------------
   La liste reprend les lignes de documents ; la fiche reprend la mise en page des documents de référence. */
.cours-liste .aide { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .86rem; }
.document.cours > :first-child { margin-top: 0; }
.document.cours h4 { margin: 1.2em 0 .3em; font-size: .95rem; }
.document.cours hr { border: 0; border-top: 1px solid var(--filet); margin: 1.6em 0; }
.document.cours code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: var(--papier); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.document.cours .tableau { overflow-x: auto; margin: 1em 0; }
.document.cours .tableau table { margin: 0; min-width: 480px; }
.document.cours li { margin: 0 0 4px; }

/* --- Assistant ---------------------------------------------------------------
   Un panneau à droite sur grand écran, par-dessus le contenu en dessous de 1180 px, plein écran au téléphone.
   Il ne s'ouvre jamais seul et rien n'y bouge. */
body.app.avec-ia { grid-template-columns: var(--rail) minmax(0, 1fr) 400px; }
.assistant { background: var(--blanc); border-left: 1px solid var(--regle); display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; min-width: 0; }
.assistant header { padding: 18px 20px 14px; border-bottom: 1px solid var(--filet); }
.assistant header h2 { display: flex; align-items: center; gap: 8px; }
.assistant header .effacer { margin-left: auto; }
.point-ia { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; display: inline-block; }
.voit { background: var(--papier); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: .84rem; }
.voit b { color: var(--encre); }
.gestes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.gestes button { border: 1px solid var(--regle); border-radius: 10px; padding: 8px 6px; font-weight: 700; font-size: .84rem; color: var(--encre); background: var(--blanc); min-height: 48px; cursor: pointer; }
.gestes button:hover:not(:disabled) { background: var(--encre); color: #fff; border-color: var(--encre); }
.gestes button:hover:not(:disabled) small { color: #d9d2c5; }
.gestes button:disabled { color: var(--doux); cursor: default; }
.gestes small { display: block; font-weight: 500; font-size: .75rem; color: var(--sourdine); }
.echanges { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.dit { max-width: 100%; font-size: .92rem; overflow-wrap: anywhere; }
.dit.membre { align-self: flex-end; background: var(--teinte); color: var(--encre); border-radius: 12px 12px 3px 12px; padding: 8px 12px; font-weight: 600; white-space: pre-wrap; }
.dit.ia p { margin: 0 0 8px; }
.dit.ia ul { margin: 0 0 8px; padding-left: 18px; }
.dit.ia li { margin: 0 0 4px; }
.dit.ia.erreur { background: var(--rouge-pale); color: var(--rouge); border-radius: 10px; padding: 10px 12px; }
.dit.ia.erreur p { margin: 0; font-weight: 600; }
.dit .qui { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sourdine); margin-bottom: 4px; }
.echanges .attente { background: var(--papier); border-radius: 10px; padding: 10px 12px; margin: 0; }
.proposition { border: 1.5px dashed var(--accent); border-radius: 3px 3px 14px 3px; padding: 10px 12px 8px; margin: 8px 0; background: var(--accent-pale); }
.proposition.faite { border-style: solid; border-color: var(--vert); background: var(--vert-pale); }
.proposition .ou { font-size: .72rem; font-weight: 800; color: var(--accent-texte); letter-spacing: .04em; text-transform: uppercase; }
.proposition.faite .ou { color: var(--vert); }
.proposition > p { margin: 4px 0 6px; font-weight: 600; color: var(--encre); white-space: pre-wrap; }
.proposition dl { margin: 0 0 6px; font-size: .84rem; }
.proposition dt { font-weight: 700; color: var(--sourdine); font-size: .74rem; }
.proposition dd { margin: 0 0 4px; color: var(--encre); }
.proposition > p.statut { font-size: .78rem; font-weight: 500; color: var(--sourdine); margin: 0 0 8px; }
.proposition textarea { width: 100%; margin: 6px 0 8px; }
.proposition .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.proposition .actions button { min-height: 40px; padding: 6px 12px; font-size: .84rem; }
.sources { font-size: .8rem; color: var(--sourdine); border-top: 1px solid var(--filet); padding-top: 8px; margin-top: 8px; }
.sources a { font-weight: 700; }
.saisie-ia { border-top: 1px solid var(--filet); padding: 12px 20px 14px; }
.saisie-ia .rang { display: flex; gap: 8px; align-items: flex-end; }
.saisie-ia textarea { flex: 1; min-width: 0; }
.saisie-ia .web { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; margin: 10px 0 6px; }
.saisie-ia .aide { margin: 0; font-size: .76rem; }
.ouvrir-ia { display: inline-flex; align-items: center; gap: 8px; }
.rail button.nav.ouvrir-ia { background: none; border: 0; width: 100%; text-align: left; cursor: pointer; gap: 10px; min-height: 36px; }
.rail button.nav.ouvrir-ia .point-ia { margin: 0 5.5px; }
.rail button.nav.ouvrir-ia:hover, body.avec-ia .rail button.nav.ouvrir-ia { background: rgba(255, 255, 255, .08); color: #fff; }
.barre-haut .ouvrir-ia { color: #fff; font-weight: 700; font-size: .86rem; min-height: 40px; }
/* Marque d'origine : ce que l'assistant a proposé et qu'un membre a accepté reste reconnaissable. */
.origine-ia { font-size: .8rem; color: var(--sourdine); margin: 8px 0 0; }
.origine-ia b { color: var(--accent-texte); font-weight: 800; }
.postit.accepte { background: var(--blanc); box-shadow: inset 0 0 0 1.5px var(--accent), 0 8px 10px -8px rgba(42, 37, 32, .3); }
/* Post-it restauré à l'instant : cadre plein à l'encre pendant deux secondes, lisible sur les six teintes et sur le blanc. */
.postit.vient, .postit.accepte.vient { box-shadow: inset 0 0 0 2px var(--encre), 0 8px 10px -8px rgba(42, 37, 32, .3); }
.postit .origine { font-size: .72rem; font-weight: 800; color: var(--accent-texte); letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; }
.postit .origine span { display: block; color: var(--sourdine); font-weight: 600; letter-spacing: 0; text-transform: none; }
/* Carte de l'administrateur : dépense et plafond. */
.budget-ia { margin-top: 12px; }
.budget-ia h2 { margin-bottom: 8px; }
.budget-ia .jauge { display: block; margin: 0 0 14px; }
.budget-ia .plafond label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 4px; }
.budget-ia .plafond .rang { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.budget-ia .plafond input { width: 120px; }
@media (max-width: 1180px) {
  body.app.avec-ia { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .assistant { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); height: auto; z-index: 9; box-shadow: -12px 0 40px rgba(42, 37, 32, .18); }
}
@media (max-width: 900px) {
  .assistant { left: 0; width: 100%; border-left: 0; box-shadow: none; }
  .assistant header { padding-top: 14px; }
  /* Au doigt : 44 px au moins pour fermer, effacer et cocher. */
  .assistant header button.discret { min-height: 44px; min-width: 44px; }
  .saisie-ia .web { min-height: 44px; margin: 6px 0 2px; }
  /* Échange engagé : la ligne « Il voit » tient sur deux lignes, le rappel sous la saisie s'efface, la saisie se fait plus basse. */
  .assistant.engage .voit { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 8px 12px; margin-top: 8px; }
  .assistant.engage .gestes { margin-top: 8px; }
  .assistant.engage .gestes button { min-height: 44px; padding: 5px 6px; }
  .assistant.engage .saisie-ia .aide { display: none; }
  .assistant.engage .saisie-ia textarea { min-height: 46px; height: 46px; }
  .assistant.engage .saisie-ia { padding: 8px 20px 8px; }
  .barre-haut a.marque { white-space: nowrap; }
  /* Au doigt : 44 px au moins pour tout ce qui se touche. Ce bloc est le dernier du fichier sous 900 px,
     pour passer après les hauteurs de 30 à 40 px données plus haut aux mêmes boutons. */
  button.discret, .barre-haut .ouvrir-ia, .proposition .actions button, .segment button { min-height: 44px; }
  .barre-haut button.discret { min-width: 44px; justify-content: center; }
  /* La loupe : seule entrée de la recherche au téléphone (le rail est masqué, les cinq onglets sont pris). */
  .barre-haut a.loupe { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; color: #fff; }
  .barre-haut a.loupe.actif { background: rgba(255, 255, 255, .16); }
  button.mini { min-width: 44px; min-height: 44px; }
  .postit .bas { flex-wrap: wrap; }
  .postit .auteur { flex-basis: 100%; }
  .case { min-height: 44px; margin-top: 6px; }
}
@media (max-width: 420px) {
  .barre-haut a.marque span { display: none; }
  /* Barre étroite : les écarts se resserrent, pour que la loupe tienne à 360 px. */
  .barre-haut { gap: 6px; padding-left: 12px; padding-right: 12px; }
}
/* Sous 360 px, « Documents » (64,5 px à 0,72 rem, mesuré) ne tient plus dans un cinquième d'écran : seul endroit où
   un texte descend à 0,68 rem, sans marge latérale (60,9 px pour 61,6 px à 320 px). */
@media (max-width: 359px) {
  .onglets a { font-size: .68rem; padding-left: 0; padding-right: 0; }
}
@media print {
  .assistant { display: none !important; }
}
@media print {
  .rail, .barre-haut, .onglets, #avis, .bandeaux, .pied .actions, .barre { display: none !important; }
  body.app { display: block; }
}
