:root {
  --color-primary: #1a3a5c;
  --color-secondary: #c8a84b;
  --color-accent: #2e6da4;
  --color-bg: #f8f9fa;
  --color-text: #2d2d2d;
  --color-white: #ffffff;
  --color-muted: #5a6172;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --transition: 0.3s ease;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100%, calc(var(--max-width) - 4rem));
  margin: 0 auto;
}

header,
footer,
section {
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--color-primary);
  font-weight: 800;
  text-transform: uppercase;
}

.brand img {
  display: block;
  height: 60px;
  width: auto;
}

.brand span {
  font-size: 1rem;
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

.nav-links li {
  white-space: nowrap;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 600;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-secondary);
}

.hamburger {
  display: none;
  border: 1px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 1.2rem;
}

.hero,
.page-header {
  position: relative;
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 4rem 0;
}

.hero::before,
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.42);
}

.hero::before {
  background-image: url('../photos/urbanisme-durable-groupement-bb-international.jpg');
}

.page-header::before {
  background-image: url('../photos/siege-groupement-bb-international-benin.jpg');
}

.hero-content,
.page-header-content {
  position: relative;
  z-index: 1;
  max-width: 840px;
  padding: 2rem;
  color: var(--color-white);
}

.hero h1,
.page-header h1 {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  margin-bottom: 1rem;
  line-height: 1.05;
}

.hero p,
.page-header p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
}

.section-copy p {
  font-size: 1.05rem;
  color: var(--color-text);
  background: transparent;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  border: none;
  transition: transform var(--transition), background var(--transition);
  font-weight: 700;
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid rgba(200, 168, 75, 0.9);
}

.btn-primary:hover {
  background: #d6a43b;
  transform: translateY(-2px);
}

.section-title {
  font-size: clamp(2rem, 2.5vw, 2.6rem);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background: var(--color-secondary);
  margin-top: 1rem;
  border-radius: 2px;
}

section {
  padding: 4rem 0;
}

.section-copy {
  max-width: 760px;
  margin-top: 1rem;
}

.stats-grid,
.cards-grid,
.gallery-grid,
.equipment-grid,
.logos-grid,
.expertise-grid {
  display: grid;
  gap: 1.5rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  margin-top: 2rem;
}

.stat-item {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-item span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-unit {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 0.5rem;
  color: var(--color-secondary);
}

.stat-item p {
  margin-top: 0.65rem;
  color: var(--color-muted);
}

.overview-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
  margin-top: 2rem;
}

.overview-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.overview-copy h2 {
  margin-bottom: 1rem;
}

.card,
.project-card,
.expertise-card,
.partner-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card h3 {
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--color-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-en-cours {
  background: #daf4dc;
  color: #1f6f34;
}

.gallery-grid {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition);
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

.partners-grid {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.partners-grid h2 {
  margin-bottom: 1.5rem;
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: center;
  justify-items: center;
}

.logos-grid img {
  height: 80px;
  width: auto;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition);
}

.logos-grid img:hover {
  transform: scale(1.05);
}

footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.86);
  padding: 3rem 0 2rem;
}

footer .container {
  display: grid;
  gap: 2rem;
}

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

.footer-bottom p {
  margin: 0.35rem 0;
}

.engagements-list article {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.engagements-list article:nth-child(even) {
  flex-direction: row-reverse;
}

.engagements-list img {
  width: 320px;
  max-width: 100%;
  border-radius: var(--radius);
}

.engagements-list h3 {
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.engagements-list p {
  color: var(--color-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
  color: var(--color-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1.5px solid #d8dbe0;
  border-radius: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(46, 109, 164, 0.14);
}

form button {
  width: 100%;
  margin-top: 0.5rem;
}

.contact-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.contact-card h3 {
  margin-bottom: 1rem;
}

.contact-card p,
.contact-card a {
  color: var(--color-text);
}

.contact-card a {
  font-weight: 700;
}

.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-wrapper iframe {
  width: 100%;
  height: 360px;
  border: 0;
}

.expertise-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.expertise-card {
  min-height: 240px;
  display: grid;
  gap: 1rem;
}

.expertise-card span {
  font-size: 2rem;
}

.expertise-card h3 {
  margin-bottom: 0.5rem;
}

.expertise-card p {
  color: var(--color-muted);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 14px;
}

.lightbox-overlay .lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
}

@media (max-width: 960px) {
  .overview-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .gallery-grid,
  .logos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .engagements-list article {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  * {
    box-sizing: border-box;
  }

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

  .navbar {
    padding: 0.8rem 0;
  }

  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(26, 58, 92, 0.98);
    display: none;
    z-index: 1000;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    color: white;
    font-size: 1rem;
  }

  .hamburger {
    display: inline-flex;
  }

  .hero,
  .page-header {
    min-height: 55vh;
    padding: 2rem 0;
  }

  .hero-content,
  .page-header-content {
    padding: 1rem;
  }

  .hero h1,
  .page-header h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.3;
    padding: 0 12px;
  }

  .hero p,
  .page-header p {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    padding: 0 16px;
  }

  .hero-img {
    height: 250px;
    object-fit: cover;
  }

  .stats-grid,
  .gallery-grid,
  .logos-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    font-size: 1rem;
    padding: 12px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-title::after {
    margin-top: 0.8rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .engagements-list article {
    flex-direction: column;
    align-items: flex-start;
  }

  .engagements-list article:nth-child(even) {
    flex-direction: column;
  }

  .engagements-list img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
  }

  .gallery-grid {
    gap: 12px;
  }

  .gallery-grid img {
    height: 180px;
  }

  .project-card {
    font-size: 1rem;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-card ul {
    padding-left: 16px;
  }

  footer {
    padding: 20px 12px;
    text-align: center;
  }

  footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  footer .container {
    width: 100%;
    padding: 0 12px;
  }
}

@media (max-width: 576px) {
  .navbar {
    flex-wrap: wrap;
    padding: 0.6rem 0;
  }

  .brand span {
    font-size: 0.9rem;
  }

  .brand img {
    height: 50px;
  }

  .hero,
  .page-header {
    min-height: 50vh;
    padding: 1.5rem 0;
  }

  .hero-content,
  .page-header-content {
    padding: 1rem 0.8rem;
  }

  .hero h1,
  .page-header h1 {
    font-size: clamp(1.3rem, 8vw, 2rem);
    margin-bottom: 0.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    padding: 1rem;
  }

  .stat-item span {
    font-size: 1.6rem;
  }

  .stat-item p {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-copy {
    max-width: 100%;
  }

  .section-copy p {
    font-size: 1rem;
  }

  .overview-grid {
    gap: 1.5rem;
  }

  .overview-grid img {
    height: auto;
  }

  .logos-grid {
    gap: 1rem;
  }

  .logos-grid img {
    height: 60px;
  }

  .gallery-grid {
    gap: 10px;
  }

  .gallery-grid img {
    height: 160px;
  }

  .contact-grid {
    gap: 1.5rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  footer {
    padding: 16px 8px;
  }
}

@media (max-width: 360px) {
  .hero h1,
  .page-header h1 {
    font-size: 1.2rem;
    line-height: 1.2;
  }

  .stat-item span {
    font-size: 1.4rem;
  }

  .stat-item {
    padding: 0.8rem;
  }
}
