/* ===== VARIABLES ===== */
:root {
  --cream:  #fafaf8;
  --beige:  #ede4d8;
  --sage:   #9fbdb4;
  --ocean:  #7fb3d5;
  --stone:  #3e5c76;
  --navy:   #243036;
  --white:  #ffffff;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Lato', system-ui, sans-serif;

  --radius: 4px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

/* ===== UTILS ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
}

.btn-primary {
  background: var(--stone);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy); }

.btn-outline {
  background: transparent;
  color: var(--stone);
  border: 1.5px solid var(--stone);
}
.btn-outline:hover {
  background: var(--stone);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--stone);
}
.btn-light:hover {
  background: var(--beige);
}

.section-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--beige);
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: 0 2px 20px rgba(36, 48, 54, 0.08); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--sage);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--stone);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta { margin-left: 1rem; }
.nav-cta-mobile { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(36, 48, 54, 0.62) 0%,
    rgba(36, 48, 54, 0.25) 60%,
    rgba(36, 48, 54, 0.05) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 600px;
  padding: 8rem 1.5rem 4rem;
  margin: 0 auto 0 max(1.5rem, calc(50vw - 550px));
}

.hero-content .section-label { color: rgba(255,255,255,0.7); }
.hero-content h1 { margin-bottom: 1.25rem; }
.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.88;
  margin-bottom: 2.5rem;
  max-width: 440px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== ABOUT ===== */
.about {
  padding: 6rem 0;
  background: var(--white);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-img {
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4/5;
}

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

.about-text .section-label { margin-bottom: 1rem; }
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { color: #4a5a60; margin-bottom: 1.25rem; }

/* ===== SERVICES ===== */
.services {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.services-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/services-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
}

.services-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.services-header .section-label { justify-content: center; display: flex; }
.services-header h2 { margin-top: 0.5rem; }

.services-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--beige);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(62, 92, 118, 0.12);
}

.service-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.service-card h3 { margin-bottom: 0.75rem; color: var(--stone); }
.service-card p  { font-size: 0.95rem; color: #4a5a60; margin-bottom: 1.5rem; }

/* ===== TESTIMONIALS / QUOTE ===== */
.quote-section {
  padding: 5rem 0;
  background: var(--stone);
  text-align: center;
  color: var(--white);
}

.quote-section blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-style: italic;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  line-height: 1.4;
}

.quote-section cite { font-size: 0.85rem; letter-spacing: 0.1em; opacity: 0.7; }

/* ===== CONTACT ===== */
.contact {
  padding: 6rem 0;
  background: var(--beige);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p  { color: #4a5a60; margin-bottom: 2rem; }

.contact-details { list-style: none; }
.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--stone);
}

.contact-details li svg { flex-shrink: 0; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-group label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--beige);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--sage); }

.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.footer-brand img { height: 52px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.88rem; max-width: 240px; }

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  text-align: center;
}
.footer-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--sage); }

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: flex-start;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: border-color var(--transition), color var(--transition);
}

.footer-social a:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
}

/* ===== REALISATIONS PAGE ===== */
.page-hero {
  padding: 10rem 0 5rem;
  background: var(--navy);
  color: var(--white);
  text-align: center;
}

.page-hero .section-label { color: var(--sage); }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p  { opacity: 0.7; max-width: 520px; margin: 0 auto; }

.realisations {
  padding: 5rem 0;
  background: var(--cream);
}

.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1.4rem;
  border: 1.5px solid var(--beige);
  border-radius: 999px;
  background: transparent;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--stone);
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--stone);
  border-color: var(--stone);
  color: var(--white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  grid-auto-flow: dense;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--beige);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(62, 92, 118, 0.1);
}

.portfolio-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.portfolio-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-contenu   { background: #e8f3f1; color: var(--sage); }
.tag-strategie { background: #e4ecf3; color: var(--ocean); }
.tag-identite  { background: #edeae8; color: #7a6a5a; }
.tag-stories   { background: #f0e8f3; color: #8a5a9a; }
.tag-posts     { background: #fdf3e8; color: #c07840; }

.portfolio-card h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0;
  flex: 1;
}

.portfolio-card .client {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

.portfolio-card p {
  font-size: 0.93rem;
  color: #4a5a60;
  line-height: 1.65;
  margin: 0;
}

.portfolio-card-results {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--beige);
  margin-top: auto;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.result-item strong {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--stone);
  line-height: 1;
}

.result-item span {
  font-size: 0.75rem;
  color: #7a8a90;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(250,250,248,0.98);
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--beige);
    z-index: 99;
  }

  .nav-mobile-open .nav-cta-mobile {
    display: list-item;
    list-style: none;
  }

  .about-inner,
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-img { aspect-ratio: 3/4; max-height: 480px; width: 100%; }
  .about-img img { object-position: top center; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { margin: 0 auto; }
  .footer-social { justify-content: center; }
  .about,
  .services,
  .contact { padding: 4rem 0; }
  .quote-section { padding: 3rem 0; }
  .contact-inner { gap: 2.5rem; }
  .services-header { margin-bottom: 2.5rem; }
}

@media (min-width: 681px) and (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr 1.3fr; gap: 2rem; }
  .about-img { aspect-ratio: 3/4; max-height: 340px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .hero-content { margin: 0 auto; text-align: center; }
  .hero-subtitle { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(36,48,54,0.6) 0%,
      rgba(36,48,54,0.45) 60%,
      rgba(36,48,54,0.3) 100%
    );
  }

  .about,
  .services,
  .contact { padding: 3.5rem 0; }
  .quote-section { padding: 2.5rem 0; }
  .contact-inner { gap: 2rem; }
  .about-img { aspect-ratio: 4/5; max-height: 420px; width: 100%; }
  .page-hero { padding: 8rem 0 3rem; }
}

@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn { text-align: center; }
}

/* ===== CAROUSEL ===== */
.card-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--beige);
  aspect-ratio: 1 / 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition);
}
.carousel-btn:hover { background: var(--white); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}
.carousel-dot.active { background: var(--white); }

#carousel-posts-simples .carousel-slide,
#carousel-avenir-habitat .carousel-slide {
  background: var(--cream);
}
#carousel-posts-simples .carousel-slide img,
#carousel-avenir-habitat .carousel-slide img {
  object-fit: contain;
}

.carousel-caption {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(36, 48, 54, 0.65);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

.card-single-img {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--beige);
}
.card-single-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-carousel.portrait { aspect-ratio: 9 / 16; }

.carousel-counter {
  position: absolute;
  bottom: 0.6rem;
  right: 0.75rem;
  background: rgba(36, 48, 54, 0.55);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  pointer-events: none;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 14, 16, 0.92);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
#lightbox.open { display: flex; }

.lb-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); }

.lb-counter {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

/* ===== CARD VIDEO ===== */
.card-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #000;
}
.card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
