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

/* Reset */
*, *::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.7;
  font-size: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

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

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

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

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

/* 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 {
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

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

.logo-svg { height: 40px; width: auto; }

.site-nav { display: none; }
.site-nav.open { display: block; }

@media (min-width: 768px) {
  .site-nav { display: flex !important; gap: 1.75rem; align-items: center; }
  .nav-toggle { display: none; }
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--color-primary); text-decoration: none; }

@media (max-width: 767px) {
  .site-nav {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 2px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .site-nav a {
    display: block;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
  }
}

.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 6%, var(--color-bg)), var(--color-bg));
}
.hero .container { display: flex; flex-direction: column; gap: 2rem; }
.hero-content { max-width: 620px; }
.hero-content h1 { color: var(--color-primary); margin-bottom: 1rem; }
.hero-content p { font-size: 1.1rem; margin-bottom: 1.5rem; color: #374151; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 768px) {
  .hero { padding: 4rem 0 3rem; }
  .hero .container { flex-direction: row; align-items: center; gap: 3rem; }
  .hero-content { flex: 1; }
  .hero-visual { flex: 0 0 45%; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}
.btn-primary:hover { background: #c01040; border-color: #c01040; text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* Badge rating */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--color-secondary) 20%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-secondary) 60%, var(--color-bg));
  border-radius: 50px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #92400e;
}

/* Sections */
section { padding: 3rem 0; }
section:nth-child(even) { background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg)); }

.section-title {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: #374151;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--color-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.card-body { padding: 1.25rem; }
.card-body h3 { color: var(--color-primary); margin-bottom: 0.5rem; }
.card-body p { font-size: 0.95rem; color: #4b5563; margin-bottom: 0.75rem; }
.card-body ul {
  list-style: none;
  font-size: 0.9rem;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.card-body ul li::before { content: "✦ "; color: var(--color-secondary); font-size: 0.8rem; }

/* About split */
.about-split {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .about-split { flex-direction: row; align-items: flex-start; gap: 3rem; }
  .about-text { flex: 1; }
  .about-visual { flex: 0 0 40%; }
}
.about-text h2 { color: var(--color-primary); margin-bottom: 1rem; }
.about-text p { margin-bottom: 1rem; color: #374151; }
.hours-list { list-style: none; margin-top: 1rem; }
.hours-list li { padding: 0.3rem 0; border-bottom: 1px solid #e5e7eb; font-size: 0.95rem; }
.hours-list li:last-child { border-bottom: none; }
.hours-list strong { color: var(--color-primary); }

/* Reviews */
.reviews { padding: 3rem 0; }
.reviews-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.reviews-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--color-text);
}
.reviews-badge:hover { text-decoration: none; background: #f9fafb; }
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

.review-card {
  background: var(--color-bg);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.review-author { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.review-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.stars { color: var(--color-secondary); font-size: 1rem; letter-spacing: 1px; }
.review-date { font-size: 0.8rem; color: #9ca3af; }
.review-text { font-size: 0.9rem; color: #4b5563; line-height: 1.6; }
.reviews-attribution { margin-top: 1.5rem; font-size: 0.8rem; color: #9ca3af; text-align: center; }
.reviews-attribution a { color: #9ca3af; }

/* CTA Banner */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: 3rem 1.25rem;
}
.cta-banner h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; font-size: 1.05rem; }
.btn-cta {
  background: var(--color-secondary);
  color: var(--color-text);
  border: 2px solid var(--color-secondary);
  font-weight: 700;
}
.btn-cta:hover { background: #f59e0b; border-color: #f59e0b; text-decoration: none; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info h2 { color: var(--color-primary); }
.contact-detail { display: flex; gap: 0.75rem; align-items: flex-start; }
.contact-icon { font-size: 1.25rem; line-height: 1; flex-shrink: 0; margin-top: 0.1rem; }
.contact-detail a { color: var(--color-primary); font-weight: 600; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-rgpd { font-size: 0.8rem; color: #6b7280; line-height: 1.5; }

/* Map */
.map-wrapper { border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; margin-top: 1.5rem; }
.map-wrapper iframe { display: block; width: 100%; height: 260px; border: none; }

/* Footer */
.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-brand p { font-size: 0.9rem; color: #9ca3af; margin-top: 0.75rem; }
.footer-logo { filter: brightness(0) invert(1); height: 36px; width: auto; }

.footer-col h4 { font-family: var(--font-display); color: #fff; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col ul a { color: #9ca3af; font-size: 0.9rem; }
.footer-col ul a:hover { color: var(--color-secondary); text-decoration: none; }
.footer-col address { font-style: normal; font-size: 0.9rem; color: #9ca3af; line-height: 1.7; }
.footer-tel { color: var(--color-secondary) !important; font-weight: 600; }

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 70%, #000));
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.25rem); }
.page-hero p { color: rgba(255,255,255,0.85); margin-top: 0.75rem; font-size: 1.05rem; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* Services list on services page */
.service-block {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #e5e7eb;
}
.service-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.service-block-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .service-block-inner { flex-direction: row; align-items: flex-start; gap: 2.5rem; }
  .service-block-inner.reverse { flex-direction: row-reverse; }
  .service-block-text { flex: 1; }
  .service-block-visual { flex: 0 0 38%; }
}
.service-block-text h2 { color: var(--color-primary); margin-bottom: 0.75rem; }
.service-block-text p { color: #374151; margin-bottom: 0.75rem; }
.service-block-text ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; color: #4b5563; }
.service-block-text ul li::before { content: "✦ "; color: var(--color-secondary); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  z-index: 9999;
  border-radius: 4px;
}

/* =========================================================
   ANIMATION PASS — Emball' Deco + (Baie-Mahault)
   Template : commercial festif local
   [WEB-1233] AnimationDesigner · 2026-05-29
   ========================================================= */

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

  /* 1 — Hero : fade-slide à l'entrée de page
     Décalage en cascade : titre → accroche → actions */
  .hero-content h1 {
    animation: hero-fadein 0.55s ease both;
  }
  .hero-content p {
    animation: hero-fadein 0.55s 0.14s ease both;
  }
  .hero-content .rating-badge {
    animation: hero-fadein 0.55s 0.22s ease both;
  }
  .hero-actions {
    animation: hero-fadein 0.55s 0.30s ease both;
  }
  .hero-visual .visual-placeholder {
    animation: hero-fadein 0.7s 0.10s ease both;
  }

  @keyframes hero-fadein {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* 2 — Scroll reveal : améliore la transition de main.js
     main.js pose les inline styles opacity/transform ;
     on étend sa transition pour inclure box-shadow et
     allonger légèrement la durée pour une entrée plus douce */
  .card,
  .service-block,
  .review-card {
    transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.25s ease !important;
  }

  /* 3 — Hover lift sur les cartes services
     !important nécessaire : main.js a posé transform inline
     après le reveal ; le CSS seul ne peut pas l'écraser */
  .card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 32px rgba(13, 122, 140, 0.16) !important;
  }

  /* 4 — Shimmer glissant sur tous les placeholders visuels
     background-size 220% → background-position animé crée
     un glissement doux de la teinte sans peindre de pixel */
  .visual-placeholder,
  .visual-placeholder[data-tone="secondary"],
  .visual-placeholder[data-tone="accent"],
  .visual-placeholder[data-tone="muted"] {
    background-size: 220% 220%;
    animation: vp-shimmer 8s ease-in-out infinite;
  }

  @keyframes vp-shimmer {
    0%   { background-position: 0% 40%; }
    50%  { background-position: 100% 60%; }
    100% { background-position: 0% 40%; }
  }

  /* 5 — Pulse halo sur le bouton CTA bannière
     Démarre après 1,5 s pour laisser la page respirer ;
     le halo n'est jamais visible > 600 ms (WCAG 2.3.1 OK) */
  .btn-cta {
    animation: cta-pulse 3.8s ease-in-out 1.5s infinite;
  }

  @keyframes cta-pulse {
    0%, 75%, 100% {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-secondary) 65%, transparent);
    }
    38% {
      box-shadow: 0 0 0 10px color-mix(in srgb, var(--color-secondary) 0%, transparent);
    }
  }

  /* 6 — Soulignement animé sur les liens de navigation
     Le trait part de la gauche et s'étend à 100% au survol ;
     aria-current conserve le trait visible en permanence */
  .site-nav a {
    position: relative;
  }
  .site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    transition: width 0.22s ease;
  }
  .site-nav a:hover::after {
    width: 100%;
  }
  .site-nav a[aria-current="page"]::after {
    width: 100%;
  }

}

/* Focus visible amélioré (indépendant de prefers-reduced-motion) */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Filet de sécurité accessibilité – conservé intact */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
