/* Template Vague — Cabinet Dampierre Kinésithérapie */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap');
@import './tokens.css';

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── Reset ─── */
*, *::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.7;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Skip link ─── */
.skip-link {
  position: absolute; left: -9999px; top: 1rem;
  background: var(--color-primary); color: #fff;
  padding: .5rem 1rem; border-radius: 4px; z-index: 9999;
  font-family: var(--font-body); font-size: .9rem;
}
.skip-link:focus { left: 1rem; }

/* ─── Typography scale ─── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { font-size: 1rem; font-weight: 400; }

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

/* ─── NAV — single sticky bar (Vague signature) ─── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 2px 12px rgba(30,58,138,.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem; max-width: 1080px; margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 48px; width: auto; }
.nav-links {
  display: none; flex-direction: column; gap: .25rem;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--color-bg); padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 4px 16px rgba(30,58,138,.1);
}
.nav-links.open { display: flex; }
.nav-links a {
  font-family: var(--font-display); font-size: .9rem; font-weight: 600;
  color: var(--color-text); padding: .5rem 0;
  border-bottom: 1px solid #f1f5f9; letter-spacing: .04em;
  transition: color 150ms;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); }
.nav-cta-phone {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--color-primary); color: #fff;
  font-family: var(--font-display); font-size: .85rem; font-weight: 700;
  padding: .55rem 1rem; border-radius: 6px;
  transition: background 150ms;
}
.nav-cta-phone:hover { background: #162d6b; }
.nav-hamburger {
  background: none; border: none; cursor: pointer; padding: .4rem;
  display: flex; flex-direction: column; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--color-primary); border-radius: 2px; transition: all 250ms;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.nav-right { display: flex; align-items: center; gap: 1rem; }

/* ─── Hero — Vague gradient split ─── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 60%, #0369a1 100%);
  color: #fff; padding: 3.5rem 0 2.5rem;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner { display: flex; flex-direction: column; gap: 2rem; }
.hero-text { display: flex; flex-direction: column; gap: 1.25rem; }
.hero-eyebrow {
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-accent);
}
.hero h1 { color: #fff; }
.hero-intro { font-size: 1.05rem; color: rgba(255,255,255,.88); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--color-accent); color: #fff;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  padding: .8rem 1.5rem; border-radius: 8px;
  transition: background 150ms, transform 150ms;
  white-space: nowrap;
}
.btn-primary:hover { background: #0284c7; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center;
  border: 2px solid rgba(255,255,255,.7); color: #fff;
  font-family: var(--font-display); font-size: .95rem; font-weight: 600;
  padding: .75rem 1.25rem; border-radius: 8px;
  transition: border-color 150ms, background 150ms;
}
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.badge {
  background: rgba(255,255,255,.15); color: #fff;
  font-family: var(--font-display); font-size: .75rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 20px; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.3);
}
.hero-visual {
  width: 100%; max-width: 380px; align-self: center;
}

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

/* ─── Section utilities ─── */
.section { padding: 3.5rem 0; }
.section--alt { background: #f0f5ff; }
.section-label {
  font-family: var(--font-display); font-size: .75rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: .5rem;
}
.section-title { color: var(--color-primary); margin-bottom: 1rem; }
.section-intro { font-size: 1.05rem; color: #4b5563; max-width: 640px; margin-bottom: 2rem; }

/* ─── Specialty cards grid ─── */
.specialties-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2rem;
}
.specialty-card {
  background: var(--color-bg); border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: border-color 200ms, box-shadow 200ms;
}
.specialty-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 24px rgba(14,165,233,.12);
}
.specialty-icon {
  width: 48px; height: 48px;
  background: color-mix(in srgb, var(--color-primary) 8%, white);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.specialty-icon svg { width: 24px; height: 24px; stroke: var(--color-primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.specialty-card h3 { color: var(--color-primary); font-size: 1.05rem; }
.specialty-card p { font-size: .92rem; color: #4b5563; line-height: 1.6; }
.specialty-card ul { padding-left: 1rem; list-style: disc; font-size: .9rem; color: #6b7280; line-height: 1.8; }

/* ─── Values grid ─── */
.values-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
.value-block { display: flex; flex-direction: column; gap: .5rem; }
.value-block h3 { color: var(--color-primary); font-size: 1.1rem; }
.value-block p { font-size: .95rem; color: #374151; }

/* ─── CTA Banner ─── */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%);
  color: #fff; padding: 3rem 0; text-align: center;
}
.cta-banner h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 1rem; }
.cta-banner p { opacity: .9; margin-bottom: 1.75rem; font-size: 1.05rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.btn-white {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; color: var(--color-primary);
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  padding: .8rem 1.5rem; border-radius: 8px;
  transition: background 150ms, transform 150ms;
}
.btn-white:hover { background: #f0f5ff; transform: translateY(-1px); }
.btn-outline-white {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 2px solid rgba(255,255,255,.8); color: #fff;
  font-family: var(--font-display); font-size: .95rem; font-weight: 600;
  padding: .75rem 1.25rem; border-radius: 8px;
  transition: border-color 150ms, background 150ms;
}
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,.15); }

/* ─── Info bar ─── */
.info-bar {
  background: color-mix(in srgb, var(--color-primary) 6%, white);
  border: 1px solid #dbeafe; border-radius: 10px;
  padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .75rem;
  margin-top: 1.5rem;
}
.info-item { display: flex; align-items: flex-start; gap: .75rem; }
.info-item svg { width: 20px; height: 20px; stroke: var(--color-primary); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: .15rem; stroke-linecap: round; stroke-linejoin: round; }
.info-item strong { font-family: var(--font-display); font-size: .85rem; color: var(--color-primary); display: block; }
.info-item span { font-size: .9rem; color: #374151; }

/* ─── Contact form ─── */
.contact-layout { display: flex; flex-direction: column; gap: 2.5rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
  font-family: var(--font-display); font-size: .85rem; font-weight: 600;
  color: var(--color-primary);
}
.form-group input, .form-group textarea, .form-group select {
  border: 1.5px solid #cbd5e1; border-radius: 8px; padding: .7rem .9rem;
  font-family: var(--font-body); font-size: 1rem; color: var(--color-text);
  background: #fff; width: 100%;
  transition: border-color 150ms, box-shadow 150ms;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-row { display: flex; flex-direction: column; gap: 1rem; }
.form-submit {
  background: var(--color-primary); color: #fff;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  border: none; cursor: pointer; padding: .85rem 1.75rem;
  border-radius: 8px; transition: background 150ms;
  align-self: flex-start; width: 100%;
}
.form-submit:hover { background: #162d6b; }
.form-notice { font-size: .82rem; color: #6b7280; margin-top: .75rem; }

/* ─── Map placeholder ─── */
.map-placeholder {
  background: #e2e8f0; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 2.5rem 1.5rem; text-align: center;
  color: #64748b; font-size: .9rem; min-height: 240px;
  border: 1.5px dashed var(--color-secondary);
}
.map-placeholder svg { width: 40px; height: 40px; stroke: var(--color-secondary); fill: none; stroke-width: 1.5; }
.map-placeholder strong { color: var(--color-primary); font-family: var(--font-display); font-size: 1rem; }

/* ─── Page header (inner pages) ─── */
.page-header {
  background: var(--color-primary); color: #fff;
  padding: 2.5rem 0 2rem;
}
.page-header h1 { color: #fff; }
.page-header p { color: rgba(255,255,255,.85); margin-top: .75rem; font-size: 1.05rem; }
.breadcrumb {
  font-size: .82rem; color: rgba(255,255,255,.7);
  margin-bottom: .75rem; font-family: var(--font-display);
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: #fff; }

/* ─── About section ─── */
.about-lead { font-size: 1.1rem; color: #374151; line-height: 1.8; margin-bottom: 2rem; }
.secteur-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: color-mix(in srgb, var(--color-accent) 10%, white);
  border: 1.5px solid var(--color-accent);
  color: var(--color-primary); font-family: var(--font-display);
  font-size: .9rem; font-weight: 700; padding: .5rem 1rem; border-radius: 6px;
  margin-bottom: 2rem;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--color-primary); color: rgba(255,255,255,.85);
  padding: 3rem 0 1.5rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: .75rem; }
.footer-logo img { height: 40px; filter: brightness(0) invert(1); }
.footer-tagline { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-nav h4, .footer-contact-block h4 {
  font-family: var(--font-display); font-size: .8rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: .75rem;
}
.footer-nav ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-nav a { font-size: .9rem; color: rgba(255,255,255,.8); transition: color 150ms; }
.footer-nav a:hover { color: #fff; }
.footer-contact-block { display: flex; flex-direction: column; gap: .5rem; }
.footer-phone {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  color: #fff; transition: color 150ms;
}
.footer-phone:hover { color: var(--color-accent); }
.footer-contact-block p { font-size: .85rem; color: rgba(255,255,255,.7); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.25rem;
  display: flex; flex-direction: column; gap: .5rem;
  font-size: .78rem; color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.55); transition: color 150ms; }
.footer-bottom a:hover { color: rgba(255,255,255,.85); }

/* ─── Mentions légales ─── */
.mentions-content h2 { margin-top: 2.5rem; margin-bottom: .75rem; }
.mentions-content p { margin-bottom: .75rem; }

/* ─── ≥ 640 px (tablet) ─── */
@media (min-width: 640px) {
  .specialties-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr 1fr; }
  .form-row { flex-direction: row; }
  .form-submit { width: auto; }
  .footer-inner { flex-direction: row; flex-wrap: wrap; gap: 2rem; }
  .footer-brand { flex: 1; min-width: 180px; }
  .footer-nav, .footer-contact-block { min-width: 150px; }
}

/* ─── ≥ 1024 px (desktop) ─── */
@media (min-width: 1024px) {
  .nav-links {
    display: flex !important; flex-direction: row;
    position: static; border: none; box-shadow: none; padding: 0;
    gap: 1.75rem;
  }
  .nav-links a { border: none; padding: 0; }
  .nav-hamburger { display: none; }
  .hero-inner { flex-direction: row; align-items: center; gap: 3rem; }
  .hero-text { flex: 1; }
  .hero-visual { flex: 0 0 360px; max-width: 360px; }
  .contact-layout { flex-direction: row; gap: 3rem; }
  .contact-layout > *:first-child { flex: 1.1; }
  .contact-layout > *:last-child { flex: 0.9; }
  .info-bar { flex-direction: row; flex-wrap: wrap; gap: 1.25rem; }
  .info-item { flex: 1 1 180px; }
  .specialties-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── AnimationDesigner — Template Vague (WEB-4254) ─── */

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

  /* 1 — Hero entrance: staggered fade-up on load */
  @keyframes vague-fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hero-eyebrow { animation: vague-fade-up 480ms ease-out both; animation-delay:  60ms; }
  .hero h1      { animation: vague-fade-up 560ms ease-out both; animation-delay: 180ms; }
  .hero-intro   { animation: vague-fade-up 560ms ease-out both; animation-delay: 300ms; }
  .hero-actions { animation: vague-fade-up 480ms ease-out both; animation-delay: 400ms; }
  .hero-badges  { animation: vague-fade-up 480ms ease-out both; animation-delay: 480ms; }
  .hero-visual  { animation: vague-fade-up 640ms ease-out both; animation-delay: 250ms; }

  /* 2 — Scroll-reveal: JS adds .js to <html>, IO adds .revealed; no-JS = visible */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 550ms ease-out, transform 550ms ease-out;
  }
  .js [data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
  }
  /* Stagger siblings */
  .js .specialty-card[data-reveal]:nth-child(2) { transition-delay:  90ms; }
  .js .specialty-card[data-reveal]:nth-child(3) { transition-delay: 180ms; }
  .js .value-block[data-reveal]:nth-child(2)    { transition-delay:  90ms; }
  .js .value-block[data-reveal]:nth-child(3)    { transition-delay: 180ms; }

  /* 3 — Visual placeholder hover lift */
  .visual-placeholder {
    transition: transform 320ms ease, box-shadow 320ms ease;
  }
  .visual-placeholder:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(30, 58, 138, 0.14);
  }

  /* 5 — CTA btn-white soft pulse ring (non-flashing: opacity-only shadow, <3 Hz impossible) */
  @keyframes vague-pulse-ring {
    0%   { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0);    }
  }
  .cta-banner .btn-white {
    animation: vague-pulse-ring 2.6s ease-out infinite;
  }

  /* 6 — :focus-visible ring enhancement */
  :focus-visible {
    outline: 2.5px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 4px;
  }
}

/* 4 — Nav animated underline (desktop only, no mobile conflict) */
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
  .nav-links a {
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: color 150ms, background-size 250ms ease-out;
  }
  .nav-links a:hover,
  .nav-links a[aria-current="page"] {
    color: var(--color-primary);
    background-size: 100% 2px;
  }
}
