@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;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul[role="list"] { list-style: none; }

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

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 3.5rem 0; }
.section-alt { background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg)); }

/* ===== 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));
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
}
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.35rem); margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.accent { color: var(--color-accent); }
.text-secondary { color: var(--color-secondary); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: color-mix(in srgb, var(--color-secondary) 82%, #000);
  border-color: color-mix(in srgb, var(--color-secondary) 82%, #000);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover,
.btn-outline:focus-visible { background: var(--color-primary); color: #fff; }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-light:hover,
.btn-outline-light:focus-visible { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header-top {
  background: var(--color-primary);
  text-align: center;
  padding: 0.4rem 1rem;
}
.header-phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}
.header-phone:hover,
.header-phone:focus-visible { color: var(--color-secondary); }

/* ===== NAV ===== */
.site-nav { padding: 0 1.25rem; position: relative; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
}
.nav-logo img { display: block; }
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all 0.25s;
}
#nav-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: -1.25rem;
  right: -1.25rem;
  background: var(--color-bg);
  padding: 1rem 1.25rem;
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  list-style: none;
}
#nav-menu.is-open { display: flex; }
#nav-menu li > a {
  display: block;
  padding: 0.65rem 0;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary);
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
}
#nav-menu li > a:hover,
#nav-menu li > a:focus-visible,
#nav-menu li > a.active { color: var(--color-secondary); }
.nav-cta {
  margin-top: 0.75rem;
  background: var(--color-secondary);
  color: #fff !important;
  border-radius: 6px;
  padding: 0.65rem 1.25rem;
  text-align: center;
  border-bottom: none;
}
.nav-cta:hover,
.nav-cta:focus-visible { background: color-mix(in srgb, var(--color-secondary) 82%, #000); }

/* ===== HERO ===== */
.hero {
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
  padding: 3rem 0;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.hero-content { max-width: 600px; }
.hero-sub {
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
  margin: 1rem 0 1.5rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-tagline {
  margin-top: 1.5rem;
  font-style: italic;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.hero-visual .visual-placeholder { border-radius: 12px; }

/* ===== SECTION INTRO ===== */
.section-intro {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  background: var(--color-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 1px solid color-mix(in srgb, var(--color-primary) 8%, transparent);
  padding: 0 0 1.25rem;
}
.card .visual-placeholder { border-radius: 0; margin-bottom: 1rem; }
.card h3 { padding: 0 1.25rem; color: var(--color-primary); }
.card p { padding: 0 1.25rem; font-size: 0.95rem; }
.link-more {
  display: inline-block;
  padding: 0 1.25rem;
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.link-more:hover,
.link-more:focus-visible { text-decoration: underline; }

/* ===== WHY / BENEFITS ===== */
.why-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.why-list li { padding-left: 1.5rem; position: relative; }
.why-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: 700;
}
.why-visual .visual-placeholder { border-radius: 12px; }

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-band p { color: color-mix(in srgb, #fff 85%, transparent); margin-bottom: 1.5rem; font-size: 1.05rem; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ===== PAGE HERO ===== */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 0;
}
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero p { color: color-mix(in srgb, #fff 85%, transparent); margin-bottom: 0; font-size: 1.05rem; }

/* ===== SERVICE DETAIL ===== */
.service-section { padding: 3rem 0; }
.service-section:nth-child(even) { background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg)); }
.service-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.service-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.service-content ul li { margin-bottom: 0.4rem; }
.service-visual .visual-placeholder { border-radius: 10px; }
.service-tag {
  display: inline-block;
  background: color-mix(in srgb, var(--color-accent) 12%, var(--color-bg));
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  display: inline-block;
}

/* ===== VALUES ===== */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.value-item {
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.value-item h3 { color: var(--color-accent); margin-bottom: 0.4rem; font-size: 1rem; }
.value-item p { font-size: 0.95rem; margin: 0; }

/* ===== ABOUT ===== */
.about-inner { display: flex; flex-direction: column; gap: 2rem; }
.about-visual .visual-placeholder { border-radius: 12px; }

/* ===== ZONE ===== */
.zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  list-style: none;
}
.zone-list li {
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-bg));
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.gallery-item { margin: 0; }
.gallery-item .visual-placeholder { border-radius: 8px; }
.gallery-item figcaption {
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  margin-top: 0.4rem;
}
.gallery-cta { text-align: center; }
.gallery-cta p { margin-bottom: 1rem; font-size: 1.05rem; }

/* ===== CONTACT ===== */
.contact-inner { display: flex; flex-direction: column; gap: 2.5rem; }
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-list a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.contact-list a:hover,
.contact-list a:focus-visible { text-decoration: underline; }
.contact-map { margin-top: 1rem; border-radius: 10px; overflow: hidden; }
.contact-map iframe { display: block; }

/* FORM */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 1rem;
  border: 2px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  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-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
}
.form-rgpd {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}

/* ===== LEGAL ===== */
.legal-content h2 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content a { color: var(--color-accent); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand p {
  font-size: 0.9rem;
  color: color-mix(in srgb, #fff 80%, transparent);
  margin-top: 0.75rem;
}
.footer-links h3,
.footer-contact h3 {
  color: var(--color-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a,
.footer-contact a {
  color: color-mix(in srgb, #fff 85%, transparent);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover,
.footer-links a:focus-visible,
.footer-contact a:hover,
.footer-contact a:focus-visible { color: var(--color-secondary); }
.footer-contact p {
  font-size: 0.9rem;
  color: color-mix(in srgb, #fff 85%, transparent);
  margin-bottom: 0.4rem;
}
.footer-bottom {
  border-top: 1px solid color-mix(in srgb, #fff 20%, transparent);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: color-mix(in srgb, #fff 60%, transparent);
}
.footer-bottom a {
  color: color-mix(in srgb, #fff 70%, transparent);
  text-decoration: none;
}
.footer-bottom a:hover,
.footer-bottom a:focus-visible { color: var(--color-secondary); }

/* ===== TABLET+ ===== */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== MOTION PASS — AnimationDesigner (WEB-5696) =====
   6 micro-animations CSS-first, GPU-friendly, wrapped in prefers-reduced-motion.
   No new DOM, no new asset, no JS injected. */

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

  /* 1 — Card lift on hover (atouts, services, gallery, cards, values) */
  .atout-card,
  .service-card,
  .gallery-item,
  .card,
  .value-item {
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
    will-change: transform;
  }
  .atout-card:hover,
  .service-card:hover,
  .gallery-item:hover,
  .card:hover,
  .value-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(63, 63, 70, 0.14);
  }

  /* 2 — Visual placeholder : dégradé caribéen qui glisse au survol du parent */
  .atout-card .visual-placeholder,
  .service-card .visual-placeholder,
  .gallery-item .visual-placeholder,
  .card .visual-placeholder,
  .hero-visual .visual-placeholder,
  .service-visual .visual-placeholder,
  .why-visual .visual-placeholder,
  .about-visual .visual-placeholder {
    background-size: 180% 180%;
    background-position: 0% 50%;
    transition: background-position 700ms ease, transform 400ms ease;
  }
  .atout-card:hover .visual-placeholder,
  .service-card:hover .visual-placeholder,
  .gallery-item:hover .visual-placeholder,
  .card:hover .visual-placeholder { background-position: 100% 50%; }

  /* 3 — Boutons : micro-lift + press */
  .btn { transition: background 200ms ease, color 200ms ease, border-color 200ms ease,
                     transform 180ms ease, box-shadow 200ms ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(217, 119, 6, 0.22); }
  .btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
  .btn-outline:hover,
  .btn-outline-light:hover { box-shadow: 0 8px 18px rgba(63, 63, 70, 0.18); }

  /* 4 — Liens texte : soulignement animé (background gradient qui grandit) */
  .link-more,
  .btn-text,
  .contact-list a,
  .footer-links a,
  .footer-contact a,
  .footer-bottom a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 320ms ease, color 200ms ease;
    text-decoration: none;
  }
  .link-more:hover,
  .link-more:focus-visible,
  .btn-text:hover,
  .btn-text:focus-visible,
  .contact-list a:hover,
  .contact-list a:focus-visible,
  .footer-links a:hover,
  .footer-links a:focus-visible,
  .footer-contact a:hover,
  .footer-contact a:focus-visible,
  .footer-bottom a:hover,
  .footer-bottom a:focus-visible {
    background-size: 100% 1px;
    text-decoration: none;
  }

  /* 5 — Reveal upgrade (le JS existant ajoute .reveal.visible) : ajoute scale et
     un stagger léger via nth-child, plus une courbe plus douce. */
  .reveal {
    transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .atouts-grid .atout-card.reveal,
  .services-grid .service-card.reveal,
  .cards-grid .card.reveal,
  .values-grid .value-item.reveal,
  .gallery-grid .gallery-item.reveal { transition-delay: 0ms; }
  .atouts-grid .atout-card.reveal:nth-child(2),
  .services-grid .service-card.reveal:nth-child(2),
  .cards-grid .card.reveal:nth-child(2),
  .values-grid .value-item.reveal:nth-child(2),
  .gallery-grid .gallery-item.reveal:nth-child(2) { transition-delay: 90ms; }
  .atouts-grid .atout-card.reveal:nth-child(3),
  .services-grid .service-card.reveal:nth-child(3),
  .cards-grid .card.reveal:nth-child(3),
  .values-grid .value-item.reveal:nth-child(3),
  .gallery-grid .gallery-item.reveal:nth-child(3) { transition-delay: 180ms; }
  .gallery-grid .gallery-item.reveal:nth-child(4) { transition-delay: 220ms; }
  .gallery-grid .gallery-item.reveal:nth-child(5) { transition-delay: 280ms; }
  .gallery-grid .gallery-item.reveal:nth-child(6) { transition-delay: 340ms; }

  /* 6 — Hero visual : léger flottement (drift 8s), coupé sous reduced-motion */
  .hero-visual .visual-placeholder {
    animation: hero-float 8s ease-in-out infinite;
  }
  @keyframes hero-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(0, -6px, 0); }
  }

  /* Bonus — icônes atout : léger pulse au survol de la carte parent */
  .atout-icon { transition: transform 320ms ease; }
  .atout-card:hover .atout-icon { transform: scale(1.12) rotate(-4deg); }

  /* Bonus — focus-visible ring plus lisible sur les CTA principaux */
  .btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-accent) 55%, transparent);
    outline-offset: 3px;
  }
}

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

/* ===== DESKTOP ===== */
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  #nav-menu {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    gap: 0.25rem;
    align-items: center;
  }
  #nav-menu li > a {
    padding: 0.5rem 0.75rem;
    border-bottom: none;
    border-radius: 6px;
    font-size: 0.9rem;
  }
  .nav-cta { margin-top: 0; padding: 0.5rem 1.25rem; }

  .hero { padding: 5rem 0; }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }
  .hero-content { flex: 1; }
  .hero-visual { flex: 1; }

  .why-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .why-content { flex: 1; }
  .why-visual { flex: 0 0 380px; }

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

  .service-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .service-inner--reverse { flex-direction: row-reverse; }
  .service-visual { flex: 0 0 42%; }
  .service-content { flex: 1; }

  .about-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .about-content { flex: 1; }
  .about-visual { flex: 0 0 340px; }

  .contact-inner {
    flex-direction: row;
    align-items: flex-start;
  }
  .contact-info { flex: 0 0 42%; }
  .contact-form-wrap { flex: 1; }

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