@import url("tokens.css");

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.65; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; color: var(--color-primary); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

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

.btn {
  display: inline-block; padding: 0.75rem 1.75rem; border-radius: 4px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.2s;
  border: 2px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: #162d70; border-color: #162d70; text-decoration: none; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* ── Visual Placeholders ───────────────────────────────────────────────── */
.visual-placeholder {
  display: block; width: 100%; border-radius: 8px; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 55%,
    color-mix(in srgb, var(--color-secondary) 18%, var(--color-bg)) 100%);
}
.visual-placeholder[data-aspect="4:3"]  { aspect-ratio: 4 / 3;  }
.visual-placeholder[data-aspect="1:1"]  { aspect-ratio: 1 / 1;  }
.visual-placeholder[data-aspect="3:4"]  { aspect-ratio: 3 / 4;  }
.visual-placeholder[data-aspect="21:9"] { aspect-ratio: 21 / 9; }
.visual-placeholder[data-tone="secondary"] {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-secondary) 22%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-secondary) 10%, var(--color-bg)) 55%,
    color-mix(in srgb, var(--color-primary) 16%, var(--color-bg)) 100%);
}
.visual-placeholder[data-tone="accent"] {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-accent, var(--color-primary)) 22%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 60%,
    color-mix(in srgb, var(--color-secondary) 16%, var(--color-bg)) 100%);
}
.visual-placeholder[data-tone="muted"] {
  background: color-mix(in srgb, var(--color-text) 8%, var(--color-bg));
}

/* ── Header / Nav ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-text { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #fff; letter-spacing: 0.5px; }

.nav-primary { display: none; gap: 1.75rem; position: relative; }
.nav-primary a {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: rgba(255,255,255,0.85); transition: color 0.15s; position: relative; padding-bottom: 2px;
}
.nav-primary a:hover, .nav-primary a[aria-current="page"] { color: #fff; text-decoration: none; }
.nav-primary a[aria-current="page"]::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--color-accent); border-radius: 2px;
}
.nav-glide {
  position: absolute; bottom: -2px; height: 2px; background: var(--color-accent);
  border-radius: 2px; transition: left 0.25s, width 0.25s, opacity 0.2s; opacity: 0;
}

#btn-menu {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 4px;
}
#btn-menu span { display: block; height: 2px; background: #fff; border-radius: 2px; }

#nav-drawer {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  background: var(--color-primary); padding: 1rem 1.25rem 1.5rem;
  flex-direction: column; gap: 0.25rem;
}
#nav-drawer.is-open { display: flex; }
#nav-drawer a {
  font-family: var(--font-body); font-weight: 600; color: rgba(255,255,255,0.9);
  padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1rem;
}
#nav-drawer a[aria-current="page"] { color: #fff; }

@media (min-width: 768px) {
  .nav-primary { display: flex; }
  #btn-menu { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { background: var(--color-primary); color: #fff; padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -60px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(180,83,9,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 680px; }
.hero-eyebrow {
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; margin-bottom: 1.25rem; font-weight: 700; }
.hero-intro { font-size: 1.1rem; color: rgba(255,255,255,0.85); margin-bottom: 2rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.hero-actions .btn-outline { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.5); }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; color: #fff; }
.hero-trust { font-size: 0.85rem; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 0.5rem; }
.hero-trust::before { content: '★★★★★'; color: var(--color-accent); font-size: 0.9rem; }

@media (min-width: 768px) {
  .hero { padding: 5rem 0 4rem; }
  .hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
}

/* ── Section generic ───────────────────────────────────────────────────── */
section { padding: 4rem 0; }
.section-label {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.5rem;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.section-intro { font-size: 1.05rem; color: var(--color-secondary); max-width: 640px; margin-bottom: 2.5rem; line-height: 1.7; }

/* ── Atouts grid ─────────────────────────────────────────────────────────── */
.atouts-section { background: #f8fafc; }
.atouts-grid { display: grid; gap: 1.5rem; }
.atout-card {
  background: #fff; border-radius: 8px; padding: 1.75rem;
  border-left: 4px solid var(--color-accent); box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.atout-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.atout-card p { color: var(--color-secondary); font-size: 0.95rem; }
@media (min-width: 600px) { .atouts-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .atouts-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Services grid ──────────────────────────────────────────────────────── */
.services-grid { display: grid; gap: 2rem; }
.service-card {
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07); border: 1px solid #e5e7eb;
  display: flex; flex-direction: column;
}
.service-card-body { padding: 1.5rem; flex: 1; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--color-secondary); font-size: 0.95rem; line-height: 1.6; }
.service-card ul { margin-top: 1rem; list-style: disc; padding-left: 1.25rem; color: var(--color-secondary); font-size: 0.9rem; line-height: 1.7; }
@media (min-width: 700px) { .services-grid { grid-template-columns: 1fr 1fr; } }

/* ── Stats bar ───────────────────────────────────────────────────────────── */
.stats-bar { background: var(--color-primary); color: #fff; padding: 2.5rem 0; }
.stats-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.stat-number { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; color: var(--color-accent); display: block; }
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.75); }

/* ── CTA section ─────────────────────────────────────────────────────────── */
.cta-section { background: var(--color-primary); color: #fff; text-align: center; padding: 4rem 0; }
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.cta-tel { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.3rem; font-weight: 700; color: var(--color-accent); margin-top: 1rem; transition: color 0.15s; }
.cta-tel:hover { color: #d97706; text-decoration: none; }

/* ── Reviews ────────────────────────────────────────────────────────────── */
.reviews { background: #f8fafc; }
.reviews-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.reviews-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 0.4rem 0.9rem; font-size: 0.9rem; font-weight: 600; color: var(--color-text); text-decoration: none; }
.reviews-badge:hover { border-color: var(--color-primary); text-decoration: none; }
.google-icon { width: 20px; height: 20px; }
.stars-text { color: #f59e0b; }
.reviews-grid { display: grid; gap: 1.25rem; }
.review-card { background: #fff; border-radius: 8px; padding: 1.25rem 1.5rem; border: 1px solid #e5e7eb; }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.review-author { font-weight: 600; font-size: 0.95rem; }
.review-stars { color: #f59e0b; font-size: 0.9rem; }
.review-date { font-size: 0.8rem; color: var(--color-secondary); }
.review-text { font-size: 0.95rem; color: var(--color-text); line-height: 1.6; }
.reviews-attribution { margin-top: 1.5rem; font-size: 0.78rem; color: var(--color-secondary); }
.reviews-attribution a { color: var(--color-secondary); }
@media (min-width: 700px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── About page ─────────────────────────────────────────────────────────── */
.about-grid { display: grid; gap: 2.5rem; }
.about-text p { margin-bottom: 1.1rem; line-height: 1.75; }
.about-text p:last-child { margin-bottom: 0; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ── Contact page ───────────────────────────────────────────────────────── */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.contact-info p, .contact-info address { font-style: normal; color: var(--color-secondary); line-height: 1.8; font-size: 0.95rem; }
.contact-info a { color: var(--color-primary); font-weight: 600; }
.contact-form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.65rem 0.9rem; border: 1.5px solid #d1d5db; border-radius: 4px; font-family: var(--font-body); font-size: 1rem; color: var(--color-text); background: #fff; margin-bottom: 1rem; transition: border-color 0.15s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--color-primary); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.rgpd-mention { font-size: 0.8rem; color: var(--color-secondary); margin-top: 0.5rem; line-height: 1.5; }
.map-wrapper { border-radius: 8px; overflow: hidden; margin-top: 1.5rem; border: 1px solid #e5e7eb; }
.map-wrapper iframe { display: block; width: 100%; height: 300px; border: none; }

/* ── Page hero (inner pages) ─────────────────────────────────────────────── */
.page-hero { background: var(--color-primary); color: #fff; padding: 3rem 0 2.5rem; }
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
.page-hero .breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 0.75rem; }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.7); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: #0f1f50; color: rgba(255,255,255,0.75); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { margin-top: 0.75rem; font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.footer-nav h4, .footer-contact h4 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 0.75rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-nav a, .footer-contact a { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; text-decoration: none; }
.footer-contact address { font-style: normal; font-size: 0.9rem; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; font-size: 0.8rem; color: rgba(255,255,255,0.4); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ── Reveal animations ───────────────────────────────────────────────────── */
.js-reveal { opacity: 0; transform: translateY(20px); }
.js-reveal.is-visible { opacity: 1; transform: none; }

/* ── Animation pass (prefers-reduced-motion: no-preference) ─────────────── */
@media (prefers-reduced-motion: no-preference) {
  /* 1. Hero content entrance — slide in from left on page load */
  @keyframes hero-enter-text {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: none; }
  }
  .hero-content {
    animation: hero-enter-text 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  /* 2. Reveal transition (motion-safe) */
  .js-reveal { transition: opacity 0.55s ease, transform 0.55s ease; }

  /* 3. Stagger delays for grid reveals */
  .stats-inner  .js-reveal:nth-child(2)  { transition-delay: 0.10s; }
  .stats-inner  .js-reveal:nth-child(3)  { transition-delay: 0.20s; }
  .atouts-grid  .js-reveal:nth-child(2)  { transition-delay: 0.12s; }
  .atouts-grid  .js-reveal:nth-child(3)  { transition-delay: 0.24s; }
  .services-grid .js-reveal:nth-child(2) { transition-delay: 0.12s; }
  .services-grid .js-reveal:nth-child(3) { transition-delay: 0.24s; }
  .services-grid .js-reveal:nth-child(4) { transition-delay: 0.36s; }
  .reviews-grid .js-reveal:nth-child(2)  { transition-delay: 0.10s; }
  .reviews-grid .js-reveal:nth-child(3)  { transition-delay: 0.20s; }

  /* 4. Atout cards — hover lift */
  .atout-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  .atout-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.13);
  }

  /* 5. Service cards — hover lift */
  .service-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  .service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  }

  /* 6. Visual placeholders — gradient drift */
  @keyframes placeholder-drift {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
  }
  .visual-placeholder {
    background-size: 200% 100%;
    animation: placeholder-drift 5s ease-in-out infinite alternate;
  }

  /* 7. Review cards — hover border + lift */
  .review-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }
  .review-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.10);
    transform: translateY(-2px);
  }
}

/* ── Accessible focus ring ───────────────────────────────────────────────── */
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ── Reduced motion reset ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto !important; }
  .js-reveal { opacity: 1 !important; transform: none !important; }
}

/* ── RGPD banner ─────────────────────────────────────────────────────────── */
.rgpd-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #0f1f50; color: rgba(255,255,255,0.85); padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; z-index: 999; font-size: 0.85rem; }
.rgpd-banner p { flex: 1; min-width: 200px; }
.rgpd-banner button { padding: 0.5rem 1.25rem; background: var(--color-accent); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.rgpd-banner button:hover { background: #9a4608; }
