@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Open+Sans: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.65;
  -webkit-font-smoothing: antialiased;
}

img { 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);
  line-height: 1.2;
  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: 600; }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

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

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

.section-pad { padding: 3.5rem 0; }
.section-pad-lg { padding: 5rem 0; }

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

/* ===== HEADER & NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

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

.nav-logo img,
.nav-logo svg {
  height: 44px;
  width: auto;
}

.nav-links {
  display: none;
  flex-direction: column;
  gap: 0;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--color-bg);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
}

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

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-text);
  padding: 0.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
  transition: color 0.2s;
}

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

.nav-links a[aria-current="page"] {
  font-weight: 600;
}

.nav-cta {
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 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: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--color-secondary) 40%, var(--color-bg));
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-secondary) 60%, transparent);
}

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

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

.hero-desc {
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--color-text) 75%, transparent);
  max-width: 60ch;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  border: 2px solid transparent;
  white-space: nowrap;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

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

/* ===== SECTION TITLES ===== */
.section-heading {
  margin-bottom: 0.5rem;
}

.section-intro {
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  max-width: 60ch;
  margin-bottom: 2rem;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border: none;
  border-radius: 2px;
  margin: 0.75rem 0 2rem;
}

/* ===== FEATURE CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

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

.card-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
}

.card-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* ===== HIGHLIGHT / CTA BANDS ===== */
.band {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
  border-top: 3px solid var(--color-primary);
  padding: 2.5rem 0;
}

.band-accent {
  background: color-mix(in srgb, var(--color-secondary) 30%, var(--color-bg));
  border-top: 3px solid var(--color-secondary);
}

.band-teal {
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-bg));
  border-top: 3px solid var(--color-accent);
}

/* ===== RATING BADGE ===== */
.rating-block {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-secondary) 80%, transparent);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
}

.stars {
  color: #F59E0B;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.rating-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.rating-label {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.testimonial {
  background: color-mix(in srgb, var(--color-secondary) 15%, var(--color-bg));
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
}

.testimonial blockquote {
  font-style: italic;
  margin-bottom: 0.5rem;
  font-size: 0.97rem;
}

.testimonial cite {
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== HOW IT WORKS (Steps) ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

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

.step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.step-body h3 { margin-bottom: 0.25rem; }

/* ===== CONTACT SECTION ===== */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info h2 { margin-bottom: 1rem; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.97rem;
}

.contact-detail .icon {
  flex-shrink: 0;
  width: 1.25rem;
  color: var(--color-primary);
}

.map-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

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

/* ===== FORM ===== */
.form-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid color-mix(in srgb, var(--color-text) 20%, transparent);
  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: 110px; }

.form-rgpd {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  line-height: 1.5;
}

/* ===== GALERIE GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gallery-grid .visual-placeholder:first-child {
  grid-column: 1 / -1;
}

/* ===== INFO BOX ===== */
.info-box {
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-bg));
  border-left: 4px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: color-mix(in srgb, var(--color-text) 95%, transparent);
  color: #e5e7eb;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.footer-brand .footer-logo {
  filter: brightness(0) invert(1);
  height: 40px;
  width: auto;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #9ca3af;
  max-width: 28ch;
}

.footer-col h4 {
  color: #f9fafb;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col ul a {
  font-size: 0.9rem;
  color: #9ca3af;
  transition: color 0.2s;
}

.footer-col ul a:hover { color: #f9fafb; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-text);
  color: #f3f4f6;
  padding: 1rem 1.25rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#cookie-banner.hidden { display: none; }

#cookie-banner p {
  font-size: 0.88rem;
  margin: 0;
  color: #d1d5db;
}

#cookie-banner .cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-cookie {
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
}

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

.btn-cookie-refuse {
  background: transparent;
  color: #d1d5db;
  border-color: #4b5563;
}

/* ===== SKIP TO CONTENT ===== */
#main-content { scroll-margin-top: 70px; }

/* ===== TABLET ===== */
@media (min-width: 640px) {
  .nav-links {
    position: static;
    flex-direction: row;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    overflow: visible;
  }

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

  .nav-cta { display: inline-flex; }
  .hamburger { display: none; }

  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid .visual-placeholder:first-child { grid-column: 1 / -1; }

  .contact-grid { flex-direction: row; gap: 3rem; }
  .contact-grid > * { flex: 1; }

  .map-wrap iframe { height: 340px; }

  .footer-grid { flex-direction: row; flex-wrap: wrap; }
  .footer-brand { flex: 0 0 100%; }
  .footer-col { flex: 1; min-width: 140px; }

  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }

  #cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ===== DESKTOP ===== */
@media (min-width: 1024px) {
  .hero { padding: 5rem 0 3.5rem; }

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

  .hero-text { flex: 1; }
  .hero-visual { flex: 1; }

  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { flex: 0 0 auto; max-width: 220px; }

  .steps { flex-direction: row; gap: 2rem; }
  .step { flex-direction: column; text-align: center; align-items: center; }
  .step-body h3 { font-size: 1.1rem; }
}

/* ===== ANIMATIONS — Motion pass WEB-1252 ===== */

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes logo-float {
  0%, 100% { transform: none; }
  50%       { transform: translateY(-4px); }
}

@keyframes placeholder-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.70; }
}

@keyframes band-enter {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}

/* États hover btn — toujours actifs (changements de couleur, pas d'animation) */
.btn-primary:hover {
  background-color: color-mix(in srgb, var(--color-primary) 80%, #000);
  border-color: color-mix(in srgb, var(--color-primary) 80%, #000);
}
.btn-outline:hover {
  background-color: var(--color-primary);
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  /* 1. Hero : entrée douce au chargement (opacity + translateY) */
  .hero-text {
    animation: hero-enter 0.7s ease both;
  }
  .hero-visual {
    animation: hero-enter 0.7s 0.2s ease both;
  }

  /* 2. Boutons : transition enrichie + élévation + halo */
  .btn {
    transition: background-color 0.22s, border-color 0.22s, color 0.22s,
                transform 0.18s, box-shadow 0.22s;
  }
  .btn:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  }
  .btn:active { transform: translateY(0); box-shadow: none; }

  /* 3. Visual placeholder : pulsation douce (signal que l'image est à venir) */
  .visual-placeholder {
    animation: placeholder-pulse 3s ease-in-out infinite;
  }

  /* 4. Logo nav : flottement sinusoïdal */
  .nav-logo img {
    animation: logo-float 3.5s ease-in-out infinite;
  }

  /* 5. Sections .band : entrée latérale CSS scroll-driven (Chromium 115+) */
  @supports (animation-timeline: view()) {
    .band {
      animation: band-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }

  /* Focus visible élégant sur tous les éléments interactifs */
  :focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
  }
}

/* Garde-fou prefers-reduced-motion — bloque toutes les animations/transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
