/* ==========================================================================
   PREMIUM EDITORIAL — Couche finale portfolio photographe
   Hero cinématique · Galerie musée · Lightbox · Studio de design
   ========================================================================== */

/* ── Ken Burns amélioré (diaporama hero) ────────────────────────────────── */
.slideshow-layer {
  will-change: transform, opacity;
  transform: scale(1.12);
}

.slideshow-layer.active {
  animation: kenBurnsPremium 14s var(--imm-ease, ease-out) forwards;
}

@keyframes kenBurnsPremium {
  0%   { transform: scale(1.12) translate(0, 0); }
  100% { transform: scale(1.0) translate(-1.2%, -0.6%); }
}

body[data-page="home"] #page-canvas {
  min-height: 100svh;
}

body[data-page="home"] .page-bg-slideshow {
  z-index: 0;
}

/* Vignette cinéma sur le hero */
body[data-page="home"] .page-bg-overlay {
  background:
    radial-gradient(ellipse 90% 80% at 50% 50%, transparent 30%, rgba(0,0,0,0.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.08) 40%, rgba(0,0,0,0.55) 100%) !important;
}

/* Scroll hint élégant */
#scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(201, 169, 110, 0.55);
  font-family: var(--page-font-body);
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  animation: scrollPulse 2.4s ease-in-out infinite;
}

#scroll-hint::before {
  content: "Défiler";
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50%       { opacity: 0.85; transform: translateY(6px); }
}

/* ── Typographie hero — ombre portée, pas de boîte ────────────────────── */
body:not(.edit-mode) .canvas-element.el-text .el-text-inner {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body:not(.edit-mode) .canvas-element.el-text .el-text-inner h1 {
  font-weight: 300 !important;
  letter-spacing: 0.06em !important;
}

body:not(.edit-mode) .canvas-element.el-text .el-text-inner em {
  font-style: italic;
  font-weight: 300;
  opacity: 0.88;
}

/* Séparateurs dorés fins */
.el-separator hr,
.el-separator .sep-line {
  height: 1px !important;
  background: linear-gradient(90deg, var(--color-accent), transparent) !important;
  border: none !important;
  opacity: 0.75;
}

/* ── Galerie — présentation musée ───────────────────────────────────────── */
.gallery-block-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(201, 169, 110, 0.12) !important;
}

.gallery-block-title-wrap::after {
  width: 48px !important;
  height: 1px !important;
  background: var(--color-accent) !important;
}

.gallery-block:hover .gallery-block-title-wrap::after {
  width: 80px !important;
}

.gallery-filter-bar {
  margin-bottom: 3rem;
  gap: 0.65rem;
}

.gallery-filter-btn {
  font-family: var(--page-font-body) !important;
  letter-spacing: 0.18em !important;
  font-size: 0.72rem !important;
  padding: 0.55rem 1.4rem !important;
  border-radius: 0 !important;
  border: 1px solid rgba(201, 169, 110, 0.2) !important;
}

.gallery-filter-btn.active {
  background: rgba(201, 169, 110, 0.12) !important;
  border-color: var(--color-accent) !important;
  color: var(--color-accent) !important;
}

/* Justified layout — espacement généreux */
.gallery-justified-layout {
  gap: 6px !important;
}

.gallery-justified-layout .gallery-item {
  border-radius: 1px !important;
}

/* Chargement image — skeleton élégant */
.gallery-item.loading {
  background:
    linear-gradient(110deg, #0a0908 8%, #141210 18%, #0a0908 33%) !important;
  background-size: 200% 100% !important;
  animation: galleryShimmer 1.6s ease-in-out infinite !important;
}

@keyframes galleryShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gallery-item img.loaded {
  animation: photoReveal 0.7s var(--imm-ease, ease) forwards;
}

@keyframes photoReveal {
  from { opacity: 0; filter: blur(8px); }
  to   { opacity: 1; filter: blur(0); }
}

/* ── Lightbox cinéma ──────────────────────────────────────────────────── */
.lightbox {
  background: rgba(0, 0, 0, 0.97) !important;
}

.lightbox:not(.hidden) {
  animation: lbFadeIn 0.35s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lb-content img {
  border-radius: 0 !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 24px 100px rgba(0,0,0,0.85) !important;
  animation: lbImageIn 0.45s var(--imm-ease, ease);
}

@keyframes lbImageIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.lb-topbar {
  background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent) !important;
}

.lb-counter {
  font-family: var(--page-font-body) !important;
  letter-spacing: 0.25em !important;
  text-transform: uppercase;
  font-size: 10px !important;
}

.lb-filmstrip-wrap {
  background: rgba(0,0,0,0.92) !important;
  border-top: 1px solid rgba(201, 169, 110, 0.08) !important;
}

.lb-thumb.active {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.3) !important;
}

.lb-caption {
  font-family: var(--page-font-heading) !important;
  font-size: 15px !important;
  letter-spacing: 0.04em;
  font-style: italic;
}

/* ── Footer premium ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(201, 169, 110, 0.1) !important;
  background: rgba(5, 5, 4, 0.95) !important;
}

.footer-title {
  font-family: var(--page-font-heading) !important;
  letter-spacing: 0.12em !important;
  font-weight: 400 !important;
}

/* ── Éditeur — barre outils raffinée ────────────────────────────────────── */
.editor-bar {
  background: rgba(5, 5, 4, 0.96) !important;
  border-bottom: 1px solid rgba(201, 169, 110, 0.15) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.properties-panel {
  background: rgba(8, 7, 5, 0.97) !important;
  border-left: 1px solid rgba(201, 169, 110, 0.12) !important;
}

/* ── Studio de design ───────────────────────────────────────────────────── */
#modal-design-studio .modal-box {
  max-width: min(960px, 96vw);
  width: 100%;
}

.design-studio-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .design-studio-layout {
    grid-template-columns: 1fr;
  }
}

.design-studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
  padding-bottom: 0.75rem;
}

.design-studio-tab {
  padding: 0.45rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--page-font-body);
}

.design-studio-tab:hover {
  color: var(--color-text-primary);
  border-color: rgba(201, 169, 110, 0.2);
}

.design-studio-tab.active {
  color: var(--color-accent);
  border-color: rgba(201, 169, 110, 0.35);
  background: rgba(201, 169, 110, 0.06);
}

.design-studio-panel {
  display: none;
}

.design-studio-panel.active {
  display: block;
}

.design-studio-preview {
  position: sticky;
  top: 0;
  border: 1px solid rgba(201, 169, 110, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-primary);
}

.design-studio-preview-label {
  padding: 0.5rem 0.75rem;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
  background: rgba(0,0,0,0.3);
}

.design-studio-preview-inner {
  padding: 1.25rem;
  min-height: 200px;
}

.dsp-hero-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--color-text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.dsp-hero-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.dsp-hero-body {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
}

.dsp-swatch-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dsp-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
}

.design-studio-color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.design-studio-color-row label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.btn-design-studio {
  border-color: rgba(201, 169, 110, 0.35) !important;
}

.btn-design-studio i {
  color: var(--color-accent);
}

/* ── Contact & About ──────────────────────────────────────────────────────── */
.contact-layout {
  align-items: start;
}

.contact-info-card {
  border-left: 2px solid var(--color-accent) !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

/* Curseur discret sur images galerie */
body:not(.admin-mode) .gallery-item {
  cursor: zoom-in;
}

/* Réduction mouvement */
@media (prefers-reduced-motion: reduce) {
  .slideshow-layer.active,
  .gallery-item img.loaded,
  .lb-content img {
    animation: none !important;
  }
  #scroll-hint {
    animation: none !important;
  }
}

/* ── Thème Sydney — hero & galerie harmonisés ─────────────────────────────── */
[data-theme="sydney"] body[data-page="home"] .page-bg-overlay {
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, rgba(14, 40, 64, 0.15) 0%, rgba(6, 16, 24, 0.65) 100%),
    linear-gradient(180deg, rgba(6, 22, 32, 0.42) 0%, rgba(6, 16, 24, 0.12) 42%, rgba(6, 16, 24, 0.58) 100%) !important;
}

[data-theme="sydney"] body:not(.edit-mode) .canvas-element[data-typo="label"] .el-text-inner,
[data-theme="sydney"] body:not(.edit-mode) .canvas-element[data-typo="label"] .el-text-inner p {
  color: var(--sydney-pacific, #3ec4b6) !important;
}

[data-theme="sydney"] #scroll-hint {
  color: rgba(62, 196, 182, 0.6);
}

[data-theme="sydney"] .gallery-block-title-wrap::after {
  background: linear-gradient(90deg, var(--sydney-pacific), var(--sydney-sandstone, #d8a868)) !important;
}

[data-theme="sydney"] .lightbox .lb-close:hover,
[data-theme="sydney"] .btn-edit:hover {
  color: var(--sydney-pacific) !important;
}
