/* ============================================
   ART FOR SINNERS — « Le Confessionnal »
   Design Tokens + Styles
   Signature: L'ogive gothique comme cadre sacré
   ============================================ */

/* --- PRIMITIVE TOKENS --- */
:root {
  --color-shadow-900: #0C0A0F;
  --color-shadow-800: #161319;
  --color-shadow-700: #201D25;
  --color-marble-100: #EAE7F0;
  --color-smoke-300: #9590A2;
  --color-rose-500: #C2838E;
  --color-rose-400: #D4969F;
  --color-stone-500: #605B6A;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-30: 120px;

  /* --- SEMANTIC TOKENS --- */
  --bg-base: var(--color-shadow-900);
  --bg-surface: var(--color-shadow-800);
  --bg-elevated: var(--color-shadow-700);
  --text-primary: var(--color-marble-100);
  --text-secondary: var(--color-smoke-300);
  --accent: var(--color-rose-500);
  --accent-hover: var(--color-rose-400);
  --border-default: var(--color-stone-500);
  --border-accent: var(--color-rose-500);

  /* --- COMPONENT TOKENS --- */
  --hero-bg: var(--bg-base);
  --card-bg: var(--bg-surface);
  --card-border-left: var(--border-accent);
  --card-hover-bg: var(--bg-elevated);
  --gallery-frame: var(--border-default);
  --gallery-frame-hover: var(--border-accent);
  --nav-bg-scroll: var(--bg-surface);
  --cta-bg: var(--accent);
  --cta-text: var(--color-shadow-900);
  --cta-hover-bg: var(--accent-hover);
  --testimonial-quote-color: var(--accent);
  --ogive-stroke: var(--border-default);
  --ogive-stroke-hover: var(--accent);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Sora', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: 'Bodoni Moda', serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

.label-accent {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
  text-align: center;
}

/* --- NAV --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(22,19,25,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(96,91,106,0.2);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Bodoni Moda', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-variant: small-caps;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--accent); }

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
}

.burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-burger.is-open .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.is-open .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(12,10,15,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.mobile-menu a {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color 0.25s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible { color: var(--accent); }

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--hero-bg);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.12;
  filter: grayscale(1) hue-rotate(220deg);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(12,10,15,0.3) 0%, rgba(12,10,15,0.7) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-6);
}

.hero-title {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(36px, 9vw, 72px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.hero-title .word-wrap {
  display: inline-block;
  white-space: nowrap;
}

.hero-title .word-space {
  display: inline-block;
  width: 0.35em;
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
}

.hero-title .char.is-visible {
  animation: char-reveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes char-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: 'Sora', sans-serif;
  font-size: clamp(12px, 2vw, 15px);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-10);
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.hero-subtitle.is-visible { opacity: 1; }

.hero-cta {
  display: inline-block;
  font-family: 'Bodoni Moda', serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 14px 40px;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.8s ease-out;
  opacity: 0;
}

.hero-cta.is-visible { opacity: 1; }

.hero-cta:hover,
.hero-cta:focus-visible {
  background: var(--accent);
  color: var(--cta-text);
}

/* Scroll indicator — ogive pulse */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-ogive {
  width: 20px;
  height: 30px;
  color: var(--accent);
  animation: ogive-pulse 2.5s ease-in-out infinite;
}

@keyframes ogive-pulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

/* --- SECTION COMMONS --- */
.section {
  position: relative;
  padding: var(--space-20) var(--space-6);
}

@media (min-width: 1024px) {
  .section { padding: var(--space-30) var(--space-6); }
}

@media (max-width: 640px) {
  .section { padding: var(--space-16) var(--space-4); }
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-12);
}

/* --- OGIVE SEPARATOR (3 arches) --- */
.ogive-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) 0;
}

.ogive-sep svg {
  width: 120px;
  height: 40px;
  color: var(--accent);
  opacity: 0.25;
}

.ogive-sep svg path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.ogive-sep.is-drawn svg path {
  animation: draw-ogive 1.2s ease-out forwards;
}

.ogive-sep.is-drawn .ogive-center {
  animation-delay: 0.15s;
}

@keyframes draw-ogive {
  to { stroke-dashoffset: 0; }
}

/* --- ARTISTE --- */
.artiste-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 768px) {
  .artiste-grid { grid-template-columns: 1fr; }
}

.artiste-photo-wrap {
  display: flex;
  justify-content: center;
}

.artiste-ogive {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 300/420;
}

.artiste-ogive-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: polygon(
    0% 100%,
    0% 38%,
    2% 25%,
    5% 17%,
    10% 10%,
    18% 5%,
    28% 2%,
    38% 0.5%,
    50% 0%,
    62% 0.5%,
    72% 2%,
    82% 5%,
    90% 10%,
    95% 17%,
    98% 25%,
    100% 38%,
    100% 100%
  );
}

.artiste-ogive-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artiste-ogive .ogive-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.ogive-stroke {
  stroke: var(--ogive-stroke);
  fill: none;
  transition: stroke 0.4s ease;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}

.artiste-ogive:hover .ogive-stroke,
.artiste-ogive:focus-within .ogive-stroke {
  stroke: var(--ogive-stroke-hover);
}

.artiste-ogive.is-drawn .ogive-stroke {
  animation: draw-ogive-frame 1.8s ease-out forwards;
}

@keyframes draw-ogive-frame {
  to { stroke-dashoffset: 0; }
}

.artiste-text h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.artiste-text p {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 300;
  margin-bottom: var(--space-4);
}

.artiste-text p strong {
  color: var(--text-primary);
  font-weight: 400;
}

/* --- SERVICES --- */
.services-section {
  background: var(--bg-surface);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  padding: var(--space-8) var(--space-6);
  border-left: 2px solid var(--card-border-left);
  transition: background 0.3s ease;
}

.service-card:hover { background: var(--card-hover-bg); }

.service-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.service-card h3 {
  font-family: 'Bodoni Moda', serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
}

/* --- PORTFOLIO / GALLERY — ogive frames --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; max-width: 400px; }
}

.gallery-item {
  cursor: pointer;
  position: relative;
}

.gallery-ogive-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  /* Ogive clip-path: pointed arch top, rectangle bottom */
  clip-path: polygon(
    0% 100%,
    0% 35%,
    2% 22%,
    6% 14%,
    12% 8%,
    20% 4%,
    30% 1.5%,
    40% 0.3%,
    50% 0%,
    60% 0.3%,
    70% 1.5%,
    80% 4%,
    88% 8%,
    94% 14%,
    98% 22%,
    100% 35%,
    100% 100%
  );
}

.gallery-ogive-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover .gallery-ogive-wrap img,
.gallery-item:focus-within .gallery-ogive-wrap img {
  transform: scale(1.04);
}

.gallery-ogive-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.gallery-ogive-frame .ogive-stroke {
  stroke: var(--ogive-stroke);
  stroke-dasharray: 1400;
  stroke-dashoffset: 0;
  transition: stroke 0.4s ease;
}

.gallery-item:hover .gallery-ogive-frame .ogive-stroke,
.gallery-item:focus-within .gallery-ogive-frame .ogive-stroke {
  stroke: var(--ogive-stroke-hover);
  stroke-dashoffset: 0;
  animation: trace-ogive 0.8s ease-out;
}

@keyframes trace-ogive {
  from { stroke-dashoffset: 1400; }
  to { stroke-dashoffset: 0; }
}

.gallery-instagram {
  text-align: center;
  margin-top: var(--space-10);
}

.gallery-instagram a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: 'Bodoni Moda', serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
}

.gallery-instagram a:hover,
.gallery-instagram a:focus-visible {
  border-bottom-color: var(--accent);
}

.gallery-count {
  display: block;
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
}

/* --- AVIS / TESTIMONIALS --- */
.avis-section .section-title { margin-bottom: var(--space-10); }

.avis-scroll {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--space-6) var(--space-4);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.avis-scroll::-webkit-scrollbar { display: none; }

.avis-card {
  flex: 0 0 min(380px, 85vw);
  scroll-snap-align: start;
  padding: var(--space-8) var(--space-6);
  background: var(--bg-surface);
  position: relative;
}

.avis-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-4);
}

.avis-stars .star {
  color: var(--accent);
  font-size: 14px;
}

.avis-text {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.avis-author {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  font-style: normal;
  color: var(--text-primary);
}

.avis-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.avis-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-default);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
}

.avis-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: inherit;
}

.avis-dot {
  background: transparent;
}

.avis-dot::after {
  background: var(--border-default);
  transition: background 0.25s ease;
}

.avis-dot.is-active::after {
  background: var(--accent);
}

.avis-summary {
  text-align: center;
  margin-top: var(--space-6);
  color: var(--text-secondary);
  font-size: 14px;
}

.avis-summary a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.avis-summary a:hover,
.avis-summary a:focus-visible {
  border-bottom-color: var(--accent);
}

/* --- CONTACT --- */
.contact-section {
  background: var(--bg-elevated);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info h2 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.contact-item-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-item a {
  color: var(--text-primary);
  font-size: 15px;
  transition: color 0.25s ease;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--accent);
}

.contact-item div {
  display: flex;
  flex-direction: column;
}

.contact-item small {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: 16px 40px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-family: 'Bodoni Moda', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.2s ease;
}

.contact-cta:hover,
.contact-cta:focus-visible {
  background: var(--cta-hover-bg);
  transform: translateY(-2px);
}

.contact-map {
  aspect-ratio: 4/3;
  border: 1px solid var(--border-default);
  overflow: hidden;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  /* NO grayscale filter — color map with pin as required */
}

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid var(--border-default);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-inner span {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-logo {
  font-family: 'Bodoni Moda', serif;
  font-weight: 700;
  font-size: 14px !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary) !important;
}

.footer-credits {
  display: block;
  text-align: center;
  margin-top: var(--space-3);
  color: var(--border-default);
  font-size: 11px;
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12,10,15,0.96);
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: var(--text-primary);
  font-size: 24px;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--accent);
  color: var(--cta-text);
}

/* --- FOCUS --- */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-ogive { animation: none; opacity: 0.5; }
  .hero-title .char { opacity: 1; transform: none; }
  .hero-subtitle, .hero-cta { opacity: 1; }
  .ogive-stroke { stroke-dashoffset: 0; }
  .ogive-sep svg path { stroke-dashoffset: 0; }
}

/* --- GLOBAL ANIMATIONS --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}