@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,700&family=Source+Sans+3:wght@400;600&display=swap');
@import './tokens.css';

/* === Reset & Base === */
*, *::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.6;
  font-size: 1rem;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

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

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  white-space: nowrap;
}
.header-logo .logo-accent { color: var(--color-accent); }
.header-logo .logo-sub { font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.15em; color: var(--color-accent); display: block; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.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); }

/* Mobile nav */
.main-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.main-nav.is-open { display: flex; }
.main-nav a {
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  border-left-color: var(--color-accent);
}

/* Header CTA */
.header-cta {
  display: none;
  gap: 0.5rem;
  align-items: center;
}
.btn-tel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.btn-tel:hover { border-color: var(--color-accent); background: rgba(200,168,75,0.1); }
.btn-rdv {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}
.btn-rdv:hover { background: #a93226; transform: translateY(-1px); }

/* ============================================================
   BUTTONS (global)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  border: none;
}
.btn-primary {
  background: var(--color-secondary);
  color: #fff;
}
.btn-primary:hover { background: #a93226; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(192,57,43,0.3); }
.btn-outline {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}
.btn-outline:hover { background: var(--color-secondary); color: #fff; }
.btn-gold {
  background: var(--color-accent);
  color: #fff;
}
.btn-gold:hover { background: #b09540; transform: translateY(-1px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 1rem 3.5rem;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.hero-content { display: flex; flex-direction: column; gap: 1.25rem; }
.hero-content h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  line-height: 1.2;
  color: #fff;
}
.hero-content h1 em {
  font-style: normal;
  color: var(--color-accent);
}
.hero-content .hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 540px;
}
.hero-tagline {
  font-style: italic;
  color: var(--color-accent);
  font-size: 0.9rem;
  border-left: 3px solid var(--color-accent);
  padding-left: 0.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-hours {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.25rem;
}

/* ============================================================
   CONTAINER / SECTIONS
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.section { padding: 3rem 1rem; }
.section-alt { background: #f9f9fb; }
.section-dark { background: var(--color-primary); color: #fff; }
.section-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.section-dark .section-title { color: #fff; }
.section-lead {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
  max-width: 600px;
}
.section-dark .section-lead { color: rgba(255,255,255,0.7); }
.section-header { margin-bottom: 2rem; }
.accent-bar {
  width: 48px;
  height: 3px;
  background: var(--color-secondary);
  margin: 0.5rem 0 1rem;
}
.section-dark .accent-bar { background: var(--color-accent); }

/* ============================================================
   SERVICES GRID (homepage preview)
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.service-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border: 1px solid #f0f0f0;
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.12); transform: translateY(-2px); }
.service-card-body { padding: 1.25rem; }
.service-card-body h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.service-card-body p { font-size: 0.9rem; color: #6b7280; }
.service-card-body .service-badge {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Services page full listing */
.services-list { display: flex; flex-direction: column; gap: 2.5rem; }
.service-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #f0f0f0;
}
.service-item:last-child { border-bottom: none; padding-bottom: 0; }
.service-item h2 { font-size: 1.3rem; color: var(--color-primary); }
.service-item .service-sub { color: var(--color-secondary); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.service-item ul { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
.service-item ul li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.95rem;
  color: #374151;
}
.service-item ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ============================================================
   ABOUT TEASER (homepage)
   ============================================================ */
.about-teaser {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.about-teaser-content h2 { font-size: 1.4rem; color: var(--color-primary); }
.about-teaser-content p { color: #4b5563; font-size: 0.95rem; margin-top: 0.75rem; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--color-secondary);
  color: #fff;
}
.cta-banner h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: #fff;
  margin-bottom: 0.5rem;
}
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 0.95rem; margin-bottom: 1.5rem; }
.cta-banner .btn-light {
  background: #fff;
  color: var(--color-secondary);
  border: 2px solid #fff;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.cta-banner .btn-light:hover { background: transparent; color: #fff; }
.cta-banner .cta-phone {
  display: block;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.info-item .info-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-secondary);
}
.info-item .info-value { font-size: 1rem; color: var(--color-text); }
.info-item a { color: var(--color-secondary); }
.info-item a:hover { text-decoration: underline; }

.hours-table { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.35rem; }
.hours-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.hours-row .day { color: #6b7280; }
.hours-row .time { font-weight: 600; }
.hours-row.closed .time { color: #9ca3af; }

.map-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  aspect-ratio: 4 / 3;
}
.map-container iframe { width: 100%; height: 100%; border: none; display: block; }

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.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(192,57,43,0.1);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-rgpd {
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.5;
}

/* ============================================================
   RESERVATION PAGE
   ============================================================ */
.reservation-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.reservation-option {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.reservation-option .option-icon { font-size: 1.8rem; }
.reservation-option h3 { font-size: 1.1rem; color: var(--color-primary); }
.reservation-option p { font-size: 0.9rem; color: #6b7280; }

/* Planity embed container */
.planity-embed {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  margin-top: 0.5rem;
}
.planity-embed iframe {
  width: 100%;
  min-height: 700px;
  border: none;
  display: block;
}

/* ============================================================
   MENTIONS LÉGALES
   ============================================================ */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1rem;
}
.legal-content h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.legal-content h2 { font-size: 1.1rem; margin: 2rem 0 0.5rem; color: var(--color-primary); }
.legal-content p { font-size: 0.9rem; color: #374151; margin-bottom: 0.75rem; line-height: 1.7; }
.legal-content a { color: var(--color-secondary); text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1rem 1.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.footer-brand .footer-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.35rem;
}
.footer-brand p { font-size: 0.85rem; }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 0.25rem; }
.footer-nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.footer-contact { font-size: 0.85rem; }
.footer-contact p { margin-bottom: 0.35rem; }
.footer-contact a { color: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: underline; }
.footer-bottom a:hover { color: rgba(255,255,255,0.85); }

/* ============================================================
   RESPONSIVE — TABLET (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .hamburger { display: none; }
  .main-nav {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    border: none;
    gap: 0.25rem;
  }
  .main-nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .main-nav a:hover,
  .main-nav a[aria-current="page"] {
    border-left: none;
    border-bottom-color: var(--color-accent);
    color: #fff;
  }
  .header-cta { display: flex; }

  .hero-inner {
    flex-direction: row;
    align-items: center;
  }
  .hero-content { flex: 1; }
  .hero-visual { flex: 1; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .about-teaser {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
  .about-teaser-content { flex: 1; }
  .about-teaser-visual { flex: 1; }

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .footer-brand { flex: 2; }
  .footer-nav { flex: 1; }
  .footer-contact { flex: 1.5; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ============================================================
   RESPONSIVE — DESKTOP (1100px+)
   ============================================================ */
@media (min-width: 1100px) {
  .hero { padding: 5rem 1rem; }
  .section { padding: 4rem 1rem; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }

  .service-item {
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
  }
  .service-item-visual { width: 240px; flex-shrink: 0; }
  .service-item-content { flex: 1; }

  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 4rem; }
}

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

/* ============================================================
   ANIMATIONS — Crisalis Coiffure (WEB-5261)
   Toutes les règles ci-dessous sont encapsulées dans
   prefers-reduced-motion: no-preference
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* 1. Hero entrance — stagger sur chaque bloc */
  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }
  /* Fade seul pour le placeholder (transform laissé libre pour le hover) */
  @keyframes hero-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .hero-content h1 {
    animation: hero-rise 0.65s ease both;
    animation-delay: 0.05s;
  }
  .hero-content .hero-sub {
    animation: hero-rise 0.65s ease both;
    animation-delay: 0.2s;
  }
  .hero-tagline {
    animation: hero-rise 0.6s ease both;
    animation-delay: 0.35s;
  }
  .hero-actions {
    animation: hero-rise 0.6s ease both;
    animation-delay: 0.48s;
  }
  .hero-hours {
    animation: hero-rise 0.5s ease both;
    animation-delay: 0.6s;
  }
  .hero-visual .visual-placeholder {
    animation: hero-fade 0.75s ease both;
    animation-delay: 0.25s;
  }

  /* 2. Accent bar — dessin gauche→droite au scroll-in */
  .accent-bar {
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  }
  .accent-bar.is-visible {
    transform: scaleX(1);
  }

  /* 3. Service cards stagger (nth-child delays) */
  .services-grid .service-card:nth-child(2) { transition-delay: 0.11s !important; }
  .services-grid .service-card:nth-child(3) { transition-delay: 0.22s !important; }

  .services-list .service-item:nth-child(2) { transition-delay: 0.10s !important; }
  .services-list .service-item:nth-child(3) { transition-delay: 0.20s !important; }
  .services-list .service-item:nth-child(4) { transition-delay: 0.30s !important; }
  .services-list .service-item:nth-child(5) { transition-delay: 0.40s !important; }
  .services-list .service-item:nth-child(6) { transition-delay: 0.50s !important; }

  /* 4. Visual placeholder hover lift + gradient shimmer */
  .visual-placeholder {
    background-size: 200% 200%;
    background-position: 0% 0%;
    transition:
      transform 0.35s ease,
      box-shadow 0.35s ease,
      background-position 0.8s ease;
  }
  *:hover > .visual-placeholder,
  .service-card:hover .visual-placeholder {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 12px 36px rgba(26, 26, 46, 0.18);
    background-position: 100% 100%;
  }

  /* 5. CTA button shimmer — pseudo-element glissant au hover */
  .btn-primary,
  .btn-gold,
  .cta-banner .btn-light {
    position: relative;
    overflow: hidden;
  }
  .btn-primary::after,
  .btn-gold::after,
  .cta-banner .btn-light::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.22),
      transparent
    );
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
  }
  .btn-primary:hover::after,
  .btn-gold:hover::after,
  .cta-banner .btn-light:hover::after {
    left: 160%;
  }

  /* 6. Focus-visible ring — accent or, offset animé à l'activation */
  :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 2px;
    transition: outline-offset 0.15s ease;
  }

  /* 7. Header CTA btn-rdv hover — micro-lift */
  .btn-rdv {
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  }
  .btn-rdv:hover {
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.4);
  }

}
