/* ============================================
   L'ARCH COLLECTIF — « Le Trait de Coupe »
   Design Tokens + Styles
   ============================================ */

/* --- PRIMITIVE TOKENS --- */
:root {
  --color-linen-100: #F2F0EB;
  --color-linen-200: #E8E5DF;
  --color-graphite-900: #1D2226;
  --color-slate-600: #5C6670;
  --color-slate-500: #3A6878;
  --color-brass-500: #B8864E;
  --color-stone-300: #D1CEC8;

  --font-syne: 'Syne', sans-serif;
  --font-figtree: 'Figtree', sans-serif;

  --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-24: 96px;
  --space-30: 120px;

  /* --- SEMANTIC TOKENS --- */
  --bg-base: var(--color-linen-100);
  --bg-surface: var(--color-linen-200);
  --bg-dark: var(--color-graphite-900);
  --text-primary: var(--color-graphite-900);
  --text-secondary: var(--color-slate-600);
  --text-on-dark: var(--color-linen-100);
  --accent: var(--color-slate-500);
  --decorative: var(--color-brass-500);
  --border: var(--color-stone-300);
  --font-heading: var(--font-syne);
  --font-body: var(--font-figtree);

  /* --- COMPONENT TOKENS --- */
  --hero-overlay: rgba(29, 34, 38, 0.7);
  --card-bg: var(--bg-surface);
  --card-border-left: 3px solid var(--accent);
  --cta-bg: var(--accent);
  --cta-text: var(--bg-base);
  --cta-hover: #4A7F91;
  --nav-bg: var(--bg-base);
  --nav-bg-scroll: rgba(242, 240, 235, 0.95);
  --section-gap: var(--space-20);
}

/* --- 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: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  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: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}

/* --- 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, box-shadow 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: var(--nav-bg-scroll);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(29,34,38,0.04);
}

.site-nav.is-scrolled .nav-logo,
.site-nav.is-scrolled .nav-links a {
  color: var(--text-primary);
}

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

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.4s ease;
}

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

.nav-links a {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: rgba(242, 240, 235, 0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

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

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, var(--hero-overlay) 0%, rgba(29,34,38,0.3) 50%, rgba(29,34,38,0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1152px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-30) var(--space-6) var(--space-20);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  line-height: 1.05;
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 400;
  color: rgba(242, 240, 235, 0.7);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

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

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

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

/* --- TRAIT DE COUPE (signature SVG line) --- */
.trait-de-coupe {
  position: fixed;
  top: 0;
  left: 40px;
  width: 2px;
  height: 100vh;
  z-index: 50;
  pointer-events: none;
}

.trait-de-coupe svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 100%;
  overflow: visible;
}

.trait-de-coupe .coupe-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1024px) {
  .trait-de-coupe { display: none; }
}

/* --- 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: 1152px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-12);
}

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

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

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

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

.presentation-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}

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

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

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

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

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

.service-card {
  padding: var(--space-8) var(--space-6);
  border-left: 3px solid var(--accent);
  background: var(--bg-base);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(29,34,38,0.06);
}

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

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3);
}

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

/* --- GALLERY --- */
.gallery-section {
  padding-left: 0;
  padding-right: 0;
}

.gallery-header {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  margin-bottom: var(--space-12);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 6px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item--large {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item--large {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item--large {
    grid-column: span 2;
  }
}

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

.gallery-instagram a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  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);
}

/* --- AVIS --- */
.avis-section {
  background: var(--bg-surface);
}

.avis-block {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.avis-quote {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: var(--space-8);
  position: relative;
}

.avis-quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-heading);
  font-size: 64px;
  line-height: 1;
  color: var(--decorative);
  margin-bottom: var(--space-2);
}

.avis-author {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.avis-star {
  color: var(--decorative);
  font-size: 18px;
}

.avis-google {
  display: inline-block;
  margin-top: var(--space-6);
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

/* --- CONTACT --- */
.contact-section {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.contact-section h2,
.contact-section h3 {
  color: var(--text-on-dark);
}

.contact-section .section-title {
  color: var(--text-on-dark);
}

.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, 32px);
  font-weight: 600;
  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-on-dark);
  font-size: 16px;
  transition: color 0.25s ease;
}

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

.contact-item span {
  color: rgba(242,240,235,0.6);
  font-size: 15px;
}

.contact-hours {
  font-size: 14px;
  color: rgba(242,240,235,0.5);
  margin-top: var(--space-2);
}

.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: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, transform 0.2s ease;
}

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

.contact-cta svg {
  flex-shrink: 0;
}

.contact-map {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.3) contrast(0.95);
}

/* --- FOOTER --- */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(209,206,200,0.1);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-inner {
  max-width: 1152px;
  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: rgba(242,240,235,0.4);
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242,240,235,0.6) !important;
}

.footer-credit {
  display: block;
  text-align: center;
  margin-top: var(--space-3);
  color: rgba(242,240,235,0.25);
  font-size: 11px;
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(29,34,38,0.95);
  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-on-dark);
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(242,240,235,0.1);
  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-line { animation: none; opacity: 0.5; }
  .hero-title, .hero-subtitle { opacity: 1; transform: none; }
  .fade-up { opacity: 1; transform: none; }
  .coupe-path { stroke-dashoffset: 0 !important; }
}

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

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