/* SELACV Sécurité V8.17.0 — Prise de poste plus visuelle : chiffres, filtres, historique en frise par jour */
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-summary{gap:14px}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat{position:relative;display:grid;grid-template-columns:52px 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center;padding:16px 18px;border-radius:18px;border:1px solid #eadfe2;background:#fff}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat::before{grid-row:1/3;display:grid;place-items:center;width:52px;height:52px;border-radius:16px;font-size:26px}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat:nth-child(1)::before{content:"🟢";background:#dcfce7}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat:nth-child(2)::before{content:"📅";background:#e0ecff}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat:nth-child(3)::before{content:"📝";background:#fef3c7}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat b{font-size:2rem;line-height:1;color:#1f2937}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat:nth-child(1) b{color:#15803d}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat:nth-child(2) b{color:#1d4ed8}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat:nth-child(3) b{color:#b45309}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat span{font-size:.85rem;font-weight:700;color:#6b5a5f}

/* En-tête et filtres de l'historique */
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on{overflow:visible;border:1px solid #eadfe2;border-radius:20px;background:#fff}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-table{display:none!important}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-head{display:flex;flex-wrap:wrap;gap:14px 18px;align-items:flex-end;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #f0e8ea;background:linear-gradient(180deg,#fff7f8,#fff)}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-head h3{display:flex;align-items:center;gap:10px;margin:0;font-size:1.25rem}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-head h3::before{content:"🗂️";display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#fbe9ed;font-size:20px}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters select,html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters input{height:42px;border:1.5px solid #d9ccd0;border-radius:12px;background-color:#fff;font:inherit;font-size:.93rem;font-weight:600;color:#2b1d21}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters select{padding:0 34px 0 12px;min-width:160px}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters input{min-width:240px;padding:0 12px 0 38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b5a5f' stroke-width='2.2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:12px center}
html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters :is(select,input):focus-visible{outline:3px solid #93c5fd;outline-offset:1px;border-color:#7a1f35}

/* Frise */
.pdv-timeline{display:grid;gap:22px;padding:18px 20px 22px}
.pdv-livebar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;padding:11px 14px;border-radius:14px;background:#ecfdf3;border:1px solid #bbf7d0;color:#14532d;font-size:.9rem}
.pdv-livebar i,.pdv-status.is-live i{width:9px;height:9px;border-radius:50%;background:#16a34a;box-shadow:0 0 0 0 rgba(22,163,74,.55);animation:pdvPulse 1.8s infinite}
@keyframes pdvPulse{70%{box-shadow:0 0 0 8px rgba(22,163,74,0)}100%{box-shadow:0 0 0 0 rgba(22,163,74,0)}}
.pdv-day{display:grid;gap:10px}
.pdv-dayhead{display:flex;align-items:center;gap:14px;position:sticky;top:0;z-index:1;padding:6px 0;background:#fff}
.pdv-date{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#7a1f35;color:#fff;line-height:1}
.pdv-date b{font-size:1.35rem}.pdv-date span{font-size:.72rem;font-weight:800;text-transform:lowercase;opacity:.9}
.pdv-day:not(.is-today) .pdv-date{background:#f4e9ec;color:#7a1f35}
.pdv-dayhead h4{margin:0;color:#2b1d21;font-size:1.05rem}
.pdv-dayhead p{margin:2px 0 0;color:#6b5a5f;font-size:.82rem}
.pdv-daystats{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto}
.pdv-daystats span{padding:4px 10px;border-radius:999px;background:#f6f1f2;color:#5b4a4f;font-size:.78rem;font-weight:800}
.pdv-scale{display:grid;grid-template-columns:68px 44px minmax(0,1fr) 150px;column-gap:14px;padding:0 15px 0 20px;margin-bottom:-4px;color:#9a8a8f;font-size:.68rem;font-weight:700}
.pdv-scale>div{grid-column:3;display:flex;justify-content:space-between;white-space:nowrap}
.pdv-scale span{width:0;display:flex;justify-content:center}
.pdv-scale span:first-child{justify-content:flex-start}.pdv-scale span:last-child{justify-content:flex-end}
.pdv-list{display:grid;gap:8px}
.pdv-card{display:grid;grid-template-columns:68px 44px minmax(0,1fr) 150px;gap:10px 14px;align-items:center;padding:12px 14px;border:1px solid #eee4e7;border-left:5px solid var(--pdv-c);border-radius:14px;background:#fff;cursor:pointer;transition:box-shadow .15s,transform .15s}
.pdv-card:hover{box-shadow:0 6px 18px rgba(60,20,30,.09);transform:translateY(-1px)}
.pdv-card:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.pdv-card.is-live{background:linear-gradient(90deg,#f0fdf4,#fff 40%)}
.pdv-when{display:grid;gap:2px}.pdv-when b{font-size:1.15rem;color:#2b1d21}.pdv-when span{font-size:.78rem;font-weight:700;color:#8a7a7f}
.pdv-card.is-live .pdv-when span{color:#15803d}
.pdv-avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:hsl(var(--pdv-h) 70% 92%);color:hsl(var(--pdv-h) 55% 30%);font-weight:900;font-size:.95rem;letter-spacing:.02em}
.pdv-main{display:grid;gap:7px;min-width:0}
.pdv-line{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
.pdv-agent{color:#2b1d21;font-size:.98rem}
.pdv-pc,.pdv-site{padding:2px 9px;border-radius:999px;font-size:.75rem;font-weight:800;background:color-mix(in srgb,var(--pdv-c) 14%,#fff);color:color-mix(in srgb,var(--pdv-c) 70%,#000)}
.pdv-site{background:#f4f4f5;color:#52525b}
.pdv-track{position:relative;height:8px;border-radius:99px;background:#f1eaec}
.pdv-track i{position:absolute;top:0;bottom:0;border-radius:99px;background:var(--pdv-c)}
.pdv-card.is-live .pdv-track i{background:repeating-linear-gradient(45deg,var(--pdv-c) 0 6px,color-mix(in srgb,var(--pdv-c) 60%,#fff) 6px 12px)}
.pdv-track s{position:absolute;top:-2px;bottom:-2px;width:1px;background:#fff}
.pdv-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.8rem;color:#5b4a4f;min-width:0}
.pdv-ok{font-weight:700;color:#166534}
.pdv-trans{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdv-none{color:#a8999e;font-style:italic}
.pdv-side{display:grid;gap:6px;justify-items:end}
.pdv-dur{font-size:.9rem;font-weight:800;color:#2b1d21}
.pdv-status{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:.75rem;font-weight:800}
.pdv-status.is-live{background:#dcfce7;color:#166534}
.pdv-empty{display:grid;justify-items:center;gap:4px;padding:34px 10px;border:2px dashed #eadfe2;border-radius:16px;color:#6b5a5f;text-align:center}
.pdv-empty span{font-size:34px}
.pdv-moreline{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:center}
.pdv-more{height:44px;padding:0 20px;border:1.5px solid #7a1f35;border-radius:12px;background:#fff;color:#7a1f35;font:inherit;font-weight:800;cursor:pointer}
.pdv-more:hover{background:#fbeff2}
.pdv-moreline span,.pdv-end{margin:0;color:#8a7a7f;font-size:.82rem;text-align:center}
@media(max-width:820px){
  .pdv-timeline{padding:14px 12px 18px}
  .pdv-scale{display:none}
  .pdv-card{grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"av main side" "when main side"}
  .pdv-avatar{grid-area:av}.pdv-when{grid-area:when;text-align:center}.pdv-main{grid-area:main}.pdv-side{grid-area:side}
  html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters{width:100%}
  html:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters :is(select,input){flex:1 1 100%;min-width:0}
}
@media(max-width:520px){.pdv-card{grid-template-columns:44px minmax(0,1fr);grid-template-areas:"av main" "when side"}.pdv-side{justify-items:start;grid-auto-flow:column}.pdv-daystats{margin-left:0;width:100%}.pdv-dayhead{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.pdv-livebar i,.pdv-status.is-live i{animation:none}.pdv-card{transition:none}.pdv-card:hover{transform:none}}

/* Fiche détaillée existante, plus lisible */
html:not(#_p1):not(#_p2) .shift-detail-dialog .shift-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
html:not(#_p1):not(#_p2) .shift-detail-dialog .shift-detail-grid>b{display:none}
html:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact{display:grid;gap:4px;padding:12px 14px;border:1px solid #eee4e7;border-radius:12px;background:#fcf9fa}
html:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact small{color:#8a7a7f;font-size:.72rem;font-weight:800}
html:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact span{color:#2b1d21;font-weight:700;white-space:pre-line}
html:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact.wide{grid-column:1/-1}

/* Thème sombre */
html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat,html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on{border-color:#482e35;background:#1b1316}
html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat span{color:#c9b3b9}
html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-pro-stat b{color:#f3e8ea}
html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-head{border-color:#3a262b;background:linear-gradient(180deg,#24161a,#1b1316)}
html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters :is(select,input){border-color:#5a3d44;background-color:#161012;color:#eadfe1}
html[data-theme="dark"] .pdv-dayhead{background:#1b1316}
html[data-theme="dark"] .pdv-dayhead h4,html[data-theme="dark"] .pdv-agent,html[data-theme="dark"] .pdv-when b,html[data-theme="dark"] .pdv-dur{color:#f3e8ea}
html[data-theme="dark"] .pdv-dayhead p,html[data-theme="dark"] .pdv-meta,html[data-theme="dark"] .pdv-when span{color:#c9b3b9}
html[data-theme="dark"] .pdv-daystats span{background:#2a1c20;color:#dccbd0}
html[data-theme="dark"] .pdv-day:not(.is-today) .pdv-date{background:#3a1d25;color:#f0b6c4}
html[data-theme="dark"] .pdv-card{border-color:#3a262b;background:#161012}
html[data-theme="dark"] .pdv-card.is-live{background:linear-gradient(90deg,#10261a,#161012 40%)}
html[data-theme="dark"] .pdv-track{background:#2f2125}
html[data-theme="dark"] .pdv-track s{background:#161012}
html[data-theme="dark"] .pdv-pc{background:color-mix(in srgb,var(--pdv-c) 25%,#161012);color:color-mix(in srgb,var(--pdv-c) 45%,#fff)}
html[data-theme="dark"] .pdv-site,html[data-theme="dark"] .pdv-status{background:#2a1c20;color:#dccbd0}
html[data-theme="dark"] .pdv-status.is-live,html[data-theme="dark"] .pdv-livebar{background:#10261a;border-color:#14532d;color:#bbf7d0}
html[data-theme="dark"] .pdv-ok{color:#86efac}
html[data-theme="dark"] .pdv-more{background:#161012;color:#f0b6c4;border-color:#f0b6c4}
html[data-theme="dark"] .pdv-empty{border-color:#3a262b;color:#c9b3b9}
html[data-theme="dark"]:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact{border-color:#3a262b;background:#1b1316}
html[data-theme="dark"]:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact span{color:#f3e8ea}
html[data-theme="dark"]:not(#_p1):not(#_p2):not(#_p3) #priseView .shift-history.pdv-on .shift-history-filters input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23c9b3b9' stroke-width='2.2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:12px center!important}
html:not(#_p1):not(#_p2) .shift-detail-dialog .pdv-fact span{border:0!important;padding:0!important}
