/**
 * Photos - styles autonomes (app/pages/photos.php)
 * Indépendant de formulaire, feuille-temps, conformite
 */

/* === Écran principal Photos === */
#photos-screen.photos-has-bottom-bar.screen {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
}
#photos-screen {
  background: url('../../images/app-bg.png') no-repeat center bottom / cover;
  background-attachment: fixed;
}
#photos-screen .photos-main {
  background: transparent;
  flex: 1;
  overflow-y: auto;
  padding: 0;
  padding-bottom: 80px;
  min-height: 0;
}

/* Header Photos - dans le flux ; app-container sans padding-top → on monte sans grossir (max, pas +). */
#photos-screen .photos-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-top: max(10px, var(--app-safe-top, env(safe-area-inset-top, 0px)));
  padding-bottom: 12px;
  padding-left: max(16px, var(--app-safe-left, env(safe-area-inset-left, 0px)));
  padding-right: max(16px, var(--app-safe-right, env(safe-area-inset-right, 0px)));
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: max(52px, calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + 42px));
  box-sizing: border-box;
}
#photos-screen .photos-back {
  padding: 8px 4px;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--text, #1a1a1a);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
#photos-screen .photos-back:active { color: var(--text-muted, #6b7280); }
@media (hover: hover) { #photos-screen .photos-back:hover { color: var(--text-muted, #6b7280); } }
#photos-screen .photos-header-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#photos-screen .photos-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* Par projet : pas d’icônes galerie / caméra / sélection dans le header */
#photos-screen.photos-par-projet-tab .photos-header-actions {
  display: none;
}
#photos-screen .photos-header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, background 0.15s;
}
#photos-screen .photos-camera-btn {
  background: rgba(184, 134, 11, 0.2);
  color: #b8860b;
}
#photos-screen .photos-camera-btn:hover,
#photos-screen .photos-camera-btn:active {
  background: rgba(184, 134, 11, 0.35);
}
#photos-screen .photos-gallery-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}
#photos-screen .photos-gallery-btn:hover,
#photos-screen .photos-gallery-btn:active {
  background: rgba(0, 0, 0, 0.12);
}

/* Bandeau recherche — même rendu que Contacts / Employé (#3c4043, champ compact, focus doré). */
#photos-screen .photos-search-bg {
  flex-shrink: 0;
  height: 2px;
  margin: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  background: #3c4043;
  pointer-events: none;
}
#photos-screen .photos-search-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
  margin: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  padding: 12px max(12px, env(safe-area-inset-right, 12px)) 12px max(12px, env(safe-area-inset-left, 12px));
  box-sizing: border-box;
  overflow: hidden;
  background: #3c4043;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
#photos-screen .photos-search-wrap .photos-search-input,
#photos-screen .photos-search-wrap .gestion-compte-list-search {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.9375rem;
  line-height: 1.35;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  display: block;
}
#photos-screen .photos-search-wrap .photos-search-input::placeholder,
#photos-screen .photos-search-wrap .gestion-compte-list-search::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
#photos-screen .photos-search-wrap .photos-search-input:focus,
#photos-screen .photos-search-wrap .gestion-compte-list-search:focus {
  outline: none;
  border-color: rgba(253, 230, 138, 0.65);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.14);
}
#photos-screen .photos-search-wrap .gestion-compte-search-btn {
  display: none;
}

/* Contenu principal */
#photos-screen .photos-content {
  --edge: clamp(4px, 1vw, 10px);
  padding: var(--edge);
  padding-left: var(--edge);
  padding-right: var(--edge);
}

/* Par projet : 3 catégories + liste type Formulaires (pleine largeur écran) */
#photos-screen .photos-par-projet-wrap {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  padding-left: max(var(--edge, clamp(4px, 1vw, 10px)), env(safe-area-inset-left, 0px));
  padding-right: max(var(--edge, clamp(4px, 1vw, 10px)), env(safe-area-inset-right, 0px));
  padding-bottom: 8px;
}
#photos-screen .photos-par-projet-inner {
  width: 100%;
  max-width: 100%;
}
#photos-screen .photos-par-projet-msg {
  margin-top: 0;
}

/* Chargement « Par projet » : barre animée, sans texte (évite l’affichage « Chargement des lignes »). */
#photos-screen .photos-par-projet-loading {
  height: 4px;
  margin: 10px 0 14px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(201, 162, 39, 0.18);
  position: relative;
}

#photos-screen .photos-par-projet-loading::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.9), transparent);
  animation: photos-par-projet-loading-indeterminate 0.95s ease-in-out infinite;
}

@keyframes photos-par-projet-loading-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* Même pictos que la page Projet (flocon, dossier, camion) */
#photos-screen .photos-par-projet-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: stretch;
  margin-top: 9px;
}
#photos-screen .photos-par-projet-cat-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-muted, #6b7280);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#photos-screen .photos-par-projet-cat-tab:active {
  background: rgba(0, 0, 0, 0.04);
}
@media (hover: hover) {
  #photos-screen .photos-par-projet-cat-tab:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
  }
}
#photos-screen .photos-par-projet-cat-tab.active {
  color: #2563eb;
  font-weight: 600;
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.14);
}
#photos-screen .photos-par-projet-cat-tab .note-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
#photos-screen .photos-par-projet-cat-tab .note-nav-icon svg {
  width: 1.35rem;
  min-width: 22px;
  height: auto;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}
#photos-screen .photos-par-projet-cat-tab .note-nav-icon img.projet-nav-icon-img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}
#photos-screen .photos-par-projet-cat-tab:not(.active) .note-nav-icon img.projet-nav-icon-img {
  opacity: 0.6;
}
#photos-screen .photos-par-projet-cat-tab.active .note-nav-icon svg,
#photos-screen .photos-par-projet-cat-tab.active .note-nav-icon {
  color: #2563eb;
}
#photos-screen .photos-par-projet-cat-tab.active .note-nav-icon svg {
  stroke: currentColor;
}
#photos-screen .photos-par-projet-cat-tab.active .note-nav-icon img.projet-nav-icon-img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(31%) sepia(98%) saturate(2842%) hue-rotate(211deg) brightness(95%) contrast(101%);
}
#photos-screen .photos-par-projet-cat-tab .note-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
}
#photos-screen .photos-par-projet-sheet-card {
  text-align: left;
  width: 100%;
  font: inherit;
}
#photos-screen .photos-par-projet-empty-msg {
  margin-bottom: 0;
}

/* Tableaux lignes Smartsheet (mêmes classes que page Projet) */
#photos-screen .photos-par-projet-sheet-block {
  margin-bottom: 16px;
}
#photos-screen .photos-par-projet-sheet-heading {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  opacity: 0.92;
}
#photos-screen .photos-par-projet-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.72);
}
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table {
  margin: 0;
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
}
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table thead th,
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table tbody td {
  vertical-align: middle;
}
/* Trois colonnes principales : Image | # | Détail (+ colonnes intermédiaires si la feuille en a) */
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table th.projet-col-photo-thumb,
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table td.projet-col-photo-thumb {
  width: 7.25rem;
  min-width: 7.25rem;
  max-width: 8rem;
  box-sizing: border-box;
}
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table th.photos-par-projet-col-num,
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table td.photos-par-projet-col-num {
  min-width: 5rem;
  padding: 10px 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: none;
}
/* Bloc pleine largeur dans la cellule : centre le texte comme vos repères rouges */
#photos-screen .photos-par-projet-col-num-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  text-align: center;
  box-sizing: border-box;
}
/* Image | # | Détail uniquement : la colonne # occupe tout l’espace entre les deux bords fixes */
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table[data-column-count='3'] > thead > tr > th:nth-child(2),
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table[data-column-count='3'] > tbody > tr > td:nth-child(2) {
  width: calc(100% - 7.25rem - 4rem);
  max-width: none;
}
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table th.projet-col-detail,
#photos-screen .photos-par-projet-table-wrap .projet-sheet-table td.projet-col-detail {
  width: 3.5rem;
  min-width: 3.5rem;
  max-width: 4rem;
  padding-left: 6px;
  padding-right: 6px;
  vertical-align: middle;
  text-align: center;
  box-sizing: border-box;
}
#photos-screen .photos-par-projet-table-wrap th.projet-col-photo-thumb {
  text-align: left;
  vertical-align: middle;
  padding-left: max(2px, env(safe-area-inset-left, 0px));
  padding-right: 18px;
}
#photos-screen .photos-par-projet-table-wrap .projet-col-photo-thumb {
  vertical-align: middle;
  text-align: left;
  padding: 8px 18px 8px max(2px, env(safe-area-inset-left, 0px));
}
/* Vignette collée au bord gauche de la colonne */
#photos-screen .photos-par-projet-thumb-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
  padding: 2px 0 2px 0;
}
#photos-screen .photos-par-projet-thumb-box.photos-par-projet-thumb-open-album {
  cursor: pointer;
}
#photos-screen .photos-par-projet-thumb-box {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}
/* Visuel vidéo / caméra (toujours présent) */
#photos-screen .photos-par-projet-thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
  pointer-events: none;
}
/* Photo liée au projet par-dessus le visuel vidéo */
#photos-screen .photos-par-projet-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 1;
}
#photos-screen .photos-par-projet-thumb-box.photos-par-projet-thumb-has-photo .photos-par-projet-thumb-img {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
/* Œil : même alignement vertical que le reste de la ligne (Photos n’hérite pas des styles #projet-screen) */
#photos-screen .photos-par-projet-table-wrap .projet-col-detail .projet-cell-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 6px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  vertical-align: middle;
  box-sizing: border-box;
}
#photos-screen .photos-par-projet-table-wrap .projet-col-detail .projet-cell-eye:active {
  background: rgba(0, 0, 0, 0.06);
}
#photos-screen .photos-par-projet-table-wrap .projet-col-detail .projet-cell-eye .projet-cell-eye-icon,
#photos-screen .photos-par-projet-table-wrap .projet-col-detail .projet-cell-eye img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}
#photos-screen .photos-par-projet-sheet-empty {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
/* Popup détail œil : plein écran (fond + contenu défilant), safe-area encoche / barre d’accueil.
   Garde les classes « indisponible » du tableau de bord pour le look ; seul le dimensionnement change ici. */
#photos-par-projet-preview-overlay.photos-par-projet-preview-wrap.dashboard-feature-unavail-wrap {
  z-index: 10050;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}
#photos-par-projet-preview-overlay .dashboard-feature-unavail-popover.chat-unread-popover {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  min-height: 0;
  max-height: none;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: none;
}
#photos-par-projet-preview-overlay .photos-par-projet-preview-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* === Album photos d’un projet (écran dédié) === */
#photos-par-projet-album-screen.screen {
  padding: 0 !important;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  background: url('../../images/app-bg.png') no-repeat center bottom / cover;
  background-attachment: fixed;
  position: relative;
}
#photos-par-projet-album-screen .photos-par-projet-album-header {
  flex-shrink: 0;
  padding: max(10px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 12px)) 12px max(12px, env(safe-area-inset-left, 12px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
#photos-par-projet-album-screen .photos-par-projet-album-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
#photos-par-projet-album-screen .photos-par-projet-album-back {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text, #1a1a1a);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.12s ease;
}
#photos-par-projet-album-screen .photos-par-projet-album-back:active {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(0.96);
}
@media (hover: hover) {
  #photos-par-projet-album-screen .photos-par-projet-album-back:hover {
    background: rgba(0, 0, 0, 0.08);
  }
}
#photos-par-projet-album-screen .photos-par-projet-album-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.12) 0%, rgba(0, 0, 0, 0.04) 100%);
  border: 1px solid rgba(184, 134, 11, 0.18);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
#photos-par-projet-album-screen .photos-par-projet-album-hash {
  font-size: 1.05rem;
  font-weight: 800;
  color: #b8860b;
  letter-spacing: -0.02em;
}
#photos-par-projet-album-screen .photos-par-projet-album-num {
  flex: 1;
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#photos-par-projet-album-screen .photos-par-projet-album-detail-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
#photos-par-projet-album-screen .photos-par-projet-album-detail-btn:active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#photos-par-projet-album-screen .photos-par-projet-album-detail-btn img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}
#photos-par-projet-album-screen .photos-par-projet-album-main {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: calc(88px + max(12px, env(safe-area-inset-bottom, 0px)));
}
#photos-par-projet-album-screen.photos-par-projet-album-selecting .photos-par-projet-album-main {
  padding-bottom: calc(144px + max(12px, env(safe-area-inset-bottom, 0px)));
}
#photos-par-projet-album-screen .photos-par-projet-album-content {
  padding: clamp(4px, 1vw, 10px);
}
/* Dock flottant : recherche + FAB */
#photos-par-projet-album-screen .photos-par-projet-album-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px max(12px, env(safe-area-inset-left, 12px)) max(12px, env(safe-area-inset-bottom, 12px)) max(12px, env(safe-area-inset-right, 12px));
  pointer-events: none;
  box-sizing: border-box;
}
#photos-par-projet-album-screen .photos-par-projet-album-dock > * {
  pointer-events: auto;
}
#photos-par-projet-album-screen .photos-par-projet-album-search-label {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 14px;
  min-height: 48px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#photos-par-projet-album-screen .photos-par-projet-album-search-icon {
  flex-shrink: 0;
  color: #6b7280;
  display: flex;
  align-items: center;
}
#photos-par-projet-album-screen .photos-par-projet-album-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text, #1a1a1a);
  padding: 10px 0;
  -webkit-appearance: none;
  appearance: none;
}
#photos-par-projet-album-screen .photos-par-projet-album-search-input::placeholder {
  color: #9ca3af;
}
#photos-par-projet-album-screen .photos-par-projet-album-search-input:focus {
  outline: none;
}
#photos-par-projet-album-screen .photos-par-projet-album-fab {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #e0b53c 0%, #b8860b 55%, #9a7209 100%);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.45), 0 2px 8px rgba(0, 0, 0, 0.15);
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#photos-par-projet-album-screen .photos-par-projet-album-fab:active {
  transform: scale(0.94);
  box-shadow: 0 4px 14px rgba(184, 134, 11, 0.4);
}
#photos-par-projet-album-screen .photos-par-projet-album-fab-plus {
  margin-top: -2px;
}

/* Pastille n° 1, 2, 3… sur chaque vignette album */
#photos-par-projet-album-screen #photos-par-projet-album-grid .photos-grid-item {
  position: relative;
}
#photos-par-projet-album-screen .photos-par-projet-album-pos {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.35));
  border-radius: 8px 8px 0 0;
  pointer-events: none;
  line-height: 1.2;
}
#photos-par-projet-album-screen #photos-par-projet-album-grid .photos-grid-item.selected {
  outline: 3px solid #b8860b;
  outline-offset: -3px;
}
#photos-par-projet-album-screen #photos-par-projet-album-grid .photos-grid-item.selected::after {
  content: '';
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: #b8860b;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 3;
  pointer-events: none;
}

/* Barre actions sélection (au-dessus du dock) */
#photos-par-projet-album-screen .photos-par-projet-album-selection-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 52;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px max(10px, env(safe-area-inset-left, 10px)) 8px max(10px, env(safe-area-inset-right, 10px));
  bottom: calc(70px + max(10px, env(safe-area-inset-bottom, 0px)));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  box-sizing: border-box;
}
#photos-par-projet-album-screen .photos-par-projet-album-selection-bar[hidden] {
  display: none !important;
}
#photos-par-projet-album-screen .photos-par-projet-album-selection-count {
  flex: 1 1 100%;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  padding: 0 4px;
}
@media (min-width: 380px) {
  #photos-par-projet-album-screen .photos-par-projet-album-selection-count {
    flex: 0 1 auto;
  }
}
#photos-par-projet-album-screen .photos-par-projet-album-selection-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-action {
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(184, 134, 11, 0.18);
  color: #6b5200;
  -webkit-tap-highlight-color: transparent;
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-action:not(:disabled):active {
  background: rgba(184, 134, 11, 0.32);
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-private:not(:disabled) {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-private:not(:disabled):active {
  background: rgba(59, 130, 246, 0.22);
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-danger:not(:disabled) {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-cancel {
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.08);
  color: #374151;
  -webkit-tap-highlight-color: transparent;
}
#photos-par-projet-album-screen .photos-par-projet-album-sel-cancel:active {
  background: rgba(0, 0, 0, 0.14);
}

/* Grille photos */
.photos-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.photos-grid-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  cursor: pointer;
  position: relative;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.photos-grid-skeleton {
  cursor: default;
  pointer-events: none;
  background: linear-gradient(110deg, #e5e7eb 0%, #f3f4f6 45%, #e5e7eb 90%);
  background-size: 200% 100%;
  animation: photos-skeleton-shimmer 1.1s ease-in-out infinite;
}
@keyframes photos-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
.photos-grid-item img {
  width: 100%;
  object-fit: cover;
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.photos-grid-item.selected {
  outline: 3px solid #b8860b;
  outline-offset: -3px;
}
.photos-grid-item.selected::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: #b8860b;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Pastille « Par … / Avec … » sur les vignettes (onglet Privé / partage futur) */
.photos-grid-item-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  max-height: 42%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Bulle sélection */
.photos-selection-bubble {
  position: fixed;
  left: 12px;
  bottom: calc(12px + max(8px, env(safe-area-inset-bottom, 0px)) + 56px);
  z-index: 998;
  pointer-events: none;
}
.photos-selection-bubble-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.photos-selection-bubble[hidden] {
  display: none;
}
.photos-selection-bubble-btn {
  pointer-events: auto;
  height: 52px;
  border-radius: 26px;
  background: linear-gradient(145deg, #d4a017 0%, #b8860b 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.photos-selection-bubble-count-btn {
  width: 52px;
  min-width: 52px;
  padding: 0;
  border-radius: 50%;
}
.photos-selection-bubble-cancel {
  width: auto;
  min-width: 52px;
  padding: 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
}
.photos-selection-bubble-btn:hover,
.photos-selection-bubble-btn:active {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.5);
}
.photos-selection-bubble-count {
  line-height: 1;
}

/* Popup Ajouter une photo (Caméra arrière / avant) */
.photos-add-modal-backdrop[hidden],
.photos-add-modal-backdrop[aria-hidden="true"] {
  display: none !important;
}
.photos-add-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photos-add-modal[hidden],
.photos-add-modal[aria-hidden="true"] {
  display: none !important;
}
.photos-add-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.photos-add-modal[aria-hidden="false"] { pointer-events: auto; }
.photos-add-modal-box {
  margin: 16px;
  min-width: 260px;
  max-width: 90vw;
  padding: 20px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: auto;
}
.photos-add-modal-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
}
.photos-add-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.photos-add-modal-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #d4a017 0%, #b8860b 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photos-add-modal-btn:hover,
.photos-add-modal-btn:active {
  background: linear-gradient(145deg, #e0ac1a 0%, #c4920c 100%);
}
.photos-add-modal-btn.photos-add-modal-cancel {
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  font-weight: 500;
}
.photos-add-modal-btn.photos-add-modal-cancel:hover,
.photos-add-modal-btn.photos-add-modal-cancel:active {
  background: rgba(0, 0, 0, 0.12);
}

/* Modale ajout album projet (2 options) — au-dessus du dock flottant */
.photos-par-projet-album-add-backdrop {
  z-index: 1200;
}
.photos-par-projet-album-add-modal {
  z-index: 1201;
}

/* Popup actions sélection (Privé) */
.photos-action-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  -webkit-tap-highlight-color: transparent;
}
.photos-action-popup-backdrop[hidden] {
  display: none;
}
.photos-action-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  padding: 20px 20px 16px;
  z-index: 1001;
}
.photos-action-popup[hidden] {
  display: none;
}
.photos-action-popup-title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
}
.photos-action-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.photos-action-popup-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Onglet Privé : envoyer ou copier vers un # Smartsheet */
.photos-action-copy-projet {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.photos-action-copy-projet:hover,
.photos-action-copy-projet:active {
  background: #d1fae5;
}
.photos-action-share {
  background: rgba(184, 134, 11, 0.18);
  color: #6b5200;
}
.photos-action-share:hover,
.photos-action-share:active {
  background: rgba(184, 134, 11, 0.3);
}
.photos-action-delete {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}
.photos-action-delete:hover,
.photos-action-delete:active {
  background: rgba(185, 28, 28, 0.22);
}
.photos-action-cancel {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}
.photos-action-cancel:hover,
.photos-action-cancel:active {
  background: rgba(0, 0, 0, 0.1);
}

.photos-empty {
  text-align: center;
  color: #6b7280;
  padding: 48px 24px;
  margin: 0;
  font-size: 0.95rem;
}

/* Barre basse Photos (Privé, Par projet) */
#photos-screen .photos-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  z-index: 999;
  flex-shrink: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
  margin: 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  display: flex;
  align-items: stretch;
}
#photos-screen .photos-menu {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  width: 100%;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
#photos-screen .photos-menu-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;
  border-radius: 0;
}
#photos-screen .photos-menu-tab:active {
  background: rgba(0, 0, 0, 0.04);
}
#photos-screen .photos-menu-tab.active {
  color: #2563eb;
  font-weight: 600;
}
@media (hover: hover) {
  #photos-screen .photos-menu-tab:hover {
    background: rgba(0, 0, 0, 0.03);
  }
}
#photos-screen .photos-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#photos-screen .photos-nav-icon svg {
  width: 1.35rem;
  min-width: 24px;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}
#photos-screen .photos-header .photos-nav-icon svg {
  width: 22px;
  height: 22px;
}
#photos-screen .photos-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

/* === Modal Partager une photo === */
.photos-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.photos-modal.photos-modal--open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
#app-container:has(.photos-modal.photos-modal--open) .photos-main {
  overflow: hidden !important;
  touch-action: none;
}
.photos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: contain;
}
.photos-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);
  margin-top: 8vh;
}
.photos-assign-projet-modal-box {
  max-width: min(420px, calc(100vw - 24px));
  margin-top: max(12px, env(safe-area-inset-top, 0px));
}
.photos-assign-projet-desc {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
}
.photos-assign-projet-msg {
  margin: 0 0 8px;
  font-size: 0.85rem;
}
/* Onglets catégorie : mêmes styles que #photos-screen (le modal est hors de #photos-screen) */
#photos-assign-projet-modal .photos-par-projet-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
  align-items: stretch;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 76px;
  padding: 12px 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-muted, #6b7280);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab:active {
  background: rgba(0, 0, 0, 0.04);
}
@media (hover: hover) {
  #photos-assign-projet-modal .photos-par-projet-cat-tab:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
  }
}
#photos-assign-projet-modal .photos-par-projet-cat-tab.active {
  color: #2563eb;
  font-weight: 600;
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.14);
}
#photos-assign-projet-modal .photos-par-projet-cat-tab .note-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab .note-nav-icon svg {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab .note-nav-icon img.projet-nav-icon-img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab:not(.active) .note-nav-icon img.projet-nav-icon-img {
  opacity: 0.6;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab.active .note-nav-icon svg,
#photos-assign-projet-modal .photos-par-projet-cat-tab.active .note-nav-icon {
  color: #2563eb;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab.active .note-nav-icon svg {
  stroke: currentColor;
}
#photos-assign-projet-modal .photos-par-projet-cat-tab.active .note-nav-icon img.projet-nav-icon-img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(31%) sepia(98%) saturate(2842%) hue-rotate(211deg) brightness(95%) contrast(101%);
}
#photos-assign-projet-modal .photos-par-projet-cat-tab .note-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
}
.photos-assign-projet-search-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  margin-bottom: 4px;
}
.photos-assign-projet-search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.95rem;
}
.photos-assign-projet-list {
  margin-top: 12px;
  max-height: min(48vh, 340px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.photos-assign-projet-sheet-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin: 10px 0 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.photos-assign-projet-sheet-label:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.photos-assign-projet-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(184, 134, 11, 0.25);
  border-radius: 10px;
  background: rgba(184, 134, 11, 0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photos-assign-projet-pick-btn:active {
  background: rgba(184, 134, 11, 0.14);
}
.photos-assign-projet-pick-sheet {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  line-height: 1.2;
}
.photos-assign-projet-pick-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  width: 100%;
}
.photos-assign-projet-pick-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b5200;
  flex-shrink: 0;
}
.photos-assign-projet-pick-sep {
  color: #9ca3af;
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}
.photos-assign-projet-pick-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
  flex: 1;
  min-width: 8em;
  text-align: left;
}
.photos-assign-projet-pick-sub {
  font-size: 0.78rem;
  color: #4b5563;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photos-assign-projet-empty,
.photos-assign-projet-loading {
  margin: 12px 0;
  font-size: 0.88rem;
  color: #6b7280;
  text-align: center;
}
.photos-assign-projet-modal .photos-modal-actions {
  margin-top: 14px;
}
.photos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.photos-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.photos-modal-close {
  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;
}
.photos-modal-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}
.photos-share-desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 16px;
}
#photos-share-modal .photos-input-group {
  margin-bottom: 12px;
}
#photos-share-modal .photos-input-group label {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
#photos-share-modal .photos-share-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}

.photos-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.photos-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;
}
.photos-modal-create {
  background: linear-gradient(145deg, #d4a017 0%, #b8860b 100%);
  border: none;
  color: #fff;
  flex: 1;
  min-width: 140px;
}
.photos-modal-create:hover,
.photos-modal-create:active {
  background: linear-gradient(145deg, #e0ac1a 0%, #c4920c 100%);
}
.photos-modal-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex: 0 0 auto;
}
.photos-modal-cancel:hover,
.photos-modal-cancel:active {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

/* === Vue show (slideshow) === */
#photo-view-screen {
  padding: 0;
  padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
  background: transparent;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#photo-view-screen {
  background: url('../../images/app-bg.png') no-repeat center bottom / cover;
  background-attachment: fixed;
}
#photo-view-screen .photo-view-main {
  background: transparent;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
#photo-view-screen .photo-view-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}
#photo-view-screen .photo-view-back {
  padding: 10px 8px;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#photo-view-screen .photo-view-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-view-counter {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
}
.photo-view-nav {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-view-nav:hover,
.photo-view-nav:active {
  background: rgba(0, 0, 0, 0.12);
}
.photo-view-nav[hidden] {
  display: none;
}
.photo-view-content .photo-view-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.photo-view-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 0;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* File d’envoi multi-photos */
.photos-upload-queue[hidden],
.photos-upload-queue[aria-hidden="true"] {
  display: none !important;
}
.photos-upload-queue {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10060;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0));
  pointer-events: none;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}
.photos-upload-queue-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 420px;
  max-height: min(40vh, 280px);
  display: flex;
  flex-direction: column;
  background: rgba(26, 26, 26, 0.94);
  color: #f3f4f6;
  border-radius: 14px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.photos-upload-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.photos-upload-queue-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
.photos-upload-queue-dismiss {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photos-upload-queue-dismiss:hover,
.photos-upload-queue-dismiss:active {
  background: rgba(255, 255, 255, 0.18);
}
.photos-upload-queue-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.photos-upload-queue-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}
.photos-upload-queue-item:last-child {
  border-bottom: none;
}
.photos-upload-queue-item-name {
  font-weight: 500;
  color: #f9fafb;
  word-break: break-all;
}
.photos-upload-queue-item-status {
  color: #9ca3af;
}
.photos-upload-queue-item-note {
  font-size: 0.78rem;
  color: #fde68a;
  line-height: 1.25;
}
.photos-upload-queue-item[data-state="done"] .photos-upload-queue-item-status {
  color: #86efac;
}
.photos-upload-queue-item[data-state="error"] .photos-upload-queue-item-status {
  color: #fca5a5;
}
