/* --- ROOT VARIABLES & GENERAL STYLES --- */
:root {
  --font-orbitron: 'Orbitron', sans-serif;
  --font-oxanium: 'Oxanium', sans-serif;
  --font-montserrat: 'Montserrat', sans-serif;
  --font-poppins: 'Poppins', sans-serif;

  --color-primary: #007BFF;
  --color-dark: #0a0a0a;
  --color-light: #f4f4f4;
  --color-text: #ffffff;
  --color-gray: #aaaaaa;
  --color-accent: #FFC107;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--color-dark);
  color: var(--color-light);
  font-family: var(--font-poppins);
  line-height: 1.6;
  overflow-x: hidden;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.big-title {
  font-family: var(--font-orbitron);
  font-size: 3rem;
  color: var(--color-text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.small-title {
  font-family: var(--font-montserrat);
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.content-section { padding: 6rem 0; text-align: center; }
.section-subtitle {
    max-width: 800px;
    /* FIX: ALIGN LEFT ON DESKTOP */
    margin: -0.5rem 0 2.5rem 0; /* Removed 'auto' to left-align the block */
    color: var(--color-gray);
    text-align: left; /* NEW: Force text alignment to the left */
}


/* --- HEADER & NAVBAR --- */
#main-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 1rem 0;
  transition: background-color .4s ease, backdrop-filter .4s ease;
}
#main-header.scrolled {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.navbar { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.navbar-left { display: flex; align-items: center; }

.logo-container {
  position: relative; display: block; width: 60px; height: 60px; overflow: hidden; border-radius: 50%;
}
.logo { width: 100%; height: auto; }

/* Sparkle animation */
.logo-container::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%);
  transform-origin: center; opacity: 0;
  animation: sparkle 5s infinite ease-in-out; animation-delay: 2s;
}
@keyframes sparkle {
  0% { transform: translate(-50%, -50%) rotate(45deg) scale(0); opacity: 0; }
  20% { transform: translate(-50%, -50%) rotate(45deg) scale(1); opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

.company-name { font-family: var(--font-oxanium); font-size: 1.5rem; font-weight: 700; margin-left: 1rem; letter-spacing: 1px; }

.nav-links { display: flex; list-style: none; }
.nav-link {
  font-family: var(--font-oxanium);
  color: var(--color-light); text-decoration: none;
  padding: .5rem 1.5rem; font-size: 1.1rem; position: relative; transition: color .3s ease;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background-color: var(--color-accent); transition: width .3s ease;
}
.nav-link:hover { color: var(--color-accent); }
.nav-link:hover::after { width: 60%; }

/* Language Switch Positioning */
.language-switch { font-family: var(--font-oxanium); color: var(--color-light); }
.language-switch .disabled { opacity: .5; cursor: not-allowed; }
.language-switch.mobile-only { display: none; margin-top: 1rem; }
.language-switch.desktop-only { display: block; }

.hamburger { display: none; cursor: pointer; background: transparent; border: 0; }
.hamburger .bar1, .hamburger .bar2, .hamburger .bar3 {
  display: block; width: 25px; height: 3px; margin: 5px 0; background-color: var(--color-light);
  transition: all .3s ease-in-out;
}
.hamburger.toggle .bar1 { transform: rotate(-45deg) translate(-5px, 6px); }
.hamburger.toggle .bar2 { opacity: 0; }
.hamburger.toggle .bar3 { transform: rotate(45deg) translate(-5px, -6px); }

/* --- HERO SLIDER --- */
#hero-slider { height: 100vh; width: 100%; position: relative; overflow: hidden; padding: 0; }
.slider-container { height: 100%; width: 100%; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease-in-out;
}
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide::after {
  content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.5);
}
.slide-content {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2; text-align: center; width: 90%; max-width: 900px;
}
/* Intro overlay */
.intro-overlay {
  position: fixed; inset: 0; background-color: white; z-index: 9999;
  display: flex; flex-direction: column; justify-content: center; align-items: center; color: #000;
  transition: background-color 1s ease, opacity 1s ease 1s;
}
.intro-overlay.dark { background-color: var(--color-dark); color: var(--color-light); }
.intro-overlay.hidden { opacity: 0; pointer-events: none; }
.intro-text { opacity: 0; transition: opacity 1s ease; }
.intro-text.visible { opacity: 1; }

/* Styles pour le logo d'introduction */
.intro-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 2rem;
    /* Correction: Suppression du filtre pour que le logo apparaisse en couleurs */
}

/* --- LEO TRADE SECTION --- */
#acknowledgment .partner-logo-main {
    max-height: 90px;
    margin-bottom: 1.5rem;
    /* LEO TRADE Logo Properties */
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1); 
}

/* --- News Stripe --- */
#news-stripe {
  background-color: var(--color-accent); color: var(--color-dark); text-align: center;
  padding: 1rem; font-family: var(--font-oxanium); font-weight: 700; text-decoration: none; display: block;
  transition: background-color .3s;
}
#news-stripe:hover { background-color: #ffd43b; }

/* --- Parts Section --- */
.parts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem;
}
.part-card { position: relative; overflow: hidden; border-radius: 10px; text-decoration: none; color: var(--color-light); background-color: #222; }
.part-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.part-card:hover img { transform: scale(1.1); }
.part-title {
  position: absolute; bottom: 0; left: 0; width: 100%; padding: 1.5rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  font-family: var(--font-orbitron); font-size: 1.5rem; text-align: center;
}

/* --- WHY CHOOSE US SECTION --- */
#why-us { background-color: #000; }
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}
.why-us-item i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
.why-us-item h4 {
    font-family: var(--font-oxanium);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-light);
}
.why-us-item p {
    color: var(--color-gray);
}


/* --- Background Sections --- */
.background-section {
  min-height: 500px;
  display: flex;
  position: relative;
  overflow: hidden; 
}
.background-section::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.6); z-index: 1; }
/* General Image Wrapper for background image simulation */
.background-image-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.background-image-wrapper .full-bleed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
}

#quote { justify-content: flex-end; align-items: center; }
#quote .background-image-wrapper .full-bleed-image { object-position: right center; }

#commitment { justify-content: center; align-items: center; text-align: center; }
#commitment .text-overlay { max-width: 70%; }

/* Battery Showcase Specific Styles (To position text in the lower half) */
#battery-showcase {
    /* Use flexbox to align content to the bottom */
    align-items: flex-end;
}
#battery-showcase .text-overlay {
    max-width: 100%;
    text-align: center;
    margin-bottom: 4rem;
}

.background-section .text-overlay { position: relative; z-index: 2; padding: 3rem; max-width: 50%; }
#quote .text-overlay { text-align: left; }

.cta-button {
  display: inline-block; background-color: var(--color-accent); color: var(--color-dark); padding: 1rem 2rem;
  border-radius: 5px; text-decoration: none; font-family: var(--font-oxanium); font-weight: 700; margin-top: 1.5rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

/* --- Stats --- */
.stats-container { display: flex; justify-content: space-around; margin-top: 3rem; flex-wrap: wrap; }
.stat-item { padding: 1rem 2rem; }
.stat-number { font-family: var(--font-orbitron); font-size: 4rem; color: var(--color-accent); }
.stat-item p { font-family: var(--font-montserrat); font-size: 1.1rem; color: var(--color-gray); }

/* --- Partners --- */
#partners { padding: 3rem 0; background-color: #0a0a0a; overflow: hidden; }
.partners-scroller { display: block; overflow: hidden; max-width: 100%; }
.partners-track { display: inline-flex; align-items: center; white-space: nowrap; animation: scroll 40s linear infinite; }
.partners-track img { height: 80px; margin: 0 40px; filter: grayscale(100%) brightness(3); opacity: .8; transition: filter .3s ease, opacity .3s ease; }
.partners-track img:hover { filter: grayscale(0%) brightness(1); opacity: 1; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- NEW SECTION: Testimonials --- */
#testimonials { background-color: #111; }
.testimonial-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}
.testimonial-card {
    background-color: #222;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    text-align: left;
    border-left: 5px solid var(--color-accent);
}
.testimonial-card .fa-quote-left {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: block;
}
.quote-text {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--color-light);
}
.client-name {
    font-weight: 700;
    color: var(--color-gray);
    font-family: var(--font-oxanium);
}


/* --- Footer --- */
#main-footer { background-color: #000; padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; padding-bottom: 3rem; }
.footer-title { font-family: var(--font-oxanium); font-size: 1.5rem; color: var(--color-accent); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { line-height: 2; }
.footer-col a { color: var(--color-gray); text-decoration: none; transition: color .3s ease; }
.footer-col a:hover { color: var(--color-light); }
.footer-bottom { border-top: 1px solid #222; text-align: center; padding: 1.5rem 0; color: var(--color-gray); }
.gmap-container {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #333;
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .big-title { font-size: 2.5rem; }
  #quote .text-overlay, #commitment .text-overlay { max-width: 100%; text-align: center; }
  .company-name { display: none; }
  
  /* Language Switch */
  .language-switch.desktop-only { display: none; }
  .language-switch.mobile-only { display: block; }
}
@media (max-width: 768px) {
  .content-section, .background-section .text-overlay { text-align: center; }
  .section-subtitle { 
    padding: 0 1rem;
    /* RE-CENTER FOR MOBILE */
    text-align: center;
    margin: -0.5rem auto 2.5rem auto; 
  }
  
  /* Mobile nav drawer */
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
    background-color: rgba(0,0,0,0.95); backdrop-filter: blur(10px);
    flex-direction: column; justify-content: center; align-items: center;
    transition: right .5s ease-in-out; z-index: 1000;
  }
  .nav-links.active { right: 0; }
  .nav-links li { margin: 1.2rem 0; }
  .hamburger { display: block; z-index: 1001; }
  .navbar { padding: 0 1rem; }
  .logo-container { width: 50px; height: 50px; }

  /* Responsive image positioning */
  .background-image-wrapper .full-bleed-image { 
    object-position: center bottom;
  }
  
  /* Testimonials responsive */
  .testimonial-grid { flex-direction: column; }
  .testimonial-card { max-width: 100%; text-align: center; border-left: none; border-top: 5px solid var(--color-accent); }
  .testimonial-card .fa-quote-left { text-align: center; margin: 0 auto 1rem auto; }
}
@media (max-width: 480px) {
  .big-title { font-size: 2rem; }
  .parts-grid { grid-template-columns: 1fr; }
  /* Stack stats items vertically for tiny screens */
  .stats-container { flex-direction: column; }
  .stat-item { padding: 1rem 0; }
}

/* ===== TIR BATTERIES PAGE ===== */
.tb-hero{
  position: relative; min-height: 100svh; /* full screen incl. mobile UI */
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.tb-hero-media{ position:absolute; inset:0; z-index:0; }
.tb-hero-media img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; }
.tb-hero::before{ content:""; position:absolute; inset:0; background:rgba(0,0,0,.45); z-index:1; }
.tb-hero-overlay{
  position:relative; z-index:2; text-align:center; padding:2rem; max-width: min(900px, 92vw);
}
.tb-intro{ color:#cfcfcf; font-size:1.05rem; max-width: 900px; margin: 0 auto; }

.tb-infocards{
  margin-top:2rem;
  display:grid; gap:1rem;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}
.tb-card{
  background:#121212; border:1px solid #242424; border-radius:14px; padding:1.25rem;
}
.tb-card i{ font-size:1.8rem; color:var(--color-accent); margin-bottom:.5rem; display:block; }
.tb-card h4{ font-family:var(--font-oxanium); margin-bottom:.25rem; }
.tb-card p{ color:#a8a8a8; }

/* Perf bars */
.tb-bars{ margin:1.5rem auto 0; max-width:840px; display:grid; gap:.9rem; }
.tb-bar{ text-align:left; }
.tb-bar > span{ display:block; margin-bottom:.35rem; font-family:var(--font-montserrat); color:#ddd; }
.tb-bar-track{
  width:100%; height:12px; border-radius:999px; background:#1a1a1a; border:1px solid #2b2b2b; overflow:hidden;
}
.tb-bar-fill{
  --val: 70%;
  width:var(--val); height:100%;
  background:linear-gradient(90deg, var(--color-accent), #ffd43b);
  transition:width .9s ease;
}

/* Video section */
.tb-video-section{ padding: 3.5rem 0 2rem; text-align:center; }
.tb-video-wrap{ position:relative; max-width:1100px; margin:0 auto; border-radius:16px; overflow:hidden; border:1px solid #242424; }
.tb-video{
  width:100%; height: clamp(260px, 56.25vw, 620px);
  object-fit:cover; background:#000;
  /* Hide controls visually in browsers that might try to show them */
}
.tb-video::-webkit-media-controls{ display:none !important; }
.tb-video::-moz-media-controls{ display:none !important; }

.tb-review-overlay{
  position:absolute; inset:0; display:grid; place-items:center;
  background:linear-gradient(180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.85) 70%);
  opacity:0; pointer-events:none; transition:opacity .35s ease;
}
.tb-review-overlay[aria-hidden="false"]{ opacity:1; pointer-events:auto; }
.tb-review-inner{ text-align:center; max-width:min(820px, 92vw); padding:2rem; }
.tb-video-note{ color:#8f8f8f; margin-top:.85rem; font-size:.9rem; }

/* Models grid */
.tb-models-grid{
  margin-top:2rem;
  display:grid; gap:1rem;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}
.tb-model{
  background:#121212; border:1px solid #242424; border-radius:14px; padding:1.25rem; text-align:left;
}
.tb-model h4{ font-family:var(--font-oxanium); margin-bottom:.25rem; }

/* Simple accordion */
.tb-accordion{ max-width:900px; margin:1.5rem auto 0; }
.tb-acc-item{
  width:100%; text-align:left; background:#101010; color:#fff;
  border:1px solid #242424; border-radius:12px; padding:1rem 1.25rem; margin-bottom:.75rem;
  display:flex; align-items:center; justify-content:space-between; cursor:pointer;
  font-family:var(--font-oxanium);
}
.tb-acc-item i{ transition: transform .25s ease; }
.tb-acc-item.active i{ transform: rotate(180deg); }
.tb-acc-panel{
  display:none; padding: .25rem 1rem 1rem 1.25rem; color:#cfcfcf; border-left:1px solid #242424; border-right:1px solid #242424; border-bottom:1px solid #242424; border-radius:0 0 12px 12px;
}

@media (max-width: 768px){
  .tb-intro{ padding: 0 .5rem; }
}

/*
* NEW MOBILE FIX FOR VIDEO OVERLAY (Copied from style2.css)
* This block ensures video overlay content is compressed and centered on small devices.
*/
@media (max-width: 480px) {
    /* === FINAL FIX FOR VIDEO OVERLAY - Maximized Compression === */
    .tb-review-inner {
        /* 1. Centering is retained */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        
        /* 2. Ensure the container itself doesn't overflow */
        max-width: 95vw !important;
        /* ************* KEY FIX: MINIMAL vertical padding ************* */
        padding: 0.75rem 0.5rem !important; /* Reduced vertical padding further */
    }

    /* 3. Control the text inside the container */
    .tb-review-inner .big-title,
    .tb-review-inner p {
        word-break: break-word;
        white-space: normal;
        /* Remove margin-bottom from big-title to reduce space */
        margin-bottom: 0.5rem !important;
    }

    .tb-review-inner .big-title {
        font-size: 1.6rem !important; /* Smallest practical size for the title */
    }

    .tb-review-inner p {
        font-size: 0.9rem !important; /* Slightly smaller body text */
    }
    
    /* 4. Ensure the button has NO top margin, using padding or a small fixed margin */
    .cta-button {
        margin-top: 0.75rem !important; /* Minimum necessary margin */
        padding: 0.7rem 1.4rem !important; /* Optionally shrink button size slightly */
    }
}
/* --- FOOTER SOCIAL ICONS (Added for user request) --- */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-start; /* Aligns left in the footer column */
}

.footer-social a {
    color: var(--color-light); /* White/light gray color */
    background-color: #222; /* Dark background for professional look */
    border: 1px solid #333;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.footer-social a i {
    font-size: 1.1rem; /* Small and professional size */
}

.footer-social a:hover {
    color: var(--color-dark); /* Dark text on hover */
    background-color: var(--color-accent); /* Yellow/Gold accent color on hover */
    border-color: var(--color-accent);
}
