/* ===================================================
   GALERIES — Page choix du photographe (FlowingMenu)
   Fond blanc, teal #31B79A
   =================================================== */

:root {
  /* Même piste que body.view-events-grid (client_online.css) */
  --gallery-search-track: min(520px, calc(100vw - 220px));
}

.galeries-section {
  min-height: 100vh;
  padding-top: 64px; /* gal-header height */
  padding-bottom: 80px;
  background: var(--clr-bg, #F7F7F4);
}

.galeries-intro {
  text-align: center;
  padding: 48px 24px 32px;
}

.galeries-intro h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--clr-dark, #071D2A);
  margin-bottom: 8px;
}

.galeries-intro p {
  font-size: 1rem;
  color: var(--clr-muted, #61707A);
}

/* FlowingMenu container */
.galeries-menu-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 400px;
}

.galeries-loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--clr-muted);
}

/* Menu (FlowingMenu) */
.galeries-menu {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--clr-white, #fff);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(7, 29, 42, 0.08);
  overflow: hidden;
}

.galeries-menu__item {
  flex: 1;
  min-height: 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--clr-border, rgba(7, 29, 42, 0.08));
}

.galeries-menu__item:first-child {
  border-top: none;
}

.galeries-menu__item-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 80px;
  position: relative;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 3vh, 1.5rem);
  color: var(--clr-teal, #31B79A);
  transition: color 0.2s;
}

.galeries-menu__item-link:hover {
  opacity: 0.9;
}

.galeries-menu__item-link:focus:not(:focus-visible) {
  color: var(--clr-teal);
}

/* Marquee (effet hover) */
.galeries-menu__marquee {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translate3d(0, 101%, 0);
  background: var(--clr-teal, #31B79A);
}

.galeries-menu__marquee-inner-wrap {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.galeries-menu__marquee-inner {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  width: fit-content;
  will-change: transform;
}

.galeries-menu__marquee-part {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.galeries-menu__marquee-part span {
  white-space: nowrap;
  text-transform: uppercase;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 3vh, 1.5rem);
  line-height: 1;
  padding: 0 1vw;
  /* couleur définie en JS via primary/secondary du prestataire */
}

.galeries-menu__marquee-img {
  width: 100px;
  height: 40px;
  margin: 0 1.5vw;
  padding: 10px 14px;
  border-radius: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.galeries-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--clr-muted);
}

/* ─── GAL HEADER ─── */
.gal-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(7,29,42,0.07);
  box-shadow: 0 2px 16px rgba(7,29,42,0.06);
}

.gal-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--gallery-search-track)) minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  padding: 0 24px;
}

.gal-header__logo {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
}
.gal-header__logo-img { height: 36px; width: auto; display: block; }

/* Même composant que slug/galerie : .search-box.search-box-below */
.gal-header .search-box-below,
.gal-header__search.search-box-below {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  margin: 0;
  position: relative;
}
.gal-header .search-box-below input,
.gal-header__search.search-box-below input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  font-size: 0.95em;
  background: #f9fafb;
  color: #111827;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.gal-header .search-box-below input::placeholder,
.gal-header__search.search-box-below input::placeholder {
  color: #9ca3af;
}
.gal-header .search-box-below input:focus,
.gal-header__search.search-box-below input:focus {
  border-color: #6b7280;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
  background: #fff;
}

.gal-header__ctas {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gal-header-auth-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gal-header-auth-user {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 8px;
  min-width: 0;
  text-align: right;
}
.gal-header-auth-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-dark, #071D2A);
  min-width: 0;
  max-width: min(260px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gal-header__profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(7, 29, 42, 0.06);
  border-radius: 50%;
  color: var(--clr-dark, #071D2A);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s;
}
.gal-header__profile:hover {
  background: rgba(7, 29, 42, 0.1);
}
.gal-btn-text {
  font-size: 0.9rem;
  color: var(--clr-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.gal-btn-text:hover { color: var(--clr-dark); }

@media (max-width: 640px) {
  .gal-header__inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 10px;
    align-items: center;
  }
  .gal-header__logo {
    grid-column: 1;
    grid-row: 1;
  }
  .gal-header__ctas {
    grid-column: 2;
    grid-row: 1;
  }
  .gal-header .search-box-below,
  .gal-header__search.search-box-below {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
  #gal-header-auth-guest {
    display: none !important;
  }
  .gal-header-auth-email {
    max-width: min(180px, 45vw);
  }
}
