/* Concept : écran holographique de commande. Anneau des secteurs, carrousel courbe au pouce, fiches qui montent du bas. Un seul thème, sombre, voulu. */
:root {
  --fond: #03070d;
  --fond-2: #071220;
  --holo: #62e0ff;
  --holo-doux: rgba(98, 224, 255, .14);
  --holo-trait: rgba(98, 224, 255, .38);
  --ambre: #ffb547;
  --rouge: #ff5a4e;
  --vert: #6fe3a5;
  --texte: #d9f4ff;
  --texte-2: #86a9ba;
  --f-titre: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-texte: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: radial-gradient(120% 70% at 50% 0%, #0b2236 0%, var(--fond) 60%) fixed, var(--fond);
  color: var(--texte); font: 15px/1.4 var(--f-texte); overflow-x: hidden; padding-top: env(safe-area-inset-top, 0px); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(98,224,255,.03) 0 1px, transparent 1px 3px); }
.page { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--texte); }
:focus-visible { outline: 2px solid var(--ambre); outline-offset: 2px; }
.coupe { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

.barre { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 11px var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); }
.barre b { color: var(--holo); font-weight: 500; }
.barre-actions { display: flex; gap: 6px; }
.icone { width: 44px; height: 44px; border: 1px solid var(--holo-trait); font-size: 18px; color: var(--texte-2); }
.icone:hover { color: var(--holo); border-color: var(--holo); }
.pastille { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--holo); box-shadow: 0 0 10px var(--holo); margin-right: 6px; animation: pouls 2.4s infinite; }
.pastille.ko { background: var(--rouge); box-shadow: 0 0 10px var(--rouge); }
@keyframes pouls { 50% { opacity: .35; } }

.tete { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: 16px; }
.anneau { width: 160px; height: 160px; position: relative; }
.anneau svg { width: 100%; height: 100%; overflow: visible; }
.anneau .tour { animation: tourne 40s linear infinite; transform-origin: 50% 50%; }
@keyframes tourne { to { transform: rotate(360deg); } }
.anneau .seg { cursor: pointer; transition: stroke-width .2s, opacity .2s; }
.anneau .seg:hover, .anneau .seg.actif { stroke-width: 13; }
.centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.centre strong { font: 700 38px/1 var(--f-titre); color: var(--holo); text-shadow: 0 0 18px rgba(98,224,255,.6); font-variant-numeric: tabular-nums; }
.centre span { font: 10px var(--f-data); letter-spacing: .16em; text-transform: uppercase; color: var(--texte-2); margin-top: 4px; }
h1 { font: 700 clamp(30px, 5.5vw, 54px)/.95 var(--f-titre); margin: 0; letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
h1 em { font-style: normal; color: var(--holo); text-shadow: 0 0 22px rgba(98,224,255,.45); }
.tete-texte { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.parler { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px 0 16px; background: var(--holo); color: #021018;
  font: 600 15px var(--f-titre); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 0 26px rgba(98,224,255,.35);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.micro { width: 14px; height: 20px; border: 2.5px solid currentColor; border-radius: 8px; position: relative; }
.micro::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 2.5px; height: 6px; background: currentColor; transform: translateX(-50%); }

.commandes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.defile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.defile::-webkit-scrollbar { display: none; }
.secteur { flex: 0 0 auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--holo-trait);
  font: 12px var(--f-data); letter-spacing: .08em; text-transform: uppercase; color: var(--texte-2);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.secteur[aria-pressed="true"] { background: var(--holo-doux); color: var(--holo); border-color: var(--holo); }
.secteur i { font-style: normal; opacity: .6; margin-left: 6px; }
.chercher { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--holo-trait); background: rgba(3,7,13,.6); }
.chercher input { flex: 1; min-width: 0; min-height: 42px; background: none; border: 0; font: 14px var(--f-data); outline: none; }
.chercher input::placeholder { color: var(--texte-2); }

.scene { margin-top: 6px; }
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 22px calc(50% - min(34vw, 150px)) 24px; scrollbar-width: none; perspective: 1100px; }
.rail::-webkit-scrollbar { display: none; }
.carte { flex: 0 0 min(68vw, 300px); scroll-snap-align: center; position: relative; text-align: left; min-height: 300px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, rgba(98,224,255,.12), rgba(7,18,32,.88) 45%);
  border: 1px solid var(--holo-trait); clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  transform-style: preserve-3d; transition: border-color .2s; will-change: transform; }
.carte:hover { border-color: var(--holo); }
.carte.veille, .carte.archive { filter: saturate(.55); }
.carte.nouveau { align-items: center; justify-content: center; text-align: center; border-style: dashed; color: var(--texte-2); }
.carte.nouveau strong { font: 600 22px var(--f-titre); color: var(--holo); }
.carte .num { font: 11px var(--f-data); color: var(--texte-2); letter-spacing: .12em; display: flex; justify-content: space-between; gap: 8px; }
.carte h3 { font: 600 24px/1.05 var(--f-titre); margin: 2px 0 0; overflow-wrap: anywhere; }
.carte p { margin: 0; color: var(--texte-2); line-height: 1.45; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.inconnu { color: var(--ambre) !important; opacity: .85; }
.statut { font: 11px var(--f-data); letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.statut.actif, .statut.en-cours { color: var(--holo); } .statut.veille, .statut.attente { color: var(--ambre); }
.statut.archive, .statut.arretee, .statut.interrompue { color: var(--texte-2); } .statut.terminee { color: var(--vert); } .statut.erreur { color: var(--rouge); }
.statut.en-cours::before { animation: pouls 1.2s infinite; }
.signal { display: flex; gap: 3px; align-items: flex-end; height: 32px; margin-top: auto; }
.signal span { flex: 1; background: var(--holo); opacity: .5; min-height: 2px; }
.pied { display: flex; justify-content: space-between; gap: 8px; font: 11px var(--f-data); color: var(--texte-2); border-top: 1px solid var(--holo-trait); padding-top: 9px; }
.etoile { color: var(--ambre); }
.vide { flex: 1; text-align: center; padding: 50px 16px; color: var(--texte-2); font-family: var(--f-data); }
.vide button { margin-top: 14px; min-height: 44px; padding: 0 16px; border: 1px solid var(--holo); color: var(--holo); }
/* Rayons : un par secteur sur l'accueil, couleur du secteur en --c */
.puce { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--holo)); box-shadow: 0 0 8px var(--c, var(--holo)); margin-right: 8px; vertical-align: 1px; }
.rayons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
.rayon { min-width: 0; border-top: 1px solid var(--holo-trait); padding-top: 6px; }
.rayon.bac { border-top-color: var(--rouge); }
.rayon-tete { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; width: 100%; min-height: 48px; text-align: left; }
.rayon-tete h2 { font: 600 19px var(--f-titre); letter-spacing: .06em; text-transform: uppercase; margin: 0; color: var(--c, var(--texte)); min-width: 0; overflow-wrap: anywhere; }
.rayon-tete .compte { font: 11px var(--f-data); color: var(--texte-2); letter-spacing: .1em; text-transform: uppercase; }
.rayon-tete .voir { margin-left: auto; font: 11px var(--f-data); color: var(--texte-2); letter-spacing: .1em; text-transform: uppercase; }
.rayon-tete:hover .voir { color: var(--holo); }
.rail.rail-rayon { padding: 6px 16px 14px; margin-inline: -16px; scroll-snap-type: x proximity; perspective: none; gap: 10px; }
.rail-rayon .carte { flex-basis: min(66vw, 250px); min-height: 200px; scroll-snap-align: start; padding: 14px 14px 12px; gap: 8px; }
.rail-rayon .carte h3 { font-size: 20px; }
.rail-rayon .carte p { -webkit-line-clamp: 3; font-size: 13.5px; }
.rail-rayon .carte .signal { height: 22px; }
.carte.nouveau.mini { flex-basis: 120px; min-height: 200px; font-size: 13px; }
.vide-rayon { align-self: center; font: 12px var(--f-data); color: var(--texte-2); padding: 0 6px; }
.carte::before { content: ""; position: absolute; left: 18px; right: 0; top: 0; height: 3px; background: var(--c, transparent); opacity: .85; }
.carte.nouveau::before { display: none; }
.ranger { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.ranger .secteur[aria-pressed="true"] { border-color: var(--c); color: var(--texte); background: color-mix(in srgb, var(--c) 18%, transparent); }
.ligne-secteur { display: grid; grid-template-columns: 1fr 56px 44px 44px 44px; gap: 6px; align-items: end; }
.ligne-secteur .icone { margin-bottom: 12px; }
.ligne-secteur .icone:disabled { opacity: .3; pointer-events: none; }
.reperes { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.reperes span { width: 14px; height: 3px; background: var(--holo-trait); transition: background .2s, width .2s; }
.reperes span.ici { background: var(--holo); width: 30px; }

.bloc-taches { margin-top: 30px; }
.titre-bloc { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--holo-trait); padding-bottom: 8px; }
.titre-bloc h2 { font: 600 18px var(--f-titre); letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.titre-bloc span { font: 11px var(--f-data); color: var(--texte-2); letter-spacing: .1em; text-transform: uppercase; }
.liste-taches { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.tache { text-align: left; border: 1px solid var(--holo-trait); background: rgba(7,18,32,.7); padding: 12px 14px; display: grid; gap: 6px; min-width: 0; }
.tache:hover { border-color: var(--holo); }
.tache b { font: 600 16px var(--f-titre); }
.tache p { margin: 0; color: var(--texte-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tache .ligne { display: flex; justify-content: space-between; gap: 8px; font: 11px var(--f-data); color: var(--texte-2); }
.liste-taches .vide { grid-column: 1 / -1; padding: 24px 8px; text-align: left; }

.voile { position: fixed; inset: 0; background: rgba(1,4,8,.72); backdrop-filter: blur(3px); z-index: 20; }
.fiche { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 720px; margin: 0 auto; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #0a1b2c, var(--fond-2)); border: 1px solid var(--holo); border-bottom: 0;
  padding: 22px max(18px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%, 0 22px); animation: monte .28s cubic-bezier(.2,.9,.25,1); }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }
.fiche h3 { font: 600 28px/1.1 var(--f-titre); margin: 6px 56px 6px 0; overflow-wrap: anywhere; }
.fiche h4 { font: 500 11px var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); margin: 20px 0 8px; }
.fiche .desc { color: var(--texte-2); line-height: 1.5; margin: 0 0 14px; }
.donnees { display: flex; flex-wrap: wrap; gap: 1px; background: var(--holo-trait); border: 1px solid var(--holo-trait); margin: 0 0 16px; }
.donnees div { flex: 1 1 140px; background: var(--fond-2); padding: 10px 12px; min-width: 0; }
.donnees dt { font: 10px var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); }
.donnees dd { margin: 3px 0 0; font: 13px var(--f-data); overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act { min-height: 48px; padding: 0 12px; border: 1px solid var(--holo-trait); text-align: left; font: 12px var(--f-data); letter-spacing: .06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texte); }
.act:hover { border-color: var(--holo); color: var(--holo); }
.act.principal { grid-column: 1 / -1; background: var(--holo); color: #021018; border-color: var(--holo); font-weight: 500; justify-content: center; font-size: 13px; }
.act.principal:hover { color: #021018; box-shadow: 0 0 22px rgba(98,224,255,.5); }
.act.danger { color: var(--rouge); border-color: rgba(255,90,78,.45); }
.act.large { grid-column: 1 / -1; }
.act[aria-disabled="true"], .act:disabled { opacity: .4; pointer-events: none; }
.confirmer { grid-column: 1 / -1; border: 1px solid var(--rouge); padding: 12px; line-height: 1.45; }
.confirmer div { display: flex; gap: 8px; margin-top: 10px; }
.confirmer button { min-height: 44px; flex: 1; border: 1px solid var(--holo-trait); font: 12px var(--f-data); text-transform: uppercase; }
.confirmer .oui { background: var(--rouge); border-color: var(--rouge); color: #1a0402; }
.fermer { position: absolute; top: 14px; right: max(14px, env(safe-area-inset-right, 0px)); width: 44px; height: 44px; border: 1px solid var(--holo-trait); font-size: 18px; color: var(--texte-2); }

.champ { display: grid; gap: 6px; margin-bottom: 12px; }
.champ span { font: 10px var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-2); }
.champ input, .champ textarea, .champ select { width: 100%; min-height: 46px; padding: 10px 12px; background: rgba(3,7,13,.7); border: 1px solid var(--holo-trait); border-radius: 0; }
.champ textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.champ input:focus, .champ textarea:focus, .champ select:focus { border-color: var(--holo); outline: none; }
.ligne-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bascule { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--holo-trait); }
.bascule input { width: 22px; height: 22px; accent-color: var(--holo); }
.aide { font-size: 13px; color: var(--texte-2); line-height: 1.5; margin: 6px 0 0; }
.aide.alerte { border-left: 2px solid var(--ambre); padding-left: 10px; }

.composer { position: relative; }
.composer textarea { padding-right: 64px; }
.bouton-micro { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border: 1px solid var(--holo); color: var(--holo); display: grid; place-items: center; }
.bouton-micro.ecoute { background: var(--rouge); border-color: var(--rouge); color: #1a0402; animation: pouls 1s infinite; }
.suggestions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.suggestions button { min-height: 36px; padding: 0 10px; border: 1px dashed var(--holo-trait); font-size: 13px; color: var(--texte-2); }

.journal { display: grid; gap: 8px; margin-top: 8px; font-size: 14.5px; line-height: 1.5; }
.journal .ev-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.journal .ev-outil, .journal .ev-info { font: 12px var(--f-data); color: var(--texte-2); display: flex; gap: 8px; min-width: 0; }
.journal .ev-outil b { color: var(--holo); font-weight: 500; flex: 0 0 auto; }
.journal .ev-outil span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal .ev-fin { border: 1px solid var(--holo-trait); padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.journal .ev-fin.erreur { border-color: var(--rouge); }
.consigne { border-left: 2px solid var(--holo); padding: 4px 0 4px 12px; color: var(--texte); white-space: pre-wrap; overflow-wrap: anywhere; }
.en-attente { font: 12px var(--f-data); color: var(--texte-2); }
.en-attente::after { content: "▍"; animation: pouls 1s infinite; margin-left: 4px; color: var(--holo); }

.bulle { padding: 10px 12px; border: 1px solid var(--holo-trait); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 14.5px; }
.bulle.toi { border-color: var(--holo); background: var(--holo-doux); margin-left: 12%; }
.bulle.claude { margin-right: 6%; background: rgba(3,7,13,.5); }
.bulle small { display: block; font: 10px var(--f-data); color: var(--texte-2); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40;
  background: var(--fond-2); border: 1px solid var(--holo); padding: 10px 14px; font: 12.5px var(--f-data); display: flex; gap: 12px; align-items: center; width: max-content; max-width: calc(100% - 32px); }
.toast.erreur { border-color: var(--rouge); }
.toast button { color: var(--ambre); text-transform: uppercase; font-size: 12px; min-height: 36px; }

.ecran-acces { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: var(--fond); }
.carte-acces { width: min(360px, 100%); border: 1px solid var(--holo); padding: 26px 22px; display: grid; gap: 12px; background: var(--fond-2);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }
.carte-acces h2 { font: 600 24px var(--f-titre); margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.carte-acces p { margin: 0; color: var(--texte-2); line-height: 1.5; }
.carte-acces > * { min-width: 0; width: 100%; }
.carte-acces .pastille { width: 7px; }
.carte-acces input { min-height: 56px; text-align: center; font: 28px var(--f-data); letter-spacing: .5em; background: rgba(3,7,13,.7); border: 1px solid var(--holo-trait); }
.erreur { color: var(--rouge) !important; }

@media (max-width: 560px) {
  .tete { gap: 14px; margin-top: 10px; }
  .anneau { width: 96px; height: 96px; }
  .centre strong { font-size: 24px; } .centre span { font-size: 8px; }
  h1 { font-size: 28px; }
  .parler { min-height: 46px; font-size: 13px; padding: 0 14px 0 12px; }
  .commandes { margin-top: 12px; }
  .ligne-champs { grid-template-columns: 1fr; }
  .fiche h3 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
