/* Planning v3 (WEB-A) : sections imbriquées, compétences, anniversaires, modèles d'horaire, panneau récapitulatif, barre latérale repliable. */

/* Sections imbriquées */
.section-node { padding-left: calc(16px + var(--depth, 0) * 28px); position: relative; }
.section-branch { width: 12px; height: 12px; border-left: 1.5px solid var(--border-strong, var(--border)); border-bottom: 1.5px solid var(--border-strong, var(--border)); border-bottom-left-radius: 4px; margin-top: -8px; flex-shrink: 0; }
.section-node .section-branch { margin-right: -2px; }
.group-swatch.is-sub { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.section-menu .menu-item { gap: 6px; }
.section-menu .section-branch { width: 9px; height: 9px; margin-top: -6px; }

/* Compétences */
.skill-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 500; color: color-mix(in srgb, var(--c) 75%, var(--text)); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); white-space: nowrap; }
.skill-chip.is-suggest { cursor: pointer; height: 24px; background: transparent; border-style: dashed; font-family: inherit; }
.skill-chip.is-suggest:hover { background: color-mix(in srgb, var(--c) 10%, transparent); }
.skill-chip.is-suggest.is-picked { display: none; }
.skill-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.skill-chips-xs .skill-chip { height: 16px; padding: 0 5px; font-size: 10px; border-radius: 4px; }
.skill-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-input-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 38px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius, 8px); background: var(--bg); cursor: text; }
.tag-input-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tag-input-box .chips { display: contents; }
.tag-input-box .chip { height: 24px; padding: 0 4px 0 9px; gap: 4px; background: var(--bg-subtle, var(--bg-hover)); color: var(--text); }
.tag-input-box .chip-x { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; border-radius: 4px; }
.tag-input-box .chip-x:hover { color: var(--text); background: var(--bg-hover); }
.tag-input-field { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); padding: 3px 2px; }

/* Planning : compétences sous le nom (discrètes) */
.pl-person:has(.pl-skills) { flex-wrap: wrap; row-gap: 3px; align-content: center; }
.pl-person .pl-skills { flex-basis: 100%; padding-left: 38px; }
.mg-person .pl-skills { margin-top: 3px; }
@media (max-width: 760px) { .pl-skills { display: none !important; } }

/* Anniversaires */
.bday-mark { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; margin-top: 2px; padding: 0 5px; height: 17px; border-radius: 99px; font-size: 10.5px; font-weight: 500; color: #be185d; background: color-mix(in srgb, #ec4899 13%, transparent); }
.bday-mark-sm { padding: 0; width: 15px; height: 15px; justify-content: center; margin-top: 1px; }
.bday-cell { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 500; color: #be185d; background: color-mix(in srgb, #ec4899 11%, transparent); position: relative; z-index: 1; }
.mg-bday { display: inline-flex; justify-content: center; color: #db2777; line-height: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bday-mark, :root:not([data-theme="light"]) .bday-cell, :root:not([data-theme="light"]) .mg-bday { color: #f9a8d4; } }
:root[data-theme="dark"] .bday-mark, :root[data-theme="dark"] .bday-cell, :root[data-theme="dark"] .mg-bday { color: #f9a8d4; }

/* Planning : panneau récapitulatif (colonnes collées à droite) */
.planning-week .pl-person, .planning-week .planning-grid > .pl-head:first-child { grid-column: 1; }
.month-grid > .mg-person { grid-column: 1; }
.planning-week .planning-grid > div:nth-child(9n) { border-right: 1px solid var(--border); }
.pl-sum { display: none; }
.plan-summary-toggle .when-open { display: none; }
html.plan-summary .plan-summary-toggle .when-open { display: inline-flex; }
html.plan-summary .plan-summary-toggle .when-closed { display: none; }
html.plan-summary .plan-summary-toggle { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); color: var(--primary-text); }
html.plan-summary .has-summary .pl-sum { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 2px; padding: 8px 10px; position: sticky; z-index: 3; background: var(--bg); font-size: 12.5px; text-align: right; }
html.plan-summary .has-summary .pl-head.pl-sum, html.plan-summary .has-summary .mg-head.pl-sum { z-index: 4; background: var(--bg-subtle); font-size: 11px; font-weight: 500; color: var(--text-muted); line-height: 1.25; white-space: normal; }
html.plan-summary .has-summary .pl-sum-1 { right: calc(var(--sum-w) * 2); box-shadow: -1px 0 0 var(--border), -6px 0 12px -10px rgba(0, 0, 0, .25); }
html.plan-summary .has-summary .pl-sum-2 { right: var(--sum-w); }
html.plan-summary .has-summary .pl-sum-3 { right: 0; border-right: 0 !important; background: color-mix(in srgb, var(--primary) 4%, var(--bg)); }
html.plan-summary .has-summary .pl-head.pl-sum-3, html.plan-summary .has-summary .mg-head.pl-sum-3 { background: color-mix(in srgb, var(--primary) 7%, var(--bg-subtle)); }
html.plan-summary .has-summary .pl-total, html.plan-summary .has-summary .pl-total-head, html.plan-summary .has-summary .mg-total, html.plan-summary .has-summary .mg-total-cell { display: none; }
.has-summary { --sum-w: 92px; }
html.plan-summary .planning-week.has-summary .planning-grid { grid-template-columns: minmax(150px, 220px) repeat(var(--days, 7), minmax(100px, 1fr)) repeat(3, var(--sum-w)); min-width: calc(150px + var(--days, 7) * 100px + var(--sum-w) * 3); }
html.plan-summary .planning-month.has-summary .month-grid { grid-template-columns: 170px repeat(var(--days, 30), minmax(var(--mg-col), 1fr)) repeat(3, var(--sum-w)); min-width: calc(170px + var(--days, 30) * var(--mg-col) + var(--sum-w) * 3); }
.worked-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--success-text, #15803d); background: var(--success-soft, #dcfce7); }
.worked-chip.is-zero { color: var(--text-muted); background: var(--bg-muted); font-weight: 500; }
.worked-chip.is-over { color: var(--warning-text, #b45309); background: var(--warning-soft, #fef3c7); }
@media (max-width: 760px) { .has-summary { --sum-w: 74px; } html.plan-summary .planning-week.has-summary .planning-grid { grid-template-columns: 104px repeat(var(--days, 7), minmax(84px, 1fr)) repeat(3, var(--sum-w)); min-width: calc(104px + var(--days, 7) * 84px + var(--sum-w) * 3); } }
@media print { html.plan-summary .has-summary .pl-sum { display: none; } html.plan-summary .has-summary .pl-total, html.plan-summary .has-summary .pl-total-head, html.plan-summary .has-summary .mg-total, html.plan-summary .has-summary .mg-total-cell { display: flex; } }

/* Barre latérale repliable (ordinateur uniquement) */
.sidebar-toggle { margin-left: -8px; color: var(--text-muted); }
.sidebar-toggle .when-collapsed { display: none; }
html.sb-collapsed .sidebar-toggle .when-collapsed { display: inline-flex; }
html.sb-collapsed .sidebar-toggle .when-expanded { display: none; }
@media (min-width: 901px) {
    .app { transition: grid-template-columns .18s ease; }
    html.sb-collapsed { --sidebar: 64px; }
    html.sb-collapsed .sidebar { overflow: visible; }
    html.sb-collapsed .sidebar-head { padding: 12px 10px; }
    html.sb-collapsed .company-switch { justify-content: center; padding: 6px 0; }
    html.sb-collapsed .sidebar-head .brand { justify-content: center; padding: 6px 0 !important; }
    html.sb-collapsed .sidebar-head .brand-name { display: none; }
    html.sb-collapsed .company-switch > .grow, html.sb-collapsed .company-switch > .icon { display: none; }
    html.sb-collapsed .sidebar .menu { width: 260px !important; }
    html.sb-collapsed .nav { padding: 4px 10px 12px; overflow-x: hidden; scrollbar-width: none; }
    html.sb-collapsed .nav-title { display: none; }
    html.sb-collapsed .nav-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
    html.sb-collapsed .nav-link { position: relative; justify-content: center; gap: 0; padding: 0; height: 36px; font-size: 0; }
    html.sb-collapsed .nav-link .icon { width: 18px; height: 18px; }
    html.sb-collapsed .nav-link > .truncate { display: none; }
    html.sb-collapsed .nav-link .count, html.sb-collapsed .nav-link .badge { position: absolute; top: 6px; right: 8px; min-width: 0; width: 8px; height: 8px !important; padding: 0; margin: 0 !important; font-size: 0 !important; overflow: hidden; border-radius: 50%; border: 0; box-shadow: 0 0 0 2px var(--bg-subtle); }
    html.sb-collapsed .nav-link .badge-primary { background: var(--primary); }
    html.sb-collapsed .nav-link .badge-danger { background: var(--danger); }
    html.sb-collapsed .nav-link .avatar { margin: 0; }
    html.sb-collapsed .sidebar-foot { padding: 10px; }
    html.sb-collapsed .sidebar-foot > p { display: none; }
    html.sb-collapsed .user-chip { justify-content: center; padding: 6px 0; }
    html.sb-collapsed .user-chip > .grow, html.sb-collapsed .user-chip > .icon { display: none; }
}
@media (max-width: 900px) { .sidebar-toggle { display: none; } }

/* Modèles d'horaire : cartes */
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pattern-card { display: flex; flex-direction: column; }
.pattern-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 16px 16px 10px; }
.pattern-card-head h2 { font-size: 15px; }
.pattern-card-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 12px 16px; margin-top: auto; border-top: 1px solid var(--border); }
.pattern-mini { display: grid; grid-template-columns: 22px repeat(7, minmax(0, 1fr)); gap: 3px; padding: 4px 16px 16px; }
.pm-day { font-size: 10px; text-align: center; color: var(--text-faint); font-weight: 500; }
.pm-week { font-size: 9.5px; color: var(--text-faint); align-self: center; }
.pm-cell { height: 30px; border-radius: 5px; background: var(--bg-subtle); border: 1px dashed var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pm-cell.on { border: 0; background: color-mix(in srgb, var(--c) 16%, var(--bg)); box-shadow: inset 0 2px 0 var(--c); }
.pm-cell b { font-size: 10.5px; font-weight: 600; color: var(--text); }
.pm-cell i { font-style: normal; font-size: 9.5px; color: var(--text-muted); }
.pattern-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--text-muted); background: transparent; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; transition: background .12s, color .12s; }
.pattern-new:hover { background: var(--bg-hover); color: var(--text); }

/* Modèles d'horaire : éditeur */
dialog.modal-xl { width: min(920px, calc(100vw - 32px)); }
.pattern-form-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.pattern-form-row .grow { flex: 1; min-width: 220px; }
.pattern-palette { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); }
.pattern-palette .tpl-chip[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.tpl-chip-eraser { background: var(--bg) !important; border-style: dashed !important; }
.tpl-chip-eraser b { display: inline-flex; align-items: center; gap: 4px; }
.pattern-editor { overflow-x: auto; }
.pe-grid { display: grid; grid-template-columns: 74px repeat(7, minmax(84px, 1fr)); gap: 6px; min-width: 680px; }
.pe-day { font-size: 12px; font-weight: 500; color: var(--text-muted); text-align: center; padding-bottom: 2px; }
.pe-day.we { color: var(--text-faint); }
.pe-week { font-size: 12px; font-weight: 500; color: var(--text-muted); align-self: center; }
.pe-cell { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 64px; padding: 6px 8px 6px 10px; font: inherit; text-align: left; color: var(--text); background: var(--bg); border: 1px dashed var(--border-strong); border-radius: 8px; cursor: pointer; transition: background .1s, border-color .1s; }
.pe-cell.we:not(.on) { background: var(--bg-weekend); }
.pe-cell:hover { border-color: var(--primary); }
.pe-cell.on { border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 11%, var(--bg)); }
.pe-cell.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.pe-cell.over { border-color: var(--primary); background: var(--primary-soft); }
.pe-cell.editing { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.pe-cell .pe-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-cell .pe-time { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.pe-cell .pe-dur { font-size: 10.5px; color: var(--text-muted); }
.pe-cell .pe-plus { align-self: center; font-size: 18px; color: var(--text-faint); }
.brushing .pe-cell { cursor: copy; }
.pattern-cell-editor { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); }
.pattern-cell-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 140px)); gap: 10px; }

/* Modèles d'horaire : application */
.people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; max-height: 220px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.people-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; min-width: 0; }
.people-item:hover { background: var(--bg-hover); }
.people-item input { accent-color: var(--primary); }
.people-item:has(input:checked) { background: var(--primary-soft); }
.people-name { font-size: 13px; font-weight: 500; }
.select-sm { height: 30px; font-size: 12.5px; padding-top: 0; padding-bottom: 0; }
.pattern-preview { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-subtle); border: 1px solid var(--border); font-size: 13.5px; min-height: 46px; }
.pattern-preview:empty { display: none; }
.pattern-preview.is-ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success-text) 25%, transparent); }
.pattern-preview.is-ok .pp-main { color: var(--success-text); font-weight: 600; }
.pattern-preview.is-error { background: var(--danger-soft); color: var(--danger-text); border-color: transparent; }
.pattern-preview.is-muted { color: var(--text-muted); }
.pp-sub { margin-top: 3px; font-size: 12.5px; color: var(--text-muted); }
.tag-input-box .tag-input-field, .tag-input-box .tag-input-field:focus { border: 0 !important; box-shadow: none !important; outline: none !important; height: auto; background: transparent; }

/* Planning : barre en deux lignes (navigation, puis actions avec Publier et le volet collés à droite) */
.page-head:has(.plan-nav) { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
.plan-nav { justify-content: flex-start; }
.plan-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -12px 0 16px; }
.plan-tools, .plan-end { display: flex; align-items: center; gap: 8px; }
.plan-end { margin-left: auto; }
@media (max-width: 640px) {
    .plan-nav { width: 100%; }
    .plan-nav .segmented { flex: 1 1 100%; }
    .plan-nav .segmented a { flex: 1; justify-content: center; }
    .plan-nav > .dropdown { flex: 1 1 0; min-width: 0; }
    .plan-nav > .dropdown > .btn { width: 100%; min-width: 0; overflow: hidden; }
    .plan-nav .btn-group { flex: 1 1 100%; }
    .plan-nav .btn-group > .btn:nth-child(2) { flex: 1; justify-content: center; }
    .plan-actions .btn-label { display: none; }
    .plan-tools .btn { width: 38px; padding: 0; justify-content: center; }
}

/* Planning : bandeaux de section (pleine largeur, repliables, collants sous l'en-tête des jours) */
.planning-grid > .pl-sec > div { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.planning-grid > .pl-sec > .pl-band { grid-column: 1 / -1; border-right: 0; padding: 0; position: sticky; top: 0; z-index: 4; background: color-mix(in srgb, var(--c) 9%, var(--bg)); box-shadow: inset 3px 0 0 var(--c); }
.pl-band-btn { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 9px 14px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.pl-band-btn svg { flex: none; color: var(--text-muted); transition: transform .15s; }
.pl-band-btn:hover svg { color: var(--text); }
.pl-band-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pl-band-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-band-count { flex: none; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 500; line-height: 18px; text-align: center; color: var(--text-muted); background: color-mix(in srgb, var(--c) 14%, var(--bg)); }
@media screen { .pl-sec.is-collapsed > :not(.pl-band) { display: none !important; } }
.pl-sec.is-collapsed .pl-band-btn svg { transform: rotate(-90deg); }
/* La grille tient en largeur : en-tête des jours et bandeaux collent sous la barre du haut. */
.planning-week.is-fit { overflow: clip; }
.planning-week.is-fit .planning-grid > .pl-head { top: var(--topbar-h, 56px); z-index: 5; }
.planning-week.is-fit .planning-grid > .pl-head:first-child { z-index: 6; }
.planning-week.is-fit .planning-grid > .pl-sec > .pl-band { top: calc(var(--topbar-h, 56px) + var(--pl-head-h, 0px)); }
@media print { .pl-band-btn svg { display: none; } }
/* Bandeaux en vue Mois (grille) et Année (tableau). */
.month-grid > .pl-sec > div, .month-grid > .pl-sec > a { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.month-grid > .pl-sec > .pl-band { grid-column: 1 / -1; border-right: 0; padding: 0; position: sticky; top: 0; z-index: 4; background: color-mix(in srgb, var(--c) 9%, var(--bg)); box-shadow: inset 3px 0 0 var(--c); }
.planning-month.is-fit { overflow: clip; }
.planning-month.is-fit .month-grid > .mg-head { top: var(--topbar-h, 56px); z-index: 5; }
.planning-month.is-fit .month-grid > .pl-sec > .pl-band { top: calc(var(--topbar-h, 56px) + var(--pl-head-h, 0px)); }
.year-table tr.pl-band td { padding: 0; position: static; background: color-mix(in srgb, var(--c) 9%, var(--bg)); box-shadow: inset 3px 0 0 var(--c); }
.year-table tr.pl-band:hover td { background: color-mix(in srgb, var(--c) 9%, var(--bg)); }
/* Vue Mois éditable (gérant) : clic sur une case = nouveau shift, sur un shift = modifier, dépôt de modèles. */
.mg-cell { position: relative; }
.mg-cell.is-editable, .mg-open-cell { cursor: pointer; }
.mg-cell .add { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; color: var(--text-muted); background: none; border: 0; cursor: pointer; transition: opacity .1s; }
.mg-cell:hover .add, .mg-cell .add:focus-visible { opacity: 1; }
.mg-cell:has(.mg-shift, .mg-tag) .add { align-items: flex-end; padding-bottom: 2px; }
.mg-cell .add:hover { color: var(--primary); }
button.mg-shift { position: relative; z-index: 1; width: 100%; border: 0; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
button.mg-shift.draft { border: 1px dashed color-mix(in srgb, var(--c) 60%, transparent); }
button.mg-shift:hover { filter: brightness(.96); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); }
.mg-cell .mg-tag, .mg-cell .mg-bday { position: relative; z-index: 1; }
.mg-cell.drop-over { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.month-grid > .pl-open > div { border-bottom: 2px solid var(--border); border-right: 1px solid var(--border); }
.mg-open-person { gap: 2px; background: color-mix(in srgb, var(--primary) 4%, var(--bg)); }
.mg-open-person .pl-open-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.mg-open-cell { min-height: 44px; }
.mg-open-shift { position: relative; z-index: 1; border: 1px dashed color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--bg)); text-decoration: none; }
.mg-open-shift.is-full { opacity: .55; }
.is-picking .mg-cell[data-member] { cursor: copy; }
.is-picking .mg-cell[data-member]:hover { background: color-mix(in srgb, var(--primary) 8%, var(--bg)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 60%, transparent); }
.is-picking .mg-cell .add { pointer-events: none; }
.mg-cell.is-loading { opacity: .5; pointer-events: none; }
@media print { .mg-cell .add { display: none; } }
/* Planning : gomme (cliquer les shifts à supprimer) et aide « ? » du bandeau des modèles. */
.tpl-chips > .tpl-chip-eraser { margin-right: 8px; color: var(--danger-text, var(--danger)); }
.tpl-chips > .tpl-chip-eraser span { font-size: 11px; color: var(--text-muted); }
.tpl-chips > .tpl-chip-eraser.is-selected { background: var(--danger-soft) !important; border-color: var(--danger) !important; border-style: solid !important; box-shadow: 0 0 0 2px var(--danger); }
.is-erasing .pl-cell .add, .is-erasing .mg-cell .add { pointer-events: none; opacity: 0 !important; }
.is-erasing [data-delete-url] { cursor: pointer; }
.is-erasing [data-delete-url]:hover { outline: 2px solid var(--danger); outline-offset: -1px; background: var(--danger-soft) !important; text-decoration: line-through; }
.is-erasing [data-delete-url].is-loading { opacity: .4; pointer-events: none; }
.is-erasing .tpl-hint { color: var(--danger-text, var(--danger)); font-weight: 500; }
.tpl-help .menu { top: auto; bottom: calc(100% + 6px); transform-origin: bottom; min-width: 340px; max-width: min(420px, 90vw); }
.tpl-help-menu ul { list-style: none; margin: 0; padding: 2px 9px 8px; display: grid; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-secondary, var(--text)); }
.tpl-help-menu li { display: flex; gap: 8px; align-items: flex-start; }
.tpl-help-menu li svg { flex: none; margin-top: 2px; color: var(--text-muted); }
/* Barre latérale : sous-liens du Planning (voir le planning, modèles de shift, modèles d'horaire). */
.nav-link.is-open { color: var(--text); font-weight: 500; }
.nav-link.is-open .icon { color: var(--primary); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px 17px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-sub .nav-link { height: 28px; font-size: 13px; }
@media (min-width: 901px) { html.sb-collapsed .nav-sub { display: none; } }
.nav-group-head { position: relative; }
.nav-group-head .nav-link { padding-right: 34px; }
.nav-group-toggle { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; background: none; color: var(--text-muted); cursor: pointer; }
.nav-group-toggle:hover { background: var(--bg-hover); color: var(--text); }
.nav-group-toggle svg { transition: transform .15s; }
.nav-group.is-closed .nav-group-toggle svg { transform: rotate(-90deg); }
.nav-group.is-closed .nav-sub { display: none; }
@media (min-width: 901px) { html.sb-collapsed .nav-group-toggle { display: none; } }
/* Téléphone : l'œil empiète sur les noms, on le retire (il reste sur tablette, ordinateur et dans l'app). */
@media (hover: none) and (max-width: 760px) { .pl-hide { display: none; } }
