/* ==========================================================================
   Trans'as — feuille de style
   Tokens issus de la charte graphique (Developpement\transas\charte graphique)
   ========================================================================== */

:root {
  --ink: #262B38;          /* marine encre — texte, fonds sombres */
  --accent: #ED6A2F;       /* orange colis — accents uniquement (≤10% d'une surface) */
  --accent-hover: #C9541D;
  --surface: #F4F4F6;      /* gris brume — fonds neutres */
  --white: #FFFFFF;
  --text-2: #4B5261;       /* texte secondaire */
  --text-muted: #6B7280;
  --caption: #9AA0AC;
  --border: #E3E5EA;

  --font-title: 'Archivo', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --container: 1140px;
  --radius: 14px;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 24px; }
h3 { font-size: 1.15rem; margin-bottom: 10px; }

p { color: var(--text-2); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.section { padding: 96px 0; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.accent { color: var(--accent); }

/* ==========================================================================
   Logo — spec charte : colis 0.375em, radius 0.0625em, rotation 10°,
   translateY(-0.6875em), scotch 0.078em blanc 55 %
   ========================================================================== */

.logo {
  display: flex;
  align-items: baseline;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }

.logo-box {
  display: inline-flex;
  width: 0.375em;
  height: 0.375em;
  background: var(--accent);
  border-radius: 0.0625em;
  transform: rotate(10deg) translateY(-0.6875em);
  margin: 0 0.0625em;
  position: relative;
  overflow: hidden;
  flex: none;
}

.logo-tape {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.078em;
  height: 100%;
  background: var(--white);
  opacity: 0.55;
  transform: translateX(-50%);
}

.logo-dark { color: var(--white); }
.logo-dark:hover { color: var(--white); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(38, 43, 56, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
.main-nav a:hover { color: var(--accent); }

.nav-cta {
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white) !important;
  font-weight: 600;
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  min-height: calc(100vh - var(--header-h));
  /* svh : hauteur stable sur mobile malgré la barre d'adresse (les anciens navigateurs gardent la ligne vh) */
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  padding-bottom: 120px;
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 { color: var(--white); margin: 8px 0 24px; }

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* Décor : colis flottants (angle 10° fixe, seule l'élévation est animée) */
.hero-decor, .eco-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.parcel {
  position: absolute;
  display: block;
  background: var(--accent);
  border-radius: 19%;
  transform: rotate(10deg);
  overflow: hidden;
  opacity: 0.9;
  animation: float 7s ease-in-out infinite;
}
.parcel .tape {
  position: absolute;
  left: 50%;
  top: 0;
  width: 20%;
  height: 100%;
  background: var(--white);
  opacity: 0.55;
  transform: translateX(-50%);
}

.hero-decor .p1 { width: 54px; height: 54px; top: 18%; right: 12%; animation-duration: 8s; }
.hero-decor .p2 { width: 30px; height: 30px; top: 38%; right: 26%; animation-duration: 6s; animation-delay: -2s; opacity: 0.55; }
.hero-decor .p3 { width: 20px; height: 20px; top: 62%; right: 8%;  animation-duration: 9s; animation-delay: -4s; opacity: 0.4; }
.hero-decor .p4 { width: 38px; height: 38px; top: 74%; right: 34%; animation-duration: 7s; animation-delay: -1s; opacity: 0.7; }
.hero-decor .p5 { width: 16px; height: 16px; top: 24%; right: 42%; animation-duration: 10s; animation-delay: -5s; opacity: 0.35; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -22px; }
}

/* Trajet en pointillés qui défile */
.route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.14);
}
.route path { animation: dash 30s linear infinite; }

@keyframes dash {
  to { stroke-dashoffset: -720; }
}

/* Indicateur de scroll */
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
}
.hero-scroll span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ==========================================================================
   Boutons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--white); }

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ==========================================================================
   Bande de confiance
   ========================================================================== */

.trust {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.trust-figure {
  display: block;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.trust-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* ==========================================================================
   Cartes (services, engagements)
   ========================================================================== */

.services { background: var(--surface); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.cards-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(38, 43, 56, 0.10);
}

.card-num {
  display: block;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 18px;
}

.engagements { background: var(--white); }
.engagements .card { background: var(--surface); border-color: transparent; }

/* ==========================================================================
   Flotte / éco (bande sombre)
   ========================================================================== */

.eco {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.eco h2 { color: var(--white); }
.eco p { color: rgba(255, 255, 255, 0.78); }

.eco-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
}

.eco-list {
  list-style: none;
  margin-top: 28px;
}
.eco-list li {
  position: relative;
  padding: 10px 0 10px 34px;
  color: rgba(255, 255, 255, 0.85);
}
.eco-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eco-visual { display: flex; justify-content: center; }

.eco-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  width: 220px;
  height: 220px;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.3;
  animation: pulse-ring 4s ease-in-out infinite;
}
.eco-badge svg { color: var(--accent); }

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.eco-decor .p1 { width: 44px; height: 44px; top: 14%; right: 6%; opacity: 0.35; animation-duration: 9s; }
.eco-decor .p2 { width: 24px; height: 24px; bottom: 16%; left: 4%; top: auto; opacity: 0.25; animation-duration: 7s; animation-delay: -3s; }

/* ==========================================================================
   Recrutement
   ========================================================================== */

.recrutement { background: var(--surface); }

.recrutement-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: center;
}

.recrutement-cta { display: flex; justify-content: flex-end; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-address {
  font-style: normal;
  color: var(--text-2);
  margin-top: 28px;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  line-height: 1.7;
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px;
}

.form-row { margin-bottom: 20px; }

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.optional { font-weight: 400; color: var(--caption); }

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-note {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Honeypot anti-spam : hors écran, invisible pour les humains */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ==========================================================================
   Page légale
   ========================================================================== */

.legal-content { max-width: 760px; }

.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 24px;
}

.legal h2 {
  font-size: 1.2rem;
  margin: 36px 0 10px;
}

.legal p { margin-bottom: 12px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-legal {
  color: var(--caption);
  font-size: 0.85rem;
  text-align: right;
  line-height: 1.7;
}

.footer-legal a {
  color: var(--caption);
  text-decoration: underline;
}
.footer-legal a:hover { color: var(--white); }

/* ==========================================================================
   Animations d'apparition
   ========================================================================== */

/* Ne masque les éléments que si JS est actif (classe posée par app.js) */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* Cascade dans les grilles */
.cards .reveal:nth-child(2), .trust-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.cards .reveal:nth-child(3), .trust-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.cards .reveal:nth-child(4), .trust-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .parcel, .route path, .eco-badge, .hero-scroll span { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .cards, .cards-4 { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .eco-inner, .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .recrutement-inner { grid-template-columns: 1fr; }
  .recrutement-cta { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .cards, .cards-4 { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; }
  .nav-cta { text-align: center; margin-top: 8px; }

  /* Décor allégé : on ne garde que 2 colis, repositionnés hors des textes et boutons */
  .hero-decor .p2, .hero-decor .p4, .hero-decor .p5,
  .eco-decor .p1, .eco-decor .p2 { display: none; }
  .hero-decor .p1 { width: 40px; height: 40px; top: 9%; right: 7%; }
  .hero-decor .p3 { top: 70%; right: 10%; }

  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { text-align: center; }

  .footer-inner { justify-content: center; text-align: center; }
  .footer-legal { text-align: center; }
}
