/* Calembitude — styles propres à chaque écran. */

/* ===== Aujourd'hui : hero, arc, les Trois, listes, ajout ===== */
.hero { padding: var(--e-1) 0 var(--e-3); }
.hero-haut { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-3); }
.hero-date { font-size: var(--t-17); font-weight: 600; color: var(--encre-2); }
.hero-etat { font-size: var(--t-13); color: var(--encre-3); }

.arc { display: block; width: 100%; max-width: 520px; height: auto; margin: var(--e-2) auto 0; overflow: visible; }
.arc-piste { fill: none; stroke: var(--trait); stroke-width: 3; stroke-linecap: round; }
.arc-fait { fill: none; stroke: var(--soleil-arc); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1000; transition: stroke-dashoffset 600ms var(--courbe); }
.hero-boucle .arc-fait { stroke-width: 4; }
.arc-halo { fill: var(--soleil); opacity: 0.22; }
.arc-disque { fill: var(--soleil); stroke: var(--encre); stroke-width: 2; }
.arc-lune { fill: var(--encre-3); display: none; transform: translateY(-14px); }
.arc-zero .arc-fait { opacity: 0; }
.arc-avant .arc-disque, .arc-apres .arc-disque, .arc-avant .arc-halo, .arc-apres .arc-halo { display: none; }
.arc-avant .arc-lune, .arc-apres .arc-lune { display: block; }
.arc-heure { font-size: 12px; font-weight: 600; fill: var(--encre-3); font-variant-numeric: tabular-nums; }

.trois { margin-top: var(--e-2); }
.trois-message { color: var(--encre-2); padding: var(--e-3) 0 0 var(--e-1); }
.trois-message[hidden] { display: none; }
.hero-boucle .trois-message { color: var(--riziere); font-weight: 600; }
.trois-vide button { display: flex; align-items: center; gap: var(--e-3); width: 100%; min-height: 56px; text-align: left; color: var(--encre-3); font-size: var(--t-17); }
.trois-vide .coche-vide { width: 28px; height: 28px; margin-left: 8px; border-radius: 50%; border: 2px dashed var(--trait-fort); flex: none; }
.trois-vide button:hover { color: var(--encre-2); }

.section-pliable { width: 100%; text-align: left; }
.section-pliable .ic-20 { transition: transform var(--d-micro) var(--courbe); color: var(--encre-3); }
.section-pliable[aria-expanded='false'] .ic-20 { transform: rotate(-90deg); }
.section-compte { margin-left: auto; color: var(--encre-3); font-size: var(--t-13); }
.section-vide { padding: var(--e-2) var(--e-1); font-size: var(--t-15); }

.choisir-liste .ligne { width: 100%; text-align: left; }
.choisir-liste .ic-20 { color: var(--soleil-arc); }

/* le champ d'ajout, fixé au-dessus de la barre d'onglets */
.ecran:has(.ajout-hote) { padding-bottom: calc(var(--barre-nav) + var(--sur-securite-bas) + 120px); }
.ajout-hote { position: fixed; left: 0; right: 0; z-index: 9; padding: 0 var(--e-3); bottom: calc(var(--barre-nav) + var(--sur-securite-bas) + var(--e-2)); }
.ajout { max-width: 720px; margin: 0 auto; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-3); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1); }
.ajout-actif .ajout { border-color: var(--trait-fort); }
.ajout-apercu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px 0; }
.ajout-apercu:empty { display: none; }
.ajout-titre { font-weight: 600; margin-left: 4px; }
.ajout-ligne { display: flex; align-items: center; gap: var(--e-2); padding: 6px 6px 6px 16px; }
.ajout-champ { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; font-size: var(--t-17); }
.ajout-champ:focus { outline: none; }
.ajout-champ::placeholder { color: var(--encre-3); }
.ajout-bouton { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
@media (min-width: 1024px) {
  .ajout-hote { left: 88px; bottom: var(--e-6); padding: 0 var(--e-8); }
  .ecran:has(.ajout-hote) { padding-bottom: 140px; }
}

/* ===== feuille tâche ===== */
.feuille-formulaire .ligne-champ { margin-bottom: var(--e-3); }
.jours-semaine { display: flex; gap: var(--e-2); margin: calc(-1 * var(--e-1)) 0 var(--e-4); }
.jours-semaine.cache { display: none; }
.jours-semaine button { flex: 1; min-height: 40px; border-radius: var(--r-1); background: var(--papier-2); font-weight: 600; color: var(--encre-2); }
.jours-semaine button[aria-pressed='true'] { background: var(--jacaranda); color: var(--sur-jacaranda); }
.sous-taches li { display: flex; align-items: center; gap: var(--e-2); min-height: 40px; }
.sous-tache { display: flex; align-items: center; gap: var(--e-2); flex: 1; min-height: 40px; cursor: pointer; }
.sous-tache input { width: 20px; height: 20px; accent-color: var(--riziere); }
.sous-tache input:checked + span { color: var(--encre-2); text-decoration: line-through; text-decoration-color: var(--riziere); }
.sous-tache-ajout { display: flex; gap: var(--e-2); }
.sous-tache-ajout .btn { padding: 0 var(--e-3); }
.deplacer-groupe { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e-2); }
.deplacer-jours { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.deplacer-jours .btn { padding: 0 var(--e-3); }
.deplacer-autre { cursor: pointer; }

/* ===== réglages ===== */
.reglages-groupe { margin-top: var(--e-6); }
.reglages-groupe h2 { font-size: var(--t-13); font-weight: 600; color: var(--encre-3); margin-bottom: var(--e-2); }
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--papier-2); border-radius: var(--r-1); }
.segments button { min-height: 44px; border-radius: 8px; font-weight: 600; color: var(--encre-2); transition: background var(--d-micro), color var(--d-micro); }
.segments button[aria-pressed='true'] { background: var(--papier); color: var(--encre); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
/* lien seul dans un paragraphe : hauteur tactile de 44 px */
.lien-bloc { display: inline-flex; align-items: center; min-height: 44px; }
.reglages-deux { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e-3); }
.a-propos { color: var(--encre-2); line-height: 1.55; }
.a-propos p + p { margin-top: var(--e-2); }

/* ===== onboarding ===== */
.bienvenue { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--e-8) + var(--sur-securite-haut)) var(--e-6) calc(var(--e-6) + var(--sur-securite-bas)); max-width: 560px; margin: 0 auto; }
.bienvenue-etape { font-size: var(--t-13); color: var(--encre-3); font-weight: 600; }
.bienvenue h1 { font-size: var(--t-40); margin: var(--e-3) 0 var(--e-4); }
.bienvenue p { color: var(--encre-2); font-size: var(--t-17); line-height: 1.5; }
.bienvenue-liste { margin-top: var(--e-6); display: grid; gap: var(--e-4); }
.bienvenue-liste li { display: flex; gap: var(--e-3); align-items: flex-start; }
.bienvenue-liste .ic { color: var(--soleil-arc); margin-top: 2px; }
.bienvenue-liste strong { display: block; }
.bienvenue-liste span { color: var(--encre-2); }
.bienvenue-actions { margin-top: auto; padding-top: var(--e-8); display: grid; gap: var(--e-2); }

/* ===== habitudes ===== */
.hab { list-style: none; padding: var(--e-2) 0; }
.hab + .hab { border-top: 1px solid var(--trait); }
.hab-ligne { display: flex; align-items: center; gap: var(--e-2); min-height: 52px; }
.hab-ligne-haut { min-height: 40px; }
.hab-texte { flex: 1; min-width: 0; cursor: pointer; padding: var(--e-1) 0; }
.hab-nom { display: block; font-weight: 500; font-size: var(--t-17); }
.hab-sous { display: block; font-size: var(--t-13); color: var(--encre-3); }
.hab-tenue .hab-nom { color: var(--riziere); }
.hab-check.hab-tenue .coche { color: var(--riziere); }
.hab-check.hab-tenue .coche circle { fill: var(--riziere); }
.hab-check.hab-tenue .coche .coche-trait { stroke-dashoffset: 0; }
.hab.coche-anim .coche .coche-trait { transition: stroke-dashoffset var(--d-rature) var(--courbe) 40ms; }
.hab.coche-anim .hab-ligne { animation: rebond var(--d-rebond) var(--courbe); }
.hab-curseur { padding: 0 0 var(--e-1) 0; }
.hab-lancer { color: var(--soleil-texte); }
.hab-depasse .hab-nom { color: var(--laterite); }
.hab-item .hab-ok { color: var(--riziere); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--riziere-doux); }
.hab-item { cursor: pointer; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e-2); margin-bottom: var(--e-4); }
.stat { background: var(--papier-2); border-radius: var(--r-1); padding: var(--e-3); display: flex; flex-direction: column; gap: 2px; }
.stat-val { font-size: var(--t-24); font-weight: 700; letter-spacing: -0.01em; }
.stat-lib { font-size: var(--t-13); color: var(--encre-3); }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e-2); margin-top: var(--e-4); }
.detail-actions .btn { justify-content: flex-start; }
.onb-bloc { margin-top: var(--e-6); display: grid; gap: var(--e-2); }
.onb-titre { font-size: var(--t-17); font-weight: 700; }
.onb-champ { margin: 0; }

/* ===== focus ===== */
.focus { position: relative; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--e-3) + var(--sur-securite-haut)) var(--e-4) calc(var(--e-6) + var(--sur-securite-bas)); overflow: hidden; }
.focus-respiration { position: absolute; left: 50%; top: 42%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; background: var(--soleil); opacity: 0.06; pointer-events: none; animation: respiration 6s ease-in-out infinite; }
.focus-pause-etape .focus-respiration { background: var(--jacaranda); }
.focus-en-pause .focus-respiration { animation-play-state: paused; }
@keyframes respiration { 0%, 100% { opacity: 0.05; transform: scale(0.96); } 50% { opacity: 0.11; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .focus-respiration { animation: none; opacity: 0.06; } }
.focus-haut { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); }
.focus-titre { flex: 1; text-align: center; color: var(--encre-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; gap: var(--e-4); }
.anneau { width: min(76vw, 300px); height: auto; }
.anneau-piste { fill: none; stroke: var(--papier-2); stroke-width: 6; }
.anneau-progres { fill: none; stroke: var(--soleil-arc); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 1s linear; }
.focus-pause-etape .anneau-progres { stroke: var(--jacaranda); }
.focus-interieur { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.focus-chiffres { font-size: var(--t-56); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.focus-etat { color: var(--encre-2); font-weight: 500; }
.focus-en-pause .focus-chiffres { color: var(--encre-2); }
.focus-actions { display: grid; gap: var(--e-2); max-width: 420px; width: 100%; margin: 0 auto; }
.focus-bilan { display: flex; flex-direction: column; align-items: center; gap: var(--e-2); text-align: center; }
.focus-grand { font-size: 96px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--riziere); }
.focus-sous { color: var(--encre-3); font-size: var(--t-13); }
.focus-question { font-size: var(--t-30); text-align: center; }
.focus-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--e-2); width: 100%; max-width: 420px; }
.focus-preset { flex-direction: column; gap: 0; min-height: 88px; background: var(--papier); border: 1px solid var(--trait); }
.focus-preset:hover { border-color: var(--trait-fort); }
.focus-historique { width: 100%; max-width: 420px; margin-top: var(--e-4); }
.barres-focus i { background: var(--soleil-arc); }
@media (min-width: 1024px) { .focus { max-width: 720px; margin: 0 auto; } }
/* ===== calendrier ===== */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--e-2) 0;
}
.cal-titre {
  font-size: var(--t-20);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cal-entete-jours {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: var(--t-13);
  color: var(--encre-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.cal-grille {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-case {
  position: relative;
  min-height: 56px;
  border-radius: var(--r-1);
  background: var(--papier);
  border: 1px solid var(--trait);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px 4px;
  color: var(--encre);
  overflow: hidden;
}
.cal-hors {
  opacity: 0.45;
}
.cal-num {
  font-size: var(--t-15);
  font-weight: 600;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.cal-aujourdhui {
  border-color: var(--soleil-arc);
}
.cal-aujourdhui .cal-num {
  color: var(--soleil-texte);
}
.cal-selection {
  background: var(--jacaranda-doux);
  border-color: var(--jacaranda);
}
.cal-barre {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 14px;
  height: 20px;
  border-radius: 3px;
  background: var(--soleil);
  opacity: 0.4;
  transform-origin: bottom;
  transform: scaleY(0);
}
.cal-pastilles {
  position: absolute;
  bottom: 5px;
  display: flex;
  gap: 3px;
  height: 6px;
}
.cal-p {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}
.cal-p-tache {
  background: var(--encre-2);
}
.cal-p-ev {
  background: var(--jacaranda);
}
.cal-p-hab {
  background: var(--riziere);
}
.cal-cible {
  outline: 2px solid var(--riziere);
  outline-offset: -2px;
  background: var(--riziere-doux);
}
.cal-semaine {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: var(--e-4);
  touch-action: pan-y;
}
/* écrans de 360 px : gouttières plus fines pour garder des cases d'au moins 44 px de large */
@media (max-width: 374px) {
  .cal-grille, .cal-semaine { gap: 2px; }
}
.cal-sem-jour {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--r-1);
  color: var(--encre-2);
}
.cal-sem-jour.cal-selection {
  background: var(--jacaranda);
  color: var(--sur-jacaranda);
}
.cal-sem-jour.cal-aujourdhui:not(.cal-selection) {
  color: var(--soleil-texte);
}
.cal-jour {
  margin-top: var(--e-4);
}
.cal-jour-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--e-1);
}
.cal-ev {
  width: 100%;
  text-align: left;
}
.cal-ev-heure {
  min-width: 56px;
  font-size: var(--t-13);
  color: var(--jacaranda);
  font-weight: 600;
  line-height: 1.3;
}
.cal-hab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--e-2) 0;
}
.cal-aide {
  padding-top: var(--e-3);
}
.tache-virtuelle .tache-titre {
  color: var(--encre-3);
  font-weight: 500;
}
.coche-fantome {
  color: var(--trait-fort);
}
.coche-fantome svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.cal-fantome {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: var(--r-1);
  background: var(--encre);
  color: var(--fond);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .cal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--e-8);
    align-items: start;
  }
  .cal-nav {
    grid-column: 1;
    grid-row: 1;
  }
  #cal-grille {
    grid-column: 1;
    grid-row: 2;
  }
  #cal-semaine {
    grid-column: 2;
    grid-row: 1;
    margin-top: var(--e-2);
  }
  .cal-jour {
    grid-column: 2;
    grid-row: 2;
    margin-top: var(--e-2);
  }
  .cal-case {
    min-height: 72px;
  }
}
/* ===== chantiers : tableau à quatre colonnes ===== */
.board {
  display: flex;
  gap: var(--e-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--e-2) 0 var(--e-4);
  margin: 0 calc(-1 * var(--e-4));
  padding-left: var(--e-4);
  padding-right: var(--e-4);
  overscroll-behavior-x: contain;
}
.colonne {
  flex: 0 0 82vw;
  max-width: 340px;
  scroll-snap-align: start;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-2);
  padding: var(--e-3);
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  min-height: 200px;
}
.colonne-active {
  border-color: var(--soleil-arc);
}
.colonne-shipped {
  border-style: dashed;
}
.colonne-titre {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  font-size: var(--t-15);
  font-weight: 700;
}
.colonne-liste {
  display: grid;
  gap: var(--e-2);
}
.colonne-vide,
.colonne-aide {
  font-size: var(--t-13);
  color: var(--encre-3);
  line-height: 1.45;
}
.chantier-carte {
  width: 100%;
  text-align: left;
  background: var(--fond);
  border: 1px solid var(--trait);
  border-radius: var(--r-1);
  padding: var(--e-3);
  display: grid;
  gap: 4px;
  transition: transform var(--d-micro) var(--courbe);
}
.chantier-carte:active {
  transform: scale(0.98);
}
.chantier-carte-bloque {
  border-color: var(--laterite);
}
.chantier-nom {
  font-weight: 700;
  font-size: var(--t-17);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chantier-nom .ic-16 {
  color: var(--soleil-arc);
}
.chantier-sous {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-13);
  color: var(--encre-2);
}
.chantier-bloque {
  color: var(--laterite);
  font-weight: 600;
}
.chantier-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chantier-meta:empty {
  display: none;
}
.chantier-detail .chantier-meta {
  margin-bottom: var(--e-3);
}
.chantier-detail .etiquette {
  margin-top: var(--e-3);
}
.chantier-texte {
  line-height: 1.5;
}
@media (min-width: 1024px) {
  .board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    margin: 0;
    padding: var(--e-2) 0;
  }
  .colonne {
    flex: none;
    max-width: none;
  }
}

/* ===== section chantier sur Aujourd'hui ===== */
.chantier-jour {
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-2);
  padding: var(--e-3) var(--e-4);
  display: grid;
  gap: var(--e-2);
}
.chantier-jour-nom {
  font-weight: 700;
  font-size: var(--t-17);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.chantier-jour-action {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  color: var(--encre-2);
}
.chantier-jour-boutons {
  display: flex;
  gap: var(--e-2);
  flex-wrap: wrap;
}
.boss-ligne {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  color: var(--encre-2);
  font-size: var(--t-15);
  padding: var(--e-2) 0 0;
}
.boss-ligne .ic-16 {
  color: var(--soleil-arc);
}
.rituel-lien {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--jacaranda);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
}

/* ===== rituels Maraina / Torimaso ===== */
.rituel {
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(var(--e-4) + var(--sur-securite-haut)) var(--e-4)
    calc(var(--e-6) + var(--sur-securite-bas));
}
.rituel-haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rituel-etiquette {
  font-weight: 700;
  color: var(--soleil-texte);
  font-size: var(--t-15);
}
.rituel-soir .rituel-etiquette {
  color: var(--jacaranda);
}
.rituel-titre {
  font-size: var(--t-30);
  margin: var(--e-3) 0 var(--e-1);
}
.rituel-sous {
  color: var(--encre-3);
  margin-bottom: var(--e-3);
}
.rituel-section {
  margin-top: var(--e-5);
}
.rituel-section .etiquette {
  margin-bottom: var(--e-2);
}
.rituel-boss {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px var(--e-2);
  align-items: center;
  padding: var(--e-3);
  background: var(--soleil-doux);
  border-radius: var(--r-1);
  font-weight: 600;
}
.rituel-boss .ic-20 {
  color: var(--soleil-arc);
  grid-row: span 2;
}
.rituel-choix {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  min-height: 48px;
  cursor: pointer;
}
.rituel-choix input {
  width: 22px;
  height: 22px;
  accent-color: var(--soleil-arc);
  flex: none;
}
.rituel-ajout {
  display: flex;
  gap: var(--e-2);
  margin-top: var(--e-2);
}
.rituel-ajout .btn {
  padding: 0 var(--e-3);
}
.rituel-phrase {
  margin-top: auto;
  padding-top: var(--e-6);
  color: var(--encre-2);
  font-size: var(--t-17);
  line-height: 1.5;
}
.rituel-phrase strong {
  color: var(--encre);
}
.barres-semaine i {
  background: var(--soleil-arc);
}
.barres-semaine i.barre-parfaite {
  background: var(--riziere);
}
/* ===== notes ===== */
.recherche {
  margin: var(--e-2) 0 var(--e-2);
}
.recherche-champ {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  background: var(--papier);
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-3);
  padding: 0 var(--e-3);
  min-height: 44px;
}
.recherche-champ .ic-20 {
  color: var(--encre-3);
}
.recherche-champ .champ {
  border: 0;
  background: transparent;
  min-height: 44px;
  padding-left: 0;
}
.recherche-champ .champ:focus {
  outline: none;
}
.recherche-champ:focus-within {
  outline: 2px solid var(--focus);
}
.note-jour {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px var(--e-2);
  align-items: center;
  padding: var(--e-3) var(--e-4);
  background: var(--soleil-doux);
  border-radius: var(--r-2);
  color: var(--encre);
  text-decoration: none;
}
.note-jour-titre {
  font-weight: 700;
}
.note-jour-extrait {
  color: var(--encre-2);
  font-size: var(--t-13);
  grid-column: 1;
}
.note-jour .ic-20 {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--soleil-arc);
}
.note-ligne {
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.note-date {
  min-width: 52px;
  font-size: var(--t-13);
  color: var(--soleil-texte);
  font-weight: 600;
}
.note-editeur {
  display: grid;
  gap: var(--e-2);
  padding-top: var(--e-2);
}
.note-titre {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: var(--t-30);
  padding: 0;
}
.note-titre:focus {
  outline: none;
}
.note-titre::placeholder {
  color: var(--encre-3);
}
.note-corps {
  width: 100%;
  min-height: 160px;
  border: 0;
  background: transparent;
  resize: none;
  font-size: var(--t-17);
  line-height: 1.55;
  padding: 0;
  overflow: hidden;
}
.note-corps:focus {
  outline: none;
}
.note-corps::placeholder {
  color: var(--encre-3);
}
.note-apercu {
  font-size: var(--t-17);
  line-height: 1.55;
  min-height: 120px;
}
.autocompletion {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
  padding: var(--e-2);
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.autocompletion button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--jacaranda-doux);
  color: var(--jacaranda);
  font-weight: 600;
}
.note-liens {
  margin-top: var(--e-6);
  padding-top: var(--e-4);
  border-top: 1px solid var(--trait);
  display: grid;
  gap: var(--e-2);
}
.liens {
  display: grid;
  gap: 4px;
}
.liens li a,
.liens li span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  text-decoration: none;
  color: var(--jacaranda);
  font-weight: 500;
}
.liens li span {
  color: var(--encre-2);
}

/* markdown léger */
.markdown h1 {
  font-size: var(--t-24);
  margin: var(--e-3) 0 var(--e-2);
}
.markdown h2 {
  font-size: var(--t-20);
  margin: var(--e-3) 0 var(--e-1);
}
.markdown h3 {
  font-size: var(--t-17);
  margin: var(--e-2) 0 var(--e-1);
}
.markdown p {
  margin: 0 0 var(--e-2);
}
.markdown ul,
.markdown ol {
  padding-left: 22px;
  margin: 0 0 var(--e-2);
}
.markdown ul {
  list-style: disc;
}
.markdown ol {
  list-style: decimal;
}
.markdown code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--papier-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
}
.markdown input[type="checkbox"] {
  accent-color: var(--riziere);
  margin-right: 6px;
}
.markdown .wikilien {
  color: var(--jacaranda);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.markdown .wikilien-absente {
  color: var(--encre-3);
  border-bottom-style: dashed;
}
/* ===== score, niveau, badges ===== */
.score {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--e-3);
  align-items: center;
  padding: var(--e-3) var(--e-4);
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-2);
}
.score-jour {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.score-xp {
  font-size: var(--t-30);
  font-weight: 700;
  line-height: 1;
  color: var(--soleil-texte);
}
.score-lib {
  font-size: var(--t-13);
  color: var(--encre-3);
}
.score-niveau {
  display: grid;
  gap: 4px;
}
.score-titre {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.score-titre .ic-16 {
  color: var(--soleil-arc);
}
.score-barre {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--papier-2);
  overflow: hidden;
}
.score-barre i {
  display: block;
  height: 100%;
  background: var(--soleil-arc);
  transform-origin: left;
  transition: transform 400ms var(--courbe);
}
.badges {
  display: grid;
  gap: var(--e-2);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.badge {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--e-3);
  align-items: center;
  padding: var(--e-3);
  border-radius: var(--r-1);
  background: var(--papier-2);
  color: var(--encre-3);
}
.badge .ic {
  grid-row: span 2;
}
.badge-ok {
  background: var(--soleil-doux);
  color: var(--encre);
}
.badge-ok .ic {
  color: var(--soleil-arc);
}
.badge-titre {
  font-weight: 600;
}
.badge-desc {
  font-size: var(--t-13);
}

/* ===== palette de commandes ===== */
.palette-voile {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--voile);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  transition: opacity var(--d-micro);
}
.palette-voile.visible {
  opacity: 1;
}
.palette {
  width: min(640px, 92vw);
  background: var(--papier);
  border-radius: var(--r-3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.palette-champ {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-3) var(--e-4);
  border-bottom: 1px solid var(--trait);
  color: var(--encre-3);
}
.palette-entree {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: var(--t-17);
  min-height: 36px;
}
.palette-entree:focus {
  outline: none;
}
.palette kbd {
  font: inherit;
  font-size: var(--t-13);
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--papier-2);
  color: var(--encre-3);
}
.palette-liste {
  max-height: 50vh;
  overflow-y: auto;
  padding: var(--e-2);
}
.palette-liste li {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: 10px 12px;
  border-radius: var(--r-1);
  cursor: pointer;
  color: var(--encre);
}
.palette-liste li .ic-20 {
  color: var(--encre-3);
}
.palette-liste li.palette-active {
  background: var(--jacaranda-doux);
  color: var(--jacaranda);
}
.palette-liste li.palette-active .ic-20 {
  color: var(--jacaranda);
}

/* ===== sélection clavier des tâches ===== */
.tache.selectionnee .tache-corps {
  box-shadow: inset 3px 0 0 var(--jacaranda);
  padding-left: 6px;
}

/* ===== bureau : deux colonnes sur Aujourd'hui ===== */
.colonne-droite {
  display: none;
}
@media (min-width: 1024px) {
  .deux-colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--e-8);
    align-items: start;
  }
  .colonne-droite {
    display: block;
    position: sticky;
    top: 80px;
  }
  .colonne-onglets {
    margin-bottom: var(--e-3);
  }
  .colonne-mois {
    font-weight: 700;
    margin-bottom: var(--e-2);
  }
  .cal-mini .cal-case {
    min-height: 44px;
    padding-top: 4px;
  }
  .cal-mini .cal-barre {
    bottom: 4px;
    height: 12px;
  }
  .colonne-note {
    min-height: 260px;
    resize: vertical;
  }
  .colonne-note-pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--e-2);
  }
}
