/* Albus web : les couleurs et la police d'Albus, pour le téléphone. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/inter.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/inter-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2113, U+A720-A7FF; }

:root {
  color-scheme: light dark;
  --fond: #f4f5f7; --carte: #fff; --creux: #eceef1; --bord: #e1e4e8;
  --texte: #1b1f27; --doux: #5c6472; --accent: #1f4b8e; --accent-clair: #e7eefa;
  --rouge: #b3261e; --orange: #c46a00; --vert: #2e7d4f; --or: #b8860b;
  --haut: env(safe-area-inset-top, 0px); --bas: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #12151a; --carte: #191d24; --creux: #21262f; --bord: #2c323c; --texte: #e6e9ee; --doux: #99a2b0;
    --accent: #6f9de0; --accent-clair: #1c2634; --rouge: #f2857d; --orange: #e8a24a; --vert: #6cc28a; --or: #d8b453; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--fond); color: var(--texte); font: 15px/1.4 Inter, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }

#app { display: flex; flex-direction: column; height: 100dvh; }
.haut { flex: none; background: var(--carte); border-bottom: 1px solid var(--bord); padding: calc(10px + var(--haut)) 16px 10px; }
.haut .ligne1 { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.haut .t { font-size: 21px; font-weight: 700; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.haut .s { color: var(--doux); font-size: 12.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.haut .retour { color: var(--accent); font-size: 15px; padding: 2px 0; background: none; border: 0; display: inline-flex; align-items: center; gap: 2px; margin-left: -4px; }
.haut .act { background: none; border: 0; color: var(--accent); padding: 4px; display: inline-flex; }
.haut .act svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.haut .act.tourne svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.corps { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 16px; }
.bas { flex: none; display: flex; background: color-mix(in srgb, var(--carte) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--bord); padding-bottom: var(--bas); }
.bas a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 8px; font-size: 11px; color: var(--doux); }
.bas a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bas a.on { color: var(--accent); font-weight: 600; }

/* puces, onglets, recherche */
.puces { display: flex; gap: 6px; padding: 10px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puce { flex: none; border: 1px solid var(--bord); background: var(--carte); color: var(--doux); border-radius: 16px; padding: 5px 12px; font-size: 13px; }
.puce.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .puce.on { color: #10141a; } }
.puce .n { opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.onglets { display: flex; gap: 2px; padding: 0 8px; background: var(--carte); border-bottom: 1px solid var(--bord); overflow-x: auto; scrollbar-width: none; flex: none; }
.onglets button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 10px 9px; color: var(--doux); font-size: 14px; }
.onglets button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.cherche { margin: 10px 16px 2px; display: flex; align-items: center; gap: 8px; background: var(--creux); border-radius: 11px; padding: 0 12px; }
.cherche svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--doux); stroke-width: 1.8; stroke-linecap: round; }
.cherche input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; font: inherit; font-size: 16px; color: var(--texte); outline: none; }

/* listes */
.sep { padding: 14px 16px 5px; font-size: 11.5px; font-weight: 700; color: var(--doux); text-transform: uppercase; letter-spacing: .05em; }
.ligne { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--bord); background: var(--carte); align-items: flex-start; }
.ligne:active { background: var(--creux); }
.sep + .ligne { border-top: 1px solid var(--bord); }
.ligne .g { flex: 1; min-width: 0; }
.ligne .d { text-align: right; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ligne .nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-weight: 700; font-variant-numeric: tabular-nums; }
.tache { font-size: 14px; }
.note { font-size: 13px; color: var(--doux); overflow-wrap: anywhere; }
.leg { font-size: 12px; color: var(--doux); }
.rouge { color: var(--rouge); font-weight: 600; }
.orange { color: var(--orange); font-weight: 600; }
.etiq { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 0 6px; margin-left: 2px; background: var(--accent-clair); color: var(--accent); }
.etiq.non { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.vide { padding: 40px 24px; text-align: center; color: var(--doux); font-size: 14px; }
.plus { display: block; margin: 12px auto; background: var(--carte); border: 1px solid var(--bord); color: var(--accent); border-radius: 10px; padding: 9px 18px; }

/* calendrier */
.mois { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px 6px; font-weight: 700; font-size: 16px; }
.mois button { background: none; border: 0; color: var(--accent); font-size: 24px; width: 44px; height: 36px; }
.grille { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 8px; text-align: center; }
.grille .e { color: var(--doux); font-size: 11px; padding-bottom: 4px; }
.grille .j { padding: 4px 0 2px; border-radius: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.grille .j.hors { opacity: .35; }
.grille .j.we { color: var(--doux); }
.grille .j .c { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; }
.grille .j.auj .c { border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; }
.grille .j.sel .c { background: var(--accent); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) { .grille .j.sel .c { color: #10141a; } }
.pts { display: flex; justify-content: center; gap: 3px; height: 6px; margin-top: 1px; }
.pts i { width: 5px; height: 5px; border-radius: 50%; }
.pc { background: var(--accent); }
.pl { background: var(--rouge); }
.legende { display: flex; gap: 14px; padding: 8px 16px 2px; font-size: 11.5px; color: var(--doux); }
.legende span { display: inline-flex; align-items: center; gap: 5px; }
.legende i { width: 7px; height: 7px; border-radius: 50%; }

/* fiche */
.carte { margin: 12px 16px 0; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 11px 14px; }
.carte .k { font-size: 11px; color: var(--doux); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; }
.carte .k span { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 2px 0; }
.kv > span:first-child { color: var(--doux); flex: none; }
.kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.carte .tache-f + .tache-f { border-top: 1px solid var(--bord); margin-top: 8px; padding-top: 8px; }
.md { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-size: 15px; margin: 12px 0 4px; }
.md h1:first-child, .md h2:first-child, .md h3:first-child { margin-top: 0; }
.md p { margin: 0 0 6px; }
.md ul { margin: 0 0 6px; padding-left: 20px; }
.md code { font-size: 12.5px; background: var(--creux); border-radius: 4px; padding: 0 3px; }
.replie { max-height: 210px; overflow: hidden; position: relative; }
.replie::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--carte)); }
.lien { display: inline-block; margin-top: 6px; color: var(--accent); background: none; border: 0; padding: 0; font-size: 14px; }
.entree + .entree { border-top: 1px solid var(--bord); margin-top: 10px; padding-top: 10px; }
.bouton { display: block; margin: 14px 16px 0; border: 1px solid var(--accent); color: var(--accent); background: var(--carte); border-radius: 11px; text-align: center; padding: 11px; font-weight: 600; width: calc(100% - 32px); }

/* fichiers, courriels */
.doc { display: flex; gap: 11px; padding: 9px 16px; border-bottom: 1px solid var(--bord); background: var(--carte); align-items: center; color: var(--texte); }
.doc:active { background: var(--creux); }
.doc .ic { width: 26px; height: 26px; flex: none; }
.doc .ic svg { width: 26px; height: 26px; display: block; }
.doc .g { flex: 1; min-width: 0; }
.doc .t1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.doc .t2 { font-size: 12px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc .nb { font-size: 12px; color: var(--doux); background: var(--creux); border-radius: 9px; padding: 0 7px; line-height: 19px; flex: none; }
.doc .chev { color: var(--doux); flex: none; font-size: 18px; }
.fil { padding: 10px 16px 4px; font-size: 12.5px; color: var(--doux); display: flex; flex-wrap: wrap; gap: 2px 4px; }
.fil button { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12.5px; }
.fil b { color: var(--texte); font-weight: 600; }
.sens { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.sens.recu { background: var(--vert); }
.sens.envoye { background: var(--accent); }
.message { padding: 14px 16px; background: var(--carte); border-bottom: 1px solid var(--bord); }
.message .objet { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.message .ent { font-size: 13px; color: var(--doux); margin-bottom: 12px; }
.message pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14.5px; margin: 0; }

/* greffe */
.etape { display: flex; gap: 12px; padding: 7px 16px; }
.etape .p { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--doux); }
.etape .p.notre { background: var(--accent); }
.etape .x { font-size: 14px; }
.etape .x small { display: block; color: var(--doux); font-size: 12px; }
.etape .p.delai { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-clair); }
.etape .p.clos { background: var(--vert); }
.etape .x.rouge, .etape .x.orange { font-weight: 600; }
.etape .pj { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--accent); }
.etape .pj svg { width: 16px; height: 16px; flex: none; }
.etape .pj span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.etape .x { min-width: 0; flex: 1; }

/* connexion */
.connexion { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.connexion img { width: 92px; height: 92px; border-radius: 22px; }
.connexion h1 { margin: 0 0 6px; font-size: 24px; }
.connexion input { width: 100%; max-width: 320px; font: inherit; font-size: 17px; padding: 12px 14px; border: 1.5px solid var(--bord); border-radius: 12px; background: var(--carte); color: var(--texte); }
.connexion button { width: 100%; max-width: 320px; font-weight: 600; font-size: 16px; padding: 12px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; }
.connexion .err { color: var(--rouge); font-size: 14px; min-height: 20px; }
.charge { padding: 40px; text-align: center; color: var(--doux); }
