/**
 * assets/css/charge.css — « Ma charge de travail » (espace et article de blog)
 * [2026-11] Préfixe « ch- ». S'appuie sur les variables et composants de
 * outils-pro.css (préfixe « op- ») ; autonome pour les parties propres à l'outil.
 */
.ch { --ch-w: #6d5dfc; --ch-w2: #e4dcff; --ch-off: #f5f5fa; --ch-abs: #cde7ff; --ch-mis: #ccf3e0; --ch-exc: #ff7a59;
      --ch-ok: #0b5c40; --ch-ok-bg: #ccf3e0; --ch-warn: #854d0e; --ch-warn-bg: #ffeaa1; --ch-bad: #9a3412; --ch-bad-bg: #ffd9cc; }
.ch { margin-top: 18px; }
.ch button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.ch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ch h2 { margin: 0; }

/* Chargement */
.ch-skel { display: grid; gap: 14px; }
.ch-skel div { height: 120px; border-radius: 24px; background: linear-gradient(90deg, #f1f1f8, #f8f8fc, #f1f1f8); background-size: 200% 100%; animation: ch-sk 1.2s infinite linear; }
.ch-skel div:first-child { height: 190px; }
@keyframes ch-sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ch-skel div { animation: none; } }

/* ── Réglage ─────────────────────────────────────────────────────────── */
.ch-bloc { border-top: 1px solid var(--op-line, #e8e8f2); padding: 16px 0 4px; }
.ch-bloc:first-of-type { border-top: 0; padding-top: 4px; }
.ch-lab { margin: 0 0 10px; font: 800 15px/1.3 'Outfit', 'DM Sans', system-ui, sans-serif; }
.ch-lab2 { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--op-muted2, #6b6b8a); text-transform: uppercase; letter-spacing: .04em; }
.ch-q { margin: 14px 0 8px; font-size: 14.5px; font-weight: 600; }
.ch-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ch-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--op-line, #e8e8f2); background: #fff; color: var(--op-ink, #1e1b4b);
  font-size: 14.5px; font-weight: 700; cursor: pointer; }
.ch-chip[aria-pressed="true"], .ch-chip[aria-checked="true"] { background: var(--op-ink, #1e1b4b); border-color: var(--op-ink, #1e1b4b); color: #fff; }
.ch-chip:focus-visible, .ch-seg-b:focus-visible, .ch-jour:focus-visible, .ch-step-b:focus-visible, .ch-day:focus-visible, .ch-q-b:focus-visible, .ch-opt:focus-visible, .ch-nav:focus-visible, .ch-x:focus-visible {
  outline: 3px solid var(--ch-w); outline-offset: 2px; }
.ch-plages { display: grid; gap: 10px; }
.ch-plage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-plage-n { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 28px; font-size: 13.5px; font-weight: 700; color: var(--op-muted, #5b5b7a); }
.ch-x--sm { width: 32px; height: 32px; }
.ch-x--sm svg { width: 16px; height: 16px; }
.ch-a { font-size: 14px; color: var(--op-muted, #5b5b7a); }
.ch-step { display: inline-flex; align-items: center; border: 1.5px solid var(--op-line, #e8e8f2); border-radius: 16px; background: #fff; overflow: hidden; touch-action: manipulation; }
.ch-step-b { width: 44px; height: 46px; border: 0; background: #f6f5ff; color: var(--op-ink, #1e1b4b); display: grid; place-items: center; cursor: pointer; user-select: none; -webkit-user-select: none; }
.ch-step-b:active { background: var(--ch-w2); }
.ch-step-v { min-width: 64px; text-align: center; font: 800 18px/1 'Outfit', 'DM Sans', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--op-ink, #1e1b4b); }
.ch-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--op-muted, #5b5b7a); display: grid; place-items: center; cursor: pointer; }
.ch-x:hover { background: #f1f1f8; }
.ch-add { margin-top: 10px; }
.ch-seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 18px; background: #f3f2fb; }
.ch-seg-b { flex: 1 1 auto; min-height: 42px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; color: var(--op-ink2, #3a3590); font-size: 14px; font-weight: 700; cursor: pointer; }
.ch-seg-b[aria-checked="true"] { background: #fff; color: var(--op-ink, #1e1b4b); box-shadow: 0 1px 3px rgba(30, 27, 75, .14); }
.ch-sous { padding: 4px 0 0; }
.ch-jours { display: flex; gap: 8px; }
.ch-jour { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--op-line, #e8e8f2); background: #fff; font-size: 16px; font-weight: 800; color: var(--op-muted, #5b5b7a); cursor: pointer; }
.ch-jour[aria-pressed="true"] { background: var(--ch-w); border-color: var(--ch-w); color: #fff; }
.ch-cycle { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: flex-end; }
.ch-cycle-d .op-input { max-width: 190px; }
.ch-apercu { margin: 18px 0 4px; padding: 14px 16px; border-radius: 18px; background: #f6f5ff; }
.ch-strip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 64px; align-items: end; }
.ch-strip-d { position: relative; height: 100%; border-radius: 8px; background: #fff; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.ch-strip-d i { display: block; background: var(--ch-w2); border-radius: 6px 6px 0 0; }
.ch-strip-d.is-w i { background: var(--ch-w); }
.ch-strip-d b { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 10px; font-weight: 700; color: var(--op-muted2, #6b6b8a); }
.ch-strip-d.is-w b { color: #fff; }
.ch-apercu-t { margin: 10px 0 0; font-size: 14.5px; color: var(--op-ink, #1e1b4b); }
.ch-setup-act { margin-top: 16px; }

/* ── État ────────────────────────────────────────────────────────────── */
.ch-etat { border-radius: 26px; padding: 20px 20px 16px; margin: 0 0 18px; background: var(--ch-ok-bg); color: var(--ch-ok); }
.ch-etat--1 { background: #fff4c7; color: var(--ch-warn); }
.ch-etat--2 { background: #ffe3d8; color: var(--ch-bad); }
.ch-etat-hd h2 { margin: 10px 0 14px; font: 800 20px/1.3 'Outfit', 'DM Sans', system-ui, sans-serif; color: inherit; }
.ch-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 800; }
.ch-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.ch-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .ch-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ch-kpi { background: #fff; border-radius: 18px; padding: 14px 14px 12px; border: 2px solid transparent; min-width: 0; color: var(--op-ink, #1e1b4b); }
.ch-kpi[data-niv="1"] { border-color: #f5c84c; }
.ch-kpi[data-niv="2"] { border-color: #ff8f73; }
.ch-kpi .l { display: block; font-size: 12px; font-weight: 700; color: var(--op-muted2, #6b6b8a); text-transform: uppercase; letter-spacing: .04em; }
.ch-kpi .n { display: block; margin-top: 6px; font: 800 24px/1.1 'Outfit', 'DM Sans', system-ui, sans-serif; overflow-wrap: anywhere; }
.ch-kpi .s { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--op-muted, #5b5b7a); }
.ch-etat-plus { margin: 12px 2px 0; font-size: 13.5px; line-height: 1.5; color: inherit; }

/* ── Aujourd'hui ─────────────────────────────────────────────────────── */
.ch-kick { margin: 0; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ch-w); }
.ch-auj h2 { font: 800 20px/1.25 'Outfit', 'DM Sans', system-ui, sans-serif; margin: 2px 0 0; }
.ch-auj h2::first-letter { text-transform: uppercase; }
.ch-auj-p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; font-size: 15px; color: var(--op-ink2, #3a3590); font-weight: 600; }
.ch-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ch-q-b { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--ch-w); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.ch-q-b:active { transform: scale(.97); }
.ch-q-b--ghost { background: #f3f2fb; color: var(--op-ink, #1e1b4b); }
.ch-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.ch-tag--mis { background: var(--ch-mis); color: #0b5c40; }
.ch-tag--abs { background: var(--ch-abs); color: #1e3a8a; }

/* ── Calendrier ──────────────────────────────────────────────────────── */
.ch-cal-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ch-cal-hd h2 { font: 800 19px/1.2 'Outfit', 'DM Sans', system-ui, sans-serif; }
.ch-nav { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--op-line, #e8e8f2); background: #fff; color: var(--op-ink, #1e1b4b); display: grid; place-items: center; cursor: pointer; flex: none; }
.ch-cal-aide { margin: 6px 0 12px; font-size: 13.5px; color: var(--op-muted, #5b5b7a); }
.ch-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.ch-cal-h { text-align: center; font-size: 12px; font-weight: 800; color: var(--op-muted2, #6b6b8a); padding-bottom: 2px; }
.ch-day { position: relative; aspect-ratio: 1 / 1.08; min-height: 44px; border-radius: 12px; border: 0; padding: 0; background: var(--ch-off); color: var(--op-muted, #5b5b7a);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: hidden; cursor: pointer; }
.ch-day i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ch-w2); z-index: 0; }
.ch-day.is-w { background: #f6f5ff; color: var(--op-ink, #1e1b4b); }
.ch-day.is-w i { background: #cfc8ff; }
.ch-day-n { position: relative; z-index: 1; margin-top: 5px; font-size: 14px; font-weight: 800; }
.ch-day-h { position: relative; z-index: 1; font-size: 11px; font-weight: 700; color: var(--op-ink2, #3a3590); }
.ch-day.src-exc::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ch-exc); z-index: 2; }
.ch-day.src-abs { background: var(--ch-abs); }
.ch-day.src-abs i { background: #a8d3fb; }
.ch-day.src-mis { background: #e3f8ee; }
.ch-day.src-mis i { background: #9fe3c2; }
.ch-day.is-ferie .ch-day-n { text-decoration: underline; text-decoration-color: var(--ch-exc); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ch-day.is-passe { opacity: .62; }
.ch-day.is-auj { box-shadow: inset 0 0 0 2.5px var(--op-ink, #1e1b4b); opacity: 1; }
.ch-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 12.5px; color: var(--op-muted, #5b5b7a); }
.ch-leg span { display: inline-flex; align-items: center; gap: 6px; }
.ch-leg i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-w { background: #cfc8ff; } .lg-off { background: var(--ch-off); border: 1px solid #e3e3ee; } .lg-exc { background: var(--ch-exc); border-radius: 50% !important; width: 9px !important; height: 9px !important; }
.lg-abs { background: var(--ch-abs); } .lg-mis { background: #9fe3c2; } .lg-fer { background: transparent; border-bottom: 2px solid var(--ch-exc); border-radius: 0 !important; }
.ch-cal-tot { margin: 8px 0 0; font-size: 13.5px; font-weight: 700; color: var(--op-ink2, #3a3590); }

/* ── Coupure ─────────────────────────────────────────────────────────── */
.ch-coup-per { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.ch-coup-dates { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 16px; }
.ch-cp-d { max-width: 180px; min-height: 38px; padding: 4px 10px; }
.ch-coup-res { margin: 0 0 10px; font-size: 15px; }
.ch-plaf { margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: #fff; font-size: 14px; line-height: 1.5; }
.ch-plaf p { margin: 0; }
.ch-plaf .op-small { margin-top: 4px; }
.ch-plaf-l { margin: 0 0 12px; }
.ch-ex { margin: 0 0 12px; }

/* ── Repères ─────────────────────────────────────────────────────────── */
.ch-rep > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.ch-rep > summary::-webkit-details-marker { display: none; }
.ch-rep > summary h2 { font: 800 19px/1.25 'Outfit', 'DM Sans', system-ui, sans-serif; }
.ch-rep > summary h2::after { content: " ▾"; font-size: 14px; color: var(--op-muted2, #6b6b8a); }
.ch-rep[open] > summary h2::after { content: " ▴"; }
.ch-rep > summary span { font-size: 14px; color: var(--op-muted, #5b5b7a); }
.ch-seuil { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--op-line, #e8e8f2); }
.ch-seuil-l { font-size: 14.5px; font-weight: 700; }
.ch-seuil-v { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-seuil .ch-step-v { min-width: 70px; font-size: 16px; }
.ch-dot { width: 11px; height: 11px; border-radius: 50%; }
.ch-dot--1 { background: #f5c84c; } .ch-dot--2 { background: #ff8f73; }
.ch-sources { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--op-line, #e8e8f2); font-size: 14px; line-height: 1.55; color: var(--op-muted, #5b5b7a); }
.ch-sources p { margin: 0 0 10px; }
.ch-sources a { color: var(--op-ink2, #3a3590); font-weight: 700; }

/* ── Feuille « Ce jour-là » ──────────────────────────────────────────── */
.ch-noscroll { overflow: hidden; }
.ch-sheet-w { position: fixed; inset: 0; z-index: 100050; display: flex; align-items: flex-end; justify-content: center; }
.ch-sheet-bg { position: absolute; inset: 0; background: rgba(30, 27, 75, .38); }
.ch-sheet { position: relative; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: #fff; border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(30, 27, 75, .18); animation: ch-up .18s ease-out; }
@media (min-width: 640px) { .ch-sheet-w { align-items: center; } .ch-sheet { border-radius: 26px; } }
@keyframes ch-up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .ch-sheet { animation: none; } }
.ch-sheet-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ch-sheet-hd h2 { font: 800 19px/1.25 'Outfit', 'DM Sans', system-ui, sans-serif; }
.ch-sheet-hd h2::first-letter { text-transform: uppercase; }
.ch-sheet-hd p { margin: 3px 0 0; font-size: 14px; color: var(--op-muted, #5b5b7a); }
.ch-sheet-b { display: grid; gap: 8px; }
.ch-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: 10px 16px; border-radius: 16px;
  border: 1.5px solid var(--op-line, #e8e8f2); background: #fff; text-align: left; cursor: pointer; color: var(--op-ink, #1e1b4b); }
.ch-opt strong { font-size: 15.5px; }
.ch-opt span { font-size: 13px; color: var(--op-muted, #5b5b7a); }
.ch-opt.is-on { border-color: var(--ch-w); background: #f6f5ff; }
.ch-opt.is-on strong::after { content: " ✓"; color: var(--ch-w); }
.ch-sheet-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-sheet-row .ch-q-b { background: #f3f2fb; color: var(--op-ink, #1e1b4b); }
.ch-perso { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: #f6f5ff; }

/* ── Message ─────────────────────────────────────────────────────────── */
.ch-toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 100060; max-width: 90vw;
  padding: 11px 18px; border-radius: 999px; background: #1e1b4b; color: #fff; font: 700 14px/1.3 'DM Sans', system-ui, sans-serif; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.ch-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ch-toast--err { background: #b42318; }

@media (max-width: 420px) {
  .ch-coup .ch-chip { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
  .ch-step-b { width: 42px; }
  .ch-step-v { min-width: 58px; font-size: 17px; }
  .op-card.ch-setup, .op-card.ch-auj, .op-card.ch-cal-c, .op-card.ch-coup, .op-card.ch-rep, .op-card.ch-mod { padding: 18px 16px; }
  .ch-cal { gap: 4px; }
  .ch-day-h { font-size: 10px; }
}
.ch-estim { display: block; margin-top: 4px; font-size: 12.5px; opacity: .85; }
/* Version publique (article de blog) */
.ch-etat--pub { margin: 14px 0 0; padding: 16px; }
.ch-etat--pub .ch-kpis { margin-top: 12px; }
.ch-pub-cta { margin-top: 18px; padding: 16px; border-radius: 18px; background: #fff4ed; }
.ch-pub-cta p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; color: var(--op-ink, #1e1b4b); }
.ch--blog { max-width: 860px; margin: 0 auto 28px; }
@media (min-width: 760px) { .ch-day { aspect-ratio: auto; min-height: 70px; } .ch-day-h { font-size: 12px; } }
html.mc-mur .ch-pub-cta { display: none; }
