@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');
@import 'tokens.css';

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3.5vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 3.5rem 0;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Header / Nav ── */
header {
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-link img, .logo-link svg {
  height: 44px;
  width: auto;
}

nav ul {
  display: none;
  list-style: none;
  gap: 1.75rem;
}

nav ul li a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a[aria-current="page"] {
  color: var(--color-primary);
  border-color: var(--color-primary);
  text-decoration: none;
}

.nav-cta {
  display: none;
}

/* ── Mobile menu button ── */
.menu-toggle {
  background: none;
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  aria-label: "Menu";
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav open state ── */
nav.is-open ul {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 73px;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem 1.25rem 2rem;
  gap: 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #094f65 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-img {
  width: 100%;
  max-width: 700px;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 2rem;
  display: block;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: #e0f2f8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card h3 { margin-bottom: 0.5rem; color: var(--color-primary); }

/* ── Vehicle cards ── */
.vehicle-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.vehicle-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.vehicle-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.vehicle-card-body {
  padding: 1.5rem;
}

.vehicle-card h3 { color: var(--color-primary); margin-bottom: 0.5rem; }

.vehicle-card ul {
  list-style: none;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vehicle-card ul li::before {
  content: "✓ ";
  color: var(--color-primary);
  font-weight: 700;
}

/* ── USP Section ── */
.usp-section {
  background: #f0f9fc;
  border-top: 4px solid var(--color-secondary);
}

.usp-section h2 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* ── CTA Banner ── */
.cta-banner {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 3rem 1.25rem;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-phone {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 1.5rem;
}

.cta-phone:hover { text-decoration: underline; }

/* ── Reviews section ── */
.reviews {
  background: #fafafa;
}

.reviews-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-text);
}

.google-badge:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-decoration: none; }

.stars { color: var(--color-secondary); font-size: 1.1rem; }

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.review-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.review-author {
  font-weight: 600;
  font-size: 0.95rem;
}

.review-date {
  font-size: 0.8rem;
  color: #6b7280;
}

.review-text { font-size: 0.95rem; color: #374151; }

.reviews-attribution {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.page-hero h1 { color: #fff; }
.page-hero p { opacity: 0.85; margin-top: 0.5rem; }

/* ── Services ── */
.service-item {
  padding: 2rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.service-item:last-child { border-bottom: none; }

.service-item h3 { color: var(--color-primary); margin-bottom: 0.5rem; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-info h2 { color: var(--color-primary); margin-bottom: 1rem; }
.contact-info p { margin-bottom: 0.5rem; }

.contact-info a {
  color: var(--color-primary);
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.25rem;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
}

textarea { min-height: 140px; resize: vertical; }

.form-group { display: flex; flex-direction: column; }

.map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.map-wrap iframe {
  width: 100%;
  height: 300px;
  border: 0;
  display: block;
}

.rgpd-notice {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* ── About ── */
.about-img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  height: 260px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat {
  text-align: center;
  flex: 1 1 120px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* ── Footer ── */
footer {
  background: #0a1a24;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 40px;
  filter: brightness(0) invert(1);
  margin-bottom: 0.75rem;
}

.footer-col h4 {
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col ul li a { color: #9ca3af; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--color-secondary); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid #1f3040;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom a { color: #9ca3af; }
.footer-bottom a:hover { color: var(--color-secondary); }

/* ── Section headings ── */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 { color: var(--color-primary); }

.section-header p {
  color: #4b5563;
  max-width: 560px;
  margin: 0.5rem auto 0;
}

.divider {
  width: 56px;
  height: 4px;
  background: var(--color-secondary);
  border-radius: 999px;
  margin: 0.75rem auto 0;
}

/* ── Highlights ── */
.highlight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.highlight-list li {
  padding-left: 1.5rem;
  position: relative;
}

.highlight-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* ── Creole block ── */
.creole-block {
  background: var(--color-secondary);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text);
  font-weight: 700;
  margin: 1rem 0;
}

/* ── Tablet ── */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .vehicle-card img { height: 220px; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-info { padding-right: 1rem; }
}

/* ── Desktop ── */
@media (min-width: 1024px) {
  nav ul { display: flex; }
  .menu-toggle { display: none; }
  .nav-cta { display: inline-flex; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .vehicle-card img { height: 200px; }
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .hero-img { height: 320px; }
  .map-wrap iframe { height: 380px; }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS — JDS RENT A CAR · Template A
   Toutes les animations sont dans prefers-reduced-motion: no-preference.
   Un bloc reduce en sentinelle annule tout en dernier recours.
═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: no-preference) {

  /* ── Keyframes partagés ── */
  @keyframes jds-fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes jds-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes jds-growWidth {
    from { width: 0; opacity: 0; }
    to   { width: 56px; opacity: 1; }
  }

  @keyframes jds-phonePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.045); }
  }

  /* ── 1. Hero entrance — above-fold, staggeré ── */
  .hero-img {
    animation: jds-fadeIn 0.55s ease both;
    animation-delay: 0.05s;
  }

  .hero h1 {
    animation: jds-fadeUp 0.65s ease both;
    animation-delay: 0.18s;
  }

  .hero > .container > p {
    animation: jds-fadeUp 0.65s ease both;
    animation-delay: 0.32s;
  }

  .hero-badges {
    animation: jds-fadeUp 0.6s ease both;
    animation-delay: 0.46s;
  }

  .hero-actions {
    animation: jds-fadeUp 0.6s ease both;
    animation-delay: 0.58s;
  }

  /* ── 2. Scroll reveal pour section-header via CSS scroll-driven ── */
  @supports (animation-timeline: view()) {

    .section-header h2,
    .page-hero h1 {
      animation: jds-fadeUp 0.6s ease both;
      animation-timeline: view();
      animation-range: entry 10% entry 50%;
    }

    .section-header p {
      animation: jds-fadeUp 0.6s ease both;
      animation-timeline: view();
      animation-range: entry 15% entry 55%;
    }

    /* ── 3. Divider grow-in ── */
    .divider {
      animation: jds-growWidth 0.5s ease both;
      animation-timeline: view();
      animation-range: entry 15% entry 55%;
    }

    /* CTA banner titres */
    .cta-banner h2 {
      animation: jds-fadeUp 0.6s ease both;
      animation-timeline: view();
      animation-range: entry 10% entry 45%;
    }

    .cta-banner p {
      animation: jds-fadeUp 0.6s ease both;
      animation-timeline: view();
      animation-range: entry 15% entry 50%;
    }
  }

  /* ── 4. CTA phone — pulse discret (attention douce) ── */
  .cta-phone {
    display: inline-block;
    animation: jds-phonePulse 3s ease-in-out infinite;
  }

  /* ── 5. Badge hover micro-interaction ── */
  .badge {
    transition: transform 0.18s ease, background 0.18s ease;
    cursor: default;
  }

  .badge:hover {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.28);
  }

  /* ── 6. Card icon hover glow (teal → fond primaire + icône blanche) ── */
  .card-icon {
    transition: background 0.22s ease, color 0.22s ease;
  }

  .card:hover .card-icon {
    background: var(--color-primary);
    color: #fff;
  }

  /* ── 7. Google badge transition déjà présente — on étend ── */
  .google-badge {
    transition: box-shadow 0.18s ease, transform 0.18s ease;
  }

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

  /* ── 8. Footer nav hover indent subtil ── */
  .footer-col ul li a {
    transition: color 0.18s ease, padding-left 0.18s ease;
    display: inline-block;
  }

  .footer-col ul li a:hover {
    padding-left: 0.3rem;
  }

  /* ── 9. Focus-visible ring animé ── */
  :focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 4px;
    transition: outline-offset 0.15s ease;
  }

  :focus-visible:hover {
    outline-offset: 5px;
  }

}

/* ── Sentinelle prefers-reduced-motion: reduce ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
