/* Victoria — mission 25 : écrans Lead, Matin / Bilan et Mail à valider, reproduits d'après les maquettes validées (dossier maquettes-v5, 390 × 844).
   Valeurs identiques aux maquettes (cartes 22 px, boutons 48 px / rayon 14 / poids 500, petits boutons 34 px / rayon 10). Les couleurs passent par les variables de victoria.css ; les quelques teintes propres aux maquettes sont déclarées ici. */
:root {
  --v5-btn-line: #DCE3EC;   /* contour des boutons secondaires (maquette) */
  --v5-note: #E9EFF6;       /* bulle de Victoria */
  --v5-done: #8A93A3;       /* titre barré d'une priorité faite */
  --v5-ok: #4E9A7A;         /* priorité faite */
  --v5-urgent: #E0603F;     /* nouveau lead */
  --v5-urgent-ring: rgba(224, 96, 63, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --v5-btn-line: #3A4558; --v5-note: #232C3B; --v5-done: #7C8696; }
}
@keyframes v5-drop { 0% { transform: translateY(-14px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes v5-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--v5-urgent-ring); } 50% { box-shadow: 0 0 0 10px rgba(224, 96, 63, 0); } }
@media (prefers-reduced-motion: reduce) { .v5-screen *, .v5-banner * { animation: none !important; } }

/* Cadre d'un écran : plein écran, fond de page, 18 px en haut, 20 px sur les côtés (maquette) ; zones de sécurité de l'iPhone ajoutées */
.v5-screen, .v5-banner { line-height: normal; letter-spacing: normal; font-feature-settings: normal; font-size: 16px; font-weight: 400; } /* comme dans les maquettes : pas de chiffres tabulaires, pas d'interligne hérité */
.v5-screen picture, .v5-banner picture { display: flex; flex: none; line-height: 0; } /* la photo est un élément de la ligne flex, comme dans les maquettes */
.v5-screen { position: fixed; inset: 0; z-index: 46; box-sizing: border-box; background: var(--bg); color: var(--ink); font-family: var(--font); padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 0; display: flex; flex-direction: column; overflow: hidden; }
.v5-screen[hidden] { display: none; }
.v5-screen button, .v5-screen a { font-family: var(--font); -webkit-tap-highlight-color: transparent; }
.v5-in { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; position: relative; }
/* zone défilante : pleine largeur (ombres des cartes non coupées) et sa propre marge haute de 8 px (la bannière dépasse de 8 px) ; elle s'arrête au-dessus des boutons du bas */
.v5-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: -8px -20px 0; padding: 8px 20px 24px; }
.v5-card { border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.v5-note { padding: 14px 16px; border-radius: 18px; background: var(--v5-note); display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.v5-note img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center 22%; flex: none; }
.v5-note.plain { display: block; }
.v5-hr { height: 1px; background: var(--line); }

/* Boutons : 48 px / rayon 14 / poids 500 ; petits 34 px / rayon 10 */
.v5-btn { height: 48px; box-sizing: border-box; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 500; letter-spacing: .01em; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 20px; text-decoration: none; white-space: nowrap; }
.v5-btn.sec { border: 1px solid var(--v5-btn-line); background: var(--card); color: var(--ink); letter-spacing: 0; }
.v5-btn.full { width: 100%; }
.v5-btn.flex { flex: 1 1 0; min-width: 0; }
.v5-btn.auto { flex: 0 0 auto; }
.v5-btn[disabled] { opacity: .5; cursor: default; }
.v5-btn svg, .v5-sbtn svg { flex: none; }
.v5-sbtn { height: 34px; box-sizing: border-box; padding: 0 12px; border-radius: 10px; border: 0; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; text-decoration: none; position: relative; cursor: pointer; }
.v5-sbtn::after { content: ''; position: absolute; inset: -5px -4px; } /* zone tactile 44 px */
/* boutons du bas : à 28 px du bord (maquette) ; dans le flux, donc jamais par-dessus le contenu sur un petit écran */
.v5-bottom { flex: none; margin: 10px 0 calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.v5-row { display: flex; gap: 10px; }
.v5-foot { text-align: center; font-size: 13px; color: var(--t-soft); }
.v5-sec-fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 47; }

/* ---------- Bannière « nouveau lead » (maquette Lead-v5) : tombe du haut, dans l'écran Lead et partout dans l'appli ---------- */
.v5-banner { position: relative; margin: -8px -8px 0; z-index: 2; box-sizing: border-box; padding: 12px 14px; border-radius: 22px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow-top); display: flex; align-items: center; gap: 12px; animation: v5-drop .5s ease-out both; }
.v5-banner.g { position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 2147483000; max-width: 560px; margin: 0 auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v5-banner { background: rgba(30, 37, 50, .97); } }
.v5-banner img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 22%; flex: none; }
.v5-banner .bt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; }
.v5-banner .b1 { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--t-soft); }
.v5-banner .b1 i { width: 8px; height: 8px; border-radius: 50%; background: var(--v5-urgent); flex: none; }
.v5-banner .b2 { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Lead ---------- */
.v5-pill { margin-top: 23px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--v5-urgent); }
.v5-pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--v5-urgent); animation: v5-pulse 1.6s infinite; flex: none; }
.v5-pill.done { color: var(--ok-ink); } .v5-pill.done i { background: var(--ok); animation: none; }
.v5-pill.later { color: var(--t-soft); } .v5-pill.later i { background: var(--chev); animation: none; }
.v5-h1 { margin: 10px 0 0; font-size: 30px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; }
.v5-h1 span { color: var(--t-soft); font-weight: 400; }
.v5-facts { margin-top: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.v5-fact { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.v5-fact span:first-child { color: var(--t-soft); flex: none; } .v5-fact span:last-child { font-weight: 500; text-align: right; min-width: 0; }
.v5-lead-note { margin-top: 14px; }

/* ---------- Matin / Bilan ---------- */
.v5-top { display: flex; justify-content: space-between; font-size: 15px; color: var(--t-soft); }
.v5-hero { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.v5-hero img { box-sizing: content-box; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 3px solid var(--card); box-shadow: var(--shadow-photo); flex: none; }
.v5-hero .t { display: flex; flex-direction: column; gap: 2px; }
.v5-hero .t b { font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.v5-hero .t span { font-size: 15px; color: var(--t-soft); }
.v5-prios { margin-top: 20px; display: flex; flex-direction: column; }
.v5-prio { padding: 14px 16px; display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box; background: none; border: 0; text-align: left; color: inherit; cursor: pointer; }
.v5-prio .n { width: 28px; font-size: 22px; font-weight: 300; color: var(--accent); font-variant-numeric: tabular-nums; flex: none; }
.v5-prio .x { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.v5-prio .x .a { font-size: 17px; font-weight: 500; }
.v5-prio.fait .x .a { text-decoration: line-through; color: var(--v5-done); }
.v5-prio .x .b { font-size: 14px; color: var(--t-soft); display: flex; align-items: center; gap: 6px; }
.v5-prio .x .b i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.v5-prio .ck { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--check); box-sizing: border-box; display: flex; align-items: center; justify-content: center; position: relative; }
.v5-prio .ck::after { content: ''; position: absolute; inset: -9px; }
.v5-prio.fait .ck { background: var(--v5-ok); border-color: var(--v5-ok); }
.v5-prio-sep { height: 1px; margin-left: 58px; background: var(--line); }
.v5-empty { padding: 18px 16px; font-size: 15px; color: var(--t-soft); }
.v5-serie { margin-top: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.v5-serie .h { display: flex; justify-content: space-between; align-items: baseline; }
.v5-serie .h b { font-size: 16px; font-weight: 500; } .v5-serie .h span { font-size: 15px; color: var(--accent); font-weight: 500; }
.v5-week { display: flex; justify-content: space-between; }
.v5-week > span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.v5-week i { width: 30px; height: 30px; border-radius: 50%; box-sizing: border-box; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.v5-week i.g { background: var(--accent); } .v5-week i.t { background: var(--card); border: 2px solid var(--accent); }
.v5-week em { font-style: normal; font-size: 12px; color: var(--t-soft); }
.v5-serie p { margin: 0; font-size: 14px; color: var(--t-soft); }

/* ---------- Mail à valider ---------- */
.v5-mtop { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.v5-mtop .bk { width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 0; display: flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; padding: 0; }
.v5-mtop .tt { font-size: 15px; font-weight: 500; } .v5-mtop .sp { width: 44px; }
.v5-mail { margin-top: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.v5-mail .f { font-size: 14px; color: var(--t-soft); overflow-wrap: anywhere; } .v5-mail .f b { color: var(--ink); font-weight: 500; }
.v5-mail .hr { height: 1px; background: var(--line); margin: 4px 0; }
.v5-mail p { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.v5-shield { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--t-soft); }
.v5-err { margin-top: 10px; font-size: 14px; color: var(--bad); }
.v5-sent { margin-top: 12px; display: flex; flex-direction: column; }
.v5-sent .r { padding: 12px 16px; font-size: 14px; color: var(--t-soft); } .v5-sent .r b { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }

/* Carte d'accueil « Priorités du jour » : même gabarit que « Demain » */
#prio-card .daytile { font-size: 18px; font-weight: 600; }
