/* ==========================================================================
   Raphaëlle Boutié — Portfolio
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

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

:root {
  --color-bg: #ffffff;
  --color-text: #2b2b2b;
  --color-text-light: #666666;
  --color-accent: #8a7a6b;
  --color-border: #e0d8d0;
  --color-bg-warm: #f8f6f3;
  --font-main: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-heading: 'EB Garamond', Georgia, serif;
  --max-width: 1400px;
  --nav-height: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--color-border);
  padding: 12px 0;
  min-width: 200px;
  padding-top: 26px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.nav-dropdown-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

.nav-dropdown:hover .nav-dropdown-content { display: block; }

.nav-dropdown-content a {
  display: block;
  padding: 8px 24px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Hamburger */
.nav-toggle { display: none; cursor: pointer; background: none; border: none; padding: 8px; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  margin: 6px 0;
  transition: 0.3s;
}

/* ---------- Main Content ---------- */
.main { padding-top: var(--nav-height); }

/* ---------- Hero / Home ---------- */
.hero {
  height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.active { opacity: 1; }

.hero-slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  color: white;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
  gap: 0;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0;
  line-height: 1;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  font-weight: 400;
  font-style: italic;
  margin-top: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
}

.hero-slide.active .hero-title,
.hero-slide.active .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* ---------- Section ---------- */
.section {
  padding: 80px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-accent);
  margin: 20px auto 0;
}

/* ---------- Gallery Grid ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

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

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

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

.gallery-item-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  text-align: center;
  padding: 16px;
}

.gallery-item:hover .gallery-item-title {
  opacity: 1;
}

/* ---------- Color Blocks ---------- */
.gallery-item-color {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: default;
}

.gallery-item-color-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  color: white;
  letter-spacing: 0.02em;
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.open { display: flex; }

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-main);
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 20px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-info {
  color: white;
  text-align: center;
  font-family: var(--font-heading);
  max-width: 600px;
  padding-top: 16px;
  display: none;
}

.lightbox-info strong {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.lightbox-info span {
  font-size: 0.95rem;
  opacity: 0.85;
  font-style: italic;
}

/* ---------- About / À propos ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-image img {
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 24px;
  line-height: 1;
}

.about-text h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-top: 32px;
  margin-bottom: 12px;
}

.about-text p, .about-text li {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.about-text a { text-decoration: underline; color: var(--color-accent); }

.about-text ul { list-style: none; }
.about-text ul li::before {
  content: "–";
  margin-right: 8px;
  color: var(--color-accent);
}

/* Démarche */
.demarche {
  background: var(--color-bg-warm);
  padding: 60px 40px;
  margin-top: 60px;
  border-left: 3px solid var(--color-accent);
}

.demarche h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.demarche p {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 500;
}

.contact-info p {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--color-text-light);
}

.contact-info a { color: var(--color-accent); }

.contact-form label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  margin-top: 20px;
  color: var(--color-text-light);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: var(--color-bg-warm);
  transition: border-color 0.3s;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--color-accent); }

.contact-form textarea { min-height: 150px; resize: vertical; }

.contact-form button {
  margin-top: 24px;
  padding: 14px 40px;
  background: var(--color-text);
  color: white;
  border: none;
  font-family: var(--font-main);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}

.contact-form button:hover { background: var(--color-accent); }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
  }

  .hero-title { font-size: 2.5rem; letter-spacing: 0.2em; }
  .section { padding: 60px 24px; }
}

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

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    padding: 24px 24px 24px 120px;
    border-bottom: 1px solid var(--color-border);
    gap: 16px;
  }

  .nav-dropdown-content {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    margin-top: 8px;
    display: block;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
