/* ═══════════════════════════════════════════
   À LA VOLETTE — Styles principaux
   ═══════════════════════════════════════════ */

:root {
  --black:      #0a0a0a;
  --white:      #fafafa;
  --grey-light: #e8e8e8;
  --grey-mid:   #999;
  --grey-dark:  #444;
  --grey-hover: #b3b3b3;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Poppins', sans-serif;
  --header-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #fafafa;
  color: var(--black);
  font-family: var(--font-body);
}

/* ── Fond global #fafafa ── */
html, body, .site, .ct-container, .site-header, .ct-header,
.site-footer, .ct-footer, footer, .ct-main-container, #page {
  background-color: #fafafa !important;
}

/* ── Home : layout ── */
body.home {
  overflow: hidden;
  height: 100vh;
}
body:not(.home) {
  overflow: auto;
  height: auto;
}

/* ── Cacher titre site ── */
.site-title, .site-description, .ct-site-title, .ct-site-description,
.wp-block-site-title, .entry-title, h1.entry-title, h2.entry-title, .page-title {
  display: none !important;
}

/* ── HEADER ── */
.site-header, .ct-header, header.site-header {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,250,250,0.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-light);
}

/* Container header pleine largeur */
.site-header .ct-container,
.ct-header .ct-container,
.ct-header-builder .ct-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
}

/* Logo */
.custom-logo { height: 56px; width: auto; }
.custom-logo-link::after, .ct-site-logo a::after { display: none !important; }

/* ── LABEL SOUS LE LOGO ── */
.alv-side-label {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--header-h);
  display: flex;
  align-items: flex-end;
  padding: 0 0 7px 26px;
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-mid);
  z-index: 101;
  white-space: nowrap;
  pointer-events: none;
}

/* ── HOME — SCROLL HORIZONTAL ── */
#alv-home {
  position: fixed;
  top: var(--header-h, 80px);
  left: 0;
  right: 0;
  bottom: 80px;
  overflow: hidden;
}

.portrait-track {
  display: flex;
  align-items: center;
  height: 100%;
  cursor: grab;
  user-select: none;
  will-change: transform;
}
.portrait-track:active { cursor: grabbing; }

.portrait-item {
  flex: 0 0 auto;
  height: 100%;
  width: auto;
  position: relative;
  overflow: hidden;
}
.portrait-item + .portrait-item {
  border-left: 1px solid rgba(0,0,0,0.08);
}

.portrait-img-wrap {
  height: 100%;
  position: relative;
}
#alv-home .portrait-img-wrap img,
#track .portrait-img-wrap img,
.portrait-item img {
  height: 100% !important;
  width: auto !important;
  max-width: none !important;  /* écrase le max-width: 100% de Blocksy */
  max-height: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
  pointer-events: none;
}
.portrait-item:hover .portrait-img-wrap img { transform: scale(1.03); }

.portrait-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 80px 24px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
}
.portrait-item:hover .portrait-overlay { opacity: 1; }

.portrait-name {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  color: white;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Scroll hint */
.scroll-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
  background: rgba(0,0,0,0.2);
  padding: 5px 14px;
  backdrop-filter: blur(6px);
  border-radius: 2px;
}
.scroll-hint-line {
  width: 28px; height: 0.5px;
  background: rgba(255,255,255,0.4);
  position: relative; overflow: hidden;
}
.scroll-hint-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: white;
  animation: slideLine 1.8s ease-in-out infinite;
}
@keyframes slideLine { 0% { left: -100%; } 100% { left: 100%; } }

.scroll-counter {
  position: fixed;
  right: 40px; bottom: 20px;
  font-family: var(--font-body);
  font-size: 8px; font-weight: 300;
  letter-spacing: 0.2em;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  z-index: 20;
  pointer-events: none;
  background: rgba(0,0,0,0.2);
  padding: 5px 10px;
  backdrop-filter: blur(6px);
  border-radius: 2px;
}

.alv-empty {
  text-align: center;
  padding: 120px 48px;
  font-style: italic;
  color: var(--grey-mid);
}

/* ── FOOTER ── */
.site-footer, .ct-footer, footer {
  position: fixed !important;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(250,250,250,0.96) !important;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--grey-light);
  padding: 12px 48px 20px !important;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-footer *, .ct-footer *, footer * {
  font-family: var(--font-body) !important;
  font-size: 8px !important;
  font-weight: 300 !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase !important;
  color: var(--black) !important;
  text-decoration: none !important;
}

/* ── GALERIE PORTRAIT ── */
body.single-portrait { overflow: auto !important; height: auto !important; }

#alv-gallery {
  padding-top: 100px;
  padding-bottom: 60px;
  min-height: 100vh;
  background: #fafafa;
}

.gallery-header {
  position: sticky;
  top: var(--header-h);
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 16px 48px;
  background: rgba(250,250,250,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grey-light);
  z-index: 10;
}
.gallery-back {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--grey-dark); text-decoration: none;
  transition: color 0.2s;
}
.gallery-back:hover { color: var(--grey-hover); }
.gallery-title {
  font-family: var(--font-display);
  font-size: 30px; letter-spacing: 0.08em;
  color: var(--black); font-weight: 400; text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px 4px 80px 4px;
  align-items: start;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr !important; }
  .gallery-item.landscape { grid-column: span 1 !important; }
}

/* Image paysage : réduite à 2/3 de largeur pour équilibrer visuellement */
.gallery-item.landscape {
  grid-column: span 2;
}

.gallery-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  width: 100%;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.gallery-item:hover img { transform: scale(1.03); }

/* ── LIGHTBOX ── */
.alv-lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 999;
  background: rgba(10,10,10,0.96);
  align-items: center; justify-content: center;
}
.alv-lightbox.open { display: flex; }
.lightbox-img-wrap { max-width: 90vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.lightbox-img-wrap img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed; background: none; border: none;
  color: white; cursor: pointer; line-height: 1; padding: 12px;
  transition: color 0.2s; z-index: 1000;
}
.lightbox-close { top: 24px; right: 32px; font-size: 20px; }
.lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); font-size: 44px; }
.lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); font-size: 44px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--grey-hover); }
.lightbox-counter {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-body); font-size: 9px;
  letter-spacing: 0.2em; color: rgba(255,255,255,0.35);
}

/* ── MENU ── */
.ct-menu > ul > li > a,
[data-id="menu"] > ul > li > a {
  --theme-link-initial-color: #0a0a0a !important;
  --theme-link-hover-color: #b3b3b3 !important;
  --theme-link-active-color: #b3b3b3 !important;
  color: #0a0a0a !important;
  text-decoration: none !important;
}
.ct-menu > ul > li > a:hover,
.ct-menu > ul > li.current-menu-item > a,
[data-id="menu"] > ul > li > a:hover,
[data-id="menu"] > ul > li.current-menu-item > a {
  color: #b3b3b3 !important;
  text-decoration: underline !important;
  text-underline-offset: 5px !important;
  text-decoration-thickness: 0.5px !important;
  text-decoration-color: #b3b3b3 !important;
}
.ct-menu a, nav a {
  font-family: 'Poppins', sans-serif !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: 0.12em !important;
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 768px) {
  .site-header, .ct-header { padding: 10px 20px !important; }
  .ct-site-logo img, .custom-logo { height: 36px !important; }
  .alv-side-label { display: none !important; }
  .scroll-hint, .scroll-counter { display: none !important; }

  body.home {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
  }

  #alv-home {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 !important;
    padding-top: var(--header-h, 80px) !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  .portrait-track {
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
    cursor: default !important;
  }

  body.home #alv-home .portrait-track .portrait-item {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    border-left: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.home #alv-home .portrait-track .portrait-item img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .portrait-overlay {
    opacity: 1 !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 40px 16px 16px !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .portrait-name { font-size: 22px !important; }

  .site-footer, .ct-footer, footer {
    position: static !important;
    height: auto !important;
    padding: 16px 20px 22px !important;
  }
}

@media (max-width: 480px) {
  .portrait-item { aspect-ratio: 3/4; }
  .portrait-name { font-size: 20px !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .site-header, .ct-header { padding: 12px 24px !important; }
  .ct-site-logo img, .custom-logo { height: 44px !important; }
}

/* Fix mobile header */
@media (max-width: 768px) {
  .site-header, .ct-header { padding: 10px 20px !important; }
  .ct-site-logo img, .custom-logo { height: 36px !important; }
  .alv-side-label { display: none !important; }
  .scroll-hint, .scroll-counter { display: none !important; }

  body.home {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
  }

  #alv-home {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 !important;
    padding-top: var(--header-h, 80px) !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  .portrait-track {
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
    cursor: default !important;
  }

  body.home #alv-home .portrait-track .portrait-item {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    border-left: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.home #alv-home .portrait-track .portrait-item img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .portrait-overlay {
    opacity: 1 !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 40px 16px 16px !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .portrait-name { font-size: 22px !important; }

  .site-footer, .ct-footer, footer {
    position: static !important;
    height: auto !important;
    padding: 16px 20px 22px !important;
  }
}

@media (max-width: 768px) {
  .site-header, .ct-header { padding: 10px 20px !important; }
  .ct-site-logo img, .custom-logo { height: 36px !important; }
  .alv-side-label { display: none !important; }
  .scroll-hint, .scroll-counter { display: none !important; }

  body.home {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
  }

  #alv-home {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 !important;
    padding-top: var(--header-h, 80px) !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  .portrait-track {
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
    transform: none !important;
    cursor: default !important;
  }

  body.home #alv-home .portrait-track .portrait-item {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    border-left: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.home #alv-home .portrait-track .portrait-item img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .portrait-overlay {
    opacity: 1 !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 40px 16px 16px !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .portrait-name { font-size: 22px !important; }

  .site-footer, .ct-footer, footer {
    position: static !important;
    height: auto !important;
    padding: 16px 20px 22px !important;
  }
}


/* ── BLOC MOBILE SÉPARÉ ── */
#alv-mobile { display: none; }

@media (max-width: 768px) {
  /* Cacher le bloc desktop */
  #alv-home { display: none !important; }

  /* Afficher le bloc mobile */
  #alv-mobile {
    display: block;
    margin-top: var(--header-h, 80px);
    width: 100%;
  }

  .mobile-portrait-item {
    display: block;
    width: 100%;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
  }

  .mobile-portrait-item img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-portrait-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    color: white;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
}

/* ── HEADER OPAQUE sur mobile ── */
@media (max-width: 768px) {
  .site-header, .ct-header, header.site-header {
    background: #fafafa !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ── Fix lien mobile ── */
a.mobile-portrait-item,
a.mobile-portrait-item:hover,
a.mobile-portrait-item:visited {
  display: block !important;
  width: 100% !important;
  text-decoration: none !important;
  color: inherit !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* ── Fix tap sur mobile ── */
a.mobile-portrait-item img {
  pointer-events: none !important;
}
a.mobile-portrait-item .mobile-portrait-name {
  pointer-events: none !important;
}

/* ── Sous-titre galerie ── */
.gallery-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gallery-description {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--grey-mid);
  line-height: 1.6;
  max-width: 600px;
}

/* ── Mobile : overlay nom + fonction animé au scroll ── */
.mobile-portrait-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.mobile-portrait-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: white;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.mobile-portrait-function {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   COMMUNICATION VISUELLE
   ═══════════════════════════════════════════ */

#alv-comm {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 56px;
  box-sizing: border-box;
}

.comm-track {
  display: flex;
  height: 100%;
  cursor: grab;
  user-select: none;
  will-change: transform;
  align-items: center;
  gap: 24px;
  padding: 0 40px;
}
.comm-track:active { cursor: grabbing; }

.comm-item {
  flex: 0 0 auto;
  height: 85%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.comm-item img {
  height: 100%;
  width: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.comm-item:hover img { transform: scale(1.02); }

.comm-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
}
.comm-item:hover .comm-overlay { opacity: 1; }

.comm-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: white;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Lightbox communication ── */
#comm-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10,10,10,0.96);
  align-items: center;
  justify-content: center;
}
#comm-lightbox.open { display: flex; }

.comm-lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
}
.comm-lb-wrap {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.comm-lb-wrap img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
  display: block;
}

.comm-lb-close,
.comm-lb-prev,
.comm-lb-next {
  position: fixed;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  line-height: 1;
  padding: 12px;
  transition: color 0.2s;
  z-index: 1000;
}
.comm-lb-close { top: 24px; right: 32px; font-size: 20px; }
.comm-lb-prev  { left: 24px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.comm-lb-next  { right: 24px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.comm-lb-close:hover,
.comm-lb-prev:hover,
.comm-lb-next:hover { color: var(--grey-mid); }

.comm-lb-title {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
.comm-lb-caption {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-align: center;
  min-height: 14px;
}

.comm-lb-counter {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.2);
  text-align: center;
}

/* ── Mobile : scroll vertical ── */
@media (max-width: 768px) {
  #alv-comm {
    position: relative !important;
    padding-top: var(--header-h, 80px) !important;
    padding-bottom: 0 !important;
  }
  .comm-track {
    flex-direction: column !important;
    height: auto !important;
    transform: none !important;
    cursor: default !important;
    gap: 8px !important;
    padding: 8px !important;
    align-items: center !important;
  }
  .comm-item {
    height: auto !important;
    width: 100% !important;
  }
  .comm-item img {
    height: auto !important;
    width: 100% !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
  .comm-overlay { opacity: 1 !important; }
}
