/* ==========================================
   1. VARIABLES & CHARTE GRAPHIQUE
=========================================== */
:root {
  --primary: #0D483A;       
  --primary-light: #1C6955; 
  --accent: #429B78;        
  --accent-bright: #78B99A; 
  
  --bg-dark: #111822;       
  --bg-card-dark: #1A232E;  
  --bg-light: #F8FAFC;      
  --bg-card-light: #FFFFFF; 
  
  --text-main: #1E293B;     
  --text-muted: #64748B;    
  --text-light: #F1F5F9;    
  --text-light-muted: #94A3B8;
  
  --radius: 12px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 30px -10px rgba(13, 72, 58, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   2. RESET & BASE
=========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.filiales-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

p { text-align: justify; }

.text-center, 
.text-center p,
.section-intro {
  text-align: center;
}

/* ==========================================
   3. ANIMATIONS À HAUTE AMPLITUDE
=========================================== */
@keyframes floatImage {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, -15px);
  }
}
@keyframes megaPulse1 {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0.25;
  }
  50% {
    transform: translate(-90px, 60px) scale(2.2);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0.25;
  }
}

@keyframes megaPulse2 {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0.2;
  }
  50% {
    transform: translate(80px, -50px) scale(2.0);
    opacity: 0.95;
  }
  100% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0.2;
  }
}

@keyframes lightPulse1 {
  0% {
    transform: translate(0, 0) scale(0.7);
    opacity: 0.3;
  }
  50% {
    transform: translate(70px, 40px) scale(1.9);
    opacity: 0.9;
  }
  100% {
    transform: translate(0, 0) scale(0.7);
    opacity: 0.3;
  }
}

@keyframes lightPulse2 {
  0% {
    transform: translate(0, 0) scale(1.8);
    opacity: 0.85;
  }
  50% {
    transform: translate(-60px, -30px) scale(0.6);
    opacity: 0.25;
  }
  100% {
    transform: translate(0, 0) scale(1.8);
    opacity: 0.85;
  }
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(66, 155, 120, 0.2);
    border-color: rgba(66, 155, 120, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(120, 185, 154, 0.8);
    border-color: rgba(120, 185, 154, 1);
  }
}

/* ==========================================
   4. COMPOSANTS & BOUTONS
=========================================== */
.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: #FFFFFF;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(66, 155, 120, 0.35);
}

.btn-primary:hover {
  background-color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 155, 120, 0.5);
}

.btn-secondary {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-bright);
  color: var(--accent-bright);
}

/* ==========================================
   5. HEADER & NAVIGATION
=========================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 24, 34, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-brands {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.subsidiaries-logos {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.subsidiaries-logos a {
  display: inline-block;
  transition: var(--transition);
}

.subsidiaries-logos a:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.subsidiaries-logos img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.group-tagline {
  font-size: 0.72rem;
  color: var(--text-light-muted);
  text-transform: lowercase;
  letter-spacing: 0.5px;
}

.group-main-logo img {
  height: 80px;
  width: auto;
  transition: var(--transition);
}

.group-main-logo a:hover img {
  opacity: 0.9;
}

header nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

header nav a:not(.btn-primary) {
  color: var(--text-light-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

header nav a:not(.btn-primary):hover,
header nav a.is-active {
  color: var(--accent-bright) !important;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
}

/* ==========================================
   6. SECTION 1 : HERO
=========================================== */
.hero {
  position: relative;
  overflow: hidden;
  background-color: #04140e;
  color: var(--text-light);
  padding: 5rem 2rem;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -5%;
  right: -5%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.85) 0%, rgba(5, 150, 105, 0.3) 50%, transparent 70%);
  filter: blur(35px);
  animation: megaPulse1 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -5%;
  left: -5%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 155, 120, 0.8) 0%, rgba(13, 72, 58, 0.25) 55%, transparent 75%);
  filter: blur(40px);
  animation: megaPulse2 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(120, 185, 154, 0.25) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 2;
}

.hero .hero-content,
.hero .container {
  position: relative;
  z-index: 3;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-logo {
  margin-bottom: 1.5rem;
}

.hero-logo img {
  max-height: 180px;
  width: auto;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(248, 250, 252, 0.08);
  color: var(--accent-bright);
  border: 1px solid rgba(66, 155, 120, 0.4);
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: badgeGlow 4s ease-in-out infinite;
  backdrop-filter: blur(4px);
}

/* Grille 2/3 - 1/3 */
.hero-body-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
}

.hero-text-block h1 {
  font-size: 2.85rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  text-align: left;
}

.hero-text-block h1 strong {
  color: var(--accent-bright);
  text-shadow: 0 0 20px rgba(120, 185, 154, 0.3);
}

.hero-text-block .subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 0;
  text-align: left;
}

.hero-image-block {
  display: flex;
  height: 100%;
}

.hero-image-block {
  position: relative;
  height: 100%;
  min-height: 380px;
}

/* Image principale (Bâtiment) */
.hero-img-main {
  width: 85%;
  height: 80%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
   animation: floatImage 10s ease-in-out infinite;
}

/* Deuxième image décalée en bas à droite (Atelier) */
.hero-img-floating {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: 55%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: floatImage 6s ease-in-out infinite;
  z-index: 2;
}

/* Adaptation Responsive */
@media (max-width: 992px) {
  .hero-image-block {
    min-height: 300px;
    margin-top: 1.5rem;
  }
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

/* ==========================================
   7. SECTIONS COMMUNES & CARTE FEATURE
=========================================== */
section {
  padding: 5rem 0;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 3.5rem auto;
  text-align: center;
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section-dark h2 { color: var(--text-light); text-align: center; }
.section-dark .section-intro { color: var(--text-light-muted); }

.card-feature {
  background: var(--bg-card-dark);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  transition: var(--transition);
  text-align: center;
}

.card-feature:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.card-feature .icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-feature .icon-svg {
  width: 44px;
  height: 44px;
  stroke: var(--accent-bright);
}

.card-feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.card-feature p {
  color: var(--text-light-muted);
  font-size: 0.95rem;
}

/* ==========================================
   8. SECTION FILIALES
=========================================== */
.section-light {
  background-color: var(--bg-light);
}

.section-light h2 { color: var(--primary); text-align: center; }

.filiale-card {
  background: var(--bg-card-light);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.filiale-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.filiale-logo a {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.filiale-logo img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.editor-block {
display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.editor-text {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: lowercase;
}

.stimvente-logo {
  max-height: 58px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.filiale-card h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.filiale-card .tagline {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

.filiale-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.filiale-card .link-out {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ==========================================
   9. SECTION 4 : ANCRAGE LOCAL
=========================================== */
.section-highlight,
#ancrage {
  position: relative;
  overflow: hidden;
  background-color: #eaf7f0;
  border-top: 1px solid rgba(13, 72, 58, 0.12);
  border-bottom: 1px solid rgba(13, 72, 58, 0.12);
  padding: 5rem 0;
}

.section-highlight::before,
#ancrage::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -5%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 72, 58, 0.45) 0%, rgba(66, 155, 120, 0.2) 60%, transparent 75%);
  filter: blur(30px);
  animation: lightPulse1 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.section-highlight::after,
#ancrage::after {
  content: "";
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.5) 0%, rgba(120, 185, 154, 0.15) 60%, transparent 75%);
  filter: blur(35px);
  animation: lightPulse2 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.ancrage-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(13, 72, 58, 0.18) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 2;
}

.section-highlight .container,
#ancrage .container {
  position: relative;
  z-index: 3;
}

.section-highlight h2 { color: var(--primary); }

.ancrage-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 2rem;
}

.ancrage-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-main);
}

.ancrage-map img {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  border-radius: 50%;
}

.inline-icon {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  vertical-align: middle;
  display: inline-block;
  margin-right: 0.4rem;
}

/* ==========================================
   10. FOOTER & FORMULAIRE
=========================================== */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h2 { color: var(--text-light); }
.contact-info p { color: var(--text-light-muted); margin: 1rem 0 2rem; }

.address-box {
  background: var(--bg-card-dark);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.phone-link {
  color: var(--accent-bright);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.phone-link .inline-icon {
  stroke: var(--accent-bright);
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  width: 100%;
}

.contact-info-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-info-content .address-box { flex: 1; }

.contact-logo {
  flex-shrink: 0;
  max-width: 160px;
}

.contact-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background-color: rgba(255, 255, 255, 0.85); 
  color: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #1A1A1A !important;
  opacity: 0.8;
  font-weight: 400;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background-color: #FFFFFF;
  color: #000000 !important;
  border-color: var(--accent);
}

.contact-form button { width: 100%; }

.form-status-msg {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.footer-bottom {
  margin-top: 5rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-light-muted);
  font-size: 0.85rem;
}

/* ==========================================
   11. RESPONSIVE DESIGN
=========================================== */
@media (max-width: 992px) {
  .grid-2, .grid-3, .filiales-grid, .ancrage-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

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

  .hero-text-block h1,
  .hero-text-block .subtitle {
    text-align: center;
  }

  .hero-image-block {
    max-height: 300px;
  }

  .header-brands {
    margin-bottom: 0.5rem;
  }
  
  .subsidiaries-logos img {
    height: 22px;
  }
  
  .group-main-logo img {
    height: 60px;
  }

  .ancrage-grid { text-align: center; }
  .ancrage-map img { max-width: 240px; }
  .hero-text-block h1 { font-size: 2.25rem; }
  .nav-toggle { display: block; }

  .main-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.25rem;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-nav[hidden] { display: none !important; }
}

@media (max-width: 576px) {
  .contact-info-content { flex-direction: column; align-items: flex-start; }
  .contact-logo { max-width: 140px; align-self: center; }
  section { padding: 3.5rem 0; }
  .hero { padding: 4rem 1.5rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after, .badge, .section-highlight::before, .section-highlight::after {
    animation: none;
  }
}