/* Organisation, v2 : une feuille de style unique.
 * Trois idées : la saisie est le geste principal ; ce qui apparaît sur une carte est
 * un signal ; tout se fait au clavier sur ordinateur et au pouce sur téléphone. */

:root {
  --fond: oklch(98.2% .004 255);
  --surface: #fff;
  --surface-2: oklch(96.2% .006 255);
  --surface-3: oklch(93.5% .008 255);
  --texte: oklch(23% .02 265);
  --texte-2: oklch(47% .02 265);
  --texte-3: oklch(63% .015 265);
  --bord: oklch(91.5% .008 255);
  --bord-fort: oklch(84% .01 255);
  --accent: oklch(54% .19 264);
  --accent-fort: oklch(48% .2 264);
  --accent-doux: oklch(95.5% .03 264);
  --accent-texte: #fff;
  --alerte: oklch(55% .2 27);
  --alerte-doux: oklch(96% .03 27);
  --attention: oklch(58% .14 65);
  --attention-doux: oklch(96.5% .04 80);
  --ok: oklch(55% .13 150);
  --ok-doux: oklch(96% .04 150);
  --ombre-1: 0 1px 2px oklch(20% .02 265 / .06), 0 1px 1px oklch(20% .02 265 / .03);
  --ombre-2: 0 4px 12px oklch(20% .02 265 / .08), 0 1px 3px oklch(20% .02 265 / .06);
  --ombre-3: 0 18px 50px oklch(20% .02 265 / .18), 0 4px 12px oklch(20% .02 265 / .08);
  --rayon-1: 6px;
  --rayon-2: 10px;
  --rayon-3: 14px;
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --vite: 140ms;
  --doux: 220ms;
  --courbe: cubic-bezier(.2, .8, .2, 1);
  --barre-basse: 0px;
  --clavier: 0px;
  --hauteur-capture: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: oklch(17% .008 265);
    --surface: oklch(21.5% .01 265);
    --surface-2: oklch(25% .012 265);
    --surface-3: oklch(29% .014 265);
    --texte: oklch(94% .005 265);
    --texte-2: oklch(75% .012 265);
    --texte-3: oklch(60% .012 265);
    --bord: oklch(30% .012 265);
    --bord-fort: oklch(38% .014 265);
    --accent: oklch(70% .15 264);
    --accent-fort: oklch(76% .13 264);
    --accent-doux: oklch(30% .06 264);
    --accent-texte: oklch(18% .03 265);
    --alerte: oklch(72% .16 27);
    --alerte-doux: oklch(28% .06 27);
    --attention: oklch(78% .13 75);
    --attention-doux: oklch(28% .05 75);
    --ok: oklch(75% .13 150);
    --ok-doux: oklch(27% .05 150);
    --ombre-1: none;
    --ombre-2: 0 4px 14px oklch(0% 0 0 / .35);
    --ombre-3: 0 20px 60px oklch(0% 0 0 / .55);
    color-scheme: dark;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root { --vite: 0ms; --doux: 0ms; }
}

/* --- Base -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select, textarea { background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon-1); padding: 6px 9px; max-width: 100%; min-height: 32px; transition: border-color var(--vite), box-shadow var(--vite); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent); }
textarea { resize: vertical; }
input[type="checkbox"] { min-height: 0; accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }
.petit { font-size: 12px; color: var(--texte-2); }
.aide { color: var(--texte-2); }
code { font-family: var(--mono); font-size: 12.5px; }
.icone { width: 18px; height: 18px; flex: none; }
.icone.mini { width: 13px; height: 13px; }
.touche { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 5px; font: 600 11px/1 var(--mono); color: var(--texte-2); background: var(--surface); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sur iPhone, Safari agrandit la page quand on touche un champ en dessous de 16 px : on l'évite. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; min-height: 40px; }
}

/* --- Boutons ------------------------------------------------------------------------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; border: 1px solid var(--bord-fort); background: var(--surface); border-radius: var(--rayon-1); padding: 5px 12px; text-decoration: none; color: var(--texte); font-weight: 500; transition: background var(--vite), border-color var(--vite), transform var(--vite); white-space: nowrap; }
.bouton:hover { background: var(--surface-2); }
.bouton:active { transform: scale(.98); }
.bouton-principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton-principal:hover { background: var(--accent-fort); border-color: var(--accent-fort); }
.bouton-large { width: 100%; padding: 12px; font-size: 16px; }
.bouton-discret, .bouton-texte { border: 0; background: transparent; color: var(--texte-2); padding: 5px 8px; border-radius: var(--rayon-1); min-height: 30px; display: inline-flex; align-items: center; gap: 6px; }
.bouton-discret:hover, .bouton-texte:hover { background: var(--surface-2); color: var(--texte); }
.bouton-danger { color: var(--alerte); }
.bouton-icone { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: transparent; color: var(--texte-2); border-radius: var(--rayon-1); padding: 0; }
.bouton-icone:hover { background: var(--surface-2); color: var(--texte); }
.petit-bouton { height: 26px; min-height: 26px; font-size: 12px; }
.bouton-icone.petit-bouton { width: 26px; font-size: 16px; }
.bouton .touche, .bouton-texte .touche { margin-left: 2px; }
.bouton-principal .touche { background: transparent; color: inherit; border-color: color-mix(in oklch, var(--accent-texte) 45%, transparent); }
.boutons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.boutons .ecart { flex: 1; }
@media (pointer: coarse) {
  .bouton, .bouton-discret, .bouton-texte { min-height: 40px; }
  .bouton-icone { width: 40px; height: 40px; }
}

/* --- Pages de compte (inchangées sur le fond) ------------------------------------------ */
.page-compte .feuille { max-width: 560px; margin: 32px auto; padding: 24px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-3); box-shadow: var(--ombre-2); }
.page-compte .marque { font-weight: 700; margin: 0 0 16px; }
.page-compte .marque a { color: var(--texte); text-decoration: none; }
.formulaire p { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.formulaire input { width: 100%; padding: 10px; }
.formulaire ul.errorlist, .errorlist { color: var(--alerte); padding-left: 18px; }
.messages { list-style: none; padding: 0; }
.messages li { padding: 8px 12px; border-radius: var(--rayon-1); background: var(--surface-2); margin-bottom: 6px; }
.message-error { background: var(--alerte-doux) !important; color: var(--alerte); }
.alerte { background: var(--attention-doux); border: 1px solid color-mix(in oklch, var(--attention) 50%, transparent); border-radius: var(--rayon-2); padding: 12px; margin: 8px 0; }
.liste-etat li { margin-bottom: 6px; }
.tableau-simple { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tableau-simple th, .tableau-simple td { text-align: left; border-bottom: 1px solid var(--bord); padding: 8px 6px; vertical-align: top; }
.tableau-simple td.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pied-compte { margin-top: 24px; font-size: 14px; color: var(--texte-2); }
.page-compte textarea { display: block; width: 100%; margin: 6px 0; font-family: var(--mono); }

/* --- La coquille de l'app : tout tient dans l'écran, chaque zone défile seule ------------- */
.page-app { overflow: hidden; }
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }

.entete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 50px; padding: 0 12px; border-bottom: 1px solid var(--bord); background: var(--fond); }
.entete-gauche, .entete-droite { display: flex; align-items: center; gap: 6px; min-width: 0; }
.marque { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--texte); color: var(--fond); font-weight: 800; font-size: 14px; margin-right: 6px; }
.onglets { display: flex; gap: 2px; }
.onglets button { border: 0; background: transparent; padding: 6px 10px; border-radius: var(--rayon-1); color: var(--texte-2); font-weight: 500; }
.onglets button:hover { color: var(--texte); background: var(--surface-2); }
.onglets button[aria-current="page"] { color: var(--texte); background: var(--surface-3); }
.donner-un-retour { color: var(--accent); }
.entete-droite [data-vue="reglages"][aria-current="page"] { color: var(--texte); background: var(--surface-3); }
.etat-reseau { font-size: 12px; color: var(--texte-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.etat-reseau:empty { display: none; }
.etat-reseau.hors-ligne { color: var(--attention); font-weight: 600; }
.etat-reseau.hors-ligne::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Les chronomètres : une pastille vivante par chronomètre */
.chronos { display: flex; gap: 6px; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.chrono { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--ok-doux); color: var(--texte); font-size: 12.5px; white-space: nowrap; max-width: 260px; }
.chrono::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: battement 1.6s ease-in-out infinite; flex: none; }
.chrono-libelle { overflow: hidden; text-overflow: ellipsis; }
.chrono .duree { font-variant-numeric: tabular-nums; color: var(--texte-2); }
.chrono button { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--texte-2); padding: 0; }
.chrono button:hover { background: color-mix(in oklch, var(--ok) 20%, transparent); color: var(--texte); }
.chrono.en-attente { background: var(--surface-2); }
.chrono.en-attente::before { background: var(--texte-3); animation: none; }
.chrono.en-pause { background: var(--surface-2); }
.chrono.en-pause::before { background: var(--attention); animation: none; }
@keyframes battement { 50% { opacity: .35; } }

/* --- Le haut : la saisie, ce qu'il y a à valider, les récurrentes ------------------------ */
.haut { flex: none; padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; }

.capture { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 14px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 22px; box-shadow: var(--ombre-1); transition: border-color var(--vite), box-shadow var(--vite); max-width: 920px; width: 100%; margin: 0 auto; }
.capture:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent), var(--ombre-2); }
.capture textarea { flex: 1; border: 0; box-shadow: none !important; background: transparent; padding: 6px 0; min-height: 30px; max-height: 30vh; resize: none; line-height: 1.45; field-sizing: content; white-space: pre-wrap; overflow-wrap: anywhere; }
.capture-touche { align-self: center; }
.capture:focus-within .capture-touche { display: none; }
.capture-micro { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); font-weight: 500; }
.capture-micro:hover { background: var(--surface-2); }
.capture-micro.en-cours { background: var(--alerte); border-color: var(--alerte); color: #fff; }
.capture-micro.en-cours .icone { animation: battement 1.2s ease-in-out infinite; }
.capture-envoyer { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-texte); padding: 0; transition: opacity var(--vite), transform var(--vite); }
.capture-envoyer:disabled { opacity: .35; cursor: default; }
.capture-envoyer:not(:disabled):active { transform: scale(.94); }

.bandeau { max-width: 920px; width: 100%; margin: 0 auto; background: var(--attention-doux); border: 1px solid color-mix(in oklch, var(--attention) 45%, transparent); border-radius: var(--rayon-2); padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.bandeau p { margin: 0; }
.mis-de-cote { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }

/* Les propositions de Haiku : lisibles d'un coup d'œil, modifiables au besoin */
.propositions { max-width: 920px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.proposition { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-3); box-shadow: var(--ombre-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.proposition.nouvelle { animation: arrivee var(--doux) var(--courbe); }
.proposition.en-attente { box-shadow: none; border-style: dashed; color: var(--texte-2); }
@keyframes arrivee { from { opacity: 0; transform: translateY(-4px); } }
.proposition-tete { display: flex; align-items: baseline; gap: 8px; }
.proposition-tete .dit { flex: 1; min-width: 0; color: var(--texte-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proposition-tete .dit.deplie { white-space: normal; }
.proposition-tete .dit q { font-style: italic; }
.chargement { display: inline-flex; gap: 3px; }
.chargement i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: battement 1s infinite; }
.chargement i:nth-child(2) { animation-delay: .15s; }
.chargement i:nth-child(3) { animation-delay: .3s; }

.question { display: flex; flex-direction: column; gap: 8px; background: var(--accent-doux); border-radius: var(--rayon-2); padding: 10px; }
.question-texte { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.question-texte .qui { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.echange { font-size: 13px; color: var(--texte-2); padding-left: 10px; border-left: 2px solid var(--bord-fort); }
.reponse { display: flex; gap: 6px; align-items: center; }
.reponse input { flex: 1; min-width: 0; }
.reponse .en-cours { background: var(--alerte); border-color: var(--alerte); color: #fff; }
.choix-rapides { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-rapides .petit { align-self: center; }

.actions-proposees { display: flex; flex-direction: column; gap: 4px; }
.action-ligne { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--rayon-2); background: var(--surface-2); }
.action-ligne.ecartee { opacity: .5; }
.action-ligne.ecartee .action-titre { text-decoration: line-through; }
.action-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); }
.action-corps { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.action-titre { font-weight: 600; overflow-wrap: anywhere; }
.action-editeur { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 6px 0 2px; }
.action-editeur label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--texte-2); }
.action-editeur .large { grid-column: 1 / -1; }
.action-editeur .jours { display: flex; gap: 10px; flex-wrap: wrap; flex-direction: row; }
.action-editeur .jours label { flex-direction: row; align-items: center; gap: 4px; }

/* Les puces : projet, date, durée... partout la même forme */
.puce { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--surface-3); color: var(--texte-2); font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 100%; }
.puce .point { width: 8px; height: 8px; border-radius: 50%; background: var(--couleur, var(--texte-3)); flex: none; }
.puce-retard { background: var(--alerte-doux); color: var(--alerte); font-weight: 600; }
.puce-proche { background: var(--attention-doux); color: var(--attention); }
.puce-essentiel { background: var(--alerte-doux); color: var(--alerte); }
.puce-accent { background: var(--accent-doux); color: var(--accent); }
.puce-ok { background: var(--ok-doux); color: var(--ok); }
button.puce { border: 0; cursor: pointer; }
button.puce:hover { filter: brightness(.96); }
button.puce[aria-pressed="true"] { background: var(--accent); color: var(--accent-texte); }
.puce-choix { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); font-size: 13px; }
.puce-choix:hover { background: var(--surface-2); }
.puce-choix[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
@media (pointer: coarse) { .puce-choix { height: 36px; padding: 0 14px; } }

/* La bande des récurrentes */
.recurrentes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; max-width: 920px; width: 100%; margin: 0 auto; }
.recurrentes:empty { display: none; }
.recurrentes .libelle { font-size: 12px; color: var(--texte-3); margin-right: 2px; }
.recurrente { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 8px; border: 1px solid var(--bord-fort); background: var(--surface); border-radius: 14px; font-size: 13px; user-select: none; transition: background var(--vite); }
.recurrente::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--texte-3); box-sizing: border-box; transition: all var(--vite); }
.recurrente[aria-checked="true"] { background: var(--ok-doux); border-color: transparent; color: var(--texte-2); }
.recurrente[aria-checked="true"]::before { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 2.5px var(--ok-doux); }
@media (pointer: coarse) { .recurrente { height: 36px; } }

/* --- Le tableau et Ma journée ------------------------------------------------------------- */
.vue-tableau { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.onglets-colonnes { display: none; }
.espace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.espace.sans-journee { grid-template-columns: minmax(0, 1fr); }
.espace.sans-journee .journee { display: none; }
.tableau { min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; padding: 8px 12px 12px; overflow-x: auto; min-height: 0; scrollbar-gutter: stable; }

.colonne { display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); border-radius: var(--rayon-3); transition: background var(--vite); }
.colonne-tete { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 12px; }
.colonne-nom { font-weight: 650; font-size: 13.5px; }
.colonne-compte { color: var(--texte-3); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.colonne-tete .espaceur { flex: 1; }
.colonne-tete .bouton-icone { width: 26px; height: 26px; color: var(--texte-3); }
.colonne-tete .bouton-icone:hover { color: var(--texte); background: var(--surface-3); }
.colonne-urgent .colonne-nom::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--alerte); margin-right: 7px; vertical-align: 1px; }
.definition { margin: 0 10px 6px; padding: 8px 10px; font-size: 12.5px; color: var(--texte-2); background: var(--surface); border-radius: var(--rayon-2); }
.ajout-rapide { margin: 0 8px 6px; }
.ajout-rapide input { width: 100%; background: transparent; border-color: transparent; box-shadow: none; }
.ajout-rapide input::placeholder { color: var(--texte-3); }
.ajout-rapide input:hover { background: var(--surface); }
.ajout-rapide input:focus { background: var(--surface); border-color: var(--accent); }
.jetons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.jetons:empty { display: none; }
.aide-saisie { display: none; margin: 5px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--texte-3); }
.ajout-rapide:focus-within .aide-saisie { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.aide-saisie code { font: inherit; font-weight: 600; color: var(--texte-2); }
.jetons .puce { cursor: pointer; }
.jetons .puce::after { content: "×"; margin-left: 2px; opacity: .6; }
.cartes { flex: 1; min-height: 40px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.cartes:empty { flex: none; min-height: 0; padding: 0; }
.colonne-vide { margin: 0 8px 10px; border: 1.5px dashed var(--bord-fort); border-radius: var(--rayon-2); padding: 14px 10px; text-align: center; color: var(--texte-3); font-size: 12.5px; }
.colonne:has(.carte) .colonne-vide { display: none; }

.carte { position: relative; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-2); padding: 8px 10px 8px 12px; box-shadow: var(--ombre-1); cursor: pointer; touch-action: manipulation; transition: border-color var(--vite), box-shadow var(--vite), transform var(--vite); }
/* La couleur du projet se voit d'un coup d'œil (retour de Romain sur la v2) : un bandeau plein
   à gauche, un fond teinté, et le nom du projet en étiquette. */
.carte::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 6px; border-radius: var(--rayon-2) 0 0 var(--rayon-2); background: var(--couleur, transparent); }
.carte[data-projet] { background: color-mix(in oklch, var(--couleur) 9%, var(--surface)); border-color: color-mix(in oklch, var(--couleur) 30%, var(--bord)); }
.carte[data-projet]:hover { border-color: color-mix(in oklch, var(--couleur) 55%, var(--bord)); }
.puce-projet { background: color-mix(in oklch, var(--couleur) 22%, var(--surface)); color: var(--texte); border-color: transparent; font-weight: 500; }
.carte:hover { border-color: var(--bord-fort); box-shadow: var(--ombre-2); }
.carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.carte.sortable-ghost { opacity: .35; }
.carte.sortable-chosen { box-shadow: var(--ombre-3); transform: rotate(1deg); }
.carte.secondaire .carte-titre { color: var(--texte-2); }
.carte-ligne { display: flex; align-items: flex-start; gap: 8px; }
.coche { position: relative; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--texte-3); background: transparent; padding: 0; display: grid; place-items: center; color: transparent; transition: all var(--vite); }
.coche::after { content: ""; position: absolute; inset: -9px; }
.coche:hover { border-color: var(--ok); color: var(--ok); }
.coche svg { width: 11px; height: 11px; }
.coche.faite { background: var(--ok); border-color: var(--ok); color: #fff; }
.carte-titre { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.drapeau { color: var(--alerte); flex: none; margin-top: 2px; }
.drapeau svg { width: 13px; height: 13px; display: block; }
.personnes { display: inline-flex; flex: none; }
.pastille { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 9.5px; font-weight: 700; color: #fff; background: hsl(var(--teinte, 210) 45% 46%); box-shadow: 0 0 0 2px var(--surface); }
.pastille + .pastille { margin-left: -5px; }
.carte-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 26px; }
.carte-meta:empty { display: none; }
.carte-meta .puce { height: 20px; font-size: 11.5px; padding: 0 7px; }
button.puce-sous { border: 0; cursor: pointer; }
.carte-survol { position: absolute; top: 5px; right: 5px; display: none; gap: 2px; background: var(--surface); border-radius: var(--rayon-1); box-shadow: var(--ombre-2); padding: 2px; }
.carte-survol .bouton-icone { width: 26px; height: 26px; }
.carte-survol .icone { width: 15px; height: 15px; }
@media (hover: hover) {
  .carte:hover .carte-survol { display: flex; }
}
.poignee-agenda { cursor: grab; touch-action: none; }
.sous-taches { margin: 6px 0 0 26px; display: flex; flex-direction: column; gap: 3px; cursor: default; }
.sous-tache { display: flex; align-items: center; gap: 7px; font-size: 13px; min-height: 24px; }
.sous-tache .coche { width: 15px; height: 15px; }
.sous-tache .coche svg { width: 9px; height: 9px; }
.sous-tache.faite .sous-tache-titre { text-decoration: line-through; color: var(--texte-3); }
.sous-tache-titre { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sous-taches input[type="text"] { width: 100%; font-size: 13px; padding: 4px 8px; min-height: 28px; }

/* Ma journée : l'agenda du jour à côté du tableau, pour y glisser les cartes */
.journee { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--bord); background: var(--surface); }
.journee-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 0; }
.journee-nav { display: inline-flex; align-items: center; gap: 2px; }
.journee-date { margin: 2px 12px 6px; }
.agenda-jour { flex: 1; min-height: 0; padding: 0 6px 6px; }
.erreurs-agenda { color: var(--attention); font-size: 12px; margin: 0 12px; }
.erreurs-agenda:empty { display: none; }

/* La page Agenda : les cartes à placer et la semaine */
.vue-agenda { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; flex: 1; min-height: 0; padding: 0; }
.a-placer { border-right: 1px solid var(--bord); padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.a-placer h2 { margin: 0; font-size: 15px; }
.a-placer h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); margin: 8px 0 2px; }
.a-placer p { margin: 0; }
.a-placer-liste { display: flex; flex-direction: column; gap: 6px; }
.a-placer-carte { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--bord); border-left: 3px solid var(--couleur, var(--bord)); border-radius: var(--rayon-1); background: var(--surface); cursor: grab; font-size: 13px; touch-action: none; }
.a-placer-carte span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.agenda-semaine-cadre { min-height: 0; overflow: hidden; padding: 8px 12px 12px; display: flex; flex-direction: column; }
#agenda-semaine { flex: 1; min-height: 0; }

/* FullCalendar habillé aux couleurs de l'app */
.fc { --fc-border-color: var(--bord); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2); --fc-today-bg-color: color-mix(in oklch, var(--accent) 5%, transparent); --fc-button-bg-color: var(--surface); --fc-button-border-color: var(--bord-fort); --fc-button-text-color: var(--texte); --fc-button-hover-bg-color: var(--surface-2); --fc-button-hover-border-color: var(--bord-fort); --fc-button-active-bg-color: var(--surface-3); --fc-button-active-border-color: var(--bord-fort); --fc-now-indicator-color: var(--alerte); --fc-event-border-color: transparent; font-size: 12.5px; }
.fc .fc-toolbar-title { font-size: 16px; font-weight: 650; }
.fc .fc-button { font-weight: 500; box-shadow: none !important; padding: 4px 10px; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: var(--texte); }
.fc .fc-col-header-cell-cushion { color: var(--texte-2); font-weight: 600; text-decoration: none; padding: 6px 4px; }
.fc .fc-timegrid-slot-label-cushion { color: var(--texte-3); font-size: 11px; }
.fc .fc-timegrid-slot { height: 2.1em; }
.fc-event { border-radius: 6px !important; padding: 1px 3px; box-shadow: var(--ombre-1); }
.fc-event.rendez-vous { background: var(--surface-3) !important; border: 0 !important; box-shadow: none; }
.fc-event.rendez-vous .fc-event-main { color: var(--texte-2) !important; }
.fc-event.creneau-fait { opacity: .5; }
.agenda-jour .fc-toolbar { display: none; }
.agenda-jour .fc .fc-col-header { display: none; }

/* --- Pages Temps, Archive, Réglages -------------------------------------------------------- */
.vue { flex: 1; min-height: 0; overflow-y: auto; }
.vue-page { padding: 20px 16px 48px; }
.vue-page > * { max-width: 960px; margin-left: auto; margin-right: auto; }
.vue-page h2 { font-size: 22px; margin: 4px auto 4px; letter-spacing: -.01em; }
.vue-page h3 { font-size: 14px; margin: 0 0 10px; }
.vue-page .sous-titre { color: var(--texte-2); margin-top: 0; margin-bottom: 18px; }
.bloc { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-3); padding: 16px; margin-bottom: 14px; }
.bloc > p:first-of-type { margin-top: 0; }
.grille-blocs { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-bottom: 14px; }
.grille-blocs .bloc { margin: 0; }
.chiffre { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.barre-total { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.barre-total i { display: block; height: 100%; background: var(--couleur, var(--accent)); border-radius: 3px; }
.segments { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: var(--rayon-2); gap: 2px; flex-wrap: wrap; }
.segments button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; color: var(--texte-2); font-weight: 500; }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1); }
.ligne-outils { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.ligne-formulaire { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 8px 0; }
.ligne-formulaire > label, .champ { display: flex; flex-direction: column; font-size: 12px; color: var(--texte-2); gap: 3px; }
.ligne-formulaire > label.large { flex: 1 1 260px; }
.ligne-formulaire > label.large input { width: 100%; }
.ligne-temps.remplacee td:first-child, .ligne-temps.remplacee td:nth-child(2) { text-decoration: line-through; color: var(--texte-3); }
.liste-reglages { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; }
.liste-reglages li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.liste-reglages li:last-child { border-bottom: 0; }
.liste-reglages input[type="color"], .ligne-formulaire input[type="color"] { width: 36px; height: 32px; padding: 2px; }
.champ-secret { -webkit-text-security: disc; }
.recherche-archive { width: 100%; margin-bottom: 12px; }
.archive-ligne { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--bord); }
.archive-ligne .titre { flex: 1; min-width: 0; }
.vide { color: var(--texte-3); padding: 20px 0; text-align: center; }

/* --- Panneau de carte : à droite sur ordinateur, en feuille sur téléphone --------------------- */
dialog { color: var(--texte); }
.panneau { overflow-y: auto; overscroll-behavior: contain; margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); border: 0; border-left: 1px solid var(--bord); padding: 0; background: var(--surface); box-shadow: var(--ombre-3); }
.panneau::backdrop { background: oklch(20% .02 265 / .25); }
.panneau-contenu { display: flex; flex-direction: column; min-height: 100%; }
.panneau-contenu > form.panneau-contenu { flex: 1; min-height: 0; }
.panneau-tete { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--bord); }
.panneau-tete .espaceur { flex: 1; }
.enregistre { font-size: 12px; color: var(--texte-3); transition: opacity var(--doux); }
.enregistre.vu { color: var(--ok); }
.panneau-corps { padding: 14px 18px 24px; display: flex; flex-direction: column; gap: 14px; outline: none; }
.titre-carte { width: 100%; font-size: 20px; font-weight: 650; letter-spacing: -.01em; border: 1px solid transparent; background: transparent; padding: 4px 6px; margin-left: -6px; resize: none; field-sizing: content; min-height: 0; line-height: 1.3; overflow-wrap: anywhere; }
.titre-carte:hover { background: var(--surface-2); }
.titre-carte:focus { background: var(--surface); }
.colonnes-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.proprietes { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.proprietes > .nom { font-size: 12.5px; color: var(--texte-2); min-height: 32px; display: flex; align-items: center; }
.proprietes > .valeur { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; }
.proprietes select, .proprietes input[type="date"], .proprietes input[type="number"] { min-width: 0; }
.proprietes input[type="number"] { width: 90px; }
.saisie-du-temps { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; }
.saisie-du-temps .boutons { margin: 0; align-items: center; }
.personnes-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.description { width: 100%; min-height: 90px; field-sizing: content; max-height: 50vh; }
.section-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.liste-sous-taches { display: flex; flex-direction: column; gap: 2px; }
.liste-sous-taches .sous-tache { min-height: 34px; padding: 0 4px; border-radius: var(--rayon-1); }
.liste-sous-taches .sous-tache:hover { background: var(--surface-2); }
.liste-sous-taches .sous-tache .bouton-discret { font-size: 12px; min-height: 26px; padding: 2px 6px; }
.liste-creneaux { display: flex; flex-direction: column; gap: 4px; }
.ligne-creneau { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ligne-creneau button.lien { background: none; border: 0; color: var(--accent); padding: 0; text-align: left; }
.panneau-pied { position: sticky; bottom: 0; margin-top: auto; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--bord); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.historique { font-size: 12px; color: var(--texte-2); max-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
details summary { cursor: pointer; color: var(--texte-2); font-size: 12.5px; }
.texte-demande { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); padding: 12px; border-radius: var(--rayon-2); max-height: 60vh; overflow: auto; font-family: var(--mono); }
.indice-clavier { font-size: 12px; color: var(--texte-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* --- Fenêtre ordinaire, palette de commandes ------------------------------------------------ */
.fenetre { border: 1px solid var(--bord); border-radius: var(--rayon-3); padding: 0; background: var(--surface); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); box-shadow: var(--ombre-3); }
.fenetre::backdrop, .palette::backdrop { background: oklch(20% .02 265 / .3); }
.fenetre-contenu { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.fenetre-contenu h2 { margin: 0; font-size: 17px; }
.fenetre-contenu p { margin: 0; }
.fenetre-contenu textarea { width: 100%; field-sizing: content; min-height: 110px; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.grille label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--texte-2); }
.choix-liste { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.choix-liste .bouton { justify-content: flex-start; white-space: normal; text-align: left; }
.raccourcis { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; font-size: 13.5px; }
.raccourcis dt { display: flex; gap: 4px; justify-content: flex-end; }
.raccourcis dd { margin: 0; color: var(--texte-2); }

.palette { margin: 12vh auto auto; border: 1px solid var(--bord); border-radius: var(--rayon-3); padding: 0; background: var(--surface); width: min(620px, calc(100vw - 24px)); box-shadow: var(--ombre-3); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--bord); border-radius: 0; padding: 14px 16px; font-size: 16px; box-shadow: none !important; }
.palette-liste { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-groupe { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); padding: 8px 10px 4px; }
.palette-element { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: var(--rayon-1); color: var(--texte); }
.palette-element .point { width: 8px; height: 8px; border-radius: 50%; background: var(--couleur, var(--texte-3)); flex: none; }
.palette-element .texte { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-element .petit { flex: none; }
.palette-element[aria-selected="true"] { background: var(--accent-doux); }
.palette-pied { border-top: 1px solid var(--bord); padding: 8px 12px; display: flex; gap: 14px; font-size: 12px; color: var(--texte-3); }

/* Entrées et sorties douces des fenêtres (ignorées si le mouvement est réduit) */
@media (prefers-reduced-motion: no-preference) {
  .fenetre, .palette { transition: opacity var(--doux) var(--courbe), transform var(--doux) var(--courbe), overlay var(--doux) allow-discrete, display var(--doux) allow-discrete; opacity: 0; transform: translateY(6px) scale(.985); }
  .fenetre[open], .palette[open] { opacity: 1; transform: none; }
  @starting-style { .fenetre[open], .palette[open] { opacity: 0; transform: translateY(6px) scale(.985); } }
  .panneau { transition: transform 260ms var(--courbe), overlay 260ms allow-discrete, display 260ms allow-discrete; transform: translateX(100%); }
  .panneau[open] { transform: none; }
  @starting-style { .panneau[open] { transform: translateX(100%); } }
  ::backdrop { transition: opacity var(--doux), overlay var(--doux) allow-discrete, display var(--doux) allow-discrete; }
}

/* --- Les messages, en bas, avec « Annuler » quand on peut défaire ------------------------------ */
.toasts { position: fixed; z-index: 50; left: 50%; bottom: calc(18px + var(--barre-basse) + var(--hauteur-capture) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 14px; border-radius: var(--rayon-2); background: oklch(25% .015 265); color: oklch(96% .005 265); box-shadow: var(--ombre-3); font-size: 13.5px; animation: arrivee var(--doux) var(--courbe); }
.toast.grave { background: var(--alerte); color: #fff; }
.toast button { border: 0; background: oklch(100% 0 0 / .12); color: inherit; font-weight: 600; padding: 4px 10px; border-radius: var(--rayon-1); }
.toast button:hover { background: oklch(100% 0 0 / .22); }
@media (prefers-color-scheme: dark) { .toast { background: oklch(92% .005 265); color: oklch(20% .015 265); } .toast button { background: oklch(0% 0 0 / .08); } }

/* --- La barre du bas : seulement sur téléphone ---------------------------------------------------- */
.barre-basse { display: none; }

/* --- Téléphone ---------------------------------------------------------------------------------- */
@media (max-width: 760px) {
  :root { --barre-basse: 56px; }
  .app { padding-bottom: calc(var(--barre-basse) + var(--hauteur-capture) + env(safe-area-inset-bottom)); }
  .app.clavier-ouvert { padding-bottom: calc(var(--hauteur-capture) + var(--clavier)); }
  .entete { height: 46px; padding: 0 8px 0 12px; }
  .onglets, .entete-droite [data-vue="reglages"], #basculer-journee, .donner-un-retour span { display: none; }
  .chrono { max-width: 46vw; }
  .haut { padding: 8px 10px 0; max-height: 52vh; }
  .capture { position: fixed; z-index: 30; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: calc(var(--barre-basse) + env(safe-area-inset-bottom) + 6px); width: auto; box-shadow: var(--ombre-2); }
  .app.clavier-ouvert .capture { bottom: calc(var(--clavier) + 6px); }
  .capture-touche, .capture-micro-texte { display: none; }
  .capture-micro { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .capture-envoyer { width: 40px; height: 40px; }
  .capture textarea { padding: 8px 0; }
  .onglets-colonnes { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px 6px; scrollbar-width: none; flex: none; }
  .onglets-colonnes::-webkit-scrollbar { display: none; }
  .onglets-colonnes button { flex: none; height: 32px; border: 1px solid var(--bord-fort); background: var(--surface); border-radius: 16px; padding: 0 12px; font-size: 13.5px; font-weight: 500; color: var(--texte-2); white-space: nowrap; }
  .onglets-colonnes button .n { color: var(--texte-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
  .onglets-colonnes button[aria-selected="true"] { background: var(--texte); border-color: var(--texte); color: var(--fond); }
  .onglets-colonnes button[aria-selected="true"] .n { color: inherit; opacity: .7; }
  .espace { grid-template-columns: minmax(0, 1fr); }
  .journee { display: none; }
  .tableau { grid-auto-columns: 100%; gap: 0; padding: 0; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .tableau::-webkit-scrollbar { display: none; }
  .colonne { scroll-snap-align: start; scroll-snap-stop: always; background: transparent; border-radius: 0; }
  .colonne-tete { padding: 2px 12px 4px; }
  .colonne-tete .colonne-compte { display: none; }
  .ajout-rapide { margin: 0 10px 6px; }
  .cartes { padding: 2px 10px 16px; gap: 8px; }
  .carte { padding: 11px 12px 11px 14px; }
  .coche { width: 22px; height: 22px; }
  .carte-meta { margin-left: 30px; }
  .sous-taches { margin-left: 30px; }
  .vue-agenda { grid-template-columns: minmax(0, 1fr); }
  .a-placer { display: none; }
  .agenda-semaine-cadre { padding: 6px 8px; }
  .vue-page { padding: 14px 12px 32px; }
  .vue-page h2 { font-size: 20px; }
  .proprietes { grid-template-columns: 100px minmax(0, 1fr); }
  .panneau { margin: auto 0 0; width: 100vw; max-width: 100vw; height: auto; max-height: 92dvh; border: 0; border-radius: 16px 16px 0 0; }
  .panneau-tete { border-radius: 16px 16px 0 0; }
  .panneau-tete::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--bord-fort); }
  .panneau-corps { padding: 12px 14px 20px; }
  .palette { margin-top: 8vh; }
  .indice-clavier, .touche { display: none; }
  .toast { font-size: 14px; }

  .barre-basse { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; height: calc(var(--barre-basse) + env(safe-area-inset-bottom)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: color-mix(in oklch, var(--fond) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--bord); }
  .barre-basse button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--texte-3); }
  .barre-basse button .icone { width: 22px; height: 22px; }
  .barre-basse button[aria-current="page"] { color: var(--accent); }
  .app.clavier-ouvert .barre-basse { display: none; }
  @media (prefers-reduced-motion: no-preference) {
    .panneau { transform: translateY(100%); }
    .panneau[open] { transform: none; }
    @starting-style { .panneau[open] { transform: translateY(100%); } }
  }
}

.boutons-ligne { display: inline-flex; gap: 2px; flex-wrap: wrap; }

/* Lot 2 : la vue Moi / Team, les sous-tâches données, l'historique, les membres d'un projet. */
.segments-vue { margin-left: auto; }
.segments-vue button { padding: 3px 12px; }
.reduites { display: flex; flex-direction: column; gap: 6px; margin: 6px 8px 0; }
.carte-reduite { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px dashed var(--bord-fort); border-radius: var(--rayon-2); background: var(--surface); font-size: 13px; }
.reduite-titre { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.select-mini { font-size: 12px; padding: 2px 6px; height: 26px; max-width: 110px; }
.historique .changement { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--bord); }
.historique .changement .bouton-discret { align-self: flex-start; }
.projet-reglage { flex-wrap: wrap; }
.projet-reglage .membres { flex-basis: 100%; align-items: center; }

/* L'écran d'accord du connecteur (lot 3). */
.accord fieldset { border: 1px solid var(--bord); border-radius: var(--rayon-2); padding: 10px 14px; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.accord legend { font-weight: 600; padding: 0 4px; }
.choix-droit { display: flex; gap: 10px; align-items: flex-start; }
.choix-droit input { width: auto; margin-top: 3px; flex: none; }
.accord .boutons { display: flex; gap: 8px; }

/* Lot 4 : l'Inbox et les tableaux en construction. */
.pastille-compte { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--accent-texte); font-size: 11px; font-weight: 600; line-height: 1; }
.barre-basse .pastille-compte { position: absolute; margin: -4px 0 0 2px; }
.ligne-inbox { border: 1px solid var(--bord); border-radius: var(--rayon-2); background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.ligne-inbox.a-moi { border-color: color-mix(in oklch, var(--accent) 45%, var(--bord)); }
.ligne-inbox.en-retard { border-color: var(--attention); background: var(--attention-doux); }
.ligne-inbox.avancee { padding: 8px 14px; background: transparent; }
.ligne-inbox-tete { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--texte-2); }
.ligne-inbox-titre { font-weight: 600; overflow-wrap: anywhere; }
.ligne-inbox-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.liste-inbox { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.echange-inbox { border-left: 3px solid var(--bord-fort); padding: 2px 0 2px 10px; font-size: 13.5px; }
.echange-inbox .qui { font-weight: 600; margin-right: 6px; }
.reponse-inbox { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.reponse-inbox input { flex: 1; min-width: 180px; }
.en-construction { max-width: 560px; color: var(--texte-2); }

/* v4 : les vues Moi, Business, Tech ; les états et leurs familles ; Important et Urgent ; les liens. */
.barre-de-vue { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 16px 0; max-width: 100%; }
.barre-de-vue .segments button { padding: 4px 10px; font-size: 12.5px; }
.barre-de-vue input[type="date"] { width: auto; padding: 3px 6px; font-size: 12.5px; }
.barre-de-vue:empty { display: none; }
.puce-etat { font-weight: 500; }
.famille-a_faire { background: var(--surface-2); }
.famille-en_cours { background: color-mix(in oklch, var(--accent) 16%, var(--surface)); }
.famille-termine { background: var(--ok-doux); }
.famille-abandonne { background: var(--surface-2); text-decoration: line-through; }
.carte.importance-forte { box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--attention) 55%, transparent), var(--ombre-1); }
.carte.fermee { opacity: .72; }
.carte.fermee .carte-titre { text-decoration: line-through; text-decoration-color: var(--texte-3); }
.colonne-fermee { background: color-mix(in oklch, var(--ok-doux) 40%, var(--fond)); }
.puce-bloque { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poids { width: 64px !important; padding: 2px 6px; }
.poids-libelle { margin-left: auto; white-space: nowrap; }
.liste-etats li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.liste-etats input[type="text"] { flex: 1; min-width: 140px; }
@media (max-width: 760px) {
  .barre-de-vue { padding: 6px 12px 0; }
}
.choix-tableau { display: none; }
.periode-choisie { display: inline-flex; gap: 6px; align-items: center; }
.periode-choisie[open] { display: flex; flex-wrap: wrap; }
.periode-choisie summary { cursor: pointer; list-style: none; }
@media (max-width: 760px) {
  .choix-tableau { display: block; flex-basis: 100%; }
  .barre-de-vue .bouton-discret { padding-left: 0; }
}
.filtre-agenda { display: flex; gap: 8px; align-items: center; padding: 0 0 8px; }
.carte.importance-faible .carte-titre { color: var(--texte-2); }
.puce-raison { background: var(--alerte-doux); color: var(--alerte); border-color: transparent; white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
/* La matrice 3 × 3 : trois lignes d'importance, trois colonnes d'urgence ; « J'attends » dessous. */
@media (min-width: 761px) {
  .tableau.en-matrice { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; grid-auto-rows: max-content; align-content: start; overflow-y: auto; }
  .tableau.en-matrice .colonne { min-height: 140px; max-height: 46vh; }
  .tableau.en-matrice #colonne-attends { grid-column: 1 / -1; }
}
.bilan { flex-basis: 100%; background: var(--surface-2); border-radius: var(--rayon-2); padding: 6px 10px; }
.bilan summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.bilan-corps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; padding: 8px 0 4px; }
.bilan-bloc h3 { font-size: 12.5px; margin: 0 0 4px; color: var(--texte-2); }
.bilan-bloc ul { margin: 0; padding-left: 16px; font-size: 13px; max-height: 180px; overflow-y: auto; }
.bilan-bloc p { margin: 0; font-size: 13px; }

.bilan-bloc button.lien { background: none; border: 0; box-shadow: none; color: var(--accent); padding: 0; min-height: 0; text-align: left; font: inherit; }
