/* Thème Dynastie Drive School - Corrigé et Optimisé */

/* Variables CSS */
:root {
  --primary-color: #2872fa;
  --primary-dark: #1559ed;
  --text-color: #515455;
  --dark-bg: #080C0E;
  --light-bg: #e1e8ed;
  --lighter-bg: #f2f5f7;
  --white: #ffffff;
  --accent: #CBE1E4;
  --container-width: 1200px;
  --border-radius: 30px;
  --transition: all 0.3s ease;
}

/* Reset et base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(8, 12, 14, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.h-in {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo:hover {
  transform: translateY(-2px);
}

.logo-box {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.logo-box span {
  border-radius: 3px;
  display: block;
  background: rgba(255, 255, 255, 0.15);
}

.logo-box span:nth-child(1) {
  border-radius: 8px 3px 3px 3px;
}

.logo-box span:nth-child(4) {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px 3px 3px 8px;
}

.logo-name {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
}

.btn-nav {
  background: var(--white) !important;
  color: var(--dark-bg) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600 !important;
  font-size: 13px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition) !important;
  text-decoration: none !important;
}

.btn-nav:hover {
  background: var(--primary-dark) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 114, 250, 0.3);
}

.btn-nav svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* Hero sections */
.hero {
  background: var(--dark-bg);
  padding: 100px 20px 20px;
  overflow: hidden;
  position: relative;
}

.hero-in {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
}

.hero-l {
  flex: 0 0 65%;
}

.pill {
  display: inline-flex;
  align-items: center;
  background: var(--lighter-bg);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-bg);
  margin-bottom: 28px;
}

.hero h1 {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 800;
  font-size: 70px;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 32px;
}

.btn-wh {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--dark-bg);
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
}

.btn-wh:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 114, 250, 0.3);
}

.btn-wh svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.btn-gh {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-gh:hover {
  color: var(--white);
}

.btn-gh svg {
  width: 10px;
  height: 10px;
}

/* Footer */
.footer-main {
  background: var(--dark-bg);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-brand h3 {
  color: var(--white);
  font-family: 'Funnel Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-column h4 {
  color: var(--white);
  font-family: 'Funnel Display', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-column a,
.footer-column p {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: var(--transition);
  line-height: 1.6;
}

.footer-column a:hover {
  color: var(--white);
}

/* Formulaire de contact */
.ct-contact-form {
  --theme-form-text-initial-color: rgba(255, 255, 255, 0.5);
  --theme-form-text-focus-color: rgba(255, 255, 255, 1);
  --theme-form-field-border-initial-color: transparent;
  --theme-form-field-background-initial-color: #121b1f;
  --theme-form-field-background-focus-color: #121b1f;
}

.ct-contact-form .ff-btn-submit {
  width: 100%;
  --theme-button-text-initial-color: var(--dark-bg);
  --theme-button-background-initial-color: var(--white);
}

.ct-contact-form .ff-el-form-control {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  transition: var(--transition);
  margin-bottom: 18px;
  height: 48px;
}

.ct-contact-form .ff-el-form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.ct-contact-form .ff-el-form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(40, 114, 250, 0.2);
}

.ct-contact-form .ff-el-input--label {
  display: block !important;
  margin-bottom: 8px !important;
  color: var(--white) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
}

.ct-contact-form .ff-btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 114, 250, 0.3);
}

/* Responsive */
@media (max-width: 999px) {
  .hero h1 {
    font-size: 50px;
  }
  
  .hero-in {
    flex-direction: column;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 689px) {
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 170px 20px 20px;
  }
  
  .hero h1 {
    font-size: 38px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .cta-row {
    flex-direction: column;
    gap: 20px;
  }
}

/* Animations et optimisations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-l > * {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-l > *:nth-child(1) { animation-delay: 0.1s; }
.hero-l > *:nth-child(2) { animation-delay: 0.2s; }
.hero-l > *:nth-child(3) { animation-delay: 0.3s; }
.hero-l > *:nth-child(4) { animation-delay: 0.4s; }

/* Stabilisation navigation */
.nav-links a {
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  will-change: color;
}

.nav-links a:focus { 
  outline: none; 
}

.nav-links a:active { 
  transform: translateZ(0); 
}
