  /* ---------- URGENT/IMPORTANT BLOCK (bright red, above overdue) ---------- */
  #urgentList{overflow-y:auto; overflow-x:hidden; margin:0 calc(var(--pad-x) * -1) 0; max-height:16vh; background:#B8271F;}
  #urgentList > .empty{display:none;}
  .urow{display:flex; align-items:center; gap:10px; padding:10px var(--pad-x); color:#fff;}
  .urow:nth-child(odd){background:#E5342A;}
  .urow:nth-child(even){background:#CF2A21;}
  .urow .ubolt{flex-shrink:0; width:17px; height:17px; color:#FFD9CF;}
  .urow .ubody{flex:1; min-width:0;}
  .urow .utitle{font-size:13px; font-weight:700; line-height:1.3;}
  .urow .umeta{font-size:10px; color:rgba(255,255,255,.85); margin-top:2px; display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
  .urow .ubadge{font-weight:800; letter-spacing:.04em; background:rgba(255,255,255,.22); padding:2px 7px; border-radius:999px;}
  .urow .uresolve{flex-shrink:0; width:22px; height:22px; border-radius:50%; border:1.2px solid rgba(255,255,255,.4); background:none; color:#fff; display:flex; align-items:center; justify-content:center;}
  .urow .uresolve svg{width:10px; height:10px;}
  #urgentList{ scrollbar-color:rgba(255,255,255,0.35) transparent; }
  #urgentList::-webkit-scrollbar{ width:4px; }
  #urgentList::-webkit-scrollbar-track{ background:transparent; }
  #urgentList::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.32); border-radius:999px; }
  #urgentList::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,.48); }

  .expand-row{
    width:100%; border:none; background:rgba(255,255,255,.14); color:#fff; font-size:11px; font-weight:700;
    letter-spacing:.02em; padding:8px var(--pad-x); cursor:pointer; display:block; text-align:center;
  }
  .expand-row:hover{background:rgba(255,255,255,.22);}

  #overdueList{ scrollbar-color:rgba(255,255,255,0.3) transparent; }
  #overdueList::-webkit-scrollbar-thumb{ background:rgba(255,255,255,0.28); border-radius:999px; }
  #overdueList::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,0.42); }
  :focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px;}
  h1,h2,h3,.display{font-family:'Fraunces',serif;}
  button{font-family:inherit; cursor:pointer;}
  input,select{font-family:inherit;}

  /* overflow:hidden ferait de .phone-wrap un conteneur de défilement, ce qui
     neutralise le position:sticky de .header-bar (elle défilerait avec la page).
     overflow:clip découpe pareil sans créer ce conteneur — l'en-tête colle donc
     bien en haut. La ligne hidden reste en repli pour les navigateurs sans clip. */
  .phone-wrap{max-width:430px; margin:0 auto; min-height:100vh; background:var(--bg); position:relative; box-shadow:0 0 60px -20px rgba(0,0,0,0.25); overflow:hidden; overflow:clip;}
  .phone{padding:0 var(--pad-x) calc(var(--nav-h) + var(--composer-h) + 14px);}

  /* ---------- AGENDA BLOCK (glued, 2-tone) ---------- */
  #agendaCards, #calAgenda{border-radius:16px; overflow-y:auto; overflow-x:hidden; border:1px solid var(--border); margin-bottom:14px; max-height:26vh;}
  #calAgenda{max-height:50vh;}
  .hour-row{display:grid; grid-template-columns:38px 1fr; column-gap:9px; padding:5px 8px; border-top:1px solid var(--border);}
  .hour-row:first-child{border-top:none;}
  .hour-row .hour-label{font-family:'IBM Plex Mono',monospace; font-size:9.5px; color:var(--ink-soft); padding-top:5px;}
  .hour-row .hour-tasks{display:flex; flex-direction:column; gap:5px; min-height:12px; padding:2px 0;}
  .hour-row .hour-tasks.empty-slot{cursor:pointer; border-radius:8px;}
  .hour-row .hour-tasks.empty-slot:hover{background:var(--bg);}
  .hour-add-hint{font-size:10.5px; color:var(--ink-soft); opacity:.5; padding:4px 2px; transition:opacity .15s;}
  .hour-row .hour-tasks.empty-slot:hover .hour-add-hint{opacity:1; color:var(--ink);}
  .hour-add-more{align-self:flex-start; background:none; border:none; font-size:10.5px; color:var(--ink-soft); opacity:.6; padding:3px 2px; cursor:pointer; transition:opacity .15s, color .15s;}
  .hour-add-more:hover{opacity:1; color:var(--ink);}
  .hour-row .arow{border-radius:9px;}
  .arow{display:flex; align-items:center; gap:10px; padding:10px 13px; background:var(--surface); border-left:4px solid transparent;}
  .arow:nth-child(even){background:var(--bg);}
  .arow:not(:last-child){border-bottom:1px solid var(--border);}
  .arow.done{opacity:.5;}
  .arow .atime{font-family:'IBM Plex Mono',monospace; font-size:10.5px; color:var(--ink-soft); width:38px; flex-shrink:0;}
  .arow .abody{flex:1; min-width:0;}
  .arow .atitle{font-size:13.5px; font-weight:600; line-height:1.25;}
  .arow.done .atitle{text-decoration:line-through; color:var(--ink-soft);}
  .arow .asub{font-size:10.5px; color:var(--ink-soft); margin-top:1px;}
  .space-tag{font-family:'IBM Plex Mono',monospace; text-transform:uppercase; letter-spacing:.04em; font-size:9.5px;}
  .rspace-tag{font-family:'IBM Plex Mono',monospace; text-transform:uppercase; letter-spacing:.04em; font-size:9px; color:var(--ink-soft); font-weight:500;}
  .arow .aright{display:flex; align-items:center; gap:7px; flex-shrink:0;}
  .aedit{width:21px; height:21px; border-radius:50%; border:none; background:none; color:var(--ink-soft); display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:0;}
  .aedit:hover{color:var(--ink); background:var(--bg);}
  .aedit svg{width:13px; height:13px;}
  .astatus{width:21px; height:21px; border-radius:50%; border:1.5px solid var(--border-soft); background:var(--surface); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
  .astatus svg{width:11px; height:11px; opacity:0;}
  .arow.done .astatus{background:var(--action); border-color:var(--action);}
  .arow.done .astatus svg{opacity:1; stroke:#fff;}

  /* ---------- OVERDUE BLOCK (glued, 2-tone red) ---------- */
  #overdueList{overflow-y:auto; overflow-x:hidden; margin:0 calc(var(--pad-x) * -1) 0; max-height:20vh; background:#4A1A1C;}
  .orow{display:flex; align-items:center; gap:10px; padding:10px var(--pad-x); color:#fff;}
  .orow:nth-child(odd){background:#5E2124;}
  .orow:nth-child(even){background:#4A1A1C;}
  .orow .warn{flex-shrink:0; width:16px; height:16px; color:#F0AFA6;}
  .orow .obody{flex:1; min-width:0;}
  .orow .otitle{font-size:13px; font-weight:600; line-height:1.3;}
  .orow .ometa{font-size:10px; color:rgba(255,255,255,.7); margin-top:2px; display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
  .orow .obadge{font-weight:700; letter-spacing:.03em; color:#F5C9C2;}
  .orow .oresolve{flex-shrink:0; width:22px; height:22px; border-radius:50%; border:1.2px solid rgba(255,255,255,.35); background:none; color:#fff; display:flex; align-items:center; justify-content:center;}
  .orow .oresolve svg{width:10px; height:10px;}

  /* ---------- REMINDER BLOCK (glued, 2-tone neutral) ---------- */
  #remindersList{border-radius:16px; overflow-y:auto; overflow-x:hidden; margin-bottom:14px; border:1px solid var(--border-soft); max-height:20vh;}
  .rrow{display:flex; align-items:center; gap:8px; padding:10px 13px; position:relative;}
  .rrow:nth-child(odd){background:#F0F0EA;}
  .rrow:nth-child(even){background:#E4E4DB;}
  .rrow .icon-badge{width:26px; height:26px; border-radius:50%; background:rgba(255,255,255,.65); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
  .rrow .icon-badge svg{width:13px; height:13px;}
  .rrow .rtitle{flex:1; min-width:0; font-size:13px; font-weight:600;}
  .rrow .avatar{width:23px; height:23px;}
  .rrow .avatar.none{background:rgba(0,0,0,.1); border-color:rgba(0,0,0,.25);}
  .rrow .rresolve{flex-shrink:0; width:24px; height:24px; border-radius:50%; border:1.2px solid rgba(0,0,0,.15); background:rgba(255,255,255,.5); display:flex; align-items:center; justify-content:center; color:var(--ink);}
  .rrow .rresolve svg{width:11px; height:11px;}
  .sched-pop{
    position:absolute; right:12px; top:calc(100% - 4px); background:var(--surface); border:1px solid var(--border);
    border-radius:10px; padding:6px; box-shadow:var(--shadow); display:none; align-items:center; gap:5px; z-index:6;
  }
  .sched-pop.open{display:flex;}
  .sched-pop input{border:none; font-size:13px; font-family:'IBM Plex Mono',monospace;}
  .sched-pop button{width:22px; height:22px; border-radius:50%; border:none; background:var(--action); color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
  .sched-pop button svg{width:10px; height:10px;}

  /* ---------- LISTES (ligne repliable, mêlée aux tâches/rappels) ---------- */
  .list-row-wrap{margin-bottom:0;}
  .list-row-header{cursor:pointer;}
  .list-inline-count{font-family:'IBM Plex Mono',monospace; font-size:10px; color:var(--ink-soft); font-weight:500;}
  /* .icon-badge n'est dimensionné que sous .rrow ; ici la ligne est une .arow. */
  .list-row-header .list-icon{width:26px; height:26px; border-radius:50%; background:var(--bg); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--ink-soft);}
  .list-row-header .list-icon svg{width:14px; height:14px;}
  .list-row-header.done .atitle{text-decoration:line-through; color:var(--ink-soft);}
  .list-row-header.done .list-icon{opacity:.5;}
  .list-row-header.done .astatus{background:var(--action); border-color:var(--action);}
  .list-row-header.done .astatus svg{opacity:1; stroke:#fff;}
  .list-row-header .astatus:disabled{opacity:.35;}
  .list-chevron{width:21px; height:21px; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--ink-soft); transition:transform .15s;}
  .list-chevron.flip{transform:rotate(180deg);}
  .list-chevron svg{width:11px; height:11px;}
  .list-expand-body{background:var(--bg); border-bottom:1px solid var(--border); padding-bottom:2px;}
  .list-actions-row{display:flex; justify-content:center; gap:14px; padding:9px 13px 11px;}
  .list-edit-link{border:none; background:none; color:var(--ink-soft); font-size:11.5px; padding:0; text-decoration:underline;}
  .list-edit-link:hover{color:var(--ink);}
  .list-delete-link{border:none; background:none; color:var(--ink-soft); font-size:11.5px; padding:0; text-decoration:underline;}
  .list-delete-link:hover{color:#E5342A;}
  .list-item-row{display:flex; align-items:center; gap:9px; padding:9px 13px; border-bottom:1px solid var(--border);}
  .list-item-row:last-child{border-bottom:none;}
  /* Le crochet ferme la ligne, comme sur les tâches et l'en-tête de liste. */
  .list-item-check{order:3; width:19px; height:19px; border-radius:50%; border:1.5px solid var(--border-soft); background:var(--surface); display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:0;}
  .list-item-check svg{width:10px; height:10px; opacity:0;}
  .list-item-row.checked .list-item-check{background:var(--action); border-color:var(--action);}
  .list-item-row.checked .list-item-check svg{opacity:1; stroke:#fff;}
  .list-item-body{flex:1; min-width:0;}
  .list-item-title{font-size:13px;}
  .list-item-row.checked .list-item-title{text-decoration:line-through; color:var(--ink-soft);}
  .list-item-delete{border:none; background:none; color:var(--ink-soft); padding:2px; flex-shrink:0;}
  .list-item-delete:hover{color:#E5342A;}
  .list-item-delete svg{width:12px; height:12px;}
  /* produit repéré automatiquement d'après le texte de l'article, pas encore lié */
  .product-suggest-chip{display:inline-flex; align-items:center; gap:6px; margin-top:4px; padding:3px 9px 3px 3px;
    background:var(--accent-bg); border:1px dashed var(--accent); border-radius:999px;
    font-size:11px; color:var(--accent); font-family:'Inter',sans-serif; max-width:100%; text-align:left;}
  .product-suggest-chip:hover{background:var(--surface);}
  .product-suggest-chip img{width:18px; height:18px; border-radius:50%; object-fit:cover; flex-shrink:0; background:var(--surface);}
  .product-suggest-chip span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .list-item-add-input-wrap{position:relative; flex:1; min-width:0;}
  .list-item-add-input-wrap input{width:100%; box-sizing:border-box;}
  .product-suggest-box{position:absolute; top:calc(100% + 4px); left:0; right:0; background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:var(--shadow); z-index:8; display:none; overflow:hidden;}
  .product-suggest-box.open{display:block;}
  .product-suggest-item{display:block; width:100%; text-align:left; border:none; background:none; padding:8px 12px; font-size:12.5px; color:var(--ink); border-bottom:1px solid var(--border); font-family:'Inter',sans-serif;}
  .product-suggest-item:last-child{border-bottom:none;}
  .product-suggest-item:hover{background:var(--bg);}
  .list-item-add{display:flex; gap:6px; padding:9px 13px;}
  .list-item-add input{flex:1; min-width:0; border:1px solid var(--border); background:var(--bg); border-radius:999px; padding:7px 12px; font-size:12.5px; font-family:'Inter',sans-serif; color:var(--ink);}
  .list-item-add input:focus{outline:none; border-color:var(--ink-soft);}
  .list-item-add button{border:none; background:var(--action); color:#fff; border-radius:999px; padding:7px 14px; font-size:12px; font-weight:600; flex-shrink:0;}
  .list-item-add button:hover{opacity:.88;}


/* Une tâche datée sans heure se range après l'horaire de la journée : la
   colonne de gauche ne peut rien afficher d'utile, un tiret dit « pas d'heure »
   sans prétendre à une position dans la ligne du temps. */
.arow .atime.no-time{opacity:.45;}

/* Une tâche sans date peut quand même porter une heure : c'est sa seule
   information de temps, la cacher reviendrait à la perdre. */
.rrow .rtime{display:inline-block; font-family:'IBM Plex Mono',monospace; font-size:9.5px; font-weight:600;
  color:var(--ink-soft); background:var(--bg); border:1px solid var(--border); border-radius:6px;
  padding:1px 5px; margin-right:6px; vertical-align:1px;}

/* Les articles d'une liste portée par une tâche, dépliés sous sa ligne. Même
   creux que la zone des notes : c'est le contenu de la ligne, pas une ligne. */
.task-checklist{background:rgba(0,0,0,.045); border-top:1px solid rgba(0,0,0,.09);}
.task-checklist .list-item-row{border-bottom-color:rgba(0,0,0,.07);}
.task-checklist .list-actions-row{padding:7px 13px 9px;}

/* La pastille de la personne sur les bandes rouges : meme taille que dans les
   rappels, mais cernee de clair pour tenir sur le rouge. Une tache importante
   est justement celle dont on veut savoir qui s en occupe. */
.urow .who-cible, .orow .who-cible{flex-shrink:0;}
.urow .avatar, .orow .avatar{width:22px; height:22px; font-size:9.5px; border-color:rgba(255,255,255,.5);}
.urow .avatar.none, .orow .avatar.none{background:rgba(255,255,255,.15); border-color:rgba(255,255,255,.45); color:#fff;}
.urow .avatar-both .avatar, .orow .avatar-both .avatar{width:19px; height:19px; font-size:8.5px;}

/* Renommer un article : meme discretion que la croix qui le retire, juste a
   cote d elle. Le lien « Modifier la liste » n avait plus lieu d etre — tout se
   fait maintenant sur la ligne. */
.list-item-edit{border:none; background:none; color:var(--ink-soft); padding:2px; flex-shrink:0;}
.list-item-edit:hover{color:var(--ink);}
.list-item-edit svg{width:12px; height:12px;}

  /* Pendant qu'on écrit, les alertes cèdent la place : elles sont du contexte,
     pas ce qu'on est en train de faire. Sans ça, elles et la barre du bas ne
     laissent que quelques pixels aux deux sections — et ce qui déborde n'est
     pas sous l'écran, il est coupé par .phone-wrap. */
  body.clavier-ouvert #urgentList,
  body.clavier-ouvert #overdueList,
  body.clavier-ouvert .screen[data-screen="today"] > .context-bar{display:none;}

  /* Un champ posé ailleurs que dans la barre du bas : elle s'efface, et la
     navigation avec. Ce qu'on écrit se retrouve juste au-dessus du clavier
     au lieu d'avoir 180 px d'outils inutiles entre les deux. */
  body.champ-hors-barre .bottom-fixed{display:none;}
  body.champ-hors-barre .phone{padding-bottom:14px;}

  /* Le menu des bandes rouges : les mêmes trois points que dans les listes,
     mais sans cercle — le rond appartient au geste « c'est fait », et deux
     ronds voisins se confondent quand on vise au pouce. */
  .urow .umenu, .orow .omenu{
    flex-shrink:0; width:22px; height:22px; padding:0; border:none; background:none;
    color:rgba(255,255,255,.72); display:flex; align-items:center; justify-content:center;
    -webkit-tap-highlight-color:transparent;
  }
  .urow .umenu:hover, .orow .omenu:hover{color:#fff;}
  .urow .umenu svg, .orow .omenu svg{width:15px; height:15px;}

  /* ---------- QUAND UNE TÂCHE IMPORTANTE REMONTE ----------
     Le champ suit le bouton « important » : il ne paraît que quand il a un
     sens, et il dit en clair le jour calculé. Un délai qu'on ne peut pas
     vérifier se règle au hasard. */
  .dt-avance-row{display:flex; gap:8px; align-items:center;}
  .dt-avance-row input[type=number]{
    width:72px; flex-shrink:0; border:1px solid var(--border); background:var(--surface);
    border-radius:10px; padding:9px 10px; font-size:14px; color:var(--ink);
    font-family:'Inter',sans-serif; text-align:center;
  }
  .dt-avance-row select{
    flex:1; min-width:0; border:1px solid var(--border); background:var(--surface);
    border-radius:10px; padding:9px 10px; font-size:14px; color:var(--ink);
    font-family:'Inter',sans-serif;
  }
  .dt-avance-row input:focus, .dt-avance-row select:focus{outline:none; border-color:var(--ink-soft);}
  .dt-avance-dit{
    margin:7px 0 0; font-family:'IBM Plex Mono',monospace; font-size:10px;
    line-height:1.6; color:var(--ink-soft);
  }

  /* La fiche jointe à une tâche : sous la ligne, en retrait de la colonne
     d'heure, pour qu'on lise d'abord la tâche puis ce qui s'y rattache. */
  .task-produit-ligne{padding:0 13px 9px 62px;}
  .task-produit-ligne .product-chip{margin:0;}

  /* ---------- CHOISIR UNE FICHE DANS UN DIALOGUE ----------
     Deux boutons côte à côte, discrets : ils ouvrent une possibilité, ils ne
     réclament pas le geste. Sur une tâche il n'y en a qu'une à choisir ; dans
     une liste, autant qu'on veut. */
  .dt-fiche-row{display:flex; gap:8px; margin-top:8px;}
  .dt-fiche-btn{
    flex:1; min-width:0; display:inline-flex; align-items:center; justify-content:center; gap:6px;
    border:1px solid var(--border); background:var(--surface); color:var(--ink);
    border-radius:10px; padding:9px 10px; font-size:12.5px; font-family:'Inter',sans-serif;
    cursor:pointer;
  }
  .dt-fiche-btn svg{width:16px; height:16px; flex-shrink:0; color:var(--ink-soft);}
  .dt-fiche-btn:hover{border-color:var(--ink-soft);}
  .dt-fiche-dit{
    margin:7px 0 0; font-family:'IBM Plex Mono',monospace; font-size:10px;
    line-height:1.6; color:var(--ink-soft);
  }
  /* La fiche retenue, avant enregistrement. Le fond marque qu'elle est posée
     là et pas encore écrite. */
  .dt-fiche-choisie{
    position:relative; display:flex; flex-direction:column; gap:2px;
    background:var(--bg); border:1px solid var(--border); border-radius:10px;
    padding:9px 34px 9px 11px; margin-bottom:8px;
  }
  .dt-fiche-genre{
    font-family:'IBM Plex Mono',monospace; font-size:9px; font-weight:600;
    letter-spacing:.12em; text-transform:uppercase; color:var(--ink-soft);
  }
  .dt-fiche-nom{font-size:13.5px; font-weight:600; line-height:1.3; color:var(--ink);}
  .dt-fiche-meta{font-size:11.5px; color:var(--ink-soft); line-height:1.35;}
  /* Sans ce bouton, un choix serait définitif. */
  .dt-fiche-retirer{
    position:absolute; top:7px; right:7px; width:22px; height:22px; padding:0;
    border:none; background:none; color:var(--ink-soft); font-size:17px; line-height:1;
    cursor:pointer; border-radius:999px;
  }
  .dt-fiche-retirer:hover{background:var(--border); color:var(--ink);}

  /* La pastille dans les bandes sombres et dans « à garder en tête » : le
     retrait de gauche suit celui de la ligne au-dessus, pour que la fiche se
     lise comme rattachée à sa tâche et non comme une ligne de plus. */
  .urow-wrap .task-produit-ligne,
  .orow-wrap .task-produit-ligne{padding:0 14px 9px 46px;}
  .rrow-wrap .task-produit-ligne{padding:0 12px 8px 44px;}
  /* Sur fond sombre, la pastille garderait le fond clair d'une liste : on la
     rend au registre de la bande. */
  .urow-wrap .product-chip, .orow-wrap .product-chip{
    background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.20); color:#fff;
  }

/* A compact preview opens the complete, actionable alert list. */
#pressingOverview { grid-area:urgent; display:flex; margin:0 calc(var(--pad-x) * -1); min-width:0; }
.pressing-count { flex:0 0 36px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; border:0; background:#981e19; color:white; font-size:20px; font-weight:700; }
.pressing-count svg { width:14px; height:14px; }
.pressing-rows { flex:1; min-width:0; }
.pressing-rows #urgentList, .pressing-rows #overdueList { margin:0; max-height:none; border-radius:0; }
#pressingPage { z-index:55; background:#4A1A1C; color:white; }
#pressingPage .notif-header { flex-shrink:0; color:var(--ink); }
.pressing-content { overflow-y:auto; flex:1; min-height:0; }
.pressing-content h3 { display:flex; gap:12px; align-items:center; padding:14px 20px; margin:0; font-family:inherit; text-transform:uppercase; font-size:12px; letter-spacing:.08em; }
.pressing-content h3 span { padding:3px 8px; border-radius:12px; background:rgba(255,255,255,.18); }
#pressingPage .empty { color:white; }
body.clavier-ouvert #pressingOverview, .focus-agenda #pressingOverview, .focus-rappels #pressingOverview { display:none; }
@media (min-width:1024px) { #pressingOverview { margin:0; border-radius:12px; overflow:hidden; } }
