/*
Theme Name: Gestion BIM 5D
Theme URI: https://bim5d.org/
Author: Gestion BIM 5D
Description: WordPress theme converted from the Gestion BIM 5D Vite/React website, with portfolio projects as a custom post type.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: gestion-bim-5d
*/

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --background: hsl(0 0% 99%);
  --foreground: hsl(220 20% 10%);
  --card: hsl(0 0% 100%);
  --primary: hsl(350 72% 45%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(220 14% 96%);
  --muted-foreground: hsl(220 10% 46%);
  --accent: hsl(145 63% 42%);
  --border: hsl(220 13% 91%);
  --dark-section: hsl(220 20% 10%);
  --dark-section-foreground: hsl(0 0% 95%);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Plus Jakarta Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  line-height: 1.12;
}
p { margin: 0; }

.container {
  width: min(100% - 4rem, 1400px);
  margin-inline: auto;
}
.section-eyebrow {
  color: var(--primary);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-title {
  margin-top: .75rem;
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
}
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .875rem 2rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 700;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 25px hsl(350 72% 45% / .25);
}
.btn-primary:hover { background: hsl(350 72% 40%); }
.btn-ghost {
  background: hsl(0 0% 100% / .1);
  color: var(--primary-foreground);
  border: 1px solid hsl(0 0% 100% / .2);
}
.btn-ghost:hover { background: hsl(0 0% 100% / .2); }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--card);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 12px 30px hsl(220 20% 10% / .12); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.brand-mark { display: flex; gap: 2px; }
.brand-mark span {
  width: 8px;
  height: 40px;
  border-radius: 3px;
  background: var(--primary);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.brand-title strong { font-weight: 800; }
.brand-tagline {
  color: var(--muted-foreground);
  font-size: .625rem;
  letter-spacing: .05em;
}
.primary-nav { display: flex; align-items: center; gap: 2rem; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav a {
  color: hsl(220 20% 10% / .8);
  font-size: .875rem;
  font-weight: 600;
  transition: color .2s ease;
}
.primary-nav a:hover { color: var(--primary); }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; }

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg, .hero-bg img, .hero-overlay { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  background: linear-gradient(90deg, hsl(220 20% 10% / .9), hsl(220 20% 10% / .7), hsl(220 20% 10% / .4));
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  padding-block: 9rem 4rem;
}
.hero-kicker {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: .4rem 1rem;
  border: 1px solid hsl(350 72% 45% / .3);
  border-radius: 999px;
  background: hsl(350 72% 45% / .2);
  color: var(--primary-foreground);
  font-size: .875rem;
  font-weight: 600;
}
.hero h1 {
  color: var(--primary-foreground);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.hero h1 span { color: var(--primary); }
.hero p {
  max-width: 34rem;
  color: hsl(0 0% 100% / .8);
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.stats { padding-block: 5rem; background: var(--card); text-align: center; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}
.stat-value {
  color: var(--primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: .75rem;
}
.stat-label {
  max-width: 13rem;
  margin-inline: auto;
  color: var(--muted-foreground);
  font-size: .875rem;
  line-height: 1.55;
}

.clients {
  padding-block: 4rem;
  background: var(--secondary);
  border-block: 1px solid var(--border);
  text-align: center;
}
.clients-kicker {
  margin-bottom: 2.5rem;
  color: var(--muted-foreground);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.client-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 4rem;
}
.client-name {
  color: hsl(220 20% 10% / .3);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  transition: color .2s ease;
}
.client-name:hover { color: hsl(220 20% 10% / .6); }

.section-pad { padding-block: 6rem; }
.dark-section {
  background: var(--dark-section);
  color: var(--dark-section-foreground);
}
.section-head {
  text-align: center;
  margin-bottom: 4rem;
}
.service-grid, .formation-grid, .testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.service-card, .formation-card, .testimonial-card, .contact-card {
  border-radius: 16px;
  padding: 2rem;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.service-card.dark {
  background: hsl(0 0% 100% / .05);
  border: 1px solid hsl(0 0% 100% / .1);
}
.service-card.light, .formation-card {
  background: var(--card);
  border: 1px solid var(--border);
}
.service-card:hover, .formation-card:hover {
  border-color: hsl(350 72% 45% / .35);
  box-shadow: 0 18px 40px hsl(350 72% 45% / .07);
  transform: translateY(-2px);
}
.card-icon-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.icon-box {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: hsl(350 72% 45% / .14);
  color: var(--primary);
}
.icon-box.accent { background: hsl(145 63% 42% / .15); color: var(--accent); }
.icon-box svg { width: 24px; height: 24px; }
.card-num {
  color: hsl(350 72% 45% / .25);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
}
.service-card h3, .formation-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.service-card p, .formation-card p {
  color: var(--muted-foreground);
  font-size: .875rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.dark .service-card p, .dark-section .muted-dark { color: hsl(0 0% 95% / .7); }
.text-link {
  color: var(--primary);
  font-size: .875rem;
  font-weight: 700;
}
.text-link:hover { color: hsl(350 72% 40%); }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 4rem;
}
.platform-copy p {
  color: hsl(0 0% 95% / .7);
  line-height: 1.7;
  margin-block: 1.5rem;
}
.platform-image {
  overflow: hidden;
  border: 1px solid hsl(0 0% 100% / .1);
  border-radius: 16px;
  box-shadow: 0 25px 70px hsl(350 72% 45% / .12);
}

.formations { background: var(--secondary); }
.metrics {
  padding-block: 5rem;
  background: var(--dark-section);
  color: var(--dark-section-foreground);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  text-align: center;
}
.metric-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  background: hsl(350 72% 45% / .15);
  color: var(--primary);
}
.metric-value {
  color: var(--primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.metric-label {
  color: hsl(0 0% 95% / .6);
  font-size: .875rem;
  font-weight: 600;
}

.projects { overflow: hidden; background: var(--card); }
.projects-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.carousel-actions { display: flex; gap: .5rem; }
.carousel-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.carousel-btn:hover { background: var(--secondary); }
.carousel-btn:disabled { opacity: .3; cursor: default; }
.carousel-btn svg { width: 20px; height: 20px; }
.project-viewport { overflow: hidden; }
.project-track {
  display: flex;
  gap: 1.5rem;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.project-card {
  min-width: calc((100% - 3rem) / 3);
  flex: 0 0 calc((100% - 3rem) / 3);
}
.project-card:hover img { transform: scale(1.05); }
.project-image {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 1rem;
  aspect-ratio: 1.35 / 1;
  background: var(--secondary);
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.project-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: .75rem;
  font-weight: 700;
}
.project-card h3 {
  color: var(--foreground);
  font-size: 1.125rem;
  margin-bottom: .35rem;
}
.project-card p {
  color: var(--muted-foreground);
  font-size: .875rem;
  line-height: 1.5;
}

.testimonial-card {
  position: relative;
  background: var(--secondary);
}
.quote-icon { width: 32px; height: 32px; color: hsl(350 72% 45% / .22); margin-bottom: 1rem; }
.testimonial-text {
  color: hsl(220 20% 10% / .8);
  font-size: .875rem;
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.testimonial-author {
  font-family: "Space Grotesk", sans-serif;
  font-size: .875rem;
  font-weight: 700;
}
.testimonial-role {
  margin-top: .25rem;
  color: var(--muted-foreground);
  font-size: .75rem;
}

.site-footer {
  background: var(--dark-section);
  color: var(--dark-section-foreground);
}
.footer-main { padding-block: 5rem; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 48rem;
  gap: 2rem;
  margin: 0 auto 4rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  background: hsl(0 0% 100% / .05);
  border: 1px solid hsl(0 0% 100% / .1);
  text-align: center;
}
.contact-card:hover { border-color: hsl(350 72% 45% / .35); }
.contact-card svg { width: 24px; height: 24px; color: var(--primary); }
.contact-card strong { font-size: .875rem; }
.contact-card span { color: hsl(0 0% 95% / .7); font-size: .875rem; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(0 0% 100% / .1);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: .875rem;
  font-weight: 700;
}
.footer-brand .brand-mark span { width: 6px; height: 28px; }
.social-link {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid hsl(0 0% 100% / .1);
  border-radius: 999px;
  background: hsl(0 0% 100% / .05);
}
.social-link:hover { border-color: hsl(350 72% 45% / .35); }
.social-link svg { width: 18px; height: 18px; }
.copyright { color: hsl(0 0% 95% / .5); font-size: .75rem; }

.archive-hero {
  padding: 10rem 0 5rem;
  background: var(--dark-section);
  color: var(--dark-section-foreground);
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding-block: 5rem;
}
.single-project {
  padding: 10rem 0 5rem;
}
.single-project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 3rem;
  align-items: start;
}
.single-project-image {
  overflow: hidden;
  border-radius: 16px;
  background: var(--secondary);
}
.entry-content {
  color: var(--muted-foreground);
  line-height: 1.75;
}
.entry-content p + p { margin-top: 1rem; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .primary-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--card);
    border-top: 1px solid var(--border);
  }
  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .primary-nav.is-open { display: flex; }
  .menu-toggle { display: grid; place-items: center; }
  .platform-grid, .single-project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  body.admin-bar .site-header { top: 46px; }
  .container { width: min(100% - 2rem, 1400px); }
  .stats-grid, .service-grid, .formation-grid, .testimonial-grid, .metric-grid, .contact-grid, .archive-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid { gap: 2.5rem; }
  .projects-head { align-items: flex-start; }
  .project-card {
    min-width: min(85vw, 360px);
    flex-basis: min(85vw, 360px);
  }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .hero { min-height: 82vh; }
  .hero-content { padding-top: 8rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .projects-head { flex-direction: column; }
  .brand-title { font-size: 1rem; }
  .brand-tagline { max-width: 180px; }
}
