@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Inter:wght@400;500;600&display=swap');
@import './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.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

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

ul, ol { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.2;
}

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

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

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3.5rem 0; }

/* ===== VISUAL PLACEHOLDER ===== */
.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);
  border-bottom: 3px solid var(--color-secondary);
}

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

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

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--color-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.logo-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--color-secondary);
  letter-spacing: 0.3px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  aria-label: "Menu";
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s 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); }

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1rem 1.25rem 1.5rem;
  border-bottom: 3px solid var(--color-secondary);
}

.main-nav.is-open { display: block; }

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.625rem 0.75rem;
  color: #e5e7eb;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(225,29,72,0.15);
  color: #fff;
}

.main-nav a[aria-current="page"] {
  border-left: 3px solid var(--color-secondary);
}

.nav-cta {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-secondary);
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-display);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

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

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

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ===== HERO ===== */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(225,29,72,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: rgba(225,29,72,0.2);
  border: 1px solid rgba(225,29,72,0.4);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #fca5a5;
  margin-bottom: 1.25rem;
}

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

.hero-lead {
  font-size: 1.05rem;
  color: #d1d5db;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero-tagline {
  font-style: italic;
  color: var(--color-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-placeholder {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.hero-trust {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #d1d5db;
}

.trust-icon {
  width: 20px;
  height: 20px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

/* ===== RATING BADGE ===== */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.rating-stars { color: #F59E0B; font-size: 1rem; }
.rating-score { font-family: var(--font-display); font-weight: 700; color: var(--color-primary); font-size: 1.05rem; }
.rating-count { font-size: 0.8rem; color: #6b7280; }

/* ===== SECTIONS ===== */
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.section-title { margin-bottom: 1rem; }
.section-desc { color: #4b5563; margin-bottom: 2rem; max-width: 640px; }

.section-header { margin-bottom: 2.5rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-desc { margin-left: auto; margin-right: auto; }

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(225,29,72,0.12);
  border-color: var(--color-secondary);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(225,29,72,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-secondary);
  font-size: 1.5rem;
}

.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; color: #4b5563; }

.service-features {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.service-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #374151;
}

.service-feature::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

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

.cta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ===== REVIEWS ===== */
.reviews { background: #f9fafb; }

.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

.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-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.9rem; }
.review-date { font-size: 0.775rem; color: #9ca3af; }
.review-stars { color: #F59E0B; font-size: 0.85rem; }
.review-text { font-size: 0.875rem; color: #374151; font-style: italic; }

.reviews-attribution {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.reviews-attribution a { color: #6b7280; text-decoration: underline; }

/* ===== ABOUT PAGE ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.about-values { margin-top: 2rem; }

.value-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.value-icon {
  width: 40px;
  height: 40px;
  background: rgba(225,29,72,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-secondary);
  font-size: 1.2rem;
}

.value-text h4 { margin-bottom: 0.25rem; }
.value-text p { font-size: 0.875rem; color: #4b5563; margin: 0; }

/* ===== CONTACT PAGE ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(225,29,72,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-secondary);
  font-size: 1.25rem;
}

.contact-label { font-size: 0.75rem; color: #6b7280; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.125rem; }
.contact-value { font-weight: 600; color: var(--color-primary); }
.contact-value a { color: var(--color-secondary); }
.contact-value a:hover { text-decoration: underline; }

/* ===== MAP ===== */
.map-wrapper {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  margin-top: 1.5rem;
}

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

/* ===== CONTACT FORM ===== */
.contact-form-section { background: #f9fafb; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(225,29,72,0.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-rgpd {
  font-size: 0.78rem;
  color: #6b7280;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  line-height: 1.5;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary);
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
}

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

.footer-brand .logo-name { color: #fff; font-size: 1.1rem; }
.footer-brand .logo-sub { color: var(--color-secondary); }
.footer-brand p { font-size: 0.875rem; margin-top: 0.75rem; color: #9ca3af; }

.footer-section h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { font-size: 0.875rem; color: #9ca3af; transition: color 0.2s; }
.footer-nav a:hover { color: var(--color-secondary); }

.footer-address { font-size: 0.875rem; line-height: 1.7; }
.footer-phone { margin-top: 0.5rem; }
.footer-phone a { color: var(--color-secondary); font-weight: 600; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
}

.footer-bottom a { color: #6b7280; }
.footer-bottom a:hover { color: #9ca3af; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 0 2rem;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.page-hero .breadcrumb a { color: var(--color-secondary); }
.page-hero .breadcrumb span { color: #9ca3af; }

.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero p { color: #d1d5db; max-width: 560px; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--color-secondary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
  background: rgba(225,29,72,0.06);
  border-left: 4px solid var(--color-secondary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.highlight-box p { margin: 0; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--color-secondary);
  color: #fff;
  padding: 1.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  display: block;
}

.stat-label { font-size: 0.8rem; opacity: 0.85; }

/* ===== TABLET (≥ 640px) ===== */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== DESKTOP (≥ 1024px) ===== */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .main-nav {
    display: block !important;
    position: static;
    background: transparent;
    padding: 0;
    border: none;
  }

  .main-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.375rem 0.75rem;
    color: #d1d5db;
    font-size: 0.875rem;
  }

  .main-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .main-nav a[aria-current="page"] { border-left: none; color: var(--color-secondary); background: rgba(225,29,72,0.1); }

  .nav-cta {
    margin-top: 0;
    padding: 0.4375rem 1rem;
  }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .hero { padding: 4.5rem 0 3.5rem; }
  section { padding: 5rem 0; }
}

/* =======================================================================
   ANIMATION PASS — KAZ A MOBILE (Lot 7+)
   Règle de sécurité prefers-reduced-motion en premier, animations ensuite.
   ======================================================================= */

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

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

  /* 1 — Entrée hero au chargement (stagger décalé) */
  @keyframes km-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-badge       { animation: km-fade-up 0.45s ease both 0.05s; }
  .hero h1          { animation: km-fade-up 0.50s ease both 0.15s; }
  .hero-lead        { animation: km-fade-up 0.50s ease both 0.25s; }
  .hero-tagline     { animation: km-fade-up 0.45s ease both 0.33s; }
  .hero-cta-group   { animation: km-fade-up 0.45s ease both 0.40s; }
  .hero-placeholder { animation: km-fade-up 0.55s ease both 0.48s; }
  .hero-trust       { animation: km-fade-up 0.45s ease both 0.55s; }

  /* Page hero (pages internes) */
  .page-hero > .container { animation: km-fade-up 0.50s ease both 0.10s; }

  /* 2 — Scroll reveal via IntersectionObserver (class .anim-reveal → .is-visible) */
  .anim-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
  .anim-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* 3 — Service card : hover lift + transition complète (inclut opacity pour reveal) */
  .service-card {
    transition: box-shadow 0.25s ease, border-color 0.25s ease,
                transform 0.25s ease, opacity 0.45s ease;
  }
  .service-card:hover { transform: translateY(-4px); }

  /* 4 — Visual placeholder : halo au survol */
  .visual-placeholder {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }
  .visual-placeholder:hover {
    transform: scale(1.012);
    box-shadow: 0 10px 32px rgba(225, 29, 72, 0.14);
  }

  /* 5 — Focus-visible ring avec offset animé */
  :focus-visible { transition: outline-offset 0.15s ease; }

}
