/* ===== Responsabilités (calendrier, tâches, modèles) ===== */
.resp-header { flex-wrap: wrap; gap: 10px; }
.resp-head-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.resp-head-tools .primary-btn, .resp-head-tools .secondary-btn { margin: 0; padding: 7px 14px; }
.resp-cat-filter, .resp-search { padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.resp-seg { display: inline-flex; border: 1px solid rgba(127,127,127,.35); border-radius: 999px; overflow: hidden; }
.resp-seg-btn { border: none; background: transparent; color: inherit; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.resp-seg-btn.active { background: var(--accent-bg, rgba(37,99,235,.1)); color: var(--accent, #2563eb); font-weight: 600; }

/* --- Mois --- */
.resp-month-nav { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.resp-nav-btn { border: 1px solid rgba(127,127,127,.35); background: transparent; color: inherit; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 15px; line-height: 1.2; }
.resp-nav-btn:hover { background: rgba(127,127,127,.12); }
.resp-today-btn { font-size: 12px; }
.resp-month-title { font-weight: 700; font-size: 16px; margin-left: 8px; }
.resp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.resp-wd-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #71717a); text-align: center; padding: 2px 0 4px; }
.resp-cell { min-height: 92px; border-radius: 8px; border: 1px solid rgba(127,127,127,.18); padding: 4px 5px; background: rgba(127,127,127,.04); display: flex; flex-direction: column; }
.resp-cell.other { opacity: .45; }
.resp-cell.today { border-color: var(--accent, #2563eb); box-shadow: inset 0 0 0 1px var(--accent, #2563eb); }
.resp-cell.has-late { background: rgba(239,68,68,.07); }
.resp-cell-day { font-size: 12px; font-weight: 600; color: var(--muted, #a1a1aa); margin-bottom: 3px; }
.resp-cell.today .resp-cell-day { color: var(--accent, #2563eb); }
.resp-cell-items { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.resp-chip { display: block; font-size: 11px; line-height: 1.25; padding: 2px 6px; border-radius: 5px; border-left: 3px solid var(--c, #999); background: color-mix(in srgb, var(--tc, var(--c, #999)) 22%, transparent); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resp-chip:hover { background: color-mix(in srgb, var(--tc, var(--c, #999)) 38%, transparent); }
.resp-chip.done { opacity: .5; text-decoration: line-through; }
.resp-chip.late { box-shadow: inset 0 0 0 1px #ef4444; }

/* --- Partagé : mini-boutons, en-têtes de liste de choix --- */
.resp-mini { border: 1px solid rgba(127,127,127,.3); background: transparent; color: inherit; border-radius: 5px; width: 26px; height: 24px; cursor: pointer; font-size: 11px; }
.resp-mini:disabled { opacity: .25; cursor: default; }
.resp-mini:hover:not(:disabled) { background: rgba(127,127,127,.15); }
.resp-mini.danger:hover:not(:disabled) { background: #ef4444; color: #fff; border-color: #ef4444; }
.resp-pick-search { width: 100%; box-sizing: border-box; margin: 4px 0 10px; }
.resp-pick-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #a1a1aa); margin: 12px 0 4px; display: flex; align-items: center; gap: 6px; }
.resp-count { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: rgba(127,127,127,.18); font-weight: 600; letter-spacing: 0; text-transform: none; }

/* --- Période (badge bien visible des récurrentes) --- */
.resp-period { display: inline-block; align-self: flex-start; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c, #999) 24%, transparent); border: 1px solid color-mix(in srgb, var(--c, #999) 55%, transparent); margin: 3px 0 2px; }
.resp-period.small { font-size: 12px; margin: 0; }

/* --- Ajouter : créer ou modèle --- */
.resp-add-box { max-width: 720px; }
.resp-add-own { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 2px solid var(--accent, #2563eb); background: var(--accent-bg, rgba(37,99,235,.08)); color: inherit; border-radius: 12px; padding: 14px 16px; cursor: pointer; font-family: inherit; }
.resp-add-own:hover { filter: brightness(1.08); }
.resp-add-own-icon { font-size: 24px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent, #2563eb); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.resp-add-own > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.resp-add-own b { font-size: 15px; }
.resp-add-own small { font-size: 12px; color: var(--muted, #a1a1aa); }
.resp-add-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 12px; color: var(--muted, #a1a1aa); text-transform: uppercase; letter-spacing: .05em; }
.resp-add-sep::before, .resp-add-sep::after { content: ''; flex: 1; height: 1px; background: rgba(127,127,127,.3); }
.resp-tpl-list { max-height: 52vh; overflow: auto; padding-right: 4px; }
.resp-tpl-title { font-weight: 700; font-size: 14px; }
.resp-tpl-note { font-size: 11px; color: var(--muted, #a1a1aa); margin: 12px 0 0; font-style: italic; }

/* --- Fiche : échéanciers --- */
.resp-sched-summary { font-size: 13px; margin-bottom: 8px; }
.resp-sched-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.resp-sched-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #a1a1aa); padding: 4px 6px; border-bottom: 1px solid rgba(127,127,127,.25); }
.resp-sched-table td { padding: 6px; border-bottom: 1px solid rgba(127,127,127,.15); vertical-align: top; }
.resp-sched-table td small { color: var(--muted, #a1a1aa); font-size: 11px; }
.resp-sched-table tr.ended td { opacity: .55; }
.resp-sched-actions { white-space: nowrap; text-align: right; }
.resp-sched-actions .resp-mini { margin-left: 3px; }
.resp-sched-add { margin: 0 !important; padding: 6px 12px !important; font-size: 13px !important; }
.resp-sched-why { font-size: 11px; color: var(--muted, #a1a1aa); margin: 8px 0 0; font-style: italic; }
.resp-sched-box { max-width: 620px; }
.resp-sched-builder .resp-dates { margin-bottom: 8px; }
.resp-sched-hint { margin: -4px 0 10px !important; font-size: 12px !important; }
.resp-kind-note { font-size: 12px; color: #b45309; margin: -4px 0 8px; }
body:not([data-theme="light"]) .resp-kind-note { color: #fcd34d; }

/* --- Suppression protégée --- */
.resp-del-box { max-width: 460px; }
.resp-del-text { font-size: 14px; margin: 0 0 8px; }
.resp-del-input { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.resp-del-link { border: none; background: transparent; color: var(--muted, #a1a1aa); font-size: 12px; cursor: pointer; text-decoration: underline dotted; padding: 4px 0; }
.resp-del-link:hover { color: #ef4444; }

/* --- Liste --- */
.resp-list-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 2px 0 10px; font-size: 13px; }
.resp-list-tools label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #a1a1aa); }
.resp-check input { margin: 0; }
.resp-list-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #a1a1aa); margin: 16px 0 6px; display: flex; align-items: center; gap: 6px; }
.resp-list-h:first-child { margin-top: 0; }
.resp-list-h.late { color: #ef4444; }
.resp-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(127,127,127,.18); margin-bottom: 4px; cursor: pointer; font-size: 13px; }
.resp-row:hover { background: rgba(127,127,127,.08); }
.resp-row.done { opacity: .55; }
.resp-row.late { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.06); }
.resp-row-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #999); flex: none; }
.resp-row-date { width: 120px; flex: none; font-weight: 600; display: flex; flex-direction: column; }
.resp-row-date small, .resp-row-title small { font-weight: 400; font-size: 11px; color: var(--muted, #a1a1aa); }
.resp-row-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.resp-row.done .resp-row-title { text-decoration: line-through; }
.resp-done-btn { border: 1px solid rgba(127,127,127,.35); background: transparent; color: inherit; border-radius: 6px; width: 30px; height: 28px; cursor: pointer; font-size: 14px; flex: none; }
.resp-done-btn:hover { background: #22c55e; color: #fff; border-color: #22c55e; }
.resp-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(127,127,127,.18); white-space: nowrap; }
.resp-tag.ok { background: rgba(34,197,94,.2); color: #15803d; }
.resp-tag.prep { background: rgba(245,158,11,.22); color: #b45309; }
.resp-tag.late { background: rgba(239,68,68,.2); color: #b91c1c; }
.resp-tag.cat { background: color-mix(in srgb, var(--tc, var(--c, #999)) 25%, transparent); border-left: 3px solid var(--c, #999); }
.resp-color-row { display: flex; align-items: center; gap: 10px; }
.resp-color-row input[type=color] { width: 44px; height: 30px; padding: 2px; border-radius: 6px; cursor: pointer; }
.resp-color-row input[type=color]:disabled { opacity: .4; cursor: default; }
body:not([data-theme="light"]) .resp-tag.ok { color: #86efac; }
body:not([data-theme="light"]) .resp-tag.prep { color: #fcd34d; }
body:not([data-theme="light"]) .resp-tag.late { color: #fca5a5; }

/* --- Toutes les tâches --- */
.resp-task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.resp-task-card { border: 1px solid rgba(127,127,127,.25); border-left: 4px solid var(--c, #999); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; background: color-mix(in srgb, var(--tc, transparent) 14%, transparent); }
.resp-task-card:hover { background: color-mix(in srgb, var(--tc, #7f7f7f) 26%, transparent); }
.resp-task-card.past { opacity: .55; }
.resp-task-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--c, #999); font-weight: 700; }
.resp-task-title { font-weight: 700; font-size: 14px; }
.resp-task-when { font-size: 12px; color: var(--muted, #a1a1aa); }
.resp-task-next { font-size: 12px; margin-top: 2px; }
.resp-task-next.muted { color: var(--muted, #a1a1aa); font-style: italic; }
.resp-task-files { font-size: 12px; color: var(--muted, #a1a1aa); }

/* --- Modèles --- */
.resp-tpl { display: flex; gap: 14px; align-items: flex-start; border: 1px solid rgba(127,127,127,.25); border-left: 4px solid var(--c, #999); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.resp-tpl.used { opacity: .8; }
.resp-tpl-main { flex: 1; min-width: 0; }
.resp-tpl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.resp-tpl-side button { margin: 0; padding: 6px 12px; font-size: 13px; }
.resp-tpl-ref { font-size: 11px; color: var(--muted, #a1a1aa); margin-top: 3px; font-style: italic; }
.resp-tpl-desc { margin-top: 6px; font-size: 12px; }
.resp-tpl-desc summary { cursor: pointer; color: var(--accent, #2563eb); }
.resp-tpl-desc pre, .resp-desc { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.45; margin: 6px 0 0; background: rgba(127,127,127,.08); padding: 10px 12px; border-radius: 8px; }

/* --- Modale d'édition --- */
.resp-edit-box { max-width: 760px; }
.resp-span2 { grid-column: 1 / -1; }
.resp-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.resp-kind { display: flex; gap: 8px; align-items: flex-start; border: 1px solid rgba(127,127,127,.3); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.resp-kind:has(input:checked) { border-color: var(--accent, #2563eb); background: var(--accent-bg, rgba(37,99,235,.08)); }
.resp-kind input { margin: 3px 0 0; }
.resp-kind span { display: flex; flex-direction: column; gap: 2px; }
.resp-kind small { color: var(--muted, #a1a1aa); font-size: 11px; }
.resp-dates { margin-bottom: 8px; }
.resp-rrule { border: 1px dashed rgba(127,127,127,.35); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.resp-rrule-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.resp-rrule-hint { color: var(--muted, #a1a1aa); font-style: italic; font-size: 12px; }
.resp-rrule-hint:empty { display: none; }
.resp-num { width: 64px; }
.resp-wd { display: flex; gap: 4px; }
.resp-wd label { border: 1px solid rgba(127,127,127,.35); border-radius: 6px; padding: 3px 7px; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.resp-wd label:has(input:checked) { background: var(--accent-bg, rgba(37,99,235,.1)); border-color: var(--accent, #2563eb); }
.resp-wd input { margin: 0; }
#resp-f-desc { width: 100%; box-sizing: border-box; resize: vertical; font-family: inherit; font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; }
.resp-ref { font-size: 12px; color: var(--muted, #a1a1aa); font-style: italic; margin-top: 6px; }
.resp-files { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.resp-file-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 8px; border-radius: 6px; background: rgba(127,127,127,.08); }
.resp-file-row.pending { border: 1px dashed rgba(127,127,127,.35); background: transparent; }
.resp-file-row small { color: var(--muted, #a1a1aa); margin-left: auto; }
.resp-file-x { border: none; background: transparent; color: var(--muted, #a1a1aa); font-size: 16px; cursor: pointer; padding: 0 4px; }
.resp-file-x:hover:not(:disabled) { color: #ef4444; }
.resp-file-x:disabled { opacity: .3; cursor: default; }
.resp-files-add { display: flex; align-items: center; gap: 10px; }
.resp-files-add .secondary-btn { margin: 0; padding: 6px 12px; font-size: 13px; }
.resp-files-note { font-size: 12px; color: var(--muted, #a1a1aa); }
.resp-edit-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.resp-edit-actions button { margin: 0; }
.resp-spacer { flex: 1; }

/* --- Détail --- */
.resp-detail-box { max-width: 640px; }
.resp-detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.resp-detail-when { color: var(--muted, #a1a1aa); }
.resp-detail-occ { border: 1px solid rgba(127,127,127,.3); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.resp-detail-occ.done { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.07); }
.resp-detail-occ.late { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.06); }
.resp-detail-occ-actions { display: flex; gap: 8px; align-items: center; }
.resp-detail-occ-actions input { flex: 1; padding: 6px 8px; border-radius: 6px; }
.resp-detail-occ-actions button { margin: 0; padding: 6px 12px; }
#resp-detail-body h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #a1a1aa); }
.resp-file-list { margin: 0; padding-left: 18px; font-size: 13px; }
.resp-file-list li { margin: 3px 0; }
.resp-file-list small { color: var(--muted, #a1a1aa); margin: 0 6px; }
.resp-dl { text-decoration: none; }

/* --- Catégories --- */
.resp-cats-box { max-width: 460px; }
.resp-cats-list { display: flex; flex-direction: column; gap: 6px; }
.resp-cat-row { display: flex; align-items: center; gap: 8px; }
.resp-cat-row input[type=text] { flex: 1; padding: 6px 8px; border-radius: 6px; }
.resp-cat-row input[type=color] { width: 36px; height: 30px; padding: 2px; border-radius: 6px; }

/* --- Flash --- */
.resp-flash { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #111; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 1000; }
.resp-flash.bad { background: #b91c1c; }
.resp-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 760px) {
  .resp-cell { min-height: 60px; padding: 3px; }
  .resp-chip { font-size: 10px; padding: 1px 4px; }
  .resp-row-date { width: 90px; }
}
