/* ────────────────────────────────────────────────────────────────────────
   VK-CONTRAST — correctifs de LISIBILITÉ du thème CLAIR (chargé EN DERNIER, sur toutes les pages).
   Cible : texte ≥ 4,5:1, boutons pleins lisibles, badges/pastilles sans couleurs « pensées pour le sombre ».
   Ne touche que la présentation, uniquement en thème clair (html[data-theme="light"]).
   ──────────────────────────────────────────────────────────────────────── */

/* ── 1. Jetons : gris et or réellement lisibles sur papier/ivoire ── */
html[data-theme="light"]{
  --gold:#7A5C22; --gold-light:#6B4F1F; --gold-bright:#4A3614;
  --n-300:#463F3C; --n-400:#554D49; --n-500:#5F5650; --n-600:#6A6059;
  --vk-ok:#1F6B3A; --vk-warn:#8A4B00; --vk-err:#8E1F30; --vk-info:#5B3FA0; --vk-neutral:#4A4A52;
}

/* ── 2. Texte clair posé sur fond bordeaux / noir (la couleur « blanche » du thème devient encre en clair) ── */
html[data-theme="light"] :is(.btn-primary,.auth-tab.active,.proof-nav,.seg button.active,.period-toggle-btn.is-active,
  .photo-current-wrap .pcw-remove,.vp-block-num,.vk-atraiter-badge,.review-avatar,.vk-annot-label,.lr-tech-tag,.session-timer .btn,
  .lr-confirm-btn,.lr-confirm-btn:hover){ color:#F4F1EC !important; }
html[data-theme="light"] :is(.mp-del,.session-summary-photo-remove,.gm-remove,.gm-tag,.profile-photo-remove){ color:#F4F1EC !important; }
html[data-theme="light"] [style*="background:rgba(0,0,0,0.5"][style*="color:var(--white)"],
html[data-theme="light"] [style*="background:rgba(0,0,0,0.6"][style*="color:var(--white)"],
html[data-theme="light"] [style*="background:rgba(0,0,0,0.65"][style*="color:var(--white)"]{ color:#F4F1EC !important; }
html[data-theme="light"] .mpg-cell{ color:var(--white) !important; }
html[data-theme="light"] .today-tag{ color:#F4F1EC !important; }

/* ── 3. Statuts : couleurs foncées en clair (les verts/ambres/violets pastel étaient faits pour le noir) ── */
html[data-theme="light"] :is(.client-badge.active,.client-badge.pay-a_jour,.reward-badge.given,.status-client,.progress-badge-better,
  .cal-item.cal-item-done,.ledger-paid-date,.ledger-totals .ok,.icon-btn.published,.save-msg,.cw-ok,.meal-plan-line .mp-item.ok b,
  .cardio-session-done-tag,.vk-confirm-check,.day-row-saved,.days-block-saved-msg,.at-recap-cell em.up){ color:var(--vk-ok) !important; }
html[data-theme="light"] :is(.client-badge.active,.client-badge.pay-a_jour,.reward-badge.given,.status-client,.progress-badge-better,.cal-item.cal-item-done){
  background:rgba(31,107,58,.11) !important; border-color:rgba(31,107,58,.38) !important; }
html[data-theme="light"] :is(.cal-item.cal-item-partial,.hm-warn,.at-recap-cell em.down){ color:var(--vk-warn) !important; }
html[data-theme="light"] .cal-item.cal-item-partial{ background:rgba(138,75,0,.10) !important; }
html[data-theme="light"] .lr-tech-note{ color:var(--vk-info) !important; font-size:11px; }
html[data-theme="light"] :is(.role-badge.tertiaire,.client-badge.mode-standard,.status-contacte,.status-pas_retenu){
  color:var(--vk-neutral) !important; background:rgba(74,74,82,.10) !important; }
html[data-theme="light"] :is(.role-badge.principal,.client-badge.pending,.status-call_fixe,.at-priority.high,.client-priority.high,
  .capture-error,.corr-label,.cta-block p b){ color:var(--vk-err) !important; }
html[data-theme="light"] :is(.role-badge.secondaire,.client-badge.approved,.at-count){ color:#6B4F1F !important; }
html[data-theme="light"] .vk-chart-stat-value{ color:var(--gold) !important; }
html[data-theme="light"] .vk-chart-stat-label{ color:var(--n-500) !important; }
html[data-theme="light"] :is(.est-base-hint,.sched-mac.empty,.ov-bullet button,.daily-table td.dt-empty,.weekly-table td.wt-empty,.slr-skip-note){ color:var(--n-500) !important; }

/* ── 4. Pieds de page, mentions et textes secondaires des pages publiques ── */
html[data-theme="light"] :is(.footer-copy,.footer-legal,.footer-legal a,p.updated,.demande-question-sub,.auth-tab:not(.active)){ color:var(--n-500) !important; }
html[data-theme="light"] .process-row .n{ color:#B9AC93 !important; }
html[data-theme="light"] :is(.placeholder,p.placeholder){ color:var(--gold-light) !important; }

/* ── 5. Placeholders et champs : bord visible, texte net ── */
html[data-theme="light"] ::placeholder{ color:#6A6059 !important; opacity:1 !important; }
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not(:focus),
html[data-theme="light"] select:not(:focus), html[data-theme="light"] textarea:not(:focus){ border-color:#B9AE9E; }

/* ── 6. Entraînement : valider une série, champs reps/kg, boutons ▲▼ ── */
html[data-theme="light"] .log-row input.lr-reps, html[data-theme="light"] .log-row input.lr-weight,
html[data-theme="light"] .slr-member input, html[data-theme="light"] .ss-wu-row input{
  background:#FFFFFF !important; color:#171313 !important; font-weight:600; border:1.5px solid #B9AE9E !important; }
html[data-theme="light"] .log-row input.lr-reps:focus, html[data-theme="light"] .log-row input.lr-weight:focus{ border-color:#7E1D2B !important; box-shadow:0 0 0 2px rgba(126,29,43,.18); }
html[data-theme="light"] :is(.lr-step-btn,.lr-copy-weight){ background:#E2D9C8 !important; color:#2B2624 !important; font-size:10px; border-left:1px solid #B9AE9E !important; }
html[data-theme="light"] .log-row .lr-num{ color:#2B2624; font-weight:700; }
html[data-theme="light"] :is(.lr-wu-tag,.warmup-rows .log-row .lr-num){ color:var(--n-400); }
html[data-theme="light"] .lr-notes-toggle{ opacity:.7; }
/* séries pré-remplies (poids repris de la dernière fois) : bien lisibles, mais clairement « à valider » */
html[data-theme="light"] .row-unconfirmed input.lr-weight, html[data-theme="light"] .row-unconfirmed input.lr-reps,
html[data-theme="light"] .row-unconfirmed input.slr-weight, html[data-theme="light"] .row-unconfirmed input.slr-reps,
html[data-theme="light"] .row-unconfirmed input.ss-wu-weight, html[data-theme="light"] .row-unconfirmed input.ss-wu-reps{
  opacity:1 !important; color:#4A4342 !important; border-style:dashed !important; border-color:#7A5C22 !important; background:#FBF6EA !important; }
html[data-theme="light"] .lr-unconfirmed-bar{ background:#FBF4E4; border:1.5px dashed #7A5C22; padding:4px 8px; color:#6B4F1F; }
html[data-theme="light"] .lr-confirm-btn{
  background:#7E1D2B !important; border:none; font-size:13px; letter-spacing:.05em; padding:7px 16px; min-height:34px; border-radius:6px; line-height:1.2; }
html[data-theme="light"] .lr-confirm-btn:hover, html[data-theme="light"] .lr-confirm-btn:active{ background:#5E1622 !important; }
html[data-theme="light"] .lr-validate-bar .lr-confirm-btn{ width:100%; }
html[data-theme="light"] .session-locked-wrap.is-locked{ opacity:.72; filter:grayscale(.2); }
html[data-theme="light"] .week-recap-day{ font-size:12px; font-weight:700; }
html[data-theme="light"] ::placeholder{ font-weight:400 !important; }
html[data-theme="light"] :is(.add-set-btn,.ss-wu-add){ border:1.5px dashed #9C8F7A !important; color:#3F3836 !important; font-size:12px; min-height:40px; }
html[data-theme="light"] .add-warmup-btn{ border:1.5px dashed #7A5C22 !important; color:#6B4F1F !important; font-size:12px; min-height:34px; background:#FBF4E4 !important; }
html[data-theme="light"] :is(.add-set-btn,.add-warmup-btn,.ss-wu-add):hover{ border-color:#7E1D2B !important; color:#7E1D2B !important; }
/* jours de repos / éléments « atténués » : on garde la hiérarchie sans passer sous le seuil de lisibilité */
html[data-theme="light"] .week-recap-row.week-recap-rest{ opacity:1; background:transparent; }
html[data-theme="light"] .week-recap-row.week-recap-rest .week-recap-content{ color:var(--n-500); }
html[data-theme="light"] .week-recap-day{ color:#6B4F1F; }
html[data-theme="light"] .dc-date{ opacity:1 !important; font-size:11px !important; }
html[data-theme="light"] .cal-item{ font-size:11px; padding:3px 6px; }
html[data-theme="light"] .cal-item.cal-item-program{ background:#E7DCC4; color:#171313; }
html[data-theme="light"] .cal-item.cal-item-program.cal-item-done, html[data-theme="light"] .cal-item.cal-item-done{ background:#DCEBDD !important; color:#1F6B3A !important; }
html[data-theme="light"] .footer-legal-sep{ color:#8F8269 !important; }
/* états « atténués » : jamais en dessous d'une lisibilité correcte */
html[data-theme="light"] :is(.slr-member-skip,.lr-weight-locked,.mpg-row.off,.seg-btn.taken,.edu-subcat-card.locked,.supp-inactive){ opacity:.7 !important; }
html[data-theme="light"] :is(.oa-note-btn,.cal-item.cal-item-removed,.roadmap-table .rt-save-row,.shop-item.done,.field-save-btn){ opacity:.62 !important; }
html[data-theme="light"] .cal-cell.other-month{ opacity:.5; }
/* calendrier : tient dans l'écran mobile ; sur petit écran les séances deviennent des barres de couleur
   (la légende au-dessus les explique, le détail s'ouvre en touchant le jour) au lieu d'un « S… » illisible */
@media (max-width:520px){
  .cal-nav-btns{ width:100%; flex-wrap:wrap; justify-content:space-between; gap:8px; }
  .cal-month-label{ order:-1; flex:1 0 100%; min-width:0 !important; text-align:left; font-size:17px; }
  .cal-grid{ gap:3px; }
  .cal-cell{ padding:4px 3px; min-height:62px; }
  html[data-theme] .cal-item, .cal-note-indicator{ font-size:0 !important; height:7px; min-height:7px; padding:0 !important; border-left:0 !important; border-radius:4px; margin-top:1px; overflow:hidden; }
  html[data-theme] .cal-item{ background:#554D49; }
  html[data-theme] .cal-item.cal-item-program{ background:#7E1D2B; }
  html[data-theme] .cal-item.cal-item-scheduled{ background:#7A5C22; }
  html[data-theme] .cal-item.cal-item-activity{ background:#4A4A52; }
  html[data-theme] .cal-item.cal-item-done, .cal-item.cal-item-program.cal-item-done{ background:#1F6B3A !important; }
  html[data-theme] .cal-note-indicator{ background:#B9AC93; }
}
/* boutons pleine largeur : le libellé passe à la ligne au lieu de déborder */
.btn-block, .btn.btn-ghost{ white-space:normal; max-width:100%; box-sizing:border-box; line-height:1.25; }
.btn-block{ padding-left:14px; padding-right:14px; }

/* ── Taille du texte (réglage Personnalisation) : agrandit le contenu ; en-tête et barre du bas gardent leur taille ── */
html[data-fs="1"]{ zoom:1.1; }
html[data-fs="2"]{ zoom:1.2; }
html[data-fs="1"] .vk-tabbar, html[data-fs="1"] header{ zoom:.909; }
html[data-fs="2"] .vk-tabbar, html[data-fs="2"] header{ zoom:.833; }
html[data-fs] body{ overflow-x:hidden; }

/* ── Pop-up de fin de séance + autres fenêtres : vraie version claire (elles restaient noires) ── */
html[data-theme="light"] .session-summary-overlay, html[data-theme="light"] .badge-popup-overlay{ background:rgba(23,19,19,.5); }
html[data-theme="light"] .session-summary-card{ background:#FFFFFF; border:1px solid #B9AE9E; border-top:3px solid #7E1D2B; box-shadow:0 18px 50px rgba(23,19,19,.25); }
html[data-theme="light"] .session-summary-card::before{ background:radial-gradient(circle at 50% 0%, rgba(126,29,43,.12), rgba(126,29,43,0) 70%); }
html[data-theme="light"] .session-summary-title, html[data-theme="light"] .session-summary-tier{ color:#171313; }
html[data-theme="light"] .session-summary-tonnage-value{ color:#7E1D2B; }
html[data-theme="light"] .session-summary-tonnage-label, html[data-theme="light"] .session-summary-tonnage-unit{ color:#463F3C; }
html[data-theme="light"] .session-summary-stat{ background:#F6F2EA; border:1px solid #B9AE9E; }
html[data-theme="light"] .session-summary-stat b{ color:#171313; }
html[data-theme="light"] .session-summary-stat span{ color:#554D49; font-size:11px; }
html[data-theme="light"] .session-summary-divider{ background:#7A5C22; }
html[data-theme="light"] .session-summary-feedback-sep{ color:#554D49; border-top-color:#B9AE9E; font-size:11px; }
html[data-theme="light"] .session-summary-share-hint{ color:#554D49; opacity:1; }
html[data-theme="light"] .session-summary-photo-add{ background:#FBF4E4; border-color:#7A5C22; color:#6B4F1F; }
html[data-theme="light"] .session-summary-photo-uploading{ color:#554D49; }
html[data-theme="light"] .session-summary-export-btn{ color:#F4F1EC !important; border-color:#5E1622; }
html[data-theme="light"] .session-summary-card .vk-ember{ opacity:.35; }
html[data-theme="light"] .badge-popup-card{ background:#FFFFFF; border-color:#B9AE9E; }
.session-summary-card textarea, .session-summary-card input[type="text"]{ box-sizing:border-box; width:100%; max-width:100%; }
