/* =====================================================================
   KAEX Motors — Feuille de style
   Palette reprise du logo : navy / rouge / blanc + bleus d'accent.
   Approche : mobile-first, responsive, épurée.
   Organisation :
     1. Variables & reset
     2. Base & typographie
     3. Utilitaires (container, boutons, sections)
     4. Header / navigation
     5. Hero
     6. Sections (À propos, Véhicules, Export, Contact)
     7. Footer
     8. Responsive (tablette / desktop)
   ===================================================================== */

/* ---------- 1. Variables & reset ---------- */
:root {
  --navy: #0B1E6B;         /* couleur principale (texte, header) */
  --navy-deep: #081550;    /* variante foncée */
  --red: #C0392B;          /* accent rouge du logo */
  --blue: #1B39D4;         /* bleu vif du logo */
  --blue-light: #5BA4D6;   /* bleu clair du logo */
  --white: #ffffff;
  --gray-50: #f6f8fc;      /* fonds de section clairs */
  --gray-100: #eef2f9;
  --gray-300: #d3dced;
  --gray-500: #6b7488;
  --gray-700: #333a4d;
  --shadow: 0 10px 30px rgba(11, 30, 107, 0.10);
  --shadow-sm: 0 4px 14px rgba(11, 30, 107, 0.08);
  --radius: 14px;
  --max-width: 1160px;
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-700);
  line-height: 1.65;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- 2. Base & typographie ---------- */
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

/* ---------- 3. Utilitaires ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--gray-50); }

.section__head { max-width: 720px; margin-bottom: 40px; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.lead { font-size: 1.08rem; color: var(--gray-500); }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: var(--white); box-shadow: 0 8px 20px rgba(192,57,43,.30); }
.btn--primary:hover { background: #a83226; }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-deep); }

/* ---------- 4. Header / navigation ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__logo img { height: 46px; width: auto; }

.nav__menu {
  list-style: none;
  display: none;                 /* caché en mobile, ouvert via burger */
  gap: 26px;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--navy);
  padding: 6px 0;
  position: relative;
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .2s ease;
}
.nav__menu a:hover::after { width: 100%; }

.nav__right { display: flex; align-items: center; gap: 14px; }

/* Sélecteur de langue FR / EN */
.lang {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: 30px;
  overflow: hidden;
}
.lang button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gray-500);
  cursor: pointer;
}
.lang button.is-active { background: var(--navy); color: var(--white); }

/* Bouton burger (mobile) */
.burger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  width: 24px; height: 2px;
  background: var(--navy);
  transition: transform .2s ease, opacity .2s ease;
}
.nav.is-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .burger span:nth-child(2) { opacity: 0; }
.nav.is-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(8,21,80,.92) 0%, rgba(11,30,107,.86) 55%, rgba(27,57,212,.80) 100%),
    url("../assets/hero.jpg") center/cover no-repeat;
  padding: 90px 0 100px;
}
.hero__banner {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 22px;
}
.hero h1 { color: #fff; max-width: 14ch; }
.hero__subtitle { font-size: 1.2rem; max-width: 52ch; color: rgba(255,255,255,.9); margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero__stat strong { display: block; font-size: 1.7rem; color: #fff; }
.hero__stat span { font-size: 0.9rem; color: rgba(255,255,255,.75); }

/* ---------- 6. Sections ---------- */

/* À propos */
.about__grid { display: grid; gap: 40px; }
.about__cards { display: grid; gap: 18px; }
.about__card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.about__card h3 { margin-bottom: 4px; }
.about__card p { margin: 0; color: var(--gray-500); font-size: 0.96rem; }

/* Véhicules */
.cars__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}
.car {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.car:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* Zone image : le placeholder (dégradé) est remplacé par ta photo dès qu'elle est fournie */
.car__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.car__media img { width: 100%; height: 100%; object-fit: cover; }
.car__media .car__ph {
  color: rgba(255,255,255,.9);
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  padding: 10px;
}
.car__tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 12px;
  border-radius: 20px;
}
.car__body { padding: 18px 20px 22px; }
.car__body h3 { margin-bottom: 4px; }
.car__body p { margin: 0; color: var(--gray-500); font-size: 0.92rem; }
.cars__note {
  margin-top: 30px;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* Export / services */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}
.service {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.service__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--gray-50);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.service__icon svg { width: 26px; height: 26px; stroke: var(--red); }
.service h3 { margin-bottom: 6px; }
.service p { margin: 0; color: var(--gray-500); font-size: 0.94rem; }

/* Contact */
.contact__grid { display: grid; gap: 40px; }
.contact__info p { color: var(--gray-500); }
.contact__list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact__list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--gray-100);
}
.contact__list li:last-child { border-bottom: 1px solid var(--gray-100); }
.contact__list svg { width: 22px; height: 22px; stroke: var(--red); flex-shrink: 0; margin-top: 3px; }
.contact__list strong { color: var(--navy); display: block; font-size: 0.95rem; }
.contact__list span { color: var(--gray-500); font-size: 0.92rem; }

.form { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.form__row { margin-bottom: 16px; }
.form label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--navy); margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  font: inherit;
  color: var(--gray-700);
  background: var(--gray-50);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue-light); border-color: var(--blue-light); background: #fff; }
.form textarea { resize: vertical; min-height: 120px; }
.form .btn { width: 100%; border: 0; }
.form__hint { font-size: 0.82rem; color: var(--gray-500); margin: 12px 0 0; text-align: center; }

/* ---------- 7. Footer ---------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.8); padding: 54px 0 26px; }
.footer__top { display: grid; gap: 30px; margin-bottom: 34px; }
.footer__brand img { height: 46px; margin-bottom: 14px; }
.footer__brand p { font-size: 0.9rem; max-width: 40ch; color: rgba(255,255,255,.7); }
.footer h4 { color: #fff; font-size: 0.95rem; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; font-size: 0.92rem; }
.footer ul a:hover { color: #fff; }
.footer__legal {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 20px;
  font-size: 0.82rem;
  color: rgba(255,255,255,.6);
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}

/* i18n : le texte est remplacé par JS (attributs data-en / data-fr).
   Aucun style particulier nécessaire ici. */

/* ---------- 8. Responsive ---------- */
@media (min-width: 720px) {
  .about__grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .about__cards { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer__top { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .nav__menu { display: flex; }          /* menu horizontal en desktop */
  .burger { display: none; }
}

/* Menu mobile ouvert */
@media (max-width: 899px) {
  .nav__menu {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 18px;
    box-shadow: var(--shadow);
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav__menu li { border-bottom: 1px solid var(--gray-100); }
  .nav__menu a { display: block; padding: 14px 0; }
}
