/* ============================================
   LA CITADELLE — « Monolithe d'Encre »
   Design Tokens + Styles
   ============================================ */

/* --- PRIMITIVE TOKENS --- */
:root {
  --grey-950: #0B0B0B;
  --grey-900: #141416;
  --grey-800: #28282C;
  --grey-200: #E2E0DB;
  --grey-400: #807D76;
  --steel-500: #8B9DAB;
  --steel-400: #A8B8C4;

  /* --- SEMANTIC TOKENS --- */
  --base: var(--grey-950);
  --surface: var(--grey-900);
  --border-default: var(--grey-800);
  --text-primary: var(--grey-200);
  --text-secondary: var(--grey-400);
  --accent: var(--steel-500);
  --accent-hover: var(--steel-400);

  /* --- COMPONENT TOKENS --- */
  --nav-bg: rgba(11,11,11,0.95);
  --hero-overlay: rgba(11,11,11,0.75);
  --card-bg: var(--surface);
  --card-border: var(--border-default);
  --button-bg: transparent;
  --button-border: var(--accent);
  --button-text: var(--accent);
  --button-hover-bg: var(--accent);
  --button-hover-text: var(--base);
  --gallery-gap: 4px;
  --gallery-hover-border: var(--accent);
  --star-color: var(--accent);
  --footer-bg: var(--base);
  --footer-border: var(--border-default);

  /* --- SPACING --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-30: 120px;
  --space-40: 160px;
}

/* --- 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: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--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: 'Bebas Neue', sans-serif;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  text-transform: uppercase;
}

h2 { font-size: clamp(36px, 5vw, 56px); letter-spacing: 0.04em; }
h3 { font-size: clamp(24px, 3vw, 32px); letter-spacing: 0.03em; }

.section-label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.section-label--center { 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: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border-default);
}

.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: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

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

@media (max-width: 640px) {
  .nav-links { gap: var(--space-4); }
  .nav-links a { font-size: 11px; letter-spacing: 0.08em; }
  .nav-logo { font-size: 16px; }
}

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

.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.25;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(11,11,11,0.6) 0%,
    rgba(11,11,11,0.4) 40%,
    rgba(11,11,11,0.7) 100%
  );
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
}

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

/* --- HERO TITLE: GRAVURE DANS LA PIERRE --- */
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 12vw, 120px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: transparent;
  background: linear-gradient(
    135deg,
    #3a3a3e 0%,
    #5a5a5e 20%,
    #4a4a4e 40%,
    #606064 60%,
    #3e3e42 80%,
    #4a4a4e 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.8),
    1px 1px 0 rgba(100,100,110,0.15);
  position: relative;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-2);
}

/* Scroll-reveal: steel light fill */
.hero-title-fill {
  position: absolute;
  inset: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 12vw, 120px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--accent);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: var(--space-4);
  pointer-events: none;
}

.hero-title-fill.is-revealed {
  clip-path: inset(0 0 0 0);
}

.hero-subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-12);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease-out 0.8s, transform 0.6s ease-out 0.8s;
}

.hero-subtitle.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--button-text);
  border: 1px solid var(--button-border);
  padding: 16px 48px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(12px);
}

.hero-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out 1.1s, transform 0.6s ease-out 1.1s, background 0.3s ease, color 0.3s ease;
}

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

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse-line 2.5s ease-in-out infinite;
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

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

.section--surface {
  background: var(--surface);
}

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

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

.section-inner {
  max-width: 48rem;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-default);
}

/* --- H2 subtle gravure effect (fil conducteur) --- */
.section-title,
.artiste-text h2 {
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.5),
    1px 1px 0 rgba(100,100,110,0.08);
}

/* --- 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 {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.artiste-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.artiste-photo:hover img {
  transform: scale(1.03);
}

.artiste-text h2 {
  margin-bottom: var(--space-6);
}

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

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

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

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

.service-card {
  padding: var(--space-8) var(--space-6);
  background: var(--base);
  border: 1px solid var(--border-default);
  transition: border-color 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent);
}

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

.service-card h3 {
  font-size: 24px;
  margin-bottom: var(--space-3);
  letter-spacing: 0.04em;
}

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

/* --- PORTFOLIO / GALLERY --- */
.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  padding: 0 var(--space-6);
}

.portfolio-line {
  flex: 0 0 60px;
  height: 1px;
  background: var(--border-default);
}

.portfolio-header .section-label {
  margin-bottom: 0;
}

.gallery-grid {
  display: columns;
  columns: 2;
  column-gap: var(--gallery-gap);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-1);
}

@media (max-width: 640px) {
  .gallery-grid {
    columns: 1;
    padding: 0 var(--space-4);
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--gallery-gap);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: var(--gallery-hover-border);
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

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

.gallery-instagram a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}

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

/* --- AVIS / TESTIMONIALS --- */
.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(400px, 85vw);
  scroll-snap-align: start;
  padding: var(--space-8) var(--space-6);
  background: var(--base);
  border: 1px solid var(--border-default);
  position: relative;
}

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

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

.avis-quote {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 56px;
  color: var(--accent);
  line-height: 0.8;
  margin-bottom: var(--space-2);
  opacity: 0.4;
}

.avis-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  font-weight: 300;
}

.avis-author {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-style: normal;
}

.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);
  border: none;
  padding: 0;
  transition: background 0.25s ease;
}

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

.avis-summary {
  text-align: center;
  margin-top: var(--space-6);
  color: var(--text-secondary);
  font-size: 14px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

/* --- CONTACT --- */
.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-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

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

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

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

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: 18px 44px;
  background: var(--button-hover-bg);
  color: var(--button-hover-text);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 600;
  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(--accent-hover);
  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;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--footer-bg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-line {
  height: 1px;
  background: var(--footer-border);
  margin-bottom: var(--space-8);
}

.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-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 18px !important;
  letter-spacing: 0.06em;
  color: var(--text-primary) !important;
}

.footer-credits {
  display: block;
  text-align: center;
  margin-top: var(--space-3);
  color: var(--border-default);
  font-size: 11px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.06em;
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11,11,11,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;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-default);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover {
  background: var(--accent);
  color: var(--base);
  border-color: var(--accent);
}

/* --- 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-line { animation: none; opacity: 0.5; }
  .hero-subtitle, .hero-cta { opacity: 1; transform: none; }
  .hero-title-fill { clip-path: inset(0 0 0 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);
}