/* Mission Board COM 64 - charte 2026 (tokens 07-design-tokens.md).
   Feuille reprise de la maquette validee le 2026-08-01, augmentee des polices
   auto-hebergees, de l'ecran de connexion et du menu mobile. */

/* ---------- Polices auto-hebergees (RGPD) : League Spartan + Quicksand ---------- */
/* League Spartan 600 */
@font-face {
  font-family: "League Spartan"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/league-spartan-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "League Spartan"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/league-spartan-latinext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* League Spartan 700 */
@font-face {
  font-family: "League Spartan"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/league-spartan-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "League Spartan"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/league-spartan-latinext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Quicksand 500 */
@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/quicksand-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/quicksand-latinext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Quicksand 600 */
@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/quicksand-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/quicksand-latinext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Quicksand 700 */
@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/quicksand-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/quicksand-latinext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --navy-950: #0F172A;
  --navy-900: #16163F;
  --navy-800: #1E2673;
  --navy-700: #2B436D;
  --blue-600: #0901FF;
  --blue-700: #0701CC;
  --icon-blue: #151A4F;
  --mauve-600: #4551BF;
  --gold-700: #8A5D06;
  --bg-main: #EEF1FD;
  --bg-light: #F3F7FE;
  --blue-pale: #E7F6FF;
  --grey-soft: #F3F3F3;
  --border-col: #D1DAE5;
  --success-600: #0E7A4A; --success-100: #DCF5E8;
  --warning-600: #8A5D06; --warning-100: #F4EDDE;
  --error-600: #C81E3C;   --error-100: #FDE4E9;
  --info-600: #0901FF;    --info-100: #F3F7FE;
  --surface-card: #FFFFFF;
  --text-strong: var(--navy-950);
  --text-body: var(--navy-900);
  --text-muted: var(--navy-700);
  /* Couleurs sur fond inverse navy (WCAG AA verifie sur #16163F) */
  --label-on-inverse: #8A96CC;   /* libelles de section sidebar - 5.99:1 sur navy */
  --nav-idle: #B8C2DF;           /* entrees de menu au repos */
  --dot-ok: #34D399;             /* pastille d'etat "actif" (decor, sur navy) */
  --error-on-inverse: #FF8DA1;   /* texte d'erreur sur fond navy - 7.8:1 */
  --error-700: #A81830;          /* survol des actions danger */
  --placeholder: #64708F;        /* placeholders de champ - 4.93:1 sur blanc */
  --font-display: "League Spartan", "Trebuchet MS", Verdana, sans-serif;
  --font-body: "Quicksand", "Trebuchet MS", Verdana, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(22,22,63,.06), 0 2px 8px rgba(22,22,63,.05);
  --shadow-md: 0 2px 6px rgba(22,22,63,.06), 0 12px 32px rgba(22,22,63,.10);
  --shadow-cta: 0 8px 24px rgba(9,1,255,.28);
  --focus-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--blue-600);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --duration-fast: 150ms;
}
@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.65; font-weight: 500;
  color: var(--text-body); background: var(--bg-main);
}
:focus-visible { outline: none; box-shadow: var(--focus-shadow); border-radius: 4px; }
::placeholder { color: var(--placeholder); opacity: 1; }
.app { display: flex; min-height: 100vh; }
/* Bouton menu mobile et fond : masques sur desktop, actives sous 860px */
.nav-toggle { display: none; }
.nav-backdrop { display: none; }

/* ---------- Barre latérale ---------- */
.sidebar {
  width: 268px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--navy-900); color: #FFFFFF;
  display: flex; flex-direction: column; padding: 28px 16px 20px;
  overflow-y: auto;
}
.brand { padding: 0 12px 20px; border-bottom: 1px solid rgba(255,255,255,.16); }
.brand-logo { display: block; width: 100%; max-width: 198px; height: auto; }
.brand-sub {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: .06em; text-transform: uppercase; color: #FFFFFF;
  text-align: center; line-height: 1.1; margin-top: 14px;
}
.brand-sub span { color: #9AA8FF; }
.nav { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-md);
  color: var(--nav-idle); text-decoration: none; font-weight: 600; font-size: 15.5px;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav a:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }
.nav a.active { background: rgba(255,255,255,.12); color: #FFFFFF; }
.api-status { padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.16); }
.api-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--label-on-inverse); padding: 3px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot-ok); flex-shrink: 0; }
.dot.off { background: var(--error-on-inverse); }

/* ---------- Zone principale ---------- */
main { flex: 1; min-width: 0; padding: 28px clamp(20px, 3.5vw, 48px) 0; display: flex; flex-direction: column; }
.view-head { margin-bottom: 26px; padding-right: 76px; }
.overline {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue-600);
}
h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3vw, 40px);
  line-height: 1.05; letter-spacing: -0.02em; color: var(--text-strong); margin-top: 6px;
}
.view-head p { margin-top: 10px; color: var(--text-muted); }
h2.card-title {
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  line-height: 1.15; letter-spacing: -0.01em; color: var(--text-strong);
}
/* ---------- Fil d'Ariane ---------- */
.fil { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-width: 0; }
.fil-lien, .fil-actuel {
  font-family: var(--font-display); font-weight: 600; font-size: 12.5px;
  letter-spacing: .12em; text-transform: uppercase; line-height: 1;
}
.fil-lien {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--blue-600);
  transition: color var(--duration-fast) var(--ease-out);
}
.fil-lien:hover { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
/* Le chevron reprenait la couleur des bordures (#D1DAE5) : invisible sur le
   fond de l'application. Ce gris bleute tient 4,4:1 sur --bg-main, donc bien
   lisible, tout en restant en retrait des deux libelles qu'il separe. */
.fil-sep { display: flex; color: var(--placeholder); flex-shrink: 0; }
.fil-sep svg { width: 14px; height: 14px; }
.fil-actuel {
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

/* En-tete d'ecran : titre a gauche, actions a droite sur la meme ligne */
.tete-ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tete-texte { min-width: 0; flex: 1; }
.tete-texte h1 { margin-top: 0; }
.tete-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; padding-top: 6px; }

/* ---------- Cartes et grilles ---------- */
.card {
  background: var(--surface-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 24px;
}
.card.bar { padding: 14px 24px; display: flex; align-items: center; }
.card.bar .card-header { margin-bottom: 0; flex: 1; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px 24px; }
.stat .overline { color: var(--text-muted); font-size: 12px; }
.stat .value {
  font-family: var(--font-display); font-weight: 700; font-size: 32px;
  letter-spacing: -0.02em; color: var(--text-strong); line-height: 1.1; margin-top: 8px;
}
.stat .hint { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

/* ---------- Cartes projet ---------- */
.grid-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 24px; }
.pcard {
  background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 20px 22px 18px; border: 0; border-top: 6px solid var(--navy-800);
  cursor: pointer; text-align: left; font-family: inherit; font-size: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pcard h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em; color: var(--text-strong); line-height: 1.15;
}
.pcard .who { font-size: 14px; color: var(--text-muted); }
.pcard .mlist { list-style: none; margin: 4px 0 2px; display: flex; flex-direction: column; gap: 3px; }
.pcard .mlist li {
  font-size: 13.5px; color: var(--text-muted); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard .mlist li::before { content: "· "; color: var(--blue-600); font-weight: 700; }
.pcard .mlist li.more { font-size: 12.5px; opacity: .85; }
.pcard .mlist li.more::before { content: ""; }
.pcard .prog { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pcard .prog b { font-size: 13.5px; font-weight: 700; color: var(--text-body); white-space: nowrap; }
.vis-bar { background: var(--bg-light); border-radius: var(--radius-pill); height: 10px; flex: 1; overflow: hidden; }
.vis-bar span { display: block; height: 100%; background: var(--blue-600); border-radius: var(--radius-pill); }
.pcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.tchip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-light); border-radius: var(--radius-pill);
  padding: 3px 11px; font-size: 13px; font-weight: 700; color: var(--navy-700); white-space: nowrap;
}
.tchip svg { width: 13px; height: 13px; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 18px; align-items: flex-start; overflow-x: auto; padding-bottom: 16px; }
.kcol {
  min-width: 272px; width: 272px; flex-shrink: 0;
  background: rgba(255,255,255,.55); border: 1.5px solid var(--border-col);
  border-radius: var(--radius-lg); padding: 14px;
  transition: box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
/* Couleurs d'arrière-plan par état de colonne */
.kcol.k-todo  { background: var(--blue-pale); }
.kcol.k-doing { background: var(--warning-100); }
.kcol.k-wait  { background: #E9EBFA; }
.kcol.k-done  { background: var(--success-100); }
.kcol.drop { border-color: var(--blue-600); box-shadow: inset 0 0 0 1.5px var(--blue-600); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px 12px; }
.kcol-head .kdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kcol-head h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); flex: 1;
}
.kcol-head .count {
  font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
  background: #FFFFFF; border: 1.5px solid var(--border-col); border-radius: var(--radius-pill);
  padding: 1px 9px; color: var(--text-body);
}
.mcard {
  width: 100%; background: var(--surface-card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); border: 0; padding: 14px 16px; margin-bottom: 10px;
  cursor: pointer; text-align: left; font-family: inherit; font-size: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.mcard:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban .mcard { cursor: grab; }
.kanban .mcard:active { cursor: grabbing; }
.mcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.mcard .ttl { font-weight: 700; font-size: 15px; line-height: 1.4; color: var(--text-strong); }
.mcard .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcard .foot { display: flex; justify-content: space-between; align-items: center; }
.mcard.done .ttl { text-decoration: line-through; color: var(--text-muted); }
.tprog { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.due svg { width: 13px; height: 13px; }
.due.late { color: var(--error-600); }
.kadd {
  width: 100%; background: none; border: 1.5px dashed var(--border-col); border-radius: var(--radius-md);
  color: var(--text-muted); font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 10px; cursor: pointer;
}
.kadd:hover { border-color: var(--blue-600); color: var(--blue-600); }
.kmore {
  width: 100%; background: none; border: 0; color: var(--text-muted);
  font-family: inherit; font-weight: 700; font-size: 13.5px; padding: 6px 10px 2px;
  cursor: pointer; text-align: center;
}
.kmore:hover { color: var(--blue-600); text-decoration: underline; }

/* ---------- Boutons, champs, badges ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  border-radius: var(--radius-pill); padding: 12px 24px; text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn-primary { background: var(--blue-600); color: #FFFFFF; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--blue-700); }
.btn-secondary { background: #FFFFFF; color: var(--navy-900); border: 1.5px solid var(--border-col); }
.btn-secondary:hover { background: var(--bg-light); }
.btn-danger { background: var(--error-600); color: #FFFFFF; }
.btn-danger:hover { background: var(--error-700); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--text-body); }
input[type="text"], input[type="date"], input[type="time"], input[type="password"], select, textarea {
  font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--text-body);
  background: #FFFFFF; border: 1.5px solid var(--border-col); border-radius: var(--radius-sm);
  padding: 11px 14px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--focus-shadow); border-color: var(--blue-600); }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232B436D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px;
}
/* ---------- Choix binaire explicite (interne / client) ---------- */
/* Une liste deroulante dont il faut lire l'option pour comprendre le mode
   laissait le doute : les deux cas sont ici visibles en meme temps. */
.choix { border: 0; padding: 0; margin: 0; min-width: 0; }
.choix legend { font-size: 14px; font-weight: 700; color: var(--text-body); padding: 0; margin-bottom: 8px; }
.choix-liste { display: flex; gap: 12px; flex-wrap: wrap; }
.choix-option {
  flex: 1; min-width: 190px; display: flex; align-items: flex-start; gap: 10px;
  background: #FFFFFF; border: 1.5px solid var(--border-col); border-radius: var(--radius-md);
  padding: 12px 14px; cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.choix-option:hover { border-color: var(--blue-600); }
.choix-option:focus-within { box-shadow: var(--focus-shadow); }
/* L'option retenue se voit au premier coup d'oeil, pas seulement a la pastille */
.choix-option.actif { border-color: var(--blue-600); background: var(--bg-light); }
.choix-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue-600); flex-shrink: 0; cursor: pointer; }
.choix-option strong { display: block; font-weight: 700; font-size: 15px; color: var(--text-strong); line-height: 1.3; }
.choix-option small { display: block; font-size: 13px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }

.form-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 180px; }
.form-col { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
details.acc { border: 1.5px solid var(--border-col); border-radius: var(--radius-md); background: #FFFFFF; margin-bottom: 16px; }
details.acc summary {
  cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700;
  color: var(--text-strong); display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.acc summary::after { content: "+"; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--blue-600); }
details.acc[open] summary::after { content: "–"; }
details.acc .acc-body { padding: 0 18px 16px; color: var(--text-muted); font-size: 15px; line-height: 1.7; }
details.acc code, code {
  font-family: Consolas, "Courier New", monospace; font-size: 13.5px;
  background: var(--bg-light); border-radius: 6px; padding: 2px 7px; color: var(--navy-900);
}
.link-danger { color: var(--error-600); font-weight: 700; font-size: 14.5px; cursor: pointer; background: none; border: 0; font-family: inherit; }
.link-danger:hover { color: var(--error-700); text-decoration: underline; }
.badge {
  display: inline-block; border-radius: var(--radius-pill); padding: 3px 12px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.b-success { color: var(--success-600); background: var(--success-100); }
.b-warning { color: var(--warning-600); background: var(--warning-100); }
.b-error   { color: var(--error-600);   background: var(--error-100); }
.b-info    { color: var(--info-600);    background: var(--info-100); }
.b-neutral { color: var(--navy-700);    background: var(--grey-soft); }
.b-mauve   { color: #FFFFFF;            background: var(--mauve-600); }
.cost-note { font-size: 13.5px; color: var(--text-muted); margin-top: 12px; }
.empty-note { color: var(--text-muted); font-size: 15px; padding: 18px 2px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--font-display); font-weight: 600; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted);
  text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--border-col); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border-col); font-size: 15.5px; vertical-align: middle; }
tbody tr:hover { background: var(--bg-light); }
td .kw { font-weight: 700; color: var(--text-strong); }
td.kw { font-weight: 700; color: var(--text-strong); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-action { color: var(--blue-600); font-weight: 700; text-decoration: none; font-size: 14.5px; cursor: pointer; background: none; border: 0; font-family: inherit; }
.link-action:hover { color: var(--blue-700); text-decoration: underline; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }

/* ---------- Bouton + global ---------- */
.fab {
  position: fixed; top: 22px; right: 28px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue-600); color: #FFFFFF; box-shadow: var(--shadow-cta);
  display: grid; place-items: center;
  transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.fab:hover { background: var(--blue-700); transform: scale(1.05); }
.fab svg { width: 26px; height: 26px; }
.fab-menu {
  position: fixed; top: 88px; right: 28px; z-index: 40;
  background: #FFFFFF; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 8px; min-width: 220px;
}
.fab-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--text-body);
  padding: 11px 14px; border-radius: var(--radius-sm);
}
.fab-menu button:hover { background: var(--bg-light); color: var(--blue-600); }
.fab-menu button svg { width: 18px; height: 18px; color: var(--icon-blue); }

/* ---------- Pop-ups (fiches) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.45);
  display: grid; place-items: center; padding: 24px;
}
.modal {
  background: #FFFFFF; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  width: min(94vw, 760px); max-height: 90vh; overflow-y: auto; padding: 28px 32px 26px;
}
.modal.small { width: min(94vw, 520px); }
.modal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.modal-nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.modal-nav .pos { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--text-muted); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-col);
  background: #FFFFFF; color: var(--navy-900); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--bg-light); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn svg { width: 17px; height: 17px; }
.modal h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  line-height: 1.15; letter-spacing: -0.01em; color: var(--text-strong); margin: 4px 0 14px;
}
.modal .meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tasks { list-style: none; margin-bottom: 6px; }
.tasks li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border-col); }
.tasks li:last-child { border-bottom: 0; }
.tasks input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--blue-600); cursor: pointer; flex-shrink: 0; }
.tasks .tlab { flex: 1; font-weight: 600; font-size: 15.5px; }
.tasks li.checked .tlab { text-decoration: line-through; color: var(--text-muted); }
.sec-title {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin: 20px 0 10px;
}
.notes-box {
  border: 1.5px solid var(--border-col); border-radius: var(--radius-md);
  padding: 14px 16px; font-size: 15px; line-height: 1.6; color: var(--text-body);
  background: var(--bg-light); min-height: 90px;
}
.notes-box a { color: var(--blue-600); font-weight: 700; }
.notes-box[contenteditable] { cursor: text; }
.notes-box[contenteditable]:focus { outline: none; box-shadow: var(--focus-shadow); background: #FFFFFF; }
.notes-box ul { margin: 6px 0 6px 22px; }
.notes-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.notes-toolbar { display: flex; gap: 6px; }
.tool-btn {
  width: 30px; height: 30px; border: 1.5px solid var(--border-col); border-radius: 8px;
  background: #FFFFFF; color: var(--navy-900); cursor: pointer; display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 800; font-size: 14px;
}
.tool-btn:hover { background: var(--bg-light); border-color: var(--blue-600); color: var(--blue-600); }
.tool-btn svg { width: 15px; height: 15px; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
/* Bandeau "toutes les tâches sont faites" : proposition, jamais bascule auto */
.banner-done {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--success-100); color: var(--success-600);
  border-radius: var(--radius-md); padding: 12px 16px; margin: 16px 0 0;
  font-weight: 700; font-size: 15px;
}

/* ---------- Fiche client ---------- */
.client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; }
.cline { padding: 11px 0; border-bottom: 1px solid var(--border-col); min-width: 0; }
/* Adresse : toujours sur toute la largeur, c'est le champ le plus long */
.cline.pleine { grid-column: 1 / -1; }
.cline .lab {
  font-family: var(--font-display); font-weight: 600; font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); display: block;
}
/* Une adresse electronique longue se coupe proprement au lieu de deborder */
.cline .val { font-weight: 700; color: var(--text-strong); font-size: 16px; overflow-wrap: anywhere; }

/* ---------- Bloc de temps (fiche client) ---------- */
.temps-bloc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.temps-bloc > div {
  background: var(--bg-light); border-radius: var(--radius-md); padding: 14px 16px; min-width: 0;
}
.temps-bloc .lab {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.temps-bloc .val {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em; color: var(--text-strong); line-height: 1.2; margin-top: 6px;
}
.temps-bloc > div.fort { background: var(--blue-pale); }
@media (max-width: 620px) {
  .temps-bloc { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Divers ---------- */
/* minmax(0, 1fr) et non 1fr : le minimum implicite d'une colonne de grille est
   son contenu min-content. Une ligne en white-space: nowrap (les titres
   d'archives) imposerait sinon sa largeur entiere a la colonne et ecraserait
   l'autre - les deux colonnes ne feraient plus la meme largeur. */
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.settings-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-col); }
.settings-line:last-child { border-bottom: 0; }
.settings-line .lab { font-weight: 700; color: var(--text-strong); }
.settings-line .val { color: var(--text-muted); font-size: 15px; display: flex; align-items: center; gap: 8px; }
/* Liste compacte de lecture (dernières archives dans Réglages) */
.mini-liste { list-style: none; }
.mini-liste li { padding: 9px 0; border-bottom: 1px solid var(--border-col); min-width: 0; }
.mini-liste li:last-child { border-bottom: 0; }
.mini-liste .titre {
  display: block; font-weight: 700; font-size: 15px; color: var(--text-strong); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-liste .meta { font-size: 13px; color: var(--text-muted); }
.form-error { color: var(--error-600); font-weight: 600; font-size: 14.5px; min-height: 22px; margin-top: 8px; }
.form-ok { color: var(--success-600); font-weight: 600; font-size: 14.5px; min-height: 22px; margin-top: 8px; }
.key-reveal {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-light); border: 1.5px solid var(--border-col);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.key-reveal code { flex: 1; font-size: 13.5px; overflow-wrap: anywhere; color: var(--text-strong); }
footer.note {
  text-align: center; font-size: 13.5px; color: var(--text-muted);
  padding: 10px 0 14px; border-top: 1px solid var(--border-col);
  margin-top: auto; position: sticky; bottom: 0; background: var(--bg-main);
}
[hidden] { display: none !important; }

/* ---------- Écran de connexion ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--navy-900); padding: 24px;
}
.login-card {
  background: var(--navy-900); text-align: center; max-width: 380px; width: 100%;
}
.login-card .brand-logo { margin: 0 auto 6px; max-width: 260px; }
.login-card .brand-sub { margin-bottom: 34px; }
.login-card input[type="password"] {
  width: 100%; text-align: center; font-size: 17px;
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.20); color: #FFFFFF;
}
.login-card input[type="password"]::placeholder { color: #9AA8FF; }
.login-card input[type="password"]:focus { box-shadow: 0 0 0 2px var(--navy-900), 0 0 0 4px #9AA8FF; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 14px; }
.login-error { color: var(--error-on-inverse); font-weight: 600; font-size: 14.5px; margin-top: 12px; min-height: 22px; }

/* ---------- Adaptatif ---------- */
@media (max-width: 1080px) {
  .two-cols, .client-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 30; height: 100vh; width: 268px; left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform var(--duration-fast) var(--ease-out);
  }
  .sidebar.open { transform: translateX(0); }
  .nav-toggle {
    display: grid; place-items: center; position: fixed; top: 22px; left: 20px; z-index: 41;
    width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border-col);
    background: #FFFFFF; color: var(--navy-900); cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(15,23,42,.45); }
  main { padding-top: 20px; }
  .view-head { padding-right: 64px; padding-left: 56px; }
}
