/* V5 · PAGE AUJOURD'HUI (PC) — modèle « Flux » aux cotes du kit Apple « macOS 27 » : une colonne centrée, un résumé en
   pastilles (compteurs), puis des groupes de lignes arrondis (r12, remplissage quaternaire) : titre du groupe au-dessus,
   lignes séparées par un filet en retrait, vignette dans une tuile, chevron pour ce qui s'ouvre.
   Le balisage et la logique (js/aujourdhui.js) ne changent pas. */

html.v5 #view-aujourdhui{ padding: 0; max-width: none; }
html.v5 #aj-corps{ box-sizing: border-box; width: auto; max-width: 720px; margin: 0 auto; padding: 20px 24px 60px; }

/* résumé : une rangée de pastilles (chiffre en gras, libellé secondaire) */
html.v5 .aj-resume{ display: flex; flex-wrap: wrap; gap: 6px; width: auto; margin: 0 0 22px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html.v5 .aj-seg{
  display: inline-flex; align-items: center; gap: 5px; height: var(--v5-ctrl-l); margin: 0; padding: 0 12px; border: 0; border-radius: var(--v5-r-bouton);
  background: var(--v5-bouton); box-shadow: none; color: var(--v5-texte-2); font: var(--v5-g-normal) var(--v5-t-13)/16px var(--v5-police); white-space: nowrap; cursor: default;
}
html.v5 .aj-seg::before, html.v5 .aj-seg::after{ content: none; }
html.v5 .aj-seg:hover{ filter: brightness(.96); }
html.v5 .aj-seg:active{ background: var(--v5-bouton-presse); filter: none; }
html.v5 .aj-seg b{ font-weight: var(--v5-g-fort); color: var(--v5-texte); font-variant-numeric: tabular-nums; }
html.v5 .aj-seg small{ font-size: var(--v5-t-12); color: var(--v5-texte-3); }
/* 25/10 (audit, P1) : plus de gros chiffre rouge en double avec « À faire » ; le chiffre reste neutre, un point dit l'urgence
   (rouge = en retard, orange = quelqu'un attend), comme partout ailleurs (un état = un point + un mot) */
html.v5 .aj-seg.ton-danger b:not(#_), html.v5 .aj-seg.ton-warn b:not(#_){ color: var(--v5-texte); }
html.v5 .aj-seg.ton-danger b::after, html.v5 .aj-seg.ton-warn b::after{ content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; vertical-align: middle; background: var(--v5-rouge); }
html.v5 .aj-seg.ton-warn b::after{ background: var(--v5-orange); }

/* groupes */
html.v5 .aj-bloc{ margin: 0 0 22px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html.v5 .aj-bloc-tete{ display: flex; align-items: center; justify-content: space-between; gap: 8px; height: auto; min-height: 0; margin: 0 12px 6px; padding: 0; border: 0; background: none; }
html.v5 .aj-bloc-tete h3{ margin: 0; font-size: var(--v5-t-13); font-weight: var(--v5-g-fort); line-height: 16px; letter-spacing: normal; text-transform: none; color: var(--v5-texte); }
html.v5 .aj-quand{ font-size: var(--v5-t-12); color: var(--v5-texte-3); }
html.v5 .aj-ligne{
  position: relative; display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: 48px; margin: 0; padding: 8px 12px;
  border: 0; border-radius: 0; background: var(--v5-fond-groupe); box-shadow: none; text-align: left; color: var(--v5-texte); font: inherit; cursor: default;
  --v5-focus-decalage: -3px;
}
html.v5 .aj-ligne + .aj-ligne::before{ content: ""; position: absolute; top: 0; left: 54px; right: 12px; height: 1px; background: var(--v5-separateur); }
html.v5 .aj-bloc-tete + .aj-ligne{ border-top-left-radius: var(--v5-r-groupe); border-top-right-radius: var(--v5-r-groupe); }
html.v5 .aj-ligne:not(:has(+ .aj-ligne)){ border-bottom-left-radius: var(--v5-r-groupe); border-bottom-right-radius: var(--v5-r-groupe); }
html.v5 .aj-ligne.aj-cliquable:active{ background: var(--v5-rempli-2); }
/* chevron de divulgation à droite des lignes qui ouvrent une page */
html.v5 .aj-ligne.aj-cliquable::after{
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 6px; border: solid var(--v5-texte-3); border-width: 1.6px 1.6px 0 0; border-radius: 1px; transform: rotate(45deg);
}
/* vignette : tuile arrondie (photo ou initiale) */
html.v5 .aj-vignette{ display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--v5-r-sel); background: var(--v5-rempli-2); color: var(--v5-texte-2); font-size: var(--v5-t-13); font-weight: var(--v5-g-fort); object-fit: cover; overflow: hidden; }
html.v5 .aj-vignette.aj-alerte{ background: var(--v5-rouge-doux); color: var(--v5-rouge); }
html.v5 .aj-txt{ display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
html.v5 .aj-txt b{ font-size: var(--v5-t-13); font-weight: var(--v5-g-moyen); line-height: 16px; color: var(--v5-texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.v5 .aj-txt span{ font-size: var(--v5-t-12); line-height: 15px; color: var(--v5-texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* message d'un groupe sans ligne : même conteneur arrondi */
html.v5 #aj-corps .aj-bloc > .status-line{ margin: 0; padding: 12px; border-radius: var(--v5-r-groupe); background: var(--v5-fond-groupe); font-size: var(--v5-t-13); line-height: 1.45; color: var(--v5-texte-2); }
html.v5 #aj-corps .aj-bloc > .status-line + .status-line, html.v5 #aj-corps .aj-bloc > p.status-line + div{ margin-top: 8px; }

/* ---- 10/10 : le résumé devient une rangée de cartes — grand chiffre, libellé dessous, précision en petit. Toujours cliquables. */
html.v5 .aj-resume{ display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 26px; }
html.v5 .aj-seg{
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; box-sizing: border-box; height: auto; min-height: 84px; padding: 14px 14px 12px;
  border-radius: var(--v5-r-groupe); background: var(--v5-fond); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur);
  font-size: var(--v5-t-12); line-height: 15px; color: var(--v5-texte-2); white-space: normal; text-align: left;
}
html.v5 .aj-seg:hover{ filter: none; background: var(--v5-rempli-3); }
html.v5 .aj-seg b{ display: block; font-size: var(--v5-t-26); font-weight: var(--v5-g-gras); line-height: var(--v5-i-26); letter-spacing: -.02em; }
html.v5 .aj-seg small{ display: block; font-size: var(--v5-t-11); }

/* 11/10 — tuiles du résumé : toutes de la même hauteur et alignées en haut (la tuile « ce mois », qui a une ligne de plus,
   dépassait des autres de 6 px en haut et en bas) */
html.v5 .aj-resume{ align-items: stretch; }

/* 12/10 — cinq chiffres de tête (colis, offres, messages, à débloquer, ce mois) : en 4 + 1, la dernière tuile restait seule à gauche. Selon la place réelle de la page :
   5 colonnes d'une ligne si elles tiennent (≥ 700 px), sinon 3 + 2 de largeurs égales par ligne (grille de 6 : trois tuiles de 2, deux tuiles de 3). Autres nombres de tuiles : inchangé. */
html.v5 #aj-corps{ container-type: inline-size; }
@container (min-width: 700px){ html.v5 .aj-resume:has(> :nth-child(5):last-child){ grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container (max-width: 699px){
  html.v5 .aj-resume:has(> :nth-child(5):last-child){ grid-template-columns: repeat(6, minmax(0, 1fr)); }
  html.v5 .aj-resume:has(> :nth-child(5):last-child) > *{ grid-column: span 2; }
  html.v5 .aj-resume:has(> :nth-child(5):last-child) > :nth-child(n+4){ grid-column: span 3; }
}

/* 12/10 — une tuile du résumé est une DESTINATION (elle ouvre la page du chiffre) : un chevron en haut à droite le dit, sans bouton ni couleur.
   La précision en petit (« 6 ventes ») passe à la ligne : le « · » qui la séparait sur une ligne ne sert plus à rien. */
html.v5 .aj-seg{ position: relative; }
html.v5 .aj-seg::after{
  content: ""; position: absolute; top: 50%; margin-top: -4px; right: 14px; width: 6px; height: 6px; border: solid var(--v5-texte-3); border-width: 1.5px 1.5px 0 0; border-radius: 1px; transform: rotate(45deg);
}
html.v5 .aj-seg:hover::after{ border-color: var(--v5-texte-2); }
html.v5 .aj-seg small .aj-pt{ display: none; }

/* 13/10 — accueil : une salutation et une phrase (js/aujourdhui.js, vtAccueilDuJour). Beaucoup d'air au-dessus, un titre généreux,
   le texte secondaire en gris : on sait en deux secondes ce qui attend ce soir. */
html.v5 .aj-accueil{ margin: 28px 0 26px; padding: 0 2px; }
html.v5 .aj-accueil h2{ margin: 0 0 6px; font-size: var(--v5-t-26); font-weight: var(--v5-g-gras); line-height: var(--v5-i-26); letter-spacing: -.02em; color: var(--v5-texte); }
/* 25/10 : la phrase coupait au milieu (« et 3 / messages non lus ») alors que la place ne manquait pas */
html.v5 .aj-accueil p{ max-width: 92ch; text-wrap: pretty; margin: 0; font-size: var(--v5-t-15); line-height: 22px; color: var(--v5-texte-2); }
html.v5 .aj-accueil .aj-mini{ margin-top: 14px; }
/* 13/10 — un chiffre nul ne réclame pas l'attention : il passe en gris (la tuile reste cliquable) */
html.v5 .aj-seg.aj-zero b{ color: var(--v5-texte-3); }
/* « À débloquer » : le titre dit déjà que ça presse ; la vignette n'a plus de fond rouge, seul le « ! » garde la couleur */
html.v5 .aj-vignette.aj-alerte{ background: var(--v5-rempli-3); color: var(--v5-rouge); font-weight: var(--v5-g-gras); }

/* ---- 22/10 : « À faire » — une ligne par action requise, une case vide à gauche (comme une liste de tâches Notion),
   colorée selon l'urgence : rouge = bloqué ou en retard, orange = quelqu'un attend, gris = à faire quand tu peux. */
/* 25/10 (Lucas : ces actions se règlent toutes seules, une case à cocher est trompeuse) : l'icône du type d'action, teintée
   selon l'urgence, sans fond ni contour (comme les icônes de page de Notion) */
html.v5 .aj-tache-ic{ flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin: 0 6px 0 6px; color: var(--v5-texte-3); }
html.v5 .aj-tache-ic svg{ width: 16px; height: 16px; }
html.v5 .aj-tache[data-urgence="danger"] .aj-tache-ic{ color: var(--v5-rouge); }
html.v5 .aj-tache[data-urgence="attente"] .aj-tache-ic{ color: var(--v5-orange); }
html.v5 .aj-tache-ic.fait{ color: var(--v5-vert); }
html.v5 .aj-tache-case{ flex: none; box-sizing: border-box; width: 16px; height: 16px; margin: 0 8px 0 8px; border: 1.5px solid var(--v5-texte-3); border-radius: 4px; }
html.v5 .aj-tache[data-urgence="danger"] .aj-tache-case{ border-color: var(--v5-rouge); }
html.v5 .aj-tache[data-urgence="attente"] .aj-tache-case{ border-color: var(--v5-orange); }
html.v5 .aj-tache-case.fait{ border-color: var(--v5-violet); background: var(--v5-violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
html.v5 .aj-tache:hover .aj-tache-case{ border-color: var(--v5-texte-2); }
html.v5 .aj-tache-vide .aj-txt b{ color: var(--v5-texte-2); }
/* objectifs : le titre reste aligné sur celui des autres groupes */
html.v5 .aj-bloc.obj .aj-bloc-tete{ margin-right: 4px; }

/* ================================================================== 25/10 : listes façon Notion (Lucas : « redessine encore un peu
   dans le style de Notion en gardant l'esprit de BDRD ») : plus de boîte grise encadrée autour des listes ; les lignes sont posées sur
   la page, séparées d'un trait fin, et prennent un fond doux arrondi seulement au survol. Le violet reste aux actions. */
html.v5 #aj-corps .aj-ligne{ background: none; border-radius: var(--v5-r-sel); box-shadow: none; }
html.v5 #aj-corps .aj-ligne.aj-cliquable:hover{ background: var(--v5-survol); --v5-texte-3: var(--v5-texte-2); }
html.v5 #aj-corps .aj-ligne + .aj-ligne::before{ left: 12px; right: 12px; }
html.v5 #aj-corps .aj-ligne:hover::before, html.v5 #aj-corps .aj-ligne:hover + .aj-ligne::before{ opacity: 0; }
html.v5 #aj-corps .aj-bloc-tete{ margin-left: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--v5-separateur); margin-bottom: 2px; }

/* ================================================================== 25/10 : gamme « Notion » choisie par Lucas pour Aujourd'hui
   (composants et couleurs inchangés, cadre des comptes de la barre latérale gardé) : page plus large et plus aérée, date au-dessus
   d'un grand titre, tuiles en aplats doux sans contour, titres de groupe plus présents, lignes sans filet entre elles. */
html.v5 #aj-corps{ max-width: 860px; padding: 28px 24px 72px; }
html.v5 .aj-accueil{ margin: 28px 0 30px; }
html.v5 .aj-date{ margin: 0 0 4px; font-size: var(--v5-t-13); line-height: 16px; color: var(--v5-texte-3); }
html.v5 .aj-date::first-letter{ text-transform: uppercase; }
html.v5 .aj-accueil h2{ margin-bottom: 8px; font-size: 34px; line-height: 40px; }
html.v5 .aj-resume{ gap: 10px; margin-bottom: 32px; }
html.v5 .aj-seg{ min-height: 76px; padding: 14px; border-radius: var(--v5-r-sel); background: var(--v5-rempli-3); box-shadow: none; }
html.v5 .aj-seg:hover{ background: var(--v5-survol); --v5-texte-3: var(--v5-texte-2); }
html.v5 .aj-seg b{ font-size: 22px; line-height: 26px; }
/* chevron de la tuile : seulement au survol, comme les actions de ligne de Notion */
html.v5 .aj-seg::after{ opacity: 0; }
html.v5 .aj-seg:hover::after{ opacity: 1; }
html.v5 .aj-bloc{ margin-bottom: 30px; }
html.v5 #aj-corps .aj-bloc-tete{ margin-left: 2px; margin-right: 2px; padding-bottom: 8px; margin-bottom: 4px; }
html.v5 .aj-bloc-tete h3{ font-size: var(--v5-t-15); line-height: 20px; }
html.v5 #aj-corps .aj-ligne{ padding: 8px 6px; }
html.v5 #aj-corps .aj-ligne + .aj-ligne::before{ content: none; }
