
  /* ============================================================
     FEUILLE DE TEMPS · dashboard des heures pointées par les employés.

     Phase 1 (cette version) : juste un dashboard de visualisation, calcul
     décimal au centième. Pas encore d'approbation (contremaître/admin) ·
     ça viendra après qu'on ait validé que les chiffres sont bons.
     ============================================================ */
  .content { background: var(--surface-soft); }

  /* Toolbar · semaine + filtres */
  .toolbar {
    display: flex; gap: 10px; align-items: center;
    margin-bottom: 24px; flex-wrap: wrap;
  }
  .week-nav {
    display: flex; align-items: center; gap: 8px;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
    padding: 4px;
  }
  .week-nav button {
    width: 32px; height: 32px;
    border-radius: var(--r-full);
    border: none;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .week-nav button:hover { background: var(--surface-soft); }
  .week-nav button svg { width: 14px; height: 14px; }
  .week-nav .label {
    font-size: 13px; font-weight: 600;
    padding: 0 12px; min-width: 180px; text-align: center;
    color: var(--ink);
  }
  .toolbar select {
    border: 1px solid var(--hairline);
    background: var(--input-bg);
    border-radius: var(--r-md);
    padding: 0 16px;
    height: 40px;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
    cursor: pointer;
  }
  .toolbar select:focus { border-color: var(--primary); }
  .toolbar .spacer { flex: 1; }
  /* Bouton "+ Ajouter un punch" · visible seulement aux admins · permet
     de rattraper un oubli rétroactif (employé qui a oublié de puncher). */
  .toolbar .btn-add-punch {
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px;
    padding: 0 16px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
  }
  .toolbar .btn-add-punch:hover { background: var(--primary-active); }
  .toolbar .btn-add-punch svg { width: 14px; height: 14px; }

  /* Bouton "Rapport hebdo" · ouvre rapport.html (CCQ-like PDF) dans un
     nouvel onglet. Visible seulement aux users avec feuille_de_temps.confirm
     (admin / comptabilite). Style outline pour ne pas concurrencer le CTA
     principal "+ Ajouter un punch". */
  .toolbar .btn-report {
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px;
    padding: 0 16px;
    background: var(--canvas);
    color: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
  }
  .toolbar .btn-report:hover {
    background: var(--surface-soft);
    border-color: var(--ink);
  }
  .toolbar .btn-report svg { width: 14px; height: 14px; }

  /* Bandeau récap · total semaine */
  .week-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  .week-summary .card {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 16px 20px;
  }
  .week-summary .lbl {
    font-size: 11px; font-weight: 600;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 6px;
  }
  .week-summary .val {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 26px; font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.5px;
  }
  .week-summary .val .unit {
    font-size: 14px; color: var(--muted); margin-left: 4px;
  }
  .week-summary .sub {
    font-size: 12px; color: var(--muted); margin-top: 4px;
  }

  /* Liste groupée par jour */
  .day-group { margin-bottom: 24px; }
  .day-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
  }
  .day-name {
    font-size: 14px; font-weight: 600; color: var(--ink);
    text-transform: capitalize;
  }
  .day-total {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 14px; font-weight: 500; color: var(--ink);
  }
  .day-total .unit { font-size: 11px; color: var(--muted); margin-left: 2px; }

  /* Liste verticale de cards · 1 card par row, pleine largeur */
  .punch-list {
    display: flex; flex-direction: column;
    gap: 12px;
  }

  /* Card employé · header en haut, liste de punches en dessous */
  .employee-card {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .employee-card:hover { box-shadow: var(--shadow-hover); }
  .ec-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--hairline);
  }
  .ec-emp {
    display: flex; align-items: center; gap: 12px;
  }
  .ec-avatar {
    width: 38px; height: 38px;
    border-radius: var(--r-full);
    background: var(--primary);
    color: var(--on-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    flex-shrink: 0;
  }
  .ec-emp-text { display: flex; flex-direction: column; }
  .ec-emp-name {
    font-family: var(--font-display);
    font-size: 16px; font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.2px;
  }
  .ec-emp-role { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .ec-header-right {
    display: flex; align-items: center; gap: 16px;
  }
  .ec-day-total {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  }
  .ec-day-total-label {
    font-size: 10px; font-weight: 600;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .ec-day-total-val {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 20px; font-weight: 500;
    color: var(--ink);
  }
  /* Bouton d'action principal dans le header · approve ou confirm en lot */
  .ec-header-btn {
    font-family: inherit;
    font-size: 13px; font-weight: 600;
    height: 36px; padding: 0 18px;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: filter 0.15s;
  }
  .ec-header-btn:hover { filter: brightness(0.95); }
  .ec-header-btn:disabled,
  .ec-header-btn:disabled:hover {
    cursor: not-allowed;
    filter: none;
  }
  .ec-header-btn.approve { background: var(--primary); color: var(--on-primary); }
  .ec-header-btn.confirm { background: var(--primary); color: var(--on-primary); }
  /* En attente d'approbation · grisé, désactivé · informe l'admin qu'il faut
     attendre que le contremaître approuve avant qu'il puisse confirmer. */
  .ec-header-btn.waiting {
    background: var(--surface-strong);
    color: var(--muted);
    cursor: not-allowed;
  }
  /* Icône note du contremaître · entre le total et le bouton Approuver.
     Deux états visuels distincts ·
       - Pas de note · gris (surface-soft) avec icône grise. Discret.
       - Note présente · CERCLE ROUGE plein avec icône BLANCHE. Très visible
         pour que l'admin sache qu'il y a une note à lire. */
  .ec-header-note {
    position: relative;
    width: 36px; height: 36px;
    border-radius: var(--r-full);
    background: var(--surface-soft);
    color: var(--muted);
    border: 1px solid var(--hairline);
    display: inline-flex;
    align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    margin-right: 8px;
    flex-shrink: 0;
  }
  .ec-header-note:hover {
    background: var(--surface-strong);
    color: var(--ink);
  }
  .ec-header-note svg { width: 16px; height: 16px; }
  /* Etat "has note" · fond rouge plein, icône blanche, bordure rouge */
  .ec-header-note.has-note {
    background: var(--semantic-down);
    color: white;
    border-color: var(--semantic-down);
  }
  .ec-header-note.has-note:hover {
    /* Variante hover plus foncée · slight darken via inset shadow */
    background: var(--semantic-down);
    color: white;
    box-shadow: inset 0 0 0 100px rgba(0,0,0,0.10);
  }

  /* Liste de punches dans la card employé · 1 ligne par punch */
  .ec-punches { display: flex; flex-direction: column; }
  .ec-punch {
    padding: 10px 20px;
    border-bottom: 1px solid var(--hairline-soft);
  }
  .ec-punch:last-child { border-bottom: none; }
  /* Punch encore en cours (status='open') · combo barre bleue à gauche +
     fond bleu qui pulse. Le gris pur sur la card grise ne se voyait pas ·
     le bleu primary ressort clairement sans agresser. */
  .ec-punch.is-open {
    position: relative;
    background: rgba(0, 82, 255, 0.04);
    animation: punch-open-pulse 2s ease-in-out infinite;
  }
  .ec-punch.is-open::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
  }
  @keyframes punch-open-pulse {
    0%, 100% { background: rgba(0, 82, 255, 0.04); }
    50%      { background: rgba(0, 82, 255, 0.13); }
  }
  /* Ligne principale du punch · adresse+note à gauche, le reste à droite */
  .ec-punch-main {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
  }
  /* Pill géo compact au début de la ligne · clickable pour déplier.
     Affiche juste l'icône (+ chevron si expandable). Le tooltip natif
     (title=) montre le label complet au survol. */
  .geo-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: inherit;
    padding: 4px 8px;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.15s;
    line-height: 1;
  }
  /* Icône d'état · cercle + position du point (centre/extérieur/barré).
     Couleur héritée du .geo-pill (good=vert, warn=rouge, no-data=gris). */
  .geo-pill-icon {
    width: 14px; height: 14px;
    flex-shrink: 0;
  }
  .geo-pill:not(.static):hover { filter: brightness(0.95); }
  .geo-pill.static { cursor: default; }
  .geo-pill.good     { background: rgba(5, 177, 105, 0.16); color: var(--semantic-up); }
  .geo-pill.no-data  { background: var(--surface-strong); color: var(--muted); }
  /* Warn · rouge avec animation pulse subtile pour attirer l'attention
     sans agresser. Va d'un rouge doux à un rouge un peu plus visible. */
  .geo-pill.warn {
    background: rgba(231, 80, 80, 0.18); color: var(--semantic-down);
    animation: geo-warn-pulse 2s ease-in-out infinite;
  }
  @keyframes geo-warn-pulse {
    0%, 100% { background: rgba(231, 80, 80, 0.15); }
    50%      { background: rgba(231, 80, 80, 0.4); }
  }
  .geo-pill-chevron {
    width: 10px; height: 10px;
    transition: transform 0.15s;
  }
  .geo-pill[data-expanded="true"] .geo-pill-chevron { transform: rotate(180deg); }

  /* Panneau d'expand · 2 mini-maps TOUJOURS cote a cote en grid (jamais wrap).
     Largeur partagee 50/50 avec un gap entre. */
  .ec-punch-geo-expand {
    margin-top: 10px;
    padding: 10px;
    background: var(--surface-soft);
    border-radius: var(--r-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  /* Chaque bloc · header (label + distance) + mini-map en dessous */
  .geo-mini-block {
    display: flex; flex-direction: column; gap: 4px;
    min-width: 0; /* permet aux grid items de retrecir sans overflow */
  }
  .geo-mini-head {
    display: flex; align-items: baseline;
    gap: 6px;
    padding: 0 2px;
  }
  /* Separateur dot inline entre label et valeur */
  .geo-mini-head .geo-mini-label::after {
    content: ' ·';
    color: var(--muted-soft);
    margin-left: 2px;
  }
  .geo-mini-label {
    font-size: 10px; font-weight: 600;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .geo-mini-value {
    font-family: var(--font-mono); font-variant-numeric: tabular-nums;
    font-size: 11px; font-weight: 500;
  }
  .geo-mini-head.good .geo-mini-value { color: var(--semantic-up); }
  .geo-mini-head.warn .geo-mini-value { color: var(--semantic-down); }
  /* Mini-map · prend 100% de sa colonne grid · TOUJOURS cote a cote */
  .ec-punch-geo-expand .ec-punch-map {
    width: 100%; height: 110px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface-strong);
    border: 1px solid var(--hairline);
  }
  .ec-punch-geo-expand .leaflet-container { background: var(--surface-strong); }
  .ec-punch-geo-expand .leaflet-control-attribution { display: none; }
  /* Stack seulement sur ECRAN TRES ETROIT (mobile vraiment etroit) */
  @media (max-width: 480px) {
    .ec-punch-geo-expand { grid-template-columns: 1fr; }
  }

  /* Dot de statut au début de la ligne · couleur encode le statut */
  .ec-punch-status-dot {
    width: 8px; height: 8px;
    border-radius: var(--r-full);
    flex-shrink: 0;
    background: var(--muted-soft);
  }
  .ec-punch-status-dot.open             { background: var(--primary); }
  .ec-punch-status-dot.pending_approval { background: var(--accent-yellow); }
  .ec-punch-status-dot.approved         { background: var(--semantic-up); }
  .ec-punch-status-dot.confirmed        { background: var(--ink); }
  .ec-punch-status-dot.rejected         { background: var(--semantic-down); }
  /* Bloc gauche · adresse + note inline · prend l'espace dispo */
  .ec-punch-left {
    flex: 1; min-width: 0;
    display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  }
  .ec-punch-addr {
    font-weight: 500; color: var(--ink);
  }
  .ec-punch-note-inline {
    font-style: italic; color: var(--muted);
    font-size: 12px;
  }
  /* Bloc droit · pills + times + durée + actions, alignés à droite */
  /* Bloc début → fin avec petite flèche, separé du reste */
  .ec-punch-times-block {
    display: inline-flex; align-items: baseline; gap: 6px;
  }
  /* Icône appareil photo · affiché juste avant l'heure si le punch a généré
     des photos (fiche_documents avec category='photo_chantier' uploadé pendant
     l'intervalle du punch). Indicateur visuel rapide pour le contremaître. */
  .ec-punch-camera {
    width: 14px; height: 14px;
    color: var(--muted);
    flex-shrink: 0;
    align-self: center;
  }
  .ec-punch-time-arrow {
    color: var(--muted-soft);
    font-size: 14px;
    font-family: var(--font-body);
  }
  .ec-punch-times-inline,
  .ec-punch-dur-inline {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--body);
    font-size: 13px;
  }
  /* Durée · plus gros, gras, separé du bloc plage horaire par un margin */
  .ec-punch-dur-inline {
    font-weight: 600;
    color: var(--ink);
    font-size: 15px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--hairline);
  }
  .ec-punch-pills-inline {
    display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center;
  }
  .ec-punch-actions-inline {
    display: inline-flex; gap: 4px; align-items: center;
    margin-left: 12px;
  }
  /* Pills géo · variantes pour l'affichage compact */
  .pc-type-tag.in-zone   { background: rgba(5, 177, 105, 0.16); color: var(--semantic-up); }
  .pc-type-tag.out-zone  { background: rgba(231, 80, 80, 0.16); color: var(--semantic-down); }
  .pc-type-tag.no-geo    { background: var(--surface-strong); color: var(--muted); }
  /* Boutons icône Modifier/Supprimer · compacts inline */
  .icon-btn {
    width: 28px; height: 28px;
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    color: var(--body);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .icon-btn:hover { background: var(--surface-soft); color: var(--ink); }
  .icon-btn.danger:hover { background: rgba(231, 80, 80, 0.08); color: var(--semantic-down); border-color: var(--semantic-down); }
  .icon-btn svg { width: 14px; height: 14px; }
  .punch-card {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto auto;
    gap: 4px 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .punch-card:hover { border-color: var(--hairline); box-shadow: var(--shadow-hover); }
  .pc-emp {
    grid-column: 1 / 2;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
  }
  .pc-avatar {
    width: 32px; height: 32px;
    border-radius: var(--r-full);
    background: var(--primary);
    color: var(--on-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
    flex-shrink: 0;
  }
  .pc-emp-text { display: flex; flex-direction: column; }
  .pc-emp-name { font-size: 14px; font-weight: 600; color: var(--ink); }
  .pc-emp-role { font-size: 12px; color: var(--muted); }
  .pc-status-area {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    align-self: start;
    display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  }
  .pc-addr {
    grid-column: 1 / 3;
    font-size: 14px; color: var(--ink);
    padding: 8px 0;
    border-top: 1px solid var(--hairline-soft);
  }
  .pc-row {
    grid-column: 1 / 3;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
  }
  /* Bloc Plage horaire · label en haut, valeur en bas */
  .pc-times-block { display: flex; flex-direction: column; gap: 2px; }
  .pc-times-label {
    font-size: 10px; font-weight: 600;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .pc-times {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    color: var(--body);
  }
  .pc-times .sep { color: var(--muted-soft); margin: 0 6px; }
  /* Bloc Heures travaillées · label en haut, valeur en gros en bas */
  .pc-duration-block { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
  .pc-duration-label {
    font-size: 10px; font-weight: 600;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .pc-duration {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 18px; font-weight: 500;
    color: var(--ink);
  }
  .pc-duration .unit { font-size: 11px; color: var(--muted); margin-left: 2px; }
  .pc-types {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-top: 2px;
  }
  .pc-type-tag {
    font-size: 11px; font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--r-pill);
    background: var(--surface-soft);
    color: var(--body);
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .pc-type-tag.primary { background: var(--primary-soft); color: var(--primary); }
  .pc-type-tag.sector-residentiel { background: var(--primary-soft); color: var(--primary); }
  .pc-type-tag.sector-commercial  { background: rgba(5, 177, 105, 0.16); color: var(--semantic-up); }
  .pc-note {
    grid-column: 1 / 3;
    margin-top: 4px;
    padding: 8px 12px;
    background: var(--surface-soft);
    border-left: 3px solid var(--hairline);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-size: 12px;
    color: var(--body);
    font-style: italic;
  }
  .pc-actions {
    grid-column: 1 / 3;
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--hairline-soft);
  }
  .pc-actions .spacer { flex: 1; }
  .pc-meta {
    font-size: 11px; color: var(--muted);
    display: flex; align-items: center; gap: 6px;
  }

  /* Pastilles de statut */
  .status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .status-pill .dot {
    width: 6px; height: 6px;
    border-radius: var(--r-full);
  }
  .status-pill.open { background: var(--primary-soft); color: var(--primary); }
  .status-pill.open .dot { background: var(--primary); }
  .status-pill.pending_approval { background: rgba(244, 176, 0, 0.18); color: #9a6a00; }
  .status-pill.pending_approval .dot { background: var(--accent-yellow); }
  .status-pill.approved { background: rgba(5, 177, 105, 0.16); color: var(--semantic-up); }
  .status-pill.approved .dot { background: var(--semantic-up); }
  .status-pill.confirmed { background: var(--ink); color: var(--canvas); }
  .status-pill.confirmed .dot { background: var(--canvas); }
  .status-pill.rejected { background: rgba(231, 80, 80, 0.16); color: var(--semantic-down); }
  .status-pill.rejected .dot { background: var(--semantic-down); }
  .status-pill.no-geo { background: var(--surface-strong); color: var(--muted); }
  .status-pill.no-geo .dot { background: var(--muted-soft); }

  /* Boutons d'action dans la card · modifier / approuver / confirmer */
  .act-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: inherit;
    font-size: 12px; font-weight: 600;
    padding: 8px 14px;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: filter 0.15s;
  }
  .act-btn:hover { filter: brightness(0.95); }
  .act-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  .act-btn svg { width: 12px; height: 12px; }
  .act-btn.approve { background: var(--primary); color: var(--on-primary); }
  .act-btn.confirm { background: var(--semantic-up); color: white; }
  .act-btn.modify  { background: var(--surface-strong); color: var(--ink); }
  .act-btn.delete  {
    background: transparent;
    color: var(--semantic-down);
    border: 1px solid currentColor;
    margin-left: auto; /* pousse le bouton supprimer à droite, séparé des actions principales */
  }

  /* Modal de modification d'un punch */
  .modify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
  }
  .modify-overlay.open { display: flex; }
  .modify-sheet {
    background: var(--canvas);
    border-radius: var(--r-xl);
    max-width: 480px; width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  }
  .modify-sheet h2 {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 400;
    color: var(--ink);
    margin: 0 0 4px;
    letter-spacing: -0.5px;
  }
  .modify-sheet .modify-sub {
    font-size: 13px; color: var(--muted);
    margin-bottom: 20px;
  }
  .modify-field {
    margin-bottom: 16px;
    display: flex; flex-direction: column; gap: 6px;
  }
  .modify-field label {
    font-size: 12px; font-weight: 600;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .modify-field input,
  .modify-field select,
  .modify-field textarea {
    border: 1px solid var(--hairline);
    background: var(--input-bg);
    border-radius: var(--r-md);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s;
    /* CRITIQUE · evite que les inputs datetime-local depassent le container
       et causent un scroll horizontal sur ecran etroit */
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
  .modify-field input:focus,
  .modify-field select:focus,
  .modify-field textarea:focus { border-color: var(--primary); }
  .modify-field textarea { resize: vertical; min-height: 60px; }
  .modify-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  /* Sur ecran etroit, stack les 2 colonnes pour eviter le scroll horizontal */
  @media (max-width: 520px) {
    .modify-row { grid-template-columns: 1fr; }
  }

  /* Date + heure + minute en 3 inputs séparés. */
  .datetime-picker {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .datetime-picker .dt-date {
    flex: 1 1 auto;
    min-width: 0;
  }
  .datetime-picker .dt-sep {
    color: var(--muted);
    font-family: var(--font-mono);
    font-weight: 600;
    flex-shrink: 0;
  }

  /* Custom number picker (np) · pour HH et MM. Évite les selects natifs
     qui descendent jusqu'en bas de l'écran. Dropdown contraint à ~5 lignes
     visibles avec scroll, auto-positionné sur la valeur courante au top. */
  .np {
    position: relative;
    flex-shrink: 0;
    width: 72px;
  }
  .np-display {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    height: 42px;
    padding: 0 10px;
    background: var(--input-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    cursor: pointer;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: border-color 0.15s;
    user-select: none;
    -webkit-user-select: none;
  }
  .np-display:hover { border-color: var(--muted-soft); }
  .np.open .np-display { border-color: var(--primary); }
  .np-display::after {
    content: '';
    width: 8px; height: 8px;
    margin-left: 6px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg);
    margin-top: -4px;
  }
  .np-options {
    position: absolute;
    top: calc(100% + 4px); left: 0;
    width: 100%;
    max-height: 200px; /* ~5-6 options visibles · le reste avec scroll */
    overflow-y: auto;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    z-index: 200;
    display: none;
    padding: 4px 0;
  }
  .np.open .np-options { display: block; }
  .np-option {
    padding: 8px 10px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    text-align: center;
    font-size: 14px;
    color: var(--ink);
  }
  .np-option:hover { background: var(--surface-soft); }
  .np-option.current {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
  }

  /* Combobox searchable · input texte + dropdown qui filtre live.
     Utilisé pour le champ Chantier dans le modal "Ajouter un punch"
     car y'aura potentiellement 300+ chantiers à scroller sinon. */
  .searchable-select {
    position: relative;
  }
  .searchable-options {
    position: absolute;
    top: calc(100% + 4px); left: 0; right: 0;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
  }
  .searchable-options.open { display: block; }
  .searchable-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline-soft);
  }
  .searchable-option:last-child { border-bottom: none; }
  .searchable-option:hover,
  .searchable-option.highlighted {
    background: var(--surface-soft);
  }
  .searchable-option .so-meta {
    font-size: 12px; color: var(--muted);
    margin-top: 2px;
  }
  .searchable-option.empty {
    color: var(--muted);
    font-style: italic;
    cursor: default;
  }
  .modify-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--hairline-soft);
  }
  .modify-actions button {
    font-family: inherit;
    font-size: 13px; font-weight: 600;
    height: 40px; padding: 0 18px;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
  }
  .modify-actions .cancel { background: transparent; color: var(--muted); }
  .modify-actions .save   { background: var(--primary); color: var(--on-primary); }

  /* États vides + chargement */
  .empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
  }
  .empty-state .title {
    font-size: 16px; font-weight: 600; color: var(--ink);
    margin-bottom: 6px;
  }
  .empty-state .desc { font-size: 13px; }

  .no-access {
    padding: 60px 20px;
    text-align: center; color: var(--muted);
  }
  .no-access h2 { color: var(--ink); margin-bottom: 8px; font-size: 18px; }

  /* (Cards · pas de scroll horizontal nécessaire, layout responsif natif) */
