/**
 * Page Photos — profils particulier et particulierpro.
 *
 * Toute la refonte reste bornee a #profile-photos afin de ne pas modifier les
 * galeries historiques, les albums ni les lightboxes partagees.
 */

.profile-photos-page-column {
  min-width: 0;
  padding: 0 0 52px;
}

#profile-photos {
  --profile-photos-accent: var(--fl-profile-entity-action, var(--fl-color-entity-particulier-clair, #00a2b7));
  --profile-photos-accent-alt: var(--fl-profile-entity-light, color-mix(in srgb, var(--profile-photos-accent) 66%, #fff));
  --profile-photos-accent-hover: color-mix(in srgb, var(--profile-photos-accent) 84%, #00343c);
  --profile-photos-accent-soft: color-mix(in srgb, var(--profile-photos-accent) 10%, #fff);
  --profile-photos-accent-softer: color-mix(in srgb, var(--profile-photos-accent) 5%, #fff);
  --profile-photos-danger: var(--fl-color-profile-action-delete, #be2828);
  --profile-photos-ink: #17212b;
  --profile-photos-muted: #65788a;
  --profile-photos-border: #dbe7eb;
  --profile-photos-surface: var(--fl-color-surface, #fff);
  --profile-photos-canvas: #f6fafb;
  --profile-photos-shadow: 0 12px 34px rgba(27, 66, 76, .075);
  color: var(--profile-photos-ink);
  font-family: var(--fl-font-family-body, Poppins, Helvetica, sans-serif);
  margin: 0 auto;
  max-width: 1480px;
  min-width: 0;
  width: 100%;
}

#profile-photos *,
#profile-photos *::before,
#profile-photos *::after {
  box-sizing: border-box;
}

#profile-photos button {
  font-family: inherit;
}

.profile-photos-hero {
  align-items: flex-end;
  background:
    radial-gradient(circle at 91% 5%, rgba(255, 255, 255, .9) 0 7%, transparent 7.4%),
    linear-gradient(135deg, color-mix(in srgb, var(--profile-photos-accent) 10%, #fff) 0%, #fff 56%, color-mix(in srgb, var(--profile-photos-accent) 5%, #fff) 100%);
  border: 1px solid var(--profile-photos-border);
  border-radius: 24px;
  box-shadow: var(--profile-photos-shadow);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  overflow: hidden;
  padding: 28px 30px;
  position: relative;
}

.profile-photos-hero::before {
  background: linear-gradient(90deg, var(--profile-photos-accent), var(--profile-photos-accent-alt));
  border-radius: 0 0 999px 0;
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  top: 0;
  width: 146px;
}

.profile-photos-hero__content {
  min-width: 0;
}

.profile-photos-eyebrow {
  color: var(--profile-photos-accent);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .105em;
  line-height: 1.3;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.profile-photos-hero h1 {
  color: var(--profile-photos-ink);
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 700;
  letter-spacing: -.038em;
  line-height: 1.12;
  margin: 0;
}

.profile-photos-hero p {
  color: var(--profile-photos-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 10px 0 0;
  max-width: 760px;
}

.profile-photos-hero__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.profile-photos-button {
  align-items: center;
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  height: 40px;
  justify-content: flex-start;
  line-height: 1;
  max-width: 100%;
  min-width: 0;
  padding: 2px 15px 2px 2px;
  text-decoration: none;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
  white-space: nowrap;
  width: max-content;
}

.profile-photos-button--entity {
  background: var(--profile-photos-accent);
  box-shadow: 0 7px 17px color-mix(in srgb, var(--profile-photos-accent) 18%, transparent);
  color: #fff;
}

.profile-photos-button--entity:hover {
  background: var(--profile-photos-accent-hover);
  box-shadow: 0 9px 21px color-mix(in srgb, var(--profile-photos-accent-hover) 23%, transparent);
  color: #fff;
  transform: translateY(-1px);
}

.profile-photos-button:active {
  box-shadow: 0 3px 9px color-mix(in srgb, var(--profile-photos-accent-hover) 18%, transparent);
  transform: translateY(0);
}

.profile-photos-button:focus-visible,
.profile-photos-tab:focus-visible,
.profile-photos-text-link:focus-visible,
.profile-photos-load-more:focus-visible,
.profile-photo-card__media:focus-visible,
.profile-photo-card__action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--profile-photos-accent) 30%, transparent);
  outline-offset: 3px;
}

.profile-photos-button .icon-circle {
  align-items: center;
  align-self: center;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  overflow: hidden;
  width: 36px;
}

.profile-photos-button .icon-circle .svg-container {
  align-items: center;
  display: inline-flex;
  height: 21px !important;
  justify-content: center;
  width: 21px !important;
}

.profile-photos-button .icon-circle svg {
  height: 21px !important;
  max-height: 21px;
  max-width: 21px;
  width: 21px !important;
}

.profile-photos-button--entity .icon-circle,
.profile-photos-button--entity .icon-circle * {
  color: var(--profile-photos-accent) !important;
  fill: var(--profile-photos-accent) !important;
}

.profile-photos-button .btn-text {
  color: #fff;
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 0 1px;
  text-overflow: ellipsis;
}

.profile-photos-tabs {
  align-items: center;
  background: var(--profile-photos-surface);
  border: 1px solid var(--profile-photos-border);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(29, 66, 77, .045);
  display: inline-flex;
  gap: 4px;
  margin: 14px 0 20px;
  padding: 5px;
}

.profile-photos-tab {
  align-items: center;
  border-radius: 11px;
  color: var(--profile-photos-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

.profile-photos-tab:hover {
  background: var(--profile-photos-accent-softer);
  color: var(--profile-photos-accent);
}

.profile-photos-tab.is-active {
  background: var(--profile-photos-accent);
  color: #fff;
}

.profile-photos-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
}

.profile-photos-main,
.profile-photos-aside {
  min-width: 0;
}

.profile-photos-aside {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.profile-photos-panel {
  background: var(--profile-photos-surface);
  border: 1px solid var(--profile-photos-border);
  border-radius: 20px;
  box-shadow: 0 8px 27px rgba(28, 66, 77, .055);
  min-width: 0;
  padding: 20px;
}

.profile-photos-gallery {
  overflow: hidden;
}

.profile-photos-panel__header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 17px;
}

.profile-photos-panel__header h2,
.profile-photos-guide h2,
.profile-photos-discovery h2,
.profile-photos-privacy h2 {
  color: var(--profile-photos-ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin: 0;
}

.profile-photos-panel__header p,
.profile-photos-discovery p,
.profile-photos-privacy p {
  color: var(--profile-photos-muted);
  font-size: 12px;
  line-height: 1.58;
  margin: 5px 0 0;
}

.profile-photos-panel__count {
  align-items: center;
  background: var(--profile-photos-accent-soft);
  border: 1px solid color-mix(in srgb, var(--profile-photos-accent) 12%, transparent);
  border-radius: 999px;
  color: var(--profile-photos-accent);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  min-height: 32px;
  padding: 5px 11px;
}

.profile-photos-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-photo-card {
  aspect-ratio: 4 / 3;
  min-width: 0;
  overflow: hidden;
  transition: opacity .18s ease, transform .18s ease;
}

.profile-photo-card.is-removing {
  opacity: 0;
  transform: scale(.97);
}

.profile-photo-card.is-pinned:first-child {
  aspect-ratio: 2 / 1;
  grid-column: span 2;
}

.profile-photo-card__surface {
  background: #dfe9ec;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(17, 45, 53, .06);
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.profile-photo-card__media {
  background: #dfe9ec;
  display: block;
  inset: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
}

.profile-photo-card__media::after {
  background: linear-gradient(180deg, transparent 48%, rgba(13, 31, 37, .38) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: background-color .2s ease;
}

.profile-photo-card__media picture,
.profile-photo-card__media img {
  display: block;
  height: 100%;
  width: 100%;
}

.profile-photo-card__media img {
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .28s ease;
}

.profile-photo-card:hover .profile-photo-card__media img,
.profile-photo-card:focus-within .profile-photo-card__media img {
  transform: scale(1.035);
}

.profile-photo-card__open-hint {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-radius: 50%;
  color: var(--profile-photos-accent);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -42%);
  transition: opacity .18s ease, transform .18s ease;
  width: 36px;
  z-index: 2;
}

.profile-photo-card:hover .profile-photo-card__open-hint,
.profile-photo-card:focus-within .profile-photo-card__open-hint {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.profile-photo-card__badges {
  align-items: flex-end;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  left: 10px;
  max-width: calc(100% - 20px);
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.profile-photo-card__badge {
  align-items: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  gap: 5px;
  line-height: 1;
  min-height: 25px;
  padding: 5px 8px;
}

.profile-photo-card__badge--pinned {
  background: color-mix(in srgb, var(--profile-photos-accent) 88%, transparent);
  color: #fff;
}

.profile-photo-card__badge--privacy {
  background: rgba(255, 255, 255, .9);
  color: var(--profile-photos-ink);
}

.profile-photo-card__badge--archive {
  background: rgba(255, 255, 255, .9);
  color: var(--profile-photos-ink);
}

.profile-photo-card__actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  position: absolute;
  right: 9px;
  top: 9px;
  transform: translateY(-3px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 4;
}

.profile-photo-card:hover .profile-photo-card__actions,
.profile-photo-card:focus-within .profile-photo-card__actions {
  opacity: 1;
  transform: translateY(0);
}

.profile-photo-card__action {
  align-items: center;
  appearance: none;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(13, 31, 37, .16);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  transition: background-color .18s ease, transform .18s ease;
  width: 44px;
}

.profile-photo-card__action:hover {
  background: #fff;
  transform: translateY(-1px);
}

.profile-photo-card__action .svg-container {
  align-items: center;
  display: inline-flex;
  height: 20px !important;
  justify-content: center;
  width: 20px !important;
}

.profile-photo-card__action--pin,
.profile-photo-card__action--pin * {
  color: var(--profile-photos-accent) !important;
  fill: var(--profile-photos-accent) !important;
}

.profile-photo-card__action--pin.pinned {
  background: var(--profile-photos-accent);
}

.profile-photo-card__action--pin.pinned,
.profile-photo-card__action--pin.pinned * {
  color: #fff !important;
  fill: #fff !important;
}

.profile-photo-card__action--delete,
.profile-photo-card__action--delete * {
  color: var(--profile-photos-danger) !important;
  fill: var(--profile-photos-danger) !important;
}

.profile-photos-load-more {
  align-items: center;
  appearance: none;
  background: var(--profile-photos-accent-softer);
  border: 1px solid color-mix(in srgb, var(--profile-photos-accent) 18%, transparent);
  border-radius: 13px;
  color: var(--profile-photos-accent);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  margin: 14px 0 0;
  min-height: 46px;
  padding: 10px 18px;
  transition: background-color .18s ease, border-color .18s ease;
  width: 100%;
}

.profile-photos-load-more:hover {
  background: var(--profile-photos-accent-soft);
  border-color: color-mix(in srgb, var(--profile-photos-accent) 32%, transparent);
}

.profile-photos-load-more.loading,
.profile-photos-load-more.done {
  cursor: default;
}

.profile-photos-guide,
.profile-photos-discovery,
.profile-photos-privacy {
  position: relative;
}

.profile-photos-guide__icon,
.profile-photos-discovery__icon,
.profile-photos-privacy__icon,
.profile-photos-state__icon {
  align-items: center;
  background: var(--profile-photos-accent-soft);
  border: 1px solid color-mix(in srgb, var(--profile-photos-accent) 12%, transparent);
  border-radius: 14px;
  color: var(--profile-photos-accent);
  display: inline-flex;
  height: 46px;
  justify-content: center;
  margin-bottom: 14px;
  width: 46px;
}

.profile-photos-guide__icon *,
.profile-photos-privacy__icon *,
.profile-photos-state__icon * {
  color: var(--profile-photos-accent) !important;
  fill: var(--profile-photos-accent) !important;
}

.profile-photos-guide ol {
  display: grid;
  gap: 11px;
  list-style: none;
  margin: 17px 0 16px;
  padding: 0;
}

.profile-photos-guide li {
  border-left: 3px solid var(--profile-photos-accent-soft);
  display: grid;
  gap: 2px;
  padding-left: 11px;
}

.profile-photos-guide li strong {
  color: var(--profile-photos-ink);
  font-size: 12px;
}

.profile-photos-guide li span {
  color: var(--profile-photos-muted);
  font-size: 10px;
  line-height: 1.45;
}

.profile-photos-text-link {
  color: var(--profile-photos-accent);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.5;
  text-decoration: none;
}

.profile-photos-text-link:hover {
  color: var(--profile-photos-accent-hover);
  text-decoration: underline;
}

.profile-photos-text-link--arrow {
  align-items: center;
}

.profile-photos-discovery__icon {
  font-size: 19px;
}

.profile-photos-privacy {
  align-items: flex-start;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
}

.profile-photos-privacy__icon {
  margin: 0;
}

.profile-photos-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  padding: 42px 22px;
  text-align: center;
}

.profile-photos-state[hidden] {
  display: none;
}

.profile-photos-state h2,
.profile-photos-state h3 {
  color: var(--profile-photos-ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.35;
  margin: 0;
  max-width: 620px;
}

.profile-photos-state p {
  color: var(--profile-photos-muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 8px auto 18px;
  max-width: 590px;
}

.profile-photos-state--after-delete {
  min-height: 290px;
}

.profile-photos-state--private {
  margin-top: 0;
  min-height: 330px;
}

.profile-photos-state--private .profile-photos-eyebrow {
  margin-bottom: 7px;
}

.profile-photos-status {
  background: var(--profile-photos-ink);
  border-radius: 12px;
  bottom: 22px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10050;
}

.profile-photos-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.night-mode #profile-photos {
  --profile-photos-ink: #eef7f8;
  --profile-photos-muted: #a8bdc5;
  --profile-photos-border: #34454d;
  --profile-photos-surface: #262d34;
  --profile-photos-canvas: #1e252b;
  --profile-photos-accent-soft: rgba(49, 200, 215, .14);
  --profile-photos-accent-softer: rgba(49, 200, 215, .08);
}

body.night-mode .profile-photos-hero {
  background: linear-gradient(135deg, #21363b 0%, #262d34 58%, #223137 100%);
}

body.night-mode .profile-photo-card__surface,
body.night-mode .profile-photo-card__media {
  background: #1e252b;
}

@media (max-width: 1100px) {
  .profile-photos-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-photos-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .profile-photos-aside > :only-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .profile-photos-page-column {
    padding-bottom: 36px;
  }

  .profile-photos-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 24px 20px 20px;
  }

  .profile-photos-hero__actions,
  .profile-photos-hero__actions .profile-photos-button {
    width: 100%;
  }

  .profile-photos-hero__actions .profile-photos-button {
    justify-content: flex-start;
  }

  .profile-photos-tabs {
    display: flex;
    width: 100%;
  }

  .profile-photos-tab {
    flex: 1 1 0;
    min-height: 44px;
  }

  .profile-photos-panel {
    border-radius: 17px;
    padding: 16px;
  }

  .profile-photos-panel__header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .profile-photos-panel__count {
    align-self: flex-start;
  }

  .profile-photos-grid {
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-photo-card,
  .profile-photo-card.is-pinned:first-child {
    aspect-ratio: 1 / 1;
  }

  .profile-photo-card.is-pinned:first-child {
    aspect-ratio: 2 / 1;
    grid-column: span 2;
  }

  .profile-photo-card__surface {
    border-radius: 13px;
  }

  .profile-photo-card__actions {
    opacity: 1;
    right: 7px;
    top: 7px;
    transform: none;
  }

  .profile-photo-card__action {
    height: 44px;
    width: 44px;
  }

  .profile-photo-card__badge--privacy {
    display: none;
  }

  .profile-photo-card__badges {
    bottom: 7px;
    left: 7px;
  }

  .profile-photos-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-photos-aside > :only-child {
    grid-column: auto;
  }

  .profile-photos-state {
    min-height: 260px;
    padding: 34px 16px;
  }
}

@media (max-width: 576px) {
  /* La navigation profil historique reste sur une seule ligne sur cette page. */
  .profile-nav {
    flex-wrap: nowrap !important;
    height: 60px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .profile-nav::-webkit-scrollbar {
    display: none;
  }

  .profile-nav .profile-tab,
  .profile-nav .profile-tab2 {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
    white-space: nowrap;
  }

  .profile-photos-hero h1 {
    font-size: 28px;
  }

  .profile-photos-hero p {
    font-size: 12px;
  }

  .profile-photos-button {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #profile-photos *,
  #profile-photos *::before,
  #profile-photos *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
