/* Police Inter hébergée par l'appli (licence OFL, assets/fonts/LICENSE) : aucune requête vers Google */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); }
/* Planning Police — thème sobre : fond clair, bleu marine, une seule police */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface2: #f0f2f5;
  --champ: #ffffff;
  --bord: #e2e5ea;
  --bord2: #cfd4dc;
  --texte: #161a22;
  --doux: #626a78;
  --accent: #1f3a68;
  --accent-h: #172d52;
  --accent-l: #e8edf5;
  --sur-accent: #ffffff;
  --jour: #b7791f; --jour-l: #fbf3e4;
  --nuit: #3b4a7a; --nuit-l: #e7eaf3;
  --repos: #2f7a5a; --repos-l: #e6f2ec;
  --abs: #a8404c; --abs-l: #f8e8ea;
  --ok: #2f7a5a; --ok-l: #e6f2ec;
  --ko: #b3343f; --ko-l: #f9e6e8;
  --att: #6b7280; --att-l: #eef0f3;
  --bulle: #eceef2;
  --ombre: 0 1px 2px rgba(16, 24, 40, .05);
  --ombre2: 0 8px 24px rgba(16, 24, 40, .12);
  --rayon: 12px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218; --surface: #171b23; --surface2: #1e232d; --champ: #12161d;
    --bord: #262c37; --bord2: #343b48; --texte: #e8eaee; --doux: #9aa2b0;
    --accent: #7f9fd6; --accent-h: #9bb4e0; --accent-l: #1d2738; --sur-accent: #0f1218;
    --jour: #e0a64a; --jour-l: #2b2416; --nuit: #9aa8d8; --nuit-l: #1f2436;
    --repos: #6cc39b; --repos-l: #17271f; --abs: #e07c87; --abs-l: #2e1a1d;
    --ok: #6cc39b; --ok-l: #17271f; --ko: #e5737e; --ko-l: #2e1a1d; --att: #9aa2b0; --att-l: #232833;
    --bulle: #232833; --ombre: none; --ombre2: 0 8px 24px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1218; --surface: #171b23; --surface2: #1e232d; --champ: #12161d;
  --bord: #262c37; --bord2: #343b48; --texte: #e8eaee; --doux: #9aa2b0;
  --accent: #7f9fd6; --accent-h: #9bb4e0; --accent-l: #1d2738; --sur-accent: #0f1218;
  --jour: #e0a64a; --jour-l: #2b2416; --nuit: #9aa8d8; --nuit-l: #1f2436;
  --repos: #6cc39b; --repos-l: #17271f; --abs: #e07c87; --abs-l: #2e1a1d;
  --ok: #6cc39b; --ok-l: #17271f; --ko: #e5737e; --ko-l: #2e1a1d; --att: #9aa2b0; --att-l: #232833;
  --bulle: #232833; --ombre: none; --ombre2: 0 8px 24px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { touch-action: manipulation; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.45; background: var(--bg); color: var(--texte); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
a { color: var(--accent); }
.entete a { text-decoration: none; color: inherit; }
.fond { display: none; }

/* Icônes au trait */
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
svg.i.gros { width: 26px; height: 26px; color: var(--accent); }
svg.i.doux { color: var(--doux); width: 16px; height: 16px; vertical-align: -2px; }
svg.i.resp { width: 14px; height: 14px; color: var(--jour); vertical-align: -1px; }
svg.i.vert { color: var(--ok); } svg.i.rouge { color: var(--ko); }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px); }

/* Chargement */
.chargement { min-height: 60vh; display: grid; place-items: center; }
.gyro { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--bord); border-top-color: var(--accent); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* En-tête */
.entete { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 18px) 0 16px; }
.entete h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.3px; flex: 1; }
.entete .sous { color: var(--doux); font-size: 13px; font-weight: 500; }
.logo-g { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: var(--accent); }
.logo-g svg.i { width: 55%; height: 55%; }

/* Avatars */
.av { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: #fff; background: var(--c1, var(--accent)); }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av.p { width: 34px; height: 34px; font-size: 12px; }
.av.g { width: 96px; height: 96px; font-size: 32px; }
.av.online::after { content: ''; position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.av.anneau { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--bord2); }

/* Cartes */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; margin-bottom: 12px; box-shadow: var(--ombre); }
.carte h2, .titre { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--doux); margin: 0 0 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.carte h2 svg.i { width: 16px; height: 16px; }
.titre { margin: 22px 4px 10px; }

/* Carte vacation principale */
.hero { position: relative; overflow: hidden; padding: 20px; border-left: 4px solid var(--accent); }
.hero.J { border-left-color: var(--jour); }
.hero.N { border-left-color: var(--nuit); }
.hero.R { border-left-color: var(--repos); }
.hero .deco { display: none; }
.hero .etiq { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--doux); }
.hero .etiq .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hero .grand { font-size: 24px; font-weight: 700; margin: 8px 0 2px; letter-spacing: -.3px; }
.hero .heure { font-size: 15px; color: var(--doux); }
.barre { height: 6px; background: var(--surface2); border-radius: 99px; margin-top: 16px; overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 1s; }
.hero.J .barre i { background: var(--jour); } .hero.N .barre i { background: var(--nuit); }
.hero .rebours { margin-top: 8px; font-size: 13px; color: var(--doux); }

/* Pile d'avatars */
.pile { display: flex; margin-top: 16px; align-items: center; }
.pile .av { margin-right: -8px; box-shadow: 0 0 0 2px var(--surface); }
.pile span { margin-left: 16px; font-weight: 500; font-size: 14px; color: var(--accent); }

/* Listes */
.liste { display: flex; flex-direction: column; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer; transition: background .15s; }
.liste > .ligne + .ligne { border-top: 1px solid var(--bord); border-radius: 0; }
.ligne:hover { background: var(--surface2); }
.ligne .info { flex: 1; min-width: 0; }
.ligne .nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .det { color: var(--doux); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pastilles de vacation */
.pastille { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; background: var(--att-l); color: var(--att); }
.pastille svg.i { width: 14px; height: 14px; vertical-align: 0; }
.pastille.J { background: var(--jour-l); color: var(--jour); }
.pastille.N { background: var(--nuit-l); color: var(--nuit); }
.pastille.R { background: var(--repos-l); color: var(--repos); }
.pastille.A { background: var(--abs-l); color: var(--abs); }
.pastille.ok { background: var(--ok-l); color: var(--ok); }
.pastille.ko { background: var(--ko-l); color: var(--ko); }

/* Semaine */
.semaine { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.semaine .j { text-align: center; padding: 8px 0 10px; border-radius: 10px; background: var(--surface2); font-size: 12px; color: var(--doux); }
.semaine .j b { display: block; font-size: 16px; color: var(--texte); margin: 2px 0 4px; }
.semaine .j .ic { display: grid; place-items: center; height: 18px; }
.semaine .j .ic svg.i { width: 16px; height: 16px; }
.semaine .j.J { background: var(--jour-l); color: var(--jour); }
.semaine .j.N { background: var(--nuit-l); color: var(--nuit); }
.semaine .j.A { background: var(--abs-l); color: var(--abs); }
.semaine .j.auj { box-shadow: inset 0 0 0 2px var(--accent); }

/* Statistiques */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { border-radius: var(--rayon); padding: 14px 16px; background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre); }
.stat b { font-size: 26px; font-weight: 700; display: block; color: var(--texte); letter-spacing: -.5px; }
.stat span { font-size: 13px; color: var(--doux); }
.jauge { height: 5px; border-radius: 99px; background: var(--surface2); margin-top: 10px; overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--accent); }

/* Calendrier */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-nav b { font-size: 17px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .ent { text-align: center; font-size: 11px; color: var(--doux); padding-bottom: 4px; font-weight: 600; text-transform: uppercase; }
.cal .c { aspect-ratio: 1 / 1.1; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 600; font-size: 14px; position: relative; border: 0; cursor: pointer; background: var(--surface2); color: var(--texte); }
.cal .c small { display: grid; place-items: center; height: 14px; }
.cal .c small svg.i { width: 13px; height: 13px; }
.cal .c.J { background: var(--jour-l); color: var(--jour); }
.cal .c.N { background: var(--nuit-l); color: var(--nuit); }
.cal .c.R { background: transparent; color: var(--doux); font-weight: 500; }
.cal .c.A { background: var(--abs-l); color: var(--abs); }
.cal .c.vide { background: none; cursor: default; }
.cal .c.auj { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .c .pt { position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal .c .pt.hs { left: 5px; right: auto; background: var(--jour); }
.legende { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* Grille groupe */
.grille { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.grille table { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.grille th { font-weight: 500; color: var(--doux); min-width: 26px; }
.grille td.n { white-space: nowrap; padding-right: 8px; font-weight: 600; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.grille td.k { width: 26px; height: 28px; text-align: center; border-radius: 5px; font-weight: 600; cursor: pointer; }
.grille td.k svg.i { width: 13px; height: 13px; }
.grille td.J { background: var(--jour-l); color: var(--jour); } .grille td.N { background: var(--nuit-l); color: var(--nuit); }
.grille td.R { background: var(--surface2); color: var(--doux); } .grille td.A { background: var(--abs-l); color: var(--abs); }

/* Onglets */
.onglets { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--bord); margin-bottom: 16px; }
.onglets button { border: 0; background: none; padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--doux); white-space: nowrap; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets button:hover { color: var(--texte); }
.onglets button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Boutons et formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent); border-radius: 10px; padding: 11px 16px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--sur-accent); transition: background .15s, opacity .15s; }
.btn:hover { background: var(--accent-h); }
.btn:disabled { opacity: .5; }
.btn.plein { width: 100%; }
.btn.sec { background: var(--surface); color: var(--texte); border-color: var(--bord2); }
.btn.sec:hover { background: var(--surface2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ko { background: var(--surface); border-color: var(--bord2); color: var(--ko); }
.btn.ko:hover { background: var(--ko-l); }
.btn.mini { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.icone { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--bord); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; color: var(--doux); }
.icone:hover { color: var(--texte); background: var(--surface2); }
.icone svg.i { width: 18px; height: 18px; }
.fab { position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(var(--nav-h) + var(--safe-b) + 16px); width: 52px; height: 52px; border-radius: 50%; font-size: 26px; font-weight: 400; z-index: 5; padding: 0; box-shadow: var(--ombre2); }

label.ch { display: block; font-size: 13px; color: var(--doux); font-weight: 500; margin-bottom: 12px; }
.ch input, .ch select, .ch textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--bord2); background: var(--champ); color: var(--texte); font-size: 16px; outline: none; transition: border .15s, box-shadow .15s; }
.ch input:focus, .ch select:focus, .ch textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-l); }
.ch small { font-weight: 400; opacity: .8; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choix { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.choix button { border: 1px solid var(--bord2); background: var(--surface); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 14px; }
.choix button.on { background: var(--accent-l); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.motif { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.motif button { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--bord); font-weight: 700; font-size: 14px; cursor: pointer; background: var(--surface2); color: var(--doux); }
.motif button.J { background: var(--jour-l); color: var(--jour); border-color: transparent; }
.motif button.N { background: var(--nuit-l); color: var(--nuit); border-color: transparent; }
.types-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.types-g button { border: 1px solid var(--bord2); background: var(--surface); border-radius: 10px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--texte); }
.types-g button svg.i { width: 22px; height: 22px; color: var(--doux); }
.types-g button b { font-size: 15px; } .types-g button span { font-size: 13px; color: var(--doux); }
.types-g button.J.on { border-color: var(--jour); background: var(--jour-l); box-shadow: inset 0 0 0 1px var(--jour); }
.types-g button.J.on svg.i { color: var(--jour); }
.types-g button.N.on { border-color: var(--nuit); background: var(--nuit-l); box-shadow: inset 0 0 0 1px var(--nuit); }
.types-g button.N.on svg.i { color: var(--nuit); }

/* Navigation basse */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--bord); padding: 0 0 var(--safe-b); display: flex; justify-content: center; }
.nav .in { display: flex; width: 100%; max-width: 560px; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--nav-h); text-decoration: none; color: var(--doux); font-size: 11px; font-weight: 500; position: relative; }
.nav a svg.ic { width: 22px; height: 22px; }
.nav a.on { color: var(--accent); font-weight: 600; }
.nav a.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px; }
.badge { position: absolute; top: 8px; right: calc(50% - 20px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--ko); color: #fff; font-size: 10.5px; display: grid; place-items: center; font-weight: 700; box-shadow: 0 0 0 2px var(--surface); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(10, 14, 22, .45); display: flex; align-items: flex-end; justify-content: center; animation: fondu .15s; }
.modal[hidden] { display: none; }
.feuille { background: var(--surface); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 10px 18px calc(24px + var(--safe-b)); animation: glisse .25s cubic-bezier(.2,.8,.2,1); }
.feuille::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 9px; background: var(--bord2); margin: 0 auto 14px; }
.feuille h3 { margin: 0 0 16px; font-size: 19px; font-weight: 700; }
@keyframes glisse { from { transform: translateY(100%); } }
@keyframes fondu { from { opacity: 0; } }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translateX(-50%); z-index: 40; background: var(--texte); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-weight: 500; font-size: 14px; box-shadow: var(--ombre2); animation: tombe .25s; max-width: calc(100% - 32px); }
.toast.err { background: var(--ko); color: #fff; }
@keyframes tombe { from { transform: translate(-50%, -20px); opacity: 0; } }

/* Connexion */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 0; max-width: 400px; margin: 0 auto; }
.blason { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--sur-accent); flex: none; }
.blason svg.i { width: 55%; height: 55%; stroke-width: 1.6; }
.login h1 { text-align: center; font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -.4px; }
.login p.s { text-align: center; color: var(--doux); margin: 6px 0 24px; }
.login .carte { padding: 20px; }
.gyro-barre { display: none; }

.vide-etat { text-align: center; color: var(--doux); padding: 26px 10px; }
.alerte { background: var(--ko-l); color: var(--ko); border: 1px solid transparent; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.info-b { background: var(--accent-l); border: 1px solid transparent; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.mdp { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 20px; text-align: center; background: var(--surface2); border: 1px solid var(--bord); padding: 14px; border-radius: 8px; letter-spacing: 2px; user-select: all; }
.annonce { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; margin-bottom: 12px; }
.annonce b { display: block; } .annonce p { margin: 4px 0; white-space: pre-wrap; } .annonce small { color: var(--doux); }
.flex { display: flex; gap: 10px; align-items: center; }
.flex1 { flex: 1; min-width: 0; }
.mt { margin-top: 12px; }
.doux { color: var(--doux); }
.pc { font-size: 13px; }
.groupe-ent { display: flex; align-items: center; gap: 10px; margin: 20px 2px 8px; }
.groupe-ent b { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.profil-tete { text-align: center; padding: 10px 0 4px; }
.profil-tete .av { margin: 0 auto 12px; cursor: pointer; }
.carte.profil-tete h2 { margin: 0; font-size: 21px; text-transform: none; letter-spacing: 0; color: var(--texte); display: block; font-weight: 700; }
.cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--texte); border: 1px solid var(--bord2); display: grid; place-items: center; box-shadow: var(--ombre2); }
.cam svg.i { width: 55%; height: 55%; }
.barres { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 10px; }
.barres div { flex: 1; text-align: center; font-size: 11px; color: var(--doux); display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.barres i { display: block; border-radius: 4px 4px 0 0; background: var(--accent); margin-bottom: 4px; min-height: 3px; }
.barres b { color: var(--texte); font-size: 12px; font-weight: 600; }

/* Fiche et coordonnées */
.coords { display: flex; flex-direction: column; gap: 0; margin: 6px 0 12px; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.coord { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: var(--surface); }
.coord + .coord { border-top: 1px solid var(--bord); }
.coord > span { color: var(--doux); display: grid; } .coord small { display: block; color: var(--doux); font-size: 12px; } .coord a { color: var(--accent); text-decoration: none; }

/* Messagerie : liste */
.recherche { display: flex; align-items: center; gap: 8px; background: var(--surface2); border-radius: 10px; padding: 0 12px; margin-bottom: 14px; color: var(--doux); }
.recherche input { flex: 1; border: 0; background: none; padding: 10px 0; font-size: 16px; outline: none; min-width: 0; color: var(--texte); }
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar, .emojis::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 60px; flex: none; text-decoration: none; color: var(--doux); font-size: 12px; text-align: center; }
.story span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av.xl { width: 52px; height: 52px; font-size: 18px; }
.av.xl.online::after { width: 14px; height: 14px; border-width: 2px; }
.av.vu { width: 15px; height: 15px; font-size: 7px; }
.av.vu.online::after { display: none; }
.av-canal .logo-g { border-radius: 50% !important; }
.discussions { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.disc { display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-decoration: none; color: inherit; }
.disc + .disc { border-top: 1px solid var(--bord); }
.disc:hover { background: var(--surface2); }
.disc .info { flex: 1; min-width: 0; }
.disc .nom { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc .det { color: var(--doux); font-size: 13.5px; display: flex; min-width: 0; white-space: nowrap; }
.disc .det .txt { overflow: hidden; text-overflow: ellipsis; margin-right: 4px; }
.disc.nl .nom, .disc.nl .det { font-weight: 700; color: var(--texte); }
.disc .point { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.disc-ic { position: relative; flex: none; }
.av.mini { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; font-size: 9px; box-shadow: 0 0 0 2px var(--surface); }
.banniere { display: flex; align-items: center; gap: 12px; background: var(--accent-l); padding: 12px 14px; border-radius: var(--rayon); margin-bottom: 12px; }
.non-lu { min-width: 20px; height: 20px; border-radius: 99px; background: var(--accent); color: var(--sur-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }

/* Messagerie : conversation */
.conv { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--surface); max-width: 560px; margin: 0 auto; }
.conv-tete { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px 4px; background: var(--surface); border-bottom: 1px solid var(--bord); }
.conv-tete .info { flex: 1; min-width: 0; }
.conv-tete .nom { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-tete .det { font-size: 12px; color: var(--doux); }
.conv-tete .retour, .conv-tete .action { display: grid; place-items: center; width: 38px; height: 38px; color: var(--accent); background: none; border: 0; border-radius: 50%; cursor: pointer; text-decoration: none; }
.conv-tete .retour svg.i { width: 26px; height: 26px; }
.conv-tete .action:hover, .conv-tete .retour:hover { background: var(--surface2); }
.fil { flex: 1; overflow-y: auto; padding: 10px 12px 6px; display: flex; flex-direction: column; }
.conv-intro { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 28px 0; text-align: center; }
.conv-intro .av, .conv-intro .logo-g { margin-bottom: 8px; }
.conv-intro b { font-size: 18px; } .conv-intro span { color: var(--doux); font-size: 14px; }
.plus-anciens { align-self: center; background: var(--surface2); border: 0; border-radius: 99px; padding: 6px 14px; font-size: 13px; margin: 6px 0; cursor: pointer; }
.sep-jour { align-self: center; text-transform: capitalize; font-size: 12px; color: var(--doux); margin: 14px 0 6px; }

.m { display: flex; flex-direction: column; align-items: flex-start; margin-top: 2px; position: relative; }
.m.moi { align-items: flex-end; }
.m.seul, .m.debut { margin-top: 8px; }
.m .auteur { font-size: 12px; color: var(--doux); margin: 0 0 2px 54px; }
.m .auteur.bas { margin: 2px 0 0 54px; }
.ligne-m { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.m.moi .ligne-m { flex-direction: row-reverse; }
.tete { width: 34px; flex: none; }
.tete .av.p { width: 34px; height: 34px; font-size: 12px; }
.contenu { display: flex; flex-direction: column; align-items: inherit; position: relative; min-width: 0; }
.m.moi .contenu { align-items: flex-end; }
.bulle { padding: 8px 12px; border-radius: 16px; background: var(--bulle); line-height: 1.38; overflow-wrap: anywhere; white-space: pre-wrap; }
.m .bulle { font-size: 15px; user-select: text; -webkit-user-select: text; }
.m.moi .bulle { background: var(--accent); color: var(--sur-accent); }
.m:not(.moi).debut .bulle { border-bottom-left-radius: 4px; }
.m:not(.moi).milieu .bulle { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.m:not(.moi).fin .bulle { border-top-left-radius: 4px; }
.m.moi.debut .bulle { border-bottom-right-radius: 4px; }
.m.moi.milieu .bulle { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.m.moi.fin .bulle { border-top-right-radius: 4px; }
.m .bulle a { color: inherit; text-decoration: underline; }
.emoji-seul { font-size: 40px; line-height: 1.1; padding: 2px 0; }
.photo-m { max-width: 240px; max-height: 320px; min-height: 80px; min-width: 80px; border-radius: 14px; object-fit: cover; cursor: zoom-in; background: var(--surface2); margin-bottom: 2px; }
.m.attente { opacity: .6; }
.heure-m { font-size: 11px; color: var(--doux); align-self: center; display: none; white-space: nowrap; }
.m.montre-heure .heure-m { display: block; }
.vus { display: flex; gap: 2px; justify-content: flex-end; margin: 3px 2px 2px; width: 100%; }
.vus.envoye { font-size: 11px; color: var(--doux); }
.m:not(.moi) .vus { padding-left: 36px; justify-content: flex-end; }
.reacs { position: relative; margin-top: -8px; margin-right: 6px; z-index: 1; align-self: flex-end; background: var(--surface); border: 1px solid var(--bord); border-radius: 99px; padding: 1px 6px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 2px; box-shadow: var(--ombre); }
.reacs small { color: var(--doux); font-size: 11px; margin-left: 2px; }
.choix-reac { position: absolute; bottom: 100%; z-index: 5; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--bord); padding: 5px 8px; border-radius: 99px; box-shadow: var(--ombre2); margin-bottom: 4px; }
.m:not(.moi) .choix-reac { left: 36px; } .m.moi .choix-reac { right: 0; }
.choix-reac button { border: 0; background: none; font-size: 26px; padding: 2px 4px; cursor: pointer; transition: transform .12s; }
.choix-reac button:hover { transform: scale(1.2); }
.bulle.ecrit { display: flex; gap: 4px; padding: 12px 14px; }
.bulle.ecrit i { width: 7px; height: 7px; border-radius: 50%; background: var(--doux); animation: rebond 1.2s infinite; }
.bulle.ecrit i:nth-child(2) { animation-delay: .15s; } .bulle.ecrit i:nth-child(3) { animation-delay: .3s; }
@keyframes rebond { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }

.saisie { display: flex; gap: 4px; align-items: center; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--bord); }
.saisie .outil { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border: 0; background: none; flex: none; padding: 0; color: var(--accent); border-radius: 50%; }
.saisie .outil:hover { background: var(--surface2); }
.saisie .outil svg.i { width: 22px; height: 22px; }
.saisie .champ { flex: 1; display: flex; align-items: flex-end; background: var(--surface2); border-radius: 20px; padding: 0 4px 0 14px; min-width: 0; }
.saisie .champ textarea { flex: 1; border: 0; background: none; padding: 9px 0; font-size: 16px; resize: none; outline: none; max-height: 120px; min-width: 0; }
.saisie .emo { border: 0; background: none; padding: 7px 6px; cursor: pointer; color: var(--doux); display: grid; }
.emojis { display: flex; gap: 4px; padding: 6px 10px; overflow-x: auto; background: var(--surface); border-top: 1px solid var(--bord); }
.emojis[hidden] { display: none; }
.emojis button { border: 0; background: none; font-size: 22px; padding: 4px; cursor: pointer; }

.zoom { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; animation: fondu .15s; }
.zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }
.zoom-barre { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 10px; display: flex; gap: 6px; }
.zoom-barre a, .zoom-barre button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer; }
.zoom-barre svg.i { width: 22px; height: 22px; }
.notif-interne { position: fixed; z-index: 45; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%); width: min(528px, calc(100% - 24px));
  display: block; padding: 10px 14px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre2);
  text-decoration: none; color: var(--texte); animation: tombe .25s; }
.notif-interne .n-tete { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; color: var(--doux); text-transform: uppercase; margin-bottom: 8px; }
.notif-interne .n-tete img { width: 18px; height: 18px; }
.notif-interne .n-tete em { font-style: normal; color: var(--accent); }
.notif-interne .n-tete i { margin-left: auto; font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; }
.notif-interne .n-corps { display: flex; gap: 12px; align-items: center; }
.notif-interne .n-corps img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.notif-interne .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-l); color: var(--accent); }
.notif-interne .n-corps div { min-width: 0; } .notif-interne b { display: block; font-size: 14.5px; }
.notif-interne span { font-size: 13.5px; color: var(--doux); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Fiche personne envoyée dans une discussion */
.fiche-m { background: var(--surface); color: var(--texte); border: 1px solid var(--bord2); border-radius: 14px; padding: 12px 14px; min-width: 220px; max-width: 280px; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.fiche-t { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--bord); }
.fiche-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-l); color: var(--accent); flex: none; }
.fiche-t small { display: block; font-size: 10px; letter-spacing: 1.2px; color: var(--doux); font-weight: 600; }
.fiche-t b { font-size: 15px; }
.fiche-m .fl { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.fiche-m .fl > span { color: var(--doux); display: grid; }
.fiche-m .fl svg.i { width: 16px; height: 16px; }
.fiche-m .fl a { color: var(--accent); text-decoration: none; }
.fiche-m .notes { color: var(--doux); white-space: pre-wrap; padding-top: 6px; border-top: 1px solid var(--bord); }

/* Écrans larges (PC) : colonne centrée */
@media (min-width: 700px) {
  #app { padding-top: 12px; }
  .conv { border-left: 1px solid var(--bord); border-right: 1px solid var(--bord); }
  .nav a { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Effectifs du jour (administration) */
.eff-date { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; text-align: center; }
.eff-date b { display: block; font-size: 17px; text-transform: capitalize; }
.eff-date svg.droite { transform: rotate(180deg); }
.lien { border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 500; cursor: pointer; padding: 2px; }
.eff-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.eff-stats .stat { padding: 10px 8px; text-align: center; cursor: pointer; font: inherit; color: inherit; }
.eff-stats .stat b { font-size: 22px; }
.eff-stats .stat span { font-size: 12px; }
.eff-stats .stat.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.eff-tete { margin-bottom: 6px; }
.eff-tete b { font-size: 16px; }
.eff-etat { text-align: right; flex: none; }
.eff-g .liste { margin: 0 -8px; }
@media (min-width: 900px) {
  #app.large { max-width: 1100px; }
  #app.large .eff-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
  #app.large .eff-grille .carte { margin: 0; }
}

/* Fiche de mission : rouge, pour la distinguer d'un message ordinaire */
:root { --mission: #b42318; --mission-l: #fdecea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mission: #f0706a; --mission-l: #331816; } }
:root[data-theme="dark"] { --mission: #f0706a; --mission-l: #331816; }
.saisie .outil.rouge { color: var(--mission); }
.titre-mission { color: var(--mission); display: flex; align-items: center; gap: 8px; }
.btn.btn-mission { background: var(--mission); border-color: var(--mission); color: #fff; }
.fiche-m.mission { border: 1.5px solid var(--mission); padding: 0 0 12px; overflow: hidden; gap: 8px; }
.fiche-m.mission > .fl, .fiche-m.mission > .motif { margin: 0 14px; }
.mission-t { display: flex; align-items: center; gap: 8px; background: var(--mission); color: #fff; padding: 8px 14px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; }
.mission-t svg.i { width: 16px; height: 16px; }
.mission-t em { margin-left: auto; font-style: normal; background: #fff; color: var(--mission); border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.fiche-m.mission .motif { font-size: 16px; color: var(--mission); margin-top: 4px; }
.fiche-m.mission.urgente { box-shadow: 0 0 0 3px var(--mission-l); }
.fiche-m.mission .notes { margin: 0 14px; }
#prio button.on { background: var(--accent-l); }
#prio [data-p="urgente"].on { background: var(--mission-l); border-color: var(--mission); color: var(--mission); }

/* Photo sur les fiches et fiche en grand */
.fiche-m[data-fiche] { cursor: pointer; }
.photo-fiche { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; cursor: pointer; color: var(--accent); font-weight: 500; font-size: 14px; }
.pf-ap { width: 64px; height: 64px; border-radius: 12px; border: 1.5px dashed var(--bord2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--doux); background: var(--surface2); }
.pf-ap img { width: 100%; height: 100%; object-fit: cover; }
.fiche-photo { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface2); }
.fiche-m .mission-p { align-items: center; }
.fiche-m .mission-p .fiche-photo { width: 40px; height: 40px; border-radius: 8px; }
.detail-mission { display: flex; align-items: center; gap: 8px; background: var(--mission); color: #fff; margin: 0 -18px 14px; padding: 10px 18px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; }
.detail-mission svg.i { width: 16px; height: 16px; }
.detail-mission em { margin-left: auto; font-style: normal; background: #fff; color: var(--mission); border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.feuille h3.motif-g { color: var(--mission); font-size: 21px; }
.detail-photo { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 12px; background: var(--surface2); margin-bottom: 14px; cursor: zoom-in; }
.detail-notes { white-space: pre-wrap; background: var(--surface2); border-radius: 10px; padding: 10px 14px; margin: 0; }
.fiche-plus { font-size: 12px; color: var(--doux); text-align: center; padding-top: 6px; border-top: 1px solid var(--bord); }
.fiche-m.mission .fiche-plus { margin: 0 14px; }
.actions-f { display: grid; } .actions-f:empty { display: none; }

/* Sécurité */
.code-saisie { font-size: 26px !important; letter-spacing: 8px; text-align: center; }
.ligne.journal { cursor: default; }
.ligne.alerte-j .nom { color: var(--ko); }

/* Bannière de notification selon son type : les missions en rouge */
.notif-interne.n-mission { border-left: 6px solid var(--mission); }
.notif-interne.n-mission .ic { background: var(--mission); color: #fff; }
.notif-interne.n-mission .n-tete em { color: var(--mission); }
.notif-interne.n-urgence { background: var(--mission); border-color: var(--mission); color: #fff; }
.notif-interne.n-urgence .ic { background: #fff; color: var(--mission); }
.notif-interne.n-urgence .n-tete, .notif-interne.n-urgence .n-tete em, .notif-interne.n-urgence span { color: #fff; }

/* Emblème Sentilobs */
.embleme { display: block; margin: 0 auto 14px; filter: drop-shadow(0 4px 10px rgba(19, 40, 77, .25)); }
.verrou .embleme { margin-bottom: 4px; }
.marque { display: flex; align-items: center; gap: 5px; font-weight: 700; letter-spacing: 1px; color: var(--accent); margin-bottom: 3px; }
.marque .embleme { display: inline; margin: 0; filter: none; }
.demarrage { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.demarrage b { font-size: 22px; letter-spacing: .5px; }
.demarrage .gyro { margin-top: 18px; }

/* Discussion commune d'une vacation (tous les groupes de jour ou de nuit) */
.logo-g.vac-N { background: var(--nuit-l); color: var(--nuit); display: grid; place-items: center; }
.logo-g.vac-J { background: var(--jour-l); color: var(--jour); display: grid; place-items: center; }

/* Garanties de sécurité affichées à la connexion et dans le profil */
.garanties { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 14px; text-align: left; }
.garanties > div { display: flex; gap: 12px; align-items: flex-start; }
.garanties svg.i { flex: none; width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }
.garanties span { font-size: 13.5px; color: var(--doux); line-height: 1.4; }
.garanties b { display: block; color: var(--texte); font-size: 14px; }
.conv .chiffre { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--doux); padding: 6px 12px; background: var(--bg); border-bottom: 1px solid var(--bord); }
.conv .chiffre svg.i { width: 13px; height: 13px; }

/* Super administrateur : chiffres, comptes, alertes */
.btn.danger { background: var(--mission); border-color: var(--mission); color: #fff; }
.stats-sa { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stats-sa > div { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 12px; }
.stats-sa b { display: block; font-size: 24px; } .stats-sa span { font-size: 12.5px; color: var(--doux); }
.ligne.plie { background: none; border: 0; text-align: left; color: inherit; padding: 0; cursor: pointer; }
svg.i.tourne { transform: rotate(-90deg); transition: transform .2s; }
.ligne.plie.ouvert svg.i.tourne { transform: rotate(90deg); }
.compte-sa .nom { white-space: normal; }
.compte-sa .icone { flex: none; }
.alerte-sa { display: flex; gap: 12px; align-items: flex-start; background: var(--mission); color: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.alerte-sa svg.i { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.alerte-sa b { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.alerte-sa p { margin: 4px 0 2px; font-size: 15px; white-space: pre-wrap; }
.alerte-sa small { opacity: .8; font-size: 12px; }
.alerte-sa.pop { margin-bottom: 14px; }

/* Fenêtres : bouton fermer, pas de défilement de la page derrière */
html.modal-ouvert, html.modal-ouvert body { overflow: hidden; }
.feuille { position: relative; overscroll-behavior: contain; transition: transform .15s; }
.fermer-f { position: sticky; top: 0; z-index: 2; width: 36px; height: 36px; margin: -6px -6px -30px auto; box-shadow: var(--ombre); border-radius: 50%; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); display: grid; place-items: center; cursor: pointer; }
.fermer-f svg.i { width: 18px; height: 18px; }
/* Fil de discussion : le défilement reste dans le fil et ne saute plus quand il se met à jour */
.fil { min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pastille.test { background: var(--jour-l); color: var(--jour); }
.feuille > h3:first-of-type { padding-right: 40px; }
.feuille > .detail-mission { padding-right: 60px; }
.lien-oubli { display: block; margin: -4px auto 14px; background: none; border: 0; color: var(--accent); font-size: 14.5px; font-weight: 500; cursor: pointer; padding: 6px; }

/* Suivi des missions */
.etat-mission { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.etat-mission svg.i { width: 15px; height: 15px; }
.etat-mission.libre { background: var(--att-l); color: var(--att); }
.etat-mission.prise { background: var(--jour-l); color: var(--jour); }
.etat-mission.fini { background: var(--ok-l); color: var(--ok); }

/* Écran de verrouillage par code PIN */
.verrou, .verrou * { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.verrou { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; text-align: center; }
.verrou h1 { margin: 12px 0 4px; font-size: 22px; }
.verrou .s { color: var(--doux); margin: 0 0 18px; min-height: 20px; }
.verrou .points { display: flex; gap: 12px; margin-bottom: 22px; }
.verrou .points i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--accent); }
.verrou .points i.on { background: var(--accent); }
.verrou .pave { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; margin-bottom: 14px; }
.verrou .pave button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); font-size: 26px; font-weight: 500; cursor: pointer; }
.verrou .pave button:active { background: var(--accent-l); }

/* Impression / PDF du planning */
#impression { display: none; }
@media print {
  body > *:not(#impression) { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; height: auto !important; overflow: visible !important; }
  #impression { display: block; font: 11pt/1.35 system-ui, sans-serif; color: #000; }
  #impression h1 { font-size: 16pt; margin: 0 0 10px; text-transform: capitalize; }
  #impression table { width: 100%; border-collapse: collapse; }
  #impression th, #impression td { border: 1px solid #999; padding: 4px 6px; text-align: left; }
  #impression tr.J td:nth-child(2), #impression td.J { background: #fff4c2 !important; }
  #impression tr.N td:nth-child(2), #impression td.N { background: #d6defa !important; }
  #impression td.A, #impression tr.A td:nth-child(2) { background: #e3f3e3 !important; }
  #impression table.g { font-size: 7.5pt; table-layout: fixed; }
  #impression table.g th, #impression table.g td { padding: 2px 1px; text-align: center; }
  #impression table.g td.n { text-align: left; width: 22%; white-space: nowrap; overflow: hidden; }
  #impression .pied { margin-top: 12px; font-size: 9pt; color: #555; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

#hors-ligne { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 6px); z-index: 60;
  background: #5b4300; color: #ffe9a8; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; box-shadow: 0 2px 8px #0005; max-width: calc(100vw - 32px); text-align: center; }

/* Nouvelle version disponible */
#maj { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 70; display: flex; align-items: center; gap: 10px;
  background: var(--accent, #1f3a68); color: #fff; padding: 10px 10px 10px 14px; border-radius: 14px; box-shadow: 0 6px 20px #0004; font-size: 14px; }
#maj span { flex: 1; }
#maj button { background: #fff; color: #1f3a68; border: 0; border-radius: 10px; padding: 9px 12px; font: inherit; font-weight: 700; white-space: nowrap; }
.version-c b { display: inline; }
.version-h { padding: 12px 0; border-bottom: 1px solid var(--ligne, #e3e6ec); }
.version-h:last-child { border-bottom: 0; }
.version-h b { display: block; }
.version-h ul { margin: 6px 0 0; padding-left: 20px; }

/* Destinataire d'une mission */
.pour-mission { display: flex; align-items: center; gap: 6px; margin: 6px 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.pour-mission .i { width: 16px; height: 16px; flex: none; }
.pour-mission.groupe { background: #fde8e6; color: #9d1c12; }
.pour-mission.tous { background: var(--accent-l); color: var(--accent); }
.etat-mission span { font-weight: 400; opacity: .8; }

/* Accueil : renfort et carte */
.actions-acc { display: grid; gap: 10px; margin-bottom: 14px; }
.btn-renfort { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--mission); color: #fff; text-align: left; cursor: pointer; font: inherit; box-shadow: var(--ombre); }
.btn-renfort svg.i { width: 30px; height: 30px; flex: none; }
.btn-renfort b { display: block; font-size: 17px; }
.btn-renfort small { opacity: .9; font-size: 13px; }
#renfort-actif { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 70; display: flex; align-items: center; gap: 10px;
  background: var(--mission); color: #fff; padding: 10px 10px 10px 14px; border-radius: 14px; box-shadow: 0 6px 20px #0004; font-size: 14px; font-weight: 600; }
#renfort-actif span { flex: 1; }
#renfort-actif button { background: #fff; color: var(--mission); border: 0; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; }

/* Carte des missions */
.carte-missions { height: calc(100vh - 330px); min-height: 320px; border-radius: 14px; overflow: hidden; border: 1px solid var(--bord); margin: 10px 0; z-index: 0; }
.legende-c { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12.5px; color: var(--doux); margin-bottom: 14px; }
.pt-c { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pt-c.urgente, .pin-m.urgente { background: var(--mission); }
.pt-c.libre, .pin-m.libre { background: #e0782a; }
.pt-c.prise, .pin-m.prise { background: #2b54a8; }
.pt-c.terminee, .pin-m.terminee { background: #2f7a5a; }
.pin-m { border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px #0006; display: grid !important; place-items: center; color: #fff; }
.pin-m svg.i { width: 17px; height: 17px; }
.pop-m { display: flex; flex-direction: column; gap: 3px; font: 13px/1.35 Inter, system-ui, sans-serif; min-width: 180px; }
.pop-m b { font-size: 14px; }
.pop-m a { font-weight: 600; }
#sans-pos .ligne { align-items: center; gap: 12px; }

/* Statistiques */
.stats-g { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0 14px; }
.stats-g .stat { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; }
.stats-g .stat b { display: block; font-size: 22px; }
.stats-g .stat span { font-size: 12.5px; color: var(--doux); }
.stats-g .stat.alerte b { color: var(--mission); }
.histo { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.histo div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.histo i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.histo small { font-size: 10px; color: var(--doux); }
.tableau-s { overflow-x: auto; }
.tableau-s table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau-s th, .tableau-s td { padding: 8px 6px; border-bottom: 1px solid var(--bord); text-align: right; white-space: nowrap; }
.tableau-s th:first-child, .tableau-s td:first-child { text-align: left; }
.tableau-s th { font-size: 11.5px; color: var(--doux); font-weight: 600; }

/* Installer */
.etapes { padding-left: 22px; line-height: 1.7; }
.etapes svg.i { width: 18px; height: 18px; vertical-align: -3px; }

/* Grade (GPX, BC, MJR…) à côté du nom */
.grade-b { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .4px; padding: 1px 5px; border-radius: 5px;
  background: var(--accent-l); color: var(--accent); vertical-align: 1px; margin-left: 2px; }

/* Déroulé d'une mission */
.deroule { border-top: 1px solid var(--bord2); padding-top: 12px; }
.deroule h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 15px; }
.frise { list-style: none; margin: 0 0 12px; padding: 0; position: relative; }
.frise::before { content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--bord2); }
.frise li { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.frise .et-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--bord2); z-index: 1; }
.frise .et-ic svg { width: 14px; height: 14px; }
.frise li > div { min-width: 0; }
.frise p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.frise .et-arrivee .et-ic, .frise .et-prise .et-ic { border-color: var(--accent); color: var(--accent); }
.frise .et-victime .et-ic { border-color: #d98a1f; color: #d98a1f; }
.frise .et-auteur .et-ic { border-color: #c0392b; color: #c0392b; }
.frise .et-terminee .et-ic { border-color: #2e8b57; color: #2e8b57; }

/* Historique des décisions */
.hi-jour { font-size: 13px; font-weight: 600; color: var(--doux); margin: 18px 4px 8px; }
.hi-jour::first-letter { text-transform: uppercase; }
#hi-d { margin-bottom: 8px; }
#hi-t button { padding: 6px 11px; font-size: 13px; }
