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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-primary);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 3.5rem 0; }
.section--alt { background: #F8FAFC; }

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

/* ── Header & Nav ── */
.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,64,175,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}
.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }

.site-nav { position: relative; }

.nav-list {
  display: none;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}
.nav-list a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-text);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  text-decoration: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
  text-decoration: none;
}
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}
.btn--accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn--accent:hover {
  background: #0e7490;
  border-color: #0e7490;
  color: #fff;
  text-decoration: none;
}
.btn--lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

/* ── Mobile menu ── */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.site-nav.nav--open .nav-list {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.85rem + 2px);
  right: -1.25rem;
  left: -200vw;
  background: var(--color-bg);
  padding: 1.5rem 1.25rem;
  border-top: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 8px 24px rgba(30,64,175,0.1);
  gap: 1.25rem;
  z-index: 200;
}
.site-nav.nav--open .nav-list a {
  font-size: 1rem;
  padding: 0.5rem 0;
}

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

/* ── Hero ── */
.hero {
  background: linear-gradient(150deg, #EFF6FF 0%, #F1F5F9 100%);
  padding: 3rem 0 2.5rem;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.hero__content { flex: 1 1 50%; }
.hero__visual  { flex: 1 1 50%; }

.hero__label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(8,145,178,0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.hero__title { color: var(--color-primary); margin-bottom: 1rem; }
.hero__intro {
  font-size: 1.05rem;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 520px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.hero__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
}
.hero__phone:hover { text-decoration: underline; }

/* ── Page Hero ── */
.page-hero {
  background: linear-gradient(150deg, #EFF6FF 0%, #F1F5F9 100%);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid #E2E8F0;
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero .lead {
  font-size: 1.08rem;
  color: #374151;
  max-width: 600px;
  line-height: 1.75;
}

/* ── Section headers ── */
.section__header { margin-bottom: 2rem; }
.section__label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(8,145,178,0.08);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 0.6rem;
}
.section__title { margin-bottom: 0.5rem; }
.section__sub   { color: #6B7280; font-size: 1.05rem; max-width: 560px; }

/* ── Feature cards ── */
.features { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.feature-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
}
.feature-card h3 { color: var(--color-primary); margin-bottom: 0.5rem; }
.feature-card p  { color: #4B5563; font-size: 0.95rem; }

/* ── Services grid ── */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.service-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card--no-visual { padding: 1.5rem; }
.service-card__body { padding: 1.25rem 1.25rem 1.5rem; flex: 1; }
.service-card h3 { color: var(--color-primary); margin-bottom: 0.5rem; }
.service-card p  { color: #4B5563; font-size: 0.95rem; margin-bottom: 0.75rem; }
.service-card ul { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.service-card ul li {
  font-size: 0.9rem;
  color: #374151;
  padding-left: 1.1rem;
  position: relative;
}
.service-card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ── Info row ── */
.info-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
.info-row__content p {
  color: #374151;
  margin-bottom: 0.85rem;
  line-height: 1.75;
}
.info-row__content h2 { margin-bottom: 1rem; }

/* ── CTA section ── */
.cta-section {
  background: var(--color-primary);
  padding: 4rem 0;
  text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p  { color: #BFDBFE; margin-bottom: 2rem; font-size: 1.05rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.cta-section .btn--white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.cta-section .btn--white:hover {
  background: #EFF6FF;
  border-color: #EFF6FF;
  color: var(--color-primary);
  text-decoration: none;
}
.cta-section .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.cta-section .btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
  text-decoration: none;
}

/* ── Social proof ── */
.social-proof { background: #F8FAFC; padding: 3rem 0; }
.social-proof__quote {
  font-style: italic;
  color: #4B5563;
  font-size: 1.05rem;
  line-height: 1.75;
  border-left: 4px solid var(--color-accent);
  padding-left: 1.25rem;
  max-width: 680px;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
.about-text p { color: #374151; line-height: 1.8; margin-bottom: 1rem; }
.about-text h2 { margin-bottom: 1.25rem; }

.cabinet-badge {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.cabinet-badge h3 { font-size: 1rem; margin-bottom: 0.6rem; color: var(--color-primary); }
.cabinet-badge address { font-style: normal; line-height: 1.8; color: #374151; font-size: 0.95rem; }

/* ── Contact ── */
.contact-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.contact-info h2 { margin-bottom: 1.25rem; }
.contact-info address { font-style: normal; line-height: 1.9; color: #374151; }
.contact-info a { color: var(--color-primary); }

.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
  margin: 0.75rem 0;
  text-decoration: none;
}
.contact-phone:hover { text-decoration: underline; }

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(8,145,178,0.08);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 0.75rem;
  text-decoration: none;
}
.contact-pill:hover { background: rgba(8,145,178,0.15); text-decoration: none; }

.map-wrapper {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  aspect-ratio: 16/9;
  margin-top: 1.5rem;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Contact Form ── */
.contact-form-section { background: #F8FAFC; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 640px;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
}
.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.8rem; color: #6B7280; margin-top: 0.5rem; line-height: 1.5; }

/* ── Cabinet secondaire ── */
.cabinet-secondary {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid var(--color-secondary);
}
.cabinet-secondary h3 { color: var(--color-primary); margin-bottom: 0.6rem; }
.cabinet-secondary address { font-style: normal; line-height: 1.75; color: #4B5563; font-size: 0.95rem; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.82rem;
  color: #6B7280;
  padding: 0.75rem 0 0;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb span { margin: 0 0.35rem; color: #9CA3AF; }

/* ── Info box ── */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  color: #1e3a8a;
  font-size: 0.95rem;
  line-height: 1.7;
}
.info-box strong { font-family: var(--font-display); }

/* ── Footer ── */
.site-footer {
  background: #111827;
  color: #9CA3AF;
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #F9FAFB;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col p,
.footer-col address {
  font-size: 0.9rem;
  line-height: 1.8;
  font-style: normal;
}
.footer-col a {
  display: block;
  color: #9CA3AF;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: #F9FAFB; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #1F2937;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-logo { height: 36px; width: auto; opacity: 0.7; }

/* ── Responsive ── */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .nav-list { display: flex; }
  .site-nav.nav--open .nav-list {
    position: static;
    flex-direction: row;
    padding: 0;
    border: none;
    box-shadow: none;
    top: auto; left: auto; right: auto;
  }

  .hero__inner { flex-direction: row; align-items: center; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .info-row { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 3fr 2fr; }
  .contact-layout { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* ════════════════════════════════════════════════════
   Animation Pass — WEB-4417 · Cabinet Alexandre BÖHRER
   5 groupes CSS-only, GPU-friendly, a11y-safe
   Encapsulé dans prefers-reduced-motion: no-preference
════════════════════════════════════════════════════ */

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

  /* — Keyframes — */
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes revealUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes placeholderBreath {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.8; }
  }

  /* 1 · Hero entrance (page load) */
  .hero__content {
    animation: heroIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
  }
  .hero__visual {
    animation: heroIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
  }
  .page-hero h1 {
    animation: heroIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
  }
  .page-hero .lead {
    animation: heroIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
  }

  /* 2 · Scroll reveal — CSS scroll-driven (Chromium 115+, dégrade gracefully) */
  .feature-card,
  .service-card,
  .social-proof__quote,
  .cabinet-secondary,
  .cabinet-badge {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  .cta-section h2 {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
  .cta-actions {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 8% entry 42%;
  }

  /* 3 · Feature card hover lift */
  .feature-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-left-color 0.25s ease;
  }
  .feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(30, 64, 175, 0.13);
    border-left-color: #0891B2;
  }

  /* 4 · Service card hover lift */
  .service-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(30, 64, 175, 0.10);
  }

  /* 5 · Visual placeholder — respiration douce + hover lift */
  .visual-placeholder {
    animation: placeholderBreath 5s ease-in-out infinite;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }
  .visual-placeholder:hover {
    transform: scale(1.025);
    box-shadow: 0 10px 36px rgba(30, 64, 175, 0.16);
    animation-play-state: paused;
  }

  /* Focus ring élégant — accessibilité */
  .btn:focus-visible,
  a:focus-visible,
  button:focus-visible {
    outline: 3px solid #1E40AF;
    outline-offset: 3px;
    border-radius: 4px;
    transition: outline-offset 0.15s ease;
  }

}

/* Sécurité reduced-motion — pipeline standard */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
