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

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

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

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

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

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

h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }

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

ul { padding-left: 1.25rem; }
ul li { margin-bottom: 0.4rem; }

/* Layout */
.container {
  max-width: 1100px;
  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-bg);
  border-bottom: 2px solid color-mix(in srgb, var(--color-primary) 15%, var(--color-bg));
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.nav-primary {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 2px solid color-mix(in srgb, var(--color-primary) 15%, var(--color-bg));
  padding: 1rem 1.25rem;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.nav-primary.is-open {
  display: flex;
}

.nav-primary a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  padding: 0.5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, var(--color-bg));
}

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

.nav-cta {
  display: none;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.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); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
  line-height: 1;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

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

.btn-secondary {
  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-lg {
  font-size: 1.125rem;
  padding: 1rem 2rem;
}

/* Hero */
.hero {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
  padding: 3rem 0 2rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-text { flex: 1; }

.hero-text .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.hero-text h1 { margin-bottom: 1rem; }

.hero-text .lead {
  font-size: 1.125rem;
  color: color-mix(in srgb, var(--color-text) 75%, var(--color-bg));
  margin-bottom: 1.5rem;
}

.hero-text .creole-cta {
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--color-secondary) 12%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-secondary) 40%, var(--color-bg));
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
}

.rating-badge .stars { color: var(--color-secondary); font-size: 1rem; }

.hero-visual { flex: 1; }

/* Sections */
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-intro { max-width: 700px; }

.section-bg-light {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg));
}

.section-bg-accent {
  background: var(--color-primary);
  color: #fff;
}

.section-bg-accent h2, .section-bg-accent h3, .section-bg-accent p { color: #fff; }
.section-bg-accent .section-label { color: var(--color-secondary); }

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

.card {
  background: var(--color-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
}

.card-body h3 { margin-bottom: 0.5rem; }

/* Two-col layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

/* CTA block */
.cta-block {
  text-align: center;
  padding: 3rem 1.5rem;
}

.cta-block h2 { margin-bottom: 1rem; }
.cta-block p { margin-bottom: 1.5rem; }

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

/* Rating section */
.rating-section {
  text-align: center;
  padding: 2.5rem 0;
}

.rating-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.rating-large .score {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.rating-large .stars-row {
  color: var(--color-secondary);
  font-size: 1.75rem;
  letter-spacing: 0.1em;
}

.rating-large .count {
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--color-text) 60%, var(--color-bg));
}

/* Services page */
.services-intro {
  padding: 3rem 0 1.5rem;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, var(--color-bg));
}

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

.service-text h2 { margin-bottom: 0.75rem; }

/* About page */
.about-story {
  padding: 3rem 0;
}

.about-intro {
  padding: 3rem 0 1rem;
}

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

.contact-info h3 { margin-bottom: 1rem; }
.contact-info dl { display: grid; gap: 0.75rem; }
.contact-info dt { font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-primary); }
.contact-info dd { margin: 0 0 0.5rem; }

.contact-form { }

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid color-mix(in srgb, var(--color-text) 25%, var(--color-bg));
  border-radius: 6px;
  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-notice {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--color-text) 55%, var(--color-bg));
  margin-top: 1rem;
  line-height: 1.5;
}

.map-container {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 2rem;
}

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

/* Footer */
.site-footer {
  background: var(--color-text);
  color: color-mix(in srgb, #fff 75%, var(--color-text));
  padding: 2.5rem 0 1.5rem;
}

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

.footer-brand h3 {
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-brand p { font-size: 0.9rem; }

.footer-nav h4, .footer-contact h4 {
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.footer-nav ul { list-style: none; padding: 0; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a {
  color: color-mix(in srgb, #fff 75%, var(--color-text));
  font-size: 0.95rem;
}
.footer-nav a:hover { color: #fff; }

.footer-contact p, .footer-contact a {
  font-size: 0.9rem;
  color: color-mix(in srgb, #fff 75%, var(--color-text));
}
.footer-contact a:hover { color: var(--color-secondary); }

.footer-bottom {
  border-top: 1px solid color-mix(in srgb, #fff 15%, var(--color-text));
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: color-mix(in srgb, #fff 45%, var(--color-text));
}

.footer-bottom a {
  color: color-mix(in srgb, #fff 45%, var(--color-text));
}
.footer-bottom a:hover { color: #fff; }

/* Page hero (inner pages) */
.page-hero {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
  padding: 2.5rem 0;
  margin-bottom: 0;
}

.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero .lead {
  color: color-mix(in srgb, var(--color-text) 65%, var(--color-bg));
  font-size: 1.05rem;
}

/* Highlight box */
.highlight-box {
  background: color-mix(in srgb, var(--color-secondary) 12%, var(--color-bg));
  border-left: 4px solid var(--color-secondary);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* Facebook link */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

/* Tablet+ */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .map-container iframe { height: 380px; }
}

/* Desktop+ */
@media (min-width: 900px) {
  .menu-toggle { display: none; }

  .nav-primary {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    padding: 0;
    gap: 2rem;
    box-shadow: none;
    background: transparent;
  }

  .nav-primary a {
    border-bottom: none;
    padding: 0;
    font-size: 0.95rem;
  }

  .nav-cta { display: block; }

  .hero { padding: 4rem 0 3rem; }

  .hero-content {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }

  .hero-text { flex: 1.1; }
  .hero-visual { flex: 0.9; }

  .two-col { grid-template-columns: 1fr 1fr; }

  .service-item { grid-template-columns: 1fr 1fr; }
  .service-item.reverse > *:first-child { order: 2; }
  .service-item.reverse > *:last-child { order: 1; }

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

  .footer-grid { grid-template-columns: 2fr 1fr 1.5fr; }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Animations — pass AnimationDesigner (WEB-4581)
   Grammaire : énergie tropicale tamisée, fluidité, chaleur.
   Toutes les animations sont désactivées si l'utilisateur
   préfère les mouvements réduits (WCAG 2.3.3 / 2.3.1).
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* 1 · Hero — arrivée douce du texte et du visuel */
  .hero-text > * {
    opacity: 0;
    transform: translateY(14px);
    animation: ee-fade-up 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .hero-text .eyebrow   { animation-delay: 80ms; }
  .hero-text h1         { animation-delay: 160ms; }
  .hero-text .lead      { animation-delay: 240ms; }
  .hero-text .creole-cta{ animation-delay: 320ms; }
  .hero-text .hero-actions { animation-delay: 400ms; }
  .hero-text .rating-badge { animation-delay: 480ms; }

  .hero-visual .visual-placeholder {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    animation: ee-fade-in-visual 720ms cubic-bezier(0.22, 0.61, 0.36, 1) 240ms both;
  }

  @keyframes ee-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes ee-fade-in-visual {
    from { opacity: 0; transform: translateY(20px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* 2 · Scroll reveal — sections, cards, service-items, two-col
        CSS scroll-driven (Chromium 115+) avec fallback JS via
        .is-visible (voir main.js IntersectionObserver). */
  [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  @supports (animation-timeline: view()) {
    [data-reveal]:not(.is-visible) {
      animation: ee-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    @keyframes ee-reveal {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }

  /* Cascade légère pour les cards d'une même grille */
  .cards-grid [data-reveal]:nth-child(2) { transition-delay: 90ms; }
  .cards-grid [data-reveal]:nth-child(3) { transition-delay: 180ms; }
  .cards-grid [data-reveal]:nth-child(4) { transition-delay: 270ms; }

  /* 3 · Cards — lift chaleureux au survol */
  .card {
    transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow 260ms ease;
  }
  .card:hover,
  .card:focus-within {
    transform: translateY(-4px);
    box-shadow:
      0 10px 28px -6px color-mix(in srgb, var(--color-primary) 22%, transparent),
      0 4px 12px rgba(0,0,0,0.06);
  }

  /* Visual-placeholder — glisse chaude au survol de la card
     (aucun changement d'aspect-ratio → pas de CLS). */
  .card .visual-placeholder {
    background-size: 180% 180%;
    background-position: 0% 0%;
    transition: background-position 900ms ease;
  }
  .card:hover .visual-placeholder,
  .card:focus-within .visual-placeholder {
    background-position: 100% 100%;
  }

  /* 4 · Boutons — ancrage au hover (surcharge sobre) */
  .btn { transition: opacity 200ms ease, transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
                     box-shadow 220ms ease; }
  .btn-primary:hover {
    box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--color-primary) 55%, transparent);
  }
  .btn-secondary:hover {
    box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--color-secondary) 55%, transparent);
  }
  .btn-accent:hover {
    box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--color-accent) 55%, transparent);
  }

  /* Respiration discrète sur le CTA téléphone du hero */
  .hero-actions .btn-primary.btn-lg {
    animation: ee-cta-breath 3.8s ease-in-out 1.6s infinite;
  }
  @keyframes ee-cta-breath {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-primary) 32%, transparent); }
    50%      { box-shadow: 0 0 0 8px color-mix(in srgb, var(--color-primary) 0%, transparent); }
  }

  /* 5 · Nav — soulignement animé sur les liens de navigation */
  .nav-primary a {
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
                color 200ms ease;
  }
  .nav-primary a:hover,
  .nav-primary a:focus-visible,
  .nav-primary a[aria-current="page"] {
    background-size: 100% 2px;
    text-decoration: none;
  }

  /* Rating — score qui monte doucement à l'entrée en scène */
  .rating-large .score {
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 700ms ease 120ms,
                transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1) 120ms;
  }
  .rating-section.is-visible .rating-large .score,
  .rating-section [data-reveal].is-visible .score {
    opacity: 1;
    transform: scale(1);
  }
  @supports (animation-timeline: view()) {
    .rating-large .score {
      animation: ee-score-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    @keyframes ee-score-in {
      from { opacity: 0; transform: scale(0.86); }
      to   { opacity: 1; transform: scale(1); }
    }
  }
}

/* Focus visible — halo cohérent brand, actif en toutes conditions */
:where(a, button, .btn, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Accessibilité — respect strict des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
