/*
Theme Name:   Photo Brou Child
Theme URI:    https://photo.brou.pm
Description:  Child theme Kadence — site photo Pierre-Marie Brou
Author:       Peheme
Author URI:   https://brou.pm
Template:     kadence
Version:      1.7.6
Text Domain:  photo-brou-child
*/

/* ============================================================
   VARIABLES
   ============================================================ */

:root {
  --bg:          #0a0a0a;
  --bg-surface:  #111111;
  --bg-card:     #0d0d0d;
  --bg-hover:    rgba(255,255,255,0.03);

  --border:      rgba(255,255,255,0.06);
  --border-mid:  rgba(255,255,255,0.12);

  --text-hi:     #e8e4dc;
  --text-mid:    #888880;
  --text-lo:     #444440;
  --text-ghost:  #222220;

  --accent:      #c8c4bc;

  --font-display: 'Montserrat', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

[data-theme="light"] {
  --bg:          #f5f4f0;
  --bg-surface:  #ffffff;
  --bg-card:     #ffffff;
  --bg-hover:    rgba(0,0,0,0.02);

  --border:      rgba(0,0,0,0.07);
  --border-mid:  rgba(0,0,0,0.14);

  --text-hi:     #0a0a0a;
  --text-mid:    #555550;
  --text-lo:     #aaaaaa;
  --text-ghost:  #cccccc;

  --accent:      #333330;
}

/* ============================================================
   BASE
   ============================================================ */

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

body {
  background: var(--bg) !important;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
}

/* Écrasement fonds Kadence */
#page, #content, #primary, #secondary,
.site-content, .content-area, .site-main,
.entry-content, .entry, article,
.wp-site-blocks, .kadence-blocks-form,
.kb-section-dir-h {
  background: transparent !important;
}

a { color: var(--text-hi); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

img { display: block; max-width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */

#masthead,
.site-header,
.site-top-header {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border);
  padding: 0 !important;
}

.site-header-wrap,
.site-header-row-inner,
.kadence-header-inner {
  max-width: 100% !important;
  padding: 1.65rem 3rem !important;
  min-height: 74px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Logo */
.site-branding .site-title,
.site-branding .site-title a {
  font-family: var(--font-display) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: var(--text-hi) !important;
  text-decoration: none !important;
}
.site-branding .site-description {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-lo);
  letter-spacing: 0.08em;
  margin: 0;
}
.site-branding .site-description::before { content: '/ '; }

/* Nav */
.main-navigation ul,
.kadence-navigation ul {
  display: flex !important;
  gap: 3rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
}
.main-navigation ul li a,
.kadence-navigation ul li a {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--text-lo) !important;
  text-decoration: none !important;
  transition: color 0.15s !important;
}
.main-navigation ul li a:hover,
.kadence-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  color: var(--text-hi) !important;
}

/* Toggle */
.theme-toggle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-lo);
  border: 1px solid var(--border-mid);
  background: none;
  padding: 5px 13px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 1.5rem;
}
.theme-toggle:hover { color: var(--text-hi); border-color: var(--text-lo); }

/* ============================================================
   LAYOUT GLOBAL
   ============================================================ */

.site-main,
#primary,
.content-area,
#content,
.container,
.wp-container-core-group,
.alignfull {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================================
   HOME — HERO SÉRIE EN AVANT
   ============================================================ */

.photo-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.photo-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.6);
  transition: filter 0.4s, transform 0.6s;
}
.photo-hero:hover .photo-hero-img {
  filter: brightness(0.75);
  transform: scale(1.02);
}
.photo-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}
.photo-hero-content {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
}
.photo-hero-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.6rem;
}
.photo-hero-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.photo-hero-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 0.6rem;
  letter-spacing: 0.06em;
}
.photo-hero-cta {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 18px;
  transition: all 0.15s;
  text-decoration: none;
}
.photo-hero-cta:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

/* ============================================================
   HOME — GRILLE SÉRIES
   ============================================================ */

.series-section {
  width: min(1840px, calc(100vw - 4rem));
  margin: 0 auto;
  padding: 3rem 0;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-ghost);
  margin-bottom: 1.75rem;
}
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  justify-content: center;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.serie-card {
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: background 0.15s;
}
.serie-card:hover { background: var(--bg-surface); }
.serie-card:hover .serie-thumb img {
  filter: brightness(0.9);
  transform: scale(1.04);
}

.serie-thumb {
  aspect-ratio: 4 / 3;
  height: auto;
  overflow: hidden;
  background: #111;
}
.serie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(0.9);
  transition: filter 0.3s, transform 0.4s;
}

.serie-info {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.serie-cat {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-lo);
  margin-bottom: 0.3rem;
}
.serie-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-mid);
  line-height: 1.2;
  transition: color 0.15s;
}
.serie-card:hover .serie-name { color: var(--text-hi); }
.serie-count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-ghost);
  margin-top: 0.25rem;
}

/* V1.7.4 — Home : cartes séries plus nombreuses et moins étirées sur grand écran */
@media (min-width: 1500px) {
  .series-grid {
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  }
}

@media (min-width: 2100px) {
  .series-section {
    width: min(1960px, calc(100vw - 5rem));
  }
  .series-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}


/* ============================================================
   HOME — AJOUTS RÉCENTS
   ============================================================ */

.recent-section {
  padding: 0 2.5rem 3rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}
.recent-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.recent-card {
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  transition: background 0.15s;
}
.recent-card:hover { background: var(--bg-surface); }
.recent-card:hover .recent-thumb img { filter: brightness(0.85); transform: scale(1.03); }
.recent-thumb { overflow: hidden; background: #111; }
.recent-thumb img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.85);
  transition: filter 0.3s, transform 0.4s;
}
.recent-meta {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.recent-serie {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-lo);
}
.recent-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-lo);
  margin-top: 0.2rem;
  transition: color 0.15s;
}
.recent-card:hover .recent-title { color: var(--text-hi); }

/* ============================================================
   PAGE SÉRIE
   ============================================================ */

.serie-page { width: 100%; }

.serie-header {
  position: relative;
  height: 360px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.serie-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.8);
}
.serie-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%);
}
.serie-header-content {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  right: 2.5rem;
}
.serie-header-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}
.serie-header-title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
}
.serie-header-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 0.5rem;
}

.serie-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.serie-body p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
}
.serie-body p strong { color: var(--text-hi); font-weight: 400; }

/* Galerie dans la page série */
.serie-gallery {
  width: 100%;
  padding: 0 2.5rem 4rem;
}
.gallery-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-ghost);
  margin-bottom: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.gallery-item {
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  aspect-ratio: 4/3;
  background: #111;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) saturate(0.9);
  transition: filter 0.3s, transform 0.4s;
}
.gallery-item:hover img {
  filter: brightness(1) saturate(1);
  transform: scale(1.04);
}
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-item-overlay { background: rgba(0,0,0,0.3); }
.gallery-item-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0);
  transition: color 0.2s;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.gallery-item:hover .gallery-item-title { color: rgba(255,255,255,0.8); }

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.active { display: flex; }

.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.15s;
}
.lightbox-close:hover { color: #fff; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.lightbox-nav:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-info {
  margin-top: 1.25rem;
  text-align: center;
}
.lightbox-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}
.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin-top: 0.25rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

#colophon,
.site-footer {
  background: var(--bg) !important;
  border-top: 1px solid var(--border);
  padding: 0 !important;
}
.site-info,
.site-footer-row-inner,
.footer-wrap,
.site-footer .site-info,
#colophon .site-info,
.kadence-footer-row,
.footer-html {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 1.75rem 2.5rem !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  color: var(--text-mid) !important;
  letter-spacing: 0.06em !important;
  background: transparent !important;
  text-align: center !important;
}
.site-info a,
.site-footer a,
#colophon a { color: var(--text-mid) !important; text-decoration: none !important; }
.site-info a:hover,
.site-footer a:hover { color: var(--text-hi) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .recent-grid { grid-template-columns: 1fr 1fr; }
  .recent-grid .recent-card:last-child { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .series-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .series-section { width: auto; margin: 0; padding: 3rem 1rem; }
  .recent-section, .serie-gallery { padding-left: 1rem; padding-right: 1rem; }
  .photo-hero { height: 320px; }
  .serie-header { height: 260px; }
  .lightbox-nav { display: flex; width: 38px; height: 38px; }
  .lightbox-prev { left: .75rem; }
  .lightbox-next { right: .75rem; }
}

/* LIGHTBOX GLOBALE V6 */
.photo-lightbox-open{overflow:hidden!important;overscroll-behavior:none}
.photo-global-lightbox{position:fixed;inset:0;z-index:2147483000;display:none;align-items:center;justify-content:center;background:radial-gradient(circle at center,rgba(18,18,18,.98),rgba(0,0,0,.98));color:#fff;touch-action:manipulation}
.photo-global-lightbox.is-active{display:flex}
.photo-global-lightbox__figure{margin:0;width:min(94vw,1900px);height:88vh;display:flex;align-items:center;justify-content:center}
.photo-global-lightbox__img{max-width:100%;max-height:100%;object-fit:contain;display:block;box-shadow:0 24px 80px rgba(0,0,0,.45);transition:opacity .15s}
.photo-global-lightbox__button{position:absolute;z-index:2;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.2);backdrop-filter:blur(10px);color:rgba(255,255,255,.72);cursor:pointer;transition:color .15s,border-color .15s,background .15s,opacity .15s;font-family:var(--font-mono,monospace);-webkit-tap-highlight-color:transparent}
.photo-global-lightbox__button:hover,.photo-global-lightbox__button:focus-visible{color:#fff;border-color:rgba(255,255,255,.65);background:rgba(255,255,255,.08);outline:none}
.photo-global-lightbox__close{top:1.25rem;right:1.25rem;width:auto;height:auto;padding:.65rem .85rem;font-size:11px;letter-spacing:.1em;text-transform:uppercase}
.photo-global-lightbox__fullscreen{top:1.25rem;right:8.5rem;width:auto;height:auto;padding:.65rem .85rem;font-size:11px;letter-spacing:.1em;text-transform:uppercase}
.photo-global-lightbox__nav{top:50%;transform:translateY(-50%);width:50px;height:50px;font-size:25px;border-radius:999px}
.photo-global-lightbox__prev{left:1.25rem}.photo-global-lightbox__next{right:1.25rem}
.photo-global-lightbox__caption{position:absolute;left:1rem;right:1rem;bottom:1rem;text-align:center;font-family:var(--font-mono,monospace);font-size:11px;letter-spacing:.06em;color:rgba(255,255,255,.58);pointer-events:none;text-shadow:0 1px 16px rgba(0,0,0,.85)}
.photo-global-lightbox__title:empty,.photo-global-lightbox__meta:empty{display:none}
.photo-global-lightbox__title{color:rgba(255,255,255,.7)}
.photo-global-lightbox__meta{margin-top:.25rem;color:rgba(255,255,255,.42);font-size:10px}
.photo-global-lightbox__counter{color:rgba(255,255,255,.3);margin-top:.35rem;font-size:10px}
.wp-block-gallery img,.wp-block-image img,.gallery img,.serie-gallery img,.kb-gallery-ul img,.kadence-blocks-gallery-item img{cursor:zoom-in}
.gallery-item:focus-visible{outline:1px solid rgba(255,255,255,.55);outline-offset:3px}
@media (hover:hover){.photo-global-lightbox:not(:hover) .photo-global-lightbox__button{opacity:.72}.photo-global-lightbox:not(:hover) .photo-global-lightbox__caption{opacity:.86}}
@media (max-width:700px){.photo-global-lightbox{background:rgba(0,0,0,.98)}.photo-global-lightbox__figure{width:100vw;height:82vh}.photo-global-lightbox__nav{width:44px;height:44px;background:rgba(0,0,0,.32)}.photo-global-lightbox__prev{left:.6rem}.photo-global-lightbox__next{right:.6rem}.photo-global-lightbox__close{top:.75rem;right:.75rem;padding:.55rem .7rem}.photo-global-lightbox__fullscreen{top:.75rem;left:.75rem;right:auto;padding:.55rem .7rem}.photo-global-lightbox__caption{bottom:.65rem;font-size:10px}.photo-global-lightbox__meta{display:none}}

/* ============================================================
   PAGES KADENCE STANDARD (À propos, Contact, etc.)
   ============================================================ */

/* Texte lisible sur toutes les pages en dark mode */
.entry-content,
.entry-content p,
.page-content p,
.kadence-inner-column-inner p,
.wp-block-column p,
.wp-block-group p,
.kb-row-layout-inner p {
  color: var(--text-hi) !important;
  font-family: var(--font-display) !important;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
}

.entry-content a,
.page-content a {
  color: var(--text-mid) !important;
  text-decoration: underline;
  text-decoration-color: var(--border-mid);
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.entry-content a:hover,
.page-content a:hover {
  color: var(--text-hi) !important;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--text-hi) !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
}

.entry-content strong,
.page-content strong {
  color: var(--text-hi) !important;
  font-weight: 700;
}

/* Titre de la page (h1 Kadence) */
.entry-header .entry-title,
.page-title,
.wp-block-post-title {
  font-family: var(--font-display) !important;
  font-size: clamp(24px, 3.5vw, 38px) !important;
  font-weight: 800 !important;
  color: var(--text-hi) !important;
  margin-bottom: 2rem !important;
}

/* Centrer et limiter la largeur du contenu des pages standard */
.page .entry-content,
.page .entry-header,
.page article .entry-content,
.single-post .entry-content,
body:not(.home):not(.photo-home) .entry-content,
.content-bg .entry-content,
.kadence-blog-layout .entry-content {
  max-width: 760px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 3rem 2rem !important;
  box-sizing: border-box !important;
  float: none !important;
}

/* Wrapper Kadence qui bloque le centrage */
.page #primary,
.page .content-area,
.page #content,
.page .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* 1.6.1 — Cartel court de série, sans impact sur la galerie */
.serie-editorial {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
}
.serie-intention {
  max-width: 760px;
  margin: 0;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.45;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-hi);
}
@media (max-width: 768px) {
  .serie-editorial { padding: 1.75rem 1rem 0; }
  .serie-intention { font-size: 18px; }
}

/* ============================================================
   V1.7.2 — FOND ATMOSPHÉRIQUE GLOBAL RENFORCÉ
   ------------------------------------------------------------
   Les halos appartiennent au fond de page. Ils ne s’appliquent
   jamais aux images, afin de préserver leur lisibilité et leurs
   couleurs. La palette varie quotidiennement via une classe JS
   posée sur <html> : halo-mood-0 à halo-mood-4.
   ============================================================ */

html {
  background: var(--bg);
  --halo-a: rgba(91, 124, 170, 0.58);
  --halo-b: rgba(200, 124, 74, 0.42);
  --halo-c: rgba(143, 106, 168, 0.28);
}

html.halo-mood-0 {
  --halo-a: rgba(58, 118, 170, 0.62);   /* bleu pétrole */
  --halo-b: rgba(118, 74, 156, 0.42);  /* violet profond */
  --halo-c: rgba(55, 94, 130, 0.30);
}

html.halo-mood-1 {
  --halo-a: rgba(194, 106, 48, 0.54);   /* ambre brûlé */
  --halo-b: rgba(140, 44, 70, 0.46);   /* bordeaux sombre */
  --halo-c: rgba(110, 58, 38, 0.30);
}

html.halo-mood-2 {
  --halo-a: rgba(96, 140, 120, 0.52);  /* sauge profond */
  --halo-b: rgba(74, 104, 140, 0.46);   /* bleu gris */
  --halo-c: rgba(62, 92, 84, 0.30);
}

html.halo-mood-3 {
  --halo-a: rgba(48, 156, 178, 0.52);  /* cyan sombre */
  --halo-b: rgba(154, 54, 54, 0.46);   /* rouge profond */
  --halo-c: rgba(52, 92, 116, 0.28);
}

html.halo-mood-4 {
  --halo-a: rgba(78, 86, 160, 0.54);   /* indigo */
  --halo-b: rgba(68, 86, 108, 0.44);    /* graphite bleuté */
  --halo-c: rgba(108, 94, 146, 0.28);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  opacity: 1;
  filter: blur(72px);
  transform: translate3d(0, 0, 0);
}

body::before {
  width: min(72vw, 1080px);
  height: min(72vw, 1080px);
  top: -22vh;
  right: -22vw;
  background: radial-gradient(circle, var(--halo-a) 0%, rgba(0,0,0,0) 68%);
  animation: photo-bg-halo-a 42s ease-in-out infinite alternate;
}

body::after {
  width: min(66vw, 980px);
  height: min(66vw, 980px);
  left: -20vw;
  bottom: -22vh;
  background: radial-gradient(circle, var(--halo-b) 0%, rgba(0,0,0,0) 70%);
  animation: photo-bg-halo-b 48s ease-in-out infinite alternate;
}

#page::before {
  content: "";
  position: fixed;
  inset: 16vh 16vw auto auto;
  width: min(48vw, 720px);
  height: min(48vw, 720px);
  border-radius: 999px;
  background: radial-gradient(circle, var(--halo-c) 0%, rgba(0,0,0,0) 72%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

#page,
.site-header,
.site-footer,
.serie-page,
.photo-home,
.photo-explorer,
.photo-series-index,
.entry-content,
.site-content {
  position: relative;
  z-index: 1;
}

#page {
  isolation: isolate;
}

#inner-wrap,
.site,
.site-main,
.content-area,
.site-container,
.entry,
.entry-content-wrap {
  background: transparent !important;
}

/* Les images restent neutres : aucun halo ou overlay coloré sur les heroes. */
.serie-header::after {
  content: none !important;
}

.serie-header-content { z-index: 2; }
.serie-header-overlay { z-index: 1; }
.serie-header-img { position: relative; z-index: 0; }

[data-theme="light"] body::before,
[data-theme="light"] body::after,
[data-theme="light"] #page::before {
  display: none;
}

@keyframes photo-bg-halo-a {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-8vw, 12vh, 0) scale(1.08); }
  100% { transform: translate3d(-2vw, 24vh, 0) scale(0.96); }
}

@keyframes photo-bg-halo-b {
  0% { transform: translate3d(0, 0, 0) scale(0.96); }
  55% { transform: translate3d(14vw, -10vh, 0) scale(1.08); }
  100% { transform: translate3d(6vw, -22vh, 0) scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

/* Header — respiration visuelle */
.site-branding {
  margin-right: 2rem !important;
}

.main-navigation,
.kadence-navigation {
  margin-left: 1.5rem !important;
}

@media (max-width: 768px) {
  .site-header-wrap,
  .site-header-row-inner,
  .kadence-header-inner {
    padding: 1.25rem 1.25rem !important;
    min-height: 64px !important;
  }

  .main-navigation ul,
  .kadence-navigation ul {
    gap: 1.4rem !important;
  }
}

/* Footer — suppression du crédit Kadence si le thème parent le réinjecte */
.site-footer a[href*="kadencewp.com"],
.site-footer a[href*="kadence-theme.com"] {
  display: none !important;
}



/* V1.7.4 — Protection légère des images */
.photo-protected-img,
.photo-global-lightbox img {
  -webkit-user-drag: none;
  user-select: none;
}

.photo-protection-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 2147483001;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  padding: .65rem .9rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(8,8,8,.78);
  color: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  transition: opacity .18s ease, transform .18s ease;
}

.photo-protection-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

[data-theme="light"] .photo-protection-toast {
  background: rgba(255,255,255,.86);
  color: rgba(0,0,0,.72);
  border-color: rgba(0,0,0,.12);
}

/* ============================================================
   V1.7.0 — EXPLORER / navigation par angles de lecture
   ============================================================ */
.photo-explorer,
.photo-series-index {
  width: min(1180px, calc(100vw - 3rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.explorer-hero {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.explorer-hero.compact {
  margin-bottom: 2rem;
}

.explorer-kicker,
.explorer-serie-kicker {
  display: block;
  margin: 0 0 .75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-lo);
}

.explorer-hero h1,
.explorer-section-head h2 {
  margin: 0;
  color: var(--text-hi);
  letter-spacing: -.045em;
}

.explorer-hero h1 {
  font-size: clamp(42px, 7vw, 86px);
  line-height: .92;
}

.explorer-hero p:not(.explorer-kicker) {
  max-width: 620px;
  margin: 1.15rem 0 0;
  color: var(--text-mid);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.5;
}

.explorer-section {
  margin-top: clamp(3rem, 6vw, 5.5rem);
}

.explorer-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.35rem;
}

.explorer-section-head h2 {
  font-size: clamp(26px, 3.5vw, 46px);
  line-height: 1;
}

.explorer-back {
  margin: -1.5rem 0 2.5rem;
}

.explorer-back a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-lo);
  text-decoration: none;
}

.explorer-back a:hover { color: var(--text-hi); }

.explorer-path-grid,
.explorer-chip-grid,
.explorer-series-grid {
  display: grid;
  gap: 1rem;
}

.explorer-path-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.explorer-chip-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.explorer-series-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.explorer-path-card,
.explorer-angle-card,
.explorer-serie-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
  color: var(--text-hi);
  text-decoration: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  transform: translate3d(0,0,0);
}

.explorer-serie-card {
  min-height: 340px;
}

.explorer-path-bg,
.explorer-angle-bg,
.explorer-serie-media {
  position: absolute;
  inset: 0;
  display: block;
  background-size: cover;
  background-position: center;
  filter: saturate(.85) contrast(1.05);
  opacity: .72;
  transition: transform .45s ease, opacity .35s ease, filter .35s ease;
}

.explorer-serie-media-empty {
  background: radial-gradient(circle at 30% 20%, rgba(200,124,74,.28), transparent 32%), radial-gradient(circle at 78% 60%, rgba(91,124,170,.25), transparent 38%), rgba(255,255,255,.04);
}

.explorer-path-overlay,
.explorer-angle-overlay,
.explorer-serie-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.74));
  z-index: 1;
}

.explorer-angle-card::before,
.explorer-path-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 12%, rgba(200,124,74,.18), transparent 35%);
  z-index: 2;
  pointer-events: none;
}

.explorer-path-content,
.explorer-angle-content,
.explorer-serie-content {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 3;
}

.explorer-path-title,
.explorer-angle-title,
.explorer-serie-title {
  display: block;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.02;
}

.explorer-path-title { font-size: clamp(22px, 2.2vw, 30px); }
.explorer-angle-title { font-size: clamp(22px, 2vw, 28px); }
.explorer-serie-title { font-size: clamp(26px, 2.8vw, 40px); }

.explorer-path-intro,
.explorer-path-meta,
.explorer-angle-meta,
.explorer-serie-meta {
  display: block;
  margin-top: .65rem;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.35;
}

.explorer-path-meta,
.explorer-angle-meta,
.explorer-serie-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.explorer-serie-kicker {
  color: rgba(255,255,255,.58);
}

.explorer-path-card:hover .explorer-path-bg,
.explorer-angle-card:hover .explorer-angle-bg,
.explorer-serie-card:hover .explorer-serie-media {
  transform: scale(1.045);
  opacity: .92;
  filter: saturate(1) contrast(1.08);
}

.explorer-path-card:hover,
.explorer-angle-card:hover,
.explorer-serie-card:hover {
  border-color: rgba(255,255,255,.18);
}

.photo-empty-state {
  margin: 0;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  color: var(--text-mid);
  background: rgba(255,255,255,.035);
}

.serie-related-nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.2rem 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}

.serie-related-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-lo);
  margin-right: .25rem;
}

.serie-related-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .35rem .7rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--text-mid);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255,255,255,.035);
}

.serie-related-chip:hover {
  color: var(--text-hi);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}

@media (max-width: 1024px) {
  .explorer-path-grid,
  .explorer-chip-grid,
  .explorer-series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .photo-explorer,
  .photo-series-index { width: min(100% - 2rem, 1180px); padding: 2.5rem 0; }
  .explorer-section-head { display: block; }
  .explorer-path-grid,
  .explorer-chip-grid,
  .explorer-series-grid { grid-template-columns: 1fr; }
  .explorer-path-card,
  .explorer-angle-card { min-height: 190px; }
  .explorer-serie-card { min-height: 280px; }
  .serie-related-nav { padding: 1rem 1rem 0; }
}


.photo-protected-img {
  -webkit-user-drag: none;
  user-select: none;
}

.photo-hero-img,
.serie-thumb img,
.recent-thumb img,
.serie-gallery img,
.gallery-grid img,
.wp-block-gallery img,
.wp-block-image img,
.photo-global-lightbox__img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   V1.7.6 — Lightbox : fond opaque et image unique
   ------------------------------------------------------------
   Correction du cas où la grille de la page restait visible
   derrière une photo en portrait sur grand écran/Safari.
   ============================================================ */
.photo-global-lightbox,
.photo-global-lightbox.is-active {
  background: #000 !important;
  background-image: radial-gradient(circle at 50% 45%, rgba(18,18,18,1) 0%, rgba(0,0,0,1) 74%) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden !important;
}

.photo-global-lightbox::before,
.photo-global-lightbox::after {
  content: none !important;
  display: none !important;
}

.photo-global-lightbox__figure {
  position: relative;
  z-index: 1;
  background: transparent !important;
  isolation: isolate;
}

.photo-global-lightbox__img {
  position: relative;
  z-index: 1;
  background: transparent !important;
  max-width: 92vw !important;
  max-height: 86vh !important;
}

.photo-global-lightbox__img.is-loading {
  opacity: 0 !important;
}

.photo-global-lightbox__img.is-ready {
  opacity: 1 !important;
}

.photo-global-lightbox__button,
.photo-global-lightbox__caption {
  z-index: 3 !important;
}
