/* =============================================================
   styles.css — Acropelle
   Composants partagés par toutes les pages
   Étape 6A — Extraction CSS commun
   ============================================================= */

/* ── 1. Variables ─────────────────────────────────────────── */
:root {
  --bg:           #FFFFFF;
  --bg-deep:      #F4F8FE;
  --fg:           #1F1547;
  --fg-soft:      #3D3470;
  --accent:       #FF6800;
  --accent-hover: #D45600;
  --accent-warm:  #FF8633;
  --blue:         #62BBFF;
  --blue-soft:    #D7ECFF;
  --mute:         #6F6989;
  --line:         #E6E4F0;
  --deep:         #1F1547;
  --deep-soft:    #2F2562;
}

/* ── 2. Reset minimal ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── 3. Typographie ───────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Saira', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
  color: var(--fg);
}

h1 { font-size: clamp(48px, 7vw, 84px); }
h2 { font-size: clamp(36px, 5vw, 56px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }

p {
  color: var(--fg-soft);
  line-height: 1.65;
}

/* Mot accentué en italique dans les titres */
.accent {
  color: var(--accent-warm);
  font-style: italic;
  font-weight: 400;
}

/* ── 4. Layout ────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 100px 0;
}

/* ── 5. Navigation ────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s ease;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* logo nav — couvre .nav-logo img (a-propos, acrodrill, mentions) ET .logo-img (flotte, acromeca, index) */
.nav-logo img,
.logo-img {
  height: 96px;
  width: auto;
  transition: height 0.3s ease;
}

nav.shrunk .nav-logo img,
nav.shrunk .logo-img {
  height: 60px;
}

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

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links .nav-cta a {
  background: var(--fg);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: 100px;
  transition: background 0.2s;
}

.nav-links .nav-cta a:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile overlay */
.mobile-menu {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--fg);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu ul li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu ul li:first-child {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu ul li a {
  display: block;
  padding: 22px 48px;
  font-family: 'Saira', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--bg);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.mobile-menu ul li a:hover {
  color: var(--accent-warm);
}

.mobile-menu-contact {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mobile-menu-contact a {
  color: var(--mute);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.mobile-menu-contact a:hover {
  color: var(--accent-warm);
}

/* ── 6. Footer ────────────────────────────────────────────── */
footer {
  background: var(--fg);
  color: var(--bg);
  padding: 72px 0 40px;
}

.footer-grid,
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* footer logo fond sombre (.footer-brand img) — acrodrill, mentions-legales */
/* footer logo fond sombre (.footer-logo-img) — acromeca, flotte */
.footer-brand img,
.footer-logo-img {
  height: 170px;
  width: auto;
  margin-bottom: 16px;
  display: block;
}

.footer-brand p {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--bg);
}

/* Texte non-cliquable dans le footer (prestations) */
.footer-static {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  cursor: default;
}

.footer-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 48px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: rgba(255,255,255,0.35);
  font-size: 13px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: rgba(255,255,255,0.7);
}

/* ── 7. Boutons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fg);
  color: var(--bg);
  padding: 18px 36px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--fg);
  padding: 18px 36px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: var(--fg);
  color: var(--fg);
  transform: translateY(-1px);
}

/* Variante sur fond sombre */
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.8);
  padding: 16px 32px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.25);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}

.btn-ghost-light:hover {
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

/* ── 8. Composants ────────────────────────────────────────── */

/* Eyebrow — numérotation sections */
.section-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* Cartes capacités / services / machines */
.cap-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
  transition: background 0.2s, border-color 0.2s;
}

.cap-card:hover {
  background: var(--bg-deep);
  border-color: var(--blue);
}

.cap-card .card-icon {
  font-size: 28px;
  margin-bottom: 16px;
  line-height: 1;
}

.cap-card .card-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.cap-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.cap-card p {
  font-size: 15px;
  color: var(--mute);
  line-height: 1.6;
}

/* Chiffres stat */
.stat {
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}

.stat .stat-num {
  font-family: 'Saira', sans-serif;
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.stat .stat-label {
  font-size: 14px;
  color: var(--mute);
  margin-top: 6px;
}

/* Séparateur décoratif */
.section-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 24px 0;
}

/* Points décoratifs */
.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 8px;
}

/* ── 9. Animation reveal ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Délais en cascade pour les grilles */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── 10. Mobile ───────────────────────────────────────────── */
@media (max-width: 900px) {

  .container {
    padding: 0 20px;
  }

  section {
    padding: 70px 0;
  }

  /* Nav */
  .nav-inner {
    padding: 12px 20px;
  }

  .nav-logo img,
  .logo-img {
    height: 64px;
  }

  nav.shrunk .nav-logo img,
  nav.shrunk .logo-img {
    height: 44px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* .mobile-menu déjà display:flex — visibility gérée par .open */

  /* Footer */
  .footer-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    padding: 24px 20px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Boutons */
  .btn-primary,
  .btn-ghost,
  .btn-ghost-light {
    padding: 16px 28px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {

  .footer-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ── 11. Nav hide-on-scroll + Back to top (étape 6E) ──────── */

/* Liseré orange en haut de la nav */
nav {
  border-top: 4px solid var(--accent);
  /* Transition étendue pour inclure transform et opacity */
  transition: padding 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Ancres : éviter que les titres se cachent sous la nav sticky */
html {
  scroll-padding-top: 90px;
}

/* Bouton retour en haut */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, box-shadow 0.2s;
  z-index: 150;
  box-shadow: 0 4px 16px rgba(31, 21, 71, 0.22);
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 4px 16px rgba(31, 21, 71, 0.22), 0 0 0 5px var(--blue);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ── 12. Signature auteur (étape 6G) ─────────────────────── */
body > footer::after {
  content: "Site conçu par L. Guerrini";
  display: block;
  margin-top: 28px;
  padding-top: 18px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.4;
  border-top: 1px solid rgba(255,255,255,0.08);
}
