/* Pilot — identité inspirée du tableau de bord Axonaut : barre latérale vert olive, fond gris clair,
   cartes blanches arrondies à ombre douce, pastille d'icône colorée en biais, titres Montserrat en capitales,
   texte Open Sans. Polices hébergées localement (aucun appel à un site tiers). */

@font-face { font-family: Montserrat; font-weight: 500; font-style: normal; font-display: swap; src: url(/polices/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 600; font-style: normal; font-display: swap; src: url(/polices/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-style: normal; font-display: swap; src: url(/polices/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-style: normal; font-display: swap; src: url(/polices/montserrat-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: Fraunces; font-weight: 900; font-style: normal; font-display: swap; src: url(/polices/fraunces-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url(/polices/open-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 400; font-style: italic; font-display: swap; src: url(/polices/open-sans-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url(/polices/open-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url(/polices/open-sans-latin-700-normal.woff2) format('woff2'); }

:root {
  color-scheme: light dark;
  /* Palette « Olive et or » (17/10/2026) : tirée du logo (or #c9a85b, brun #5c3624, crème #f5f1e8)
     et de la barre olive d'Axonaut. */
  --fond: #f4f1e9;
  --fond-2: #f9f7f1;
  --surface: #fffefa;
  --texte: #33302a;
  --texte-doux: #827c6f;
  --bordure: #e7e2d6;
  --bordure-forte: #d8d0bf;
  --accent: #a8843a;
  --accent-fonce: #8a6a2a;
  --accent-texte: #ffffff;
  --degrade-bouton: linear-gradient(90deg, #b8963f, #d4b46a);
  --marque: #5f6b45;
  --marque-fonce: #4c5637;
  --marque-texte: #ffffff;
  --succes: #5f7a3a;
  --danger: #b5432f;
  --retard: #b5432f;
  --proche: #b07a1e;
  --ombre-carte: 0 18px 32px rgb(95 90 60 / 0.12);

  /* Matrice : quatre teintes bien distinctes, restées dans les tons du logo. */
  --q-urgent-important: #b5523b;
  --q-important: #4e6f8c;
  --q-urgent: #c29a3c;
  --q-attendre: #7f9171;
  --degrade-urgent-important: linear-gradient(135deg, #9c4330, #d0785c);
  --degrade-important: linear-gradient(135deg, #3f5f7c, #7a9cb8);
  --degrade-urgent: linear-gradient(135deg, #b38a2e, #dcc07a);
  --degrade-attendre: linear-gradient(135deg, #6c7f5e, #a5b593);
  --degrade-violet: linear-gradient(135deg, #5c3624, #94705c);
  --degrade-bleu: linear-gradient(135deg, #5f6b45, #95a072);
  --degrade-cyan: linear-gradient(135deg, #8a6a2a, #c9a85b);
  --degrade-orange: linear-gradient(135deg, #b8963f, #dcc07a);
  --degrade-vert: linear-gradient(135deg, #4f6a2f, #8aa25e);
  --tuile-a-trier: #5c3624;
  --tuile-rdv: #a8843a;

  --dsi: #3f7f6e;
  --itchain: #7a5a9c;

  --titre: Montserrat, 'Open Sans', sans-serif;
  --pilot: Fraunces, Georgia, serif;
  --creme: #f5f1e8;
  --or: #c9a85b;
  --or-fonce: #b39245;
  --brun: #5c3624;
  --brun-texte: #5c4530;
  --corps: 'Open Sans', Arial, sans-serif;
  --rayon: 15px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #16181b;
    --fond-2: #1f2226;
    --surface: #24272c;
    --texte: #e8eaed;
    --texte-doux: #9aa1aa;
    --bordure: #33373d;
    --bordure-forte: #454a52;
    --accent: #d4b46a;
    --accent-fonce: #e3c88c;
    --marque: #4c5637;
    --marque-fonce: #3e472c;
    --ombre-carte: 0 14px 30px rgb(0 0 0 / 0.35);
    --dsi: #5cc2ad;
    --itchain: #a593f0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 14px/1.55 var(--corps);
}

h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Boutons et champs ---------- */

button {
  border: 1px solid var(--bordure-forte);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
button.principal { background: var(--degrade-bouton); border-color: transparent; color: #fff; }
button.principal:hover:not(:disabled) { color: #fff; filter: brightness(1.06); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
button.danger { color: var(--danger); }
button.lien { border: 0; background: none; color: var(--accent); padding: 0 0.25rem; font-weight: 600; border-radius: 4px; }
button.lien:hover { text-decoration: underline; }
button.petit, a.petit { padding: 0.28rem 0.8rem; font-size: 0.85rem; }
a.bouton-lien { display: inline-block; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; text-decoration: none; font-weight: 600; }
a.bouton-lien:hover { background: var(--accent); color: #fff; }

input, select, textarea {
  border: 1px solid var(--bordure-forte);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- Barre latérale ---------- */

.appli { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 100vh; }
.barre-laterale {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: 1rem;
  background: var(--marque); color: var(--marque-texte);
  font-family: var(--titre);
}
.logo { display: grid; justify-items: center; gap: 0.4rem; padding: 1.2rem 1rem 0.4rem; color: inherit; text-decoration: none; }
.logo-rond {
  display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  background: #fff; box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}
.logo-rond img { width: 62%; height: auto; }
.logo-texte { font-family: var(--pilot); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.menu-lateral { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.menu-lateral li + li { border-top: 1px solid rgb(255 255 255 / 0.12); }
.menu-lateral a {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem; color: inherit; text-decoration: none; font-weight: 500; font-size: 0.92rem;
}
.menu-lateral a:hover, .menu-lateral a.actif { background: var(--marque-fonce); }
.menu-lateral svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }

/* ---------- En-tête ---------- */

.entete {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1rem, 3vw, 2.5rem);
}
.marque { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.marque h1 { font-family: var(--titre); font-weight: 700; font-size: 1.45rem; text-transform: uppercase; }
.date { margin: 0; color: var(--texte-doux); font-weight: 600; }

.outils { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.filtres { display: flex; gap: 0.25rem; flex-wrap: wrap; padding: 0.25rem; background: var(--surface); border: 1px solid var(--bordure); border-radius: 999px; }
.filtres button { border: 0; background: none; padding: 0.3rem 0.9rem; color: var(--texte-doux); }
.filtres button[aria-pressed="true"] { background: var(--degrade-bouton); color: #fff; }
.filtres button[aria-pressed="true"]:hover { color: #fff; }
.filtres.petits { margin: 0 0 0.8rem; }
.filtres.petits button { font-size: 0.84rem; padding: 0.22rem 0.75rem; }
.compte { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--texte-doux); font-weight: 600; }

/* ---------- Mise en page ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  padding: 0.5rem clamp(1rem, 3vw, 2.5rem) 3rem;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

/* Carte façon Axonaut : pastille d'icône en biais en haut à gauche, titre en capitales à côté. */
.carte {
  position: relative;
  background: var(--surface);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-carte);
  padding: 0 1.4rem 1.3rem;
  min-width: 0;
}
.picto {
  --degrade: var(--degrade-bleu);
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 82px; height: 72px;
  background: var(--degrade);
  color: #fff;
  border-radius: var(--rayon) 0 22px 0;
  clip-path: polygon(0 0, 100% 0, 91% 100%, 0 100%);
}
.picto svg { width: 34px; height: 34px; }
.carte > h2, .bloc.carte > h2 {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  min-height: 72px; margin: 0 0 0.9rem; padding: 0.9rem 0 0 calc(82px + 0.9rem);
  font-family: var(--titre); font-size: 1.2rem; font-weight: 700; letter-spacing: 0; text-transform: uppercase; color: var(--texte);
}
.agenda .picto { --degrade: var(--degrade-cyan); }
.a-trier .picto { --degrade: var(--degrade-violet); }
.ajout .picto { --degrade: var(--degrade-bleu); }
.atera .picto { --degrade: var(--degrade-violet); }
.bilan .picto { --degrade: var(--degrade-orange); }
#zone-faites .picto { --degrade: var(--degrade-vert); }

.vide { color: var(--texte-doux); font-size: 0.92rem; margin: 0; list-style: none; font-style: italic; }
.compteur:not(:empty) {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--fond-2);
  border: 1px solid var(--bordure);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}
.colonnes { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }

@media (max-width: 900px) {
  .appli { grid-template-columns: minmax(0, 1fr); }
  .barre-laterale { position: sticky; top: 0; z-index: 15; height: auto; flex-direction: row; align-items: center; gap: 0; }
  .logo { display: flex; padding: 0.5rem 0.75rem; }
  .logo-rond { width: 36px; height: 36px; box-shadow: none; }
  .logo-texte { display: none; }
  .menu-lateral { display: flex; overflow-x: auto; scrollbar-width: none; }
  .menu-lateral li + li { border-top: 0; }
  .menu-lateral a { padding: 0.85rem 0.75rem; white-space: nowrap; font-size: 0.85rem; }
  .menu-lateral a .libelle { display: none; }
  .menu-lateral svg { width: 20px; height: 20px; }
  html { scroll-padding-top: 4rem; }
}

/* ---------- Agenda et comptes ---------- */

.agenda { padding-bottom: 1rem; border-bottom: 1px solid var(--bordure); }
.agenda-liste { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.15rem; }
.evenement { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.8rem; align-items: baseline; padding: 0.15rem 0; }
.evenement .heure { font-family: var(--titre); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.evenement .quoi { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; }
.evenement.passe { opacity: 0.5; }
.evenement a { color: inherit; text-decoration: none; }
.evenement a:hover { text-decoration: underline; }
.lieu { font-size: 0.85rem; color: var(--texte-doux); font-style: italic; }

.comptes { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; }
.liste-comptes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.compte-source { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.85rem; }
.compte-source strong { font-weight: 700; }
.compte-source .etat { color: var(--texte-doux); }
.compte-source .etat.erreur { color: var(--danger); }

/* ---------- Pastilles ---------- */

.pastille { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.pastille::before { content: '●'; margin-right: 0.3rem; font-size: 0.7em; vertical-align: 0.1em; }
.pastille.dsi_sante { color: var(--dsi); }
.pastille.itchain { color: var(--itchain); }
.echeance { font-size: 0.85rem; font-weight: 700; color: var(--texte-doux); }
.echeance.retard { color: var(--retard); }
.echeance.proche { color: var(--proche); }
.source { color: var(--texte-doux); text-decoration: none; font-size: 0.85rem; }
a.source:hover { text-decoration: underline; }

/* ---------- Ajout ---------- */

.form-tache { display: grid; gap: 0.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .form-tache { grid-template-columns: minmax(200px, 1fr) auto auto auto auto; }
}

/* ---------- Matrice ---------- */

.matrice { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .matrice { grid-template-columns: 1fr 1fr; } }

.case { min-height: 210px; }
.case[data-quadrant="urgent_important"] { --couleur: var(--q-urgent-important); }
.case[data-quadrant="important"] { --couleur: var(--q-important); }
.case[data-quadrant="urgent"] { --couleur: var(--q-urgent); }
.case[data-quadrant="attendre"] { --couleur: var(--q-attendre); }
.case[data-quadrant="urgent_important"] .picto { --degrade: var(--degrade-urgent-important); }
.case[data-quadrant="important"] .picto { --degrade: var(--degrade-important); }
.case[data-quadrant="urgent"] .picto { --degrade: var(--degrade-urgent); }
.case[data-quadrant="attendre"] .picto { --degrade: var(--degrade-attendre); }
.case > h2 { row-gap: 0; }
.case > h2 .nombre {
  min-width: 1.6rem; padding: 0.05rem 0.5rem; border-radius: 999px;
  background: var(--couleur); color: #fff;
  font-family: var(--corps); font-size: 0.8rem; font-weight: 700; text-align: center;
}
.case > h2 em {
  flex-basis: 100%; font-family: var(--corps); font-size: 0.82rem; font-weight: 600; font-style: normal;
  text-transform: none; color: var(--couleur);
}
.case.survol { outline: 3px dashed var(--couleur); outline-offset: -3px; }

.liste, .propositions, .faites { list-style: none; margin: 0; padding: 0; }
.case .liste { padding: 0; }
.case .liste .vide { padding: 0.5rem 0; }

.tache {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--bordure);
  cursor: grab;
}
.tache:last-child { border-bottom: 0; }
.tache.en-deplacement { opacity: 0.4; }
.coche {
  appearance: none;
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  padding: 0;
  border: 2px solid var(--couleur, var(--accent));
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.coche:hover { background: color-mix(in srgb, var(--couleur, var(--accent)) 25%, transparent); }
.coche:checked { background: var(--couleur, var(--accent)); }
.corps { flex: 1; min-width: 0; }
.titre { overflow-wrap: anywhere; font-weight: 500; }
.meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; align-items: baseline; margin-top: 0.1rem; }

/* Menu « ⋯ » */
.menu { position: relative; flex: none; }
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 0 0.45rem;
  border-radius: 6px;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--texte-doux);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--fond-2); color: var(--texte); }
.menu-contenu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 10;
  display: grid;
  min-width: 200px;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgb(40 25 10 / 0.18);
}
.menu-contenu button { border: 0; text-align: left; background: none; padding: 0.4rem 0.6rem; font-weight: 500; }
.menu-contenu button:hover { background: var(--fond-2); }
.menu-titre { margin: 0.35rem 0.6rem 0.1rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

.detail-tache summary { cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-top: 0.15rem; }
.detail-tache .fiche { margin-top: 0.35rem; grid-template-columns: 4.8rem 1fr; font-size: 0.88rem; }
.detail { margin: 0.35rem 0 0; font-size: 0.88rem; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- À trier ---------- */

.a-trier .propositions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
.q-urgent_important { --q: var(--q-urgent-important); }
.q-important { --q: var(--q-important); }
.q-urgent { --q: var(--q-urgent); }
.q-attendre { --q: var(--q-attendre); }

.proposition {
  padding: 0.95rem 1.15rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--q, var(--bordure-forte));
  border-radius: 0 0 var(--rayon) var(--rayon);
}
.prop-entete { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; font-size: 0.85rem; }
.badge-case { font-family: var(--titre); font-weight: 700; font-size: 0.85rem; color: var(--q); cursor: help; }
.ouvrir { margin-left: auto; color: var(--accent); text-decoration: none; font-weight: 700; }
.ouvrir:hover { text-decoration: underline; }
.prop-titre { margin: 0.45rem 0 0.75rem; font-family: var(--titre); font-size: 1.12rem; font-weight: 700; line-height: 1.35; }

.fiche { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.3rem 1rem; margin: 0; }
.fiche dt { padding-top: 0.12rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.fiche dd { margin: 0; overflow-wrap: anywhere; }

.prop-pied {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; justify-content: space-between;
  margin-top: 0.85rem; padding-top: 0.7rem; border-top: 1px dashed var(--bordure-forte);
}
.provenance { flex: 1 1 18rem; min-width: 0; font-size: 0.82rem; font-style: italic; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boutons { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.prop-pied .boutons { flex-wrap: nowrap; }
.prop-pied .boutons select { min-width: 9rem; }

/* ---------- Terminées ---------- */

.faites li:not(.vide) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.3rem 0; border-bottom: 1px solid var(--bordure); }
.faites .titre { text-decoration: line-through; color: var(--texte-doux); }

/* ---------- Dialogue et message ---------- */

dialog {
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.25rem;
  width: min(480px, calc(100vw - 2rem));
  background: var(--surface);
  color: var(--texte);
}
dialog::backdrop { background: rgb(36 24 14 / 0.45); }
.form-edition { display: grid; gap: 0.75rem; }
.form-edition h2 { font-family: var(--titre); font-size: 1.2rem; }
.form-edition label { display: grid; gap: 0.25rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.form-edition label > * { color: var(--texte); font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

.message {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  max-width: calc(100vw - 2rem);
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  background: var(--texte);
  color: var(--fond);
  font-weight: 500;
  box-shadow: 0 10px 28px rgb(40 25 10 / 0.25);
  z-index: 20;
}
.message[data-type="erreur"] { background: var(--danger); color: #fff; }

/* ---------- Connexion et vérification ---------- */

.page-connexion { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.carte-connexion {
  width: min(420px, 100%);
  display: grid;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 var(--rayon) var(--rayon);
  padding: 2rem 1.75rem;
}
.carte-connexion h1 { font-family: var(--titre); font-size: 1.9rem; letter-spacing: 0.03em; text-transform: uppercase; }
.carte-connexion .date { margin-top: -0.6rem; }
.bouton { display: inline-block; padding: 0.7rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 800; text-align: center; }
.bouton.principal { background: var(--accent); color: var(--accent-texte); }
.bouton.principal:hover { background: var(--accent-fonce); }
.note { margin: 0; font-size: 0.85rem; color: var(--texte-doux); }
.alerte { margin: 0; padding: 0.65rem 0.85rem; border-radius: 8px; background: var(--danger); color: #fff; font-size: 0.92rem; }

.etapes { margin: 0.5rem 0; padding-left: 1.2rem; font-size: 0.95rem; color: var(--texte-doux); }
.qr { display: block; margin: 0.5rem auto; border-radius: 8px; background: #fff; padding: 6px; }
.secret-manuel { font-size: 0.88rem; color: var(--texte-doux); }
.secret-manuel code { font-size: 0.95rem; color: var(--texte); word-break: break-all; }
.form-code { display: flex; gap: 0.5rem; }
.form-code input { flex: 1; font-family: var(--titre); font-size: 1.4rem; letter-spacing: 0.18em; text-align: center; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .evenement { grid-template-columns: 1fr; gap: 0; }
  .fiche { grid-template-columns: 1fr; gap: 0; }
  .fiche dd { margin-bottom: 0.45rem; }
  .ouvrir { margin-left: 0; }
  .prop-pied .boutons { flex-wrap: wrap; width: 100%; }
  .prop-pied .boutons > * { flex: 1 1 auto; }
  .case > h2 em { display: none; }
}

/* ---------- Tickets Atera ---------- */

.tickets { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); }
.tickets .vide { padding: 0.75rem 0.9rem; }
.ticket + .ticket { border-top: 1px solid var(--bordure); }
.ticket-lien { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.6rem 0.9rem; color: inherit; text-decoration: none; }
.ticket-lien:hover { background: var(--fond-2); }
.ticket-numero { flex: none; min-width: 4.2rem; font-family: var(--titre); font-weight: 700; font-size: 0.9rem; color: var(--accent); }
.ticket-corps { min-width: 0; display: grid; }
.ticket-titre { font-weight: 500; overflow-wrap: anywhere; }
.ticket-client { font-size: 0.85rem; font-weight: 700; }
.ticket-statut, .ticket-age { font-size: 0.82rem; color: var(--texte-doux); }
.statut-open .ticket-statut { color: var(--q-urgent-important); font-weight: 700; }
.ticket-priorite { font-size: 0.82rem; font-weight: 800; color: var(--danger); }
.colonnes .atera { grid-column: 1 / -1; }

@media (min-width: 760px) {
  .ticket-lien { align-items: center; padding: 0.45rem 0.9rem; }
  .ticket-corps { display: flex; align-items: baseline; gap: 1rem; flex: 1; }
  .ticket-titre { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ticket-corps .meta { flex: none; flex-wrap: nowrap; margin: 0; }
}
.voir-plus { width: 100%; border: 0; border-top: 1px solid var(--bordure); border-radius: 0 0 var(--rayon) var(--rayon); color: var(--accent); background: transparent; }

/* ---------- Saisie en langage naturel ---------- */

.form-langage { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.form-langage input { flex: 1; }
.apercu-saisie { margin-top: 0.75rem; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--bordure); border-top: 4px solid var(--accent); border-radius: 0 0 var(--rayon) var(--rayon); display: grid; gap: 0.7rem; }
.apercu-consigne { margin: 0; font-size: 0.85rem; font-style: italic; color: var(--accent); }
.apercu-titre { font-family: var(--titre); font-weight: 700; font-size: 1.05rem; }
.apercu-champs { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.apercu-champs label { display: grid; gap: 0.2rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.apercu-champs label > * { font-size: 0.95rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--texte); }
select.a-verifier { border-color: var(--proche); }
.apercu-boutons { justify-content: flex-end; }

/* Placement des tickets dans la matrice */
.ticket { display: flex; align-items: center; }
.ticket .ticket-lien { flex: 1; min-width: 0; }
.ticket[draggable="true"] { cursor: grab; }
.ticket.en-deplacement { opacity: 0.4; }
.ticket-action { flex: none; padding-right: 0.9rem; }
.ticket-placer { padding: 0.25rem 0.5rem; font-size: 0.82rem; }
.ticket-place { font-family: var(--titre); font-weight: 700; font-size: 0.82rem; color: var(--q); white-space: nowrap; }
.ticket.place .ticket-titre { color: var(--texte-doux); }
@media (max-width: 600px) {
  .ticket { flex-wrap: wrap; }
  .ticket-action { width: 100%; padding: 0 0.9rem 0.6rem 5.9rem; }
}

/* Classement des tickets */
.ticket-action { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: flex-end; }
.classement { display: flex; gap: 0.2rem; padding: 0.15rem; border: 1px solid var(--bordure); border-radius: 8px; background: var(--fond); }
.classement button { border: 0; background: none; padding: 0.2rem 0.55rem; font-size: 0.8rem; color: var(--texte-doux); }
.classement button.choix-dsi_sante[aria-pressed="true"] { background: var(--dsi); color: #fff; }
.classement button.choix-itchain[aria-pressed="true"] { background: var(--itchain); color: #fff; }
.classement button.choix-ignorer:hover { color: var(--danger); }
.auto { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--proche); border: 1px dashed var(--proche); border-radius: 4px; padding: 0 0.3rem; }
.ticket.non-classe { background: color-mix(in srgb, var(--proche) 5%, transparent); }
.ticket.ignore .ticket-titre, .ticket.ignore .ticket-client { color: var(--texte-doux); text-decoration: line-through; }
.atera .filtres.petits button { white-space: nowrap; }
@media (min-width: 760px) {
  .ticket .ticket-titre { max-width: 100%; }
}

/* Suite d'une tâche : déléguer, planifier, lire et répondre au ticket */
.ligne-suite { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.35rem; font-size: 0.88rem; }
.ligne-suite .etiquette { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-doux); min-width: 4.8rem; }
.ligne-suite input, .ligne-suite select { padding: 0.25rem 0.45rem; font-size: 0.88rem; }
.ligne-suite input.delegue { flex: 1; min-width: 10rem; max-width: 18rem; }
.ligne-suite .rdv { font-weight: 700; color: var(--q-important); text-decoration: none; }
.ticket-lecture .ticket-contenu { margin-top: 0.4rem; display: grid; gap: 0.5rem; }
.ticket-entete { margin: 0; font-size: 0.82rem; color: var(--texte-doux); }
.echanges { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; max-height: 22rem; overflow-y: auto; }
.echanges li { border-left: 3px solid var(--bordure-forte); padding: 0.3rem 0.6rem; background: var(--fond); border-radius: 0 6px 6px 0; }
.echanges li.interne { border-left-color: var(--q-urgent); }
.echange-entete { margin: 0; font-size: 0.8rem; color: var(--texte-doux); }
.echange-texte { margin: 0.2rem 0 0; font-size: 0.88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-interne { margin-left: 0.4rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--proche); }
.reponse-ia { display: grid; gap: 0.4rem; }
.reponse-ia textarea { width: 100%; font: inherit; font-size: 0.9rem; }
.a-verifier-texte { margin: 0; font-size: 0.85rem; color: var(--proche); font-weight: 700; }
.erreur-texte { margin: 0; color: var(--danger); font-size: 0.88rem; }
.attente { margin: 0; font-style: italic; color: var(--texte-doux); font-size: 0.88rem; }

/* Point du matin et bilan du soir */
.bilan .filtres { margin-bottom: 0.6rem; }
.point-date { margin: 0 0 0.5rem; font-family: var(--titre); font-style: italic; color: var(--accent); font-size: 0.92rem; }
.point-section h3, .resume-bilan h3 { margin: 0.6rem 0 0.25rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-doux); }
.point-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; font-size: 0.9rem; }
.point-section li { overflow-wrap: anywhere; }
.point-section .heure { font-weight: 800; color: var(--accent); }
.point-section .compte { font-size: 0.75rem; color: var(--texte-doux); }
.point-section li.prio { border-left: 3px solid var(--q-urgent); padding-left: 0.45rem; }
.point-section li.prio.urgent_important { border-left-color: var(--q-urgent-important); }
.point-section .echeance { margin-left: 0.35rem; font-size: 0.78rem; }
.point-section .a-valider { margin-left: 0.4rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--proche); }
.point-propositions { margin: 0.6rem 0; font-weight: 700; font-size: 0.9rem; }
.bilan-soir { display: grid; gap: 0.6rem; }
.bilan-soir .question { display: grid; gap: 0.25rem; font-weight: 700; font-size: 0.9rem; }
.bilan-soir textarea { width: 100%; font: inherit; font-weight: 400; }
.resume-bilan p { margin: 0 0 0.6rem; font-size: 0.92rem; }

/* ---------- Tuiles façon Axonaut (dans les cartes) ---------- */

.case .liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.tache {
  padding: 0.7rem 0.8rem;
  background: var(--fond-2);
  border: 1px solid var(--bordure);
  border-left: 4px solid var(--couleur, var(--bordure-forte));
  border-radius: 10px;
}
.tache:last-child { border-bottom: 1px solid var(--bordure); }
.titre { font-weight: 600; }
.coche { border-color: var(--couleur, var(--accent)); }

.a-trier .propositions { gap: 0.8rem; }
.proposition {
  background: var(--fond-2);
  border: 1px solid var(--bordure);
  border-left: 4px solid var(--q, var(--bordure-forte));
  border-top: 1px solid var(--bordure);
  border-radius: 10px;
}
.prop-titre { font-family: var(--titre); font-size: 1.02rem; font-weight: 700; }
.badge-case { font-family: var(--titre); font-weight: 700; font-size: 0.8rem; color: var(--q); }
.fiche dt { color: var(--texte-doux); }
.ouvrir { color: var(--accent); }

.tickets { background: transparent; border: 0; border-radius: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
.ticket { background: var(--fond-2); border: 1px solid var(--bordure); border-radius: 10px; }
.ticket:nth-child(even) { background: var(--surface); }
.ticket + .ticket { border-top: 1px solid var(--bordure); }
.ticket-lien:hover { background: transparent; }
.ticket-numero { font-family: var(--titre); font-weight: 700; color: var(--accent); }
.ticket-titre { font-weight: 600; }
.ticket-place { font-family: var(--titre); }
.classement { border-radius: 999px; background: var(--surface); }
.classement button { border-radius: 999px; }

.evenement { padding: 0.45rem 0.7rem; border-radius: 10px; background: var(--fond-2); border: 1px solid var(--bordure); }
.agenda-liste { gap: 0.4rem; }
.evenement .heure { font-family: var(--titre); color: var(--accent); }

.faites li:not(.vide) { padding: 0.45rem 0.7rem; margin-bottom: 0.35rem; border: 1px solid var(--bordure); border-radius: 10px; background: var(--fond-2); }

.detail-tache summary, .menu-titre, .apercu-consigne, .apercu-champs label, .form-edition label { color: var(--accent); }
.point-date { font-family: var(--corps); font-style: normal; font-weight: 600; color: var(--texte-doux); }
.point-section .heure { color: var(--accent); }
.point-propositions { color: var(--succes); }
.apercu-saisie, .carte-connexion { border-top-color: var(--accent); border-radius: var(--rayon); }
.apercu-titre, .form-edition h2, .carte-connexion h1 { font-family: var(--titre); }
.form-code input { font-family: var(--titre); }
.message { border-radius: 999px; }
dialog { border-radius: var(--rayon); border: 0; box-shadow: var(--ombre-carte); }

@media (max-width: 600px) {
  .carte { padding: 0 1rem 1rem; }
  .picto { width: 64px; height: 58px; }
  .picto svg { width: 26px; height: 26px; }
  .carte > h2, .bloc.carte > h2 { min-height: 58px; padding: 0.7rem 0 0 calc(64px + 0.7rem); font-size: 1rem; }
  .ticket-action { padding: 0 0.7rem 0.6rem; }
}
@media (min-width: 760px) {
  /* Titre du ticket sur sa propre ligne, informations dessous : il n'est plus écrasé par les boutons. */
  .ticket-corps { flex-wrap: wrap; row-gap: 0.1rem; }
  .ticket .ticket-titre { flex: 1 1 100%; white-space: normal; overflow: visible; }
}

/* ---------- Connexion et code : écran d'accueil de l'ancien Pilot (astronaute, fond crème) ---------- */

.page-connexion { min-height: 100vh; display: block; padding: 0; background: var(--creme); color: var(--brun-texte); }
.accueil {
  width: min(28rem, 100%); min-height: 100vh; margin: 0 auto; padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.accueil-marque { display: flex; flex-direction: column; align-items: center; }
.astronaute { height: min(42vh, 22rem); width: auto; animation: descente 0.6s ease-out both; }
.mot-pilot {
  margin-top: 1.2rem; font-family: var(--pilot); font-weight: 900; font-size: clamp(3.5rem, 12vw, 4.5rem); line-height: 1;
  color: var(--brun); animation: monte 0.5s 0.3s ease-out both;
}
.accroche { max-width: 20rem; margin: 0.8rem 0 0; font-size: 0.8rem; line-height: 1.6; animation: apparait 0.4s 0.55s ease-out both; }
.accueil-actions { width: 100%; display: grid; gap: 0.75rem; margin-top: 1.6rem; }
.accueil-actions > * { animation: monte 0.35s ease-out both; }
.accueil-actions > :nth-child(1) { animation-delay: 0.7s; }
.accueil-actions > :nth-child(2) { animation-delay: 0.78s; }
.accueil-actions > :nth-child(3) { animation-delay: 0.86s; }
.accueil-actions > :nth-child(n+4) { animation-delay: 0.94s; }
.bouton-or, button.bouton-or {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.8rem 1rem; border: 0; border-radius: 12px;
  background: var(--or); color: #fff; font-family: var(--corps); font-weight: 600; font-size: 0.95rem; text-decoration: none;
  box-shadow: 0 1px 2px rgb(92 54 36 / 0.15); cursor: pointer; transition: transform 0.15s, background 0.15s;
}
.bouton-or:hover, button.bouton-or:hover:not(:disabled) { background: var(--or-fonce); color: #fff; border: 0; transform: scale(1.02); }
.bouton-or:active { transform: scale(0.98); }
.bouton-or svg { width: 1.05rem; height: 1.05rem; }
.page-connexion .note { font-size: 0.72rem; color: rgb(92 69 48 / 0.7); }
.page-connexion .alerte { border-radius: 10px; background: #fdecee; color: #9f1d32; border: 1px solid #f6c8cf; text-align: left; }
.page-connexion button.lien { color: var(--brun-texte); justify-self: center; }

/* Code à 6 chiffres : astronaute plus petit pour laisser la place au QR code. */
.accueil-code .astronaute { height: min(22vh, 10rem); }
.accueil-code .mot-pilot { margin-top: 0.6rem; font-size: 2.8rem; }
.accueil-code .accueil-actions { margin-top: 1.2rem; text-align: left; }
.accueil-code .etapes, .accueil-code .secret-manuel { color: var(--brun-texte); }
.accueil-code #consigne { margin: 0; text-align: center; }
.form-code { display: flex; gap: 0.5rem; }
.form-code input { flex: 1; font-family: var(--titre); font-size: 1.4rem; letter-spacing: 0.18em; text-align: center; border-radius: 12px; border-color: rgb(201 168 91 / 0.5); background: #fff; color: var(--brun); }
.form-code input:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgb(201 168 91 / 0.25); }
.form-code .bouton-or { flex: none; }

@keyframes descente { from { opacity: 0; transform: translateY(-20px) scale(0.92); } }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
@keyframes apparait { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .astronaute, .mot-pilot, .accroche, .accueil-actions > * { animation: none; }
}
@media (prefers-color-scheme: dark) {
  .page-connexion { --creme: #1c1916; --brun: #f1e6d6; --brun-texte: #cbbba6; }
  .form-code input { background: #26221e; }
}

/* ---------- Rubriques ---------- */

[data-vues][hidden] { display: none !important; }

/* Tableau de bord : chiffres clés en haut, priorités et agenda côte à côte, puis matrice et point du jour. */
body[data-vue="tableau"] main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-vue="tableau"] #zone-chiffres,
body[data-vue="tableau"] #zone-matrice,
body[data-vue="tableau"] #zone-point { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  body[data-vue="tableau"] main { grid-template-columns: minmax(0, 1fr); }
}

/* Chiffres clés, façon « Indicateurs clés » d'Axonaut */
.chiffres { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.chiffre {
  display: grid; gap: 0.15rem; padding: 1rem 1.2rem;
  background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre-carte);
  color: var(--texte); text-decoration: none; border: 1px dashed transparent; transition: border-color 0.15s, transform 0.15s;
}
.chiffre:hover { border-color: var(--bordure-forte); transform: translateY(-2px); }
.chiffre-valeur { font-family: var(--titre); font-size: 2rem; font-weight: 600; line-height: 1.1; color: var(--succes); }
.chiffre[data-chiffre="maintenant"] .chiffre-valeur { color: var(--q-urgent-important); }
.chiffre[data-chiffre="a-trier"] .chiffre-valeur { color: var(--tuile-a-trier, #7a4fe0); }
.chiffre[data-chiffre="tickets"] .chiffre-valeur { color: var(--q-important); }
.chiffre[data-chiffre="rdv"] .chiffre-valeur { color: var(--tuile-rdv, #0a9bc9); }
.chiffre.retard .chiffre-valeur { color: var(--danger); }
.chiffre.nul .chiffre-valeur { color: var(--texte-doux); }
.chiffre-libelle { font-size: 0.85rem; font-weight: 600; color: var(--texte-doux); }

/* Priorités du jour */
.priorites .picto { --degrade: var(--degrade-urgent-important); }
.priorites-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.priorite {
  display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.6rem 0.8rem;
  background: var(--fond-2); border: 1px solid var(--bordure); border-left: 4px solid var(--q); border-radius: 10px;
}
.priorite .coche { --couleur: var(--q); }
.priorite .titre { color: inherit; text-decoration: none; }
.priorite .titre:hover { text-decoration: underline; }
.priorite .rdv { font-size: 0.85rem; font-weight: 700; color: var(--q-important); }

/* ---------- Barre latérale : lien actif, compteurs, punaise ---------- */

.menu-lateral a { position: relative; }
.menu-lateral a.actif { background: var(--marque-fonce); font-weight: 700; }
.menu-lateral a.actif::after {
  content: ''; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border: 9px solid transparent; border-right-color: var(--fond);
}
.badge:not(:empty) {
  margin-left: auto; min-width: 1.4rem; padding: 0 0.4rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.22); font-family: var(--corps); font-size: 0.75rem; font-weight: 700; text-align: center;
}
.epingle {
  margin-top: auto; display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem; border: 0; border-top: 1px solid rgb(255 255 255 / 0.12); border-radius: 0;
  background: transparent; color: inherit; font-family: var(--titre); font-weight: 500; font-size: 0.85rem; text-align: left;
}
.epingle:hover:not(:disabled) { background: var(--marque-fonce); color: inherit; border-color: rgb(255 255 255 / 0.12); }
.epingle svg { width: 18px; height: 18px; flex: none; transition: transform 0.2s; }
.epingle[aria-pressed="false"] svg { transform: rotate(45deg); opacity: 0.75; }

/* Réduite : colonne d'icônes de 64 px, qui s'ouvre par-dessus la page au survol ou au clavier. */
@media (min-width: 901px) {
  body.barre-reduite .appli { grid-template-columns: 64px minmax(0, 1fr); }
  body.barre-reduite .contenu { grid-column: 2; }
  body.barre-reduite .barre-laterale {
    position: fixed; left: 0; top: 0; z-index: 30; width: 64px; overflow: hidden;
    transition: width 0.18s ease, box-shadow 0.18s ease;
  }
  /* Ouverte au survol, ou au clavier (focus visible) ; pas juste après un clic sur la punaise. */
  body.barre-reduite:not(.vient-de-reduire) .barre-laterale:is(:hover, :has(:focus-visible)) { width: 200px; box-shadow: 8px 0 30px rgb(0 0 0 / 0.18); }
  body.barre-reduite .barre-laterale:not(:hover):not(:has(:focus-visible)) :is(.libelle, .logo-texte, .badge),
  body.barre-reduite.vient-de-reduire .barre-laterale :is(.libelle, .logo-texte, .badge) { display: none; }
  body.barre-reduite .barre-laterale:not(:hover):not(:has(:focus-visible)) .logo-rond,
  body.barre-reduite.vient-de-reduire .barre-laterale .logo-rond { width: 42px; height: 42px; box-shadow: none; }
  body.barre-reduite .barre-laterale:not(:hover):not(:has(:focus-visible)) .logo,
  body.barre-reduite.vient-de-reduire .barre-laterale .logo { padding: 1rem 0.5rem 0.4rem; }
  body.barre-reduite .barre-laterale:not(:hover):not(:has(:focus-visible)) a.actif::after,
  body.barre-reduite.vient-de-reduire .barre-laterale a.actif::after { display: none; }
  .menu-lateral a, .epingle { white-space: nowrap; }
}
@media (max-width: 900px) {
  .epingle { display: none; }
  .badge:not(:empty) { margin-left: 0.25rem; }
  .menu-lateral a.actif::after { display: none; }
  .menu-lateral a.actif { box-shadow: inset 0 -3px 0 #fff; }
}
@media (max-width: 600px) {
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .chiffre { padding: 0.7rem 0.85rem; }
  .chiffre-valeur { font-size: 1.6rem; }
  .chiffre-libelle { font-size: 0.78rem; line-height: 1.3; }
}


/* Cases de la matrice : liseré et fond teintés de leur couleur, pour les repérer d'un coup d'œil. */
.case { border-top: 5px solid var(--couleur); background: color-mix(in srgb, var(--couleur) 7%, var(--surface)); }
.case .picto { top: -5px; }
.case > h2 { color: color-mix(in srgb, var(--couleur) 70%, var(--texte)); }
.case .tache { background: var(--surface); }

/* Envois du point (mail, Teams) */
.envois { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px dashed var(--bordure-forte); }
.envois-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.85rem; color: var(--texte-doux); }
.envois-liste li::before { content: '●'; margin-right: 0.35rem; font-size: 0.7em; vertical-align: 0.1em; color: var(--bordure-forte); }
.envois-liste li.ok::before { color: var(--succes); }
.envois-liste li.echec { color: var(--danger); }
.envois-liste li.echec::before { color: var(--danger); }
.envois-liste strong { color: var(--texte); }

/* ---------- Matrice plus lisible : bandeaux pleins et axes urgent / important ---------- */

.case { padding: 0 0 1rem; border-top: 0; overflow: hidden; }
.case > h2, .bloc.carte.case > h2, .carte.case > h2 {
  min-height: 68px; align-content: center; margin: 0 0 0.8rem; padding: 0.6rem 1.1rem 0.6rem calc(56px + 1.1rem);
  background: var(--degrade-case, var(--couleur)); color: #fff;
  position: relative;
}
.case[data-quadrant="urgent_important"] { --degrade-case: var(--degrade-urgent-important); }
.case[data-quadrant="important"] { --degrade-case: var(--degrade-important); }
.case[data-quadrant="urgent"] { --degrade-case: var(--degrade-urgent); }
.case[data-quadrant="attendre"] { --degrade-case: var(--degrade-attendre); }
.case .picto {
  top: 0; width: 56px; height: 68px; z-index: 1;
  background: rgb(0 0 0 / 0.14); clip-path: none; border-radius: 0;
}
.case .picto svg { width: 26px; height: 26px; }
.case > h2 .nombre { background: rgb(255 255 255 / 0.28); color: #fff; }
.case > h2 em { color: rgb(255 255 255 / 0.9); }
.case .liste { padding: 0 1.1rem; }

/* Axes : « Urgent / Pas urgent » en haut, « Important / Pas important » sur le côté. */
.axe { display: none; }
@media (min-width: 760px) {
  .matrice {
    grid-template-columns: 2.2rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      ".           urgent  pas-urgent"
      "important   ui      i"
      "pas-imp     u       a";
    gap: 0.6rem 1.25rem;
  }
  .axe {
    display: flex; align-items: center; justify-content: center;
    font-family: var(--titre); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--texte-doux);
  }
  .axe-urgent { grid-area: urgent; }
  .axe-pas-urgent { grid-area: pas-urgent; }
  .axe-important { grid-area: important; }
  .axe-pas-important { grid-area: pas-imp; }
  .axe-urgent, .axe-pas-urgent { border-bottom: 2px solid var(--bordure-forte); padding-bottom: 0.3rem; }
  .axe-important, .axe-pas-important { border-right: 2px solid var(--bordure-forte); }
  .axe-important span, .axe-pas-important span { writing-mode: vertical-rl; transform: rotate(180deg); }
  .case[data-quadrant="urgent_important"] { grid-area: ui; }
  .case[data-quadrant="important"] { grid-area: i; }
  .case[data-quadrant="urgent"] { grid-area: u; }
  .case[data-quadrant="attendre"] { grid-area: a; }
}
@media (max-width: 759px) {
  /* Sans les axes, le sous-titre de chaque case dit où l'on est. */
  .case > h2 em { display: block; }
}

/* ---------- Fiche d'une tâche ---------- */

.completer { justify-self: start; margin-top: 0.3rem; font-size: 0.82rem; }
.completer.a-completer { color: var(--danger); }
.completer.a-completer::before { content: '● '; font-size: 0.7em; vertical-align: 0.1em; }
.etapes-tache ul { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.15rem; font-size: 0.88rem; }
.etapes-tache li.faite label { text-decoration: line-through; color: var(--texte-doux); }
.etapes-tache input { accent-color: var(--accent); }
.notes-tache { margin: 0.4rem 0 0; font-size: 0.88rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--texte); }
.liens-tache { margin: 0.3rem 0 0; padding-left: 1.1rem; font-size: 0.88rem; }
.liens-tache a { color: var(--accent); }

dialog.dialogue-fiche { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 1.4rem 1.5rem; overflow-y: auto; }
.form-fiche { display: grid; gap: 1rem; }
.form-fiche h2 { font-family: var(--titre); font-size: 1.2rem; text-transform: uppercase; }
.form-fiche h3 { margin: 0 0 0.4rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-doux); }
.champ-fiche { display: grid; gap: 0.25rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.champ-fiche > :is(input, textarea) { font-size: 0.95rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--texte); }
.champ-fiche small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--texte-doux); }
.fiche-grille { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fiche-bloc { padding-top: 0.8rem; border-top: 1px dashed var(--bordure-forte); display: grid; gap: 0.5rem; }
.fiche-bloc textarea, .form-fiche input:not([type=checkbox]) { width: 100%; }
.fiche-etapes, .fiche-liens { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.fiche-etapes li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: center; }
.fiche-liens li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 0.5rem; align-items: center; }
.fiche-etapes input[type=checkbox] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
.puces { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.puce { padding: 0.2rem 0.65rem; font-size: 0.8rem; font-weight: 600; background: var(--fond-2); }
input.propose { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.fiche-ia:empty { display: none; }
.fiche-ia { padding: 0.7rem 0.9rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-size: 0.9rem; }
.fiche-ia p { margin: 0.15rem 0; }
.question-ia { font-weight: 700; color: var(--accent-fonce); }
.memoire-bloc { background: var(--fond-2); border-radius: 10px; padding: 0.8rem; border-top: 0; }
.form-fiche .actions { flex-wrap: wrap; }
@media (max-width: 600px) {
  .fiche-liens li { grid-template-columns: 1fr auto; }
  .fiche-liens li input:first-child { grid-column: 1 / -1; }
}

/* Rubrique Mémoire */
.memoire .picto { --degrade: var(--degrade-violet); }
.liste-memoire { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.fiche-memoire { display: grid; gap: 0.45rem; padding: 0.8rem 0.9rem; background: var(--fond-2); border: 1px solid var(--bordure); border-radius: 10px; }
.fiche-memoire-entete { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; }
.fiche-memoire textarea { width: 100%; }
