/* Galerie. DA du site : fond #232323, cartes #2b2b2b, bleu #2379ee, pilules, Poppins.
   Touche propre à la page : les photos sont présentées en polaroïds. */
.gallery-page {
  --g-bg: #232323;
  --g-card: #2b2b2b;
  --g-inner: #1f1f1f;
  --g-line: #3d3d3d;
  --g-blue: #2379ee;
  --g-blue-soft: #6aa8ff;
  --g-muted: #b4b4b4;
  --g-like: #ff5d73;
  min-height: 70vh;
  background: var(--g-bg);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
}

.gallery-page svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-page h1,
.gallery-page h2 {
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
}

/* ---------------------------------------------------------------- En-tête */
.gallery-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.gallery-header__title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
}

.gallery-header__lead {
  margin: 0.35rem 0 0;
  color: var(--g-muted);
  font-size: 1.05rem;
}

.gallery-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 100px;
  background: var(--g-blue);
  color: #ffffff !important;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.gallery-cta:hover {
  background: #1a62cf;
}

.gallery-cta:disabled {
  background: #234079;
  color: #7d8aa6 !important;
  cursor: not-allowed;
}

.gallery-cta svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* ---------------------------------------------------------------- Auteur et like */
.gallery-author {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff !important;
  font-weight: 600;
  text-decoration: none;
}

.gallery-author:hover span {
  text-decoration: underline;
}

.gallery-author img {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  image-rendering: pixelated;
}

.gallery-like {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.gallery-like:hover {
  border-color: var(--g-like);
}

.gallery-like svg {
  width: 1.15rem;
  height: 1.15rem;
}

.gallery-like.is-liked {
  border-color: var(--g-like);
  background: rgba(255, 93, 115, 0.16);
}

.gallery-like.is-liked svg {
  fill: var(--g-like);
  stroke: var(--g-like);
}

.gallery-like.is-bursting svg {
  animation: gallery-heart 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes gallery-heart {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------------------------------------------------------------- Recherche */
.gallery-wrap {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.gallery-wrap--page {
  /* La navbar est fixe : le contenu commence sous elle */
  padding-top: 6.5rem;
}

.gallery-wrap--upload {
  max-width: 1120px;
}

.gallery-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.5rem;
  align-items: start;
}

.gallery-upload__main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gallery-upload__side .gallery-page__subtitle {
  margin-top: 0;
}

.gallery-rules {
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: var(--g-card);
  color: #dedede;
  font-size: 0.92rem;
  line-height: 1.6;
}

.gallery-rules h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.gallery-rules ul {
  margin: 0 0 0.6rem;
  padding-left: 1.2rem;
}

.gallery-rules p {
  margin: 0;
  color: var(--g-muted);
  font-size: 0.85rem;
}

.gallery-sent__empty {
  margin: 0;
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--g-card);
  color: var(--g-muted);
  font-size: 0.9rem;
}

.gallery-sent__thumb {
  display: flex;
  flex: 0 0 5.5rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 5.5rem;
  height: 3.4rem;
  border-radius: 7px;
  background: #3a3a3a;
}

.gallery-sent__thumb--none {
  color: #8a8a8a;
}

.gallery-sent__thumb--none svg {
  width: 1.6rem;
  height: 1.6rem;
}

.gallery-photo-id {
  color: var(--g-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .gallery-upload {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gallery-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.6rem;
  border-radius: 22px;
  background: var(--g-card);
}

.gallery-search__query {
  display: flex;
  flex: 1 1 16rem;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0 1rem;
  border-radius: 100px;
  background: var(--g-inner);
}

.gallery-search__query svg {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--g-muted);
}

.gallery-search__query input {
  width: 100%;
  min-height: 2.75rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.95rem;
}

.gallery-search__query:focus-within,
.gallery-search__filter select:focus {
  box-shadow: 0 0 0 2px var(--g-blue);
}

.gallery-search__filter {
  flex: 0 1 auto;
  margin: 0;
}

.gallery-search__filter select {
  min-height: 2.75rem;
  max-width: 13rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 100px;
  outline: 0;
  background: var(--g-inner);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  color-scheme: dark;
}

.gallery-search__submit {
  min-height: 2.75rem;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 100px;
  background: var(--g-blue);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s;
}

.gallery-search__submit:hover {
  background: #1a62cf;
}

.gallery-count {
  margin: 0 0 1.25rem;
  color: var(--g-muted);
  font-size: 0.95rem;
}

.gallery-count a,
.gallery-back a {
  color: var(--g-blue-soft) !important;
}

/* ---------------------------------------------------------------- Albums */
.gallery-album {
  margin-bottom: 2.75rem;
  background: transparent;
}

.gallery-album__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.9rem;
}

.gallery-album__head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.gallery-album__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-more {
  padding: 0.4rem 1.05rem;
  border: 1.5px solid var(--g-blue);
  border-radius: 100px;
  color: var(--g-blue-soft) !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.gallery-more:hover {
  background: var(--g-blue);
  color: #ffffff !important;
}

/* Rangée de polaroïds : flèches blanches sur les côtés, bords assombris tant qu'il reste des photos */
.gallery-rail {
  position: relative;
}

.gallery-rail::before,
.gallery-rail::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 5.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-rail::before {
  left: 0;
  background: linear-gradient(to right, var(--g-bg) 15%, transparent);
}

.gallery-rail::after {
  right: 0;
  background: linear-gradient(to left, var(--g-bg) 15%, transparent);
}

.can-prev .gallery-rail::before,
.can-next .gallery-rail::after {
  opacity: 1;
}

.gallery-rail__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 4.5rem;
  margin-top: -2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.gallery-rail__arrow[hidden] {
  display: none;
}

.gallery-rail__arrow:hover,
.gallery-rail__arrow:focus-visible {
  opacity: 1;
}

.gallery-rail__arrow svg {
  width: 2.2rem;
  height: 2.2rem;
  stroke-width: 2.6;
}

.gallery-rail__arrow--prev {
  left: 0;
}

.gallery-rail__arrow--next {
  right: 0;
}

.gallery-strip {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.gallery-strip::-webkit-scrollbar {
  display: none;
}

.gallery-strip:focus-visible {
  outline: 2px solid var(--g-blue);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- Polaroïd */
.gallery-card {
  position: relative;
  display: flex;
  flex: 0 0 clamp(14rem, 22vw, 18rem);
  flex-direction: column;
  padding: 0.6rem 0.6rem 0;
  border-radius: 4px;
  background: #f4f2ec;
  color: #222222 !important;
  text-decoration: none;
  scroll-snap-align: start;
  transition: background 0.15s;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  outline: 2px solid var(--g-blue);
  outline-offset: 2px;
}

.gallery-card__photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #1f1f1f;
}

.gallery-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card__likes {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.55);
  /* Blanc sur la photo : le polaroïd, lui, a un texte foncé */
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.gallery-card__likes svg {
  width: 0.95rem;
  height: 0.95rem;
}

.gallery-card__likes.is-liked svg {
  fill: var(--g-like);
  stroke: var(--g-like);
}

.gallery-card__caption {
  display: block;
  min-height: 3.4rem;
  padding: 0.55rem 0.15rem 0.7rem;
}

.gallery-card__caption strong {
  display: block;
  overflow: hidden;
  color: #1c1c1c;
  font-size: 0.98rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card__caption span {
  color: #6b6b6b;
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------- Toutes les photos */
.gallery-page__title {
  margin: 0 0 1.25rem;
  font-size: 2.4rem;
  font-weight: 700;
}

.gallery-page__lead {
  margin: -0.75rem 0 1.5rem;
  color: var(--g-muted);
}

.gallery-page__subtitle {
  margin: 2.5rem 0 1rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.gallery-back {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.25rem;
}

.gallery-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--g-muted);
}

.gallery-empty {
  padding: 3.5rem 1.5rem;
  border-radius: 14px;
  background: var(--g-card);
  color: var(--g-muted);
  text-align: center;
}

.gallery-empty h2 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.gallery-empty p {
  margin: 0 0 1.25rem;
}

.gallery-flash {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.2rem;
  border-radius: 14px;
  background: rgba(60, 207, 110, 0.12);
  color: #8ee6aa;
}

.gallery-flash--wait {
  background: rgba(242, 169, 59, 0.12);
  color: #ffc978;
}

/* ---------------------------------------------------------------- Fenêtre d'aperçu */
.gallery-lightbox {
  width: min(1240px, 94vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: #1c1c1c;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
}

.gallery-lightbox[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  animation: gallery-rise 0.25s ease both;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.gallery-lightbox svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: #101010;
}

.gallery-lightbox__stage img {
  display: block;
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
}

.gallery-lightbox__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  overflow-y: auto;
  padding: 3.2rem 1.4rem 1.4rem;
}

.gallery-lightbox__panel h2 {
  margin: 0;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.gallery-lightbox__date {
  margin: 0;
  color: #b4b4b4;
  font-size: 0.85rem;
}

.gallery-lightbox__description {
  margin: 0;
  color: #dedede;
  font-size: 0.95rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.6);
  color: #ffffff;
  backdrop-filter: blur(8px);
  transition: background 0.15s, opacity 0.15s;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover:not(:disabled) {
  background: #2379ee;
}

.gallery-lightbox__nav:disabled {
  opacity: 0.25;
}

.gallery-lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
}

.gallery-lightbox__nav {
  top: 50%;
  margin-top: -1.25rem;
}

.gallery-lightbox__nav--prev {
  left: 0.75rem;
}

.gallery-lightbox__nav--next {
  right: 20.75rem;
}

/* ---------------------------------------------------------------- Résultats */
.gallery-results {
  display: block;
  transition: opacity 0.15s;
}

.gallery-results[busy] {
  opacity: 0.55;
}

/* ---------------------------------------------------------------- Like et menu « … » */
.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.gallery-menu {
  position: relative;
}

.gallery-menu[hidden] {
  display: none;
}

.gallery-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transition: border-color 0.15s, background 0.15s;
}

.gallery-menu__toggle:hover,
.gallery-menu__toggle[aria-expanded='true'] {
  border-color: var(--g-blue, #2379ee);
}

.gallery-menu__toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  stroke: none;
}

.gallery-menu__list {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 10rem;
  overflow: hidden;
  border: 1px solid #3d3d3d;
  border-radius: 12px;
  background: #232323;
}

/* Dans la fenêtre d'aperçu, le bas est coupé : le menu s'ouvre vers le haut */
.gallery-lightbox .gallery-menu__list {
  top: auto;
  bottom: calc(100% + 0.4rem);
}

.gallery-menu__list[hidden],
.gallery-menu__list [hidden],
.gallery-rename[hidden] {
  display: none;
}

.gallery-menu__list form {
  margin: 0;
}

.gallery-menu__item {
  display: block;
  text-decoration: none;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
}

.gallery-menu__item:hover,
.gallery-menu__item:focus-visible {
  background: #2f2f2f;
}

.gallery-menu__item--danger {
  color: #ff9b9b;
}

.gallery-rename {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.6rem;
}

.gallery-rename input,
.gallery-rename textarea {
  flex: 1 1 100%;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid #3d3d3d;
  border-radius: 10px;
  background: #1f1f1f;
  color: #ffffff;
  font-family: inherit;
}

.gallery-rename input:focus,
.gallery-rename textarea:focus {
  border-color: #2379ee;
  outline: 0;
}

.gallery-rename__save,
.gallery-rename__cancel {
  padding: 0.35rem 0.95rem;
  border: 1.5px solid #2379ee;
  border-radius: 100px;
  background: #2379ee;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.gallery-rename__cancel {
  background: transparent;
  color: #6aa8ff;
}

/* ---------------------------------------------------------------- Page d'une photo */
.gallery-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  overflow: hidden;
  border-radius: 18px;
  background: #1c1c1c;
}

.gallery-photo__image {
  display: block;
  width: 100%;
  height: auto;
  background: #101010;
}

.gallery-photo__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1.5rem 1.4rem;
}

.gallery-photo__panel h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- Envoi */
.gallery-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 14px;
  background: var(--g-card);
}

.gallery-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 15rem;
  margin: 0;
  border: 2px dashed #4a4a4a;
  border-radius: 14px;
  background: var(--g-inner);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.gallery-drop:hover,
.gallery-drop.is-over,
.gallery-drop:focus-within {
  border-color: var(--g-blue);
}

.gallery-drop.has-file {
  border-style: solid;
  border-color: var(--g-blue);
}

.gallery-drop input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.gallery-drop__preview {
  display: block;
  width: 100%;
  max-height: 26rem;
  object-fit: contain;
}

.gallery-drop__preview[hidden],
.gallery-drop__hint[hidden] {
  display: none;
}

.gallery-drop__hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 1rem;
  color: var(--g-muted);
  font-size: 0.9rem;
}

.gallery-drop__hint svg {
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.4rem;
  color: var(--g-blue);
}

.gallery-drop__hint strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.gallery-field label {
  display: block;
  margin-bottom: 0.35rem;
  color: #e4e4e4;
  font-size: 0.9rem;
  font-weight: 600;
}

.gallery-field input,
.gallery-field textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--g-line);
  border-radius: 14px;
  background: var(--g-inner);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  color-scheme: dark;
}

.gallery-field input:focus,
.gallery-field textarea:focus {
  border-color: var(--g-blue);
  outline: 0;
}

.gallery-field--date input {
  width: auto;
  min-width: 13rem;
}

.gallery-form ul {
  margin: 0.35rem 0 0;
  padding: 0;
  color: #ff9b9b;
  font-size: 0.88rem;
  list-style: none;
}

.gallery-cta--submit {
  align-self: flex-start;
}

.gallery-sent {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-sent__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: var(--g-card);
}

.gallery-sent__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-sent__item strong {
  display: block;
  overflow-wrap: anywhere;
}

.gallery-status { font-size: 0.85rem; }
.gallery-status--ok { color: #8ee6aa; }
.gallery-status--wait { color: #ffc978; }
.gallery-status--no { color: #ff9b9b; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Barre de progression */
.gallery-progress[hidden],
.gallery-upload-error[hidden] {
  display: none;
}

.gallery-progress__track {
  overflow: hidden;
  height: 0.6rem;
  border-radius: 100px;
  background: var(--g-inner);
}

.gallery-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 100px;
  background: var(--g-blue);
  transition: width 0.2s linear;
}

.gallery-progress.is-processing .gallery-progress__bar {
  animation: gallery-processing 1.2s ease-in-out infinite;
}

@keyframes gallery-processing {
  50% { opacity: 0.5; }
}

.gallery-progress__label {
  margin: 0.4rem 0 0;
  color: var(--g-muted);
  font-size: 0.9rem;
}

.gallery-upload-error {
  margin: 0;
  color: #ff9b9b;
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- Petits écrans */
@media (max-width: 900px) {
  .gallery-lightbox[open],
  .gallery-photo {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-lightbox[open] {
    overflow-y: auto;
  }

  .gallery-lightbox__stage img {
    max-height: 60vh;
  }

  .gallery-lightbox__panel {
    padding-top: 1.2rem;
  }

  .gallery-lightbox__nav {
    top: 25vh;
  }

  .gallery-lightbox__nav--next {
    right: 0.75rem;
  }

  .gallery-search {
    border-radius: 18px;
  }

  .gallery-search__filter {
    flex: 1 1 8rem;
  }

  .gallery-search__filter select {
    width: 100%;
    max-width: none;
  }

  .gallery-search__submit {
    flex: 1 1 100%;
  }
}

@media (max-width: 520px) {
  .gallery-search__filter {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-lightbox[open],
  .gallery-like.is-bursting svg,
  .gallery-progress.is-processing .gallery-progress__bar {
    animation: none !important;
  }
}
