/* ============================================
   APPQ — Fier partenaire
   Palette : sage profond + crème + accent or
   ============================================ */

[data-universe="appq"] {
  --bg: #F5F2EC;
  --surface: #ffffff;
  --ink: #0E2A1F;
  --ink-soft: #3a4a3d;
  --accent: #2C4A2B;        /* sage profond */
  --accent-hover: #1f3520;
  --gold: #B8965B;          /* accent terre/or */
  --line: rgba(14,42,31,.12);
}

[data-universe="appq"] body,
body[data-universe="appq"] {
  background: var(--bg);
  color: var(--ink);
}

/* ============ HERO ============ */
.appq-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: clamp(100px, 14vh, 160px) 0 clamp(60px, 10vh, 120px);
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(184,150,91,.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(44,74,43,.10), transparent 60%),
    linear-gradient(135deg, #F5F2EC 0%, #ECE6D8 50%, #DDD4BD 100%);
  overflow: hidden;
}

.appq-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Mega outline "APPQ" derrière */
.ah-mega {
  position: absolute;
  right: -3vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20rem, 38vw, 38rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(44,74,43,.10);
  letter-spacing: -0.05em;
  user-select: none;
  white-space: nowrap;
}

/* Grille décor */
.ah-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(44,74,43,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44,74,43,.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Feuilles décoratives */
.ah-leaf {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(44,74,43,.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
}
.ah-leaf-1 { top: 10%; left: 5%; }
.ah-leaf-2 { bottom: 15%; right: 10%; width: 280px; height: 280px; background: radial-gradient(circle, rgba(184,150,91,.20) 0%, transparent 70%); }
.ah-leaf-3 { top: 60%; left: 35%; width: 160px; height: 160px; }

.appq-hero-inner {
  position: relative;
  z-index: 2;
}

.appq-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.appq-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent);
  color: #F5F2EC;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
}
.appq-badge svg { width: 16px; height: 16px; }

.appq-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.appq-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 900px;
}
.appq-title .serif {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.appq-title .italic { font-style: italic; }
.appq-accent { color: var(--accent); }

.appq-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 0 40px;
}
.appq-lead a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.appq-hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  max-width: 720px;
}
.ah-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ah-stat b {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
}
.ah-stat span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.appq-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--accent);
  color: #F5F2EC;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.appq-cta:hover { background: var(--accent-hover); transform: translateY(-2px); }
.appq-cta svg { width: 18px; height: 18px; animation: appqBounce 2s ease infinite; }

@keyframes appqBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ============ POURQUOI L'APPQ ============ */
.appq-why { padding: clamp(80px, 12vh, 140px) 0; background: var(--bg); }

.appq-why-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}

.appq-eb {
  color: var(--accent) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.appq-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.appq-value {
  position: relative;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: all 0.3s ease;
}
.appq-value:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(14,42,31,.08);
}
.av-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.appq-value h4 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin: 8px 0 12px;
}
.appq-value p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* ============ INSPIRATION GALERIE ============ */
.appq-inspi {
  padding: clamp(80px, 12vh, 140px) 0;
  background: linear-gradient(180deg, var(--bg) 0%, #ECE6D8 100%);
}

.appq-inspi-head { margin-bottom: 56px; max-width: 100%; }
.appq-inspi-head .t-xxl {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 12px 0 0;
  max-width: 900px;
}

.appq-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.af-btn {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}
.af-btn:hover { border-color: var(--accent); color: var(--accent); }
.af-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #F5F2EC;
}

/* Gallery masonry-ish grid */
.appq-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.appq-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  aspect-ratio: 4 / 5;
}
.appq-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(14,42,31,.15);
}
.appq-card.is-hidden { display: none; }

.ac-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ac-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.appq-card:hover .ac-media img { transform: scale(1.06); }

.ac-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14,42,31,.85) 100%);
  pointer-events: none;
}

.ac-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 22px;
  color: #F5F2EC;
  z-index: 2;
}
.ac-cat {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(245,242,236,.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ac-meta h4 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 4px;
  line-height: 1.2;
}
.ac-co {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.85;
  font-family: 'Inter', sans-serif;
}

.ac-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(245,242,236,.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  z-index: 3;
}
.appq-card:hover .ac-zoom { opacity: 1; transform: scale(1); }
.ac-zoom svg { width: 18px; height: 18px; }

/* Mise en page asymétrique (premier et 5e plus grands) */
.appq-card[data-idx="0"] { grid-column: span 2; grid-row: span 2; aspect-ratio: 16 / 13; }
.appq-card[data-idx="4"] { grid-column: span 2; aspect-ratio: 16 / 10; }

.appq-credit {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}
.appq-credit a { color: var(--accent); }

/* ============ LIGHTBOX ============ */
.appq-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.appq-lightbox.is-open { display: flex; opacity: 1; }

.alb-close,
.alb-nav {
  position: absolute;
  width: 48px;
  height: 48px;
  background: rgba(245,242,236,.1);
  border: 1px solid rgba(245,242,236,.2);
  border-radius: 50%;
  color: #F5F2EC;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}
.alb-close:hover,
.alb-nav:hover { background: rgba(245,242,236,.2); }
.alb-close svg,
.alb-nav svg { width: 22px; height: 22px; }

.alb-close { top: 24px; right: 24px; }
.alb-prev { top: 50%; left: 24px; transform: translateY(-50%); }
.alb-next { top: 50%; right: 24px; transform: translateY(-50%); }

.alb-stage {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  max-width: 1280px;
  width: 100%;
  max-height: 85vh;
}

.alb-frame {
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 85vh;
}
.alb-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 85vh;
}

.alb-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #F5F2EC;
  gap: 16px;
}
.alb-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 14px;
  background: rgba(245,242,236,.1);
  border: 1px solid rgba(245,242,236,.2);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.alb-info h3 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}
.alb-co {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--gold);
  margin: 0;
  font-weight: 500;
}
.alb-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(245,242,236,.75);
  margin: 0;
  max-width: 420px;
}
.alb-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: rgba(245,242,236,.5);
  margin-top: 16px;
}

/* Override active nav state for appq page (heritage from in-lite template) */
[data-universe="appq"] .main-nav a {
  border-bottom: none !important;
  text-decoration: none !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .appq-why-grid { grid-template-columns: 1fr; gap: 48px; }
  .appq-gallery { grid-template-columns: repeat(2, 1fr); }
  .appq-card[data-idx="0"] { grid-column: span 2; grid-row: auto; aspect-ratio: 16/10; }
  .appq-card[data-idx="4"] { grid-column: span 2; aspect-ratio: 16/10; }
  .alb-stage { grid-template-columns: 1fr; max-height: none; }
  .alb-frame { max-height: 60vh; }
}

@media (max-width: 700px) {
  .appq-hero { min-height: 80vh; padding-top: 120px; }
  .appq-hero-stats { gap: 24px; }
  .ah-mega { font-size: 14rem; }
  .appq-values { grid-template-columns: 1fr; }
  .appq-gallery { grid-template-columns: 1fr; gap: 14px; }
  .appq-card,
  .appq-card[data-idx="0"],
  .appq-card[data-idx="4"] {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4/5;
  }
  .appq-lightbox { padding: 16px; }
  .alb-close { top: 12px; right: 12px; }
  .alb-prev { left: 8px; }
  .alb-next { right: 8px; }
  .alb-info { padding: 0 4px; gap: 10px; }
}
