/* Appli regisseur. Identite Keneo : blanc, bleu nuit, UN accent menthe. Rouge et orange seulement
   pour un vrai probleme, et en petit. Un sujet par ecran, la prochaine action en haut. */
@font-face { font-family: "Catamaran"; src: url("/static/catamaran-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --nuit: #111644; --menthe: #60ffc7; --texte: #66677b; --trait: #e3e4ec; --voile: #f5f6fa; --blanc: #fff;
  --rouge: #d5303a; --orange: #c96f00;
  --r: 8px;                                   /* un seul rayon partout */
  --haut: env(safe-area-inset-top, 0px); --bas: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--blanc); }
body { font: 400 17px/1.4 "Catamaran", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .01em; color: var(--texte);
  -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; user-select: none; -webkit-user-select: none; }
b, strong { font-weight: 700; color: var(--nuit); }
.app { height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; background: var(--blanc); overflow: hidden; position: relative; }
.bandeau-test { flex: none; background: var(--nuit); color: rgba(255, 255, 255, .55); font-size: 10.5px; font-weight: 500; letter-spacing: .04em;
  text-align: center; padding: calc(var(--haut) + 3px) 12px 0; line-height: 1.3; text-transform: none; }
.ecran { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* en-tete : le seul aplat bleu nuit de l'appli */
.tete { background: var(--nuit); color: #fff; padding: 10px 20px 16px; flex: none; }
.tete-ligne { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .6); }
.tete h1 { margin: 6px 0 0; font-size: 23px; font-weight: 700; line-height: 1.15; color: #fff; }
.tete-sous { font-size: 14.5px; color: rgba(255, 255, 255, .78); margin-top: 3px; }
.corps { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 22px 20px 32px; overscroll-behavior: contain; }

/* barre du bas */
.nav { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--blanc); border-top: 1px solid var(--trait); padding-bottom: var(--bas); }
.nav[hidden] { display: none; }
.nav button { position: relative; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--texte); font-size: 12.5px; font-weight: 600; transition: background .12s; }
.nav svg { width: 24px; height: 24px; }
.nav button.actif { color: var(--nuit); font-weight: 700; }
.nav button.actif::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 4px; background: var(--menthe); }
.nav button:active { background: var(--voile); }
.pastille { position: absolute; top: 9px; left: 56%; min-width: 9px; height: 9px; border-radius: 50%; background: var(--nuit); font-size: 0; }
#pastille-sig { background: var(--rouge); }
.pastille[hidden] { display: none; }

/* titres : la petite forme oblique menthe du site, puis un filet */
.titre { display: flex; align-items: center; gap: 10px; margin: 34px 0 6px; padding-bottom: 8px; border-bottom: 1px solid var(--trait);
  font-size: 19px; font-weight: 700; color: var(--nuit); line-height: 1.2; }
.titre::before { content: ""; flex: none; width: 11px; height: 22px; background: var(--menthe); transform: skewY(-32deg); }
.titre:first-child { margin-top: 0; }
.titre small { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--texte); }
.sur { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--texte); }
.muet { color: var(--texte); font-size: 15px; }
.petit { font-size: 14px; }
.note { margin: 12px 0 0; font-size: 15px; line-height: 1.4; }

/* boutons : menthe pour L'action de l'ecran, contour ou bleu nuit pour le reste */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 8px 18px; border-radius: var(--r);
  font-weight: 700; font-size: 18px; line-height: 1.15; text-align: center; text-decoration: none; color: var(--nuit); transition: transform .08s, background .12s, box-shadow .12s; }
.btn:active { transform: scale(.98); }
.btn-action { background: var(--menthe); box-shadow: 0 1px 0 rgba(17, 22, 68, .18), 0 6px 16px rgba(96, 255, 199, .32); }
.btn-action:active { background: #4eeab3; box-shadow: none; }
.btn-geant { min-height: 72px; font-size: 21px; }
.btn-fort { background: var(--nuit); color: #fff; } .btn-fort:active { background: #1c2260; }
.btn-sobre { background: var(--blanc); border: 2px solid var(--nuit); } .btn-sobre:active { background: var(--voile); }
.btn[disabled] { opacity: .5; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lien { color: var(--nuit); font-weight: 600; text-decoration: underline; text-decoration-color: var(--menthe); text-decoration-thickness: 3px; text-underline-offset: 4px;
  font-size: 15.5px; min-height: 44px; padding: 10px 0; display: inline-flex; align-items: center; }
.sous-bouton { margin: 12px 0 0; font-size: 15px; line-height: 1.35; }

/* Mission : UN sujet, la prochaine action */
.action .sur { display: block; margin-bottom: 4px; }
.action h2 { margin: 0; font-size: 31px; font-weight: 800; line-height: 1.08; color: var(--nuit); letter-spacing: 0; }
.action .quand { margin: 8px 0 20px; font-size: 17px; }
.action .quand .retard { color: var(--rouge); font-weight: 700; }
.etat-pc { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 15px; line-height: 1.35; }
.etat-pc .pt { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--c, var(--trait)); }
.etat-pc.alerte { color: var(--nuit); font-weight: 600; }
.c-rouge { --c: var(--rouge); } .c-orange { --c: var(--orange); } .c-vert { --c: var(--menthe); } .c-bleu { --c: var(--nuit); }
.c-blanc, .c-gris { --c: #c9cbd8; }

.jour-frise { margin: 18px 0 2px; } .jour-frise:first-of-type { margin-top: 10px; }
.frise { list-style: none; margin: 0; padding: 0; }
.frise li { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--trait); }
.frise li:last-child { border-bottom: 0; }
.frise .rond { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--trait); display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: var(--texte); }
.frise li.fait .rond { background: var(--nuit); border-color: var(--nuit); color: var(--menthe); }
.frise li.cours .rond { border-color: var(--menthe); box-shadow: 0 0 0 3px var(--menthe); border-color: var(--nuit); color: var(--nuit); }
.frise .nom { flex: 1; min-width: 0; font-weight: 500; }
.frise li.cours .nom { font-weight: 700; color: var(--nuit); } .frise li.fait .nom { color: var(--nuit); }
.frise li[data-a] { cursor: pointer; } .frise li[data-a]:active { background: var(--voile); }
.frise .nom small { display: block; font-size: 13.5px; font-weight: 500; color: var(--texte); }
.frise .h { text-align: right; font-size: 14px; white-space: nowrap; line-height: 1.25; }
.frise .h b { display: block; font-weight: 600; font-size: 14.5px; }

/* contacts */
.contact { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--trait); }
.contact:last-child { border-bottom: 0; }
.contact-qui { flex: 1; min-width: 0; }
.contact-role { font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.contact-nom { font-weight: 700; font-size: 18px; color: var(--nuit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.contact-tel { font-size: 15px; font-variant-numeric: tabular-nums; }
.btn-appel { flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: var(--r); background: var(--blanc);
  color: var(--nuit); border: 2px solid var(--nuit); font-weight: 700; font-size: 17px; text-decoration: none; transition: background .12s, transform .08s; }
.btn-appel:active { background: var(--menthe); transform: scale(.97); }

/* signalements : un filet de couleur, pas un aplat */
.sig { border-left: 3px solid var(--c, var(--trait)); padding: 2px 0 2px 14px; margin: 14px 0; font-size: 15px; }
.sig b { display: block; font-size: 16.5px; line-height: 1.3; }
.sig .statut { font-weight: 600; color: var(--nuit); }
.sig.resolu { opacity: .6; }
.n-bloquant { --c: var(--rouge); } .n-genant { --c: var(--orange); } .n-info { --c: #c9cbd8; }

/* Kit */
.moments { display: grid; grid-template-columns: repeat(4, 1fr); margin: -6px 0 24px; border-bottom: 1px solid var(--trait); }
.moments button { min-height: 54px; font-weight: 600; font-size: 15.5px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.2; border-bottom: 4px solid transparent; margin-bottom: -1px; transition: background .12s; }
.moments button:active { background: var(--voile); }
.moments button small { font-weight: 500; font-size: 12.5px; }
.moments button.actif { color: var(--nuit); font-weight: 700; border-bottom-color: var(--menthe); }
.moments button small.ko { color: var(--rouge); font-weight: 700; } .moments button small.afaire { color: var(--nuit); font-weight: 700; }
.inventaire { margin-bottom: 8px; }
.filtres { display: flex; gap: 8px; margin: 26px 0 4px; }
.filtres button, .puces button { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid var(--trait); font-weight: 600; font-size: 15.5px; color: var(--nuit); transition: background .12s; }
.filtres button:active, .puces button:active { background: var(--voile); }
.filtres button.actif, .puces button.actif { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.famille { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; margin: 22px 0 2px; }
.ligne { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 6px 0; border-bottom: 1px solid var(--trait); }
.ligne.lecture { min-height: 50px; }
.ligne .prod { flex: 1; min-width: 0; font-weight: 600; font-size: 16.5px; line-height: 1.2; color: var(--nuit); }
.ligne .prod small { display: block; font-weight: 400; font-size: 13.5px; color: var(--texte); }
.ligne .pas { flex: none; width: 48px; height: 48px; border-radius: var(--r); border: 1.5px solid var(--trait); font-size: 24px; font-weight: 600; color: var(--nuit);
  display: grid; place-items: center; transition: background .1s, transform .08s; }
.ligne .pas:active { background: var(--menthe); border-color: var(--menthe); transform: scale(.94); }
.ligne .q { flex: none; width: 46px; text-align: center; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: var(--nuit); }
.ligne .q small { display: block; font-size: 12px; font-weight: 500; color: var(--texte); margin-top: 3px; }
.ligne.vide .q { color: #b4b6c6; }
.ligne.ecart .q { color: var(--rouge); } .ligne.ecart .prod { box-shadow: -8px 0 0 var(--blanc), -11px 0 0 var(--rouge); }
.t-rouge { color: var(--rouge); }

/* Signaler */
.niveaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.niveaux button { min-height: 68px; border-radius: var(--r); border: 1.5px solid var(--trait); font-weight: 700; font-size: 16.5px; color: var(--nuit);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; padding: 4px; transition: background .12s; }
.niveaux button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-bottom: 5px; }
.niveaux button small { font-weight: 500; font-size: 12px; color: var(--texte); }
.niveaux button.actif { background: var(--nuit); border-color: var(--nuit); color: #fff; } .niveaux button.actif small { color: rgba(255, 255, 255, .7); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
textarea, input[type=search] { width: 100%; border: 1.5px solid var(--trait); border-radius: var(--r); padding: 13px 14px; font-size: 17px; background: var(--blanc); color: var(--nuit); }
textarea { min-height: 84px; resize: none; display: block; }
textarea::placeholder, input::placeholder { color: #9a9bac; }
textarea:focus, input:focus { outline: none; border-color: var(--nuit); }
.vignettes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .vignettes:empty { display: none; }
.vignettes .v { position: relative; width: 76px; height: 76px; border-radius: var(--r); overflow: hidden; background: var(--voile); }
.vignettes img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignettes .v button { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--nuit); color: #fff; font-weight: 700; }
.envoi { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 16px; } .envoi .btn-sobre { width: auto; padding: 0 20px; }

/* Stade */
.stade-nom { font-size: 26px; font-weight: 800; line-height: 1.12; color: var(--nuit); margin-bottom: 4px; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 1px 9px; border-radius: 11px; border: 1px solid var(--trait); color: var(--texte); vertical-align: middle; letter-spacing: 0; }
.badge.alerte { border-color: var(--orange); color: var(--orange); }
.info { padding: 12px 0; border-bottom: 1px solid var(--trait); color: var(--nuit); } .info:last-child { border: 0; }
.info .k { font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--texte); }
.info.h2 { display: flex; justify-content: space-between; gap: 10px; color: var(--texte); } .info.h2 b { white-space: nowrap; font-weight: 600; }
.source { font-size: 13px; color: var(--texte); word-break: break-all; }

/* Connexion */
.bonjour { padding: 6px 0 14px; } .bonjour h1 { font-size: 34px; font-weight: 800; color: var(--nuit); margin: 0 0 4px; line-height: 1.1; } .bonjour p { margin: 0 0 16px; }
.compte { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 10px 0; min-height: 68px; border-bottom: 1px solid var(--trait); transition: background .12s; }
.compte:active { background: var(--voile); }
.compte .ini { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--trait); color: var(--nuit); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.compte b { display: block; font-size: 17.5px; line-height: 1.25; } .compte span span { display: block; font-size: 14px; line-height: 1.3; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(78px + var(--bas)); width: min(92vw, 520px); background: var(--nuit);
  color: #fff; border-radius: var(--r); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; font-size: 16px; line-height: 1.3; z-index: 50; box-shadow: 0 10px 30px rgba(17, 22, 68, .28); }
.toast[hidden] { display: none; }
.toast button { flex: none; color: var(--menthe); font-weight: 700; min-height: 44px; padding: 0 6px; }
@media (min-width: 600px) { body { background: var(--voile); } .app { box-shadow: 0 0 0 1px var(--trait); } }

/* ===== Theme « verre sombre » (reference video de Steeve, 03/12 22:20), palette Keneo =====
   Fond bleu nuit profond, cartes en verre depoli, coins tres arrondis, UN accent : la menthe. */
:root { --nuit: #f3f5ff; --texte: rgba(233, 236, 255, .66); --trait: rgba(255, 255, 255, .12); --voile: rgba(255, 255, 255, .08);
  --blanc: #090c29; --rouge: #ff6b76; --orange: #ffb357; --r: 16px; --encre: #07122b;
  --verre: rgba(255, 255, 255, .07); --verre-bord: rgba(255, 255, 255, .14); }
html, body { background: #090c29; }
.app { background: radial-gradient(110% 52% at 88% -6%, rgba(78, 96, 228, .55), transparent 62%),
  radial-gradient(90% 44% at -12% 104%, rgba(96, 255, 199, .17), transparent 60%), #090c29; }
.bandeau-test { background: transparent; color: rgba(255, 255, 255, .42); }
.tete { background: transparent; padding-bottom: 10px; }
.corps { padding-top: 10px; }
.titre { border-bottom: 0; }
.action, .frise, .contact, .compte, .ligne, .inventaire, .sig, .moments {
  background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 12px 30px rgba(0, 0, 0, .22); }
.action, .inventaire { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); padding: 20px 18px 18px; }
.action h2 { font-weight: 700; }
.frise { padding: 4px 16px; }
.frise li[data-a]::after { content: "›"; flex: none; font-size: 26px; line-height: 1; color: rgba(255, 255, 255, .7); margin-left: 2px; }
.frise li.fait .rond { background: var(--menthe); border-color: var(--menthe); color: var(--encre); }
.frise li.cours .rond { border-color: #fff; color: #fff; box-shadow: 0 0 0 3px rgba(96, 255, 199, .65); }
.contact, .compte, .ligne { margin-bottom: 10px; }
.contact { padding: 14px 16px; } .compte { padding: 10px 14px; } .ligne { padding: 8px 12px; border-radius: 16px; }
.contact:last-child, .frise li:last-child { border-bottom: 1px solid var(--verre-bord); } .frise li:last-child { border-bottom: 0; }
.compte .ini { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
.btn-action { background: var(--menthe); color: var(--encre); border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 12px 32px rgba(96, 255, 199, .30); }
.btn-action:active { background: #4eeab3; }
.btn-fort, .btn-sobre, .btn-appel { background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .24); color: #fff; border-radius: 999px; }
.btn-fort:active, .btn-sobre:active, .btn-appel:active { background: var(--menthe); color: var(--encre); }
.lien { color: #fff; }
.nav { background: rgba(9, 12, 41, .74); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid rgba(255, 255, 255, .10); }
.nav button.actif { color: var(--menthe); }
.nav button:active { background: rgba(255, 255, 255, .08); }
.pastille { background: var(--menthe); }
.moments { overflow: hidden; margin: 0 0 16px; border-radius: 16px; }
.moments button.actif { color: #fff; }
.filtres button, .puces button, .niveaux button, .ligne .pas { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.ligne .pas { border-radius: 50%; }
.ligne .pas:active { background: var(--menthe); border-color: var(--menthe); color: var(--encre); }
.filtres button.actif, .puces button.actif, .niveaux button.actif { background: var(--menthe); border-color: var(--menthe); color: var(--encre); }
.niveaux button.actif small { color: rgba(7, 18, 43, .72); }
.ligne.vide .q { color: rgba(255, 255, 255, .35); }
.ligne.ecart { box-shadow: inset 4px 0 0 var(--rouge), 0 12px 30px rgba(0, 0, 0, .22); } .ligne.ecart .prod { box-shadow: none; }
textarea, input[type=search] { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
textarea::placeholder, input::placeholder { color: rgba(255, 255, 255, .42); }
textarea:focus, input:focus { border-color: var(--menthe); }
.vignettes .v button { background: rgba(0, 0, 0, .62); color: #fff; }
.sig { border-left: 4px solid var(--c, var(--verre-bord)); border-radius: 6px 16px 16px 6px; padding: 10px 14px; }
.badge { border-color: rgba(255, 255, 255, .26); color: rgba(255, 255, 255, .82); }
.c-bleu { --c: #fff; } .c-blanc, .c-gris { --c: rgba(255, 255, 255, .3); } .n-info { --c: rgba(255, 255, 255, .4); }
.toast { background: rgba(22, 27, 76, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .16); color: #fff; border-radius: 18px; }
@media (min-width: 600px) { body { background: #05071c; } .app { box-shadow: 0 0 0 1px rgba(255, 255, 255, .10); } }
