/* ===== Variables ===== */
:root {
  --primary: #A8C4A0;
  --primary-dark: #8fb385;
  --secondary: #212628;
  --secondary-light: #2d3234;
  --bg: #fafbf9;
  --bg-alt: #212628;
  --text: #212628;
  --text-muted: #5a6163;
  --text-on-dark: #f0f2ef;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(33, 38, 40, 0.08);
  --shadow-hover: 0 12px 40px rgba(33, 38, 40, 0.12);
  --font-heading: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
body > main {
  flex: 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 249, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(33, 38, 40, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--secondary);
}
.logo-img {
  height: 42px;
  width: auto;
  display: block;
}
.nav {
  display: flex;
  gap: 2rem;
}
.nav a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav a:hover { color: var(--secondary); }
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: none;
}
.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  padding: 4rem 0 5rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  background: var(--primary);
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--secondary);
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
.hero-title .highlight {
  color: var(--secondary);
  background: linear-gradient(180deg, transparent 60%, var(--primary) 60%);
  padding: 0 0.1em;
}
.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 42ch;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--secondary);
  color: var(--text-on-dark);
}
.btn-primary:hover {
  background: var(--secondary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}
.placeholder-graphic {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  padding: 1rem;
  /* box-shadow: var(--shadow); */
  /* background: #f0f2ef; */
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
  /* border: 2px dashed rgba(33, 38, 40, 0.15); */
}

/* ===== Sections global ===== */
.section {
  padding: 4.5rem 0;
}
.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--secondary);
  margin: 0 0 0.5rem;
}
.section-intro {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  max-width: 36ch;
}

/* ===== Réalisations (screenshots) ===== */
.realisations { background: var(--white); }
.screenshots-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}
.screenshot-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.screenshot-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* Screenshots réels (images) — même hauteur pour les deux */
.device-composition--img {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  width: 100%;
}
.screenshot-img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  display: block;
  margin: 0 auto;
}
.screenshot-img--web {
  max-width: 100%;
}

/* Composition multi-appareils (téléphones) — conservé pour référence */
.device-composition {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}
.device-composition--phones {
  position: relative;
  height: 320px;
}
.phone-frame {
  position: absolute;
  width: 120px;
  background: var(--secondary);
  border-radius: 24px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(33, 38, 40, 0.25);
}
.phone-frame--1 { left: 50%; transform: translate(-50%, 0) rotate(-8deg); z-index: 1; }
.phone-frame--2 { left: 50%; transform: translate(-50%, 20px) rotate(2deg); z-index: 2; }
.phone-frame--3 { left: 50%; transform: translate(-50%, 10px) rotate(10deg); z-index: 0; margin-left: -80px; }
.phone-screen {
  aspect-ratio: 9 / 19;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
}
.placeholder-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
}
.placeholder-screen--web {
  aspect-ratio: 16 / 10;
  font-size: 0.9rem;
}

/* App web dans cadre Mac / laptop */
.device-composition--laptop {
  min-height: 260px;
}
.laptop-frame {
  width: 100%;
  max-width: 360px;
}
.laptop-screen {
  background: var(--secondary);
  border: 3px solid var(--secondary-light);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(33, 38, 40, 0.2);
}
.laptop-screen .placeholder-screen {
  border-radius: 6px;
  min-height: 180px;
}
.laptop-base {
  height: 14px;
  background: linear-gradient(180deg, var(--secondary-light) 0%, var(--secondary) 100%);
  border: 3px solid var(--secondary-light);
  border-top: none;
  border-radius: 0 0 16px 16px;
  width: calc(100% + 24px);
  margin-left: -12px;
  box-shadow: 0 8px 20px rgba(33, 38, 40, 0.15);
}

/* ===== Services ===== */
.services { background: var(--white); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.service-card {
  padding: 1.75rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 38, 40, 0.06);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.placeholder-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: 0.9;
}
.service-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--secondary);
  margin: 0 0 0.5rem;
}
.service-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.service-icon-img {
  width: 100%;
  height: 100%;
  padding: 5px;
  fill: #f0f2ef;
  object-fit: contain;
}
/* ===== Impact ===== */
.impact {
  background: var(--bg-alt);
  color: var(--text-on-dark);
}
.section-title--light,
.section-intro--light { color: var(--text-on-dark); }
.section-intro--light { opacity: 0.85; }

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2rem;
}
.impact-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.impact-graphic {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
}
.impact-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem 4rem;
}
.stat-block {
  text-align: center;
  padding: 0 0.5rem;
}
.stat-number {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 1rem;
  opacity: 0.9;
}
.stat-divider {
  width: 1px;
  min-width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* ===== Newsletter ===== */
.newsletter {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 0;
}
.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.newsletter-desc {
  color: var(--secondary);
  margin: 0;
  opacity: 0.95;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--secondary);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--secondary);
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(33, 38, 40, 0.2);
}
.newsletter-form .btn-primary {
  background: var(--secondary);
  color: var(--white);
}
.newsletter-form .btn-primary:hover { background: var(--secondary-light); }
.graphic-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Portfolio ===== */
.portfolio-section { background: var(--white); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  list-style: none;
  align-items: stretch;
}
.portfolio-grid > li {
  display: flex;
}
.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 1.75rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 38, 40, 0.06);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
  color: inherit;
}
a.project-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.project-card:not(a) {
  cursor: default;
}
.project-card:not(a):hover {
  transform: none;
}
.project-card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--secondary);
  margin: 0 0 0.5rem;
}
.project-card-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
  flex: 1;
}
.project-card-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-top: auto;
}
a.project-card:hover .project-card-link { color: var(--secondary); }

/* ===== Portfolio détail ===== */
.detail-page {
  padding: 3rem 0 5rem;
}
.detail-back {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.detail-back:hover { color: var(--secondary); }
.detail-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--secondary);
  margin: 0 0 1rem;
}
.detail-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  max-width: 60ch;
}
.detail-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  background: var(--primary);
  border-radius: 100px;
  margin-bottom: 1rem;
}
.detail-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 65ch;
}
.project-detail p {
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0 0 1rem;
  max-width: 65ch;
}
.project-detail p:last-of-type { margin-bottom: 0; }
.detail-list {
  list-style: disc;
  margin: 0 0 1.5rem 1.25rem;
  padding: 0;
  max-width: 65ch;
}
.detail-list li {
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.detail-list li:last-child { margin-bottom: 0; }

/* ===== Footer ===== */
.footer {
  background: var(--secondary);
  color: var(--text-on-dark);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}
.footer-legal {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .hero-title { max-width: none; }
  .hero-desc { max-width: none; margin-left: auto; margin-right: auto; }
  .hero-content .btn { margin: 0 auto; }
  .screenshots-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .device-composition--phones { height: 280px; }
  .phone-frame { width: 100px; }
  .phone-frame--3 { margin-left: -60px; }
  .newsletter-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .newsletter-form { justify-content: center; }
  .impact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .impact-visual { order: 2; }
  .impact-stats { order: 1; }
  .impact .section-title,
  .impact .section-title--light,
  .impact .section-intro,
  .impact .section-intro--light {
    text-align: center;
  }
  .impact .section-intro,
  .impact .section-intro--light {
    margin-left: auto;
    margin-right: auto;
    max-width: none;
  }
}

@media (max-width: 680px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid rgba(33, 38, 40, 0.08);
    box-shadow: var(--shadow);
  }
  .nav.is-open a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(33, 38, 40, 0.06);
  }
  .nav.is-open a:last-child { border-bottom: none; }
  .menu-btn { display: flex; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .impact-stats { flex-direction: column; }
  .stat-divider { width: 60px; height: 1px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
