/* ===========================================
   LAYOUT - Structure et navigation
   =========================================== */

/* Header */
header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  z-index: 100;
}

.nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.75rem 1rem;
  max-width: 90%;
  margin: 0 auto;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-title {
  font-weight: 800;
  font-size: 1.1rem;
}

.logo-subtitle {
  font-size: 0.8rem;
  color: #666;
}

.logo-subtitle .regionalism {
  position: relative;
  cursor: help;
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

.logo-subtitle .regionalism:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 160%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 0.8rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 1);
  z-index: 200;
  pointer-events: none;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Triangle for the tooltip */
.logo-subtitle .regionalism:hover::before {
  content: '';
  position: absolute;
  top: 140%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #000 transparent;
  z-index: 200;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 600px;
}

.nav-contact-desktop {
  flex-shrink: 0;
}

.nav .nav-contact-mobile {
  display: none !important;
}

.navlinks a {
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text);
  transition: color 0.2s ease;
  position: relative;
}

.navlinks .nav-brand {
  display: none;
}

.navlinks a:not(.btn):hover,
.navlinks a.active {
  color: var(--accent-2);
}

.navlinks a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-2);
  transition: width 0.2s ease;
}

.navlinks a:not(.btn):hover::after,
.navlinks a.active::after {
  width: 100%;
}

/* Nav Toggle (hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 900px) {
  body {
    padding-top: 90px;
    /* Compensation pour header fixe */
  }

  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow: visible;
    isolation: isolate;
  }

  .nav {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0.5rem;
  }

  .nav .nav-contact-desktop {
    display: none !important;
  }

  .nav .nav-contact-mobile {
    display: block !important;
  }

  .logo-wrap img {
    width: 140px !important;
    height: 140px !important;
    position: fixed;
    top: -1em;
    left: 1rem;
  }

  .logo-wrap {
    position: relative;
    min-height: 60px;
    padding-left: 150px;
  }

  .logo-title {
    font-size: 0.95rem;
  }

  .logo-subtitle {
    font-size: 0.7rem;
  }

  .nav-toggle {
    display: flex;
  }

  .navlinks {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    align-items: flex-start;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 105;
    background-image: url('../hero-menu-burger.webp');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .navlinks::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
  }

  .navlinks.open {
    transform: translateX(0);
  }

  .navlinks a {
    font-size: 1.25rem;
  }

  .navlinks .nav-brand {
    display: block;
    font-family: Bangers, sans-serif;
    font-size: 1.8rem;
    color: var(--accent-2);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
  }

  .navlinks .btn {
    margin-top: 1rem;
  }
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: center;
  padding: 4rem 1rem;
}

.hero-left h1 {
  font-family: Bangers, sans-serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin: 0.3rem 0;
  line-height: 0.95;
  color: var(--accent-2);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
  -webkit-text-stroke: 1px #000;
}

.hero-left h1 .accent {
  color: var(--accent);
}

.tagline {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
  font-size: 1.1rem;
}

.subtitle {
  color: #555;
  max-width: 54ch;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 0.5rem;
    min-height: auto;
  }

  .hero-right {
    order: -1;
  }

  .logo-card {
    width: 280px !important;
    height: 220px !important;
  }
}

/* Page Hero (service pages) */
.page-hero {
  padding: 4rem 1rem 3rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
}

.page-hero .container {
  margin: 0 auto;
}

.page-hero h1 {
  font-family: Bangers, sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--accent-2);
  margin: 0.5rem 0;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.page-intro {
  max-width: 60ch;
  margin: 0 auto;
  color: #555;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Spacing between sections */
section {
  position: relative;
  margin: 3rem auto !important;
}

/* main > section:first-child {
  margin-top: 0 !important;
} */

/* Glass Section Base */
.glass-section {
  padding: 3rem 1rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
}

/* Variantes de fond */
.glass-section--light {
  background: rgba(255, 255, 255, 0.3);
}

.glass-section--muted {
  background: rgba(236, 239, 244, 0.4);
}

.glass-section--gradient {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(236, 239, 244, 0.4));
}

/* Services Grid (home) */
.services {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(236, 239, 244, 0.4));
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .glass-section {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

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

/* Service Detail Layout */
.service-detail {
  /* Uses .glass-section base */
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.detail-content h2 {
  font-family: Bangers, sans-serif;
  font-size: 1.8rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}

.detail-content-full {
  max-width: 900px;
  margin: 0 auto;
}

.intro-block {
  margin-bottom: 3rem;
}

.intro-block h2 {
  font-family: Bangers, sans-serif;
  font-size: 1.8rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}

.intro-block p {
  color: #555;
  line-height: 1.7;
  font-size: 1.05rem;
}

@media (max-width: 900px) {
  .page-hero {
    padding: 3rem 0.5rem 2rem;
  }

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

  .detail-sidebar {
    order: -1;
  }
}

/* IA/Dev Services Grid */
.ia-services-grid,
.dev-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {

  .ia-services-grid,
  .dev-services-grid {
    grid-template-columns: 1fr;
  }
}

/* Options Grid */
.options {
  /* Uses .glass-section.glass-section--muted */
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

/* Process Section */
.process {
  /* Uses .glass-section.glass-section--light */
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

/* Tech Section */
.tech-section {
  /* Uses .glass-section.glass-section--muted */
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Team Section */
.team {
  /* Uses .glass-section base */
}

.team-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.team-intro h2 {
  font-family: Bangers, sans-serif;
  font-size: 1.8rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}

.team-intro p {
  color: #555;
  line-height: 1.7;
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Values Section */
.values {
  /* Uses .glass-section.glass-section--muted */
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* Storytelling Section */
.storytelling {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 1rem;
  /* Uses .glass-section base + custom gradient */
  background: linear-gradient(180deg, rgba(236, 239, 244, 0.7), rgba(255, 255, 255, 0.55));
}

.storytelling img {
  width: 100%;
  max-width: 40%;
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--text);
}

.story-text {
  flex: 1;
}

.story-text h3 {
  font-family: Bangers, sans-serif;
  font-size: 2rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}

.story-text p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .storytelling {
    flex-direction: column;
    text-align: center;
    padding: 3rem 0.5rem;
  }

  .storytelling img {
    max-width: 280px;
  }
}

/* Contact Section */
.contact {
  /* Uses .glass-section.glass-section--light */
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

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

/* CTA Section */
.cta-section {
  padding: 3rem 1rem;
  /* Uses .glass-section.glass-section--light + custom padding */
}

/* Footer */
footer {
  background: var(--text);
  color: #fff;
  padding: 3rem 1rem 1.5rem;
}

footer .container {
  max-width: 100%;
  width: 100%;
  padding: 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand img {
  width: 12rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links .footer-h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: #fff;
  font-weight: 700;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-contact .footer-h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: #fff;
}

.footer-legal i {
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  footer .container {
    padding: 0 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-legal a:last-child {
    width: 100%;
    margin-top: 0.5rem;
  }
}