﻿/* ═══════════════════════════════════════════
   SERIANCE — Composants UI
   Formulaires, boutons, modales, tables, cards
═══════════════════════════════════════════ */

/* ══════════════════════════════
   FORMULAIRES
══════════════════════════════ */
label {
  display: block;
  font-size: .79rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--gb-in);
  border-radius: 12px;
  color: var(--text);
  padding: 8px 12px;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  box-shadow: var(--hi);
  transition: border-color .18s, box-shadow .18s;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(146,191,59,.55);
  box-shadow: 0 0 0 3px rgba(146,191,59,.10), var(--hi);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

select option {
  background: #1a1a22;
  color: rgba(255,255,255,.9);
  padding: 6px 10px;
}

:root[data-theme="light"] select {
  background-color: rgba(255,255,255,.88);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23444' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

:root[data-theme="light"] select option {
  background: #fff;
  color: rgba(0,0,0,.85);
}

input[type="number"] { font-family: 'DM Mono', monospace; }
input[type="file"]   { padding: 6px; }
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; padding: 0; flex-shrink: 0; box-shadow: none; accent-color: var(--accent);
}

.form-group  { margin-bottom: 13px; }

/* ══════════════════════════════
   BOUTONS
══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .18s, color .18s, opacity .18s, transform .15s cubic-bezier(.22,1,.36,1), box-shadow .18s;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--sh-sm), var(--hi);
}

.btn:active { transform: scale(.96); transition-duration: .06s; }

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  font-weight: 700;
  box-shadow: var(--sh-sm);
}

@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover {
    background: #a2cf47;
    box-shadow: var(--sh-sm);
  }
}

.btn-primary   { background: rgba(146,191,59,.20); border: 1px solid rgba(146,191,59,.45); color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: rgba(146,191,59,.32); border-color: rgba(146,191,59,.65); }
}

.btn-secondary { background: var(--glass); border: 1px solid var(--gb); color: var(--text-muted); }
.btn-secondary:hover { background: var(--glass-h); color: var(--text); }

.btn-danger    { background: var(--red-bg); border: 1px solid rgba(255,69,58,.25); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: transparent; }

.btn-save      { background: var(--glass-a); border: 1px solid var(--gb-hi); color: var(--text); font-weight: 600; }
.btn-save:hover { background: var(--glass-h); }

:root[data-theme="light"] .btn-primary       { background: rgba(92,138,26,.12); border-color: rgba(92,138,26,.40); }
@media (hover: hover) and (pointer: fine) {
  :root[data-theme="light"] .btn-primary:hover { background: rgba(92,138,26,.20); border-color: rgba(92,138,26,.60); }
}

.btn-sm  { padding: 4px 10px; font-size: .79rem; border-radius: 8px; }
.btn-row { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }

.btn-icon {
  background: var(--glass);
  border: 1px solid var(--gb);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  transition: background .18s, color .18s, opacity .18s, transform .18s;
  box-shadow: var(--hi);
}

.btn-icon:hover { background: var(--glass-h); color: var(--text); border-color: var(--gb-hi); }

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--sh), var(--hi);
  transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s, border-color .2s;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--gb-hi);
  }
}


/* ── Mon espace : entrée en fondu/glissé des blocs (page d'accueil) ── */
@keyframes meFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#section-monespace > div, #section-monespace > .me-hero { animation: meFadeUp .45s cubic-bezier(.22,1,.36,1) both; }
#section-monespace .me-tiles-grid > .card:nth-child(1) { animation-delay: .05s; }
#section-monespace .me-tiles-grid > .card:nth-child(2) { animation-delay: .1s; }
#section-monespace .me-tiles-grid > .card:nth-child(3) { animation-delay: .15s; }
#section-monespace .me-tiles-grid > .card:nth-child(4) { animation-delay: .2s; }
#section-monespace .me-tiles-grid > .card:nth-child(5) { animation-delay: .25s; }
#section-monespace .me-tiles-grid > .card:nth-child(6) { animation-delay: .3s; }

/* Agenda du jour à gauche (pleine hauteur) + 4 tuiles raccourcis uniformes à droite */
.me-hero {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px;
  background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 18px 22px; margin-bottom: 12px;
}
.me-hero-titre { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.me-hero-date { font-size: var(--fs-sm); margin-top: 2px; text-transform: capitalize; opacity: .85; }
.me-hero-stats { display: flex; flex-wrap: wrap; }
.me-stat { display: flex; flex-direction: column; padding: 0 18px; border-left: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent); }
.me-stat:first-child { border-left: none; padding-left: 0; }
.me-stat-n { font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: 700; line-height: 1.1; }
.me-stat-l { font-size: var(--fs-xs); font-weight: 600; opacity: .85; }
.me-layout { display: grid; grid-template-columns: minmax(240px,1fr) 2fr; gap: 12px; align-items: stretch; min-height: 340px; }
.me-tiles-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, minmax(96px, 1fr)) auto; gap: 12px; }
.me-tile {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; align-items: end; gap: 10px 12px;
  cursor: pointer; text-align: left; padding: 14px 16px;
}
.me-tile-icon {
  grid-row: 1; grid-column: 1; align-self: start; width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-lg);
  background: var(--accentbg); color: var(--accent);
}
.me-tile-titre { grid-row: 2; grid-column: 1 / 3; font-weight: 600; font-size: var(--fs-md); }
.me-tile-count { grid-row: 2; grid-column: 3; font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: 700; line-height: 1; }
.me-tile-count.is-zero { color: var(--text-dim); }
.me-tile > .badge {
  font-variant-numeric: tabular-nums; grid-row: 2; grid-column: 3; align-self: center; }
@media (hover: hover) and (pointer: fine) {
  .me-tile:hover .me-tile-icon { background: var(--accent); color: var(--on-accent); }
}
.me-tile-icon { transition: background .18s, color .18s; }
@media (max-width: 860px) {
  .me-layout { grid-template-columns: 1fr; }
  .me-tiles-grid { grid-template-rows: none; }
}

/* Éditeur riche (Quill) des notes de réunion - overrides thème sombre/clair via tokens du site */
.ql-toolbar.ql-snow { background: var(--glass); border: none !important; border-bottom: 1px solid var(--gb) !important; padding: 10px 16px; }
.ql-container.ql-snow { border: none !important; font-family: 'Inter', sans-serif; font-size: .9rem; height: calc(100% - 44px); }
.ql-editor { color: var(--text); min-height: 100%; padding: 20px; }
.ql-editor.ql-blank::before { color: var(--text-dim); font-style: normal; }
.ql-snow .ql-stroke { stroke: var(--text-muted); }
.ql-snow .ql-fill { fill: var(--text-muted); }
.ql-snow .ql-picker { color: var(--text-muted); }
.ql-snow .ql-picker-options { background: var(--modal-bg); border-color: var(--gb) !important; box-shadow: var(--sh); }
.ql-snow .ql-picker.ql-expanded .ql-picker-label { border-color: transparent; }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke { stroke: var(--accent); }
.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill { fill: var(--accent); }
.ql-snow .ql-tooltip { background: var(--modal-bg); border: 1px solid var(--gb); color: var(--text); box-shadow: var(--sh); }
.ql-snow .ql-tooltip input[type="text"] { background: var(--glass); color: var(--text); border-color: var(--gb-in); }

.card-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* Grille "Calculs techniques" : case = lien vers un outil dans sa propre page */
.calc-case {
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--text); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  min-height: 118px;
}
.calc-case:active { transform: scale(.98); }
.calc-case-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accentbg); color: var(--accent); font-size: 1.4rem;
}
.calc-case-title { font-size: .9rem; font-weight: 700; }
.calc-case-desc { font-size: .79rem; color: var(--text-muted); line-height: 1.4; }

/* ── Stats ── */
.stat-card {
  flex: 1;
  background: var(--glass-a);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s;
}

@media (hover: hover) and (pointer: fine) {
  .stat-card:hover {
    border-color: var(--gb-hi);
  }
}

/* ══════════════════════════════
   TABLES
══════════════════════════════ */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }

thead th {
  text-align: left;
  font-size: .79rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-bottom: 1px solid var(--gb);
}

tbody td             { padding: 9px 12px; border-bottom: 1px solid var(--gb); font-size: .85rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td    { background: var(--glass-h); }

.mono { font-family: 'DM Mono', monospace; }

/* ══════════════════════════════
   BADGES
══════════════════════════════ */
.badge {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: .79rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.badge-green  { background: var(--green-bg);  color: var(--green); }
.badge-red    { background: rgba(255,69,58,.22);  color: #ff6b62; border: 1px solid rgba(255,69,58,.35); font-weight: 600; }
.badge-orange { background: rgba(255,159,10,.18); color: #ffb340; border: 1px solid rgba(255,159,10,.30); font-weight: 600; }
.badge-blue   { background: var(--blue-bg);   color: var(--blue); }
.badge-grey   { background: var(--glass); color: var(--text-muted); border: 1px solid var(--gb); }
.badge-accent { background: rgba(146,191,59,.20); color: #b2d45c; border: 1px solid rgba(146,191,59,.35); font-weight: 600; }
.badge-purple { background: rgba(155,109,255,.18); color: #b699ff; border: 1px solid rgba(155,109,255,.32); font-weight: 600; }

/* ══════════════════════════════
   MODALES
══════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.50);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding-bottom: 90px;
  overscroll-behavior: contain;
  overflow-y: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-overlay.open { display: flex; animation: overlayIn .2s ease both; }

.modal-overlay.open .modal { animation: modalIn .26s cubic-bezier(.34,1.2,.64,1) both; }

.modal {
  contain: layout style paint;
  /* Pas de backdrop-filter : fond opaque à 92 % sur un voile sombre, flou invisible mais coûteux (gel PC faible) */
  background: var(--modal-bg);
  border: 1px solid var(--gb-hi);
  border-radius: 26px;
  padding: 24px;
  width: 640px;
  max-width: 96vw;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  box-shadow: var(--sh-lg), var(--hi);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-wide { width: 900px; }
.modal-sm   { width: 480px; }

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 18px;
  color: var(--text);
}

.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  margin-top: -4px;
  transition: color .15s, transform .2s cubic-bezier(.34,1.4,.64,1);
}

.modal-close:hover { color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .modal-close:hover { transform: rotate(90deg); }
}

/* ── Mon profil (modal-profil) ── */
.profil-tab-btn { background: none; border: none; cursor: pointer; font: inherit; padding: 0; -webkit-appearance: none; appearance: none; }
.profil-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; margin-bottom: 6px; border-radius: 12px;
  background: var(--accentbg);
  border: 1px solid rgba(146,191,59,.22);
}
.profil-hero-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: var(--accentbg); border: 2px solid rgba(146,191,59,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: var(--accent);
  box-shadow: 0 0 0 4px rgba(146,191,59,.08);
}
.profil-hero-avatar svg, .profil-hero-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
#user-avatar-top, #user-avatar-top-mobile { overflow: hidden; }
#user-avatar-top svg, #user-avatar-top img, #user-avatar-top-mobile svg, #user-avatar-top-mobile img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ── Popup avatar (modal-avatar) : photo ou buste personnalise ── */
#modal-avatar.modal-overlay { z-index: 606; }
.avatar-builder-preview { width: 120px; height: 142px; margin: 0 auto 16px; }
.avatar-builder-preview svg { width: 100%; height: 100%; display: block; }
.avatar-field-row { margin-bottom: 14px; }
.avatar-field-label { font-size: .79rem; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.avatar-swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-swatch {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--gb); flex-shrink: 0; transition: transform .15s, border-color .15s;
}
.avatar-swatch:hover { transform: scale(1.1); }
.avatar-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentbg); }
.avatar-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-style-pill {
  padding: 6px 14px; border-radius: 12px; border: 1px solid var(--gb); background: var(--glass);
  color: var(--text-muted); font-size: .79rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.avatar-style-pill:hover { background: var(--glass-h); color: var(--text); }
.avatar-style-pill[aria-pressed="true"] { background: var(--accentbg); color: var(--accent); border-color: var(--accent); }
.profil-hero-info { min-width: 0; }
.profil-hero-name { font-weight: 800; font-size: 1.1rem; color: var(--text); line-height: 1.25; }
.profil-hero-email { font-size: .79rem; color: var(--text-muted); margin-top: 1px; overflow-wrap: anywhere; }
.profil-hero-role {
  display: inline-flex; margin-top: 6px; font-size: .79rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
  padding: 2px 9px; color: var(--text-muted);
}
.profil-modal .ch-tab-content { padding-top: 18px; }

/* ── Profil : disposition façon Apple (barre latérale + contenu) ── */
.profil-modal { container-type: inline-size; }
.profil-body { display: flex; align-items: flex-start; gap: 20px; margin-top: 18px; }
.profil-sidebar {
  display: flex; flex-direction: column; gap: 2px;
  width: 190px; flex-shrink: 0;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
  padding: 6px;
}
.profil-sidebar-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 8px; border: none; background: none;
  cursor: pointer; font: inherit; text-align: left;
  font-size: .79rem; font-weight: 700; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.profil-sidebar-item:hover { background: var(--glass-h); color: var(--text); }
.profil-sidebar-item.active { background: var(--accentbg); color: var(--accent); }
.profil-sidebar-icon {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-h); color: var(--text-muted);
  transition: background .15s, color .15s;
}
.profil-sidebar-icon svg { width: 15px; height: 15px; }
.profil-sidebar-item.active .profil-sidebar-icon { background: var(--accent); color: var(--on-accent); }
.profil-panes { flex: 1; min-width: 0; }
@container (max-width: 560px) {
  .profil-body { flex-direction: column; }
  .profil-sidebar { flex-direction: row; width: 100%; align-self: stretch; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .profil-sidebar-item { width: auto; flex-shrink: 0; }
}
.profil-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .79rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px;
}
.profil-icon-badge {
  width: 22px; height: 22px; border-radius: 8px; flex-shrink: 0;
  background: var(--accentbg); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.profil-icon-badge svg { width: 13px; height: 13px; }
.profil-color-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.profil-color-input { width: 44px; height: 32px; padding: 2px; border-radius: 8px; border: 1px solid var(--gb); background: var(--glass); cursor: pointer; }
.profil-session-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
  padding: 11px 12px; margin-bottom: 8px;
}
.profil-session-device { font-size: .85rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profil-session-actions { display: flex; gap: 6px; flex-shrink: 0; }
.profil-session-badge {
  font-size: .79rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
  padding: 2px 9px; color: var(--text-muted);
}
.profil-session-badge-actif { background: var(--accentbg); border-color: transparent; color: var(--accent); }
.profil-links { display: flex; flex-direction: column; gap: 7px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gb); }
.profil-link-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
  padding: 11px 12px; color: var(--text); font-size: .85rem; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s, transform .15s;
}
.profil-link-row:hover { background: var(--glass-h); border-color: var(--gb-hi); }
.profil-link-row:active { transform: scale(.98); }
.profil-link-row .profil-link-chevron { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }
.admin-general-col { max-width: 760px; }
.profil-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gb); }
.aff-select { width: auto; min-width: 0; max-width: 50%; flex-shrink: 0; }
@media (max-width: 860px) { .asst-set-row.aff-ordi { display: none; } }
.profil-notifs { width: 100%; border-collapse: collapse; font-size: .85rem; }
.profil-notifs th, .profil-notifs td { padding: 7px 6px; border-bottom: 1px solid var(--gb); text-align: left; font-weight: 400; }
.profil-notifs thead th { font-size: .79rem; color: var(--text-muted); font-weight: 600; }
.profil-notifs thead th + th, .profil-notifs td { width: 92px; text-align: center; }
.profil-notifs .profil-notifs-grp th { padding-top: 14px; font-size: .79rem; font-weight: 700; color: var(--accent); border-bottom: 0; }
.profil-notifs-cb { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
@media (max-width: 480px) { .profil-notifs thead th + th, .profil-notifs td { width: 70px; } }
.profil-footer { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gb); }
.profil-modal .profil-hero, .profil-modal .profil-body, .profil-modal .ch-tab-content.active, .profil-modal .profil-links, .profil-modal .profil-footer {
  animation: meFadeUp .4s cubic-bezier(.22,1,.36,1) both;
}
.profil-modal .profil-hero { animation-delay: .02s; }
.profil-modal .profil-body { animation-delay: .06s; }
.profil-modal .ch-tab-content.active { animation-delay: .1s; }
.profil-modal .profil-links { animation-delay: .14s; }
.profil-modal .profil-footer { animation-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .profil-modal .profil-hero, .profil-modal .profil-body, .profil-modal .ch-tab-content.active, .profil-modal .profil-links, .profil-modal .profil-footer { animation: none; }
}

/* ══════════════════════════════
   NOTIFICATIONS
══════════════════════════════ */
#notif-bell { position: relative; cursor: pointer; }

.ic { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.loader { position: relative; display: flex; align-items: center; justify-content: center; }
.loader svg { color: var(--text-muted); transition: color .2s; }
#notif-bell:hover .loader svg { color: var(--text); }

.point {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: none;
}

.point.active {
  display: block;
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}

#notif-panel {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-width: calc(100vw - 24px);
  max-height: min(620px, calc(100vh - 110px));
  background: var(--modal-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--gb-hi);
  border-radius: 12px;
  z-index: 500;
  box-shadow: var(--sh-lg), var(--hi);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#notif-panel.open { display: flex; animation: notifPanelIn .24s cubic-bezier(.2,.8,.2,1); }

@keyframes notifPanelIn {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes notifItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* En-tête */
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--gb); flex-shrink: 0; }
.notif-head-title { display: flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 700; color: var(--text); }
.notif-head-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accentbg); color: var(--accent); font-size: 1rem; }
.notif-count-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 8px; background: var(--red); color: #fff; font-size: .79rem; font-weight: 700; line-height: 1; }
.notif-head-actions { display: flex; align-items: center; gap: 4px; }
.notif-link { background: none; border: none; color: var(--accent); font-size: .79rem; font-weight: 600; padding: 6px 9px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.notif-link:hover { background: var(--accentbg); }
.notif-close { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; transition: background .15s, color .15s; }
.notif-close:hover { background: var(--glass-h); color: var(--text); }
.notif-link:focus-visible, .notif-close:focus-visible, .notif-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.notif-push-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--accentbg); border-bottom: 1px solid var(--gb); font-size: .79rem; color: var(--text); }
.notif-push-bar span { flex: 1; }

/* Liste */
.notif-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 10px 10px; }
.notif-group-label { display: flex; align-items: center; gap: 7px; padding: 9px 6px 5px; font-size: .79rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.notif-group-label .ic { color: var(--accent); font-size: .85rem; }
.notif-group-label em { margin-left: auto; font-style: normal; padding: 0 7px; border-radius: 8px; background: var(--glass); color: var(--text-dim); letter-spacing: 0; }

/* Item : ligne fine repliée, détail + actions dépliés au clic sur la flèche */
.notif-item { --tone: var(--blue); --tone-bg: var(--blue-bg); position: relative; margin-bottom: 5px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); overflow: hidden; transition: background .15s, border-color .15s; }
.notif-item::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tone); }
.notif-item:hover, .notif-item.is-open { background: var(--glass-h); border-color: var(--gb-hi); }
.notif-tone-urgent { --tone: var(--red);    --tone-bg: var(--red-bg); }
.notif-tone-warn   { --tone: var(--orange); --tone-bg: var(--orange-bg); }
.notif-tone-info   { --tone: var(--blue);   --tone-bg: var(--blue-bg); }
.notif-tone-ok     { --tone: var(--green);  --tone-bg: var(--green-bg); }
.notif-enter .notif-item { animation: notifItemIn .34s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }

.notif-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 6px 8px 6px 12px; background: none; border: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.notif-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.notif-ico { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; background: var(--tone-bg); color: var(--tone); font-size: .79rem; }
.notif-title { flex: 1; min-width: 0; font-size: .79rem; font-weight: 600; line-height: 1.3; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item.is-open .notif-title { white-space: normal; overflow-wrap: anywhere; }
.notif-time { flex-shrink: 0; font-size: .79rem; color: var(--text-dim); white-space: nowrap; }
.notif-chev { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 8px; color: var(--text-muted); font-size: .85rem; transition: transform .28s cubic-bezier(.2,.8,.2,1), background .15s, color .15s; }
.notif-row:hover .notif-chev { background: var(--glass-h); color: var(--text); }
.notif-item.is-open .notif-chev { transform: rotate(180deg); color: var(--tone); }

.notif-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s cubic-bezier(.2,.8,.2,1); }
.notif-item.is-open .notif-more { grid-template-rows: 1fr; }
.notif-more-in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .28s; }
.notif-item.is-open .notif-more-in { visibility: visible; transition-delay: 0s; }
.notif-more-body { padding: 0 12px 11px 45px; }
.notif-detail { font-size: .79rem; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.notif-detail + .notif-detail { margin-top: 3px; }
.notif-detail a { color: var(--accent); }
.notif-sub { font-size: .79rem; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.notif-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.notif-detail:empty + .notif-actions, .notif-more-body > .notif-actions:first-child { margin-top: 2px; }

.notif-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); font-size: .79rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.notif-btn:hover { background: var(--glass-h); border-color: var(--gb-hi); }
.notif-btn:active { transform: scale(.97); }
.notif-btn-primary { background: var(--accent); border-color: transparent; color: #0b1206; }
.notif-btn-primary:hover { background: var(--accent); filter: brightness(1.08); border-color: transparent; }
:root[data-theme="light"] .notif-btn-primary { color: #fff; }
.notif-btn-ok { background: var(--green-bg); border-color: transparent; color: var(--green); }
.notif-btn-ok:hover { background: var(--green-bg); filter: brightness(1.15); }

.notif-empty { text-align: center; padding: 36px 16px 30px; }
.notif-empty-ico { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 12px; background: var(--green-bg); color: var(--green); font-size: 1.6rem; }
.notif-empty-title { font-size: .9rem; font-weight: 700; }
.notif-empty-sub { margin-top: 3px; font-size: .79rem; color: var(--text-muted); }

/* Suivi des envois (liste) */
.envoi-group-label { display: flex; align-items: center; gap: 7px; padding: 12px 2px 7px; font-size: .79rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.envoi-group-label .ic { color: var(--accent); font-size: .9rem; }
.envoi-group-label em { margin-left: auto; font-style: normal; padding: 0 8px; border-radius: 8px; background: var(--glass); color: var(--text-dim); letter-spacing: 0; }
.envoi-row { --tone: var(--blue); position: relative; margin-bottom: 8px; padding: 11px 14px 11px 16px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); overflow: hidden; }
.envoi-row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tone); }
.envoi-row.is-due { --tone: var(--orange); }
.envoi-row.is-late2 { --tone: var(--red); }
.envoi-row.is-done { --tone: var(--green); opacity: .8; }
.envoi-dest { font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.envoi-objet { margin-top: 2px; font-size: .79rem; overflow-wrap: anywhere; }
.envoi-sub { margin-top: 3px; font-size: .79rem; color: var(--text-muted); }
.envoi-etat { margin-top: 1px; font-size: .79rem; font-weight: 600; color: var(--tone); }
.envoi-note { margin-top: 5px; font-size: .79rem; color: var(--text-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.envoi-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

/* Badge compteur (cloches mobile) */
.notif-mini-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: .79rem; font-weight: 700; line-height: 1; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg2, #15151b); }
.mobile-bell-btn { position: relative; }
.mobile-top-bar-bell { position: absolute; right: 6px; top: 0; height: 100%; width: 44px; display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text); font-size: 1.1rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mobile-top-bar-bell .notif-mini-badge { top: 8px; right: 5px; }

/* ══════════════════════════════
   RÉSULTATS / CALCULS
══════════════════════════════ */
.result-box {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  box-shadow: var(--hi);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--gb);
}

.result-row:last-child { border-bottom: none; }
.result-label          { font-size: .79rem; color: var(--text-muted); }
.result-value          { font-family: 'DM Mono', monospace; font-size: .9rem; color: var(--text); font-weight: 600; }
.result-value.big      { font-size: 1.1rem; }

.progress-bar-bg {
  background: var(--glass);
  border-radius: 12px;
  height: 5px;
  overflow: hidden;
  margin-top: 5px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 12px;
  background: var(--accent);
  transition: width .5s cubic-bezier(.22,1,.36,1);
}

#canvas-barreaux {
  width: 100%;
  border: 1px solid var(--gb);
  border-radius: 12px;
  display: block;
  margin-top: 10px;
}

/* ══════════════════════════════
   CHANTIERS
══════════════════════════════ */
.chantier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.chantier-card {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .22s, transform .22s cubic-bezier(.22,1,.36,1), border-color .22s;
  cursor: pointer;
  box-shadow: var(--sh), var(--hi);
  will-change: unset;
}

@media (hover: hover) and (pointer: fine) {
  .chantier-card:hover {
    border-color: var(--gb-hi);
  }
}


.chantier-photo             { width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--glass); }
.chantier-photo img         { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.22,1,.36,1); }
@media (hover: hover) and (pointer: fine) {
  .chantier-card:hover .chantier-photo img { transform: none; }
}
.chantier-photo-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.chantier-body              { padding: 14px; }
.chantier-name              { font-weight: 600; font-size: .9rem; margin-bottom: 3px; }
.chantier-sub               { font-size: .79rem; color: var(--text-muted); margin-bottom: 4px; }
.chantier-adresse           { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.chantier-adresse:hover     { color: var(--text); }
.chantier-actions           { display: flex; gap: 7px; margin-top: 10px; }

/* Vue liste */
.chantier-grid.list-view { display: flex; flex-direction: column; gap: 8px; }
.chantier-grid.list-view .chantier-card { display: flex; flex-direction: row; align-items: center; border-radius: 12px; }
.chantier-grid.list-view .chantier-card:hover { transform: none; }
.chantier-grid.list-view .chantier-photo { width: 56px; height: 56px; flex-shrink: 0; }
.chantier-grid.list-view .chantier-photo-placeholder { font-size: 1.4rem; }
.chantier-grid.list-view .chantier-body { flex: 1; min-width: 0; padding: 8px 14px; display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; }
.chantier-grid.list-view .chantier-name { margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chantier-grid.list-view .chantier-name-row { flex: 1 1 auto; min-width: 60px; flex-wrap: nowrap !important; }
.chantier-grid.list-view .chantier-name-row .chantier-name { flex: 1 1 auto; min-width: 0; }
.chantier-grid.list-view .chantier-sub { flex-shrink: 0; }
.chantier-grid.list-view .chantier-sub.chantier-adresse { flex-shrink: 1; min-width: 30px; overflow: hidden; text-overflow: ellipsis; }
.chantier-grid.list-view .chantier-name-row .badge {
  font-variant-numeric: tabular-nums; flex-shrink: 0; }
.chantier-grid.list-view .chantier-sub { margin-bottom: 0; white-space: nowrap; }
.chantier-grid.list-view .chantier-actions { margin-top: 0; margin-left: auto; flex-shrink: 0; }
.chantier-grid.list-view .progress-bar-bg { display: none; }

/* ── Détail chantier ── */
.ch-detail-header { display: grid; grid-template-columns: 240px 1fr auto; gap: 20px; margin-bottom: 18px; }
.ch-detail-photo  { width: 100%; height: 180px; border-radius: 12px; overflow: hidden; background: var(--glass); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.ch-detail-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.22,1,.36,1); }
.ch-detail-photo:hover img { transform: scale(1.06); }
.ch-info-row      { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.ch-info-label    { font-size: .79rem; color: var(--text-muted); font-family: 'DM Mono', monospace; min-width: 100px; }
.ch-info-val      { font-size: .85rem; }

.ch-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--gb);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.ch-tab {
  padding: 7px 13px;
  cursor: pointer;
  font-size: .79rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: background .15s, color .15s, opacity .15s, transform .15s;
  border-radius: 8px 8px 0 0;
}

.ch-tab:hover          { color: var(--text); background: var(--glass-h); }
.ch-tab.active         { color: var(--text); border-bottom-color: rgba(255,255,255,.45); font-weight: 600; }
.ch-tab-content        { display: none; }
.ch-tab-content.active { display: block; }

/* Onglets réorganisables (glisser-déposer), même mécanisme que le dock (layout.css) */
.ch-tab.ch-tab-placeholder { opacity: .18; }
.ch-tab-ghost {
  position: fixed;
  z-index: 520;
  margin: 0;
  pointer-events: none;
  transform: scale(1.06);
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.35));
}
body.ch-tabs-grabbing, body.ch-tabs-grabbing * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

.chantier-statut-chips {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  touch-action: pan-x; overscroll-behavior-y: none; padding-bottom: 12px;
}
.chantier-statut-chips::-webkit-scrollbar { display: none; }
.chantier-chip {
  flex-shrink: 0; padding: 6px 13px; border-radius: 12px; font-size: .79rem; font-weight: 600;
  border: 1px solid var(--gb); background: var(--glass); color: var(--text-muted); cursor: pointer;
  white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s, border-color .15s;
}
.chantier-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chantier-chip-sep { flex: 1 0 12px; }

/* Bascule d'espace Conduc / Chiffrage (au-dessus des chips personnes) */
.chantier-espace-switch {
  display: flex; width: fit-content; align-self: flex-start; gap: 2px; padding: 3px; margin-bottom: 10px;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
}
.chantier-espace-btn {
  padding: 7px 18px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted);
  font-size: .85rem; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .18s, color .18s;
}
.chantier-espace-btn:hover { color: var(--text); }
.chantier-espace-btn.active { background: var(--accent); color: var(--on-accent); }
.chantier-espace-btn:focus-visible, .chantier-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Fiche chantier : onglet Offre (offre.js) + bouton de cycle Travaux finis / DGD fait */
.ch-cycle-btn { margin-left: 8px; vertical-align: middle; }
.offre-banner {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 14px;
  border-radius: 12px; font-size: .85rem; font-weight: 600; animation: offreIn .25s ease-out;
}
.offre-banner-gagne     { background: rgba(146,191,59,.14); color: #b2d45c; border: 1px solid rgba(146,191,59,.32); }
.offre-banner-perdu     { background: rgba(255,69,58,.14); color: #ff6b62; border: 1px solid rgba(255,69,58,.3); }
.offre-form { animation: offreIn .3s ease-out; }
.offre-save { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.offre-actions {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.offre-btn-perdu { color: #ff6b62; }
.offre-donner { flex: 1 1 260px; }
.offre-donner label { display: block; font-size: .79rem; color: var(--text-muted); margin-bottom: 4px; }
.offre-donner-row { display: flex; gap: 8px; }
.offre-donner-row select { flex: 1; }
.perdu-raisons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
@keyframes offreIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .offre-banner, .offre-form { animation: none; } }

.chantiers-toolbar-row { display: contents; }
/* Desktop uniquement : tout sur une seule ligne (mobile garde son empilement 2 lignes,
   géré par .chantiers-toolbar-row en dessous de 641px). Scroll horizontal en dépannage
   si la fenêtre est trop étroite pour tout contenir. */
@media (min-width: 641px) {
  .chantiers-toolbar { flex-wrap: nowrap !important; overflow-x: auto; }
}

/* ── PDF items (liste dans chantier) ── */
.pdf-item { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; padding: 9px 12px; background: var(--glass); border: 1px solid var(--gb); border-radius: 12px; margin-bottom: 6px; }
.pdf-name { flex: 1; min-width: 160px; font-size: .85rem; }
/* ── Documents du chantier (docs_chantier.js) : même présentation que la bibliothèque Fournisseurs (dt-*), plus vignettes, versions, dépôt de PDF et aperçu ── */
.dc-list .dt-row, .dc-list.dt-noprix .dt-row { grid-template-columns: 38px minmax(0, 1fr) 150px 84px auto; }
.dc-row-version { display: flex; align-items: center; gap: 6px; }
.dc-sub-mob { display: none; }
.dc-ajouts { margin-left: auto; display: flex; gap: 8px; }
.dc-ajouts .btn { white-space: nowrap; }
.dc-dt .dt-filters .dt-view-toggle { margin-left: 0; }
.dc-row-version .dc-chip { position: static; box-shadow: none; height: 24px; padding: 0 8px; }
.dc-tree-sep { margin: 10px 8px 4px; font-size: .79rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.dc-folder-type { position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; background: var(--modal-bg); color: var(--accent); border: 1px solid var(--gb); }
.dc-thumb img.dc-vign { object-fit: contain; background: #fff; animation: dcFade .25s ease-out; }
.dt-ico.dc-thumb img.dc-vign { object-fit: cover; }
.dc-chip { position: absolute; top: 8px; left: 8px; z-index: 1; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-lg); font-size: .79rem; font-weight: 600; cursor: pointer; }
.dc-chip:hover { filter: brightness(1.08); }
.dc-chip:focus-visible, .dc-lien:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dc-lien { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-align: left; }
.dc-lien:hover { text-decoration: underline; }
.dc-astuce { margin: 12px 0 0; font-size: .79rem; color: var(--text-muted); }
.dc-lots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dc-drop { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; margin-bottom: 12px; border-radius: 12px; border: 1.5px dashed var(--gb-hi); background: transparent; color: var(--text-muted); font-size: .85rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.dc-drop:hover, .dc-drop.dt-drop-ok { border-color: var(--accent); background: var(--accentbg); color: var(--text); }
.dc-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dc-drop-grand { flex-direction: column; padding: 44px 20px; }
.dc-drop-ico { width: 56px; height: 56px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--accentbg); color: var(--accent); }
.dc-drop-titre { font-weight: 700; color: var(--text); font-size: .9rem; }
.dc-dt .dt-tree { top: 0; max-height: 70vh; }

.dcv-overlay { position: fixed; inset: 0; z-index: 7990; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.62); animation: dcFade .18s ease-out; }
.dcv-box { display: flex; flex-direction: column; width: min(1200px, 100%); height: min(92vh, 100%); border-radius: 12px; border: 1px solid var(--gb-hi); background: var(--bg2); box-shadow: var(--sh-lg); overflow: hidden; animation: dcPop .22s cubic-bezier(.2,.8,.2,1); }
.dcv-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--gb); }
.dcv-titre { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dcv-nom { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcv-meta { font-size: .79rem; color: var(--text-muted); }
.dcv-outils { display: flex; align-items: center; gap: 6px; }
.dcv-zoom { min-width: 46px; text-align: center; font-size: .79rem; color: var(--text-muted); }
.dcv-versions { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--gb); overflow-x: auto; }
.dcv-v { flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); font-size: .85rem; cursor: pointer; transition: background .15s, border-color .15s; }
.dcv-v small { font-size: .79rem; color: var(--text-muted); }
.dcv-v.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dcv-v.active small { color: inherit; }
.dcv-v:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dcv-ancienne { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 14px; background: var(--orange-bg); color: var(--text); font-size: .85rem; border-bottom: 1px solid var(--gb); }
.dcv-ancienne > .ic { color: var(--orange); }
.dcv-stage { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; outline: none; }
@keyframes dcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dcPop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .dc-list .dt-row, .dc-list.dt-noprix .dt-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .dc-list .dc-row-version { display: none; }
  .dc-sub-mob { display: inline; }
  .dcv-overlay { padding: 0; }
  .dcv-box { height: 100%; border-radius: 0; }
  .dcv-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .dcv-overlay, .dcv-box, .dc-thumb img.dc-vign { animation: none; } }

/* ── Zone upload drag-and-drop ── */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 18px 12px; text-align: center; position: relative;
  background: var(--glass); border: 2px dashed var(--border); border-radius: 12px;
  cursor: pointer; transition: border-color .2s, background .2s; margin-top: 4px;
  user-select: none;
}
.upload-zone:hover { border-color: var(--accent); }
.upload-zone.dz-over { border-color: var(--green); background: rgba(100,200,100,.06); }

/* État "photo présente" : le prompt (icône/texte) disparaît, l'image recouvre
   toute la zone — cliquer/glisser dessus reste actif pour la remplacer */
.upload-zone.has-photo { padding: 0; border-style: solid; overflow: hidden; min-height: 160px; }
.upload-zone.has-photo .uz-prompt { display: none; }
.upload-zone #ch-photo-preview:empty { display: none; }
.upload-zone.has-photo #ch-photo-preview { width: 100%; height: 160px; }
.upload-zone.has-photo #ch-photo-preview img,
.upload-zone.has-photo #ch-photo-preview .upfb-wrap { width: 100%; height: 100%; }
.upload-zone.has-photo #ch-photo-preview img { object-fit: cover; display: block; border-radius: 0; border: none; }
.uz-remove-btn {
  display: none; position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: .79rem; cursor: pointer;
  align-items: center; justify-content: center;
}
.upload-zone.has-photo .uz-remove-btn { display: flex; }
.uz-remove-btn:hover { background: var(--red); }


/* ══════════════════════════════
   TÂCHES — VUE LISTE TABLEAU
══════════════════════════════ */
.tache-table-wrap { overflow-x: auto; }
.tache-empty-wrap { padding: 40px 0; }
/* min-width : sans ça un conteneur juste un peu trop étroit (tablette portrait 834px, fenêtre
   réduite) faisait "tenir" la table coûte que coûte - colonnes compressées à l'extrême, Notes
   affichée un mot par ligne au lieu de défiler horizontalement (2026-11-03). */
.tache-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: .85rem; }
.tache-table thead tr { border-bottom: 2px solid var(--border); }
.tache-table th {
  text-align: left; padding: 8px 10px;
  font-size: .79rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.tache-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tache-table td.td-num,
.tache-table td.td-prog,
.tache-table td.td-prio,
.tache-table td.td-actions { vertical-align: middle; }
.tache-row { transition: background .12s; }
.tache-row:hover { background: var(--glass); }
/* Done row */
.tache-row.done-row .td-titre { color: var(--text-muted); }
.tache-row.done-row .td-ch,
.tache-row.done-row .td-notes,
.tache-row.done-row .td-date,
.tache-row.done-row .td-num { opacity: .55; }
.td-num { text-align: center; color: var(--text-muted); font-size: .79rem; font-weight: 700; }
.td-ch { vertical-align: middle !important; min-width: 110px; }
.td-date { font-size: .79rem; font-family: monospace; white-space: nowrap; }
.td-prio {}
.td-notes { color: var(--text-muted); font-size: .79rem; white-space: pre-wrap; word-break: break-word; line-height: 1.5; max-width: 220px; min-width: 150px; }
.td-titre { white-space: normal; word-break: break-word; font-size: .9rem; vertical-align: middle !important; min-width: 140px; }
.td-titre-inner { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Slider progression tâches ─────────────────────────────── */
.tache-prog-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 170px;
  height: 16px;       /* hauteur suffisante pour le thumb — ne pas mettre 4px ici */
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin: 0;
  --prog-fill: 0%;
  --prog-color: var(--accent);
}
/* Track (barre de fond) — remplissage réel jusqu'à --prog-fill, couleur selon --prog-color */
.tache-prog-slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--prog-color) var(--prog-fill), var(--gb) var(--prog-fill));
}
.tache-prog-slider::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--prog-color) var(--prog-fill), var(--gb) var(--prog-fill));
  border: none;
}
/* Thumb (rond) — centré sur la track, atteint bien les bords 0% / 100% */
.tache-prog-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--prog-color);
  margin-top: -4.5px;   /* (14px - 5px) / 2 = 4.5 → centre le thumb sur la track */
  cursor: grab;
  transition: transform .12s, box-shadow .12s, background .15s;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--prog-color) 25%, transparent);
}
.tache-prog-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--prog-color);
  border: none;
  cursor: grab;
  transition: transform .12s, box-shadow .12s, background .15s;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--prog-color) 25%, transparent);
}
.tache-prog-slider:hover::-webkit-slider-thumb { transform: scale(1.2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--prog-color) 40%, transparent); }
.tache-prog-slider:hover::-moz-range-thumb    { transform: scale(1.2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--prog-color) 40%, transparent); }
.tache-prog-slider:active::-webkit-slider-thumb { cursor: grabbing; }
.tache-prog-slider:active::-moz-range-thumb    { cursor: grabbing; }
/* Terminé → thumb vert vif */
.tache-prog-slider.prog-done::-webkit-slider-thumb { background: var(--green, #51d88a); box-shadow: 0 0 0 3px rgba(81,216,138,.25); }
.tache-prog-slider.prog-done::-moz-range-thumb    { background: var(--green, #51d88a); box-shadow: 0 0 0 3px rgba(81,216,138,.25); }
.td-actions { white-space: nowrap; padding-right: 6px !important; }
.tache-ch-badge {
  font-size: .79rem; font-weight: 600; background: var(--glass);
  border: 1px solid var(--border); border-radius: 8px; padding: 2px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 155px;
}
/* Boutons action dans le tableau */
.tache-act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: none; border-radius: 4px;
  background: var(--glass); color: var(--text-muted);
  cursor: pointer; font-size: .79rem; line-height: 1;
  transition: background .12s, color .12s;
  vertical-align: middle;
}
.tache-act-btn:hover { background: var(--glass-a); color: var(--text); }
.tache-act-del { color: var(--red) !important; }
.tache-act-del:hover { background: rgba(200,0,0,.12) !important; }

/* ══════════════════════════════
   DOE — Dossier des Ouvrages Exécutés
══════════════════════════════ */
.doe-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.doe-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.doe-section-title {
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent);
  flex: 1;
  min-width: 0;
}
.doe-docs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doe-doc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
}
.doe-section.doe-dragging, .doe-doc-item.doe-dragging {
  opacity: .45;
  cursor: grabbing;
}
body.doe-grabbing, body.doe-grabbing * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.doe-drag-handle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-dim);
  cursor: grab;
  touch-action: none;
  border-radius: 4px;
}
.doe-drag-handle:hover { background: var(--glass-a); color: var(--text); }
.doe-drag-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.doe-drag-handle svg { width: 16px; height: 16px; }
.doe-inline-edit {
  width: 100%;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
}
.doe-menu-wrap { position: relative; flex-shrink: 0; }
.doe-menu-btn { padding: 4px 7px !important; }
.doe-menu-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  padding: 4px;
  flex-direction: column;
  gap: 1px;
}
.doe-menu-wrap.open .doe-menu-list { display: flex; }
.doe-menu-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font-size: .85rem;
  color: var(--text);
  padding: 7px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.doe-menu-list button svg { width: 15px; height: 15px; flex-shrink: 0; }
.doe-menu-list button:hover:not(:disabled) { background: var(--glass-a); }
.doe-menu-list button:disabled { opacity: .35; cursor: default; }
.doe-menu-list button.doe-menu-danger { color: var(--red); }
.doe-menu-list button.doe-menu-danger:hover { background: rgba(200,0,0,.12); }
.doe-doc-label {
  flex: 1;
  min-width: 0;
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doe-doc-cont {
  margin-left: 18px;
  border-left: 3px solid var(--accent);
}
.doe-goto {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.doe-goto:hover { text-decoration: underline; }
.doe-goto:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.doe-doc-label .doe-goto {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-doe-wide { width: 1180px; max-width: calc(100vw - 40px); }
#modal-doe-edit.modal-overlay { z-index: 605; }
.doe-layout { display: flex; gap: 20px; align-items: flex-start; }
.doe-layout-left { flex: 0 0 340px; min-width: 260px; }
.doe-layout-right { flex: 1; min-width: 0; position: sticky; top: 0; }
.doe-preview-label {
  font-size: .79rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.doe-preview-panel {
  background: #e4e4e4;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  max-height: 74vh;
  overflow-y: auto;
  overflow-x: auto;
}
.doe-preview-loading {
  color: var(--text-muted);
  font-size: .79rem;
  padding: 30px 8px;
  text-align: center;
}
.doe-preview-frame { border: 0; display: block; transform-origin: top left; box-shadow: 0 2px 10px rgba(0,0,0,.25); background: #fff; }
.dos-page-placeholder {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 4px;
  color: var(--text-muted); font-size: .85rem;
}
@media (max-width: 860px) {
  .doe-layout { flex-direction: column; }
  .doe-layout-left { flex: 1 1 auto; width: 100%; }
  .doe-layout-right { position: static; width: 100%; }
  .doe-preview-panel { max-height: 60vh; }
}

/* ══════════════════════════════
   DOSSIERS (fiche chantier) + fiche sous-traitant
══════════════════════════════ */
.dos-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dos-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: .79rem; font-weight: 600; color: var(--text-muted); background: var(--glass); border: 1px solid var(--gb); border-radius: 12px; cursor: pointer; font-family: inherit; transition: background .15s, color .15s, border-color .15s; }
.dos-chip:hover { background: var(--glass-h); color: var(--text); }
.dos-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dos-chip.active { background: var(--accentbg); color: var(--accent); border-color: rgba(146,191,59,.4); }
.dos-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin: 4px 0 8px; cursor: pointer; }
.dos-check input { width: auto; margin: 0; accent-color: var(--accent); }
.hop-row { display: grid; grid-template-columns: 2fr 3fr 1.2fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
@media (max-width: 640px) { .hop-row { grid-template-columns: 1fr; } }
.dos-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dos-add { margin: 12px 0 10px; border: 1px dashed var(--gb); border-radius: 8px; padding: 8px 12px; max-width: 520px; }
.dos-add > summary { cursor: pointer; font-size: .79rem; font-weight: 600; color: var(--text-muted); padding: 2px 0; }
.dos-add > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dos-add[open] > summary { margin-bottom: 8px; }
.dos-form { padding: 2px 4px 14px 2px; max-height: 76vh; overflow-y: auto; }
.dos-form h3 { margin: 14px 0 6px; font-size: .85rem; }
.dos-form-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.dos-save { font-size: .79rem; color: var(--text-muted); }
.dos-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dos-hint { font-size: .79rem; color: var(--text-muted); margin-bottom: 6px; }
.dos-missing { font-size: .79rem; color: var(--orange); background: rgba(224,168,0,.1); border: 1px solid rgba(224,168,0,.35); border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; line-height: 1.4; }
.dos-ok { font-size: .79rem; color: var(--green); margin-bottom: 8px; }
.dos-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.dos-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 10px; text-align: center; font-family: inherit; color: var(--text); background: var(--glass); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color .2s, background .2s; }
.dos-card:hover { border-color: var(--accent); background: var(--glass-h); }
.dos-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dos-card-ic { font-size: 1.8rem; margin-bottom: 4px; }
.dos-card small { font-size: .79rem; color: var(--text-muted); }
.dos-card-act { margin-top: 8px; font-size: .79rem; font-weight: 600; color: var(--accent); }
.st-metiers { display: flex; flex-wrap: wrap; gap: 5px; border: 1px solid var(--gb); border-radius: 8px; padding: 8px; }
.st-metier { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: .79rem; cursor: pointer; background: var(--glass); border: 1px solid var(--gb); border-radius: 12px; }
.st-metier.on { background: var(--accentbg); border-color: rgba(146,191,59,.4); }
.st-metier input { width: auto; margin: 0; accent-color: var(--accent); }
.pm-risque { border: 1px solid var(--gb); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
.pm-risque details { margin-top: 4px; font-size: .79rem; color: var(--text-muted); }
.pm-risque summary { cursor: pointer; padding: 3px 0; }

/* ══════════════════════════════
   PLANS DE CHANTIER — visionneuse PDF interactive
══════════════════════════════ */
.modal-plan-viewer {
  width: calc(100vw - 32px); max-width: 1700px;
  height: calc(100vh - 32px); max-height: calc(100vh - 32px);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
#modal-plan-viewer.modal-overlay { padding-bottom: 0; z-index: 610; }
#modal-plan-point.modal-overlay, #modal-plan-note.modal-overlay { z-index: 620; }
#modal-plans-reserve-newlist.modal-overlay, #modal-plan-photo-annot.modal-overlay { z-index: 630; }
.plans-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.plans-page-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plans-page-niveau { width: 190px; padding: 5px 30px 5px 10px; font-size: .79rem; }
.plans-viewer-body { flex: 1; min-height: 0; display: flex; gap: 16px; position: relative; }
.plans-sidebar { flex: 0 0 25%; max-width: 25%; overflow-y: auto; border-right: 1px solid var(--border); padding-right: 12px; }
.plans-sidebar-numero {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: .79rem; font-weight: 700; flex-shrink: 0;
}
.plans-sidebar-numero.type-description { background: var(--blue); }
.plans-sidebar-numero.type-reserve { background: var(--orange); }
.plans-sidebar-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 6px; border-radius: 8px; cursor: pointer;
}
.plans-sidebar-item:hover { background: var(--glass-sb); }
.plans-viewport {
  flex: 1; min-width: 0; position: relative; overflow: hidden;
  background: #333; border-radius: 12px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.plans-viewport.dragging { cursor: grabbing; }
.plans-viewport-content { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.plans-canvas-hires {
  position: absolute; top: 0; left: 0;
  pointer-events: none; opacity: 0; transition: opacity .12s ease;
}
.plans-canvas-hires.visible { opacity: 1; }
.plans-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); border-radius: 12px; pointer-events: none; z-index: 5;
}
.plans-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: plansSpin .7s linear infinite;
}
@keyframes plansSpin { to { transform: rotate(360deg); } }
.plans-pins-layer { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.plan-pin {
  position: absolute;
}
.plan-pin-badge {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  transform: translate(-50%,-50%) scale(var(--plans-inv-zoom,1)); transform-origin: 50% 50%;
  will-change: transform; backface-visibility: hidden;
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: .79rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); border: 2px solid #fff;
}
.plan-pin-badge.type-description { background: var(--blue); }
.plan-pin-badge.type-reserve { background: var(--orange); }
.plan-pin.dragging { z-index: 20; cursor: grabbing; }
.plan-pin.dragging .plan-pin-badge { box-shadow: 0 4px 14px rgba(0,0,0,.5); transform: scale(1.15); }
.plans-export-dropdown { position: relative; }
.plans-export-dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 13px 16px; font-size: .9rem; font-weight: 500;
  background: var(--glass); border: 1px solid var(--gb); border-radius: 12px;
  color: var(--text); cursor: pointer;
}
.plans-export-dd-caret { color: var(--text-muted); font-size: .79rem; flex-shrink: 0; }
.plans-export-dd-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  max-height: 320px; overflow-y: auto;
  background: var(--modal-bg); border: 1px solid var(--gb-hi, var(--gb)); border-radius: 12px;
  box-shadow: var(--sh, 0 8px 24px rgba(0,0,0,.35)); padding: 8px;
}
.plans-export-dd-item {
  display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-radius: 8px;
  font-size: .9rem; cursor: pointer; user-select: none; transition: background .12s, color .12s;
}
.plans-export-dd-item:hover { background: var(--glass-h); }
.plans-export-dd-item.selected { background: var(--accentbg); color: var(--accent); font-weight: 600; }
.plans-export-dd-item::before {
  content: ''; flex-shrink: 0; width: 17px; height: 17px; border-radius: 4px;
  border: 1.5px solid var(--gb-hi, var(--gb)); background: var(--glass);
}
.plans-export-dd-item.selected::before {
  border-color: var(--accent); background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px 12px; background-repeat: no-repeat; background-position: center;
}
.plan-pin-label {
  position: absolute; left: 0; top: 14px; pointer-events: auto; cursor: pointer;
  transform: translate(-50%,0) scale(var(--plans-inv-zoom,1)); transform-origin: 50% 0;
  font-size: .79rem; padding: 1px 6px; border-radius: 8px;
  background: rgba(0,0,0,.75); color: #fff; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.plans-tap-menu {
  position: absolute; display: none; flex-direction: column; gap: 2px; min-width: 150px;
  background: var(--modal-bg); border: 1px solid var(--gb-hi); border-radius: 12px; box-shadow: var(--sh-lg); padding: 6px; z-index: 5;
}
.plans-tap-menu-item {
  padding: 8px 12px; border-radius: 8px; font-size: .85rem; cursor: pointer; background: none; border: none;
  color: var(--text); text-align: left; width: 100%; display: flex; align-items: center; gap: 8px;
}
.plans-tap-menu-item:hover { background: var(--glass-h); }
.plans-tap-menu-item.danger { color: var(--red); }
.plans-mobile-list-btn { display: none; position: absolute; right: 16px; bottom: 16px; z-index: 4; border-radius: 24px; }
.plans-mobile-drawer { display: none; }
.plans-empty-plan { color: var(--text-muted); font-size: .79rem; text-align: center; padding: 30px 10px; }
.plans-list-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}

/* ══════════════════════════════
   FOURNISSEURS
══════════════════════════════ */
/* Annuaire fournisseurs */
.fourn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* Fiche générique (lignes label/valeur) — utilisé par documents techniques */
.fiche-rows { display: flex; flex-direction: column; gap: 8px; }
.fiche-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--gb); font-size: .85rem; }
.fiche-row:last-child { border-bottom: none; }
.fiche-label { color: var(--text-dim); flex-shrink: 0; }

/* Zone de dépôt fichier */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed var(--gb-hi); border-radius: 12px; padding: 22px 16px; text-align: center;
  background: var(--glass-sb); cursor: pointer; transition: border-color .18s, background .18s;
}
.dropzone:hover, .dropzone.dropzone-active { border-color: var(--accent); background: var(--accentbg); }
.dropzone.dropzone-filled { border-style: solid; border-color: rgba(146,191,59,.4); }
.dropzone-icon { font-size: 1.6rem; opacity: .7; }
.dropzone-text { font-size: .79rem; color: var(--text-muted); }
.dropzone-text .link { color: var(--accent); font-weight: 600; }
.dropzone-filename { font-size: .79rem; color: var(--text); font-weight: 500; word-break: break-all; }

.plans-photo-preview { position: relative; display: block; }
.plans-photo-preview img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; display: block; }
.plans-photo-remove {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; border: none; font-size: 1.1rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.plans-photo-change {
  position: absolute; top: 6px; right: 40px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; border: none; font-size: .79rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.plans-photo-hint { margin-top: 6px; font-size: .79rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

/* Grille multi-photos (point "description") - même vignette que .plans-photo-preview mais plus
   compacte, plusieurs par ligne. */
.plans-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.plans-photos-grid .plans-photo-preview img { height: 84px; }

/* Annotation de mesures sur photo (cote) - même gabarit que la visionneuse de plans
   (.modal-plan-viewer, plein écran) pour que la photo soit affichée en grand.
   Colonne infos à gauche (taille fixe) + photo à droite (le reste) : la hauteur de la photo ne
   dépend ainsi jamais du contenu du panneau (nombre de mesures listées, message affiché…) - sans
   ça, un panneau qui change de hauteur rétrécit/agrandit la zone photo entre deux rendus et fait
   "sauter" les points déjà placés (ils sont stockés en fraction de la taille affichée, recalculée
   à chaque render). */
.plan-annot-body { flex: 1; min-height: 0; display: flex; gap: 16px; }
.plan-annot-side { flex: 0 0 260px; max-width: 260px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.plan-annot-stage {
  position: relative; flex: 1; min-width: 0; overflow: hidden; background: #333; border-radius: 12px;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.plan-annot-stage.dragging { cursor: grabbing; }
.plan-annot-transform {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform-origin: 0 0; will-change: transform;
}
.plan-annot-imgwrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.plan-annot-imgwrap img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; cursor: crosshair; }
.plan-annot-overlay { position: absolute; inset: 0; pointer-events: none; }
.plan-annot-point {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: .79rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  transform: translate(-50%,-50%) scale(var(--plans-inv-zoom,1)); transform-origin: 50% 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); border: 2px solid #fff; cursor: grab; touch-action: none;
}
.plan-annot-point.dragging { cursor: grabbing; box-shadow: 0 4px 14px rgba(0,0,0,.5); z-index: 4; }
.plan-annot-line { position: absolute; height: 2px; background: var(--accent); transform-origin: 0 50%; opacity: .85; }
.plan-annot-magnifier {
  display: none; position: absolute; width: 96px; height: 96px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,.5); pointer-events: none;
  background-repeat: no-repeat; z-index: 6; transform: translate(-50%,-50%);
}
.plan-annot-magnifier-dot {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); border: 1px solid #fff; transform: translate(-50%,-50%);
}
.plan-annot-dimlabel {
  position: absolute; font-size: .79rem; font-weight: 600; padding: 1px 5px; border-radius: 4px;
  background: rgba(0,0,0,.75); color: #fff; white-space: nowrap; pointer-events: auto; cursor: pointer;
}
.plan-annot-dimlabel:hover { background: var(--accent); }
/* Saisie/édition d'une longueur directement au même endroit que la cote une fois affichée
   (pas dans le panneau) - jamais tournée (même si la cote finale l'est), pour rester tapable. */
.plan-annot-value-inline {
  position: absolute; pointer-events: auto; z-index: 3; display: flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,.85); border-radius: 8px; padding: 3px 4px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.plan-annot-value-inline input { width: 62px; padding: 3px 6px; font-size: .79rem; }
.plan-annot-value-inline span { font-size: .79rem; color: rgba(255,255,255,.7); }
.plan-annot-value-inline button {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 4px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .79rem; font-weight: 700;
}
.plan-annot-value-inline button.ok { background: var(--accent); color: var(--on-accent); }
.plan-annot-value-inline button.cancel { background: rgba(255,255,255,.18); color: #fff; }
.plan-annot-panel { flex-shrink: 0; padding: 10px 12px; background: var(--glass); border: 1px solid var(--gb); border-radius: 8px; font-size: .85rem; }
.plan-annot-segments { flex-shrink: 0; font-size: .79rem; color: var(--text-muted); }
.plan-annot-segments div { padding: 3px 0; }
.plan-annot-seg-group { padding: 6px 0; border-bottom: 1px solid var(--gb); }
.plan-annot-seg-group:last-child { border-bottom: none; }
.plan-annot-seg-delete {
  margin-top: 4px; padding: 4px 8px; font-size: .79rem; color: var(--red); background: none;
  border: 1px solid var(--red); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.plan-annot-seg-delete:hover { background: var(--red); color: #fff; }
#plan-annot-tap-menu.plans-tap-menu { z-index: 5; }
/* Mobile (≤640px, voir mobile.css) : colonne de gauche remplacée par un tiroir bas, même
   pattern que .plans-mobile-drawer/.plans-mobile-list-btn de la visionneuse de plans. */
.plan-annot-mobile-btn { display: none; position: absolute; right: 16px; bottom: 16px; z-index: 4; border-radius: 24px; }
.plan-annot-mobile-drawer { display: none; }

/* Tableau DPGF - meme style que le tableau devis (.devis-table.dv-compact dans la section Devis) :
   grille bordee case par case, entete en gras, surlignage de ligne au survol. */
.dpgf-table-wrap { overflow-x: auto; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); }
.dpgf-table { width: 100%; border-collapse: collapse; font-size: .79rem; }
.dpgf-table th { text-align: left; padding: 8px 10px; background: var(--glass); color: var(--text-muted); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; border: 1px solid var(--gb); white-space: nowrap; }
.dpgf-table td { padding: 6px 10px; border: 1px solid var(--gb); vertical-align: middle; }
.dpgf-table tr:hover td { background: var(--glass-sb); }
.dpgf-table .num { text-align: right; padding-right: 6px; }
.dpgf-row-chapitre td { font-weight: 700; background: var(--glass-h); padding-top: 16px; }
.dpgf-row-new td { border-bottom: none; }
.dpgf-inline-select { width: auto; font-size: .79rem; padding: 4px 8px; }
.dpgf-inline-num { max-width: 90px; }
.dpgf-table-wrap:not(.show-achat) .dpgf-col-achat { display: none; }
.dt-fourn-bandeau { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .85rem; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); }
.dt-fourn-bandeau .btn { margin-left: auto; }
.dpgf-cell-input, .dpgf-new-input {
  width: 100%; box-sizing: border-box; background: transparent; border: 1px solid transparent;
  border-radius: 0; box-shadow: none; padding: 2px 4px; color: var(--text);
}
.dpgf-cell-input:hover, .dpgf-new-input:hover { background: var(--glass-sb); }
.dpgf-cell-input:focus, .dpgf-new-input:focus { background: var(--glass-sb); border-color: var(--gb); box-shadow: none; }
.dpgf-new-input::placeholder { color: var(--text-dim); }
.dpgf-cell-textarea { resize: none; overflow: hidden; font-family: inherit; font-size: inherit; line-height: 1.35; min-height: 22px; display: block; }
.dpgf-table input[type="number"]::-webkit-inner-spin-button,
.dpgf-table input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dpgf-table input[type="number"] { -moz-appearance: textfield; }
.dpgf-table th, .dpgf-table td { white-space: nowrap; }
.dpgf-table td.dpgf-col-desig, .dpgf-table td.dpgf-col-note,
.dpgf-table th.dpgf-col-desig, .dpgf-table th.dpgf-col-note { white-space: normal; }
.dpgf-table td.dpgf-col-desig { min-width: 160px; }
.dpgf-table td.dpgf-col-note { min-width: 120px; }
.dpgf-table th.dpgf-col-code, .dpgf-table td.dpgf-col-code { width: 1%; min-width: 0; }
.dpgf-table th.dpgf-col-u { width: 1%; }
.dpgf-table th.dpgf-col-u { padding-right: 6px; }
.dpgf-table th.dpgf-col-qte { width: 1%; padding-right: 6px; }
.dpgf-table th.dpgf-col-pu { width: 1%; padding-right: 6px; }
.dpgf-table th.dpgf-col-action { width: 32px; }
.dpgf-col-code-input { min-width: 30px; }
/* Colonnes à width:1% : sans largeur mini, le champ se réduit à ~10-20 px et tronque la valeur. */
.dpgf-table td input[data-field="unite"] { min-width: 42px; }
.dpgf-table td input[data-field="quantite"] { min-width: 64px; }
.dpgf-table td input[data-field="prix_unitaire"], .dpgf-table td input[data-field="prix_achat"] { min-width: 78px; }

/* Sélecteur RAL avec pastille couleur (pliage tôlerie) */
.pl-ral-picker { position: relative; }
.pl-ral-btn { display: flex; align-items: center; gap: 8px; width: 100%; font-size: .79rem; text-align: left; cursor: pointer; }
.pl-ral-btn-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ral-caret { color: var(--text-muted); font-size: .79rem; }
.pl-ral-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); flex-shrink: 0; }
.pl-ral-list { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; width: max(100%, 260px); max-height: 280px; overflow-y: auto; background: var(--modal-bg); border: 1px solid var(--gb); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); padding: 6px; }
.pl-ral-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; font-size: .79rem; position: sticky; top: -6px; background: var(--modal-bg); z-index: 1; }
.pl-ral-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: .79rem; }
.pl-ral-item:hover { background: var(--glass-sb); }
.pl-ral-item .pl-ral-swatch { width: 14px; height: 14px; border-radius: 3px; }
.pl-ral-item-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Contour et trous dessinés au clic (pliage tôlerie, pliage.js plCt*) */
.pl-ct-carte { margin-bottom: 8px; animation: plCtEntree .3s cubic-bezier(.22,1,.36,1) both; }
.card.pl-ct-carte:hover { transform: none; }
@keyframes plCtEntree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pl-ct-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pl-ct-tete .card-title { margin-bottom: 0; font-size: .79rem; }
.pl-ct-zoom { display: flex; gap: 4px; }
.pl-ct-outils { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pl-ct-outils .btn:disabled { opacity: .45; pointer-events: none; }
.pl-ct-outils .btn[aria-pressed="true"] { background: var(--accentbg); border-color: var(--accent); color: var(--text); }
.pl-ct-outils .btn:focus-visible, .pl-ct-zoom .btn-icon:focus-visible, .pl-tr-type:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-ct-aide { font-size: .79rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 8px; }
.pl-ct-zone { position: relative; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pl-ct-svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.pl-ct-svg:focus { outline: none; }
.pl-ct-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pl-ct-actif { cursor: crosshair; }
.pl-ct-grille, .pl-ct-cotes, .pl-ct-cote, .pl-ct-elastique, .pl-ct-viseur, .pl-ct-echelle { pointer-events: none; }
.pl-ct-grille { fill: none; stroke: var(--border); stroke-width: 1; }
.pl-ct-forme { fill: var(--accentbg); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.pl-ct-trace { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.pl-ct-sommet { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.pl-ct-premier.pl-ct-proche { fill: var(--accent); }
.pl-ct-elastique { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 4; }
.pl-ct-viseur { fill: var(--accent); }
.pl-ct-echelle { fill: var(--text-muted); font-size: .79rem; }
.pl-ct-rappel { stroke: var(--text-dim); stroke-width: 1; }
.pl-ct-cote-ligne { stroke: var(--text-muted); stroke-width: 1; }
.pl-ct-fleche { fill: var(--text-muted); }
.pl-ct-txt, .pl-ct-angle-txt { font-size: .79rem; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.pl-ct-txt { fill: var(--text); }
.pl-ct-cote-trou .pl-ct-cote-ligne { stroke: var(--accent); }
.pl-ct-cote-trou .pl-ct-fleche { fill: var(--accent); }
.pl-ct-angle-arc { fill: none; stroke: var(--orange); stroke-width: 1; }
.pl-ct-angle-txt { fill: var(--orange); }
.pl-ct-modif { pointer-events: auto; cursor: pointer; outline: none; }
.pl-ct-cible { fill: transparent; }
.pl-ct-modif:hover .pl-ct-cible { fill: var(--accentbg); }
.pl-ct-modif:focus-visible .pl-ct-cible { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 2; }
.pl-ct-en-cours { visibility: hidden; }
.pl-ct-saisie { position: absolute; width: 88px; padding: 3px 8px; font-size: .79rem; text-align: center; background: var(--bg); appearance: textfield; -moz-appearance: textfield; animation: overlayIn .15s ease both; }
.pl-ct-saisie::-webkit-inner-spin-button, .pl-ct-saisie::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pl-tr { cursor: grab; outline: none; }
.pl-ct-glisse, .pl-ct-glisse .pl-tr { cursor: grabbing; }
.pl-tr-zone { fill: transparent; }
.pl-tr-cercle { fill: var(--bg); stroke: var(--blue); stroke-width: 1.5; }
.pl-tr-poincon .pl-tr-cercle { stroke-dasharray: 3 2; }
.pl-tr-croix { stroke: var(--blue); stroke-width: 1; }
.pl-tr-sel .pl-tr-cercle { stroke: var(--accent); stroke-width: 2.5; }
.pl-tr-sel .pl-tr-croix { stroke: var(--accent); }
.pl-tr:focus-visible .pl-tr-zone { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 2; }
.pl-tr-panneau { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 10px; padding: 10px 12px; background: var(--glass); border: 1px solid var(--gb); border-radius: 12px; animation: plCtEntree .2s ease both; }
.pl-tr-panneau[hidden] { display: none; }
.pl-tr-titre { align-self: center; font-size: .85rem; font-weight: 700; }
.pl-tr-champ { display: flex; flex-direction: column; }
.pl-tr-champ input { width: 100px; font-size: .79rem; }
.pl-tr-lbl { font-size: .79rem; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.pl-tr-types { display: inline-flex; border: 1px solid var(--gb-in); border-radius: 12px; overflow: hidden; }
.pl-tr-type { min-height: 34px; padding: 6px 14px; font-size: .79rem; color: var(--text-muted); background: var(--glass); border: none; cursor: pointer; }
.pl-tr-type + .pl-tr-type { border-left: 1px solid var(--gb-in); }
.pl-tr-type[aria-pressed="true"] { background: var(--accentbg); color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  .pl-ct-zoom .btn-icon { width: 36px; height: 36px; }
  .pl-tr-type { min-height: 40px; }
}

/* Checklist chantier (module Suivi) */
/* ══════════════════════════════
   ANNUAIRE FOURNISSEURS
══════════════════════════════ */
.fourn-annuaire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.fourn-card-v2 {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--sh);
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  display: flex; flex-direction: column;
}
@media (hover: hover) and (pointer: fine) {
  .fourn-card-v2:hover { border-color: var(--gb-hi); }
}

.fourn-card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 14px 10px;
}
.fourn-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
  flex: 1;
}
.fourn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .79rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}
.fourn-badge-contact { background: rgba(52,152,219,.12); color: #3498db; }
.fourn-badge-prix    { background: rgba(146,191,59,.12);  color: var(--accent); }
.fourn-badge-acces   { background: rgba(155,89,182,.12);  color: #9b59b6; }
.fourn-card-footer {
  padding: 8px 14px 12px;
  border-top: 1px solid var(--border);
}
.fourn-open-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .79rem;
  color: var(--accent);
  font-weight: 500;
}
.fourn-del-btn { opacity: 0; transition: opacity .15s; }
.fourn-card-v2:hover .fourn-del-btn { opacity: 1; }

.fourn-name { font-weight: 700; font-size: .9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fourn-cat  { font-size: .79rem; color: var(--text-muted); }

/* ── Fiche modale ── */
.modal-fiche-fourn-inner {
  max-width: 740px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.fiche-fourn-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.fiche-fourn-identity { min-width: 0; }
.fiche-fourn-nom { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.fiche-fourn-cat { font-size: .79rem; color: var(--text-muted); }

.fiche-fourn-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 20px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.fiche-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.fiche-tab:hover { color: var(--text); }
.fiche-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.fiche-tab-badge {
  background: var(--accent);
  color: #0d0d0d;
  font-size: .79rem;
  font-weight: 700;
  border-radius: 8px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.fiche-fourn-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Infos */
.fiche-infos-grid { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.fiche-info-row {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.fiche-info-row:last-child { border-bottom: none; }
.fiche-info-label { font-size: .79rem; color: var(--text-muted); min-width: 110px; flex-shrink: 0; }
.fiche-info-val { font-size: .9rem; }
.fiche-info-val a { color: var(--accent); text-decoration: none; }
.fiche-info-val a:hover { text-decoration: underline; }
.fiche-notes { background: var(--surface2); border-radius: 8px; padding: 12px 14px; margin-top: 8px; }
.fiche-notes-label { font-size: .79rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); margin-bottom: 6px; }

/* Contacts */
.fiche-section-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.fiche-section-label { font-size: .79rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.fiche-contacts-list { display: flex; flex-direction: column; gap: 10px; }
.fiche-contact-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.fiche-contact-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fiche-contact-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accentbg);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}
.fiche-contact-links { display: flex; flex-wrap: wrap; gap: 8px; }
.fiche-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .79rem;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 8px;
  background: var(--accentbg);
  border-radius: 8px;
}
.fiche-contact-link:hover { text-decoration: underline; }

/* Prix */
.fiche-prix-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.fiche-prix-table th { text-align: left; font-size: .79rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 0 10px 8px 0; border-bottom: 1px solid var(--border); }
.fiche-prix-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fiche-prix-table tr:last-child td { border-bottom: none; }

/* Accès web */
.fiche-acces-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.fiche-acces-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.fiche-acces-icon {
  width: 26px; height: 26px;
  background: rgba(155,89,182,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #9b59b6;
}
.fiche-acces-details { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.fiche-acces-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fiche-acces-label { font-size: .79rem; color: var(--text-muted); min-width: 90px; flex-shrink: 0; }
.fiche-acces-val { font-size: .85rem; font-family: 'DM Mono', monospace; }
.fiche-acces-link {
  font-size: .79rem; color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 400px;
}
.fiche-acces-link:hover { text-decoration: underline; }
.fiche-acces-copy {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 8px;
  padding: 3px 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: background .15s, color .15s;
}
.fiche-acces-copy:hover { background: var(--accentbg); color: var(--accent); }

/* Vue semaine — grille horaire style agenda (Lun-Ven) */
.cal-week-wrap { border:1px solid var(--gb); border-radius:12px; background:var(--glass); overflow:hidden; box-shadow:var(--hi); }
.cal-week-headrow { display:flex; border-bottom:1px solid var(--gb); }
.cal-week-timecol-spacer { width:52px; flex-shrink:0; }
.cal-week-dayhead { flex:1; text-align:center; padding:8px 4px 10px; cursor:pointer; border-left:1px solid var(--gb); transition:background .15s; }
.cal-week-dayhead:first-child { border-left:none; }
.cal-week-dayhead:hover { background:var(--glass-h); }
.cal-week-dayhead .dname { font-size:.79rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.02em; font-weight:600; }
.cal-week-dayhead .dnum { font-size:1.1rem; font-weight:700; color:var(--text); margin:4px auto 0; width:30px; height:30px; line-height:30px; border-radius:50%; }
.cal-week-dayhead.today .dnum { background:var(--accent); color:var(--on-accent); }
.cal-week-dayhead.sel:not(.today) { outline:2px solid var(--accent); outline-offset:-2px; border-radius:8px; }

.cal-allday-row { display:flex; border-bottom:1px solid var(--gb); padding:4px 0; }
.cal-allday-cell { flex:1; border-left:1px solid var(--gb); padding:1px 4px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.cal-allday-cell:first-child { border-left:none; }
.cal-allday-chip { font-size:.79rem; font-weight:600; padding:2px 6px; border-radius:4px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.cal-week-body { display:flex; position:relative; max-height:640px; overflow-y:auto; }
.cal-week-timecol { width:52px; flex-shrink:0; position:relative; }
.cal-hour-label { position:absolute; right:8px; transform:translateY(-50%); font-size:.79rem; color:var(--text-muted); font-family:'DM Mono',monospace; white-space:nowrap; }
.cal-week-days { flex:1; display:flex; position:relative; }
.cal-week-daycol { flex:1; border-left:1px solid var(--gb); position:relative; background-repeat:repeat-y; }
.cal-week-daycol:first-child { border-left:none; }

.cal-week-event {
  position:absolute; border-radius:8px; padding:3px 6px; cursor:pointer; overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.25); color:#fff; line-height:1.25; z-index:2;
}
.cal-week-event:hover { z-index:3; filter:brightness(1.08); }
.cal-week-event-time  { font-size:.79rem; opacity:.85; font-family:'DM Mono',monospace; }
.cal-week-event-title { font-size:.79rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.cal-now-line { position:absolute; left:0; right:0; height:2px; background:var(--red); z-index:4; pointer-events:none; }
.cal-now-line::before { content:''; position:absolute; left:-4px; top:-3px; width:8px; height:8px; border-radius:50%; background:var(--red); }

/* Mini calendrier mois (sidebar gauche) */
.cal-mini-card { padding:12px; }
.cal-mini-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.cal-mini-title { font-size:.79rem; font-weight:700; color:var(--text); text-transform:capitalize; }
.cal-mini-nav { width:22px; height:22px; border-radius:8px; border:none; background:var(--glass); color:var(--text-muted); cursor:pointer; font-size:.85rem; display:flex; align-items:center; justify-content:center; }
.cal-mini-nav:hover { background:var(--glass-h); color:var(--text); }
.cal-mini-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.cal-mini-dow { text-align:center; font-size:.79rem; color:var(--text-muted); font-weight:600; padding-bottom:3px; }
.cal-mini-day { position:relative; text-align:center; font-size:.79rem; color:var(--text); padding:4px 0 7px; border-radius:50%; cursor:pointer; }
.cal-mini-day:hover { background:var(--glass-h); }
.cal-mini-day.today { background:var(--accentbg); color:var(--accent); font-weight:700; }
.cal-mini-dot { position:absolute; bottom:2px; left:50%; transform:translateX(-50%); width:4px; height:4px; border-radius:50%; }
.cal-mini-day.sel { background:var(--accent); color:var(--on-accent); font-weight:700; }

/* Récap missions de la semaine (sidebar gauche) */
.cal-missions-list { display:flex; flex-direction:column; gap:2px; max-height:220px; overflow-y:auto; }
.cal-mission-item { display:flex; align-items:center; gap:8px; padding:6px 4px; border-radius:8px; cursor:pointer; }
.cal-mission-item:hover { background:var(--glass-h); }
.cal-mission-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.cal-mission-body { flex:1; min-width:0; }
.cal-mission-title { font-size:.79rem; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-mission-meta { font-size:.79rem; color:var(--text-muted); margin-top:1px; }

/* ══════════════════════════════
   NDF
══════════════════════════════ */
.ndf-total-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.ndf-stat {
  flex: 1;
  min-width: 110px;
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--hi);
}

.ndf-stat-label { font-size: .79rem; color: var(--text-muted); margin-bottom: 3px; font-weight: 600; }
.ndf-stat-value { font-variant-numeric: tabular-nums; font-size: var(--fs-lg); font-weight: 700; color: var(--text); }

.postit {
  position: relative;
  border-radius: 3px 14px 14px 3px;
  padding: 14px 14px 12px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 3px 14px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.12);
  transition: transform .18s, box-shadow .18s;
  cursor: default;
  overflow: hidden;
}

.postit::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; border-radius: 3px 0 0 3px; }
@media (hover: hover) and (pointer: fine) {
  .postit:hover   { transform: translateY(-3px) rotate(.4deg); box-shadow: 0 8px 24px rgba(0,0,0,.22); }
}
.postit.done    { opacity: .55; filter: grayscale(.4); }
.text-line-through    { text-decoration: line-through; }

/* Post-its en card-grid (vue dark) */
.card-grid .postit              { border-radius: 12px; border: 1px solid var(--gb); background: var(--glass); box-shadow: var(--sh-sm); color: var(--text); min-height: 110px; }
.card-grid .postit::before      { background: var(--accent); }

/* Post-its en list-view */
.list-view { display: flex; flex-direction: column; gap: 6px; }
.list-view .postit              { min-height: unset; border-radius: 8px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); padding: 10px 14px; flex-direction: row; align-items: center; gap: 10px; }
.list-view .postit::before      { width: 3px; border-radius: 3px; }
@media (hover: hover) and (pointer: fine) {
  .list-view .postit:hover        { transform: translateX(2px); box-shadow: var(--sh-sm); }
}


/* ══════════════════════════════
   INTERVENANTS
══════════════════════════════ */
.interv-item  { display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: var(--glass); border: 1px solid var(--gb); border-radius: 8px; margin-bottom: 5px; }
.interv-color { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.toggle-switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  border: 1px solid var(--gb);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  bottom: 2px;
  background: rgba(255,255,255,.75);
  border-radius: 50%;
  transition: transform .2s, background-color .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.toggle-switch input:checked + .toggle-slider               { background: rgba(255,255,255,.28); border-color: var(--gb-hi); }
.toggle-switch input:checked + .toggle-slider:before        { transform: translateX(16px); background: #fff; }

/* ══════════════════════════════
   PARAMÈTRES
══════════════════════════════ */
.param-row             { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--gb); }
.param-row:last-child  { border-bottom: none; }
.param-label           { font-size: .85rem; font-weight: 500; }
.param-desc            { font-size: .79rem; color: var(--text-muted); margin-top: 2px; }

/* ══════════════════════════════
   TOGGLE THÈME SOLEIL / LUNE
══════════════════════════════ */
.st-sunMoonThemeToggleBtn { position: relative; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.st-sunMoonThemeToggleBtn svg { transition: transform .4s ease; transform: rotate(40deg); display: block; }
.st-sunMoonThemeToggleBtn svg mask circle { transition: transform .64s cubic-bezier(.41,.64,.32,1.575); transform: translate(0px,0px); }

@keyframes showRay1832 {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ══════════════════════════════
   CURSEURS
══════════════════════════════ */
button,
[onclick],
.btn,
.dock-item,
.chantier-card,
a,
select,
.modal-close,
.ch-tab { cursor: pointer; }
input, textarea { cursor: text; }

/* ══════════════════════════════
   RECHERCHE GLOBALE OVERLAY
══════════════════════════════ */
#recherche-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 72px;
}

#recherche-overlay.open {
  display: flex;
}

.recherche-box {
  width: 100%;
  max-width: 560px;
  background: var(--glass-a);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--gb-hi);
  border-radius: 12px;
  box-shadow: var(--sh-lg);
  overflow: hidden;
  margin: 0 16px;
}

.recherche-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gb);
}

.recherche-icon { font-size: 1rem; flex-shrink: 0; }

.recherche-header input {
  flex: 1;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text);
  padding: 0;
  outline: none;
  box-shadow: none;
  width: auto;
}

.recherche-header input::placeholder { color: var(--text-muted); }

.recherche-close {
  background: var(--glass);
  border: 1px solid var(--gb);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: .79rem;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
}

.recherche-resultats {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px 0;
}

.recherche-group-label {
  font-size: .79rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 8px 16px 4px;
}

.recherche-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .12s;
  border-radius: 0;
}

.recherche-item:hover,
.recherche-item:focus {
  background: var(--glass);
  outline: none;
}

.recherche-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.recherche-item-titre {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}

.recherche-item-sous {
  font-size: .79rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.recherche-empty {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ══════════════════════════════════════════
   PLANNING SEMAINE DES TÂCHES
══════════════════════════════════════════ */

.pt-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pt-week-label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  flex: 1;
  text-align: center;
  min-width: 140px;
}

.pt-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (max-width: 860px) {
  .pt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pt-grid { grid-template-columns: 1fr; }
}

.pt-day {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 620px;
  animation: cardIn .3s ease both;
}

.pt-day-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(146,191,59,.18);
}

.pt-day-past {
  opacity: .72;
}

.pt-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.pt-day-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
}

.pt-day-count {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  padding: 1px 7px;
  font-size: .79rem;
  font-weight: 700;
}

.pt-slot {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 6px 8px;
}

.pt-slot-done {
  border-color: rgba(72,187,120,.2);
  background: rgba(72,187,120,.05);
}

.pt-slot-progress {
  border-color: rgba(230,126,34,.25);
  background: rgba(230,126,34,.05);
  margin-top: 6px;
}

.pt-task-progress {
  border-left: 3px solid #ed8936;
}

.pt-slot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .79rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pt-slot-empty {
  font-size: .79rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 2px 0;
}

.pt-task {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: .85rem;
  border-left: 3px solid var(--accent);
  cursor: default;
}

.pt-task-done {
  opacity: .6;
  border-left-color: #48bb78 !important;
  text-decoration: line-through;
}

.pt-task-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pt-task-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: .85rem;
}

.pt-task-ch {
  font-size: .79rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-task-dur {
  font-size: .79rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  padding: 1px 5px;
}

.pt-task-unplan {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .79rem;
  padding: 0 2px;
  line-height: 1;
  opacity: .5;
  transition: opacity .15s;
}
.pt-task-unplan:hover { opacity: 1; color: var(--red); }

.pt-remarque {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(246,201,14,.08);
  border-left: 2px solid #f6c90e;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: .79rem;
}

.pt-rem-author {
  font-weight: 700;
  color: var(--text);
  font-size: .79rem;
}

.pt-rem-msg {
  color: var(--text);
}

.pt-rem-date {
  font-size: .79rem;
  color: var(--text-muted);
}

.pt-rem-inline {
  width: 100%;
  margin-top: 4px;
}

.pt-unscheduled {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pt-unsched-task {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 7px 10px;
  border-left: 3px solid var(--gb);
}

.prio-border-urgente { border-left-color: var(--red) !important; }
.prio-border-haute   { border-left-color: var(--orange) !important; }
.prio-border-normale { border-left-color: rgba(146,191,59,.8) !important; }
.prio-border-basse   { border-left-color: rgba(100,150,255,.8) !important; }

.pt-uprio {
  font-size: .79rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.pt-uprio.urgente { background: rgba(229,62,62,.15); color: var(--red); }
.pt-uprio.haute   { background: rgba(237,137,54,.15); color: var(--orange); }
.pt-uprio.normale { background: rgba(146,191,59,.15); color: var(--accent); }
.pt-uprio.basse   { background: rgba(100,150,255,.15); color: #a3bffa; }

.pt-unsched-titre {
  flex: 1;
  font-size: .79rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-unsched-dur {
  font-size: .79rem;
  color: var(--text-muted);
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  padding: 1px 5px;
}

.pt-unsched-days {
  display: flex;
  gap: 3px;
}

.pt-day-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--gb);
  border-radius: 4px;
  background: var(--glass);
  color: var(--text-muted);
  font-size: .79rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pt-day-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ── Devis ─────────────────────────────────── */
.devis-card { cursor:pointer; padding:0; overflow:hidden; transition:.15s; }
@media (hover: hover) and (pointer: fine) {
  .devis-card:hover { border-color:var(--accent); }
}
.devis-card-head { display:flex; justify-content:space-between; align-items:flex-start; padding:14px 14px 8px; }
.devis-num  { font-size:.85rem; font-weight:700; color:var(--accent); letter-spacing:.03em; }
.devis-client { font-size:.9rem; font-weight:600; margin-top:2px; }
.devis-card-body { padding:0 14px 8px; display:flex; flex-direction:column; gap:3px; }
.devis-meta { font-size:.79rem; color:var(--text-muted); display:flex; align-items:center; gap:5px; }
.devis-meta span { font-size:.9em; }
.devis-card-foot { display:flex; justify-content:space-between; align-items:flex-end; padding:10px 14px; border-top:1px solid var(--gb); background:var(--glass-sb); }

.devis-editor-header { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding-bottom:14px; border-bottom:1px solid var(--gb); margin-bottom:12px; }
.devis-tabs { display:flex; gap:4px; margin-bottom:16px; }
.devis-tab { background:var(--glass); border:1px solid var(--gb); color:var(--text-muted); padding:6px 16px; border-radius:8px; cursor:pointer; font-size:.85rem; transition:.15s; }
.devis-tab.active { background:var(--accentbg); border-color:var(--accent); color:var(--accent); font-weight:600; }
.devis-form-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-bottom:16px; }
@media(max-width:860px){ .devis-form-grid { grid-template-columns:1fr 1fr; } }
@media(max-width:640px){ .devis-form-grid { grid-template-columns:1fr; } }
.dv-form-row { margin-bottom:6px; }

/* Table chiffrage */
.devis-table { border-collapse:collapse; font-size:.79rem; width:100%; min-width:1100px; }
.devis-table th { padding:5px 6px; background:var(--glass); border:1px solid var(--gb); color:var(--text-muted); font-weight:600; white-space:nowrap; text-align:left; }
.devis-table td { padding:3px 4px; border:1px solid var(--gb); vertical-align:middle; }
.devis-table tr:hover td { background:var(--glass-sb); }
.dv-cell-input { width:100%; background:transparent; border:none; outline:none; color:var(--text); font-size:.79rem; padding:2px 4px; min-width:60px; }
.dv-cell-input:focus { background:var(--glass); border-radius:4px; }
.dv-cell-input:not(.dv-num):not(.dv-cell-select):not(.dv-cell-designation) { min-height:36px; height:36px; }
.dv-cell-designation { min-width:180px; height:auto; min-height:52px; resize:vertical; line-height:1.4; font-family:inherit; }
.dv-cell-select { background:var(--glass-sb); border:1px solid var(--gb); border-radius:4px; outline:none; color:var(--text); font-size:.79rem; width:100%; padding:3px 4px; }
.dv-cell-select:focus { border-color:var(--accent); }
.dv-cell-select option { color:#1a1a1a; background:#fff; }
.dv-num { text-align:right; }
.dv-ro { text-align:right; color:var(--text-muted); font-size:.79rem; white-space:nowrap; }

/* Photo par ligne de devis */
.dv-photo-add { display:inline-flex; align-items:center; gap:4px; margin-top:4px; padding:3px 8px; font-size:.79rem; color:var(--text-muted); background:var(--glass-sb); border:1px dashed var(--gb); border-radius:8px; cursor:pointer; }
.dv-photo-add:hover { color:var(--accent); border-color:var(--accent); }
.dv-photo-wrap { position:relative; display:inline-block; margin-top:4px; }
.dv-photo-thumb { display:block; max-height:52px; max-width:90px; object-fit:cover; border-radius:8px; border:1px solid var(--gb); }
.dv-photo-del { position:absolute; top:-6px; right:-6px; width:18px; height:18px; border-radius:50%; background:var(--red); color:#fff; border:none; font-size:.79rem; line-height:1; cursor:pointer; }

/* Vue simple (compacte) : Désignation large + prix final mis en avant */
.devis-table.dv-compact { min-width:0; width:100%; font-size:.85rem; }
.devis-table.dv-compact th { padding:8px 10px; font-size:.79rem; letter-spacing:.3px; text-transform:uppercase; }
.devis-table.dv-compact td { padding:6px 10px; }
.devis-table.dv-compact .dv-cell-designation { min-height:44px; font-size:.85rem; }
.dv-price-final { font-size:1rem; font-weight:700; color:var(--text); }
.btn-icon-del { background:none; border:none; color:var(--red); cursor:pointer; font-size:1.1rem; padding:2px 6px; border-radius:4px; }
.btn-icon-del:hover { background:var(--red-bg); }
.btn-icon-edit { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:1rem; padding:2px 6px; border-radius:4px; }
.btn-icon-edit:hover { background:var(--glass); color:var(--accent); }

/* Totaux */
.devis-totaux-wrap { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; padding:14px; background:var(--glass); border-radius:12px; border:1px solid var(--gb); }
@media(max-width:640px){ .devis-totaux-wrap { grid-template-columns:1fr; } }
.devis-totaux-grid { display:flex; flex-direction:column; gap:6px; }
.devis-tot-row { display:flex; justify-content:space-between; align-items:center; font-size:.85rem; padding:3px 0; border-bottom:1px solid var(--gb); }
.devis-tot-label { color:var(--text-muted); }
.devis-tot-val { font-weight:600; }

/* Print */
@media print {
  @page { size: A4; margin: 10mm; }
  @page { @top-left { content:""; } @top-center { content:""; } @top-right { content:""; } @bottom-left { content:""; } @bottom-center { content:""; } @bottom-right { content:""; } }
  html, body { margin:0 !important; padding:0 !important; background:#fff !important; }
  #user-topbar, #dock, #save-flash, #global-loader { display:none !important; }
  .main { margin-left:0 !important; padding:0 !important; }
  .content { padding:0 !important; min-height:0 !important; }
  .content > .section:not(#section-devis) { display:none !important; }
  #section-devis { display:block !important; overflow:visible !important; }
  #devis-list-zone { display:none !important; }
  .devis-editor-header, .devis-tabs, #devis-tab-chiffrage,
  .btn, button, .devis-totaux-wrap { display:none !important; }
  #devis-tab-client { display:block !important; padding:0 !important; }
  #devis-print-zone {
    max-width:none !important; width:100% !important; margin:0 !important;
    padding:0 !important; box-shadow:none !important; border-radius:0 !important;
    font-size:10pt !important;
  }
}

/* ═══ STOCK DÉPÔT — plan entrepôt + panneau latéral ═══ */
.stock-topbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--gb); background: var(--bg); flex-shrink: 0;
}
.stock-site-tabs { display: flex; gap: 2px; background: var(--glass); border: 1px solid var(--gb); border-radius: 8px; padding: 3px; }
.stock-site-tab {
  padding: 5px 12px; border: none; border-radius: 8px; cursor: pointer;
  font-size: .79rem; font-weight: 600; background: transparent; color: var(--text-muted);
  transition: background-color .15s, color .15s; white-space: nowrap;
}
.stock-site-tab.active { background: var(--accent); color: var(--on-accent); }
.stock-body { display: flex; height: calc(100vh - 110px); overflow: hidden; }
.stock-map-pane {
  flex: 2; min-width: 0; overflow: auto; padding: 20px;
  display: flex; align-items: center; justify-content: center;
}
.stock-map-pane svg { width: 100%; height: auto; max-height: 100%; color: var(--text-dim); }
.stock-right-pane {
  flex: 1; min-width: 300px; max-width: 420px; border-right: 1px solid var(--gb);
  display: flex; flex-direction: column; overflow: hidden; background: var(--bg2);
}
.stock-search-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--gb); flex-shrink: 0; color: var(--text-muted);
}
.stock-search-bar input {
  flex: 1; border: 1px solid var(--gb); background: var(--glass); border-radius: 8px;
  padding: 8px 12px; color: var(--text); font-size: .85rem;
}
.stock-panel-header { padding: 12px 14px 8px; flex-shrink: 0; border-bottom: 1px solid var(--gb); }
.stock-panel-list { flex: 1; overflow-y: auto; padding: 10px 14px; }
.stock-panel-history { border-top: 1px solid var(--gb); flex-shrink: 0; max-height: 34%; display: flex; flex-direction: column; }
.stock-history-toggle {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 14px;
  cursor: pointer; font-size: .79rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
}
.stock-panel-history-list { overflow-y: auto; padding: 0 14px 10px; }

/* zones SVG */
.stock-zone { cursor: pointer; }
.stock-zone-rect { transition: filter .15s, stroke .15s, stroke-width .15s; }
.stock-zone:hover .stock-zone-rect { filter: brightness(1.18); }
.stock-zone.selected .stock-zone-rect { stroke: var(--accent) !important; stroke-width: 3.5; }
.stock-zone-icon { transition: transform .2s; }
.stock-zone.bump .stock-zone-icon { animation: stockZoneBump .45s ease; }
@keyframes stockZoneBump {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-7px) scale(1.2); }
  55%  { transform: translateY(2px) scale(.92); }
  100% { transform: translateY(0) scale(1); }
}

/* cartes article (panneau droit) */
.stock-article { border: 1px solid var(--gb); border-radius: 12px; margin-bottom: 8px; background: var(--glass); overflow: hidden; }
.stock-article-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.stock-article-qty { font-weight: 700; font-size: .85rem; white-space: nowrap; flex-shrink: 0; }
.stock-article-qty.rupture { color: var(--red); }
.stock-article-qty.alerte { color: var(--orange); }
.stock-badge {
  font-size: .79rem; font-weight: 700; padding: 2px 7px; border-radius: 8px;
  background: var(--glass-a); color: var(--text-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px;
}
.stock-badge-chantier { background: var(--accentbg); color: var(--accent); }
.stock-article-detail {
  border-top: 1px solid var(--gb); padding: 10px 12px; font-size: .79rem;
  color: var(--text-muted); display: flex; flex-direction: column; gap: 6px;
}
.stock-article-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 860px) {
  .stock-body { flex-direction: column; height: auto; overflow: visible; }
  .stock-map-pane { flex: none; min-height: 300px; order: -1; }
  .stock-right-pane { max-width: none; border-right: none; border-top: 1px solid var(--gb); }
}

/* Mobile (≤640px, seuil _isMobile) : le plan reste affiché en haut, en grand format défilable
   plutôt que réduit illisible à la largeur d'écran. */
@media (max-width: 640px) {
  .stock-map-pane--pannable { overflow: auto; justify-content: flex-start; align-items: flex-start; padding: 14px; max-height: 46vh; }
  .stock-map-pane--pannable svg { width: 900px; max-width: none; flex-shrink: 0; }
}

/* ═══ Formulaire de livraison : lecture automatique du BL ═══ */
.lv-lecture { margin-top: 8px; padding: 9px 12px; border-radius: 8px; font-size: .85rem; background: var(--glass); border: 1px solid var(--gb); color: var(--text); }
.lv-lecture ul { margin: 6px 0 0 16px; padding: 0; color: var(--text-muted); font-size: .79rem; }
.lv-lecture-ok { border-color: var(--green); background: var(--green-bg); }
.lv-lecture-warn { border-color: var(--orange); background: var(--orange-bg); }
.lv-lecture-info { border-color: var(--accent); background: var(--accentbg); }
.lv-spinner { display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -2px; border: 2px solid var(--gb-hi); border-top-color: var(--accent); border-radius: 50%; animation: lvSpin .7s linear infinite; }
@keyframes lvSpin { to { transform: rotate(360deg); } }
.lv-ligne-verif { border-left: 3px solid var(--orange); padding-left: 6px; border-radius: 4px; }
.lv-ligne-verif .lv-ligne-qte:placeholder-shown, .lv-ligne-verif .lv-ligne-qte[value=""] { border-color: var(--orange); }

/* ═══ ÉCRAN STOCK : volet de gauche (BL reçus / Articles), plan toujours visible à droite (stock_bl.js) ═══ */
.stock-pane-tabs { display: flex; gap: 2px; margin: 10px 14px 0; padding: 3px; background: var(--glass); border: 1px solid var(--gb); border-radius: 8px; flex-shrink: 0; }
.stock-pane-tabs .stock-site-tab { flex: 1; }
.stock-pane-bl { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; animation: sbEntree .28s ease both; }
.stock-pane-articles { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.stock-pane-bl[hidden], .stock-pane-articles[hidden] { display: none; }
@keyframes sbEntree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sb-search {
  width: 100%; border: 1px solid var(--gb); background: var(--glass-sb); border-radius: 8px;
  padding: 8px 12px; color: var(--text); font-size: .85rem;
}
.sb-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
.sb-bl { border: 1px solid var(--gb); border-radius: 8px; background: var(--glass-sb); }
.sb-bl.ouvert { border-color: var(--gb-hi); }
.sb-bl-h {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left;
  padding: 9px 11px; background: transparent; border: none; color: var(--text); cursor: pointer; border-radius: 8px;
}
.sb-bl-h:hover { background: var(--glass-h); }
.sb-bl-t { font-weight: 700; font-size: .85rem; grid-column: 1 / -1; }
.sb-bl-f { font-size: .85rem; color: var(--accent); }
.sb-bl-m { font-size: .79rem; color: var(--text-muted); }
.sb-arts { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 8px; }
.sb-art {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; text-align: left; width: 100%;
  padding: 7px 10px; border: 1px solid var(--gb); border-radius: 8px; background: var(--glass);
  color: var(--text); cursor: pointer; font-size: .85rem; transition: border-color .15s, background .15s;
}
.sb-art:hover { background: var(--glass-h); }
.sb-art.active { border-color: var(--accent); background: var(--accentbg); }
.sb-art-q { color: var(--text-muted); font-size: .79rem; white-space: nowrap; }
.sb-art-z, .sb-art-s { grid-column: 1 / -1; color: var(--text-muted); font-size: .79rem; }
.sb-art.active .sb-art-z { color: var(--accent); font-weight: 700; }
.sb-art-z .ic { width: .9em; height: .9em; vertical-align: -1px; }
.sb-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sb-bl-h:focus-visible, .sb-art:focus-visible, .sb-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sb-vide { padding: 28px 10px; text-align: center; color: var(--text-muted); font-size: .85rem; }
.stock-zone.selected .stock-zone-rect { animation: sbZone 1.4s ease-in-out infinite; }
@keyframes sbZone { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 10px var(--accent)); } }
@media (prefers-reduced-motion: reduce) { .stock-pane-bl, .stock-zone.selected .stock-zone-rect { animation: none; } }

/* ══════════════════════════════
   REPÉRAGE — onglet chantier, catalogue, assemblage, éditeur (reperage*.js)
══════════════════════════════ */
.dpgf-rep-tag { display: flex; align-items: center; gap: 5px; font-size: .79rem; color: var(--accent); margin-top: 2px; padding-left: 4px; line-height: 1.35; }
@keyframes repIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rep-loading-line { padding: 12px; color: var(--text-muted); font-size: .79rem; }
.rep-help { font-size: .79rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.rep-help kbd, .rep-ed-panel kbd { font-family: inherit; font-size: .79rem; padding: 1px 5px; border-radius: 4px; background: var(--glass); border: 1px solid var(--gb); }
.rep-warn { display: flex; gap: 8px; align-items: flex-start; font-size: .79rem; line-height: 1.45; padding: 10px 12px; border-radius: 12px; background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(255,159,10,.3); margin-bottom: 12px; }
.rep-empty-inline { font-size: .79rem; color: var(--text-muted); padding: 8px 0; }
.rep-modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.rep-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.rep-check { display: flex; align-items: center; gap: 8px; font-size: .79rem; margin: 6px 0; cursor: pointer; min-height: 32px; }
.rep-check input { width: auto; }
.rep-w100 { width: 100%; justify-content: center; margin-top: 8px; }
.rep-btn-danger:hover { color: var(--red); border-color: rgba(255,69,58,.35); }
.rep-swatch { flex-shrink: 0; display: block; }
.rep-sub.modal-overlay { z-index: 640; }
.rep-sub-top.modal-overlay { z-index: 650; }

/* Onglet */
.rep-tab-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rep-tab-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.rep-tab-sub { font-size: .79rem; color: var(--text-muted); margin-top: 3px; }
.rep-tab-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rep-empty { text-align: center; padding: 34px 18px; border: 1px dashed var(--gb-hi); border-radius: 12px; animation: repIn .3s ease both; }
.rep-empty-icon { color: var(--accent); margin-bottom: 8px; }
.rep-empty-title { font-weight: 700; margin-bottom: 6px; }
.rep-empty-text { font-size: .79rem; color: var(--text-muted); max-width: 520px; margin: 0 auto 16px; line-height: 1.55; }
.rep-empty-warn { margin-top: 14px; font-size: .79rem; color: var(--orange); }
.rep-empty-warn a { color: var(--accent); }
.rep-doc-list { display: flex; flex-direction: column; gap: 10px; }
.rep-doc-card { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); animation: repIn .3s ease both; }
.rep-doc-main { min-width: 0; flex: 1; }
.rep-doc-name { font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.rep-doc-meta { font-size: .79rem; color: var(--text-muted); margin-top: 3px; }
.rep-doc-exp { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.rep-doc-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.rep-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rep-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .79rem; padding: 4px 9px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--gb); }
.rep-chip-warn { color: var(--orange); font-weight: 600; }

/* Catalogue */
.rep-type-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.rep-type-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--gb); }
.rep-type-row.inactive { opacity: .6; }
.rep-type-info { flex: 1; min-width: 0; }
.rep-type-name { font-weight: 600; font-size: .85rem; }
.rep-type-meta { font-size: .79rem; color: var(--text-muted); margin-top: 2px; }
.rep-type-btns { display: flex; gap: 4px; }
.rep-type-btns .btn-icon:disabled, .rep-niv-row .btn-icon:disabled, .rep-asm-page-btns .btn-icon:disabled, .rep-ed-pages-row .btn-icon:disabled { opacity: .35; cursor: default; }
.rep-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rep-color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; }
.rep-color.active { outline: 3px solid var(--accent); outline-offset: 2px; }
.rep-colors input[type=color] { width: 40px; height: 32px; padding: 2px; }
.rep-te-preview { display: flex; align-items: center; gap: 12px; font-size: .79rem; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: #fff; }
.rep-te-preview span { color: #555; }
.rep-te-docs { max-height: 170px; overflow-y: auto; margin-top: 6px; border: 1px solid var(--gb); border-radius: 12px; padding: 6px; }
.rep-te-doc { display: flex; align-items: center; gap: 8px; font-size: .79rem; padding: 6px; border-radius: 8px; cursor: pointer; }
.rep-te-doc:hover { background: var(--glass-sb); }
.rep-te-doc input { width: auto; }
.rep-te-doc small { color: var(--text-muted); margin-left: auto; }

/* Niveaux */
.rep-niv-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rep-niv-row, .rep-niv-add { display: grid; grid-template-columns: 1fr 1fr auto auto auto; gap: 6px; align-items: center; }
.rep-niv-add { grid-template-columns: 1fr 1fr auto; padding-top: 12px; border-top: 1px solid var(--border); }

/* Assemblage */
.rep-asm-modal { width: 980px; }
.rep-asm-step { margin-bottom: 18px; }
.rep-asm-step-title { font-weight: 700; font-size: .85rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.rep-asm-step-title small { font-weight: 400; color: var(--text-muted); }
.rep-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--accentbg); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: .79rem; font-weight: 700; }
.rep-asm-drop { padding: 18px; }
.rep-asm-plans { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: .79rem; color: var(--text-muted); }
.rep-asm-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rep-asm-page { display: flex; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--gb); animation: repIn .25s ease both; cursor: grab; }
.rep-asm-page.excluded { opacity: .45; }
.rep-asm-thumb { width: 96px; height: 96px; flex-shrink: 0; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rep-asm-thumb img { max-width: 100%; max-height: 100%; display: block; }
.rep-asm-thumb .plans-spinner { width: 22px; height: 22px; border-color: rgba(0,0,0,.15); border-top-color: #888; }
.rep-asm-page-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rep-asm-include { display: flex; align-items: center; gap: 6px; font-size: .79rem; cursor: pointer; overflow-wrap: anywhere; }
.rep-asm-include input { width: auto; }
.rep-asm-niv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rep-asm-niv input { padding: 6px 9px; font-size: .79rem; }
.rep-asm-page-btns { display: flex; align-items: center; gap: 4px; }
.rep-asm-page-btns .btn-icon { width: 30px; height: 30px; }
.rep-asm-fmt { font-size: .79rem; color: var(--text-muted); margin-left: auto; }
.rep-fond-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 13px; }
.rep-fond { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--gb); background: var(--surface2); cursor: pointer; font-size: .79rem; transition: border-color .18s, background .18s; }
.rep-fond input { position: absolute; opacity: 0; pointer-events: none; }
.rep-fond small { color: var(--text-muted); font-size: .79rem; line-height: 1.4; }
.rep-fond.active { border-color: rgba(146,191,59,.6); background: var(--accentbg); }
.rep-fond:focus-within { box-shadow: 0 0 0 3px rgba(146,191,59,.25); }
.rep-asm-progress { margin-top: 10px; }
.rep-progress-bar { height: 8px; border-radius: 999px; background: var(--glass); overflow: hidden; border: 1px solid var(--gb); }
.rep-progress-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
#rep-asm-progress-text, #rep-exp-progress-text { font-size: .79rem; color: var(--text-muted); margin-top: 6px; }

/* Envoi vers Suivi */
.rep-sync-table { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.rep-sync-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--gb); font-size: .79rem; }
.rep-sync-name { display: flex; gap: 8px; align-items: center; min-width: 0; }
.rep-sync-name small { display: block; color: var(--text-muted); font-size: .79rem; margin-top: 2px; }
.rep-sync-qte { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-sync-qte s { color: var(--text-muted); }

/* Éditeur plein écran */
#modal-rep-editor.modal-overlay { z-index: 612; padding: 0; }
.modal.rep-editor { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; contain: layout paint; }
.rep-ed-header { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap; }
.rep-ed-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.rep-ed-title b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-ed-title small { font-size: .79rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-ed-pagenav { display: flex; align-items: center; gap: 6px; }
.rep-ed-pagenav select { width: 260px; max-width: 42vw; padding: 6px 30px 6px 10px; font-size: .79rem; }
.rep-ed-status { font-size: .79rem; display: flex; align-items: center; gap: 6px; color: var(--text-muted); min-height: 28px; }
.rep-ed-status.ok { color: var(--green); }
.rep-ed-status.error { color: var(--orange); }
.rep-ed-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.rep-ed-actions .btn-icon:disabled { opacity: .35; cursor: default; }
.rep-ed-panel-btn, .rep-ed-panel-only { display: none; }
.rep-mini-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gb-hi); border-top-color: var(--accent); animation: plansSpin .7s linear infinite; display: inline-block; }
.rep-ed-body { flex: 1; min-height: 0; display: flex; position: relative; }
.rep-ed-tools { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-right: 1px solid var(--border); flex-shrink: 0; overflow-y: auto; }
.rep-ed-tool { width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.rep-ed-tool:hover { background: var(--glass-h); color: var(--text); }
.rep-ed-tool.active { background: var(--accentbg); color: var(--accent); border-color: rgba(146,191,59,.5); }
.rep-ed-tool:focus-visible, .rep-ed-type:focus-visible, .rep-ed-zoomlabel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rep-ed-viewport { flex: 1; min-width: 0; position: relative; overflow: hidden; background: #3a3a3e; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; outline: none; }
.rep-ed-viewport.panning, .rep-ed-viewport.space-pan { cursor: grabbing !important; }
.rep-ed-content { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; box-shadow: 0 4px 30px rgba(0,0,0,.45); }
.rep-ed-content canvas { display: block; }
.rep-ed-hires { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .12s ease; }
.rep-ed-hires.visible { opacity: 1; }
.rep-ed-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rep-ed-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); max-width: min(680px, 90%); padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.62); color: #fff; font-size: .79rem; line-height: 1.4; text-align: center; pointer-events: none; }
.rep-ed-hint:empty { display: none; }
.rep-ed-drawbar { position: absolute; bottom: 16px; left: 50%; transform: translate(-50%, 20px); display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--modal-bg); border: 1px solid var(--gb-hi); box-shadow: var(--sh); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 4; }
.rep-ed-drawbar.open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.rep-ed-drawbar-info { font-size: .79rem; color: var(--text-muted); padding: 0 4px; white-space: nowrap; }
.rep-ed-zoom { position: absolute; right: 12px; top: 10px; display: flex; gap: 4px; align-items: center; padding: 4px; border-radius: 12px; background: var(--modal-bg); border: 1px solid var(--gb); box-shadow: var(--sh-sm); z-index: 3; }
.rep-ed-zoom .btn-icon { width: 36px; height: 36px; }
.rep-ed-zoomlabel { min-width: 60px; height: 36px; border: none; background: transparent; color: var(--text); font-size: .79rem; font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 8px; }
.rep-ed-zoomlabel:hover { background: var(--glass-h); }
.rep-ed-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.3); z-index: 5; pointer-events: none; }
.rep-ed-loupe { position: absolute; display: none; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: none; z-index: 6; background: #fff; }
.rep-ed-loupe.open { display: block; }
.rep-ed-drawbar .btn.active { background: var(--accentbg); color: var(--accent); border-color: rgba(146,191,59,.5); }
.rep-ed-textinput { position: absolute; display: none; width: 240px; z-index: 6; font-size: 16px; font-family: Helvetica, Arial, sans-serif; color: #000; }
.rep-ed-textinput.open { display: block; }
.rep-ed-dialog-wrap { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.35); z-index: 8; padding: 16px; }
.rep-ed-dialog-wrap.open { display: flex; }
.rep-ed-dialog { width: 420px; max-width: 100%; max-height: 100%; overflow-y: auto; padding: 20px; border-radius: 12px; background: var(--modal-bg); border: 1px solid var(--gb-hi); box-shadow: var(--sh-lg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); animation: repIn .2s ease both; }
.rep-ed-dialog-title { font-weight: 700; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.rep-ed-pages { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin-bottom: 10px; }
.rep-ed-pages-row { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--gb); }
.rep-ed-pages-row.removed { opacity: .45; text-decoration: line-through; }
.rep-ed-pages-lbl { flex: 1; min-width: 0; font-size: .79rem; overflow-wrap: anywhere; }
.rep-ed-pages-lbl small { color: var(--text-muted); }

/* Panneau de l'éditeur */
.rep-ed-panel { width: 300px; flex-shrink: 0; overflow-y: auto; border-left: 1px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 16px; }
.rep-ed-panel h3 { font-size: .79rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.rep-ed-panel section + section { padding-top: 14px; border-top: 1px solid var(--border); }
.rep-ed-panel .form-group label { font-size: .79rem; }
.rep-ed-types { display: flex; flex-direction: column; gap: 4px; }
.rep-ed-type { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; text-align: left; font-size: .79rem; transition: background .15s, border-color .15s; }
.rep-ed-type:hover { background: var(--glass-h); }
.rep-ed-type.active { background: var(--accentbg); border-color: rgba(146,191,59,.5); }
.rep-ed-type-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rep-ed-type-name small { color: var(--text-muted); }
.rep-ed-type-q { font-size: .79rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-ed-qline { display: flex; justify-content: space-between; gap: 8px; font-size: .79rem; padding: 8px 10px; border-radius: 8px; background: var(--surface2); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.rep-ed-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rep-ed-inline input, .rep-ed-inline select { flex: 1; min-width: 110px; width: auto; }
.rep-ed-ech { font-size: .79rem; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.rep-ed-ech.ok { color: var(--green); }
.rep-ed-ech.warn { color: var(--orange); }
.rep-ed-qrow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: .79rem; padding: 6px 0; }
.rep-ed-qrow b { font-variant-numeric: tabular-nums; }
.rep-ed-qrow small { grid-column: 2 / 4; font-size: .79rem; }
.rep-ed-fold { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 4px 6px; margin: -4px -6px 4px; box-sizing: content-box; border: none; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .79rem; font-weight: 700; text-align: left; cursor: pointer; transition: background .15s; }
.rep-ed-fold:hover { background: var(--glass-h); }
.rep-ed-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rep-ed-fold.small { font-size: .79rem; font-weight: 600; color: var(--text-muted); min-height: 32px; margin-top: 4px; }
.rep-ed-fold[aria-expanded="false"] { margin-bottom: -4px; }
.rep-ed-fold-title { flex-shrink: 0; }
.rep-ed-fold-resume { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: .79rem; font-weight: 500; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-ed-fold-chev { margin-left: auto; display: flex; flex-shrink: 0; color: var(--text-muted); transition: transform .2s ease; }
.rep-ed-fold-resume + .rep-ed-fold-chev { margin-left: 0; }
.rep-ed-fold[aria-expanded="true"] .rep-ed-fold-chev { transform: rotate(180deg); }
.rep-ed-fold-body.anim { animation: repIn .18s ease both; }
.rep-ed-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }

@media (max-width: 1024px) {
  .rep-ed-panel { width: 260px; }
  .rep-ed-pagenav select { width: 190px; }
}
@media (max-width: 860px) {
  .rep-ed-panel-btn { display: flex; }
  .rep-ed-panel-only { display: inline-flex; }
  .rep-ed-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 88vw); z-index: 7; background: var(--modal-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--sh-lg); transform: translateX(100%); transition: transform .22s ease; }
  .rep-ed-panel.open { transform: none; }
  .rep-ed-hide-sm { display: none !important; }
}
@media (max-width: 640px) {
  .rep-ed-body { flex-direction: column-reverse; }
  .rep-ed-tools { flex-direction: row; border-right: none; border-top: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .rep-ed-tool { flex-shrink: 0; }
  .rep-ed-tool[data-tool=pan] { display: none; }
  .rep-ed-panel { width: 100%; }
  .rep-ed-header { gap: 6px; padding: 6px 8px; }
  .rep-ed-header .btn-icon { width: 36px; height: 36px; }
  .rep-ed-title { flex: 1 1 0; }
  .rep-ed-pagenav { order: 5; }
  .rep-ed-pagenav select { width: 106px; }
  .rep-ed-actions { order: 6; gap: 4px; }
  .rep-ed-actions .btn-sm { padding: 4px 9px; min-height: 36px; }
  .rep-ed-hide-xs { display: none; }
  .rep-ed-hint { display: none; }
  .rep-ed-zoom { top: 8px; right: 8px; }
  .rep-ed-drawbar { bottom: 12px; max-width: calc(100% - 16px); }
  .rep-fond-choices, .rep-form-grid, .rep-asm-pages, .rep-sync-row, .rep-niv-add { grid-template-columns: 1fr; }
  .rep-doc-card { flex-direction: column; }
  .rep-doc-btns { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .rep-doc-card, .rep-empty, .rep-asm-page, .rep-ed-dialog, .rep-ed-fold-body { animation: none; }
  .rep-ed-drawbar, .rep-ed-panel, .rep-ed-hires, .rep-progress-bar > div, .rep-ed-fold-chev { transition: none; }
}

/* ── Admin > Stockage ── */
@keyframes stkIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stk-anim { animation: stkIn .35s cubic-bezier(.22,1,.36,1) both; margin-bottom: 14px; }
.stk-anim:nth-child(2) { animation-delay: .05s; } .stk-anim:nth-child(3) { animation-delay: .1s; } .stk-anim:nth-child(4) { animation-delay: .15s; }
.stk-loading, .stk-error { padding: 22px; text-align: center; color: var(--text-muted); font-size: .85rem; }
.stk-error { color: var(--red); }
.stk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.stk-kicker { font-size: .79rem; color: var(--text-muted); font-weight: 600; }
.stk-total { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stk-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--surface2); gap: 2px; }
.stk-bar span { display: block; height: 100%; }
.stk-c1 { background: var(--accent); } .stk-c2 { background: var(--blue); } .stk-c3 { background: var(--orange); } .stk-c4 { background: var(--text-dim); }
.stk-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 18px; margin-top: 12px; font-size: .79rem; }
.stk-legend > div { display: flex; align-items: center; gap: 8px; }
.stk-legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.stk-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.stk-legend span { color: var(--text-muted); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.stk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stk-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 56px; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: background .15s, border-color .15s; }
.stk-tile:hover, .stk-tile:focus-visible { background: var(--glass-h); border-color: var(--accent); }
.stk-tile > svg { font-size: 1.2rem; color: var(--accent); flex-shrink: 0; }
.stk-tile div { display: flex; flex-direction: column; min-width: 0; }
.stk-tile b { font-size: .85rem; } .stk-tile span { font-size: .79rem; color: var(--text-muted); }
.stk-tile em { margin-left: auto; font-style: normal; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-tile-warn > svg { color: var(--orange); }
.stk-mods { display: flex; flex-direction: column; gap: 4px; }
.stk-mod { display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr auto; align-items: center; gap: 12px; padding: 8px 10px; min-height: 40px; border: none; border-radius: 8px; background: none; color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: background .15s; }
.stk-mod:hover, .stk-mod:focus-visible { background: var(--glass-h); }
.stk-mod-name { font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.stk-mod-name small { color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.stk-mod-track { height: 8px; border-radius: 8px; background: var(--surface2); overflow: hidden; }
.stk-mod-track span { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.stk-mod-size { font-size: .79rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.stk-filters { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 10px; margin-bottom: 10px; }
.stk-filters .form-group { margin: 0; }
.stk-count { font-size: .79rem; color: var(--text-muted); margin-bottom: 8px; }
.stk-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--gb); }
.stk-thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; color: var(--text-muted); font-size: 1.2rem; }
.stk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stk-info { flex: 1; min-width: 0; }
.stk-where { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.stk-ref { overflow-wrap: anywhere; } .stk-ref b { font-weight: 700; }
.stk-ref-orph { color: var(--orange); font-weight: 600; }
.stk-meta { font-size: .79rem; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.stk-size { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-open { flex-shrink: 0; min-height: 36px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.stk-more { width: 100%; margin-top: 10px; }
@media (max-width: 640px) {
  .stk-filters { grid-template-columns: 1fr 1fr; }
  .stk-filters .form-group:first-child { grid-column: 1 / -1; }
  .stk-mod { grid-template-columns: 1fr auto; }
  .stk-mod-track { grid-column: 1 / -1; grid-row: 2; }
  .stk-row { flex-wrap: wrap; }
  .stk-info { flex-basis: calc(100% - 60px); }
  .stk-size { margin-left: 56px; }
  .stk-open { margin-left: auto; }
  .stk-total { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .stk-anim { animation: none; } }
.stk-actions { display: flex; gap: 6px; flex-shrink: 0; }
.stk-purge { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-left: 3px solid var(--orange); }
.stk-purge-txt { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stk-purge-txt > svg { color: var(--orange); font-size: 1.2rem; flex-shrink: 0; }
.stk-purge-txt div { display: flex; flex-direction: column; }
.stk-purge-txt b { font-size: .85rem; } .stk-purge-txt span { font-size: .79rem; color: var(--text-muted); }
@media (max-width: 640px) { .stk-actions { margin-left: auto; } .stk-actions .stk-open { margin-left: 0; } }

/* ══════════════════════════════
   DOCUMENTS TECHNIQUES (liste / grille / arbre)
══════════════════════════════ */
.dt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.dt-toolbar .btn { flex-shrink: 0; white-space: nowrap; }
.dt-search { flex: 1; min-width: 160px; font-size: .85rem; padding: 7px 12px; }
.dt-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.dt-filters select { width: auto; max-width: 200px; font-size: .79rem; padding: 6px 30px 6px 10px; }
.dt-view-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--gb); border-radius: 8px; overflow: hidden; }
.dt-view-toggle button { background: transparent; border: 0; color: var(--text-muted); padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; transition: background .15s, color .15s; }
.dt-view-toggle button:hover { background: var(--glass-h); color: var(--text); }
.dt-view-toggle button.active { background: var(--accentbg); color: var(--accent); }

.dt-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.dt-tree { position: sticky; top: 58px; max-height: calc(100vh - 150px); overflow-y: auto; padding: 8px 4px; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass-sb); }
.dt-tn { display: flex; align-items: center; border-radius: 8px; }
.dt-tn:hover { background: var(--glass-h); }
.dt-tn.active { background: var(--accentbg); }
.dt-tn.active .dt-tn-btn { color: var(--accent); font-weight: 600; }
.dt-tn-tog { width: 20px; height: 24px; flex-shrink: 0; background: transparent; border: 0; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dt-tn-tog svg { transition: transform .15s; transform: rotate(-90deg); }
.dt-tn-tog.open svg { transform: none; }
.dt-tn-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: transparent; border: 0; color: var(--text); font-size: .79rem; padding: 5px 6px 5px 0; cursor: pointer; text-align: left; }
.dt-tn-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-tn-cnt { font-size: .79rem; color: var(--text-muted); flex-shrink: 0; padding-right: 4px; }
.dt-tn-tog:focus-visible, .dt-tn-btn:focus-visible, .dt-crumb:focus-visible, .dt-row:focus-visible, .dt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.dt-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 10px; font-size: .85rem; }
.dt-crumb { background: transparent; border: 0; padding: 3px 6px; border-radius: 8px; color: var(--text-dim); cursor: pointer; font-size: inherit; display: inline-flex; align-items: center; gap: 5px; }
.dt-crumb:hover { background: var(--glass-h); color: var(--text); }
.dt-crumb.active { color: var(--text); font-weight: 700; cursor: default; }
.dt-crumb-sep { color: var(--text-dim); }

.dt-title { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dt-sub { font-size: .79rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dt-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.dt-row:hover .dt-actions, .dt-row:focus-within .dt-actions, .dt-card:hover .dt-actions, .dt-card:focus-within .dt-actions { opacity: 1; }
.dt-actions .btn { min-width: 30px; justify-content: center; }
@media (hover: none) { .dt-actions { opacity: 1; } }

.dt-ico-pdf { color: #ff6b5e; } .dt-ico-image { color: var(--blue); } .dt-ico-lien { color: #9b59b6; } .dt-ico-autre { color: var(--text-muted); } .dt-ico-folder { color: var(--accent); }

/* Liste */
.dt-list { border: 1px solid var(--gb); border-radius: 12px; background: var(--glass-sb); overflow: clip; }
.dt-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 170px 110px 84px 76px; align-items: center; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: .79rem; animation: dtIn .22s ease both; transition: background .12s; }
.dt-list.dt-noprix .dt-row { grid-template-columns: 38px minmax(0, 1fr) 170px 84px 76px; }
.dt-row:last-child { border-bottom: 0; }
.dt-row:hover { background: var(--glass-h); }
.dt-head { cursor: default; position: sticky; top: 46px; z-index: 1; background: var(--bg2); font-size: .79rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding-top: 8px; padding-bottom: 8px; animation: none; }
.dt-head:hover { background: var(--bg2); }
.dt-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.1rem; }
.dt-ico img { width: 100%; height: 100%; object-fit: cover; }
.dt-fourn, .dt-date { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-prix { color: var(--accent); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grille */
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.dt-card { position: relative; background: var(--glass); border: 1px solid var(--gb); border-radius: 12px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; animation: dtIn .22s ease both; transition: border-color .15s, transform .15s, box-shadow .15s; content-visibility: auto; contain-intrinsic-size: 190px 190px; }
@media (hover: hover) and (pointer: fine) {
  .dt-card:hover { border-color: var(--gb-hi); }
}
.dt-card-thumb { position: relative; aspect-ratio: 4/3; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; }
.dt-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dt-card-prix { position: absolute; left: 8px; bottom: 8px; background: var(--modal-bg); }
.dt-card-body { padding: 9px 12px 11px; min-width: 0; }
.dt-card .dt-actions { position: absolute; top: 6px; right: 6px; }
.dt-card .dt-actions .btn { background: var(--modal-bg); }
.dt-empty { padding: 36px 12px; }
.dt-more { text-align: center; padding: 14px 0; }
@keyframes dtIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dt-row, .dt-card { animation: none; } .dt-card:hover { transform: none; } }

@media (max-width: 860px) {
  .dt-layout { grid-template-columns: 1fr; }
  .dt-tree { display: none; }
}
@media (max-width: 640px) {
  .dt-row { grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 10px; }
  .dt-list.dt-noprix .dt-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .dt-fourn, .dt-date, .dt-head { display: none; }
  .dt-prix { font-size: .79rem; }
  .dt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dt-filters select { max-width: 48%; flex: 1; }
}

/* Section Fournisseurs : onglets Documents / Prix */
.dt-onglets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.dt-tabs { display: flex; gap: 2px; }
.dt-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; background: none; color: var(--text-muted); font-size: .85rem; font-weight: 500; cursor: pointer; transition: color .15s, border-color .15s; }
.dt-tab:hover { color: var(--text); }
.dt-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dt-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Catalogue de prix fournisseurs (onglet Prix) */
.prixcat-pane { animation: prixIn .24s cubic-bezier(.22,1,.36,1) both; }
@keyframes prixIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.prixcat-stats { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.prixcat-stats:empty { display: none; }
.prixcat-stats-titre { font-size: .79rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.prixcat-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass-sb); font-size: .85rem; animation: dtIn .22s ease both; }
.prixcat-groupe.variable { border-color: var(--orange); background: var(--orange-bg); }
.prixcat-groupe-unite { font-weight: 700; }
.prixcat-groupe-n { font-weight: 400; color: var(--text-muted); }
.prixcat-variable { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid var(--orange); border-radius: 12px; background: var(--orange-bg); color: var(--orange); font-size: .79rem; font-weight: 600; }
.prixcat-table { border: 1px solid var(--gb); border-radius: 12px; background: var(--glass-sb); overflow: clip; }
.prixcat-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 140px 90px 70px 76px; align-items: center; gap: 12px; padding: 8px 12px; font-size: .79rem; animation: dtIn .22s ease both; }
.prixcat-row + .prixcat-row { border-top: 1px solid var(--border); }
.prixcat-head { position: sticky; top: 46px; z-index: 1; background: var(--bg2); border-bottom: 1px solid var(--border); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; animation: none; }
.prixcat-des { min-width: 0; }
.prixcat-num { text-align: right; }
.prixcat-prix { color: var(--accent); font-weight: 600; }
.prixcat-fourn, .prixcat-date { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prixcat-source { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-muted); }
.prixcat-src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prixcat-pj { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; color: var(--accent); font-size: .9rem; }
.prixcat-pj:hover { background: var(--accentbg); }
.prixcat-pj:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.prixcat-vide { color: var(--text-dim); font-weight: 400; }
.prixcat-actions { display: flex; gap: 4px; justify-content: flex-end; }
.prixcat-actions .btn { min-width: 30px; justify-content: center; }
.prixcat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.prixcat-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); animation: dtIn .22s ease both; }
.prixcat-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.prixcat-card-des { min-width: 0; font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.prixcat-card-prix { flex-shrink: 0; color: var(--accent); font-size: 1rem; font-weight: 700; white-space: nowrap; }
.prixcat-card-meta { font-size: .79rem; color: var(--text-muted); }
.prixcat-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
@media (max-width: 860px) {
  .prixcat-row { grid-template-columns: minmax(0, 1fr) 120px 120px 80px 56px 70px; }
}
@media (max-width: 640px) {
  .dt-tab { min-height: 36px; }
  .prixcat-head { display: none; }
  .prixcat-row { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .prixcat-des { flex: 1 1 100%; }
  .prixcat-num { text-align: left; }
  .prixcat-actions { margin-left: auto; }
  .prixcat-actions .btn, .prixcat-pj { min-width: 36px; min-height: 36px; }
}

/* Devis : prix d'achat proposé par le catalogue fournisseurs (loupe + panneau) */
.dv-pa-cell { display: flex; align-items: center; gap: 2px; }
.dv-pa-cell .dv-cell-input { flex: 1; min-width: 56px; }
.dv-prix-btn { flex-shrink: 0; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: .85rem; cursor: pointer; transition: color .15s, background-color .15s, border-color .15s; }
.dv-prix-btn:hover, .dv-prix-btn[aria-expanded="true"] { color: var(--accent); background: var(--accentbg); border-color: var(--accent); }
.dv-prix-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dv-prix-pop { position: fixed; z-index: 900; width: min(380px, calc(100vw - 16px)); max-height: min(440px, calc(100vh - 16px)); display: flex; flex-direction: column; background: var(--modal-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--gb-hi); border-radius: 12px; box-shadow: var(--sh-lg); animation: dtIn .14s ease both; }
.dv-prix-head { display: flex; align-items: flex-start; gap: 8px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--gb); }
.dv-prix-titre { flex: 1; min-width: 0; font-size: .85rem; font-weight: 700; }
.dv-prix-q { display: block; font-size: .79rem; font-weight: 400; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-prix-close { flex-shrink: 0; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.dv-prix-close:hover { background: var(--glass-h); color: var(--text); }
.dv-prix-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dv-prix-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.dv-prix-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border-radius: 8px; }
.dv-prix-item:hover { background: var(--glass-h); }
.dv-prix-item + .dv-prix-item { border-top: 1px solid var(--border); }
.dv-prix-des { font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.dv-prix-meta { font-size: .79rem; color: var(--text-muted); }
.dv-prix-val { font-size: .9rem; font-weight: 700; color: var(--accent); white-space: nowrap; text-align: right; }
.dv-prix-item .btn { grid-column: 1 / -1; justify-self: end; }
.dv-prix-vide { padding: 16px 14px; font-size: .85rem; color: var(--text-muted); }
@media (max-width: 640px) {
  .dv-prix-btn { width: 36px; height: 36px; }
  .dv-prix-item .btn, .dv-prix-close { min-height: 36px; }
}
@media print { .dv-prix-pop { display: none; } }

/* Visionneuse documents techniques */
.dt-pdfthumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; opacity: 0; transition: opacity .25s; }
.dt-pdfthumb.ready { opacity: 1; }
.dtv-modal { width: min(1100px, 96vw); max-width: none; padding: 0; display: flex; flex-direction: column; max-height: calc(100vh - 110px); overflow: hidden; }
.dtv { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dtv-head { display: flex; align-items: center; gap: 12px; padding: 14px 56px 12px 20px; border-bottom: 1px solid var(--gb); }
.dtv-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtv-nav, .dtv-zoom { display: inline-flex; align-items: center; gap: 8px; font-size: .79rem; color: var(--text-muted); flex-shrink: 0; }
.dtv-nav .btn, .dtv-zoom .btn { min-width: 32px; justify-content: center; font-size: 1rem; line-height: 1; }
.dtv-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; flex: 1; }
.dtv-preview { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--gb); background: var(--bg2); }
.dtv-toolbar { display: flex; justify-content: center; padding: 6px; border-bottom: 1px solid var(--gb); }
.dtv-stage { flex: 1; min-height: 360px; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dtv-page { background: #fff; box-shadow: var(--sh); flex-shrink: 0; max-width: none; }
.dtv-page canvas { display: block; width: 100%; height: auto; }
.dtv-img { height: auto; max-width: none; border-radius: 8px; flex-shrink: 0; }
.dtv-msg { margin: auto; text-align: center; color: var(--text-muted); font-size: .85rem; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dtv-msg-ico { font-size: 2.5rem; }
.dtv-info { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dtv-desc { margin: 0; color: var(--text-dim); white-space: pre-wrap; font-size: .85rem; }
.dtv-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.dtv-actions .btn { justify-content: center; }
@media (max-width: 860px) {
  .dtv-modal { max-height: none; height: calc(100vh - 110px); overflow-y: auto; }
  .dtv-body { grid-template-columns: 1fr; }
  .dtv-preview { border-right: 0; border-bottom: 1px solid var(--gb); }
  .dtv-stage { min-height: 50vh; }
  .dtv-head { flex-wrap: wrap; padding-left: 14px; }
}

/* Glisser-déposer documents techniques */
.dt-dragging { opacity: .45; }
.dt-drop-ok { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accentbg) !important; border-radius: 8px; }
.dt-drop-no { cursor: not-allowed; }
.dt-row[draggable="true"], .dt-card[draggable="true"] { -webkit-user-drag: element; }

/* Dossier illustré (ouvre au survol, fichiers qui dépassent) */
.dtf { position: relative; display: block; width: 6em; height: 4.8em; font-size: 16px; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.dtf > i { display: block; position: absolute; }
.dtf-back { inset: .55em 0 0 0; background: #66902a; border-radius: .35em .5em .5em .5em; }
.dtf-back::before { content: ""; position: absolute; left: 0; top: -.5em; width: 2.5em; height: .75em; background: #6f9a2a; border-radius: .35em .7em 0 0; }
.dtf-sheet { left: .5em; right: .5em; top: 1em; bottom: .6em; border-radius: .2em; background: repeating-linear-gradient(180deg, transparent 0 .55em, rgba(0,0,0,.09) .55em .6em), #f5f5ef; box-shadow: 0 0 .12em rgba(0,0,0,.3); transition: transform .38s cubic-bezier(.34,1.56,.64,1); }
.dtf-sheet.s1 { transform: rotate(-2deg); }
.dtf-sheet.s2 { transform: rotate(1.5deg); left: .7em; right: .35em; top: 1.15em; }
.dtf-sheet.s3 { transform: rotate(-.5deg); left: .6em; right: .6em; top: 1.3em; }
.dtf-front { left: 0; right: 0; bottom: 0; height: 3.7em; background: #9bc840; border-radius: .45em; box-shadow: inset 0 .08em 0 rgba(255,255,255,.35), 0 -.06em .2em rgba(0,0,0,.25); transform-origin: 50% 100%; transition: transform .38s cubic-bezier(.34,1.3,.64,1); }
.dt-folder:hover .dtf-front, .dt-folder:focus-visible .dtf-front, .dt-folder.dt-drop-ok .dtf-front { transform: perspective(14em) rotateX(-26deg); }
.dt-folder:hover .dtf-sheet.s1, .dt-folder:focus-visible .dtf-sheet.s1, .dt-folder.dt-drop-ok .dtf-sheet.s1 { transform: translate(-.15em, -1.15em) rotate(-5deg); }
.dt-folder:hover .dtf-sheet.s2, .dt-folder:focus-visible .dtf-sheet.s2, .dt-folder.dt-drop-ok .dtf-sheet.s2 { transform: translate(.15em, -1.5em) rotate(4deg); }
.dt-folder:hover .dtf-sheet.s3, .dt-folder:focus-visible .dtf-sheet.s3, .dt-folder.dt-drop-ok .dtf-sheet.s3 { transform: translate(0, -.9em) rotate(-1deg); }
.dt-folder:hover .dtf { transform: translateY(.15em); }
.dt-folder-thumb { background: radial-gradient(circle at 50% 60%, var(--accentbg), transparent 70%), var(--surface2); }
.dt-folder-thumb .dtf { font-size: 22px; }
.dt-folder-mini { overflow: visible; background: transparent; }
.dt-folder-mini .dtf { font-size: 4.5px; }
@media (prefers-reduced-motion: reduce) { .dtf, .dtf-sheet, .dtf-front { transition: none; } }

/* Sélection, menu clic droit, viewer lecture seule */
.dt-row, .dt-card { user-select: none; -webkit-user-select: none; }
.dt-row[data-sel="1"], .dt-card[data-sel="1"] { background: var(--accentbg); outline: 2px solid var(--accent); outline-offset: -2px; }
.dt-card[data-sel="1"] { border-color: var(--accent); }
.dt-ctx[hidden] { display: none; }
.dt-ctx { position: fixed; z-index: 900; min-width: 210px; padding: 5px; border: 1px solid var(--gb-hi); border-radius: 12px; background: var(--modal-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--sh-lg); animation: dtIn .12s ease both; }
.dt-ctx-it { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: .85rem; text-align: left; cursor: pointer; }
.dt-ctx-it:hover, .dt-ctx-it:focus-visible { background: var(--glass-h); outline: none; }
.dt-ctx-it.danger { color: var(--red); }
.dt-ctx-it.danger:hover, .dt-ctx-it.danger:focus-visible { background: var(--red-bg); }
.dt-ctx-it kbd { font: inherit; font-size: .79rem; color: var(--text-muted); }
.dt-ctx-sep { height: 1px; margin: 4px 6px; background: var(--gb); }
.dt-ctx-head { padding: 6px 10px 4px; font-size: .79rem; color: var(--text-muted); }
.dt-dragghost { position: fixed; top: -100px; left: -100px; padding: 6px 12px; border-radius: 8px; background: var(--accent); color: #111; font-size: .79rem; font-weight: 700; }
.dtv-stage { position: relative; cursor: grab; outline: none; }
.dtv-stage.grabbing { cursor: grabbing; user-select: none; }
.dtv-toolbar { align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; }
.dtv-page-lbl { font-size: .79rem; color: var(--text-muted); }
.dtv-zoom { margin-left: auto; }
.dtv-page:not(.done)::before { content: "Page " attr(data-n); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9a9a9a; font-size: .85rem; }
.dtv-page { position: relative; }
.dtv-body { grid-template-rows: minmax(0, 1fr); }
.dtv-preview { overflow: hidden; }
.dtv-stage { min-height: 0; }
@media (max-width: 860px) {
  .dtv-body { grid-template-rows: auto; }
  .dtv-stage { flex: none; height: 62vh; }
}
.dtv-modal > #fiche-doctech-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
@media (max-width: 860px) { .dtv-modal > #fiche-doctech-body { flex: none; } }
.dtv-page.rendering::before { content: "Page " attr(data-n) " - affichage en cours..."; }

/* Sélecteur bibliothèque intégré à l'onglet du DOE / Dossier technique (liste + aperçu) */
.doe-edit-modal { width: min(500px, 96vw); max-width: none; transition: width .25s ease; }
.doe-edit-modal.doe-wide { width: min(1180px, 96vw); }
.doe-dt-panel { --doe-dt-h: max(300px, calc(100vh - 430px)); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 14px; margin-bottom: 14px; animation: offreIn .25s ease-out; }
@supports (height: 100dvh) { .doe-dt-panel { --doe-dt-h: max(300px, calc(100dvh - 430px)); } }
.doe-dt-browse { display: flex; flex-direction: column; min-width: 0; height: var(--doe-dt-h); }
.doe-dt-browse .dt-search { flex: none; width: 100%; margin-bottom: 8px; }
.doe-dt-browse .dtp-list { flex: 1 1 0; min-height: 0; }
.doe-dt-browse .dtp-chosen { margin-top: 8px; }
.doe-dt-hint { grid-column: 1 / -1; font-size: .79rem; color: var(--text-muted); }
.doe-dt-prev { display: flex; flex-direction: column; min-width: 0; height: var(--doe-dt-h); border: 1px solid var(--gb); border-radius: 12px; background: var(--glass-sb); overflow: hidden; }
.dtp-prev-head { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtp-prev-stage { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; }
.dtp-prev-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.dtp-prev-msg { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 260px; text-align: center; font-size: .85rem; color: var(--text-muted); }
.dtp-prev-msg .ic { width: 28px; height: 28px; }
.dtp-prev-pages { align-self: flex-start; font-size: .79rem; color: var(--text-muted); }
.dtp-page { width: 100%; background: #fff; box-shadow: var(--sh); flex-shrink: 0; }
.dtp-page canvas { display: block; width: 100%; height: auto; animation: dcFade .2s ease-out; }
.dtp-prev-img { max-width: 100%; height: auto; box-shadow: var(--sh); }
.dtp-row.seen { box-shadow: inset 3px 0 0 var(--accent); }
.dtp-eye { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.dtp-eye:hover, .dtp-eye:focus-visible { background: var(--glass-h); color: var(--accent); }
@media (max-width: 860px) {
  .doe-dt-panel { grid-template-columns: 1fr; }
  .doe-dt-browse { height: 46vh; }
  .doe-dt-prev { height: 60vh; }
}
@media (prefers-reduced-motion: reduce) { .doe-edit-modal, .doe-dt-panel, .dtp-page canvas { transition: none; animation: none; } }
.dtp-list { flex: 1; min-height: 240px; overflow-y: auto; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass-sb); }
.dtp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 12px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; cursor: pointer; font-size: .85rem; }
.dtp-row:last-child { border-bottom: 0; }
.dtp-row:hover { background: var(--glass-h); }
.dtp-row.on { background: var(--accentbg); }
.dtp-row.taken { opacity: .5; cursor: not-allowed; }
.dtp-row input { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.dtp-name { flex: 1; min-width: 0; }
.dtp-badge { font-size: .79rem; color: var(--text-muted); flex-shrink: 0; }
.dtp-go { color: var(--text-muted); display: inline-flex; }
.dtp-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dtp-count { margin-right: auto; font-size: .79rem; color: var(--text-muted); }
.dtp-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.dtp-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 12px; background: var(--accentbg); border: 1px solid var(--accent); font-size: .79rem; }
.dtp-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtp-chip button { border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
.dtp-none { font-size: .79rem; color: var(--text-muted); }

/* Bibliothèque -> chantier */
.dta-summary { margin-bottom: 12px; padding: 8px 12px; border-radius: 8px; background: var(--accentbg); font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dta-radios { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; }
.dta-radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.dta-radios input { accent-color: var(--accent); }
.dta-hint { font-size: .79rem; color: var(--text-muted); }

/* iOS Safari : 100vh = hauteur barres d'outils masquées, le bas des modales/plans passe sous la barre.
   dvh = hauteur réellement visible (ignoré par les navigateurs qui ne le connaissent pas). */
@supports (height: 100dvh) {
  .modal-plan-viewer { height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
  .stock-body { height: calc(100dvh - 110px); }
  .dt-tree { max-height: calc(100dvh - 150px); }
  .dtv-modal, .dtp-modal { max-height: calc(100dvh - 110px); }
  @media (max-width: 860px) { .dtv-modal { height: calc(100dvh - 110px); max-height: none; } }
}

/* Écrans tactiles : zones de toucher d'au moins 44px (pins du plan, bouton fermer des modales) */
@media (pointer: coarse) {
  .plan-pin-badge::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
  .modal-close { min-height: 44px; min-width: 44px; }
}

/* Commande : formulaire de configuration d'une grille ventelle */
.cgf-wrap { display: flex; flex-direction: column; gap: 12px; }
.cgf-sec { border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); overflow: hidden; }
.cgf-sec-h { display: flex; gap: 10px; align-items: center; width: 100%; padding: 11px 14px; background: transparent; border: none; color: var(--text); text-align: left; font-family: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; transition: background .15s; }
.cgf-sec-h:hover { background: var(--glass); }
.cgf-sec-h:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cgf-sec.is-open > .cgf-sec-h { border-bottom: 1px solid var(--gb); }
.cgf-sec-v { font-weight: 400; color: var(--accent); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cgf-sec-t { flex: 0 0 auto; }
.cgf-chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform .2s; flex: 0 0 auto; }
.cgf-sec.is-open > .cgf-sec-h .cgf-chev { transform: rotate(-135deg); }
.cgf-sec-b { padding: 12px 14px; }
.cgf-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.cgf-field { display: flex; flex-direction: column; gap: 4px; font-size: .79rem; color: var(--text-muted); flex: 1; min-width: 120px; }
.cgf-fab { padding: 9px 12px; font-size: .9rem; color: var(--text); font-variant-numeric: tabular-nums; }
.cgf-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.cgf-card { flex: 1; min-width: 130px; padding: 14px 12px; border: 1px solid var(--gb); border-radius: 12px; background: transparent; color: var(--text); font-weight: 600; font-size: .85rem; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.cgf-cards-sm .cgf-card { flex: 0 0 auto; min-width: 90px; }
@media (hover: hover) and (pointer: fine) {
  .cgf-card:hover { background: var(--glass-h); }
}
.cgf-card:focus-visible, .cgf-ral:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cgf-card.is-on, .cgf-ral.is-on { border-color: var(--accent); background: var(--glass); box-shadow: 0 0 0 1px var(--accent); }
.cgf-ail { display: grid; grid-template-columns: auto 132px auto; grid-template-areas: ". haut ." "gauche sq droite" ". bas ."; gap: 10px 14px; justify-content: center; align-items: center; justify-items: center; }
.cgf-ail-haut { grid-area: haut; } .cgf-ail-bas { grid-area: bas; } .cgf-ail-gauche { grid-area: gauche; } .cgf-ail-droite { grid-area: droite; }
.cgf-sq { grid-area: sq; position: relative; width: 120px; height: 120px; border: 1px solid var(--gb-hi); background: repeating-linear-gradient(to bottom, transparent 0 6px, var(--gb) 6px 7px); }
.cgf-bar { position: absolute; background: var(--gb); transition: background .15s; }
.cgf-bar.is-on { background: var(--accent); }
.cgf-bar-haut, .cgf-bar-bas { left: 0; right: 0; height: 10px; }
.cgf-bar-gauche, .cgf-bar-droite { top: 0; bottom: 0; width: 10px; }
.cgf-bar-haut { top: 0; } .cgf-bar-bas { bottom: 0; } .cgf-bar-gauche { left: 0; } .cgf-bar-droite { right: 0; }
.cgf-check { display: flex; align-items: center; gap: 6px; font-size: .85rem; cursor: pointer; }
.cgf-note { margin-top: 8px; font-size: .79rem; color: var(--text-muted); }
.cgf-warn { margin-top: 6px; font-size: .79rem; color: var(--red); }
.cgf-warn:empty { display: none; }
.cgf-search { width: 100%; margin-bottom: 10px; }
.cgf-ral-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; }
.cgf-ral { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border: 1px solid var(--gb); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.cgf-ral-sw { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--gb-hi); }
.cgf-ral-t { font-size: .79rem; text-align: center; line-height: 1.2; }
.cgf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.cgf-cfg-cell { font-size: .79rem; color: var(--text-muted); white-space: normal !important; }
.cmd-grille-table th, .cmd-grille-table td { padding: 7px 5px; vertical-align: middle; }
.cmd-grille-table th { white-space: normal; line-height: 1.2; }
.cmd-grille-table td:nth-child(n+6):nth-child(-n+11) { white-space: normal; min-width: 64px; }
.cmd-grille-table td input[type="text"] { min-width: 52px; }
.cmd-grille-table td input[type="number"] { min-width: 62px; }
.cmd-grille-table td select { max-width: 120px; }
.cmd-grille-table td.num { min-width: 66px; }
@media (prefers-reduced-motion: reduce) { .cgf-card, .cgf-chev, .cgf-sec-h { transition: none; } .cgf-card:hover { transform: none; } }
@media (max-width: 480px) {
  .cgf-ail { grid-template-columns: auto 100px auto; gap: 8px; }
  .cgf-sq { width: 96px; height: 96px; }
  .cgf-sec-b { padding: 10px; }
  .cgf-cards .cgf-card { min-width: 100px; }
}

/* ═══════════ Assistant : îlot dynamique (assistant.js / assistant_core.js) ═══════════ */
.asst-island {
  --asst-w: 132px; --asst-h: 36px; --asst-color: #39FF14;
  position: fixed; top: 7px; left: 50%; width: var(--asst-w); height: var(--asst-h);
  transform: translateX(-50%); background: #000; color: #fff; border-radius: 12px; z-index: 310; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 6px 20px rgba(0,0,0,.4); font-family: inherit;
  transition: width .5s cubic-bezier(.34,1.4,.5,1), height .5s cubic-bezier(.34,1.3,.5,1), border-radius .4s ease, box-shadow .3s ease;
}
.asst-island[data-style="neon"]::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%,-50%); pointer-events: none; opacity: .5;
  background: radial-gradient(circle, color-mix(in srgb, var(--asst-color) 34%, transparent) 0%, transparent 66%);
  transition: left .5s cubic-bezier(.34,1.4,.5,1), top .5s cubic-bezier(.34,1.4,.5,1), opacity .4s ease;
}
.asst-island[data-style="neon"][data-state="peek"]::before { left: 28px; opacity: .8; }
.asst-island[data-style="neon"][data-state="open"]::before { left: 34px; top: 25px; opacity: .85; }
.asst-island[data-state="open"] { z-index: 700; border-radius: 24px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 50px rgba(0,0,0,.55); }
.asst-island[data-state="open"]:focus-within { box-shadow: 0 0 0 1.5px var(--asst-color), 0 18px 50px rgba(0,0,0,.55); }
.asst-hit { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: inherit; }
.asst-hit:focus-visible { outline: 2px solid var(--asst-color); outline-offset: -2px; }
.asst-island[data-state="open"] .asst-hit { display: none; }

.asst-mascot-wrap {
  position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%,-50%); transform-origin: left center; pointer-events: none;
  transition: left .5s cubic-bezier(.34,1.4,.5,1), top .5s cubic-bezier(.34,1.4,.5,1), transform .5s cubic-bezier(.34,1.4,.5,1);
}
.asst-island[data-state="peek"] .asst-mascot-wrap { left: 14px; transform: translate(0,-50%); }
.asst-island[data-state="open"] .asst-mascot-wrap { left: 14px; top: 25px; transform: translate(0,-50%) scale(1.45); }
.asst-mascot { display: block; width: 100%; height: 100%; overflow: visible; }
.asst-eyes { transform-box: fill-box; transform-origin: center; transition: transform .07s ease; }

.asst-pupil { transition: transform .12s ease-out; }
.asst-eye-g { transform-box: fill-box; transform-origin: center; transition: transform .12s ease; }
.asst-glow { opacity: .55; transition: opacity .4s ease; }
.asst-spec { transition: transform .12s ease-out; }
.asst-shine { transform-box: view-box; transform: translateX(-70px) skewX(-20deg); animation: asst-shine 7s ease-in-out infinite; }
.asst-zzz { font-family: inherit; pointer-events: none; }
.asst-mascot-wrap[data-mood="happy"] .asst-glow, .asst-mascot-wrap[data-mood="wink"] .asst-glow, .asst-mascot-wrap[data-mood="love"] .asst-glow, .asst-mascot-wrap[data-mood="excited"] .asst-glow { opacity: .85; }
.asst-mascot-wrap[data-mood="sad"] .asst-glow, .asst-mascot-wrap[data-mood="sleepy"] .asst-glow { opacity: .15; }
.asst-mascot-wrap[data-mood="thinking"] .asst-glow { animation: asst-pulse 1.1s ease-in-out infinite; }
.asst-mascot-wrap[data-mood="sleepy"] .asst-zzz { opacity: .9; animation: asst-z 2.6s ease-in-out infinite; }
.asst-mascot-wrap[data-mood="sleepy"] .asst-shine { animation: none; }
.asst-island[data-state="idle"] .asst-mascot { animation: asst-bob 4.2s ease-in-out infinite; }
.asst-react[data-mood="happy"] .asst-mascot, .asst-react[data-mood="surprised"] .asst-mascot, .asst-react[data-mood="love"] .asst-mascot, .asst-react[data-mood="excited"] .asst-mascot, .asst-react[data-mood="proud"] .asst-mascot { animation: asst-hop .55s ease; }
.asst-react[data-mood="thinking"] .asst-mascot, .asst-react[data-mood="curious"] .asst-mascot { animation: asst-tilt .6s ease; }
.asst-react[data-mood="sad"] .asst-mascot, .asst-react[data-mood="worried"] .asst-mascot { animation: asst-droop .6s ease; }
.asst-wave .asst-mascot { animation: asst-wave 1.2s ease-in-out; transform-origin: 50% 90%; }
.asst-eyes.asst-blink { transform: scaleY(.08); }
@keyframes asst-shine { 0%, 60% { transform: translateX(-70px) skewX(-20deg); } 84%, 100% { transform: translateX(150px) skewX(-20deg); } }
@keyframes asst-pulse { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }
@keyframes asst-z { 0%, 100% { transform: translateY(2px); opacity: .35; } 50% { transform: translateY(-4px); opacity: .95; } }
@keyframes asst-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1.4px); } }
@keyframes asst-hop { 0% { transform: none; } 30% { transform: translateY(-4px) scale(1.08,.94); } 60% { transform: translateY(0) scale(.95,1.06); } 100% { transform: none; } }
@keyframes asst-tilt { 0%,100% { transform: rotate(0); } 40% { transform: rotate(-14deg); } 70% { transform: rotate(8deg); } }
@keyframes asst-droop { 0%,100% { transform: none; } 40% { transform: translateY(2px) scale(1.04,.92); } }
@keyframes asst-wave { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-16deg); } 30% { transform: rotate(14deg); } 45% { transform: rotate(-12deg); } 60% { transform: rotate(10deg); } }

.asst-peek { position: absolute; left: 50px; top: 0; height: 36px; line-height: 36px; font-size: .79rem; font-weight: 600; white-space: nowrap; color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.asst-island[data-state="peek"] .asst-peek { opacity: 1; transition-delay: .15s; }

.asst-inner { position: absolute; left: 0; top: 0; width: 100%; visibility: hidden; opacity: 0; transition: opacity .18s ease, visibility 0s linear .2s; }
.asst-island[data-state="open"] .asst-inner { visibility: visible; opacity: 1; transition: opacity .25s ease .12s, visibility 0s; }
.asst-form { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 10px 0 68px; margin: 0; }
.asst-island .asst-input, .asst-island .asst-input:focus {
  flex: 1; min-width: 0; height: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; outline: 0; box-shadow: none;
  background: transparent; -webkit-appearance: none; appearance: none; backdrop-filter: none; color: #fff; font: inherit; font-size: .9rem;
}
.asst-island .asst-input::placeholder { color: rgba(255,255,255,.55); }
.asst-close { width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; transition: background .15s; }
.asst-close:hover { background: rgba(255,255,255,.22); }
.asst-close:focus-visible, .asst-chip:focus-visible { outline: 2px solid var(--asst-color); outline-offset: 1px; }

.asst-log { display: flex; flex-direction: column; gap: 8px; padding: 0 14px; max-height: 42vh; overflow-y: auto; scrollbar-width: thin; }
.asst-log:not(:empty) { padding-bottom: 12px; }
.asst-msg { display: flex; flex-direction: column; gap: 7px; animation: asst-in .28s ease both; }
.asst-msg-u { align-self: flex-end; max-width: 85%; }
.asst-msg-u .asst-msg-text { background: rgba(255,255,255,.14); border-radius: 12px 12px 4px 12px; padding: 5px 10px; font-size: .79rem; }
.asst-msg-a .asst-msg-text { font-size: .85rem; line-height: 1.5; white-space: pre-line; color: #fff; }
.asst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asst-chip { min-height: 28px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: .79rem; cursor: pointer; transition: background .15s, border-color .15s; }
.asst-chip:hover { background: rgba(255,255,255,.2); border-color: var(--asst-color); }
@keyframes asst-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .asst-island, .asst-mascot-wrap, .asst-inner, .asst-pupil, .asst-eyes { transition-duration: .01s !important; transition-delay: 0s !important; }
  .asst-msg, .asst-mascot, .asst-shine, .asst-glow, .asst-zzz { animation: none !important; }
}
html.perf-lite .asst-island .asst-mascot, html.perf-lite .asst-shine, html.perf-lite .asst-glow { animation: none !important; }
html.perf-lite .asst-mascot .asst-spec, html.perf-lite .asst-mascot .asst-glow { display: none; }
html.perf-lite .asst-island::before { display: none; }
@media print { .asst-island { display: none; } }

/* ═══════════ Assistant sur téléphone : bouton flottant, puis feuille plein écran ═══════════
   Même seuil que mobile.css (640 px). Le bouton se place au-dessus du "+" des tâches ; la feuille suit le clavier (--asst-vvh/--asst-vvt, visualViewport). */
.asst-send, .asst-title { display: none; }
.asst-mic { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: background .15s; }
.asst-mic[hidden] { display: none; }
.asst-mic:hover { background: rgba(255,255,255,.22); }
.asst-mic:focus-visible { outline: 2px solid var(--asst-color); outline-offset: 1px; }
.asst-mic.on { background: #FF453A; animation: asst-mic-pulse 1.2s ease-in-out infinite; }
@keyframes asst-mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,69,58,.55); } 50% { box-shadow: 0 0 0 7px rgba(255,69,58,0); } }
@media (prefers-reduced-motion: reduce) { .asst-mic.on { animation: none; } }
@media (max-width: 640px) {
  .asst-island, .asst-island[data-state="peek"] {
    top: auto !important; left: auto !important; right: 16px; bottom: 82px; transform: none;
    width: 48px !important; height: 48px !important; border-radius: 50%; z-index: 280; transition: none;
  }
  .asst-island .asst-mascot-wrap, .asst-island[data-state="peek"] .asst-mascot-wrap {
    left: 50% !important; top: 50% !important; width: 32px; height: 32px; transform: translate(-50%,-50%) !important;
  }
  .asst-peek { display: none; }
  .asst-island .asst-dot, .asst-island[data-state="peek"] .asst-dot { left: auto; right: 5px; top: 5px; margin: 0; }
  .asst-island[data-state="open"] {
    top: var(--asst-vvt, 0px) !important; left: 0 !important; right: 0; bottom: auto; width: 100% !important; height: var(--asst-vvh, 100dvh) !important;
    border-radius: 0; z-index: 700; animation: asst-sheet .26s cubic-bezier(.22,1,.36,1) both;
  }
  .asst-island[data-state="open"] .asst-mascot-wrap { left: 14px !important; top: 27px !important; transform: translate(0,-50%) scale(1.5) !important; width: 28px; height: 28px; }
  .asst-inner { inset: 0; height: 100%; display: flex; flex-direction: column; padding-top: 54px; }
  .asst-title { display: block; position: absolute; left: 66px; top: 0; height: 54px; line-height: 54px; font-size: 1rem; font-weight: 700; }
  .asst-log { order: 1; flex: 1; max-height: none; min-height: 0; padding: 6px 14px 10px; gap: 12px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .asst-island .asst-sugg { order: 2; padding: 0 14px 8px; }
  .asst-form { order: 3; height: auto; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; border-top: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
  .asst-island .asst-input, .asst-island .asst-input:focus {
    height: 46px; padding: 0 16px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: 16px;
  }
  .asst-mic { width: 46px; height: 46px; }
  .asst-send { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--asst-color); color: #000; cursor: pointer; }
  .asst-send:active { transform: scale(.94); }
  .asst-close { position: absolute; top: 9px; right: 12px; width: 38px; height: 38px; font-size: 1.6rem; }
  .asst-msg-a .asst-msg-text { font-size: 1rem; }
  .asst-msg-u .asst-msg-text { font-size: .9rem; padding: 8px 12px; }
  .asst-chip { min-height: 40px; padding: 8px 14px; font-size: .85rem; }
}
@keyframes asst-sheet { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .asst-island[data-state="open"] { animation: none; } }

/* Réglages dans Mon profil */
#profil-assistant-section { border-top: 1px solid var(--gb); padding-top: 14px; margin-top: 2px; }
.asst-set-title { font-size: .79rem; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .08em; }
.asst-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.asst-set-label { font-size: .85rem; font-weight: 500; }
.asst-set-sub { font-size: .79rem; color: var(--text-muted); margin-top: 2px; }
.asst-set-grid { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.asst-preview-box { width: 86px; height: 86px; flex-shrink: 0; padding: 14px; border-radius: 12px; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.asst-set-col { flex: 1; min-width: 0; }
.asst-set-label2 { font-size: .79rem; font-weight: 600; color: var(--text-muted); margin: 0 0 6px; }
.asst-style-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.asst-style-btn { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); font: inherit; font-size: .79rem; cursor: pointer; transition: background .15s, border-color .15s; }
.asst-style-btn:hover { background: var(--glass-h); }
.asst-style-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accentbg); }
.asst-style-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.asst-swatch-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.asst-shape-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.asst-shape-btn { width: 100%; aspect-ratio: 1; padding: 9px; border-radius: 12px; background: #000; border: 2px solid transparent; cursor: pointer; transition: border-color .15s, transform .15s; }
@media (hover: hover) and (pointer: fine) {
  .asst-shape-btn:hover { border-color: var(--gb-hi); }
}
.asst-shape-btn[aria-pressed="true"] { border-color: var(--accent); }
.asst-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gb-hi); cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s; }
@media (hover: hover) and (pointer: fine) {
  .asst-swatch:hover { transform: scale(1.1); }
}
.asst-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.asst-shape-btn:focus-visible, .asst-swatch:focus-visible, #asst-color-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#asst-color-input { width: 32px; height: 28px; padding: 2px; border-radius: 8px; border: 1px solid var(--gb); background: var(--glass); cursor: pointer; }

/* Formulaire evenement : les cartes ne se compressent pas, le corps du modal defile */
.ev-form-body > * { flex-shrink: 0; }

/* Calendrier : bande hachuree du temps de trajet autour d'un RDV (couleur = --tc, celle de l'evenement) */
.cal-week-travel { position:absolute; box-sizing:border-box; border-radius:8px; border:1px dashed var(--tc); cursor:pointer; overflow:hidden; z-index:1;
  background:repeating-linear-gradient(135deg, color-mix(in srgb, var(--tc) 34%, transparent) 0 4px, color-mix(in srgb, var(--tc) 10%, transparent) 4px 8px); }
.cal-week-travel:hover { filter:brightness(1.15); }
.cal-week-travel span { display:block; padding:1px 4px; font-size:.79rem; font-family:'DM Mono',monospace; color:var(--text-muted); }
#ev-trajet-info:empty { display:none; }

/* Formulaire evenement : carte Trajet (aller / retour sous les dates) - une ligne par sens : libelle, adresse modifiable, minutes */
.ev-trajet-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:12px 16px; }
.ev-trajet-row + .ev-trajet-row { border-top:1px solid var(--gb); }
.ev-trajet-label { display:flex; align-items:center; gap:6px; flex:0 0 76px; margin:0; font-size:.9rem; font-weight:400; color:var(--text); }
.ev-trajet-adrwrap { display:flex; align-items:center; gap:6px; flex:1 1 260px; min-width:0; }
.ev-trajet-adr { flex:1; width:auto; min-width:0; font-size:.85rem; text-overflow:ellipsis; }
.ev-trajet-depot { flex:0 0 auto; }
.ev-trajet-min { display:flex; align-items:center; gap:6px; flex:0 0 auto; font-size:.79rem; color:var(--text-muted); }
.ev-trajet-min input { width:76px; text-align:center; font-weight:600; color:var(--accent); }
@media (max-width:640px) {
  .ev-trajet-adrwrap { order:3; flex-basis:100%; }
  .ev-trajet-label { flex:1 1 auto; }
}
.ev-trajet-min input[type=number] { -moz-appearance:textfield; appearance:textfield; }
.ev-trajet-min input::-webkit-outer-spin-button, .ev-trajet-min input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

/* Assistant : point d'attention, suggestions de saisie, réglages des alertes */
.asst-dot { display: none; position: absolute; left: calc(50% + 21px); top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #FF453A; box-shadow: 0 0 0 2px #000; pointer-events: none; }
.asst-dot.on { display: block; }
.asst-island[data-state="peek"] .asst-dot, .asst-island[data-state="open"] .asst-dot { display: none; }
.asst-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.asst-sugg[hidden] { display: none; }
.asst-flag-row { margin-top: 8px; }
.asst-chip:disabled { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: no-preference) { .asst-dot.on { animation: asst-dot-pulse 2.4s ease-in-out infinite; } }
@keyframes asst-dot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* Éléments cliquables non natifs rendus focusables par _a11yFix (utils_ui.js) : repère visible au clavier */
[onclick][tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tr[onclick][tabindex]:focus-visible, [data-gantt-row]:focus-visible { outline-offset: -2px; }

/* ═══════════ Carnet personnel (carnet.js) ═══════════ */
#section-monespace .me-tiles-grid > .card:nth-child(7) { animation-delay: .35s; }
.me-tile-wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.me-tile-wide .me-tile-icon { align-self: center; }
@keyframes carnetIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.carnet-modal { max-width: 680px; width: 96vw; max-height: 86vh; display: flex; flex-direction: column; }
.carnet-hint { font-size: .79rem; color: var(--text-muted); margin: -4px 0 12px; }
.carnet-rdv { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.carnet-rdv[hidden] { display: none; }
.carnet-rdv-titre { display: flex; align-items: center; gap: 6px; font-size: .79rem; font-weight: 700; margin-bottom: 6px; }
.carnet-rdv-ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; flex-wrap: wrap; }
.carnet-rdv-texte { flex: 1 1 200px; min-width: 0; font-size: .85rem; line-height: 1.35; word-break: break-word; }
.carnet-rdv-btns { display: flex; gap: 6px; flex-shrink: 0; }
.carnet-periodes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.carnet-barre { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.carnet-q { flex: 1; min-width: 0; }
.carnet-liste { overflow-y: auto; flex: 1; margin: 0 -24px; padding: 0 24px; min-height: 120px; }
.carnet-jour { margin-bottom: 14px; }
.carnet-jour-titre { font-size: .79rem; font-weight: 700; text-transform: capitalize; color: var(--text-muted); letter-spacing: .3px; padding: 4px 0; border-bottom: 1px solid var(--gb); margin-bottom: 4px; }
.carnet-ligne { display: flex; align-items: baseline; gap: 8px; padding: 6px 2px; animation: carnetIn .3s cubic-bezier(.22,1,.36,1) both; }
.carnet-heure { flex: 0 0 38px; font-size: .79rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.carnet-type { flex: 0 0 auto; font-size: .79rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--accent); min-width: 64px; }
.carnet-texte { flex: 1; font-size: .85rem; line-height: 1.35; word-break: break-word; }
.carnet-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 8px; font-size: .79rem; background: var(--glass); border: 1px solid var(--gb); color: var(--text-muted); white-space: nowrap; }
.carnet-pct { color: var(--accent); border-color: var(--accent); }
.carnet-actions { flex: 0 0 auto; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.carnet-ligne:hover .carnet-actions, .carnet-ligne:focus-within .carnet-actions { opacity: 1; }
.carnet-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.carnet-btn:hover, .carnet-btn:focus-visible { color: var(--accent); background: var(--glass); outline: none; }
.carnet-ajout { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gb); }
.carnet-ajout input { flex: 1; min-width: 0; }
@media (max-width: 640px) { .carnet-actions { opacity: 1; } .carnet-type { display: none; } }
@media (prefers-reduced-motion: reduce) { .carnet-ligne { animation: none; } }
.me-tile-sous { font-size: .79rem; color: var(--text-muted); }

/* Thème clair : badges lisibles (texte de la couleur sémantique foncée du thème) */
:root[data-theme="light"] .badge-red { color: var(--red); background: var(--red-bg); border-color: rgba(192,32,16,.30); }
:root[data-theme="light"] .badge-orange { color: var(--orange); background: var(--orange-bg); border-color: rgba(149,83,0,.30); }

/* Journal des mises à jour (fenêtre à l'ouverture, historique, onglet Admin) */
.maj-modal { max-width: 640px; width: 100%; max-height: 86vh; overflow-y: auto; }
.maj-intro { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.maj-mois { font-size: .79rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 16px 0 8px; }
.maj-mois:first-child { margin-top: 0; }
.maj-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--glass); margin-bottom: 10px; animation: majIn .32s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.maj-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maj-titre { font-weight: 700; font-size: .9rem; }
.maj-meta { font-size: .79rem; color: var(--text-muted); margin-top: 2px; }
.maj-modules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.maj-points { margin: 8px 0 0 18px; padding: 0; font-size: .85rem; line-height: 1.55; }
.maj-points li { margin-bottom: 3px; }
.maj-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.maj-actions label { display: inline-flex; align-items: center; gap: 8px; font-size: .79rem; cursor: pointer; min-height: 32px; }
.maj-actions .btn { margin-left: auto; }
.maj-actions .btn + .btn { margin-left: 0; }
.maj-masque { opacity: .62; }
.maj-textarea { width: 100%; min-height: 220px; resize: vertical; font-family: var(--font-mono, ui-monospace, monospace); font-size: .85rem; line-height: 1.5; }
@keyframes majIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .maj-item { animation: none; } }
.maj-actions .toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.maj-actions .toggle-switch input:checked + .toggle-slider:before { background: var(--on-accent, #fff); }
.maj-actions .toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
:root[data-theme="light"] .maj-actions .toggle-switch input:not(:checked) + .toggle-slider { background: rgba(0,0,0,.18); }

/* ══════════════════════════════
   CCTP — onglet "CCTP" de la fiche chantier (espace Chiffrage, cctp.js)
   Dépôt du CCTP (PDF) -> articles détectés à relire -> envoi vers le Suivi.
   Réutilise .dropzone, .badge*, .ch-info-row*, .dos-hint, .rep-warn, .mono, .empty-state (déjà stylés).
══════════════════════════════ */
.cctp-tab     { display: flex; flex-direction: column; animation: repIn .35s ease both; }
.cctp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Infos détectées en page de garde (MOA, lot, architecte...) */
.cctp-infos {
  background: var(--glass-sb);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  animation: repIn .3s ease both;
}
.cctp-infos .btn { margin-top: 10px; align-self: flex-start; }

.cctp-titre { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }

.cctp-liste-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 16px 0 10px;
  animation: repIn .3s ease both;
}
.cctp-liste-head .cctp-titre { margin-bottom: 0; }

/* Case "Afficher aussi les articles généraux" : ligne discrète (même motif que .rep-check) */
.cctp-generaux { display: flex; align-items: center; gap: 8px; font-size: .79rem; color: var(--text-muted); margin: 6px 0; cursor: pointer; min-height: 32px; }

.cctp-liste { display: flex; flex-direction: column; gap: 10px; }

.cctp-art {
  background: var(--glass);
  border: 1px solid var(--gb);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .18s, background .18s;
  animation: repIn .3s ease both;
}
/* Entrée échelonnée des premiers articles (motif repris de #section-monespace) */
.cctp-liste > .cctp-art:nth-child(1) { animation-delay: .02s; }
.cctp-liste > .cctp-art:nth-child(2) { animation-delay: .05s; }
.cctp-liste > .cctp-art:nth-child(3) { animation-delay: .08s; }
.cctp-liste > .cctp-art:nth-child(4) { animation-delay: .11s; }
.cctp-liste > .cctp-art:nth-child(5) { animation-delay: .14s; }
.cctp-liste > .cctp-art:nth-child(n+6) { animation-delay: .16s; }

.cctp-art-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.cctp-art-head input[type="checkbox"] { margin-top: 3px; }
.cctp-art-head label {
  flex: 1 1 200px; min-width: 160px; padding: 2px 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px;
  font-size: .85rem; color: var(--text); cursor: pointer;
}

.cctp-art textarea { background: var(--glass-sb); font-size: .85rem; line-height: 1.5; resize: vertical; min-height: 44px; }

/* Sous-ouvrages : indentés, discrets */
.cctp-subs { list-style: none; margin: 0; padding: 2px 0 0 16px; border-left: 2px solid var(--gb); display: flex; flex-direction: column; gap: 4px; }
.cctp-subs li { font-size: .79rem; color: var(--text-muted); line-height: 1.5; }
.cctp-subs li .mono { color: var(--text-dim); }
.cctp-sub-detail { color: var(--text-dim); }

/* Article déjà envoyé au Suivi : estompé mais lisible (contraste conservé via les tokens muted/dim),
   accent "fait" en haut de carte ; les badges restent à pleine opacité. */
.cctp-art-envoye { border-top: 2px solid var(--green); }
.cctp-art-envoye .cctp-art-head label { color: var(--text-muted); }
.cctp-art-envoye textarea { color: var(--text-muted); cursor: not-allowed; }
.cctp-art-envoye input[type="checkbox"] { cursor: not-allowed; }

.cctp-envoi { display: flex; justify-content: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
  .cctp-envoi .btn { width: 100%; justify-content: center; }
  .cctp-art-head label { min-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cctp-tab, .cctp-infos, .cctp-liste-head, .cctp-art { animation: none; }
}

/* ══════════════════════════════
   DOE / Dossier technique — page d'édition complète (assets/js/modules/doe_page_editor.js)
   Page entière (modal plein écran, ou fenêtre du mode bureau - voir bureau.css) pour UN chantier +
   UN contexte : sommaire à gauche (.dpe-sommaire, réutilise les classes .doe-section/.doe-doc-item
   de doe.js), ruban d'outils en haut (.dpe-ribbon), zone centrale (.dpe-stage) qui bascule entre
   l'aperçu complet (.doe-preview-panel, partagé avec dossiers.js) et l'édition d'UNE page - transforme
   (déplace/zoome/tourne) l'image ou la page de PDF importée, et pose des formes et zones de texte
   par-dessus. .dpe-canvas = boîte de la page (voir doe_page_editor.js pour la technique : taille
   pilotée par l'<img> en flux normal, transform séparé donc sans effet sur la taille - les formes en
   % s'alignent sans jamais connaître la résolution réelle de l'image).
   .dpe-canvas/.dpe-shape/.dpe-shape-text sont PARTAGÉES avec le rendu export/aperçu (doe.js
   _doeDocBlockHtml) : tout le reste (.dpe-tools/.dpe-ribbon/.dpe-sommaire/.dpe-canvas-wrap/
   .dpe-handle, .dpe-selbox/.dpe-text-edit) est propre à cette page. .dpe-canvas-wrap n'a pas
   d'overflow caché (contrairement à .dpe-canvas) : les poignées et le cadre de sélection y vivent
   pour rester cliquables même quand une forme déborde de la page.
══════════════════════════════ */
.dpe-modal { width: 96vw; height: 92vh; max-width: none; max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.dpe-head { display: flex; align-items: center; gap: 12px; padding: 14px 56px 12px 20px; border-bottom: 1px solid var(--gb); flex-shrink: 0; }
.dpe-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpe-pagenav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dpe-pagenav:empty { display: none; }
.dpe-zoom { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.dpe-zoom-label {
  font-size: .79rem; color: var(--text-muted); min-width: 3.6em; text-align: center; background: none;
  border: 0; padding: 0 4px; cursor: pointer; font-family: inherit;
}
.dpe-zoom-label:hover { color: var(--text); text-decoration: underline; }
.dpe-pagelabel { font-size: .79rem; color: var(--text-muted); min-width: 90px; text-align: center; }

/* Ruban : vraie barre d'outils horizontale au-dessus du rendu (comme un lecteur PDF), groupes
   separes par .dpe-sep - zoom toujours visible (aperçu ET édition), outils de dessin + options
   contextuelles seulement quand un document est ouvert en édition. Voir _dpeRenderRibbon. */
.dpe-ribbon {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 16px;
  border-bottom: 1px solid var(--gb); background: var(--glass-sb); flex-shrink: 0;
}
.dpe-group { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dpe-sep { width: 1px; height: 26px; background: var(--gb); flex-shrink: 0; }
.dpe-tools { display: flex; gap: 4px; }
.dpe-tool {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.dpe-tool svg { width: 18px; height: 18px; }
.dpe-tool:hover { background: var(--glass-h); color: var(--text); }
.dpe-tool.active { background: var(--accentbg); color: var(--accent); border-color: rgba(146,191,59,.5); }
.dpe-tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Options contextuelles (forme/image sélectionnée) : chip distincte du reste de la barre. */
.dpe-context {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--glass);
  border: 1px solid var(--gb); border-radius: 8px; padding: 5px 12px; animation: repIn .15s ease both;
}
.dpe-row { display: flex; align-items: center; gap: 8px; }
.dpe-hint { font-size: .79rem; color: var(--text-dim); line-height: 1.4; margin: 0; }

.dpe-field { display: flex; align-items: center; gap: 6px; font-size: .79rem; color: var(--text-muted); }
.dpe-field input[type="number"] { width: 60px; }
.dpe-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.dpe-swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gb-hi); cursor: pointer; padding: 0;
  flex-shrink: 0;
}
.dpe-swatch.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.dpe-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dpe-swatch-none {
  background: var(--glass); display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: .79rem; border-style: dashed;
}

.dpe-ribbon-right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dpe-ribbon-right .btn[disabled] { opacity: .4; cursor: default; }
.dpe-savestatus { font-size: .79rem; color: var(--text-dim); min-width: 95px; }

.dpe-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 0; flex: 1; }

.dpe-sommaire {
  overflow-y: auto; padding: 14px; border-right: 1px solid var(--gb); background: var(--glass-sb);
}
.dpe-sommaire .doe-doc-item.doe-doc-active { background: var(--accentbg); border-color: rgba(146,191,59,.5); }

.dpe-stage { min-height: 0; overflow: auto; }
.dpe-stage.dpe-stage-canvas {
  display: flex; align-items: center; justify-content: center; padding: 28px; background: #3a3a3e;
}
.dpe-stage.dpe-stage-pan { cursor: grab; }
.dpe-stage.dpe-stage-pan:active { cursor: grabbing; }
.dpe-stage .doe-preview-panel { height: 100%; max-height: none; box-sizing: border-box; }
.dpe-loading { color: var(--text-muted); font-size: .85rem; padding: 30px; text-align: center; }
.dpe-stage.dpe-stage-canvas .dpe-loading { color: rgba(255,255,255,.6); }

.dpe-canvas-wrap { position: relative; line-height: 0; max-width: 100%; max-height: 100%; }
.dpe-canvas {
  position: relative; overflow: hidden; line-height: 0; max-width: 100%; max-height: 100%; background: #fff;
  box-shadow: 0 4px 30px rgba(0,0,0,.45); animation: repIn .25s ease both;
}
.dpe-img { display: block; width: 100%; height: auto; transform-origin: 50% 50%; user-select: none; -webkit-user-select: none; }

.dpe-shape {
  position: absolute; box-sizing: border-box; transform-origin: 50% 50%; cursor: move; touch-action: none;
}
.dpe-shape-text {
  display: flex; align-items: center; white-space: pre-wrap; overflow: hidden; padding: 2px 6px;
  font-family: inherit; line-height: 1.3; word-break: break-word;
}

.dpe-selbox { position: absolute; border: 1.5px dashed var(--accent); pointer-events: none; transform-origin: 50% 50%; }
.dpe-handle {
  position: absolute; width: 32px; height: 32px; transform: translate(-50%,-50%); pointer-events: auto;
  display: flex; align-items: center; justify-content: center; touch-action: none;
}
.dpe-handle::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.dpe-handle-nw { left: 0; top: 0; cursor: nwse-resize; }
.dpe-handle-ne { left: 100%; top: 0; cursor: nesw-resize; }
.dpe-handle-se { left: 100%; top: 100%; cursor: nwse-resize; }
.dpe-handle-sw { left: 0; top: 100%; cursor: nesw-resize; }
.dpe-handle-rotate { left: 50%; top: -22px; cursor: grab; }
.dpe-handle-rotate:active { cursor: grabbing; }
.dpe-rotate-stick { position: absolute; left: 50%; top: -22px; width: 2px; height: 22px; background: var(--gb-hi); transform: translateX(-50%); pointer-events: none; }
.dpe-handle:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }

.dpe-text-edit {
  position: absolute; resize: none; border: 1.5px dashed var(--accent); background: var(--modal-bg);
  font-family: inherit; padding: 2px 6px; outline: none; box-sizing: border-box; line-height: 1.3;
}

@media (max-width: 860px) {
  .dpe-modal { width: 100vw; height: 100vh; }
  .dpe-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .dpe-sommaire { border-right: 0; border-bottom: 1px solid var(--gb); max-height: 38vh; }
  .dpe-stage { min-height: 40vh; }
  .dpe-head { flex-wrap: wrap; padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .dpe-section, .dpe-canvas { animation: none; }
}

/* ══════════════════════════════
   MODE MAINTENANCE (maintenance.js)
   Écran plein pour les employés, bandeau pour admin/gérant, carte Admin > Mises à jour
══════════════════════════════ */
.maint-ecran {
  position: fixed; inset: 0; z-index: 2147483000; /* au-dessus de tout, y compris scanners plein écran (99999) */
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--bg, #0d0e11); color: var(--text);
  animation: maintFondIn .3s ease both; outline: none;
}
.maint-carte {
  max-width: 520px; width: 100%; text-align: center; padding: 32px 24px;
  background: var(--modal-bg); border: 1px solid var(--gb-hi); border-radius: 26px; box-shadow: var(--sh-lg);
  animation: maintCarteIn .45s cubic-bezier(.22,1,.36,1) .05s both;
}
.maint-icone {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accentbg); color: var(--accent); font-size: 1.6rem;
}
.maint-icone svg { width: 30px; height: 30px; }
.maint-titre { font-size: 1.4rem; font-weight: 800; margin: 0 0 10px; }
.maint-msg { font-size: 1rem; line-height: 1.5; margin: 0 0 12px; color: var(--text); }
.maint-note { font-size: .85rem; line-height: 1.5; margin: 0; color: var(--text-muted); }
.maint-attente { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.maint-attente span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: maintPoint 1.2s ease-in-out infinite; }
.maint-attente span:nth-child(2) { animation-delay: .15s; }
.maint-attente span:nth-child(3) { animation-delay: .3s; }
.maint-bandeau {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 9500;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 32px); padding: 7px 8px 7px 14px; border-radius: 999px;
  background: #FF9F0A; color: #1a1000; font-size: .85rem; box-shadow: var(--sh-lg); /* fixe : contraste AA dans les deux thèmes */
  animation: maintBandeauIn .35s cubic-bezier(.22,1,.36,1) both;
}
.maint-bandeau-txt { display: inline-flex; align-items: center; gap: 6px; }
.maint-bandeau-txt svg { width: 15px; height: 15px; }
.maint-bandeau-btn { background: #1a1000; color: #fff; border: 0; border-radius: 999px; padding: 5px 12px; }
.maint-bandeau-btn:hover, .maint-bandeau-btn:focus-visible { background: #000; color: #fff; }
.maint-etat { font-size: .85rem; font-weight: 600; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; }
.maint-etat-on { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange); }
.maint-etat-off { background: var(--accentbg); color: var(--accent); border: 1px solid var(--gb); }
.maint-label { display: block; font-size: .79rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.maint-admin textarea { width: 100%; box-sizing: border-box; resize: vertical; }
@keyframes maintFondIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes maintCarteIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes maintBandeauIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes maintBandeauInMobile { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes maintPoint { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@media (max-width: 640px) {
  .maint-bandeau { top: auto; bottom: 86px; left: 16px; right: 16px; transform: none; max-width: none; border-radius: 12px; justify-content: space-between; animation-name: maintBandeauInMobile; }
  .maint-bandeau-txt { display: block; flex: 1 1 180px; }
  .maint-carte { padding: 26px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .maint-ecran, .maint-carte, .maint-bandeau, .maint-attente span { animation: none; }
}

/* ── Fiches poseurs (poseurs.js) : cartes = vrais boutons, initiales via contrastInk ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes fpEntree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fp-carte {
  display: flex; flex-direction: column; gap: 10px; width: 100%; min-height: 44px;
  font: inherit; color: var(--text); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  animation: fpEntree .22s cubic-bezier(.22,1,.36,1) backwards; animation-delay: var(--fp-delai, 0ms);
}
.fp-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fp-carte:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .fp-carte:hover { border-color: var(--accent); } }
.fp-entete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fp-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: var(--fs-base);
}
.fp-avatar--grand { width: 42px; height: 42px; font-size: var(--fs-md); }
.fp-ident { display: flex; flex-direction: column; min-width: 0; }
.fp-nom { font-weight: 700; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-poste { font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
.fp-statut { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; }
.fp-statut--libre { color: var(--text-muted); }
.fp-statut--afaire { color: var(--blue); }
.fp-statut--encours { color: var(--orange); }
.fp-statut--fini { color: var(--accent); }
.fp-barre { display: block; height: 5px; border-radius: 3px; background: var(--gb); overflow: hidden; }
.fp-barre-rempli {
  display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--accent);
  transform-origin: left center; transform: scaleX(var(--fp-p, 0)); transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.fp-semaine { margin-bottom: 20px; animation: fpEntree .22s cubic-bezier(.22,1,.36,1) backwards; }
.fp-semaine-titre {
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--gb);
}
.fp-compte { font-weight: 400; text-transform: none; letter-spacing: 0; }
.fp-jour { margin-bottom: 10px; }
.fp-jour-titre { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.fp-jour-titre--auj { color: var(--accent); }
.fp-missions { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.fp-mission {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--glass); border: 1px solid var(--gb);
}
.fp-mission--faite { background: var(--accentbg); border-color: var(--accent); }
.fp-coche {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--gb-hi);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
}
.fp-mission--faite .fp-coche { border-color: var(--accent); }
.fp-mission-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); }
.fp-heure { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.fp-ligne { color: var(--text-muted); overflow-wrap: anywhere; }
.fp-desc { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.fp-mission--faite .fp-desc { font-weight: 500; text-decoration: line-through; color: var(--text-muted); }
.fp-fait-a { color: var(--text-muted); }
.fp-photo {
  align-self: flex-start; margin-top: 6px; padding: 0; border: 1px solid var(--gb); border-radius: 8px;
  background: none; cursor: zoom-in; overflow: hidden; line-height: 0; min-width: 44px; min-height: 44px;
}
.fp-photo img { max-height: 80px; max-width: 100%; display: block; }
.fp-photo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Photos de chantier (chantier_photos.js) : envoi rapide, Mes photos, onglet Galerie, visionneuse */
.mm-photos { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-bottom: 10px; border-radius: 12px; border: 1px solid var(--gb-hi); background: var(--glass); color: var(--text); font-size: var(--fs-base); font-weight: 700; cursor: pointer; }
.mm-photos:hover, .mm-photo:hover { background: var(--glass-h); }
.mm-photos .ic, .mm-photo .ic { color: var(--accent); }
.mm-photo { flex-shrink: 0; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 12px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); cursor: pointer; }
.mm-lock + .mm-photo { margin-left: 0; }
@keyframes cp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cp-enter .cp-a { animation: cp-in .22s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i,0) * 30ms); }
.cp-page { max-width: 1100px; margin: 0 auto; padding: 12px 12px 100px; }
.cp-page :focus-visible, .cp-gal :focus-visible, .cp-envoi :focus-visible, .cp-vis :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cp-head .page-title { margin: 0; }
.cp-head-btn, .cp-add { min-height: 44px; gap: 8px; }
.cp-off { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 0 10px; border-radius: 12px; background: var(--glass-sb); border: 1px dashed var(--gb-hi); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; }
.cp-chargement { padding: 24px 4px; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.cp-vide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 44px 20px; border: 1px dashed var(--gb-hi); border-radius: 12px; background: var(--glass-sb); }
.cp-vide .ic { width: 34px; height: 34px; color: var(--text-muted); }
.cp-vide h3 { font-size: var(--fs-md); margin: 0; }
.cp-vide p { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.cp-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cp-jour { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 0; font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.cp-jour:first-child { margin-top: 0; }
.cp-jour span { font-weight: 600; color: var(--text-muted); overflow-wrap: anywhere; }
.cp-tile { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--glass); border: 1px solid var(--gb); }
.cp-open { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--surface2); cursor: zoom-in; }
.cp-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-src { padding: 5px 8px; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-mini { position: absolute; top: 4px; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(0,0,0,.62); color: #fff; cursor: pointer; }
.cp-mini .ic { width: 18px; height: 18px; }
.cp-del { right: 4px; }
.cp-orig { left: 4px; }
.cp-del:hover { background: var(--red); }
.cp-orig:hover { background: rgba(0,0,0,.8); }
.cp-plus { display: flex; justify-content: center; padding: 16px 0; }
.cp-plus .btn { min-height: 44px; }
.cp-gal-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cp-filtres { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-filtre { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--gb); background: var(--glass); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.cp-filtre span { margin-left: 2px; font-weight: 700; }
.cp-filtre:hover { background: var(--glass-h); color: var(--text); }
.cp-filtre[aria-pressed="true"] { background: var(--accentbg); color: var(--accent); border-color: var(--accent); }
.cp-envoi-body { display: flex; flex-direction: column; gap: 12px; }
.cp-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); margin-bottom: -6px; }
.cp-envoi select { width: 100%; min-height: 48px; font-size: var(--fs-md); }
.cp-fixe { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); font-size: var(--fs-md); font-weight: 700; overflow-wrap: anywhere; }
.cp-fixe .ic { color: var(--accent); flex-shrink: 0; }
.cp-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 120px; border-radius: 12px; border: 2px dashed var(--accent); background: var(--accentbg); color: var(--accent); font-size: var(--fs-md); font-weight: 700; cursor: pointer; }
.cp-pick .ic { width: 34px; height: 34px; }
.cp-pick:hover { background: var(--glass-h); }
.cp-pick:disabled, .cp-send:disabled { opacity: .55; cursor: not-allowed; }
.cp-previews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.cp-prev { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--gb-hi); animation: cp-in .2s ease both; }
.cp-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-prev .upfb--overlay.is-err { justify-content: flex-end; padding-bottom: 8px; }
.cp-prev .upfb--compact.is-err { justify-content: center; align-items: flex-end; }
.cp-prev-x { position: absolute; top: 0; right: 0; z-index: 4; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 0 0 0 12px; background: rgba(0,0,0,.62); color: #fff; cursor: pointer; }
.cp-statut { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.cp-statut.is-err { color: var(--red); font-weight: 600; }
.cp-send { width: 100%; min-height: 54px !important; justify-content: center; gap: 10px; font-size: var(--fs-md); border-radius: 12px; }
.cp-vis { padding: 0; background: rgba(0,0,0,.92); }
.cp-vis-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100vw; animation: cp-in .2s ease both; }
.cp-vis-fig img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.cp-vis-fig figcaption { padding: 0 16px; text-align: center; color: #fff; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.cp-vis-btn { position: absolute; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.55); color: #fff; font-size: var(--fs-xl); line-height: 1; cursor: pointer; z-index: 1; }
.cp-vis-btn:hover { background: rgba(255,255,255,.18); }
.cp-vis-btn:disabled { opacity: .3; cursor: default; }
.cp-vis-fermer { top: 14px; right: 14px; }
.cp-vis-prec { left: 14px; top: 50%; transform: translateY(-50%); }
.cp-vis-suiv { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .cp-grille { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .cp-tile { border-radius: 8px; }
  .cp-src { display: none; }
  .cp-head-btn { width: 100%; justify-content: center; }
  .cp-vis-prec, .cp-vis-suiv { top: auto; bottom: 18px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-enter .cp-a, .cp-prev, .cp-vis-fig { animation: none; }
}
html.perf-lite .cp-enter .cp-a { animation: none; }

/* ── Planning équipe ──
   Écran bureau des missions des poseurs (planning_equipe.js, section #section-planning-semaine)
   et panneau latéral #modal-pe-mission. Maquette validée : _local/maquettes/planning-equipe.html.
   Les champs gardent la règle globale (fond, bordure, rayon, flèche des listes). */
@keyframes pe-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pe-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
@keyframes pe-sheet { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pe-drawer { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.pe-page { position: relative; width: 100%; max-width: 1680px; margin: 0 auto; padding: 16px 14px 100px; }
.pe-page [hidden], .pe-panel [hidden] { display: none !important; }
.pe-page :focus-visible, .pe-panel :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pe-page .btn { min-height: 40px; }
.pe-page button:disabled { cursor: not-allowed; }
.pe-i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pe-i.sm { width: 13px; height: 13px; }
.pe-enter .pe-anim { animation: pe-in .22s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i, 0) * 30ms); }
.pe-top { animation: pe-in .2s cubic-bezier(.22,1,.36,1) both; }
.pe-top--2 { animation-delay: 40ms; }
.pe-top--3 { animation-delay: 70ms; }
.pe-top--4 { animation-delay: 100ms; }

.pe-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.pe-title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.01em; margin-right: auto; }
.pe-weeknav { display: flex; align-items: center; gap: 6px; }
.pe-week-label { font-weight: 600; font-size: var(--fs-base); text-align: center; padding: 0 4px; }
.pe-week-label small { color: var(--text-muted); font-weight: 500; font-size: var(--fs-sm); }
.pe-ibtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); cursor: pointer; transition: background .18s, border-color .18s; }
.pe-ibtn:hover { background: var(--glass-h); border-color: var(--gb-hi); }
.pe-ibtn:active { transform: scale(.95); }
.pe-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pe-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); }
.pe-seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background .18s, color .18s; }
.pe-seg button:hover:not(:disabled) { color: var(--text); }
.pe-seg button[aria-pressed="true"] { background: var(--accentbg); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pe-seg button:disabled { opacity: .45; }
.pe-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pe-sel { width: auto; min-width: 150px; max-width: 100%; min-height: 40px; font-size: var(--fs-sm); }
.pe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pe-summary { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 10px; }
.pe-summary b { color: var(--text); }
.pe-alert { display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-weight: 600; }
.pe-daybar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.pe-daybar button { min-height: 44px; min-width: 76px; padding: 4px 12px; border-radius: 12px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: var(--fs-xs); line-height: 1.2; cursor: pointer; }
.pe-daybar button b { font-size: var(--fs-md); }
.pe-daybar button[aria-pressed="true"] { border-color: var(--accent); background: var(--accentbg); color: var(--accent); }
.pe-daybar button.is-today span::after { content: " \00b7  auj."; }

.pe-reprise { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accentbg); animation: pe-in .22s cubic-bezier(.22,1,.36,1) both; }
.pe-reprise-t { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; font-size: var(--fs-sm); }
.pe-reprise-t .pe-i { color: var(--accent); }
.pe-reprise-a { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-reprise-d { flex-basis: 100%; display: grid; gap: 6px; font-size: var(--fs-sm); }
.pe-reprise-d ul { padding-left: 18px; display: grid; gap: 2px; }

.pe-wrap { overflow: auto; max-height: min(74vh, 820px); border: 1px solid var(--gb); border-radius: 12px; background: var(--bg2); box-shadow: var(--sh); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pe-grid { display: grid; }
.pe-row { display: contents; }
.pe-week { grid-template-columns: 176px repeat(6, minmax(136px, 1fr)); min-width: calc(176px + 6 * 136px); }
.pe-ch { grid-template-columns: 230px repeat(6, minmax(116px, 1fr)); min-width: calc(230px + 6 * 116px); }
.pe-hd, .pe-ph { background: var(--bg2); }
.pe-hd { position: sticky; top: 0; z-index: 3; padding: 10px 8px; text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--gb-hi); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.pe-hd b { font-size: var(--fs-lg); color: var(--text); line-height: 1.1; }
.pe-hd em { font-style: normal; font-size: var(--fs-xs); color: var(--accent); font-weight: 700; }
.pe-hd.is-today { background: linear-gradient(var(--accentbg), var(--accentbg)), var(--bg2); box-shadow: inset 0 -2px 0 var(--accent); }
.pe-corner { left: 0; z-index: 5; align-items: flex-start; text-align: left; padding-left: 14px; }
.pe-ph { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--gb); border-right: 1px solid var(--gb-hi); min-width: 0; }
.pe-ph-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pe-ph-t b { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-ph-t span { font-size: var(--fs-xs); color: var(--text-muted); }
.pe-av { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; flex-shrink: 0; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--bg2); }
.pe-av.lg { --s: 40px; font-size: var(--fs-base); }
.pe-av.xs { --s: 24px; }

.pe-cell { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 8px; min-height: 68px; border-bottom: 1px solid var(--gb); border-right: 1px solid var(--gb); transition: background .15s, box-shadow .15s; }
.pe-cell.is-today { background: var(--accentbg); }
.pe-cell.is-target, .pe-hc.is-target { background: var(--accentbg); box-shadow: inset 0 0 0 2px var(--accent); }
.pe-dens-d .pe-cell { min-height: 104px; }
.pe-ch .pe-cell { min-height: 56px; }
.pe-count { align-self: flex-end; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; order: -1; line-height: 1; }
.pe-count.is-all { color: var(--green); }
.pe-libre { margin: auto; font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: .02em; }
.pe-off { margin: auto; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; color: var(--orange); }
.pe-cell.is-off, .pe-hc.is-off { background: repeating-linear-gradient(135deg, transparent 0 7px, var(--gb) 7px 9px); }
.pe-add { position: absolute; right: 4px; bottom: 4px; width: 30px; height: 30px; border-radius: 8px; border: 1px dashed var(--gb-hi); background: var(--bg2); color: var(--text-muted); display: grid; place-items: center; opacity: 0; cursor: pointer; transition: opacity .15s, color .15s, border-color .15s; }
.pe-cell:hover .pe-add, .pe-add:focus-visible, .pe-cell:focus-within .pe-add { opacity: 1; }
.pe-add:hover { color: var(--accent); border-color: var(--accent); }
@media (hover: none) { .pe-add { opacity: .75; width: 44px; height: 44px; } }

.pe-chip { display: flex; align-items: center; gap: 5px; width: 100%; min-height: 28px; padding: 3px 8px; border-radius: 8px; border: 1.5px solid var(--bd); background: var(--c); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pe-chip:hover { box-shadow: var(--sh-sm); }
.pe-chip.is-done { background: transparent; color: var(--text); }
.pe-chip.is-done .pe-ok, .pe-pc.is-done .pe-ok { color: var(--green); }
.pe-chip-t { font-variant-numeric: tabular-nums; font-family: 'DM Mono', monospace; font-weight: 500; }
.pe-chip-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-chip.is-conflict, .pe-mc.is-conflict, .pe-pc.is-conflict { outline: 2px solid var(--red); outline-offset: 1px; }
.pe-chip[draggable="true"], .pe-mc[draggable="true"] { cursor: grab; }
.is-drag { opacity: .4; }

.pe-mc { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 6px; width: 100%; text-align: left; padding: 7px 8px 7px 12px; border-radius: 8px; background: var(--glass); border: 1px solid var(--gb); color: var(--text); cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.pe-mc::before { content: ""; position: absolute; left: 4px; top: 7px; bottom: 7px; width: 4px; border-radius: 4px; background: var(--bd); }
.pe-mc:hover { background: var(--glass-h); box-shadow: var(--sh-sm); }
.pe-mc-grip { color: var(--text-muted); padding-top: 1px; margin-left: 2px; }
.pe-mc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pe-mc-top { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; min-width: 0; }
.pe-mc-h { font-family: 'DM Mono', monospace; font-size: var(--fs-xs); font-weight: 500; color: var(--text); }
.pe-mc-n { font-size: var(--fs-xs); font-weight: 700; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.pe-mc-d { font-size: var(--fs-xs); color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.pe-mc-meta { display: flex; gap: 6px; align-items: center; color: var(--text-muted); font-size: var(--fs-xs); flex-wrap: wrap; }
.pe-bad { color: var(--red); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.pe-mc-st { padding-top: 1px; color: var(--text-muted); }
.pe-mc.is-done .pe-mc-st { color: var(--green); }
.pe-mc.is-done .pe-mc-d { text-decoration: line-through; text-decoration-color: var(--gb-hi); }
.pe-mc--ro, .pe-mc--sm { grid-template-columns: minmax(0, 1fr) auto; padding-left: 14px; }
.pe-mc--sm .pe-mc-d { -webkit-line-clamp: 1; }
.pe-mc--sm .pe-mc-grip { display: none; }
.pe-mc--lg { min-height: 56px; }

.pe-hc { display: flex; flex-direction: column; gap: 5px; padding: 6px; min-height: 54px; border-bottom: 1px solid var(--gb); border-right: 1px solid var(--gb); position: relative; transition: background .15s, box-shadow .15s; }
.pe-hl { position: sticky; left: 0; z-index: 2; background: var(--bg2); padding: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--gb); border-right: 1px solid var(--gb-hi); font-family: 'DM Mono', monospace; text-align: right; }
.pe-hl.is-noh { font-family: inherit; text-align: left; line-height: 1.2; color: var(--orange); }
.pe-slot { position: absolute; inset: 0; border: 0; background: transparent; color: transparent; display: grid; place-items: center; border-radius: 8px; cursor: pointer; }
.pe-slot:hover { background: var(--accentbg); color: var(--accent); }
.pe-day { grid-template-columns: 70px repeat(var(--n), minmax(164px, 1fr)); min-width: calc(70px + var(--n) * 164px); }
.pe-day .pe-hd { flex-direction: row; justify-content: flex-start; gap: 8px; text-align: left; padding: 8px 10px; }
.pe-day .pe-corner { justify-content: flex-end; padding: 8px; }

.pe-pc { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 2px 8px 2px 3px; border-radius: 999px; border: 1px solid var(--gb-hi); background: var(--glass); color: var(--text); font-size: var(--fs-xs); font-weight: 600; font-family: 'DM Mono', monospace; cursor: pointer; }
.pe-pc:hover { background: var(--glass-h); }
.pe-pc.is-done { border-color: var(--green); }
.pe-cell.is-wrap { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
.pe-dep-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--glass-a); flex-shrink: 0; }
.pe-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin: 0 10px; }

.pe-list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.pe-list-actions span { margin-right: auto; font-size: var(--fs-sm); color: var(--text-muted); }
.pe-list-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.pe-table { width: 100%; border-collapse: collapse; min-width: 800px; font-size: var(--fs-sm); }
.pe-table th { position: sticky; top: 0; z-index: 2; background: var(--bg2); text-align: left; border-bottom: 1px solid var(--gb-hi); padding: 0; }
.pe-th { width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--text-muted); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; text-align: left; cursor: pointer; }
.pe-th:hover, .pe-th.is-sorted { color: var(--text); }
.pe-table td { padding: 10px 12px; border-bottom: 1px solid var(--gb); vertical-align: middle; }
.pe-table tr:hover td { background: var(--glass); }
.pe-link { border: 0; background: transparent; color: var(--text); text-align: left; font-size: var(--fs-sm); padding: 6px 0; min-height: 36px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--gb-hi); text-underline-offset: 3px; }
.pe-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.pe-who { display: inline-flex; align-items: center; gap: 8px; }
.pe-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.pe-badge.ok { background: var(--green-bg); color: var(--green); }
.pe-badge.todo { background: var(--glass-h); color: var(--text); }
.pe-badge.bad { background: var(--red-bg); color: var(--red); }
.pe-mono { font-family: 'DM Mono', monospace; }

.pe-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 14px; font-size: var(--fs-xs); color: var(--text-muted); }
.pe-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pe-legend .sw { width: 26px; height: 16px; border-radius: 4px; display: inline-block; }
.pe-legend .sw.todo { background: var(--accent); }
.pe-legend .sw.done { border: 1.5px solid var(--accent); }
.pe-legend .sw.conf { border: 1.5px solid var(--text-muted); outline: 2px solid var(--red); outline-offset: 1px; }
.pe-legend .sw.off { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--gb-hi) 4px 6px); border: 1px solid var(--gb); }

.pe-msg { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 20px; border: 1px dashed var(--gb-hi); border-radius: 12px; background: var(--glass-sb); }
.pe-msg h3 { font-size: var(--fs-lg); }
.pe-msg p { color: var(--text-muted); font-size: var(--fs-sm); max-width: 44ch; }
.pe-msg .pe-i { width: 32px; height: 32px; color: var(--text-muted); }
.pe-msg .btn .pe-i { width: 16px; height: 16px; color: inherit; }
.pe-msg.err .pe-i { color: var(--red); }
.pe-msg .btn-row { justify-content: center; }
.pe-skel { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--gb); border-radius: 12px; background: var(--bg2); }
.pe-skel i { display: block; height: 44px; border-radius: 8px; background: var(--glass-h); animation: pe-pulse 1.2s ease-in-out infinite; }
.pe-skel i:nth-child(2n) { animation-delay: .15s; }

.pe-cards { display: none; }
.pe-pcard { border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); margin-bottom: 12px; overflow: hidden; }
.pe-pcard > header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--gb); }
.pe-pcard details { border-bottom: 1px solid var(--gb); }
.pe-pcard details:last-child { border-bottom: 0; }
.pe-pcard summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.pe-pcard summary::-webkit-details-marker { display: none; }
.pe-pcard summary .chev { margin-left: auto; transition: transform .2s; }
.pe-pcard details[open] summary .chev { transform: rotate(180deg); }
.pe-pcard details.is-today summary { background: var(--accentbg); color: var(--accent); }
.pe-pcard .body { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 12px; }
.pe-pcard .body .pe-libre, .pe-pcard .body .pe-off { margin: 8px auto; }
.pe-pcard .pe-cnt { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; }
.pe-pcard details.is-off .pe-cnt { color: var(--orange); }
.pe-add-m { min-height: 44px; justify-content: center; }

.pe-overlay { padding: 0; align-items: flex-end; justify-content: center; overflow: hidden; }
.pe-panel { display: flex; flex-direction: column; width: 100%; max-height: 94vh; background: var(--modal-bg); border: 1px solid var(--gb-hi); box-shadow: var(--sh-lg); border-radius: 20px 20px 0 0; }
.pe-overlay.open .pe-panel { animation: pe-sheet .22s cubic-bezier(.22,1,.36,1) both; }
.pe-panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--gb); }
.pe-panel h2 { font-size: var(--fs-lg); margin-right: auto; }
.pe-panel form { flex: 1; min-height: 0; overflow: auto; padding: 16px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.pe-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pe-panel .l { display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
.pe-field { min-height: 44px; font-size: var(--fs-base); }
textarea.pe-field { min-height: 84px; resize: vertical; }
.pe-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-base); margin-bottom: 13px; cursor: pointer; }
.pe-check input { width: 20px; height: 20px; flex-shrink: 0; }
.pe-panel .dropzone { padding: 16px; }
.pe-pj { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-sm); }
.pe-pj a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); overflow-wrap: anywhere; }
.pe-fait { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); }
.pe-fait-l { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 200px; font-size: var(--fs-sm); font-weight: 600; }
.pe-fait-l.is-done { color: var(--green); }
.pe-fait-aide { flex-basis: 100%; font-size: var(--fs-xs); color: var(--text-muted); }
.pe-photo { padding: 0; border: 1px solid var(--gb); border-radius: 8px; background: none; cursor: zoom-in; overflow: hidden; line-height: 0; min-width: 44px; min-height: 44px; }
.pe-photo img { display: block; max-height: 72px; max-width: 120px; }
.pe-panel .btn-row { position: sticky; bottom: 0; margin: 6px -16px -16px; padding: 12px 16px 16px; background: var(--modal-bg); border-top: 1px solid var(--gb); }
.pe-panel .btn-row .grow { margin-left: auto; }
.pe-panel .btn { min-height: 44px; }
.pe-err { flex-basis: 100%; color: var(--red); font-size: var(--fs-xs); font-weight: 600; }
.pe-err:empty { display: none; }

@media (min-width: 641px) {
  .pe-overlay { align-items: stretch; justify-content: flex-end; }
  .pe-panel { width: min(440px, 100vw); height: 100%; max-height: none; border-radius: 0; border-width: 0 0 0 1px; }
  .pe-overlay.open .pe-panel { animation-name: pe-drawer; }
}
@media (max-width: 1100px) { .pe-actions { margin-left: 0; } }
@media (max-width: 640px) {
  .pe-page { padding: 12px 10px 100px; }
  .pe-head { gap: 8px; }
  .pe-title { flex: 1 1 0; font-size: var(--fs-lg); }
  .pe-weeknav { flex: 1 0 100%; justify-content: space-between; }
  .pe-ibtn, .pe-seg button, .pe-sel, .pe-page .btn { min-height: 44px; }
  .pe-ibtn { width: 44px; height: 44px; }
  .pe-seg { flex: 1 0 100%; overflow-x: auto; }
  .pe-seg button { flex: 1; justify-content: center; padding: 0 8px; }
  .pe-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pe-filters .pe-sel { width: 100%; min-width: 0; }
  .pe-actions { width: 100%; }
  .pe-actions .btn { flex: 1; justify-content: center; }
  .pe-week-cardmode .pe-wrap { display: none; }
  .pe-week-cardmode .pe-cards { display: block; }
  .pe-wrap { max-height: none; }
  .pe-two { grid-template-columns: 1fr; }
  .pe-pc, .pe-link { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .pe-enter .pe-anim, .pe-top, .pe-reprise, .pe-overlay.open .pe-panel, .pe-skel i { animation: none; }
  .pe-chip, .pe-mc, .pe-pcard summary .chev { transition: none; }
}
html.perf-lite .pe-skel i { animation: none; }
@media print { .pe-bar, .pe-weeknav, .pe-legend, .pe-reprise, .pe-list-actions, .pe-add, .pe-slot { display: none !important; } }
@media (max-width:640px) {
  #section-planning-semaine .pe-bar .btn, #section-planning-semaine .pe-bar select, #section-planning-semaine .pe-weeknav .btn { min-height: 44px !important; }
}

/* ════════ MA JOURNÉE / MA SEMAINE (vue poseur, ma_journee.js) ════════ */
@keyframes mm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mm-page { max-width: 560px; margin: 0 auto; padding: 12px 12px 100px; }
.mm-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mm-page .ic { width: 18px; height: 18px; flex-shrink: 0; }
.mm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin-bottom: 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); }
.mm-tabs button { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: var(--fs-base); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; transition: background .18s, color .18s; }
.mm-tabs button[aria-selected="true"] { background: var(--accentbg); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mm-enter .mm-a { animation: mm-in .22s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i,0) * 40ms); }
.mm-datebar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mm-datebar > div { flex: 1; text-align: center; min-width: 0; }
.mm-datebar b { display: block; font-size: var(--fs-md); }
.mm-datebar span { font-size: var(--fs-xs); color: var(--text-muted); }
.mm-ibtn { flex-shrink: 0; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--gb); background: var(--glass); color: var(--text); cursor: pointer; }
.mm-ibtn:hover { background: var(--glass-h); }
.mm-ibtn .ic { transform: rotate(90deg); }
.mm-ibtn.mm-next .ic, .mm-go-ico .ic { transform: rotate(-90deg); }
.mm-today { display: block; width: 100%; min-height: 44px; margin-bottom: 12px; border: 1px solid var(--gb); border-radius: 12px; background: var(--glass); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.mm-today:hover { background: var(--glass-h); color: var(--text); }
.mm-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: var(--accentbg); color: var(--accent) !important; }
.mm-off, .mm-alerte { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; font-size: var(--fs-sm); font-weight: 600; }
.mm-off { background: var(--glass-sb); border: 1px dashed var(--gb-hi); color: var(--text-muted); }
.mm-alerte { background: var(--orange-bg); color: var(--orange); }
.mm-sum { margin-bottom: 12px; }
.mm-sum p { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; margin: 0 0 6px; }
.mm-sum p.all { color: var(--green); }
.mm-track { height: 8px; border-radius: 8px; background: var(--glass-h); overflow: hidden; }
.mm-track i { display: block; height: 100%; border-radius: 8px; background: var(--accent); transform-origin: left; transition: transform .35s cubic-bezier(.22,1,.36,1); }

.mm-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-bottom: 10px; border-radius: 12px; background: var(--glass); border: 1px solid var(--gb); }
.mm-row { display: flex; gap: 12px; align-items: flex-start; }
.mm-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-base); flex-shrink: 0; background: var(--accent); color: var(--on-accent); }
.mm-main { flex: 1; min-width: 0; }
.mm-time { font-family: 'DM Mono', monospace; font-size: var(--fs-sm); color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.mm-time .ic { width: 14px; height: 14px; }
.mm-chan { font-size: var(--fs-md); font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.mm-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.mm-dot-ico { width: auto; height: auto; border-radius: 0; color: var(--text-muted); display: inline-flex; }
.mm-dot-ico .ic { width: 14px; height: 14px; }
.mm-desc { font-size: var(--fs-base); color: var(--text); margin: 4px 0 0; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-line; }
.mm-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mm-card.is-verrouillee { opacity: .62; background: var(--glass-sb); }
.mm-card.is-verrouillee .mm-num { background: var(--glass-h); color: var(--text-muted); }
.mm-card.is-faite { background: var(--glass-sb); }
.mm-card.is-faite .mm-num { background: var(--green-bg); color: var(--green); }
.mm-card.is-faite .mm-chan, .mm-card.is-faite .mm-desc { text-decoration: line-through; text-decoration-color: var(--text-muted); color: var(--text-muted); }
.mm-lock { margin-left: auto; color: var(--text-muted); flex-shrink: 0; padding-top: 2px; }
.mm-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--gb-hi); }
.mm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.mm-req, .mm-wait { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: var(--fs-xs); }
.mm-req { background: var(--orange-bg); color: var(--orange); }
.mm-wait { background: var(--blue-bg); color: var(--blue); }
.mm-req .ic, .mm-wait .ic { width: 14px; height: 14px; }
.mm-route { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--gb-hi); background: var(--glass); color: var(--text); font-size: var(--fs-sm); line-height: 1.3; text-align: left; cursor: pointer; }
.mm-route .ic { color: var(--blue); }
.mm-route:hover { background: var(--glass-h); }
.mm-route small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.mm-pj { min-height: 44px; width: 100%; justify-content: flex-start; gap: 8px; border-radius: 12px; text-decoration: none; }
.mm-go { width: 100%; min-height: 54px !important; font-size: var(--fs-md); justify-content: center; gap: 10px; border-radius: 12px; cursor: pointer; }
.mm-go:disabled { opacity: .6; cursor: progress; }

.mm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 44px 20px; border: 1px dashed var(--gb-hi); border-radius: 12px; background: var(--glass-sb); }
.mm-empty .ic { width: 34px; height: 34px; color: var(--text-muted); }
.mm-empty h2 { font-size: var(--fs-md); margin: 0; }
.mm-empty p { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.mm-empty.off .ic, .mm-empty.off h2 { color: var(--orange); }

.mm-day { margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--gb); background: var(--glass); overflow: hidden; }
.mm-day.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mm-dh { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 14px; border: 0; background: transparent; color: var(--text); text-align: left; font-size: var(--fs-base); font-weight: 700; cursor: pointer; }
.mm-dh:hover { background: var(--glass-h); }
.mm-day.is-today .mm-dh { background: var(--accentbg); color: var(--accent); }
.mm-cnt { margin-left: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); }
.mm-cnt.ok { color: var(--green); }
.mm-cnt.off { color: var(--orange); }
.mm-go-ico { display: inline-flex; color: var(--text-muted); }
.mm-ml { list-style: none; margin: 0; padding: 2px 14px 10px; }
.mm-ml li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: start; padding: 9px 0; border-top: 1px solid var(--gb); }
.mm-ml li:first-child { border-top: 0; }
.mm-ml .t { font-family: 'DM Mono', monospace; font-size: var(--fs-sm); color: var(--text-muted); padding-top: 1px; }
.mm-ml .c { font-size: var(--fs-sm); font-weight: 700; display: flex; align-items: center; gap: 6px; line-height: 1.3; overflow-wrap: anywhere; }
.mm-ml .d { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.35; margin-top: 2px; overflow-wrap: anywhere; }
.mm-ml .s { color: var(--text-muted); padding-top: 2px; display: flex; gap: 6px; }
.mm-ml .s .ic { width: 15px; height: 15px; }
.mm-ml li.is-done .c, .mm-ml li.is-done .d { text-decoration: line-through; }
.mm-ml li.is-done .s .st { color: var(--green); }
.mm-free { padding: 2px 14px 14px; margin: 0; font-size: var(--fs-sm); color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.mm-free.off { color: var(--orange); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .mm-enter .mm-a { animation: none; }
  .mm-track i, .mm-tabs button { transition: none; }
}
html.perf-lite .mm-enter .mm-a { animation: none; }

/* Fiches poseurs (lot 5) : chargement de l'historique et photo en grand */
.fp-chargement { padding: 24px 4px; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.fp-visionneuse { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.85); cursor: zoom-out; animation: mm-in .18s ease both; }
.fp-visionneuse img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.fp-visionneuse:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .fp-visionneuse { animation: none; } }
.fp-qui { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }
.fp-equipe-resume { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }

/* Réunions : nom de la photo ("Photo 1"...), cliquable pour renommer */
.rn-photo-nom { width: 90px; background: none; border: 0; padding: 2px 0; font-size: .79rem; color: var(--text-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-radius: 4px; }
.rn-photo-nom:hover { color: var(--accent); text-decoration: underline; }
.rn-photo-nom:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Réunions : fenêtre d'envoi du compte rendu par mail */
.rn-mail-objet { font-size: .85rem; font-weight: 600; padding: 8px 10px; border-radius: 8px; background: var(--glass); border: 1px solid var(--gb); word-break: break-word; }
.rn-mail-membres { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.rn-mail-membre { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: .85rem; }
.rn-mail-membre:hover { background: var(--glass); }
.rn-mail-membre input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* Remontées : bouton "Signaler" des messages d'erreur, fenêtre Signaler, bouton du profil */
.toast-signaler { flex-shrink: 0; background: var(--glass); border: 1px solid var(--gb); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: .79rem; font-weight: 600; cursor: pointer; }
.toast-signaler:hover { border-color: var(--accent); color: var(--accent); }
.toast-signaler:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sig-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sig-type { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--gb); border-radius: 8px; cursor: pointer; background: var(--glass); transition: border-color .15s, background .15s; }
.sig-type input { position: absolute; opacity: 0; pointer-events: none; }
.sig-type:has(input:checked) { border-color: var(--accent); background: var(--accentbg); }
.sig-type:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.sig-type-nom { font-size: .85rem; font-weight: 700; }
.sig-type-aide { font-size: .79rem; color: var(--text-muted); }
.sig-technique { font-size: .79rem; color: var(--text-muted); background: var(--glass); border: 1px dashed var(--gb); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
#modal-signalement .modal, #modal-reunion-mail .modal { animation: sig-entree .22s cubic-bezier(.2,.8,.2,1); }
@keyframes sig-entree { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #modal-signalement .modal, #modal-reunion-mail .modal { animation: none; } }

/* Admin > Remontées (développeurs) */
.rem-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rem-liste { display: flex; flex-direction: column; gap: 8px; }
.rem-item { border: 1px solid var(--gb); border-radius: 12px; padding: 12px 14px; background: var(--glass); animation: sig-entree .22s cubic-bezier(.2,.8,.2,1) both; }
.rem-item.fait, .rem-item.rejete { opacity: .6; }
.rem-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rem-badge { font-size: .79rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--accentbg); color: var(--accent); }
.rem-badge.erreur, .rem-badge.bug { background: rgba(255,69,58,.15); color: var(--red); }
.rem-titre { font-weight: 700; font-size: .9rem; flex: 1; min-width: 0; word-break: break-word; }
.rem-meta { font-size: .79rem; color: var(--text-muted); margin-top: 4px; }
.rem-desc { white-space: pre-wrap; font-size: .85rem; margin-top: 8px; word-break: break-word; }
.rem-ctx { font-size: .79rem; color: var(--text-muted); margin-top: 8px; }
.rem-ctx summary { cursor: pointer; }
.rem-ctx pre { white-space: pre-wrap; word-break: break-all; font-family: var(--font-mono, monospace); font-size: .79rem; margin: 6px 0 0; }
.rem-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
@media (prefers-reduced-motion: reduce) { .rem-item { animation: none; } }

/* ══════════════════════════════
   CONNECTEUR CLAUDE (claude.js) : Mon profil > Claude, Admin > Claude
══════════════════════════════ */
@keyframes clEntree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cl-profil, .cl-admin { animation: clEntree .3s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .cl-profil, .cl-admin { animation: none; } }
.cl-etat { font-size: .85rem; font-weight: 600; padding: 9px 12px; border-radius: 8px; margin-bottom: 10px; border: 1px solid var(--gb); }
.cl-etat-on { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.cl-etat-off { background: var(--glass); color: var(--text-muted); }
.cl-etapes { margin: 6px 0 12px; padding-left: 20px; font-size: .85rem; color: var(--text); line-height: 1.55; }
.cl-etapes li { margin: 4px 0; }
.cl-url { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--gb); border-radius: 8px; background: var(--glass); }
.cl-url code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: 'DM Mono', monospace; font-size: .79rem; color: var(--text); user-select: all; }
.cl-outils { margin-top: 12px; font-size: .85rem; }
.cl-outils summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.cl-outils summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.cl-outils ul { margin: 6px 0 0; padding-left: 20px; color: var(--text-muted); columns: 2 220px; }
.cl-ligne { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cl-admin .toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.cl-titre { font-size: .9rem; font-weight: 700; margin: 20px 0 6px; color: var(--text); }
.cl-consignes { width: 100%; box-sizing: border-box; resize: vertical; margin: 8px 0; min-height: 110px; }
.cl-matrice-wrap { overflow-x: auto; margin: 10px 0; border: 1px solid var(--gb); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.cl-matrice { width: 100%; border-collapse: collapse; font-size: .79rem; min-width: 640px; }
.cl-matrice th, .cl-matrice td { padding: 7px 8px; border-bottom: 1px solid var(--gb); text-align: center; vertical-align: middle; }
.cl-matrice thead th { position: sticky; top: 0; background: var(--surface); font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.cl-matrice tbody th[scope="row"] { text-align: left; font-weight: 400; min-width: 220px; }
.cl-matrice tbody tr:hover { background: var(--glass-h); }
.cl-groupe th { text-align: left !important; background: var(--glass); font-weight: 700; color: var(--accent); }
.cl-outil-nom { display: block; font-weight: 600; color: var(--text); }
.cl-outil-desc { display: block; font-size: .79rem; color: var(--text-muted); line-height: 1.35; }
.cl-case { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.cl-liens { display: flex; flex-direction: column; gap: 6px; }
.cl-lien { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--gb); border-radius: 8px; }
.cl-lien-nom { font-weight: 600; font-size: .85rem; }

/* ── Écran de chargement global (façon écran de verrouillage) ── */
.gl { position: fixed; inset: 0; z-index: 9999; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(56px, 9vh) 24px max(48px, 8vh); background: var(--bg); color: var(--text); overflow: hidden;
  opacity: 1; transition: opacity .3s ease, visibility .3s; }
.gl.is-out { opacity: 0; visibility: hidden; }
.gl-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -1; }
.gl--wp { color: var(--on-wallpaper); }
.gl--wp .gl-bg::after { content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.36); }
.gl-top, .gl-bottom { display: flex; flex-direction: column; align-items: center; text-align: center; animation: glIn .5s ease-out both; }
.gl-bottom { width: min(260px, 100%); animation-delay: .1s; }
.gl-date { font-size: 1.1rem; font-weight: 500; opacity: .85; }
.gl-date::first-letter { text-transform: uppercase; }
.gl-time { font-size: clamp(3.6rem, 14vw, 6.5rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.gl-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 1.4rem; font-weight: 700; background: var(--accentbg); color: var(--accent); margin-bottom: 12px; }
.gl-avatar[hidden] { display: none; }
.gl-avatar img, .gl-avatar svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl--wp .gl-avatar { background: rgba(255,255,255,.2); color: var(--on-wallpaper); box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.gl-name { font-size: 1.1rem; font-weight: 600; }
.gl-track { width: 100%; height: 3px; margin-top: 18px; border-radius: 2px; overflow: hidden; background: var(--accentbg); }
.gl--wp .gl-track { background: rgba(255,255,255,.25); }
.gl-bar { height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .35s ease; }
.gl--wp .gl-bar { background: var(--on-wallpaper); }
.gl-msg { font-size: .79rem; opacity: .8; margin-top: 10px; min-height: 1.3em; }
.gl:not(.gl--wp) .gl-msg, .gl:not(.gl--wp) .gl-date { color: var(--text-muted); opacity: 1; }
.gl--wp .gl-date, .gl--wp .gl-time, .gl--wp .gl-name, .gl--wp .gl-msg { text-shadow: 0 1px 3px rgba(0,0,0,.35); }
@keyframes glIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gl--suite .gl-top, .gl--suite .gl-bottom { animation: none; }
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
@media (max-height: 520px) { .gl-time { font-size: 3rem; } .gl-avatar { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .gl-top, .gl-bottom { animation: none; }
  .gl, .gl-bar { transition: none; }
}

/* ── Panneau Hors ligne (hors_ligne.js, 2026-11-30) ── */
#modal-hors-ligne { z-index: 700; } /* ouvert depuis la fiche chantier (Gérer) : au-dessus d'elle */
.hl-modal { max-width: 560px; animation: hl-entree .22s ease-out; }
@keyframes hl-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hl-modal { animation: none; } }
.hl-section { border-top: 1px solid var(--gb); padding-top: 12px; margin-top: 12px; }
.hl-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.hl-h { font-size: .9rem; font-weight: 700; margin: 0 0 6px; }
.hl-p { font-size: .85rem; margin: 0 0 8px; line-height: 1.45; }
.hl-muted { color: var(--text-muted); font-size: .79rem; }
.hl-warn { color: var(--orange); font-weight: 600; }
.hl-alerte { font-size: .85rem; line-height: 1.45; color: var(--orange); background: var(--orange-bg); border: 1px solid var(--orange); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
.hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hl-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--gb); border-radius: 8px; padding: 8px 10px; }
.hl-item-txt { flex: 1 1 220px; min-width: 0; font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; }
.hl-item-act { display: flex; gap: 6px; flex-wrap: wrap; }
.hl-item-act .btn { min-height: 36px; }
.hl-ajout { margin-top: 10px; font-size: .85rem; }
.hl-ajout label { display: block; font-weight: 600; margin-bottom: 4px; }
.hl-ajout-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hl-ajout-row select { flex: 1 1 200px; min-width: 0; min-height: 36px; }
.hl-switch { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: .85rem; line-height: 1.4; cursor: pointer; }
.hl-switch input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
/* Pastille "sur cet appareil" des cartes chantier (chantiers.js _chHorsLignePastille) */
.chantier-photo { position: relative; }
.ch-hl-pastille { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green, #30D158); color: var(--on-accent); box-shadow: 0 1px 4px rgba(0,0,0,.35); font-size: .85rem; animation: hl-pastille .25s ease-out; }
@keyframes hl-pastille { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ch-hl-pastille { animation: none; } }
.chantier-grid.list-view .ch-hl-pastille { top: 3px; right: 3px; width: 20px; height: 20px; font-size: .79rem; }
.hl-item-conflit { border-color: var(--orange); background: var(--orange-bg); }
.hl-conflits { margin: 6px 0 0; padding-left: 18px; font-size: .79rem; line-height: 1.45; }
