/* Feuille de temps - styles dédiés */

/* Tous les écrans Feuille de temps : contenu sous le header (web, iOS, Android).
   Header ~70px (min-height + padding) → padding-top >= 72px pour éviter tout chevauchement. */
#feuille-temps-screen,
#feuille-temps-projet-screen,
#feuille-temps-choisir-projet-screen,
#feuille-temps-jours-screen,
#feuille-temps-horaire-screen {
  padding-top: calc(env(safe-area-inset-top, 0px) + 72px) !important;
  padding-bottom: 0;
}
#feuille-temps-choisir-projet-screen {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#feuille-temps-choisir-projet-screen .formulaire-header {
  flex-shrink: 0;
}

.app-android #feuille-temps-screen,
.app-android #feuille-temps-projet-screen,
.app-android #feuille-temps-choisir-projet-screen,
.app-android #feuille-temps-jours-screen,
.app-android #feuille-temps-horaire-screen {
  padding-top: calc(env(safe-area-inset-top, 0px) + 72px) !important;
}

/* iOS : marge plus généreuse pour garantir que la barre verte / premier contenu reste sous le header */
.app-ios #feuille-temps-screen,
.app-ios #feuille-temps-projet-screen,
.app-ios #feuille-temps-choisir-projet-screen,
.app-ios #feuille-temps-jours-screen,
.app-ios #feuille-temps-horaire-screen {
  padding-top: calc(env(safe-area-inset-top, 0px) + 88px) !important;
}

/* Entrée (un jour) : dégagement sous le header fixe — 55px + encoche (les autres écrans Feuille restent 72 / 88). */
#feuille-temps-entree-screen {
  padding-top: calc(env(safe-area-inset-top, 0px) + 55px) !important;
  padding-bottom: 0;
}

.formulaire-header,
.formulaire-header-feuille-temps {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 12px;
  padding-left: 16px;
  padding-right: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  min-height: 48px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Feuille de temps liste : en-tête touche le haut, pleine largeur, tous appareils */
#feuille-temps-screen {
  overflow: hidden;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}

/* Barre de navigation basse - 4 onglets, pleine largeur, adaptée à tous les écrans */
.feuille-temps-has-bottom-nav {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.feuille-temps-has-bottom-nav .formulaire-main-feuille-temps {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 56px;
}

/* Même padding sur Android (contenu sous le header, au-dessus de la barre du bas) */
.app-android .feuille-temps-has-bottom-nav .formulaire-main-feuille-temps {
  padding-bottom: 56px !important;
}

/* iOS : padding-top renforcé pour que la barre verte / première carte ne passent jamais derrière le header */
.app-ios .feuille-temps-has-bottom-nav .formulaire-main-feuille-temps {
  padding-bottom: 56px !important;

}

/* Fixe en bas du viewport pour rester visible sur Android (barre d’adresse, clavier, scroll) */
.feuille-temps-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  flex-shrink: 0;
  display: flex;
  width: 100%;
  max-width: 100vw;
  min-height: 52px;
  box-sizing: border-box;
  padding-top: 10px;
  padding-bottom: 12px;
  padding-left: 8px;
  padding-right: 8px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
  margin: 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.feuille-temps-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 6px;
  border: none;
  background: transparent;
  color: var(--text-muted, #6b7280);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
  min-width: 0;
}
/* [hidden] sur un onglet : sans ceci, display:flex ci-dessus gagne sur la feuille implicite de l’attribut hidden. */
#feuille-temps-screen .feuille-temps-nav-tab[hidden] {
  display: none !important;
}
.feuille-temps-nav-tab:active {
  background: rgba(0, 0, 0, 0.04);
}
.feuille-temps-nav-tab.active {
  color: #2563eb;
  font-weight: 600;
}
@media (hover: hover) {
  .feuille-temps-nav-tab:hover { background: rgba(0, 0, 0, 0.03); }
}
/* Pastille nombre de semaines (onglet À valider) — même logique que getWeeksToValidateCount */
.feuille-temps-nav-icon-with-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-nav-tab-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #e65100;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 1;
}
.feuille-temps-nav-tab-badge[hidden] {
  display: none !important;
}
.feuille-temps-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}
/* Taille min en px pour rester visibles sur tous les appareils (ex. A54) ; couleur explicite pour le contraste */
.feuille-temps-nav-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 24px;
  min-height: 24px;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}
.feuille-temps-nav-tab .feuille-temps-nav-icon svg {
  color: currentColor;
}
.feuille-temps-nav-tab.active .feuille-temps-nav-icon svg {
  color: #2563eb;
  stroke: currentColor;
}
.feuille-temps-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}
@media (min-width: 400px) {
  .feuille-temps-nav-tab { font-size: 0.75rem; padding: 12px 8px 8px; }
  .feuille-temps-nav-icon { font-size: 1.5rem; min-height: 26px; }
  .feuille-temps-nav-icon svg { width: 1.5rem; height: 1.5rem; min-width: 26px; min-height: 26px; }
}
.feuille-temps-tab-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.feuille-temps-week-validated .feuille-temps-list-validated-badge {
  color: #22c55e;
}
/* Semaine validée = barrée, non modifiable (consultation seule) */
.feuille-temps-week-validated .formulaire-feuille-temps-item-label {
  text-decoration: line-through;
  color: var(--text-muted, rgba(0, 0, 0, 0.5));
}
.feuille-temps-week-validated {
  opacity: 0.9;
  cursor: default;
}
.feuille-temps-week-validated .formulaire-feuille-temps-item-arrow {
  cursor: pointer;
}
#feuille-temps-screen > .formulaire-header-feuille-temps {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  padding-top: 12px;
  padding-left: 16px;
  padding-right: 16px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}
.formulaire-back {
  padding: 8px 4px;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.formulaire-back:active { color: var(--text-muted); }
@media (hover: hover) { .formulaire-back:hover { color: var(--text-muted); } }
.formulaire-title {
  flex: 1;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Actions à droite du titre (loupe recherche semaine) */
.feuille-temps-header-trailing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Cloche notifications : styles de pastille partagés dans pages/app-settings.css (#app-container …) */

.feuille-temps-sync-error {
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #b91c1c;
}
.feuille-temps-sync-error:empty,
.feuille-temps-sync-error[hidden] {
  display: none !important;
}
.formulaire-main-feuille-temps {
  padding: 0;
  padding-bottom: 24px;
  flex: 1;
  background: transparent;
  overflow-y: auto;
  position: relative;
  touch-action: manipulation;
}
.feuille-temps-pull-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #6b7280;
  transform: translateY(-100%);
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
.feuille-temps-pull-indicator.visible {
  transform: translateY(0);
}
.feuille-temps-pull-indicator.refreshing {
  color: var(--primary);
  opacity: 0.9;
}
.formulaire-feuille-temps-add {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text, #1a1a1a);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.formulaire-feuille-temps-add svg {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  color: inherit;
  stroke: currentColor;
}
.formulaire-feuille-temps-add:active {
  background: rgba(0, 0, 0, 0.08);
}
.formulaire-feuille-temps-add:disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
}
@media (hover: hover) {
  .formulaire-feuille-temps-add:hover { background: rgba(0, 0, 0, 0.08); }
}
.feuille-temps-favoris-star-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 6px;
}
.feuille-temps-favoris-star-btn .feuille-temps-star-svg {
  width: 100%;
  height: 100%;
  min-width: 22px;
  min-height: 22px;
  display: block;
}
.feuille-temps-star-empty { fill: none; stroke: var(--text-muted); }
.feuille-temps-livre-icon {
  color: #1a1a1a;
}
.feuille-temps-livre-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  color: inherit;
  stroke: currentColor;
}
.feuille-temps-star-filled { fill: #eab308; stroke: #eab308; }
.feuille-temps-search-btn svg { display: block; }
.formulaire-feuille-temps-search-wrap {
  margin-bottom: 16px;
}
.formulaire-feuille-temps-projets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.formulaire-feuille-temps-projets-header .formulaire-feuille-temps-projets-title,
.formulaire-main-feuille-temps > .formulaire-feuille-temps-projets-title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.formulaire-feuille-temps-projet-search-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.feuille-temps-choisir-added-wrap {
  margin-bottom: 12px;
  flex-shrink: 0;
}
.feuille-temps-choisir-catalog-outer {
  margin-bottom: 12px;
  flex-shrink: 0;
}
.feuille-temps-choisir-catalog-outer[hidden] {
  display: none !important;
}
.feuille-temps-choisir-accordion {
  width: 100%;
}
/* En-têtes de section : pas le même rendu « carte » que les lignes projet */
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px 10px 10px;
  margin: 0;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0.95em;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 45%, transparent);
  opacity: 0.85;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger:hover,
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger:focus-visible {
  color: var(--text);
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text) 35%, transparent);
  outline-offset: 2px;
}
.feuille-temps-choisir-accordion-title {
  flex: 1;
  min-width: 0;
}
.feuille-temps-choisir-accordion-chevron {
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  display: grid;
  place-items: center;
  opacity: 0.55;
}
.feuille-temps-choisir-accordion-chevron::before {
  content: '';
  display: block;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.15em;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger[aria-expanded="false"] .feuille-temps-choisir-accordion-chevron::before {
  transform: rotate(-45deg);
  margin-top: 0;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-accordion--section .feuille-temps-choisir-accordion-trigger[aria-expanded="true"] .feuille-temps-choisir-accordion-chevron::before {
  transform: rotate(45deg);
  margin-top: -0.15em;
}
.feuille-temps-choisir-accordion-panel {
  padding-top: 8px;
}
.feuille-temps-choisir-added-wrap + .feuille-temps-choisir-catalog-outer {
  margin-top: 2px;
}
/* Choisir un projet : un seul défilement sur main pour voir tout le contenu
   (accordéons Projets ajoutés / Tous les projets + liste dossiers) sans coupure. */
#feuille-temps-choisir-projet-screen .formulaire-main-feuille-temps {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#feuille-temps-choisir-projet-screen #feuille-temps-choisir-projet-list {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}
/* chat2.php : même rangée recherche qu’en haut, poussée en bas du main (flex + margin-top: auto), sans barre dédiée. */
#feuille-temps-choisir-projet-screen:has(.feuille-temps-chat2-preview-search) #feuille-temps-choisir-projet-list {
  flex: 1 1 auto;
}
#feuille-temps-choisir-projet-screen:has(.feuille-temps-chat2-preview-search) .feuille-temps-chat2-preview-search {
  flex-shrink: 0;
  margin-top: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  padding-bottom: 12px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.feuille-temps-choisir-added-wrap:empty,
.feuille-temps-choisir-added-wrap[hidden] {
  display: none !important;
}
.feuille-temps-choisir-added-header {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.feuille-temps-choisir-added-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feuille-temps-choisir-added-item {
  cursor: pointer;
}
.feuille-temps-choisir-search-wrap {
  flex-wrap: nowrap;
  position: relative;
}
.feuille-temps-choisir-search-wrap .feuille-temps-choisir-search-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.formulaire-feuille-temps-projet-search-wrap .formulaire-feuille-temps-search {
  flex: 1;
  min-width: 0;
}
.feuille-temps-choisir-search-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.feuille-temps-choisir-search-row--solo .formulaire-feuille-temps-search {
  flex: 1;
  width: 100%;
  min-width: 0;
}
.feuille-temps-choisir-catalog-search-row {
  margin-bottom: 10px;
}
.feuille-temps-choisir-catalog-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.feuille-temps-choisir-catalog-item .feuille-temps-dropdown-star-wrap {
  flex-shrink: 0;
  pointer-events: auto;
  margin-top: 2px;
}
.feuille-temps-choisir-catalog-item .feuille-temps-choisir-catalog-item-text .formulaire-feuille-temps-item-label {
  pointer-events: none;
  /* Lisible sur mobile : plancher ~15px, plafond ~17px ; noms longs en retour à la ligne (pas d’ellipse). */
  font-size: clamp(0.9375rem, 0.8rem + 0.72vw, 1.0625rem);
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.38;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}
/* Ligne catalogue « Tous les projets » : même échelle que le libellé, actions alignées en haut */
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-catalog-item.formulaire-feuille-temps-item {
  align-items: flex-start;
  font-size: clamp(0.9375rem, 0.8rem + 0.72vw, 1.0625rem);
  color: var(--text, #0f172a);
  padding: 12px 14px;
  gap: 10px;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-catalog-item .formulaire-feuille-temps-item-actions {
  align-self: center;
}
/* Dans le catalogue modal : projet déjà ajouté à la semaine — fond or très pâle (repère lisible comme sur la feuille hub). */
#feuille-temps-choisir-projet-catalog-wrap .feuille-temps-choisir-catalog-item[data-in-week="true"].formulaire-feuille-temps-item {
  background-color: #fcf6ea;
  background-image: linear-gradient(180deg, #fdf8f0 0%, #faf2e4 100%);
  border: 1px solid rgba(210, 175, 90, 0.32);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
#feuille-temps-choisir-projet-catalog-wrap .feuille-temps-choisir-catalog-item[data-in-week="true"]:focus-visible {
  outline: 2px solid rgba(180, 140, 50, 0.45);
  outline-offset: 2px;
}
/* Projets ajoutés : même texte fluide / entier que « Tous les projets » (hors lignes catalogue qui ont aussi added-item). */
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-added-list .feuille-temps-choisir-added-item.formulaire-feuille-temps-item .formulaire-feuille-temps-item-label {
  pointer-events: none;
  font-size: clamp(0.9375rem, 0.8rem + 0.72vw, 1.0625rem);
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.38;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-added-list .feuille-temps-choisir-added-item.formulaire-feuille-temps-item {
  align-items: flex-start;
  font-size: clamp(0.9375rem, 0.8rem + 0.72vw, 1.0625rem);
  color: var(--text, #0f172a);
  padding: 12px 14px;
  gap: 10px;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-added-list .feuille-temps-choisir-added-item .formulaire-feuille-temps-item-actions {
  align-self: center;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-added-list .feuille-temps-choisir-catalog-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-added-list .feuille-temps-dropdown-star-wrap {
  flex-shrink: 0;
  pointer-events: auto;
  margin-top: 2px;
}
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-added-list .feuille-temps-choisir-catalog-item-text .formulaire-feuille-temps-item-label {
  pointer-events: none;
  font-size: clamp(0.9375rem, 0.8rem + 0.72vw, 1.0625rem);
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.38;
}
.feuille-temps-choisir-search-row .formulaire-feuille-temps-search {
  flex: 1;
  min-height: 44px;
  height: 44px;
  padding: 10px 16px;
}
/* Champ recherche uniquement sur Choisir un projet : bordure verte */
#feuille-temps-choisir-projet-screen .formulaire-feuille-temps-search {
  border-color: #22c55e;
}
#feuille-temps-choisir-projet-screen .formulaire-feuille-temps-search:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.app-theme-night #feuille-temps-choisir-projet-screen .formulaire-feuille-temps-search {
  border-color: #4ade80;
}
.app-theme-night #feuille-temps-choisir-projet-screen .formulaire-feuille-temps-search:focus {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
}
.feuille-temps-choisir-search-keyboard-btn {
  flex-shrink: 0;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-choisir-search-keyboard-btn:hover,
.feuille-temps-choisir-search-keyboard-btn:active {
  background: rgba(0, 0, 0, 0.08);
}
.app-theme-night .feuille-temps-choisir-search-keyboard-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border);
}
.app-theme-night .feuille-temps-choisir-search-keyboard-btn:hover,
.app-theme-night .feuille-temps-choisir-search-keyboard-btn:active {
  background: rgba(255, 255, 255, 0.14);
}
.feuille-temps-choisir-search-arrow {
  flex-shrink: 0;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-choisir-search-arrow:hover,
.feuille-temps-choisir-search-arrow:active {
  background: rgba(0, 0, 0, 0.08);
}
.feuille-temps-choisir-search-arrow[aria-expanded="true"] .feuille-temps-arrow-right {
  display: none;
}
.feuille-temps-choisir-search-arrow[aria-expanded="true"] .feuille-temps-arrow-down {
  display: block !important;
}
.feuille-temps-choisir-search-arrow[aria-expanded="false"] .feuille-temps-arrow-right {
  display: block;
}
.feuille-temps-choisir-search-arrow[aria-expanded="false"] .feuille-temps-arrow-down {
  display: none !important;
}
.feuille-temps-tasks-search-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: stretch;
}
.feuille-temps-tasks-search-input-wrap .formulaire-feuille-temps-search {
  flex: 1;
  min-height: 44px;
  height: 44px;
  padding: 10px 16px;
}
.feuille-temps-choisir-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
/* Dropdown directement sous la recherche : jusqu'en bas de l'écran sur Choisir un projet */
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: min(420px, calc(100vh - 220px));
}
/* La sous-ligne du bouton imposait 0.75rem — on aligne sur le catalogue pour les noms de projet. */
#feuille-temps-choisir-projet-screen .feuille-temps-choisir-dropdown-ligne {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}
.feuille-temps-choisir-search-dropdown[hidden] {
  display: none !important;
}
.feuille-temps-choisir-search-dropdown-list {
  padding: 6px 0;
}
.feuille-temps-choisir-search-dropdown-item {
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.feuille-temps-choisir-search-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-choisir-dropdown-table-wrap {
  overflow-x: auto;
  padding: 0 6px 6px;
}
.feuille-temps-choisir-dropdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.feuille-temps-choisir-dropdown-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
}
.feuille-temps-choisir-dropdown-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.feuille-temps-choisir-dropdown-row {
  cursor: pointer;
}
.feuille-temps-choisir-dropdown-row:hover {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-choisir-dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feuille-temps-choisir-dropdown-row .feuille-temps-choisir-dropdown-ligne {
  flex: 1;
  min-width: 0;
}
.feuille-temps-dropdown-star-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
}
.feuille-temps-dropdown-star-wrap:hover {
  background: rgba(234, 179, 8, 0.15);
}
.feuille-temps-dropdown-star {
  width: 18px;
  height: 18px;
  display: block;
}
.feuille-temps-dropdown-star-wrap .feuille-temps-dropdown-star {
  fill: none;
  stroke: var(--text-muted);
}
.feuille-temps-dropdown-star-wrap[data-favori="true"] .feuille-temps-dropdown-star,
.feuille-temps-dropdown-star-filled {
  fill: #eab308 !important;
  stroke: #eab308 !important;
}
.feuille-temps-dropdown-add-popover {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 6px 0;
  min-width: 180px;
}
.feuille-temps-dropdown-add-popover-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.feuille-temps-dropdown-add-popover-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-favoris-popup {
  position: fixed;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  min-width: 220px;
  max-width: 320px;
  max-height: 280px;
  overflow-y: auto;
}
.feuille-temps-favoris-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.feuille-temps-favoris-popup-header-title {
  flex: 0 1 auto;
  line-height: 1.3;
}
.feuille-temps-favoris-popup-counts {
  flex: 0 1 auto;
  margin-left: auto;
  text-align: right;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 58%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 10px;
}
.feuille-temps-favoris-popup-count-pill {
  white-space: nowrap;
}
.feuille-temps-favoris-popup-count-pill strong {
  font-weight: 700;
  color: var(--text);
}
.feuille-temps-favoris-popup-count-sep {
  color: var(--text-muted);
  user-select: none;
}
.feuille-temps-favoris-popup-count-pill--other strong {
  color: var(--text-muted);
}
.feuille-temps-favoris-popup-list {
  padding: 6px 0;
}
.feuille-temps-favoris-popup-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.feuille-temps-favoris-popup-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-favoris-popup-empty {
  padding: 16px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.feuille-temps-choisir-dropdown-ligne {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  max-width: 100%;
}
.formulaire-feuille-temps-item .feuille-temps-choisir-dropdown-ligne {
  font-size: 0.75rem;
  flex: 1;
  min-width: 0;
}
.formulaire-feuille-temps-projet-add-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.formulaire-feuille-temps-projet-add-btn:hover,
.formulaire-feuille-temps-projet-add-btn:active {
  background: rgba(0, 0, 0, 0.08);
}
.formulaire-feuille-temps-projet-results {
  position: relative;
  margin-bottom: 20px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  display: none;
}
.formulaire-feuille-temps-projet-results.visible {
  display: block;
}
.formulaire-feuille-temps-projet-results-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  color: var(--text);
}
.formulaire-feuille-temps-projet-results-item:last-child {
  border-bottom: none;
}
.formulaire-feuille-temps-projet-results-item:hover,
.formulaire-feuille-temps-projet-results-item:active {
  background: rgba(0, 0, 0, 0.04);
}
.formulaire-feuille-temps-projet-results-item.selected {
  background: rgba(59, 130, 246, 0.12);
  font-weight: 500;
}
.formulaire-feuille-temps-projet-results-msg {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.formulaire-feuille-temps-projet-results-error {
  color: #dc2626;
}
.formulaire-feuille-temps-projets-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.formulaire-feuille-temps-projet-item {
  cursor: pointer;
}
.formulaire-feuille-temps-projet-item .formulaire-feuille-temps-item-label {
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* Écran Catégorie : nom + ligne actifs / avec heures / total H (jour ou semaine) */
.feuille-temps-categorie-item .feuille-temps-categorie-item-label {
  pointer-events: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.feuille-temps-categorie-name {
  font-weight: 600;
  color: var(--text, #0f172a);
}
/* Catégorie feuille de temps : pastilles types de travaux (affichage seulement) */
.feuille-temps-categorie-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.feuille-temps-categorie-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
}
.feuille-temps-categorie-type-tag--sablage {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.45);
}
.feuille-temps-categorie-type-tag--balayage {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.4);
}
.feuille-temps-categorie-type-tag--pavage {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #334155;
  border-color: rgba(100, 116, 139, 0.45);
}
.feuille-temps-categorie-type-tag--excavation {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
  border-color: rgba(249, 115, 22, 0.45);
}
.feuille-temps-categorie-type-tag--neige {
  background: linear-gradient(180deg, #ffffff 0%, #e0f2fe 100%);
  color: #0c4a6e;
  border-color: rgba(125, 211, 252, 0.55);
}
.feuille-temps-categorie-type-tag--aggregats {
  background: linear-gradient(180deg, #fafaf9 0%, #e7e5e4 100%);
  color: #57534e;
  border-color: rgba(120, 113, 108, 0.45);
}
.feuille-temps-categorie-stats {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}
.feuille-temps-categorie-stats--active {
  color: #15803d;
  font-weight: 600;
}
.feuille-temps-categorie-stats--active .feuille-temps-categorie-stat-num {
  color: #16a34a;
}
.feuille-temps-categorie-stat-dot {
  opacity: 0.55;
  user-select: none;
}
.feuille-temps-categorie-stat-num {
  font-variant-numeric: tabular-nums;
}
.formulaire-feuille-temps-search {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
  background: #ffffff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.formulaire-feuille-temps-search:focus {
  border-color: #2563eb;
}
.formulaire-feuille-temps-search::placeholder {
  color: var(--text-muted);
}
/* Tactile : Safari iOS zoome si font-size sous 16px au focus — recherche feuille / choisir projet. */
@media (pointer: coarse) {
  .formulaire-feuille-temps-search {
    font-size: 16px;
  }
}
.formulaire-feuille-temps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Semaine active (courante) - fond vert visible pour la repérer */
.formulaire-feuille-temps-item.feuille-temps-week-current {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 50%, #86efac 100%) !important;
  border: 2px solid #16a34a !important;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.4);
}
.formulaire-feuille-temps-item.feuille-temps-week-current .formulaire-feuille-temps-item-label {
  font-weight: 700;
  color: #166534 !important;
}
.formulaire-feuille-temps-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.formulaire-feuille-temps-item:active {
  background: rgba(0, 0, 0, 0.03);
}
.formulaire-feuille-temps-item.feuille-temps-week-current:active {
  background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%) !important;
}
@media (hover: hover) {
  .formulaire-feuille-temps-item:hover { background: rgba(0, 0, 0, 0.03); }
  .formulaire-feuille-temps-item.feuille-temps-week-current:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%) !important;
  }
}
.formulaire-feuille-temps-item-label {
  flex: 1;
  min-width: 0;
}
/* Liste des semaines : total heures entre le libellé et la flèche */
#feuille-temps-list .feuille-temps-week-list-total {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}
#feuille-temps-list .feuille-temps-week-list-total--has-hours {
  color: #15803d;
}
#feuille-temps-list .feuille-temps-week-list-hours-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}
#feuille-temps-list .feuille-temps-week-current .feuille-temps-week-list-total--has-hours {
  color: #166534;
}
.feuille-temps-projet-check-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-projet-check-wrap .feuille-temps-projet-check {
  width: 20px;
  height: 20px;
}
.feuille-temps-list-validated-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  flex-shrink: 0;
}
.feuille-temps-list-validated-badge svg {
  width: 20px;
  height: 20px;
}
.formulaire-feuille-temps-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: fit-content;
}
.feuille-temps-projet-item .formulaire-feuille-temps-item-actions {
  min-width: 100px;
}
.feuille-temps-projet-hours-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.feuille-temps-projet-hours {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 2.2em;
}
.feuille-temps-projet-hours-by-bon {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  text-align: right;
  line-height: 1.25;
  max-width: 160px;
  word-break: break-word;
}
.feuille-temps-projet-hours-check {
  display: flex;
  align-items: center;
  color: #22c55e;
}
.feuille-temps-projet-hours-check svg {
  width: 16px;
  height: 16px;
}
.feuille-temps-projet-eye-btn {
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.feuille-temps-projet-eye-btn:active { color: var(--text); background: rgba(0, 0, 0, 0.06); }
@media (hover: hover) { .feuille-temps-projet-eye-btn:hover { color: var(--text); background: rgba(0, 0, 0, 0.06); } }
.feuille-temps-list-unvalidate-btn,
.feuille-temps-list-reset-btn {
  padding: 6px 10px;
  border: none;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  white-space: nowrap;
}
.feuille-temps-list-unvalidate-btn:active {
  background: rgba(220, 38, 38, 0.2);
}
@media (hover: hover) {
  .feuille-temps-list-unvalidate-btn:hover { background: rgba(220, 38, 38, 0.18); }
}

.feuille-temps-projet-trash-btn {
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.feuille-temps-projet-trash-btn:active { color: #dc2626; background: rgba(220, 38, 38, 0.08); }
@media (hover: hover) { .feuille-temps-projet-trash-btn:hover { color: #dc2626; background: rgba(220, 38, 38, 0.08); } }
.feuille-temps-projet-trash-btn-disabled,
.feuille-temps-projet-trash-btn:disabled {
  color: var(--text-muted);
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.formulaire-feuille-temps-item-delete {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.formulaire-feuille-temps-item-delete:active {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
@media (hover: hover) {
  .formulaire-feuille-temps-item-delete:hover { color: #dc2626; background: rgba(220, 38, 38, 0.08); }
}
.formulaire-feuille-temps-item-arrow {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.formulaire-feuille-temps-item-arrow:active {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
}
@media (hover: hover) {
  .formulaire-feuille-temps-item-arrow:hover { color: var(--primary); background: rgba(59, 130, 246, 0.12); }
}

/* Écran jours de la semaine - en-tête */
.feuille-temps-jours-header .feuille-temps-jours-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.feuille-temps-jours-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.feuille-temps-jours-header .feuille-temps-jours-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Écran jours de la semaine - liste plus étroite, espacement selon hauteur écran */
.feuille-temps-jours-list {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.8vh, 14px);
}
.feuille-temps-jour-item {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vh, 14px);
  padding: clamp(10px, 1.5vh, 16px) clamp(12px, 2.5vh, 18px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: clamp(8px, 2vh, 12px);
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  min-height: 44px;
}
.feuille-temps-jour-letter-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.feuille-temps-jour-item .feuille-temps-jour-date {
  flex: 0 0 auto;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.feuille-temps-jour-item--controller .feuille-temps-jour-total {
  flex: 0 0 auto;
  min-width: 3.25rem;
}
.feuille-temps-jour-controller-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 6px;
}
.feuille-temps-jour-unvalidate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 50%;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08), 0 2px 8px rgba(245, 158, 11, 0.18);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.feuille-temps-jour-unvalidate-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feuille-temps-jour-unvalidate-btn-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.feuille-temps-jour-unvalidate-btn:hover:not(:disabled),
.feuille-temps-jour-unvalidate-btn:active:not(:disabled) {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
  color: #78350f;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.28);
}
.feuille-temps-jour-unvalidate-btn:active:not(:disabled) {
  transform: scale(0.98);
}
.feuille-temps-jour-unvalidate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.feuille-temps-jour-total {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.feuille-temps-jour-total-value {
  display: inline-block;
  pointer-events: auto;
  cursor: pointer;
}
/* Rouge = heures à valider (pas encore validées) */
.feuille-temps-jour-letter-circle.completed {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}
/* Vert = heures validées */
.feuille-temps-jour-letter-circle.validated {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}
.feuille-temps-jour-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.feuille-temps-jour-arrow svg {
  width: 18px;
  height: 18px;
}
.feuille-temps-jour-item {
  cursor: pointer;
}

/* Écran Entrée de temps (par jour) - même style que feuille de temps */
.feuille-temps-entree-screen {
  background: transparent;
  padding: 0;
}
.feuille-temps-entree-header {
  background: transparent;
  padding: 6px 16px 10px 6px;
  padding-left: 6px;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-entree-header-spacer {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  pointer-events: none;
}
#feuille-temps-entree-screen #feuille-temps-entree-date.formulaire-title {
  font-weight: 700;
}
#feuille-temps-entree-screen.feuille-temps-entree-has-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Barre basse fixe : overflow visible pour ombres / hit targets si besoin */
  overflow: visible;
  overscroll-behavior: none;
  min-height: 0;
}
#feuille-temps-entree-screen.feuille-temps-entree-has-bottom-bar .feuille-temps-entree-header {
  padding-bottom: 0;
  margin-bottom: 0;
}
#feuille-temps-entree-screen.feuille-temps-entree-has-bottom-bar .formulaire-main-entree {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 0;
  margin-top: 0;
  /* Marge pour barre basse (suppr. du disque Calculer au centre) */
  padding-bottom: calc(20px + 56px + max(8px, env(safe-area-inset-bottom, 0px)));
}

#feuille-temps-entree-screen .formulaire-main-entree.mobile-kb-active {
  -webkit-overflow-scrolling: touch;
}

#feuille-temps-entree-screen .feuille-temps-entree-comment {
  scroll-margin-top: 12px;
  scroll-margin-bottom: min(50vh, 460px);
}
.feuille-temps-entree-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  padding: 4px 10px max(5px, env(safe-area-inset-bottom, 0px));
  margin: 0;
  overflow: visible;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.feuille-temps-entree-footer-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 4px 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, background 0.15s;
}
.feuille-temps-entree-footer-btn:active:not(:disabled) {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-entree-footer-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.feuille-temps-entree-footer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}
.feuille-temps-entree-footer-btn-save .feuille-temps-entree-footer-icon {
  color: #16a34a;
}
.feuille-temps-entree-footer-btn-delete .feuille-temps-entree-footer-icon {
  color: #dc2626;
}
.feuille-temps-entree-footer-btn-delete:disabled .feuille-temps-entree-footer-icon {
  color: var(--text-muted);
}
.feuille-temps-entree-footer-total {
  font-size: 0.78rem;
  font-weight: 700;
  color: #15803d;
  line-height: 1.1;
}
.feuille-temps-entree-footer-btn-save:disabled .feuille-temps-entree-footer-total {
  opacity: 0.85;
}
.feuille-temps-entree-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feuille-temps-entree-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-entree-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.formulaire-main-entree {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 24px 24px 24px;
  background: transparent;
}
/* Même largeur utile que .feuille-temps-entree-card (pleine largeur entre les padding24px du main). */
.feuille-temps-entree-calc-strip-wrap {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.feuille-temps-entree-calc-strip-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.feuille-temps-entree-calc-strip-btn:hover:not(:disabled) {
  background: #1d4ed8;
}
.feuille-temps-entree-calc-strip-btn:active:not(:disabled) {
  background: #1e40af;
  transform: scale(0.99);
}
.feuille-temps-entree-calc-strip-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.feuille-temps-entree-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.feuille-temps-entree-header .formulaire-title {
  flex: 1;
  min-width: 0;
}
.feuille-temps-entree-btn-icon {
  font-size: 1.1rem;
}
.feuille-temps-entree-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow-x: hidden;
}
.feuille-temps-entree-quarts-section {
  padding: 0;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
/* À 3 quarts le « + Quart » est masqué et le dernier bloc retire la bordure de sa grille : on garde le trait de section pour séparer des lignes Régulier / Dîner / etc. */
.feuille-temps-entree-quarts-section--max-quarts .feuille-temps-entree-quarts-list {
  margin-bottom: 0;
}
.feuille-temps-entree-quart-block--last-at-cap .feuille-temps-entree-quart-grid {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.feuille-temps-entree-quart-block--last-at-cap {
  margin-bottom: 0;
}
.feuille-temps-entree-quarts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.feuille-temps-entree-quart-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 8px;
}
/* Clic sur la carte (ex. libellé « Quart 1 », labels Début / Fin) ouvre le modal des heures — hors lecture seule */
#feuille-temps-entree-screen:not(.feuille-temps-entree-readonly) .feuille-temps-entree-quart-block {
  cursor: pointer;
}
.feuille-temps-entree-quart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* Grille 3 lignes : (1) Début / Fin ; (2) Quart n° + heures ; (3) icônes col. 1 sous « Quart » (supprimer quart, œil), Bon + Activité cols 2–3 */
.feuille-temps-entree-quart-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, max-content) 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-entree-quart-grid-debut-lbl {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
}
.feuille-temps-entree-quart-grid-fin-lbl {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  margin: 0;
  min-width: 0;
}
.feuille-temps-entree-quart-grid-num {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  margin: 0;
  padding-right: 0;
}
.feuille-temps-entree-quart-grid-debut {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  min-width: 0;
}
.feuille-temps-entree-quart-grid-fin {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
/* Icônes sous le libellé « Quart n » (col. 1), pas sous Début / Fin */
.feuille-temps-entree-quart-grid-actions-icons {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  justify-self: start;
  margin-top: 0;
  overflow: visible;
  min-width: 4.75rem;
}
.feuille-temps-entree-quart-block[data-index="0"] .feuille-temps-entree-quart-grid-actions-icons {
  min-width: 5.75rem;
}
.feuille-temps-entree-quart-eye-cluster {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.feuille-temps-entree-quart-grid-actions {
  grid-column: 2 / span 2;
  grid-row: 3;
  align-self: start;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
}
.feuille-temps-entree-quart-num {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  min-width: 4.25rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.feuille-temps-entree-quart-add-quart-wrap {
  width: 100%;
  margin-top: 12px;
  padding-top: 2px;
}
.feuille-temps-entree-btn-quart-below {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: #ffffff;
  color: #1d4ed8;
  border: 2px solid rgba(37, 99, 235, 0.45);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.feuille-temps-entree-btn-quart-below:hover:not(:disabled),
.feuille-temps-entree-btn-quart-below:active:not(:disabled) {
  background: rgba(37, 99, 235, 0.08);
  border-color: #2563eb;
}
.feuille-temps-entree-btn-quart-below:disabled {
  cursor: not-allowed;
}
.feuille-temps-entree-quart-remove-row {
  display: flex;
  justify-content: flex-start;
  padding-left: 0;
  margin-top: 2px;
}
.feuille-temps-entree-quart-row .feuille-temps-entree-debut-fin-cell {
  flex: 1;
  min-width: 0;
}
.feuille-temps-entree-quart-grid .feuille-temps-entree-debut-fin-cell {
  min-width: 0;
}
.feuille-temps-entree-quart-actions-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 5px 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.feuille-temps-entree-quart-actions-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex-shrink: 0;
}
.feuille-temps-entree-quart-actions-line .feuille-temps-entree-quart-bon-btn {
  grid-column: 1;
  min-width: 0;
}
.feuille-temps-entree-quart-actions-line .feuille-temps-entree-quart-activite-btn {
  grid-column: 2;
  min-width: 0;
}
.feuille-temps-entree-quart-q1-chrono-hint {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  color: #64748b;
  letter-spacing: 0.01em;
  text-align: center;
  pointer-events: auto;
  cursor: text;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.feuille-temps-entree-quart-actions-icons .feuille-temps-entree-quart-icon-btn {
  width: 30px;
  min-height: 30px;
}
.feuille-temps-entree-quart-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.feuille-temps-entree-quart-icon-btn:hover:not(:disabled),
.feuille-temps-entree-quart-icon-btn:active:not(:disabled) {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #94a3b8;
}
.feuille-temps-entree-quart-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.feuille-temps-entree-quart-preview-btn {
  color: #171717;
  border: 1px solid #ca8a04;
  background: #facc15;
}
.feuille-temps-entree-quart-preview-btn:hover:not(:disabled),
.feuille-temps-entree-quart-preview-btn:active:not(:disabled) {
  background: #eab308;
  border-color: #a16207;
  color: #171717;
}
.feuille-temps-entree-quart-preview-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}
/* Quart 1 uniquement : case à cocher même gabarit que le bouton œil (30×30). */
.feuille-temps-entree-quart-q1-check-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-entree-quart-q1-check {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.feuille-temps-entree-quart-q1-check:disabled {
  cursor: not-allowed;
}
.feuille-temps-entree-quart-q1-check-wrap:has(.feuille-temps-entree-quart-q1-check:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}
.feuille-temps-entree-quart-q1-check-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  pointer-events: none;
  transition: background 0.15s, border-color 0.15s;
}
.feuille-temps-entree-quart-q1-check-ui::after {
  content: '';
  width: 8px;
  height: 14px;
  border: solid transparent;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
}
.feuille-temps-entree-quart-q1-check:checked + .feuille-temps-entree-quart-q1-check-ui {
  border-color: #ca8a04;
  background: #fef9c3;
}
.feuille-temps-entree-quart-q1-check:checked + .feuille-temps-entree-quart-q1-check-ui::after {
  border-color: #171717;
  transform: rotate(45deg) scale(1);
}
.feuille-temps-entree-quart-q1-check-wrap:hover .feuille-temps-entree-quart-q1-check-ui {
  border-color: #94a3b8;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.feuille-temps-entree-quart-q1-check:focus-visible + .feuille-temps-entree-quart-q1-check-ui {
  outline: 2px solid rgba(202, 138, 4, 0.85);
  outline-offset: 1px;
}
.feuille-temps-entree-quart-act-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  letter-spacing: -0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 2;
}
.feuille-temps-entree-quart-bon-btn {
  flex-shrink: 1;
  padding: 3px 5px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
  min-width: 0;
  min-height: 30px;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.feuille-temps-entree-quart-bon-btn:hover:not(:disabled),
.feuille-temps-entree-quart-bon-btn:active:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #ffffff;
}
.feuille-temps-entree-quart-bon-btn:disabled {
  cursor: not-allowed;
}
.feuille-temps-entree-quart-activite-btn {
  flex-shrink: 1;
  padding: 3px 5px;
  border-radius: 6px;
  background: #16a34a;
  color: #ffffff;
  border: 1px solid #15803d;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  min-width: 0;
  min-height: 30px;
  box-sizing: border-box;
}
.feuille-temps-entree-quart-activite-btn:hover:not(:disabled),
.feuille-temps-entree-quart-activite-btn:active:not(:disabled) {
  background: #15803d;
  border-color: #166534;
  color: #ffffff;
}
.feuille-temps-entree-quart-activite-btn:disabled {
  cursor: not-allowed;
}
.feuille-temps-entree-total-span-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 8px;
}
.feuille-temps-entree-total-span-row:hover,
.feuille-temps-entree-total-span-row:active {
  background: rgba(0, 0, 0, 0.08);
  border-color: #94a3b8;
}
.feuille-temps-entree-total-arrow {
  color: var(--text-muted);
  font-weight: 500;
}
.feuille-temps-entree-diner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-entree-diner-row > span:first-child {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.feuille-temps-entree-diner-row .feuille-temps-entree-diner-display {
  font-weight: 600;
  color: var(--text);
}
/* Même emphase que « Dîner / pause » pour Régulier / Supp. */
.feuille-temps-entree-fields > .feuille-temps-entree-row:not(.feuille-temps-entree-diner-row) > span:first-child {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.feuille-temps-entree-diner-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}
.feuille-temps-entree-quart-row [role="button"],
.feuille-temps-entree-quart-grid [role="button"] {
  padding: 10px 14px;
  background: rgba(220, 252, 231, 0.35);
  border: 2px solid #22c55e;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}
.feuille-temps-entree-quart-grid .feuille-temps-entree-quart-grid-debut [role="button"],
.feuille-temps-entree-quart-grid .feuille-temps-entree-quart-grid-fin[role="button"] {
  width: 100%;
  box-sizing: border-box;
}
.feuille-temps-entree-quart-row [role="button"]:hover,
.feuille-temps-entree-quart-row [role="button"]:active,
.feuille-temps-entree-quart-grid [role="button"]:hover,
.feuille-temps-entree-quart-grid [role="button"]:active {
  background: rgba(134, 239, 172, 0.45);
  border-color: #16a34a;
}
.feuille-temps-entree-quart-remove {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
  font-size: 0.9rem;
  cursor: pointer;
}
.feuille-temps-entree-quart-remove:hover {
  background: rgba(220, 38, 38, 0.2);
}
/* Poubelle « supprimer le quart » : même gabarit 30×30 que le bouton œil (icon-btn) */
.feuille-temps-entree-quart-remove--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border: none;
  border-radius: 6px;
  background: #7f1d1d;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.12s;
}
.feuille-temps-entree-quart-remove--icon:hover:not(:disabled),
.feuille-temps-entree-quart-remove--icon:active:not(:disabled) {
  background: #991b1b;
}
.feuille-temps-entree-quart-remove--icon:active:not(:disabled) {
  transform: scale(0.96);
}
.feuille-temps-entree-quart-remove--icon svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: block;
}
.feuille-temps-entree-quart-remove--icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.feuille-temps-calc-quarts-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.feuille-temps-calc-quart-block {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-calc-quart-block:last-child {
  border-bottom: none;
}
.feuille-temps-calc-quart-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.feuille-temps-calc-quart-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
}
.feuille-temps-calc-quart-header .feuille-temps-entree-label-sm {
  flex: 1;
  text-align: center;
}
.feuille-temps-calc-quart-arrow-placeholder {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.feuille-temps-calc-quart-arrow {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: 2px solid var(--border);
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feuille-temps-calc-quart-arrow:hover,
.feuille-temps-calc-quart-arrow:active {
  background: rgba(0, 0, 0, 0.12);
  border-color: #94a3b8;
}
.feuille-temps-calc-quart-row .feuille-temps-modal-field {
  flex: 1;
  min-width: 120px;
}
.feuille-temps-calc-quart-fields-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 16px;
}
.feuille-temps-calc-quart-fields-row .feuille-temps-modal-field {
  flex: 1;
  min-width: 0;
}
.feuille-temps-calc-poursuivre-journee-wrap {
  width: 100%;
  margin-top: 4px;
  padding: 0 2px 4px;
  box-sizing: border-box;
}
.feuille-temps-calc-poursuivre-journee-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-calc-poursuivre-journee-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #ca8a04;
  cursor: pointer;
}
.feuille-temps-calc-poursuivre-journee-text {
  flex: 1;
  min-width: 0;
}
.feuille-temps-calc-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.feuille-temps-calc-modal-actions .feuille-temps-modal-btn-bw {
  flex: 1;
  margin-bottom: 0;
}
/* Modale Calculer les heures : bouton → (validation) — bordure verte */
#feuille-temps-calc-btn-calc.feuille-temps-modal-btn-bw {
  border-color: #22c55e;
  color: #166534;
}
#feuille-temps-calc-btn-calc.feuille-temps-modal-btn-bw:hover:not(:disabled),
#feuille-temps-calc-btn-calc.feuille-temps-modal-btn-bw:active:not(:disabled) {
  border-color: #16a34a;
  background: rgba(220, 252, 231, 0.9);
  color: #14532d;
}
/* Même traitement pour le bouton → du modal Dîner / pause (entrée de temps) */
#feuille-temps-diner-appliquer.feuille-temps-modal-btn-bw {
  border-color: #22c55e;
  color: #166534;
}
#feuille-temps-diner-appliquer.feuille-temps-modal-btn-bw:hover:not(:disabled),
#feuille-temps-diner-appliquer.feuille-temps-modal-btn-bw:active:not(:disabled) {
  border-color: #16a34a;
  background: rgba(220, 252, 231, 0.9);
  color: #14532d;
}
.app-theme-night #feuille-temps-calc-btn-calc.feuille-temps-modal-btn-bw,
.app-theme-night #feuille-temps-diner-appliquer.feuille-temps-modal-btn-bw {
  border-color: #4ade80;
  color: #bbf7d0;
  background: rgba(15, 23, 42, 0.95);
}
.app-theme-night #feuille-temps-calc-btn-calc.feuille-temps-modal-btn-bw:hover:not(:disabled),
.app-theme-night #feuille-temps-calc-btn-calc.feuille-temps-modal-btn-bw:active:not(:disabled),
.app-theme-night #feuille-temps-diner-appliquer.feuille-temps-modal-btn-bw:hover:not(:disabled),
.app-theme-night #feuille-temps-diner-appliquer.feuille-temps-modal-btn-bw:active:not(:disabled) {
  border-color: #86efac;
  background: rgba(22, 101, 52, 0.35);
  color: #ecfdf5;
}
.feuille-temps-entree-row-debut-fin {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-entree-debut-fin-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.feuille-temps-entree-debut-fin-cell [role="button"] {
  padding: 10px 14px;
  background: rgba(220, 252, 231, 0.35);
  border: 2px solid #22c55e;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}
.feuille-temps-entree-debut-fin-cell [role="button"]:hover,
.feuille-temps-entree-debut-fin-cell [role="button"]:active {
  background: rgba(134, 239, 172, 0.45);
  border-color: #16a34a;
}
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-quart-grid [role="button"],
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-quart-row [role="button"],
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-debut-fin-cell [role="button"] {
  background: rgba(22, 101, 52, 0.35);
  border-color: #4ade80;
  color: #ecfdf5;
}
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-quart-grid [role="button"]:hover,
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-quart-grid [role="button"]:active,
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-quart-row [role="button"]:hover,
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-quart-row [role="button"]:active,
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-debut-fin-cell [role="button"]:hover,
.app-theme-night #feuille-temps-entree-screen .feuille-temps-entree-debut-fin-cell [role="button"]:active {
  background: rgba(34, 197, 94, 0.25);
  border-color: #86efac;
}
.feuille-temps-entree-label-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.feuille-temps-entree-fields .feuille-temps-entree-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.feuille-temps-entree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-entree-row:last-of-type {
  border-bottom: none;
}
.feuille-temps-entree-row [role="button"] {
  cursor: pointer;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-entree-row [role="button"]:hover,
.feuille-temps-entree-row [role="button"]:active {
  background: rgba(0, 0, 0, 0.08);
}
.feuille-temps-entree-row button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feuille-temps-entree-row button:hover,
.feuille-temps-entree-row button:active {
  background: rgba(0, 0, 0, 0.08);
}
.feuille-temps-entree-label {
  font-size: 0.95rem;
  color: var(--text);
}
.feuille-temps-entree-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}
.feuille-temps-entree-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feuille-temps-entree-stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-entree-stepper-btn:hover,
.feuille-temps-entree-stepper-btn:active {
  background: rgba(0, 0, 0, 0.08);
}
.feuille-temps-entree-stepper-value {
  min-width: 48px;
  text-align: center;
  font-size: 1rem;
}
.feuille-temps-entree-times {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  margin-top: 8px;
}
.feuille-temps-entree-time-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feuille-temps-entree-time-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-entree-time-value {
  font-size: 1.1rem;
  color: var(--text);
}
.feuille-temps-entree-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.feuille-temps-entree-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-entree-section-header svg {
  flex-shrink: 0;
  color: var(--text-muted);
}
.feuille-temps-entree-btn-add {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feuille-temps-entree-btn-add:hover,
.feuille-temps-entree-btn-add:active {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.feuille-temps-entree-btn-secondary {
  align-self: flex-start;
  padding: 10px 18px;
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.feuille-temps-entree-btn-secondary:hover,
.feuille-temps-entree-btn-secondary:active {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  border-color: #94a3b8;
}
.feuille-temps-entree-comment-wrap {
  min-width: 0;
  overflow: hidden;
}
.feuille-temps-entree-comment {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
.feuille-temps-entree-comment-hint {
  margin: 8px 0 0;
  padding: 0 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted, rgba(100, 116, 139, 0.95));
}
.feuille-temps-entree-signature-section .feuille-temps-entree-section-header span {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-required {
  color: #b91c1c;
}
.feuille-temps-entree-activites-eye-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}
.feuille-temps-entree-activites-eye-badge[hidden] {
  display: none !important;
}
.feuille-temps-entree-activites-list {
  margin-top: 8px;
  margin-bottom: 4px;
}
.feuille-temps-entree-activites-list[hidden] {
  display: none !important;
}
.feuille-temps-entree-activites-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feuille-temps-entree-activites-oneline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.feuille-temps-entree-activites-text {
  flex: 0 0 auto;
  white-space: nowrap;
}
.feuille-temps-entree-activite-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.feuille-temps-entree-activites-modal-box {
  max-width: 420px;
  min-width: 320px;
}
.feuille-temps-entree-activites-modal-box .feuille-temps-modal-title {
  color: #1e40af;
}
.feuille-temps-entree-activites-modal-list {
  max-height: min(58dvh, calc(100svh - 12rem));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 16px;
}
.feuille-temps-entree-activites-modal-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.feuille-temps-entree-activites-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.95rem;
  color: #1e40af;
}
.feuille-temps-entree-activites-modal-item--primary {
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: none;
}
.feuille-temps-entree-activites-modal-others-lead {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(30, 64, 175, 0.75);
}
.feuille-temps-entree-activites-modal-others {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(59, 130, 246, 0.04);
}
.feuille-temps-entree-activites-modal-item--other {
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}
.feuille-temps-entree-activites-modal-item--other:last-child {
  border-bottom: none;
}
.feuille-temps-entree-activites-modal-box .feuille-temps-modal-btn-bw {
  color: #c9a227;
  border-color: rgba(201, 162, 39, 0.5);
}
.feuille-temps-entree-activites-modal-box .feuille-temps-modal-btn-bw:hover {
  background: rgba(201, 162, 39, 0.15);
  color: #d4af37;
}
.feuille-temps-entree-activites-modal-item-text {
  flex: 1;
  min-width: 0;
}
.feuille-temps-entree-activites-modal-remove {
  flex-shrink: 0;
  padding: 6px;
  border: none;
  background: transparent;
  color: rgba(239, 68, 68, 0.9);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-entree-activites-modal-remove:hover {
  color: #ef4444;
}
.feuille-temps-entree-quart-detail-modal-box {
  max-width: 400px;
  min-width: 280px;
  max-height: min(88dvh, calc(100svh - var(--feuille-temps-modal-top-clear, 20px) - var(--feuille-temps-modal-bottom-clear, 88px)));
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.feuille-temps-entree-quart-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.feuille-temps-entree-quart-detail-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-entree-quart-detail-header-total {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
  line-height: 1.2;
  max-width: 42%;
}
.feuille-temps-entree-modal .feuille-temps-entree-quart-detail-header .feuille-temps-modal-title {
  margin: 0;
}
.feuille-temps-entree-quart-detail-header-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-entree-quart-detail-header-close:hover {
  background: rgba(0, 0, 0, 0.06);
}
.feuille-temps-entree-quart-detail-header-close:active {
  background: rgba(0, 0, 0, 0.1);
}
.feuille-temps-entree-quart-detail-dl {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 0;
  /* Plein écran : sans ça, le contenu excédentaire vertical étire les lignes de grille entre dt et dd. */
  align-content: start;
  font-size: 0.95rem;
  align-items: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.feuille-temps-entree-quart-detail-dl dt:not(:first-of-type) {
  margin-top: 10px;
}
.feuille-temps-entree-quart-detail-dl::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.feuille-temps-entree-quart-detail-dl dt {
  margin: 0;
  font-weight: 700;
  color: var(--text-muted);
}
.feuille-temps-entree-quart-detail-dl dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}
.feuille-temps-entree-quart-detail-dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.feuille-temps-entree-quart-detail-dd--acts {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
}
.feuille-temps-entree-quart-detail-act-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.feuille-temps-entree-quart-detail-act-empty {
  color: var(--text-muted);
}
.feuille-temps-entree-quart-detail-act-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.feuille-temps-entree-quart-detail-act-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  word-break: break-word;
}
.feuille-temps-entree-quart-detail-act-name:hover {
  text-decoration: underline;
  color: #1d4ed8;
}
.feuille-temps-entree-quart-detail-act-name:disabled {
  cursor: default;
  text-decoration: none;
  color: var(--text-muted);
  opacity: 0.85;
}
.feuille-temps-entree-quart-detail-act-name--readonly {
  display: block;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.feuille-temps-entree-quart-detail-act-alloc {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 3.5rem;
  text-align: right;
}
.feuille-temps-entree-quart-detail-alloc-pop {
  position: fixed;
  z-index: 1400;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
}
.feuille-temps-entree-quart-detail-alloc-pop--locked .feuille-temps-entree-quart-detail-alloc-step,
.feuille-temps-entree-quart-detail-alloc-pop--locked .feuille-temps-entree-quart-detail-alloc-value {
  opacity: 0.45;
  pointer-events: none;
}
.feuille-temps-entree-quart-detail-alloc-pop[hidden] {
  display: none !important;
}
.feuille-temps-entree-quart-detail-alloc-pop-inner {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.feuille-temps-entree-quart-detail-alloc-activity {
  margin: 0 0 10px;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--text);
}
.feuille-temps-entree-quart-detail-alloc-activity[hidden] {
  display: none !important;
}
.feuille-temps-entree-quart-detail-alloc-hint {
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}
.feuille-temps-entree-quart-detail-alloc-pop-title {
  display: block;
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}
.feuille-temps-entree-quart-detail-alloc-pop-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.feuille-temps-entree-quart-detail-alloc-step {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  background: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-entree-quart-detail-alloc-step:hover {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-entree-quart-detail-alloc-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.feuille-temps-entree-quart-detail-alloc-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 4.2rem;
  text-align: center;
  color: var(--text);
}
.feuille-temps-entree-quart-detail-act-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.feuille-temps-entree-quart-detail-value {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.feuille-temps-entree-quart-detail-clear-x {
  flex-shrink: 0;
  width: 32px;
  min-width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #dc2626;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-entree-quart-detail-clear-x[hidden] {
  display: none !important;
}
.feuille-temps-entree-quart-detail-clear-x:hover:not(:disabled),
.feuille-temps-entree-quart-detail-clear-x:active:not(:disabled) {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.1);
}
.feuille-temps-entree-quart-detail-clear-x:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.feuille-temps-tasks-added-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
}
.feuille-temps-tasks-added-eye-btn {
  position: relative;
  padding: 6px;
  border: none;
  background: transparent;
  color: #1e40af;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-tasks-added-eye-btn:hover {
  opacity: 0.8;
}
.feuille-temps-entree-activite-calendar {
  padding: 2px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-entree-activite-calendar:hover,
.feuille-temps-entree-activite-calendar:active {
  opacity: 0.8;
}
.feuille-temps-task-calendar-btn {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-task-calendar-btn:hover,
.feuille-temps-task-calendar-btn:active {
  color: var(--text);
}
.feuille-temps-activite-heures-modal {
  z-index: 250;
}
.feuille-temps-activite-heures-modal-box {
  max-width: 320px;
}
.feuille-temps-activite-heures-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feuille-temps-activite-heures-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.feuille-temps-activite-heures-inputs select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
}
.feuille-temps-activite-heures-sep {
  font-weight: 600;
  color: var(--text-muted);
}
.feuille-temps-activite-heures-erreur {
  font-size: 0.9rem;
  color: #b91c1c;
  margin: 8px 0 0;
}
.feuille-temps-activite-heures-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 12px 0 0;
}
.feuille-temps-signature-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feuille-temps-signature-canvas {
  width: 100%;
  max-width: 100%;
  height: 120px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
  display: block;
}
.feuille-temps-signature-clear {
  align-self: flex-start;
  padding: 8px 16px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Modales Entrée de temps : plein écran comme Valider / Envoyer (backdrop + bandeau doré #c9a227 + pied gris). */
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) > .feuille-temps-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: contain;
}
/* Coquille = toute la hauteur dispo sous la barre d’État safe-area (comme dashboard-send-popover plein écran). */
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #ffffff;
  box-sizing: border-box;
}
/* Listes volumineuses : pas de scroll sur la boîte, zone centrale uniquement. */
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-box,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-box,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-modal-box,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-activites-modal-box,
#feuille-temps-calc-modal.feuille-temps-entree-modal .feuille-temps-modal-box,
#feuille-temps-diner-modal.feuille-temps-entree-modal .feuille-temps-modal-box,
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal .feuille-temps-modal-box {
  overflow: hidden !important;
  max-height: none !important;
  max-width: none !important;
  width: 100%;
  min-height: 0 !important;
}
#feuille-temps-calc-modal.feuille-temps-entree-modal #feuille-temps-calc-quarts-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) #feuille-temps-tasks-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-modal-box > .feuille-temps-entree-quart-detail-dl {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-activites-modal-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  margin-bottom: 0;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-activites-modal-box {
  min-width: 0 !important;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-title:first-child {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0;
  padding: max(16px, calc(env(safe-area-inset-top, 0px) + 12px)) max(22px, env(safe-area-inset-right, 0px)) 18px
    max(22px, env(safe-area-inset-left, 0px));
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: #111827;
  text-align: center;
  background: #c9a227;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-title:first-child + * {
  padding-top: 16px;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal)
  .feuille-temps-modal-box
  > *:not(.feuille-temps-modal-title:first-child):not(.feuille-temps-tasks-modal-header):not(.feuille-temps-type-travail-modal-header):not(.feuille-temps-entree-quart-detail-header):not(.feuille-temps-entree-quart-detail-dl):not(.feuille-temps-modal-actions-bw):not(.feuille-temps-calc-modal-actions) {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-actions-bw,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-calc-modal-actions {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 0;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fafbfc;
  gap: 10px;
}
/* En-têtes avec bouton OK (Tâches, Type de travail, Détail quart) */
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-header,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0;
  padding: max(16px, calc(env(safe-area-inset-top, 0px) + 8px)) max(22px, env(safe-area-inset-right, 0px)) 14px max(22px, env(safe-area-inset-left, 0px));
  background: #c9a227;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-main-title.feuille-temps-tasks-modal-main-title--stack {
  text-align: left;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header .feuille-temps-tasks-modal-main-title,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header .feuille-temps-modal-title,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-title,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-title,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header .feuille-temps-modal-title {
  color: #111827;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header-total {
  color: rgba(17, 24, 39, 0.78);
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header .feuille-temps-tasks-modal-title-range {
  color: rgba(17, 24, 39, 0.58);
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header .feuille-temps-modal-close-ok,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-header .feuille-temps-modal-close-ok {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header .feuille-temps-modal-close-ok:hover,
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-header .feuille-temps-modal-close-ok:hover {
  background: #ffffff;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header-close {
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border-radius: 999px;
  width: auto;
  min-width: 48px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  height: 36px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header-close:hover {
  background: #ffffff;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-box {
  padding: 0 !important;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) #feuille-temps-tasks-modal-hint:not([hidden]) {
  flex-shrink: 0;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header ~ #feuille-temps-tasks-modal-hint:not([hidden]) {
  margin-top: 16px;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header ~ #feuille-temps-tasks-list {
  margin-top: 16px;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) #feuille-temps-tasks-modal-hint:not([hidden]) + #feuille-temps-tasks-list {
  margin-top: 12px;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) #feuille-temps-tasks-list {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) #feuille-temps-tasks-modal-hint:not([hidden]) {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-box {
  padding: 0 !important;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-scroll {
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-modal-box > .feuille-temps-entree-quart-detail-dl {
  margin: 0;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-activites-modal-box > .feuille-temps-modal-btn-bw {
  flex-shrink: 0;
  margin: 8px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  width: auto;
  align-self: stretch;
  box-sizing: border-box;
}
/* Calculer les heures + Dîner/pause : pied (×/→ ou Retirer/→) collé au bas de l’écran. */
#feuille-temps-calc-modal.feuille-temps-entree-modal.feuille-temps-modal,
#feuille-temps-diner-modal.feuille-temps-entree-modal.feuille-temps-modal,
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal.feuille-temps-modal {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
}
#feuille-temps-calc-modal.feuille-temps-entree-modal .feuille-temps-modal-box,
#feuille-temps-diner-modal.feuille-temps-entree-modal .feuille-temps-modal-box,
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal .feuille-temps-modal-box {
  flex: 1 1 0;
  min-height: 0;
}
#feuille-temps-calc-modal.feuille-temps-entree-modal #feuille-temps-calc-quarts-container {
  margin-bottom: 0;
}
#feuille-temps-diner-modal.feuille-temps-entree-modal .feuille-temps-modal-box,
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal .feuille-temps-modal-box {
  overflow: hidden !important;
}
#feuille-temps-calc-modal.feuille-temps-entree-modal .feuille-temps-modal-box > .feuille-temps-calc-modal-actions,
#feuille-temps-diner-modal.feuille-temps-entree-modal .feuille-temps-modal-box > .feuille-temps-calc-modal-actions,
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal .feuille-temps-modal-box > .feuille-temps-calc-modal-actions {
  flex-shrink: 0;
  position: static;
  margin-top: auto !important;
}
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal .feuille-temps-modal-box {
  height: 100%;
  min-height: 100dvh;
}
#feuille-temps-diner-absence-modal.feuille-temps-entree-modal .feuille-temps-diner-absence-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box {
  background: var(--bg-card, #1e293b);
  box-shadow: none;
}
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-actions-bw,
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-calc-modal-actions,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-actions-bw,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-calc-modal-actions {
  background: rgba(15, 23, 42, 0.55);
  border-top-color: rgba(255, 255, 255, 0.08);
}
/* Bandeau titre doré inchangé en thème sombre (comme Valider / Envoyer). */
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-title:first-child,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-modal-box > .feuille-temps-modal-title:first-child,
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-tasks-modal-header,
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-header,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-type-travail-modal-header,
#app-container.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header,
.app-theme-night .feuille-temps-entree-modal:not(#feuille-temps-valider-heures-modal):not(#feuille-temps-validate-modal) .feuille-temps-entree-quart-detail-header {
  color: #111827;
  background: #c9a227;
  border-bottom-color: rgba(0, 0, 0, 0.25);
}
.feuille-temps-calc-modal-box .feuille-temps-modal-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
  background: #ffffff;
  box-sizing: border-box;
}
/* Masquer uniquement le champ texte HH:MM (sync) — pas l’input type=time des quarts natifs */
.feuille-temps-calc-modal-box .feuille-temps-modal-field:has(.time-picker) > input[type="text"],
.feuille-temps-quart-edit-modal-box .feuille-temps-modal-field:has(.time-picker) > input[type="text"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.feuille-temps-calc-modal-box .feuille-temps-modal-field input[type="text"]:focus {
  outline: none;
  border-color: #2563eb;
}
.feuille-temps-diner-modal-box .feuille-temps-diner-hint,
.feuille-temps-quart-edit-modal-box .feuille-temps-quart-edit-hint {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
/* Chevauchement quarts : pas .feuille-temps-entree-row (flex space-between casse le texte + <strong>). */
.feuille-temps-calc-overlap-q3-modal-box {
  max-width: min(340px, 92vw);
}
#feuille-temps-calc-overlap-q3-modal .feuille-temps-calc-overlap-q3-desc,
#feuille-temps-calc-overlap-q3-modal .feuille-temps-calc-overlap-q3-question {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
#feuille-temps-calc-overlap-q3-modal .feuille-temps-calc-overlap-q3-desc {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
#feuille-temps-calc-overlap-q3-modal .feuille-temps-calc-overlap-q3-question {
  margin-bottom: 20px;
}
#feuille-temps-calc-overlap-q3-modal .feuille-temps-calc-overlap-q3-question strong {
  font-weight: 700;
  color: var(--text);
}
.feuille-temps-quart-edit-modal-box {
  max-width: 340px;
}
.feuille-temps-diner-fields-row {
  margin-bottom: 12px;
}
.feuille-temps-diner-duree {
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 10px;
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-diner-actions .feuille-temps-modal-btn-bw {
  flex: 1;
  margin-bottom: 0;
}
.feuille-temps-pause-modal-box,
.feuille-temps-diner-modal-box {
  max-width: 340px;
}
.feuille-temps-diner-absence-hint {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}
.feuille-temps-diner-absence-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.feuille-temps-diner-absence-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}
.feuille-temps-diner-absence-option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.feuille-temps-diner-absence-actions .feuille-temps-modal-btn-bw {
  flex: 1;
  margin-bottom: 0;
}
.feuille-temps-pause-duree {
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 10px;
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--text);
}
/* Modals « Valider mes heures » / « Envoyer la feuille » : plein écran (titre bandeau doré + pied type annonces). */
#feuille-temps-valider-heures-modal.feuille-temps-modal--popover-dashboard,
#feuille-temps-validate-modal.feuille-temps-modal--popover-dashboard {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
#feuille-temps-valider-heures-modal.feuille-temps-modal--popover-dashboard .feuille-temps-modal-dashboard-pop-backdrop,
#feuille-temps-validate-modal.feuille-temps-modal--popover-dashboard .feuille-temps-modal-dashboard-pop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior: contain;
}
#feuille-temps-valider-heures-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover.chat-unread-popover,
#feuille-temps-validate-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover.chat-unread-popover {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  pointer-events: auto;
  overflow: hidden;
}
#feuille-temps-valider-heures-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover.chat-unread-popover::before,
#feuille-temps-validate-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover.chat-unread-popover::before {
  content: none !important;
  display: none !important;
}
#feuille-temps-valider-heures-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover .chat-unread-popover-title,
#feuille-temps-validate-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover .chat-unread-popover-title {
  flex-shrink: 0;
  margin: 0;
  text-transform: none;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: #111827;
  background: #c9a227;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: none;
  padding: max(16px, calc(env(safe-area-inset-top, 0px) + 12px)) max(22px, env(safe-area-inset-right, 0px)) 18px
    max(22px, env(safe-area-inset-left, 0px));
  text-align: center;
}
#app-container.app-theme-night #feuille-temps-valider-heures-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover .chat-unread-popover-title,
#app-container.app-theme-night #feuille-temps-validate-modal.feuille-temps-modal--popover-dashboard .feuille-temps-dashboard-send-popover .chat-unread-popover-title {
  color: #111827;
  background: #c9a227;
  border-bottom-color: rgba(0, 0, 0, 0.25);
}
.feuille-temps-dashboard-send-popover-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px max(16px, env(safe-area-inset-left, 0px)) 16px max(16px, env(safe-area-inset-right, 0px));
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#feuille-temps-valider-heures-modal .feuille-temps-dashboard-send-popover-body > .feuille-temps-valider-heures-avertissement {
  margin-top: 0;
}
.feuille-temps-dashboard-send-popover-signature {
  margin-top: 14px;
  margin-bottom: 4px;
}
.feuille-temps-dashboard-send-popover-foot {
  flex-shrink: 0;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px !important;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}
.feuille-temps-dashboard-send-popover-foot .feuille-temps-dashboard-send-popover-btn-secondary,
.feuille-temps-dashboard-send-popover-foot .feuille-temps-dashboard-send-popover-btn-primary,
.feuille-temps-dashboard-send-popover-foot .annonces-notif-popover-link-btn {
  flex: 1 1 calc(50% - 8px);
  min-width: min(132px, calc(50% - 8px));
  width: auto;
  box-sizing: border-box;
}
.feuille-temps-dashboard-send-popover-btn-secondary {
  padding: 9px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: #374151;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}
.feuille-temps-dashboard-send-popover-btn-secondary:hover {
  background: #f9fafb;
  border-color: rgba(15, 23, 42, 0.22);
}
.feuille-temps-dashboard-send-popover-btn-secondary:active {
  background: #f3f4f6;
}
.feuille-temps-dashboard-send-popover-foot .annonces-notif-popover-link-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.15);
  box-shadow: none;
}
.feuille-temps-dashboard-send-popover-foot .annonces-notif-popover-link-btn:disabled:hover {
  filter: grayscale(0.15);
  box-shadow: none;
}
/* Signature requise : bouton toujours cliquable (message) — pas d’attribut disabled natif (iOS ignore le clic). */
#feuille-temps-valider-heures-confirm.feuille-temps-valider-heures-confirm[aria-disabled='true'] {
  opacity: 0.45;
  filter: grayscale(0.35);
  box-shadow: none;
  cursor: pointer;
}
#feuille-temps-valider-heures-confirm.feuille-temps-valider-heures-confirm[aria-disabled='false'] {
  opacity: 1;
  filter: none;
}
#feuille-temps-valider-heures-confirm.feuille-temps-valider-heures-confirm.is-submitting {
  opacity: 0.7;
  pointer-events: none;
}
#app-container.app-theme-night .feuille-temps-dashboard-send-popover-btn-secondary {
  color: #e5e7eb;
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.14);
}
#app-container.app-theme-night .feuille-temps-dashboard-send-popover-btn-secondary:hover {
  background: #374151;
  border-color: rgba(255, 255, 255, 0.2);
}

.feuille-temps-valider-heures-avertissement {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(234, 179, 8, 0.12);
  border-left: 3px solid rgba(234, 179, 8, 0.6);
  border-radius: 4px;
}
.feuille-temps-valider-heures-jours-list {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.feuille-temps-valider-heures-signature-wrap {
  margin-bottom: 20px;
}
.feuille-temps-valider-heures-signature-wrap .feuille-temps-entree-section-header {
  margin-bottom: 8px;
}
.feuille-temps-tasks-modal-box {
  max-width: 300px;
  width: 100%;
  max-height: min(88dvh, calc(100svh - var(--feuille-temps-modal-top-clear, 20px) - var(--feuille-temps-modal-bottom-clear, 88px)), 720px);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
}
.feuille-temps-tasks-modal-hint.feuille-temps-type-travail-hint {
  margin-top: 0;
}
#feuille-temps-tasks-list.feuille-temps-tasks-activites-list {
  flex: 1;
  min-height: 0;
  max-height: min(420px, calc(100svh - 15rem), 52dvh);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 12px;
}
#feuille-temps-tasks-list.feuille-temps-tasks-activites-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.feuille-temps-task-pick-trailing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.feuille-temps-tasks-modal-actions-wrap {
  flex-shrink: 0;
  margin-top: 12px;
  margin-bottom: 8px;
}
.feuille-temps-tasks-modal-actions {
  transition: margin-top 0.2s ease;
}
.feuille-temps-tasks-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.feuille-temps-tasks-modal-header .feuille-temps-tasks-modal-main-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.1rem;
}
.feuille-temps-tasks-modal-main-title.feuille-temps-tasks-modal-main-title--stack {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.38;
}
.feuille-temps-tasks-modal-main-title--stack strong {
  font-weight: 800;
}
.feuille-temps-tasks-modal-title-range {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
}
.feuille-temps-entree-modal .feuille-temps-tasks-modal-header .feuille-temps-modal-title {
  margin: 0;
}
.feuille-temps-tasks-modal-header .feuille-temps-tasks-modal-close {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
}
.feuille-temps-task-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feuille-temps-task-dropdown-item .feuille-temps-choisir-dropdown-ligne {
  flex: 1;
  min-width: 0;
}
.feuille-temps-task-star-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
}
.feuille-temps-task-star-wrap:hover {
  background: rgba(234, 179, 8, 0.15);
}
.feuille-temps-task-star {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: var(--text-muted);
}
.feuille-temps-task-star-wrap[data-favori="true"] .feuille-temps-task-star,
.feuille-temps-task-star-filled {
  fill: #eab308 !important;
  stroke: #eab308 !important;
}
.feuille-temps-tasks-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.feuille-temps-tasks-search-wrap {
  margin-bottom: 10px;
  position: relative;
  flex-shrink: 0;
}
.feuille-temps-tasks-search-wrap .formulaire-feuille-temps-search {
  flex: 1;
  min-width: 0;
}
.feuille-temps-tasks-added-wrap {
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.feuille-temps-tasks-added-wrap .feuille-temps-choisir-added-header {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.feuille-temps-tasks-added-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feuille-temps-tasks-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 12px 0 0;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 110;
}
.feuille-temps-modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 8px;
}
.feuille-temps-modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}
/* Libellé « OK » (entrée de temps : modales Quart, Bon de travail, Activité) — plus large que l’ancien × */
.feuille-temps-modal-close-ok {
  width: auto;
  min-width: 48px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.feuille-temps-entree-quart-detail-header-close.feuille-temps-modal-close-ok {
  width: auto;
  min-width: 48px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
}
.feuille-temps-signature-modal-box {
  max-width: 320px;
}
.feuille-temps-signature-modal-img-wrap {
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 2px solid var(--border);
  margin-bottom: 16px;
}
.feuille-temps-signature-modal-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}
.feuille-temps-validate-modal-top {
  margin-bottom: 0;
}
.feuille-temps-validate-modal-warning {
  margin: 0;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #b45309;
  line-height: 1.5;
}
.feuille-temps-validate-error {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #b91c1c;
  line-height: 1.4;
}
.feuille-temps-validate-error[hidden] {
  display: none !important;
}
.feuille-temps-projet-list-envoye .formulaire-feuille-temps-item,
.feuille-temps-choisir-added-wrap.feuille-temps-projet-list-envoye .feuille-temps-choisir-added-item,
.feuille-temps-choisir-catalog-accordion.feuille-temps-projet-list-envoye .feuille-temps-choisir-catalog-item {
  pointer-events: none;
  cursor: default;
  opacity: 0.7;
}
.feuille-temps-projet-list-envoye .formulaire-feuille-temps-item-arrow,
.feuille-temps-choisir-added-wrap.feuille-temps-projet-list-envoye .formulaire-feuille-temps-item-arrow,
.feuille-temps-choisir-catalog-accordion.feuille-temps-projet-list-envoye .formulaire-feuille-temps-item-arrow {
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
}
.feuille-temps-choisir-catalog-accordion.feuille-temps-projet-list-envoye .feuille-temps-choisir-catalog-item .feuille-temps-dropdown-star-wrap {
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
}
.feuille-temps-choisir-added-wrap.feuille-temps-projet-list-envoye .feuille-temps-choisir-added-item .feuille-temps-dropdown-star-wrap {
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
}
.feuille-temps-envoye-msg {
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.15);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.9rem;
  color: #b45309;
  line-height: 1.5;
  flex-shrink: 0;
}
.feuille-temps-validate-modal-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 10px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.feuille-temps-validate-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 1.5rem;
  font-weight: 700;
}
.feuille-temps-projet-name-modal-box {
  max-width: 340px;
}
.feuille-temps-projet-name-modal-text {
  margin: 0;
  padding: 16px 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

/* Modal validation heures */
.feuille-temps-btn-cancel {
  padding: 10px 18px;
  border: 2px solid var(--border);
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.feuille-temps-btn-cancel:hover,
.feuille-temps-btn-cancel:active {
  background: rgba(0, 0, 0, 0.05);
}
.feuille-temps-btn-validate {
  padding: 10px 18px;
  border: none;
  background: #22c55e;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.feuille-temps-btn-validate:hover,
.feuille-temps-btn-validate:active {
  background: #16a34a;
}
.feuille-temps-btn-validate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.feuille-temps-modal-bw .feuille-temps-modal-title {
  color: #1a1a1a;
}
.feuille-temps-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.feuille-temps-modal-header .feuille-temps-modal-title {
  margin: 0;
  font-size: 1.1rem;
}
.feuille-temps-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.feuille-temps-modal-field {
  margin-bottom: 16px;
}
.feuille-temps-modal-field:last-of-type {
  margin-bottom: 0;
}
.feuille-temps-modal-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.feuille-temps-modal-field input,
.feuille-temps-modal-field .time-picker {
  margin-top: 4px;
}
.feuille-temps-modal-bw .feuille-temps-modal-field {
  margin-bottom: 16px;
}
.feuille-temps-modal-bw .feuille-temps-modal-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.feuille-temps-modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  font-size: 1rem;
  background: #ffffff;
  color: #1a1a1a;
  box-sizing: border-box;
}
.feuille-temps-calc-fields {
  margin-bottom: 16px;
}
.feuille-temps-calc-fields .feuille-temps-modal-field {
  margin-bottom: 16px;
}
.feuille-temps-calc-fields .feuille-temps-modal-field:last-child {
  margin-bottom: 0;
}
/* Time picker déroulant - chiffres roulants avec : centré */
.time-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #ffffff;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  padding: 8px 4px;
  min-height: 140px;
}
/* Mode quarts : pas de gros cadre autour — une seule piste (H : M) dans une pilule légère. */
.time-picker.time-picker--select-quarter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  margin: 4px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.time-picker-dd-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 3px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #eef2f6 0%, #e8ecf1 100%);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.time-picker-dd-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  max-width: 28vw;
}
.time-picker-dd-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 36px;
  padding: 6px 7px;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #0f172a;
  background: #ffffff;
  border: 0;
  border-radius: 11px;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.time-picker-dd-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid #94a3b8;
  flex-shrink: 0;
  opacity: 0.9;
}
.time-picker-dd-btn[aria-expanded="true"] {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28), 0 1px 2px rgba(15, 23, 42, 0.06);
}
@media (hover: hover) {
  .time-picker-dd-btn:hover {
    background: #fafbfc;
  }
}
.time-picker-dd-panel {
  position: fixed;
  z-index: 2000;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  box-sizing: border-box;
}
.time-picker-dd-scroll {
  max-height: min(220px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.time-picker-dd-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
  text-align: center;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.time-picker-dd-item:last-child {
  border-bottom: 0;
}
@media (hover: hover) {
  .time-picker-dd-item:hover {
    background: #f8fafc;
  }
}
.time-picker-dd-item:active {
  background: #e2e8f0;
}
.time-picker-dd-sep {
  flex-shrink: 0;
  padding: 0 2px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1;
}
.time-picker-wheel {
  flex: 1;
  min-width: 0;
  max-width: 80px;
  height: 124px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.time-picker-hours,
.time-picker-minutes {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.time-picker-wheel::before,
.time-picker-wheel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 48px;
  pointer-events: none;
  z-index: 2;
}
.time-picker-wheel::before {
  top: 0;
  background: linear-gradient(to bottom, #fff 0%, rgba(255,255,255,0) 100%);
}
.time-picker-wheel::after {
  bottom: 0;
  background: linear-gradient(to top, #fff 0%, rgba(255,255,255,0) 100%);
}
.time-picker-scroll {
  position: relative;
  height: 100%;
  min-height: 124px;
  overflow-y: auto;
  overflow-x: hidden;
  /* Pas de scroll-snap CSS : avec peu de lignes (ex. minutes 00–45), mandatory bloque souvent le scroll jusqu’au dernier cran (Safari / iOS). Le snap est fait en JS (touchend / fin de scroll). */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 42px 0;
}
.time-picker-scroll::-webkit-scrollbar {
  display: none;
}
/* Espace scrollable après la dernière option pour pouvoir centrer :45 (et 23h) sans buter contre la fin.
   pointer-events: auto — avec « none », les doigts sur le repli ne scrollaient pas le rouleau (touches perdues). */
.time-picker-scroll-tail {
  height: 360px;
  pointer-events: auto;
  touch-action: pan-y;
}
.time-picker-option {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.time-picker-colon {
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  padding: 0 4px;
  display: flex;
  align-items: center;
}
.feuille-temps-modal-btn-bw {
  width: 100%;
  padding: 12px 20px;
  background: #ffffff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}
.feuille-temps-modal-btn-bw:last-of-type {
  margin-bottom: 0;
}
.feuille-temps-modal-actions-bw {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.feuille-temps-modal-actions-bw .feuille-temps-modal-btn-bw,
.feuille-temps-modal-actions-bw .feuille-temps-modal-btn-outline {
  flex: 1;
  margin-bottom: 0;
}
.feuille-temps-modal-btn-outline {
  padding: 12px 20px;
  background: #ffffff;
  color: #1a1a1a;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.feuille-temps-modal-btn-retirer {
  border-color: #fecaca;
  color: #b91c1c;
}
.feuille-temps-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feuille-temps-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
}
.feuille-temps-task-item.selected {
  border-color: #1a1a1a;
  background: #f9fafb;
}
.feuille-temps-task-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
}
.feuille-temps-tasks-loading,
.feuille-temps-tasks-msg {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Popup choix semaine feuille de temps - tous les modals s'ouvrent au même endroit */
/* Proches du bord, adaptés à chaque appareil — au-dessus du menu bas (z-index 999), sans le chevaucher visuellement */
.feuille-temps-modal {
  --feuille-temps-modal-top-clear: calc(12px + env(safe-area-inset-top, 0px));
  --feuille-temps-modal-bottom-clear: calc(64px + max(12px, env(safe-area-inset-bottom, 0px)));
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--feuille-temps-modal-top-clear) max(12px, env(safe-area-inset-right, 0px)) var(--feuille-temps-modal-bottom-clear) max(12px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-sizing: border-box;
}
.feuille-temps-modal::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.feuille-temps-modal.feuille-temps-modal--open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
/* Bloquer le scroll du contenu quand un modal est ouvert - empêche l'image/fond de bouger */
#app-container:has(.feuille-temps-modal.feuille-temps-modal--open) .formulaire-main,
#app-container:has(.feuille-temps-modal.feuille-temps-modal--open) .formulaire-main-feuille-temps {
  overflow: hidden !important;
  touch-action: none;
}
/* Modal temps/quarts devant les autres modales feuille (overlay base 1200) */
.feuille-temps-activite-heures-modal,
.feuille-temps-quart-edit-modal,
.feuille-temps-quart-activite-modal,
.feuille-temps-calc-modal,
.feuille-temps-diner-modal {
  z-index: 1260;
}
.feuille-temps-quart-activite-hint {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.feuille-temps-quart-activite-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.feuille-temps-quart-activite-option {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.feuille-temps-quart-activite-option:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #94a3b8;
}
.feuille-temps-quart-activite-option-line {
  font-size: 0.95rem;
  color: var(--text);
}
.feuille-temps-quart-activite-option-total {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.feuille-temps-quart-activite-totaux {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-type-travail-modal-box {
  display: flex;
  flex-direction: column;
  max-height: min(88dvh, calc(100svh - var(--feuille-temps-modal-top-clear, 20px) - var(--feuille-temps-modal-bottom-clear, 88px)), 720px);
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.feuille-temps-type-travail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 14px;
}
.feuille-temps-type-travail-modal-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}
.feuille-temps-entree-modal .feuille-temps-type-travail-modal-header .feuille-temps-modal-title {
  margin: 0;
}
.feuille-temps-type-travail-modal-header .feuille-temps-type-travail-modal-close {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
}
.feuille-temps-type-travail-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.feuille-temps-type-travail-modal-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.feuille-temps-type-travail-hint {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.feuille-temps-type-travail-context {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
}
.feuille-temps-type-travail-context-lead {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-type-travail-context-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 0.9rem;
  align-items: baseline;
}
.feuille-temps-type-travail-context-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted);
}
.feuille-temps-type-travail-context-dl dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}
.feuille-temps-type-travail-context-muted {
  color: var(--text-muted);
  font-style: italic;
}
.feuille-temps-type-travail-context-id {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}
.feuille-temps-type-travail-context-type .feuille-temps-type-travail-context-id {
  vertical-align: middle;
}
.feuille-temps-type-travail-list-label {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-type-travail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}
.feuille-temps-type-travail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}
.feuille-temps-type-travail-item-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.feuille-temps-type-travail-item--current {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.06);
}
.feuille-temps-type-travail-item-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
}
.feuille-temps-type-travail-bon-none {
  border-style: dashed;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.feuille-temps-type-travail-bon-none:hover {
  color: var(--text);
  border-color: #94a3b8;
}
.feuille-temps-type-travail-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #94a3b8;
}
.feuille-temps-type-travail-item--current:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: #2563eb;
}
.feuille-temps-type-travail-item:disabled,
.feuille-temps-task-pick-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.feuille-temps-task-pick-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.feuille-temps-task-pick-row .feuille-temps-task-pick-item {
  flex: 1;
  min-width: 0;
}
/* Modal Activité (entrée) : ligne déjà sur le quart — surbrillance verte ; × retirer en rouge */
#feuille-temps-tasks-modal .feuille-temps-task-pick-row--selected .feuille-temps-task-pick-item {
  border-color: rgba(22, 163, 74, 0.65);
  background: rgba(22, 163, 74, 0.11);
}
#feuille-temps-tasks-modal .feuille-temps-task-pick-row--selected .feuille-temps-task-pick-item:hover {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.17);
}
#feuille-temps-tasks-modal .feuille-temps-task-pick-remove {
  color: #dc2626;
  opacity: 1;
}
#feuille-temps-tasks-modal .feuille-temps-task-pick-remove:hover,
#feuille-temps-tasks-modal .feuille-temps-task-pick-remove:focus-visible {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.12);
}
.feuille-temps-task-pick-remove {
  flex-shrink: 0;
  align-self: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-task-pick-remove:hover,
.feuille-temps-task-pick-remove:focus-visible {
  opacity: 1;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
  outline: none;
}
.feuille-temps-type-travail-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-pdf-url-modal-box {
  max-width: 420px;
}
.feuille-temps-pdf-url-hint {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-pdf-url-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.85rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  margin-bottom: 12px;
  box-sizing: border-box;
  -webkit-user-select: all;
  user-select: all;
}
.feuille-temps-pdf-url-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.feuille-temps-pdf-url-actions .feuille-temps-modal-btn-bw {
  flex: 1;
  min-width: 120px;
}
.feuille-temps-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: contain;
}
.feuille-temps-modal-box {
  position: relative;
  width: 100%;
  max-width: 300px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}
/* Retirer les flèches dans les inputs des modals */
.feuille-temps-modal .feuille-temps-modal-box input[type="date"]::-webkit-calendar-picker-indicator,
.feuille-temps-modal .feuille-temps-modal-box input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}
.feuille-temps-modal .feuille-temps-modal-box input[type="number"]::-webkit-inner-spin-button,
.feuille-temps-modal .feuille-temps-modal-box input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
/* Pas sur .time-picker-select : sinon liste déroulante cassée (bande verticale) sur Android dans Calculer les heures. */
.feuille-temps-modal .feuille-temps-modal-box select:not(.time-picker-select) {
  -webkit-appearance: none;
  appearance: none;
}
.feuille-temps-modal-title {
  margin: 0 0 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-week-search-modal-box { max-width: 300px; }
.feuille-temps-feuille-envoyee-modal-box {
  max-width: 22rem;
}
.feuille-temps-feuille-envoyee-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feuille-temps-feuille-envoyee-title::before {
  content: '✓';
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}
.feuille-temps-feuille-envoyee-message {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}
.feuille-temps-modal-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.feuille-temps-modal-date-icon { font-size: 1.4rem; }
.feuille-temps-modal-date-input {
  flex: 1;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}
.feuille-temps-modal-week-preview {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.feuille-temps-modal-week-preview:hover,
.feuille-temps-modal-week-preview:active,
.feuille-temps-modal-week-preview:focus-visible {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}
.feuille-temps-week-search-modal-box .formulaire-feuille-temps-search { margin-bottom: 20px; }
.feuille-temps-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.feuille-temps-modal-btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}
.feuille-temps-modal-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.feuille-temps-modal-cancel:hover,
.feuille-temps-modal-cancel:active {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}
.feuille-temps-modal-create {
  background: var(--primary);
  border: none;
  color: var(--text);
}
.feuille-temps-modal-create:hover,
.feuille-temps-modal-create:active {
  background: var(--primary-dark);
}

/* Popup choix projet */
.feuille-temps-projet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.feuille-temps-projet-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.feuille-temps-projet-modal-header button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 8px;
}
.feuille-temps-projet-modal-header button:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

/* Popup choix projet - liste nom uniquement */
.feuille-temps-projet-modal-box {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feuille-temps-projet-modal-box .formulaire-feuille-temps-search {
  margin-bottom: 0;
}
.feuille-temps-projet-modal-search {
  margin-bottom: 12px;
}
.feuille-temps-projet-modal-list {
  flex: 1;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 16px;
}
.feuille-temps-projet-modal-list-item {
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 1rem;
  color: var(--text);
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feuille-temps-projet-modal-list-item:last-child {
  border-bottom: none;
}
.feuille-temps-projet-modal-list-item:hover,
.feuille-temps-projet-modal-list-item:active,
.feuille-temps-projet-sheet-item:hover,
.feuille-temps-projet-sheet-item:active {
  background: rgba(59, 130, 246, 0.12);
}
/* Accordéon dossiers - cliquables pour afficher les feuilles (sheet_id)
   Wrapper : header = formulaire-feuille-temps-item, content = liste imbriquée */
/* Projets : même design que la liste feuille de temps (formulaire-feuille-temps-item) */
#feuille-temps-projet-list .feuille-temps-projet-folder-header {
  cursor: pointer;
}
#feuille-temps-projet-list .feuille-temps-projet-folder-content {
  padding: 12px 0 4px 0;
  padding-left: 20px;
  margin-left: 0;
  border-left: none;
}
.feuille-temps-projet-folder-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feuille-temps-projet-folder-header {
  cursor: pointer;
  user-select: none;
}
.feuille-temps-projet-folder-header:hover,
.feuille-temps-projet-folder-header:active {
  background: rgba(0, 0, 0, 0.03);
}
.feuille-temps-projet-folder-icon {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.feuille-temps-projet-folder-content {
  padding-left: 20px;
  border-left: 2px solid rgba(0, 0, 0, 0.08);
  margin-left: 16px;
  margin-bottom: 8px;
}
.feuille-temps-projet-folder-content[hidden] {
  display: none !important;
}
.feuille-temps-projet-folder-loading {
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.feuille-temps-config-hint {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 12px;
  padding: 0 8px;
}

.feuille-temps-projet-modal-list-msg {
  padding: 20px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}
.feuille-temps-projet-modal-list-loading {
  padding: 20px;
  color: var(--text-muted);
  text-align: center;
}

/* Bouton Horaire dans l'en-tête projet */
.formulaire-feuille-temps-horaire-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.formulaire-feuille-temps-horaire-btn:hover,
.formulaire-feuille-temps-horaire-btn:active {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text);
}

/* Bouton crochet vert cliquable */
.feuille-temps-projet-check-btn {
  padding: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.feuille-temps-projet-check-btn:active { background: rgba(34, 197, 94, 0.15); }
@media (hover: hover) { .feuille-temps-projet-check-btn:hover { background: rgba(34, 197, 94, 0.15); } }

/* Écran Horaire principal */
.feuille-temps-horaire-screen {
  background: transparent;
}
.feuille-temps-horaire-readonly-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  margin-right: 8px;
}
.feuille-temps-horaire-readonly-label[hidden] {
  display: none !important;
}
.feuille-temps-horaire-readonly .feuille-temps-horaire-cell {
  cursor: default;
  pointer-events: none;
}
.feuille-temps-horaire-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: -1px 0 0;
  /* Permettre le scroll horizontal tout en laissant les taps atteindre les cellules */
  touch-action: pan-x;
}
.feuille-temps-horaire-check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  flex-shrink: 0;
}
.feuille-temps-horaire-check-badge[hidden] {
  display: none !important;
}
.feuille-temps-horaire-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-horaire-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.feuille-temps-horaire-pdf-btn {
  border: none;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  color: var(--text);
  opacity: 0.85;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feuille-temps-horaire-pdf-btn:hover,
.feuille-temps-horaire-pdf-btn:active {
  opacity: 1;
  color: #c9a227;
}
.feuille-temps-horaire-pdf-btn[hidden] {
  display: none;
}
.feuille-temps-horaire-check-indicator {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.feuille-temps-horaire-check-indicator[hidden] {
  display: none;
}
.feuille-temps-horaire-check-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-horaire-check-btn:hover .feuille-temps-horaire-check-circle,
.feuille-temps-horaire-check-btn:active .feuille-temps-horaire-check-circle {
  background: #16a34a;
  transform: scale(1.05);
}
.feuille-temps-horaire-check-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.feuille-temps-horaire-check-circle svg {
  width: 20px;
  height: 20px;
}
.feuille-temps-horaire-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.feuille-temps-horaire-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.feuille-temps-horaire-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-horaire-pdf-btn {
  padding: 8px;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.feuille-temps-horaire-pdf-btn:active { color: var(--text-muted); }
@media (hover: hover) { .feuille-temps-horaire-pdf-btn:hover { color: var(--text-muted); } }
.formulaire-main-horaire {
  padding: 16px;
  overflow-x: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}
.formulaire-main-horaire > * {
  flex-shrink: 0;
  min-width: 0;
}
.formulaire-main-horaire .feuille-temps-horaire-table-wrap {
  flex-shrink: 0;
}
.formulaire-main-horaire .feuille-temps-horaire-details-wrap {
  flex: 0 0 auto;
  min-width: 0;
}

/* Footer actions sur écran Jours - fixé au bas de l'écran, tous appareils */
.formulaire-main.formulaire-main-jours {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}
.formulaire-main-jours .feuille-temps-jours-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: clamp(140px, 35vh, 180px);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#feuille-temps-jours-screen.active .feuille-temps-jours-footer-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 16px);
  padding: clamp(12px, 3vw, 20px);
  padding-left: clamp(12px, 3vw, 24px);
  padding-right: clamp(12px, 3vw, 24px);
  padding-bottom: clamp(12px, 3vw, 20px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  z-index: 10;
}
.feuille-temps-jours-footer-btn {
  width: 100%;
  min-height: 48px;
  padding: clamp(12px, 2.5vw, 16px) clamp(16px, 4vw, 24px);
  border: none;
  border-radius: clamp(8px, 2vw, 12px);
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-jours-btn-valider {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}
.feuille-temps-jours-btn-valider:hover,
.feuille-temps-jours-btn-valider:active {
  background: rgba(34, 197, 94, 0.3);
}
.feuille-temps-jours-btn-valider.feuille-temps-jours-btn-valider--aucune-heure,
.feuille-temps-jours-btn-valider:disabled {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.9;
}
.feuille-temps-jours-btn-valider.feuille-temps-jours-btn-valider--aucune-heure:hover,
.feuille-temps-jours-btn-valider.feuille-temps-jours-btn-valider--aucune-heure:active,
.feuille-temps-jours-btn-valider:disabled:hover,
.feuille-temps-jours-btn-valider:disabled:active {
  background: rgba(100, 116, 139, 0.15);
}
.feuille-temps-jours-btn-envoyer {
  background: #d4af37;
  color: #1a1a1a;
}
.feuille-temps-jours-btn-envoyer:hover,
.feuille-temps-jours-btn-envoyer:active {
  background: #b8960c;
  opacity: 0.95;
}
.feuille-temps-jours-btn-envoyer:disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
}
/* Semaine envoyée : libellé seul — style « envoyé » (vert, comme ligne hub OK). */
.feuille-temps-jours-btn-envoyer.feuille-temps-jours-btn-envoyer--feuille-envoyee {
  background: rgba(22, 163, 74, 0.28);
  color: #14532d;
  border: 1px solid rgba(22, 163, 74, 0.45);
  opacity: 0.92;
}
/* Écran Jours - petits écrans (téléphones étroits) */
@media (max-width: 360px) {
  .formulaire-main.formulaire-main-jours {
    padding-left: 14px;
    padding-right: 14px;
    padding-top: 0;
  }
  .formulaire-main-jours .feuille-temps-jours-list {
    padding-bottom: 130px;
  }
}
/* Écran Jours - adaptation tablette */
@media (min-width: 600px) {
  #feuille-temps-jours-screen .formulaire-main-jours {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }
  .formulaire-main-jours .feuille-temps-jours-list {
    padding-bottom: 170px;
  }
}
@media (min-width: 900px) {
  #feuille-temps-jours-screen .formulaire-main-jours {
    max-width: 480px;
  }
  #feuille-temps-jours-screen.active .feuille-temps-jours-footer-actions {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 520px;
    width: 100%;
    box-sizing: border-box;
  }
  /* Forcer la disposition en colonne : tableau, détails et formulaire empilés verticalement */
  .formulaire-main-horaire {
    flex-direction: column;
  }
  .formulaire-main-horaire .feuille-temps-horaire-table-wrap {
    width: 100%;
    max-width: 100%;
  }
}
.feuille-temps-horaire-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}
.feuille-temps-horaire-table {
  width: 100%;
  min-width: 280px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.85rem;
}
@media (min-width: 400px) {
  .feuille-temps-horaire-table { font-size: 0.9rem; min-width: 360px; }
}
.feuille-temps-horaire-table th,
.feuille-temps-horaire-table td {
  padding: 10px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.feuille-temps-horaire-table th.feuille-temps-horaire-th-projet,
.feuille-temps-horaire-table th.feuille-temps-horaire-projet-name {
  overflow: visible;
}
.feuille-temps-horaire-table th:last-child,
.feuille-temps-horaire-table td:last-child {
  border-right: none;
}
@media (min-width: 400px) {
  .feuille-temps-horaire-table th,
  .feuille-temps-horaire-table td { padding: 12px 6px; }
  .feuille-temps-horaire-th-day,
  .feuille-temps-horaire-cell { padding: 8px 3px !important; }
}
.feuille-temps-horaire-table thead tr {
  background: #1a1a1a;
  color: #ffffff;
}
.feuille-temps-horaire-table thead th {
  font-weight: 600;
  font-size: 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}
.feuille-temps-horaire-table thead th:last-child {
  border-right: none;
}
.feuille-temps-horaire-th-projet {
  width: 24%;
  min-width: 44px;
  text-align: center !important;
  padding: 8px 6px !important;
  overflow: visible;
}
.feuille-temps-horaire-th-day {
  width: 10%;
  min-width: 0;
  padding: 8px 2px !important;
}
.feuille-temps-horaire-th-day.feuille-temps-horaire-th-day-has-hours {
  color: #b91c1c;
  font-weight: 700;
}
.feuille-temps-horaire-row:hover {
  background: rgba(0, 0, 0, 0.02);
}
.feuille-temps-horaire-projet-name {
  text-align: center !important;
  padding: 8px 6px !important;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.feuille-temps-horaire-projet-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.feuille-temps-horaire-projet-eye {
  flex-shrink: 0;
  padding: 2px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.feuille-temps-horaire-projet-eye:hover,
.feuille-temps-horaire-projet-eye:active {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}
.feuille-temps-horaire-cell {
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 2px !important;
  /* Améliorer le tap sur mobile : éviter le vol des touches par le scroll horizontal */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* Zone tactile suffisante (min 44px recommandé par Apple) */
  min-height: 44px;
  position: relative;
  z-index: 1;
}
.feuille-temps-horaire-cell:hover {
  background: rgba(220, 38, 38, 0.08);
}
.feuille-temps-horaire-cell.filled {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  font-weight: 600;
}
.feuille-temps-horaire-cell.filled:hover {
  background: rgba(220, 38, 38, 0.2);
}
.feuille-temps-horaire-cell.validated {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
  cursor: pointer;
}
.feuille-temps-horaire-cell.validated.filled {
  background: rgba(34, 197, 94, 0.25);
  color: #15803d;
}
.feuille-temps-horaire-cell.validated:hover {
  background: rgba(34, 197, 94, 0.25);
}
.feuille-temps-horaire-th-day.validated {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
  font-weight: 600;
}
.feuille-temps-horaire-total-row {
  background: #f3f4f6 !important;
}
.feuille-temps-horaire-total-row td {
  font-weight: 600;
  border-bottom: none;
  padding: 12px 16px;
}
.feuille-temps-horaire-grand-total {
  font-size: 1rem;
  font-weight: 700;
  color: #b91c1c;
  text-align: right;
  padding-right: 16px !important;
}
.feuille-temps-horaire-screen.feuille-temps-horaire-week-envoyee .feuille-temps-horaire-grand-total {
  color: #15803d;
}
.feuille-temps-horaire-accordion {
  border-bottom: 1px solid var(--border);
}
.feuille-temps-horaire-accordion:last-child {
  border-bottom: none;
}
.feuille-temps-horaire-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.feuille-temps-horaire-accordion-header:hover {
  background: rgba(0, 0, 0, 0.03);
}
.feuille-temps-horaire-accordion-icon {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.feuille-temps-horaire-accordion-icon.open {
  transform: rotate(-180deg);
}
.feuille-temps-horaire-accordion-body {
  padding-bottom: 12px;
  padding-left: 0;
}
.feuille-temps-horaire-details-totals {
  padding: 12px 16px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
}
.feuille-temps-horaire-details-wrap .feuille-temps-horaire-details-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.feuille-temps-horaire-details {
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border);
  min-height: 80px;
}
.feuille-temps-horaire-details-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feuille-temps-horaire-detail-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.feuille-temps-horaire-detail-item:last-child {
  border-bottom: none;
}
.feuille-temps-horaire-detail-quart-block {
  margin-bottom: 10px;
}
.feuille-temps-horaire-detail-quart-block:last-child {
  margin-bottom: 0;
}
/* Horaire — Détail : fond or pâle par bloc Quart 1, 2, 3 */
#feuille-temps-horaire-screen .feuille-temps-horaire-detail-quart-block[data-quart-index="0"],
#feuille-temps-horaire-screen .feuille-temps-horaire-detail-quart-block[data-quart-index="1"],
#feuille-temps-horaire-screen .feuille-temps-horaire-detail-quart-block[data-quart-index="2"] {
  background-color: #faf4e4;
  background-color: color-mix(in srgb, #c9a227 14%, var(--surface, #fff) 86%);
  border-radius: 10px;
  padding: 10px 12px;
  box-sizing: border-box;
}
/* Détail horaire : libellé au-dessus du texte (comme popup Quart) */
.feuille-temps-horaire-detail-meta-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin-top: 10px;
  font-size: 0.85rem;
}
.feuille-temps-horaire-detail-meta-stack--acts {
  margin-top: 8px;
}
.feuille-temps-horaire-detail-meta-stack-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.feuille-temps-horaire-detail-meta-stack-value {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}
.feuille-temps-horaire-detail-meta-stack--nested {
  margin-top: 8px;
  padding-left: 8px;
  border-left: 2px solid var(--border, #e5e7eb);
}
.feuille-temps-horaire-detail-activite-card {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.feuille-temps-horaire-detail-activite-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.feuille-temps-horaire-detail-activites-outer {
  margin-top: 12px;
}
.feuille-temps-horaire-detail-activites-outer .feuille-temps-horaire-detail-activites-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.feuille-temps-horaire-detail-quart-acts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feuille-temps-horaire-detail-act-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 0.85rem;
}
.feuille-temps-horaire-detail-act-name {
  color: var(--text);
  min-width: 0;
  flex: 1;
}
.feuille-temps-horaire-detail-act-heures {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.feuille-temps-horaire-detail-meta-value {
  flex: 1;
  min-width: 0;
  color: var(--text-muted);
}
.feuille-temps-horaire-detail-header {
  margin-bottom: 6px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feuille-temps-horaire-detail-total {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.feuille-temps-horaire-detail-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  color: var(--text);
  align-items: center;
  flex-wrap: wrap;
}
.feuille-temps-horaire-detail-value {
  min-width: 48px;
  text-align: right;
  margin-left: auto;
  font-weight: 500;
  color: var(--text);
}
.feuille-temps-horaire-detail-row-3 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feuille-temps-horaire-detail-row-3 .feuille-temps-horaire-detail-left {
  flex: 1;
  min-width: 0;
}
.feuille-temps-horaire-detail-total-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.feuille-temps-horaire-detail-row-3 .feuille-temps-horaire-detail-center {
  font-weight: 500;
  color: var(--text);
}
.feuille-temps-horaire-detail-row-3 .feuille-temps-horaire-detail-left,
.feuille-temps-horaire-detail-row-3 .feuille-temps-horaire-detail-value {
  color: var(--text);
}
.feuille-temps-horaire-detail-row-3 .feuille-temps-horaire-detail-value {
  margin-left: 0;
}
.feuille-temps-horaire-detail-totals-line {
  flex-wrap: wrap;
  gap: 12px 16px;
}
.feuille-temps-horaire-detail-totals-line .feuille-temps-horaire-detail-value {
  margin-left: 0;
}
.feuille-temps-horaire-signature-eye {
  margin-left: 4px;
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.feuille-temps-horaire-signature-eye:hover,
.feuille-temps-horaire-signature-eye:active {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}
.feuille-temps-horaire-detail-eye {
  margin-left: 4px;
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.feuille-temps-horaire-detail-eye:hover,
.feuille-temps-horaire-detail-eye:active {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}
.feuille-temps-horaire-detail-label {
  min-width: 85px;
  flex-shrink: 0;
  color: var(--text);
}
.feuille-temps-horaire-detail-activite-card .feuille-temps-horaire-detail-act-line {
  font-size: 0.9rem;
}
.feuille-temps-horaire-detail-activite-card .feuille-temps-horaire-detail-act-name {
  color: var(--text);
}
.feuille-temps-horaire-signed {
  color: #22c55e;
  font-weight: 500;
}
.feuille-temps-horaire-unsigned {
  color: #dc2626;
  font-weight: 500;
}
.feuille-temps-horaire-hint {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.feuille-temps-horaire-empty {
  padding: 32px 16px !important;
  text-align: center !important;
  color: var(--text-muted);
}

/* Formulaire sous la page horaires (Date, Projet, Début, Fin, Heures, Tâches, T. supp., Commentaire) */
.feuille-temps-horaire-form {
  margin-top: 24px;
  padding: 20px;
  background: #f8f8f6;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.feuille-temps-horaire-form-field {
  margin-bottom: 16px;
}
.feuille-temps-horaire-form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.feuille-temps-horaire-form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.feuille-temps-horaire-form-input:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}
.feuille-temps-horaire-form-textarea {
  resize: vertical;
  min-height: 72px;
}
.feuille-temps-horaire-form-submit {
  margin-top: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #d4af37;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feuille-temps-horaire-form-submit:hover,
.feuille-temps-horaire-form-submit:active {
  background: #b8960c;
  opacity: 0.95;
}

/* Toast silencieux après envoi Smartsheet */
.feuille-temps-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: #22c55e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.feuille-temps-toast.feuille-temps-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Vue Par quart (backend) : zones colorées par groupe Quart 1/2/3 + Activité + Type */
table.ft-en-cours-employe-table th.ft-quart-group-1,
table.ft-en-cours-employe-table td.ft-quart-group-1 {
  background: #e3f2fd !important;
}
table.ft-en-cours-employe-table thead th.ft-quart-group-1 {
  background: #1565c0 !important;
  color: #fff !important;
}
table.ft-en-cours-employe-table th.ft-quart-group-2,
table.ft-en-cours-employe-table td.ft-quart-group-2 {
  background: #e8f5e9 !important;
}
table.ft-en-cours-employe-table thead th.ft-quart-group-2 {
  background: #2e7d32 !important;
  color: #fff !important;
}
table.ft-en-cours-employe-table th.ft-quart-group-3,
table.ft-en-cours-employe-table td.ft-quart-group-3 {
  background: #fff8e1 !important;
}
table.ft-en-cours-employe-table thead th.ft-quart-group-3 {
  background: #ef6c00 !important;
  color: #fff !important;
}

/* Vue Par quart : pas de scroll sur le wrapper parent, scrollbar uniquement dans .ft-quart-scroll */
.ft-en-cours-wrap.ft-quart-outer {
  overflow-x: visible !important;
}
/* Vue Par quart : zone blanche à gauche (à côté), zone colorée à droite, scrollbar uniquement sous la zone colorée */
/* Les deux colonnes ont la même hauteur pour que le "blanc" en bas soit égal = un seul tableau visuel */
.ft-quart-split {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  align-items: stretch;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.ft-quart-fixed {
  flex: 0 0 auto;
  width: 415px;
  max-width: 415px;
  overflow: hidden;
  min-width: 415px;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.ft-quart-fixed .ft-quart-fixed-table {
  flex: 0 0 auto;
}
.ft-quart-split.ft-quart-split-averifier .ft-quart-fixed {
  width: 320px;
  max-width: 320px;
  min-width: 320px;
}
.ft-quart-split.ft-quart-split-averifier .ft-quart-fixed .ft-quart-fixed-table thead th.ft-quart-total,
.ft-quart-split.ft-quart-split-averifier .ft-quart-fixed .ft-quart-fixed-table tbody td.ft-quart-total {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.ft-quart-split.ft-quart-split-averifier .ft-quart-fixed .ft-quart-fixed-table thead th.ft-quart-total {
  background: #374151;
}
.ft-quart-fixed .ft-quart-fixed-table {
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.4;
}
.ft-quart-fixed .ft-quart-fixed-table thead th,
.ft-quart-fixed .ft-quart-fixed-table tbody td {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-right-color: rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  vertical-align: middle;
}
.ft-quart-fixed .ft-quart-fixed-table thead th {
  background: #374151;
  color: #fff;
  font-weight: 600;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ft-quart-fixed .ft-quart-fixed-table th:nth-child(1) { width: 140px; min-width: 140px; }
.ft-quart-fixed .ft-quart-fixed-table th:nth-child(2) { width: 95px; min-width: 95px; }
.ft-quart-split.ft-quart-split-averifier .ft-quart-fixed .ft-quart-fixed-table th:nth-child(2) { width: 100px; min-width: 100px; }
.ft-quart-fixed .ft-quart-fixed-table th:nth-child(3) { width: 100px; min-width: 100px; }
.ft-quart-split.ft-quart-split-averifier .ft-quart-fixed .ft-quart-fixed-table th:nth-child(3) { width: 80px; min-width: 80px; }
.ft-quart-fixed .ft-quart-fixed-table th:nth-child(4),
.ft-quart-fixed .ft-quart-fixed-table td.ft-quart-total { width: 80px; min-width: 80px; }
.ft-quart-fixed .ft-quart-fixed-table thead th.ft-quart-total,
.ft-quart-fixed .ft-quart-fixed-table tbody td.ft-quart-total {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.ft-quart-fixed .ft-quart-fixed-table thead th.ft-quart-total {
  background: #374151;
}
.ft-quart-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  padding-bottom: 6px;
  display: flex;
  flex-direction: column;
}
.ft-quart-scroll::-webkit-scrollbar {
  height: 8px;
}
.ft-quart-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}
.ft-quart-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.ft-quart-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
.ft-quart-scroll table.ft-en-cours-quart-table,
.ft-quart-scroll table.ft-a-verifier-quart-table {
  flex: 0 0 auto;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 13px;
  line-height: 1.4;
}
.ft-quart-scroll table.ft-en-cours-quart-table thead th,
.ft-quart-scroll table.ft-en-cours-quart-table tbody td,
.ft-quart-scroll table.ft-a-verifier-quart-table thead th,
.ft-quart-scroll table.ft-a-verifier-quart-table tbody td {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 12px;
  vertical-align: middle;
}
.ft-quart-scroll table.ft-en-cours-quart-table thead th:first-child,
.ft-quart-scroll table.ft-en-cours-quart-table tbody td:first-child,
.ft-quart-scroll table.ft-a-verifier-quart-table thead th:first-child,
.ft-quart-scroll table.ft-a-verifier-quart-table tbody td:first-child {
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}

/* Pulse sync hub → app (« Choisir un projet », liste avant fin des GET) */
#feuille-temps-choisir-projet-added.feuille-temps-hub-sync-loading {
  opacity: 0.72;
  transition: opacity 0.12s ease;
  pointer-events: none;
}
#feuille-temps-choisir-projet-screen.feuille-temps-hub-sync-loading-screen main.formulaire-main {
  opacity: 0.95;
}
