/* ============================================================
   ERMANCE TECH – Custom styles (Bootstrap 5 override + custom)
   ============================================================ */

/* ---------- Variables ---------- */
:root {  --primary:       #df1c3d; /* old c0392b */
  --primary-dark:  #bb1732;   /* old a93226 */
  --accent:        #e74c3c;
  --dark:          #111827;
  --muted:         #6b7280;
  --light-bg:      #f8f9fb;
  --card-radius:   16px;
  --transition:    .3s ease;
  --font:          'Inter', system-ui, sans-serif;

  /* Override Bootstrap */
  --bs-primary:        #c0392b;
  --bs-primary-rgb:    192, 57, 43;
  --bs-link-color:     #c0392b;
  --bs-link-hover-color: #a93226;
}

/* ---------- Global ---------- */
html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* empêche tout débordement horizontal */
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  
}

body {
  font-family: var(--font);
  font-size: 1.1rem;   /* légèrement plus grand que 1rem */
  line-height: 1.75;
  color: var(--dark);
  background: #fff;
  overflow-x: hidden;
}



/* ---------- Navbar ---------- */
#mainNav {
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 20px 0;
  width: 100%;
  left: 0;
  right: 0;
}

#mainNav.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  padding: 12px 0;
}

/* Logo navbar */
.navbar-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: height var(--transition);
}

#mainNav.scrolled .navbar-logo {
  height: 38px;
}

#mainNav .navbar-brand {
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: .5px;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

#mainNav.scrolled .navbar-brand { color: var(--dark); }

.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

#mainNav .nav-link {
  color: rgba(255,255,255,.95);
  font-size: .95rem;
  font-weight: 600;
  padding: 6px 10px;
  transition: color var(--transition);
}

#mainNav.scrolled .nav-link { color: var(--dark); font-weight: 600; }

#mainNav .nav-link:hover,
#mainNav .nav-link.active { color: var(--primary) !important; }

.btn-nav {
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 50px;
  padding: 6px 20px !important;
}

#mainNav.scrolled .btn-nav {
  border-color: var(--primary);
  color: var(--primary) !important;
}

#mainNav .navbar-toggler { border-color: rgba(255,255,255,.5); }
#mainNav.scrolled .navbar-toggler { border-color: #ddd; }
#mainNav .navbar-toggler-icon { filter: invert(1); }
#mainNav.scrolled .navbar-toggler-icon { filter: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  /* Remplacez par votre vraie image : url('../img/hero.jpg') */
  background: url('../img/hero-ARRI500-ermance-technologie.jpg') center/cover no-repeat;
  position: relative;

}

.hero-overlay {
  position: absolute;
  inset: 0;  background: linear-gradient(160deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.2) 100%);
}

.hero-eyebrow {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 95%;
}

.sous-titre {
  font-family: 'Bebas Neue', sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.4;
  max-width: 580px;
  color: var(--primary);

}


/* Logo hero — version blanche/claire sur fond sombre */
.hero-logo {
  display: block;
  margin: 0 auto;
  max-width: 520px;
  width: 85%;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 4px 24px rgba(0,0,0,.4));
}

@media (max-width: 576px) {
  .hero-logo { max-width: 300px; }
}

.hero-logo-2 {
  display: block;
  max-width: 520px;
  width: 33%;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 4px 24px rgba(0,0,0,.4));
}

/* Tagline hero */
.hero-tagline {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 300;
  line-height: 1.45;
  max-width: 560px;
  opacity: .95;
  letter-spacing: .3px;
}

/* ============================================================
   ANIMATIONS – Hero fade-in au chargement
   ============================================================ */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-anim {
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(.22,.61,.36,1) forwards;
}

.hero-anim-1 { animation-delay: 0.1s; }
.hero-anim-2 { animation-delay: 0.35s; }
.hero-anim-3 { animation-delay: 0.6s; }
.hero-anim-4 { animation-delay: 0.85s; }
.hero-anim-5 { animation-delay: 1.1s; }

.hero-overlay {
  animation: heroFadeIn 1s ease forwards;
}

/* ---------- Sections ---------- */
.section-pad { padding: 90px 0; }

.section-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid var(--primary);
  border-radius:  50px;
  padding: 4px 16px 4px 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

/* ---------- Stats ---------- */
.stat-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--card-radius);
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.11);
  border-color: rgba(192,57,43,.25);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: .9rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Services ---------- */
.service-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--card-radius);
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.11);
  border-color: rgba(192,57,43,.25);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(13,110,253,.1);
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0 auto;
}

/* ---------- Démo vidéo ---------- */
.demo-video-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.demo-video-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  background: #000;
}

.demo-video-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Cadre décoratif autour du player */
.demo-video-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 2px solid rgba(192,57,43,.2);
  pointer-events: none;
  z-index: 1;
}

/* Badge "Voir la démo" */
.demo-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .5px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(192,57,43,.35);
}

/* ---------- Projects ---------- */
.project-card {
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition);
  background: #fff;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.project-thumb {
  position: relative;
  overflow: hidden;
  height: 210px;
  background: var(--light-bg);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.project-card:hover .project-thumb img { transform: scale(1.06); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,110,253,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-body { padding: 20px; }

.project-tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---------- Team ---------- */
.team-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  border-radius: var(--card-radius);
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.11);
  border-color: rgba(192,57,43,.25);
}

.team-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(192,57,43,.2);
  background: #e9ecef;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--muted);
  font-size: 1rem;
  margin: 0 4px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.team-socials a:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- Contact ---------- */
.contact-info li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .95rem;
}

.contact-info li i {
  font-size: 1.1rem;
  color: var(--primary);
  width: 20px;
  flex-shrink: 0;
}

.contact-form .form-control {
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  padding: 12px 16px;
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.12);
}

.contact-form .form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
}

.site-footer .fw-bold { color: #fff; }

.footer-link {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover { color: #fff; }

/* ---------- Back to top ---------- */
.btn-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(13,110,253,.4);
  cursor: pointer;
  z-index: 1000;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-top.show { display: flex; }
.btn-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ---------- Utilities ---------- */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn:active, .btn:focus, .btn:active:focus, .btn-primary:active, .btn-primary:focus, .btn-primary:active:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* About image wrap */
.about-img-wrap {
  position: relative;
}

.about-img-wrap::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(13,110,253,.08);
  bottom: -30px;
  left: -30px;
  z-index: 0;
}

.about-img-wrap img { position: relative; z-index: 1; }

/* Logo about section */
.about-logo {
  width: auto;
  max-height: 80px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
@media (max-width: 576px) {
  .about-logo {
    max-width: 100px;
    max-height: 56px;
  }
}

/* Picto drone contact */
.contact-drone {
  display: flex;
  justify-content: center;
}

.contact-drone-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  opacity: .85;
  transition: opacity var(--transition), transform var(--transition);
}

.contact-drone-img:hover {
  opacity: 1;
  transform: translateY(-4px) rotate(5deg);
}

/* ---------- Map ---------- */
.map-section {
  padding: 90px 0;
  background: #fff;
}

.map-address {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--light-bg);
  border: 1px solid #e9ecef;
  border-radius: 50px;
  padding: 8px 20px;
  font-size: .9rem;
  color: var(--muted);
  margin-top: 4px;
}

.map-address i { color: var(--primary); font-size: 1rem; }

.map-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: 460px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,.13);
  border: 1px solid #e9ecef;
  position: relative;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .map-wrapper { height: 320px; border-radius: 12px; }
}

/* ---------- Partners ---------- */
.partners-section {
  background: #f1f1f1;
  padding: 48px 0 72px 0;
  overflow: hidden; /* isole le débordement du bandeau */
  margin-bottom: 60px;
  max-width: 100vw;
}

.partners-track {
  overflow: hidden;
  position: relative;
}

/* Masques de fondu sur les bords */
.partners-track::before,
.partners-track::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.partners-track::before {
  left: 0;
  background: linear-gradient(to right, #f1f1f1, transparent);
}
.partners-track::after {
  right: 0;
  background: linear-gradient(to left, #f1f1f1, transparent);
}

.partners-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: scroll-partners 18s linear infinite;
}

.partners-track:hover .partners-inner {
  animation-play-state: paused;
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 12px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow var(--transition), transform var(--transition);
}

.partner-item:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  transform: translateY(-3px);
}

.partner-item img {
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  
  transition: filter var(--transition);
}

.partner-item:hover img {
  filter: grayscale(0%) opacity(1);
}

@keyframes scroll-partners {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  #navMenu {
    background: #fff;
    border-radius: 12px;
    margin-top: 10px;
    padding: 12px;
    width: 100%;
    max-width: 100%;
  }
  #mainNav .nav-link { color: var(--dark) !important; }
  #mainNav .container { flex-wrap: wrap; }
  .hero { min-height: 90vh; }
  .section-pad { padding: 60px 0; }
}

@media (max-width: 576px) {
  .hero { min-height: 80vh; }
  .section-pad { padding: 48px 0; }
}

/* ============================================================
   ANIMATIONS – Fade-in au scroll
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up:nth-child(2) { transition-delay: .1s; }
.fade-up:nth-child(3) { transition-delay: .2s; }
.fade-up:nth-child(4) { transition-delay: .3s; }
.fade-up:nth-child(5) { transition-delay: .4s; }
.fade-up:nth-child(6) { transition-delay: .5s; }
.fade-up:nth-child(7) { transition-delay: .15s; }
.fade-up:nth-child(8) { transition-delay: .25s; }
.fade-up:nth-child(9) { transition-delay: .35s; }

/* ============================================================
   BANDEAU CHIFFRES CLES
   ============================================================ */
.stats-band {
  background: var(--dark);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.stats-band::before,
.stats-band::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.stats-band::before { top: 0; }
.stats-band::after  { bottom: 0; }

.stat-band-item {
  text-align: center;
  padding: 16px 8px;
}
.stat-band-number {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-band-suffix {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--primary);
}
.stat-band-label {
  display: block;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}
.stat-band-item + .stat-band-item {
  border-left: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 575px) {
  .stat-band-item + .stat-band-item {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.1);
  }
}
