/* ============================================================
   FORSUD Assistance — feuille de style commune (prof + équipe IT)
   Charte : bleu #0072ce · noir #212322
   Titres League Spartan · sous-titres Didact Gothic · texte Verdana
   Identique au site forsud.tech/site
   ============================================================ */

:root {
  --blue: #0072ce;
  --blue-dark: #005ba8;
  --blue-soft: #e8f2fc;
  --ink: #212322;
  --ink-soft: #55595c;
  --line: #e3e6ea;
  --bg: #ffffff;
  --bg-alt: #f6f9fc;
  --green: #1a7a3c;
  --green-soft: #e7f4ec;
  --amber: #b85c00;
  --amber-soft: #fff4e5;
  --red: #c0392b;
  --red-soft: #fdecea;
  --violet: #6c3fc5;
  --violet-soft: #f1ecfc;
  --radius: 14px;
  --font-title: "League Spartan", Verdana, sans-serif;
  --font-subtitle: "Didact Gothic", Verdana, sans-serif;
  --font-body: Verdana, Geneva, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.lien { color: var(--blue); cursor: pointer; }
.lien:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: .98rem; }
p { color: var(--ink-soft); margin: 0 0 1em; font-size: .96rem; }

.container { width: min(1100px, 92%); margin-inline: auto; }
.container.etroit { width: min(760px, 92%); }
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* ── En-tête ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; }
.logo img { height: 40px; width: auto; }
.logo-sous { font-family: var(--font-subtitle); font-size: .85rem; color: var(--ink-soft);
             border-left: 1px solid var(--line); padding-left: 1rem; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.4rem; margin: 0 0 0 auto; padding: 0; }
.nav-links a, .nav-links button.lien-nav { font-family: var(--font-subtitle); font-size: .92rem; color: var(--ink-soft);
               background: none; border: none; cursor: pointer; padding: 0; }
.nav-links a:hover, .nav-links button.lien-nav:hover { color: var(--blue); }
.nav-links .nav-cta { padding: .5rem 1.1rem !important; border-radius: 999px; background: var(--blue); color: #fff !important; }
.nav-links .nav-cta:hover { background: var(--blue-dark); }

/* ── Onglets (espace IT) ─────────────────────────────────── */
.onglets { display: flex; gap: .4rem; overflow-x: auto; padding: .8rem 0 .2rem; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  flex: 0 0 auto; font-family: var(--font-title); font-weight: 700; font-size: .92rem;
  padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); cursor: pointer; transition: all .18s ease;
}
.onglet:hover { border-color: var(--blue); color: var(--blue); }
.onglet.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.onglet .compteur { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .35rem;
  border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; line-height: 1.3rem; text-align: center; }

/* Sélecteur de sous-vue (Liste | Carte, Heures | Rapport…) */
.seg { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { font-family: var(--font-subtitle); font-size: .86rem; border: none; background: none; cursor: pointer;
              padding: .38rem .95rem; border-radius: 999px; color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); font-weight: 700; }

/* ── Titres et étiquettes ────────────────────────────────── */
.badge { display: inline-block; font-family: var(--font-subtitle); font-size: .85rem; color: var(--blue-dark);
         background: var(--blue-soft); padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.2em; }
.tilted-tag { display: inline-block; font-family: var(--font-title); font-weight: 700; font-size: .82rem;
              letter-spacing: .03em; text-transform: uppercase; color: #fff; background: var(--blue);
              padding: .45rem 1rem; border-radius: 4px; transform: rotate(-4deg); margin-bottom: 1.1em; }
.titre-page { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.titre-page h2 { margin: 0; }
.sous-titre { font-family: var(--font-title); font-weight: 700; font-size: .78rem; letter-spacing: .05em;
              text-transform: uppercase; color: var(--ink-soft); margin: 1.4rem 0 .6rem; }

.pill { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-subtitle); font-size: .76rem;
        padding: .16rem .65rem; border-radius: 999px; white-space: nowrap; background: var(--bg-alt); color: var(--ink-soft); }
.pill-blue   { background: var(--blue-soft);   color: var(--blue-dark); }
.pill-green  { background: var(--green-soft);  color: var(--green); }
.pill-amber  { background: var(--amber-soft);  color: var(--amber); }
.pill-red    { background: var(--red-soft);    color: var(--red); }
.pill-violet { background: var(--violet-soft); color: var(--violet); }
.code-inline { font-family: var(--font-title); font-weight: 700; letter-spacing: .08em; background: var(--blue-soft);
               color: var(--blue-dark); padding: .1rem .5rem; border-radius: 6px; font-size: .85rem; }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .75rem 1.4rem; border-radius: 8px; font-weight: 700; font-size: .92rem;
  font-family: var(--font-title); border: 2px solid transparent; cursor: pointer; line-height: 1.2;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  background: none; color: var(--ink);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 114, 206, .6); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover, .btn-outline.on { border-color: var(--blue); color: var(--blue); }
.btn-outline.on { background: var(--blue-soft); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 10px 24px -12px rgba(26, 122, 60, .55); }
.btn-green:hover { background: #14602f; }
.btn-danger { border-color: var(--red-soft); color: var(--red); background: #fff; }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { color: var(--ink-soft); padding-inline: .6rem; }
.btn-ghost:hover { color: var(--blue); }
.btn-sm { padding: .45rem .9rem; font-size: .82rem; border-width: 1px; }
.btn-xs { padding: .25rem .6rem; font-size: .76rem; border-width: 1px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ── Cartes ──────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.card-link { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-link:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 14px 28px -20px rgba(0, 114, 206, .45); }
.card-accent { border-left: 4px solid var(--blue); }
.card-alerte { border-left: 4px solid var(--red); }
.card-alt { background: var(--bg-alt); }
.card-tete { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card-tete h3, .card-tete h4 { margin: 0; }
.card-icon { font-size: 1.7rem; margin-bottom: .8rem; }
.card p:last-child { margin-bottom: 0; }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.pliable-tete { display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.pliable-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
              background: var(--blue-soft); font-size: 1rem; flex: 0 0 auto; }
.pliable-corps { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; }

.ligne { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ligne.haut { align-items: flex-start; }
.pousse { margin-left: auto; }
.liste-item { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .65rem 0; border-top: 1px solid var(--line); }
.liste-item:first-child { border-top: none; }
.cle-valeur { display: flex; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .88rem; }
.cle-valeur:first-child { border-top: none; }
.cle-valeur > span:first-child { flex: 0 0 38%; color: var(--ink-soft); font-family: var(--font-subtitle); }
.cle-valeur > span:last-child { font-weight: 700; word-break: break-word; }

.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }
.xsmall { font-size: .74rem; }
.tronque { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vide { text-align: center; color: var(--ink-soft); padding: 2.2rem 1rem; font-family: var(--font-subtitle); }

/* ── Messages ────────────────────────────────────────────── */
.alerte { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .9rem; display: flex; gap: .6rem; align-items: flex-start; }
.alerte-ok     { background: var(--green-soft); color: var(--green); }
.alerte-erreur { background: var(--red-soft);   color: var(--red); }
.alerte-info   { background: var(--blue-soft);  color: var(--blue-dark); }
.alerte-attention { background: var(--amber-soft); color: var(--amber); }
.alerte .fermer { margin-left: auto; cursor: pointer; opacity: .7; }
.err { color: var(--red); font-size: .84rem; margin-top: .3rem; }

.info-strip { display: flex; gap: 1rem; align-items: flex-start; background: var(--blue-soft);
              border: 1px solid rgba(0, 114, 206, .25); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; }
.info-strip .ic { font-size: 1.2rem; line-height: 1; }
.info-strip p { margin: 0; font-size: .89rem; }

/* ── Formulaires ─────────────────────────────────────────── */
.form-row { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-row label, .etiquette { font-family: var(--font-subtitle); font-size: .85rem; color: var(--ink-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
input, select, textarea {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem;
  color: var(--ink); font-family: var(--font-body); font-size: .92rem; width: 100%; resize: vertical;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input[type=checkbox] { width: auto; accent-color: var(--blue); }
.case { display: flex; align-items: center; gap: .6rem; font-size: .88rem; padding: .3rem 0; cursor: pointer; }
.form-panel { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.aide { font-size: .76rem; color: var(--ink-soft); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Créneaux et puces à choisir */
.slots { display: flex; flex-wrap: wrap; gap: .45rem; }
.slot { font-family: var(--font-subtitle); font-size: .84rem; padding: .42rem .9rem; border-radius: 999px;
        border: 1px solid var(--line); background: #fff; color: var(--ink-soft); cursor: pointer; user-select: none; transition: all .18s ease; }
.slot:hover { border-color: var(--blue); color: var(--blue); }
.slot.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Chiffres clés ───────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.kpi b { display: block; font-family: var(--font-title); font-weight: 800; font-size: 1.7rem; color: var(--blue); line-height: 1.1; }
.kpi span { font-family: var(--font-subtitle); font-size: .82rem; color: var(--ink-soft); }
.barre { height: 8px; border-radius: 6px; background: #eef2f6; overflow: hidden; }
.barre > div { height: 100%; background: var(--blue); border-radius: 6px; }
.barre-empilee { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: #eef2f6; margin: .6rem 0 1rem; }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

/* ── Code de suivi (prof) ────────────────────────────────── */
.code-box { background: var(--blue-soft); border: 1px solid rgba(0, 114, 206, .25); border-radius: var(--radius);
            padding: 1.8rem; text-align: center; max-width: 340px; margin: 1.5rem auto; }
.code-label { font-family: var(--font-subtitle); font-size: .82rem; color: var(--blue-dark); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.code-value { font-family: var(--font-title); font-size: 2.6rem; font-weight: 800; letter-spacing: .28em; color: var(--blue); line-height: 1; }
.code-hint { font-size: .8rem; color: var(--blue-dark); margin-top: .7rem; }
.champ-code { font-family: var(--font-title); font-weight: 800; font-size: 1.3rem; letter-spacing: .25em; text-align: center; text-transform: uppercase; }

/* ── Hero (prof) ─────────────────────────────────────────── */
.hero { position: relative; padding: clamp(3rem, 7vw, 4.5rem) 0 2.5rem; overflow: hidden; }
.hero-stripes { position: absolute; top: 0; right: 0; bottom: 0; width: 38%; display: flex; align-items: flex-end; justify-content: flex-end;
                gap: 14px; padding: 0 6% 0 0; transform: rotate(-4deg) translateX(8%); pointer-events: none; opacity: .9; }
.hero-stripes span { display: block; width: 24px; border-radius: 3px; background: var(--blue-soft); }
.hero-stripes span:nth-child(1) { height: 30%; }
.hero-stripes span:nth-child(2) { height: 45%; }
.hero-stripes span:nth-child(3) { height: 62%; background: var(--blue); opacity: .15; }
.hero-stripes span:nth-child(4) { height: 78%; background: var(--blue); opacity: .35; }
.hero-stripes span:nth-child(5) { height: 92%; background: var(--blue); opacity: .6; }
.hero-inner { position: relative; }
.lead { font-size: 1.05rem; margin-bottom: 1.8rem; }
.highlight { color: var(--blue); }

/* ── Conversations ───────────────────────────────────────── */
.thread { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.msg { max-width: 82%; }
.msg-who { font-family: var(--font-subtitle); font-size: .72rem; color: var(--ink-soft); margin-bottom: .2rem; }
.msg-bubble { padding: .65rem .95rem; font-size: .9rem; white-space: pre-wrap; line-height: 1.5; word-break: break-word; }
.msg.me { margin-left: auto; }
.msg.me .msg-who { text-align: right; }
.msg.me .msg-bubble { background: var(--blue); color: #fff; border-radius: 12px 12px 3px 12px; }
.msg.them .msg-bubble { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; }
.msg-sys { font-family: var(--font-subtitle); font-size: .78rem; color: var(--ink-soft); background: var(--bg-alt);
           border-radius: 10px; padding: .45rem .9rem; text-align: center; align-self: center; }
.note-interne { background: var(--amber-soft); border-left: 3px solid var(--amber); border-radius: 8px; padding: .6rem .9rem; margin-bottom: .6rem; font-size: .88rem; }
.note-interne .xsmall { color: var(--amber); }

/* Suivi du délai de prise en charge */
.sla { height: 5px; border-radius: 3px; background: #eef2f6; overflow: hidden; margin-top: .6rem; }
.sla > div { height: 100%; }

/* ── Agenda ──────────────────────────────────────────────── */
.semaine { display: grid; grid-template-columns: repeat(5, 1fr) .6fr .6fr; gap: .5rem; }
.jour { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .5rem; min-height: 150px; }
.jour.auj { border-color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
.jour-tete { font-family: var(--font-title); font-weight: 700; font-size: .82rem; text-align: center; color: var(--ink-soft); margin-bottom: .5rem; }
.jour.auj .jour-tete { color: var(--blue); }
.rdv { background: var(--blue-soft); border-left: 3px solid var(--blue); border-radius: 6px; padding: .35rem .45rem; margin-bottom: .35rem; font-size: .74rem; line-height: 1.35; }
.rdv b { color: var(--blue-dark); }

/* ── Carte ───────────────────────────────────────────────── */
#carte { height: 520px; border-radius: var(--radius); border: 1px solid var(--line); }
.legende { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); margin-bottom: .8rem; }
.legende span { display: inline-flex; align-items: center; gap: .35rem; }

/* ── Fenêtre modale légère ───────────────────────────────── */
.voile { position: fixed; inset: 0; background: rgba(33, 35, 34, .35); z-index: 800; display: flex; align-items: flex-start;
         justify-content: center; padding: 6vh 1rem; overflow-y: auto; }
.modale { background: #fff; border-radius: var(--radius); width: min(560px, 100%); padding: 1.6rem; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .35); }

/* ── Chat flottant (prof) ────────────────────────────────── */
.chat-btn { position: fixed; bottom: 22px; right: 22px; width: 58px; height: 58px; border-radius: 50%; background: var(--blue);
            border: none; cursor: pointer; font-size: 24px; color: #fff; z-index: 900; box-shadow: 0 12px 28px -10px rgba(0, 114, 206, .65); }
.chat-btn:hover { background: var(--blue-dark); }
.chat-dot { position: absolute; top: 2px; right: 2px; width: 19px; height: 19px; background: var(--red); border-radius: 50%;
            border: 2px solid #fff; font-family: var(--font-title); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chat-win { position: fixed; bottom: 92px; right: 22px; width: 350px; max-width: calc(100vw - 32px); background: #fff; z-index: 900;
            border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .3);
            display: flex; flex-direction: column; overflow: hidden; }
.chat-head { background: var(--blue); color: #fff; padding: 1rem 1.2rem; display: flex; align-items: center; gap: .7rem; }
.chat-head .t { font-family: var(--font-title); font-weight: 700; font-size: .95rem; }
.chat-head .s { font-family: var(--font-subtitle); font-size: .75rem; opacity: .85; }
.chat-live { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
.chat-body { padding: 1.1rem; overflow-y: auto; min-height: 190px; max-height: 320px; display: flex; flex-direction: column; gap: .7rem; }
.chat-foot { padding: .8rem 1rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; }
.chat-x { cursor: pointer; font-size: 22px; line-height: 1; opacity: .9; }

/* ── Pied de page ────────────────────────────────────────── */
.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); background: var(--bg-alt); margin-top: 3rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { height: 32px; width: auto; }
.footer-inner p { margin: 0; color: var(--ink-soft); font-size: .82rem; font-family: var(--font-subtitle); }
.footer-inner p a { color: var(--blue); }

/* ── Connexion ───────────────────────────────────────────── */
.connexion { max-width: 400px; margin: 8vh auto 0; }
.connexion .logo img { height: 52px; margin: 0 auto 1.4rem; }

/* ── Petits écrans ───────────────────────────────────────── */
@media (max-width: 760px) {
  .cards-2, .grille-2, .grille-3, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .hero-stripes, .logo-sous { display: none; }
  .nav-links { gap: .9rem; }
  .semaine { grid-template-columns: 1fr; }
  .jour { min-height: 0; }
  .cle-valeur > span:first-child { flex-basis: 45%; }
  .card { padding: 1.1rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media print {
  .site-header, .onglets, .btn, .chat-btn { display: none !important; }
}
.form-row > .seg { align-self: flex-start; }
.rdv.bureau { background: var(--violet-soft); border-left-color: var(--violet); }
.rdv.bureau b { color: var(--violet); }
.rdv.teletravail { background: var(--green-soft); border-left-color: var(--green); }
.rdv.teletravail b { color: var(--green); }

/* ── Tableau (page d'accueil de l'espace IT) ─────────────── */
/* Colonnes de même hauteur : on peut déposer une carte à n'importe quelle hauteur */
.container.large { width: min(1680px, 96%); }
.kpis-tableau { margin-bottom: 1rem; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.kpi.cliquable { cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.kpi.cliquable:hover { border-color: var(--blue); }
.kpi.on { border-color: var(--blue); background: var(--blue-soft); }
.kpis-tableau .kpi { padding: .6rem .9rem; }
.kpis-tableau .kpi b { font-size: 1.45rem; }
.kanban { display: flex; gap: .8rem; overflow-x: auto; align-items: stretch; padding-bottom: .8rem; scroll-snap-type: x proximity; }
.kb-col { flex: 1 0 235px; min-width: 235px; background: #edf2f7; border-radius: var(--radius); padding: .6rem;
          scroll-snap-align: start; transition: background .15s ease, box-shadow .15s ease; }
.kanban.statut .kb-col { flex-basis: 320px; }
.kb-col.survol { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.kb-col-tete { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .15rem .3rem .55rem; margin-bottom: .55rem;
               font-family: var(--font-title); font-weight: 700; font-size: .95rem; }
.kb-col-tete > span:first-child { margin-right: auto; }
.kb-nb { min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; background: #fff; color: var(--ink-soft);
         font-size: .78rem; line-height: 1.5rem; text-align: center; }
.kb-col-tete .pill { font-size: .7rem; padding: .05rem .45rem; }
.kb-col-pied { font-family: var(--font-subtitle); font-size: .76rem; color: var(--green); text-align: center; padding: .35rem 0 .1rem; }
.kb-vide { font-family: var(--font-subtitle); font-size: .82rem; color: var(--ink-soft); text-align: center; padding: 1.4rem .4rem; }
.kb-carte, .kb-alerte { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px;
                        padding: .6rem .7rem; margin-bottom: .5rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.kb-carte { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.kb-carte:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(0, 114, 206, .55); }
.kb-carte[draggable="true"] { cursor: grab; }
.kb-carte.glisse { opacity: .4; }
.kb-carte.p-urgent { border-left-color: var(--red); }
.kb-carte.p-possible { border-left-color: var(--green); }
.kb-carte.resolu { border-left-color: var(--green); background: #fbfdfc; }
.kb-alerte { background: #fff8f7; }
.kb-alerte.compacte { padding: .45rem .6rem; }
.kb-alerte.compacte .kb-ecole { font-size: .84rem; }
.kb-tete { display: flex; align-items: flex-start; gap: .35rem; }
.kb-ecole { font-family: var(--font-title); font-weight: 700; font-size: .9rem; line-height: 1.2; flex: 1; }
.kb-urgent { font-size: .8rem; line-height: 1.2; }
.kb-code { font-family: var(--font-title); font-weight: 700; font-size: .68rem; letter-spacing: .06em; color: var(--ink-soft); }
.kb-pb { font-size: .78rem; color: var(--ink-soft); margin: .25rem 0 .45rem; line-height: 1.4; word-break: break-word;
         display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-pied { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.kb-pied .pill { font-size: .7rem; padding: .08rem .5rem; }
.kb-age { font-size: .72rem; color: var(--ink-soft); margin-left: auto; white-space: nowrap; }
.kb-age.depasse { color: var(--red); font-weight: 700; }
.kb-avatar { width: 24px; height: 24px; border-radius: 50%; color: #fff; flex: 0 0 auto; text-align: center;
             font: 700 .64rem/24px var(--font-title); letter-spacing: .02em; }
.kb-avatar.personne { background: #fff; color: var(--ink-soft); border: 1.5px dashed #9aa5b1; line-height: 21px; }
.kb-actions { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .5rem; }
.kb-actions .btn { padding: .15rem .5rem; font-size: .72rem; }
@media (hover: hover) {
  .kb-actions { display: none; }
  .kb-carte:hover .kb-actions { display: flex; }
}
.modale.large { width: min(760px, 100%); padding: .5rem; }
.modale.large > .card { margin: 0; border: none; }
@media (max-width: 760px) {
  .kanban { scroll-snap-type: x mandatory; }
  .kb-col, .kanban.statut .kb-col { flex: 0 0 86%; min-width: 0; }
  .kpis-tableau { grid-template-columns: repeat(3, 1fr); gap: .45rem; }
  .kpis-tableau .kpi { padding: .45rem .6rem; }
  .kpis-tableau .kpi b { font-size: 1.2rem; }
  .kpis-tableau .kpi span { font-size: .72rem; line-height: 1.25; display: block; }
}

/* ── Photos des installations ───────────────────────────── */
.ph-lieu { font-family: var(--font-subtitle); font-size: .82rem; color: var(--ink); margin: .5rem 0 .35rem; }
.ph-lieu:first-child { margin-top: 0; }
.ph-bande { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .35rem; scroll-snap-type: x proximity; }
.ph-vignette { flex: 0 0 auto; height: 92px; width: auto; max-width: 170px; object-fit: cover; border-radius: 8px;
               border: 1px solid var(--line); background: var(--bg-alt); cursor: pointer; scroll-snap-align: start;
               transition: border-color .15s ease, transform .15s ease; }
.ph-vignette:hover { border-color: var(--blue); transform: translateY(-1px); }
.ph-icone { cursor: pointer; font-size: .85rem; }
.ph-ajout-item { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 0; border-top: 1px solid var(--line); }
.ph-ajout-item > img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.puces { display: flex; flex-wrap: wrap; gap: .3rem; margin: .1rem 0 .4rem; }
.puce { display: inline-flex; align-items: center; gap: .25rem; font-family: var(--font-title); font-weight: 700; font-size: .74rem;
        letter-spacing: .04em; padding: .15rem .55rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); }
.puce button { border: none; background: none; color: inherit; cursor: pointer; padding: 0 0 0 .1rem; font-size: .8rem; opacity: .7; }
/* Visionneuse plein écran */
.voile.sombre { background: rgba(12, 14, 16, .97); padding: 0; align-items: stretch; z-index: 900; }
.visionneuse { display: flex; flex-direction: column; width: 100%; min-height: 100%; color: #fff; }
.vis-tete { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; font-family: var(--font-title); }
.vis-bouton { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
              border: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.05rem; cursor: pointer; }
.vis-bouton:hover { background: rgba(255, 255, 255, .26); }
.vis-image { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 .5rem; touch-action: pan-y; }
.vis-image img { max-width: 100%; max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px); object-fit: contain;
                 background-size: contain; background-position: center; background-repeat: no-repeat; border-radius: 6px; }
.vis-fleche { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: none;
              background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 1; }
.vis-fleche:hover { background: rgba(255, 255, 255, .3); }
.vis-fleche.g { left: .6rem; }
.vis-fleche.d { right: .6rem; }
.vis-pied { padding: .8rem 1rem 1rem; background: rgba(0, 0, 0, .4); }
.vis-legende { color: #fff; margin: 0 0 .5rem; font-size: .92rem; }
.vis-meta { color: #cbd5e1; }
.vis-form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 1rem; max-width: 760px; margin: 0 auto; }
@media (max-width: 760px) {
  .vis-fleche { display: none; }   /* sur téléphone : on glisse du doigt */
  .ph-vignette { height: 80px; }
}
