/* Oqora CRM · Tâche journalière, Appels, Rendez-vous, Messages (04/10/2026). Règles préfixées .s-tb. */
.s-tb .tb{ display:flex; flex-direction:column; gap:22px; }
.s-tb .tb-tete{ background:var(--navy-grad); color:#fff; border-radius:var(--r-lg); padding:20px 22px; display:flex; flex-direction:column; gap:8px; }
.s-tb .tb-jour{ margin:0; font-size:var(--fs-xl); font-weight:800; color:#fff; }
.s-tb .tb-progres{ margin:0; color:var(--navy-lede); font-weight:600; }
.s-tb .tb-barre{ height:10px; border-radius:var(--r-full); background:rgba(255,255,255,.18); overflow:hidden; }
.s-tb .tb-barre-rempli{ display:block; height:100%; background:var(--vert-vif); border-radius:var(--r-full); }

/* Tuiles : chacune mène à sa page (un lien entier, donc une grande cible) */
.s-tb .tb-tuiles{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:12px; }
.s-tb .tb-tuile{ display:flex; flex-direction:column; gap:4px; min-width:0; background:var(--surface); border-radius:var(--r-md); padding:16px;
  box-shadow:inset 0 0 0 1px var(--rule-soft); text-decoration:none; color:inherit; }
.s-tb a.tb-tuile:hover{ box-shadow:inset 0 0 0 2px var(--bleu); }
.s-tb a.tb-tuile:focus-visible{ outline:3px solid var(--bleu-ring); outline-offset:2px; box-shadow:inset 0 0 0 2px var(--bleu); }
.s-tb .tb-tuile-titre{ margin:0; color:var(--ink-soft); font-size:var(--fs-sm); font-weight:600; }
.s-tb .tb-tuile-val{ margin:0; font-size:var(--fs-stat); font-weight:800; color:var(--ink); }
.s-tb .tb-tuile-plus{ margin:0; color:var(--ink-faint); font-size:var(--fs-sm); }
.s-tb .tb-tuile-retard{ margin:4px 0 0; color:var(--rouge); font-weight:700; font-size:var(--fs-sm); }
.s-tb .tb-tuiles--petites .tb-tuile-val{ font-size:var(--fs-xl); }

/* Listes */
.s-tb .tb-h2{ margin:0 0 10px; font-size:var(--fs-md); display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.s-tb .tb-nb{ background:var(--bleu-tint); color:var(--bleu-dark); border-radius:var(--r-full); padding:1px 9px; font-size:var(--fs-sm); }
.s-tb .tb-bloc--retard .tb-h2{ color:var(--rouge); }
.s-tb .tb-bloc--retard .tb-nb{ background:var(--rouge); color:#fff; }
/* Ambre foncé : #8f4e00 sur le fond ambre clair = 5,8:1 (var(--ambre) n'y faisait que 4,0:1, sous le minimum AA) */
.s-tb .tb-bloc--regler .tb-h2{ color:#8f4e00; }
.s-tb .tb-bloc--regler .tb-nb{ background:var(--ambre-tint); color:#8f4e00; }
.s-tb .tb-h2:focus{ outline:none; }
.s-tb .tb-h2:focus-visible{ outline:3px solid var(--bleu-ring); outline-offset:2px; border-radius:var(--r-xs); }
.s-tb .tb-liste{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.s-tb .tb-ligne{ display:flex; align-items:center; gap:14px; background:var(--surface); border-radius:var(--r-md); padding:12px 14px;
  box-shadow:inset 0 0 0 1px var(--rule-soft); }
.s-tb .tb-ligne--retard{ box-shadow:inset 4px 0 0 var(--rouge), inset 0 0 0 1px var(--rule-soft); }
.s-tb .tb-corps{ flex:1; min-width:0; }
.s-tb .tb-titre{ margin:0; font-weight:700; overflow-wrap:anywhere; }
.s-tb .tb-detail{ margin:3px 0 0; color:var(--ink-soft); font-size:var(--fs-sm); overflow-wrap:anywhere; }
/* « en retard » : blanc sur rouge (4,66:1 ; rouge sur rouge clair ne faisait que 4,08:1) */
.s-tb .tb-retard{ display:inline-block; margin-left:4px; padding:1px 8px; border-radius:var(--r-full); background:var(--rouge);
  color:#fff; font-size:var(--fs-xs); font-weight:700; vertical-align:middle; max-width:100%; }
.s-tb .tb-heure{ display:inline-block; margin-right:2px; padding:1px 8px; border-radius:var(--r-full); background:var(--bleu-tint);
  color:var(--bleu-dark); font-size:var(--fs-sm); font-weight:800; vertical-align:middle; }
/* Ligne faite : atténuée par la couleur, jamais par l'opacité (le texte gardait 3,1:1 seulement) */
.s-tb .tb-ligne--fait{ background:var(--bande); }
.s-tb .tb-ligne--fait .tb-titre{ text-decoration:line-through; color:var(--ink-soft); }
.s-tb .tb-ligne--fait .tb-detail{ color:var(--ink-soft); }
/* Sa tâche GHL : fermée aussi, en cours, ou pourquoi elle ne l'a pas été (ambre, comme une lecture qui a échoué) */
.s-tb .tb-ghl{ margin:3px 0 0; color:var(--ink-soft); font-size:var(--fs-sm); overflow-wrap:anywhere; }
.s-tb .tb-ghl--erreur{ color:#8f4e00; font-weight:600; }
.s-tb .tb-vide{ color:var(--ink-faint); background:var(--bande); border-radius:var(--r-md); padding:14px; font-size:var(--fs-sm); }
.s-tb .tb-bloc--maintenant .tb-ligne{ box-shadow:inset 0 0 0 2px var(--bleu); }
.s-tb .tb-bloc--maintenant .tb-ligne--retard{ box-shadow:inset 4px 0 0 var(--rouge), inset 0 0 0 2px var(--bleu); }
/* Petit texte posé sur le fond de la page : --ink-soft (6,3:1) ; --ink-faint n'y faisait que 4,41:1, sous le minimum AA */
.s-tb .tb-note{ margin:0; color:var(--ink-soft); font-size:var(--fs-xs); }
/* Une lecture qui a échoué (tâches GHL, notes, lignes validées) : dit, jamais caché */
.s-tb .tb-alerte{ margin:0; padding:10px 14px; border-radius:var(--r-md); background:var(--ambre-tint); color:#8f4e00;
  font-size:var(--fs-sm); font-weight:600; overflow-wrap:anywhere; }
.s-tb .tb-bloc .tb-alerte{ margin-bottom:8px; }

/* Boutons minimalistes : « Ouvrir ↗ » (GHL), « Voir » (le CRM), « ✓ » / « ↺ ». 44 px partout (doigt ou souris). */
.s-tb .tb-actions{ display:flex; gap:8px; flex:none; justify-content:flex-end; }
.s-tb .tb-actions .btn{ min-height:var(--tap); }
.s-tb .tb-ouvrir{ min-width:88px; justify-content:center; text-decoration:none; }
.s-tb .tb-rejoindre{ justify-content:center; text-decoration:none; }
.s-tb .tb-valider{ min-width:var(--tap); padding:0; justify-content:center; font-size:var(--fs-md); }
.s-tb .tb-valider--a-faire{ background:var(--vert-tint); color:#0e6b46; font-weight:700; }
.s-tb .tb-valider--a-faire:hover{ background:var(--vert); color:#fff; }
.s-tb .tb-valider:disabled{ opacity:.55; cursor:wait; }
/* Garde de 0,7 s après un « ✓ » (la ligne suivante a glissé sous le doigt) : le bouton attend, sans changer de couleur. */
.s-tb .tb-valider[aria-disabled="true"]{ cursor:wait; }
.s-tb .tb-valider--a-faire[aria-disabled="true"]:hover{ background:var(--vert-tint); color:#0e6b46; }

@media (max-width:640px){
  .s-tb .tb-tete{ padding:16px; }
  .s-tb .tb-tuiles{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .s-tb .tb-tuile{ padding:12px; }
  /* Les 3 petites tuiles du setting sur une seule rangée (avant : une ligne pleine chacune, sous l'écran) */
  .s-tb .tb-tuiles--petites{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
  .s-tb .tb-tuiles--petites .tb-tuile{ padding:10px; }
  .s-tb .tb-tuiles--petites .tb-tuile-titre{ font-size:var(--fs-xs); overflow-wrap:anywhere; }
  .s-tb .tb-ligne{ gap:10px; padding:12px; flex-wrap:wrap; }
  .s-tb .tb-corps{ flex:1 1 150px; }
  .s-tb .tb-actions{ margin-left:auto; }
}
