/* ============================================
   CHN.ELEC - Site vitrine clair et soft
   Inspire de catrecyclingweb.bodev.fr
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--color-bg);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--color-bg-soft);
}

.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  max-width: 600px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-header--right {
  text-align: right;
  margin-left: auto;
  margin-right: 0;
}

.section-header--right .section-subtitle {
  margin-left: auto;
  margin-right: 0;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header--scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* Header sur hero : texte blanc */
.header:not(.header--scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.header:not(.header--scrolled) .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.header:not(.header--scrolled) .nav-lang {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
}

.header:not(.header--scrolled) .logo-text {
  color: #fff;
}

.header:not(.header--scrolled) .mobile-toggle {
  color: #fff;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  height: 36px;
  width: 36px;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: #000;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.nav-link--active {
  position: relative;
  color: var(--color-accent);
}

.nav-link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.header:not(.header--scrolled) .nav-link--active {
  color: #fff;
}

.header:not(.header--scrolled) .nav-link--active::after {
  background: #fff;
}

.nav-lang {
  font-weight: 600;
  color: var(--color-text-light);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 4px 10px;
  margin-left: 8px;
}

.nav-lang:hover {
  background: var(--color-bg-soft);
}

.nav .btn {
  margin-left: 12px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  cursor: pointer;
  padding: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
}

.btn-white:hover {
  background: var(--color-bg-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-lg {
  padding: 16px 32px;
  font-size: var(--text-base);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(5, 20, 15, 0.6) 0%,
    rgba(5, 20, 15, 0.35) 50%,
    rgba(5, 20, 15, 0.15) 100%);
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, rgba(248, 250, 252, 0.5), transparent);
  z-index: 2;
}

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

.hero-grid {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-top: 100px;
  padding-bottom: 80px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: var(--text-4xl);
  margin-bottom: 24px;
  color: #fff;
  line-height: 1.15;
  text-transform: uppercase;
}

.hero-description {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 0 0 420px;
  position: relative;
}

.hero-image img {
  width: 65%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ============================================
   SERVICES CARDS
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(16, 185, 129, 0.15);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.service-card h3 {
  font-size: var(--text-lg);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================
   PROCESS STEPS
   ============================================ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -16px;
  width: 32px;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.process-step:last-child::after {
  display: none;
}

.step-number {
  width: 56px;
  height: 56px;
  border: 2px solid var(--color-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 auto 20px;
  transition: all 0.3s ease;
}

.process-step:hover .step-number {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.process-step h3 {
  font-size: var(--text-base);
  margin-bottom: 8px;
}

.process-step p {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-content .section-label {
  text-align: left;
}

.about-content .section-title {
  text-align: left;
}

.about-text {
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-top: 4px;
}

.about-image {
  background: var(--color-accent-light);
  border-radius: 16px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.about-image-placeholder {
  color: var(--color-accent);
  font-size: 4rem;
  opacity: 0.3;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: var(--color-accent);
  padding: 80px 0;
  text-align: center;
}

.cta-section .section-title {
  color: #fff;
}

.cta-section .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto 40px;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-soft);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  max-width: 280px;
  line-height: 1.7;
}

.footer-heading {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  transition: color 0.2s ease;
}

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

.footer-col li {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: var(--color-text-light);
  font-size: var(--text-xs);
}

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

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-image {
    flex: 0 0 auto;
    max-width: 400px;
    width: 100%;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-step::after {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    font-size: var(--text-base);
    padding: 12px 24px;
    width: 100%;
    text-align: center;
    color: var(--color-text);
  }

  .nav-link:hover {
    color: var(--color-primary);
  }

  .nav-lang {
    margin-left: 0;
    margin-top: 8px;
    color: var(--color-text-light);
  }

  .nav .btn {
    margin-left: 0;
    margin-top: 16px;
    width: 100%;
    justify-content: center;
  }

  .mobile-toggle {
    display: block;
  }

  /* Forcer header blanc en mobile */
  .header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  }

  .header:not(.header--scrolled) .nav-link,
  .header:not(.header--scrolled) .nav-link:hover {
    color: var(--color-text);
  }

  .header:not(.header--scrolled) .nav-lang {
    color: var(--color-text-light);
    border-color: rgba(0, 0, 0, 0.1);
  }

  .header:not(.header--scrolled) .logo-text {
    color: #000;
  }

  .header:not(.header--scrolled) .mobile-toggle {
    color: var(--color-text);
  }

  .header:not(.header--scrolled) .nav-link--active {
    color: var(--color-accent);
  }

  .header:not(.header--scrolled) .nav-link--active::after {
    background: var(--color-accent);
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-description {
    font-size: var(--text-base);
  }

  .hero-image {
    display: none;
  }

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

  .process-steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-stats {
    gap: 24px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .cta-section {
    padding: 60px 0;
  }
}

/* ============================================
   PAGE HERO (sous-pages)
   ============================================ */

.page-hero {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 20, 15, 0.65);
  z-index: 1;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero .section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.page-hero .section-title {
  margin-bottom: 16px;
  color: #fff;
}

.page-hero .section-subtitle {
  max-width: 600px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.contact-item i {
  font-size: 24px;
  color: var(--color-accent);
  margin-top: 2px;
}

.contact-item strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.contact-item a,
.contact-item span {
  color: var(--color-text-light);
}

.contact-item a:hover {
  color: var(--color-accent);
}

.contact-cta-card {
  background: var(--color-bg-soft);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.contact-cta-card h3 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: 12px;
}

.contact-cta-card p {
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.contact-cta-card .btn {
  display: block;
  margin-bottom: 12px;
}

.contact-cta-card .btn:last-child {
  margin-bottom: 0;
}

/* ============================================
   LEGAL PAGES
   ============================================ */

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-block {
  margin-bottom: 40px;
}

.legal-block:last-child {
  margin-bottom: 0;
}

.legal-block h2 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: 12px;
}

.legal-block p {
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 8px;
}

.legal-block a {
  color: var(--color-accent);
}

.legal-block a:hover {
  text-decoration: underline;
}

.contact-map {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.contact-map iframe {
  display: block;
}

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

  .page-hero {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .about-stats {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
  }
}
