/* ============================================================
   SCM SAINT MARTIN — Cabinet dentaire Fontaine-lès-Dijon
   Feuille de style commune
   ============================================================ */

:root {
  /* Bleu marine officiel du logo */
  --bleu-profond: #152131;
  --bleu-marine: #1f3047;
  --bleu-medium: #2c5f8d;
  --bleu-clair: #5b8bb5;
  --bleu-pale: #e8f0f7;
  --bleu-tres-pale: #f4f8fb;
  /* Vert botanique (rappel mur végétal) */
  --vert-botanique: #4a6b4d;
  --vert-sauge: #87a085;
  --vert-pale: #e8efe8;
  /* Neutres */
  --creme: #f5f0e6;
  --blanc: #ffffff;
  --blanc-casse: #fafaf7;
  --texte: #1a2332;
  --texte-doux: #5a6478;
  --texte-clair: #8a96aa;
  --bordure: #e2e8f0;
  --bordure-claire: #eef2f6;
  /* Typo */
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Ombres */
  --shadow-sm: 0 4px 12px rgba(21, 33, 49, 0.04);
  --shadow-md: 0 10px 30px rgba(21, 33, 49, 0.08);
  --shadow-lg: 0 30px 60px rgba(21, 33, 49, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--texte);
  background: var(--blanc-casse);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bordure);
  transition: all 0.3s ease;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo img { height: 56px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: nowrap; }
.nav-item { position: relative; }
.nav-item > a {
  font-size: 0.88rem;
  color: var(--texte);
  font-weight: 400;
  position: relative;
  transition: color 0.2s;
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.nav-item > a:hover { color: var(--bleu-medium); }
.nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--bleu-medium);
  transition: width 0.3s ease;
}
.nav-item > a:hover::after { width: 100%; }
.nav-item.has-dropdown > a::after { display: none; }
.nav-item.has-dropdown > a .chev {
  width: 10px;
  height: 10px;
  transition: transform 0.2s;
}
.nav-item.has-dropdown:hover > a .chev { transform: rotate(180deg); }
.dropdown {
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 260px;
  background: white;
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 0.7rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  color: var(--texte);
  border-radius: 8px;
  transition: all 0.15s;
}
.dropdown a:hover { background: var(--bleu-tres-pale); color: var(--bleu-profond); }
.dropdown a small {
  display: block;
  font-size: 0.75rem;
  color: var(--texte-clair);
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  background: var(--bleu-profond);
  color: white;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--body);
}
.btn:hover {
  background: var(--bleu-marine);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(21, 33, 49, 0.25);
}
.header-cta {
  padding: 0.65rem 1.2rem;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 1280px) and (min-width: 1101px) {
  .header-cta { display: none; }
}
.btn-outline {
  background: transparent;
  color: var(--bleu-profond);
  border: 1px solid var(--bleu-profond);
}
.btn-outline:hover { background: var(--bleu-profond); color: white; }
.btn-vert { background: var(--vert-botanique); }
.btn-vert:hover { background: var(--vert-sauge); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bleu-profond);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============ TYPO COMMUNE ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bleu-medium);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--bleu-medium);
}
.eyebrow-vert { color: var(--vert-botanique); }
.eyebrow-vert::before { background: var(--vert-botanique); }

.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  color: var(--bleu-profond);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.section-title em { font-style: italic; color: var(--bleu-medium); }
.section-subtitle {
  font-size: 1.05rem;
  color: var(--texte-doux);
  line-height: 1.7;
  max-width: 600px;
}

/* ============ SECTIONS GENERIC ============ */
section { padding: 7rem 2rem; }
.container { max-width: 1300px; margin: 0 auto; }
.container-narrow { max-width: 900px; margin: 0 auto; }
.section-header { max-width: 800px; margin-bottom: 5rem; }

/* ============ PAGE HEADER (sous-pages) ============ */
.page-hero {
  padding: 11rem 2rem 5rem;
  background: linear-gradient(135deg, #f4f8fb 0%, #e8f0f7 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  height: 130%;
  background: radial-gradient(circle, rgba(91, 139, 181, 0.18) 0%, transparent 70%);
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 40%;
  height: 100%;
  background: radial-gradient(circle, rgba(74, 107, 77, 0.12) 0%, transparent 70%);
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--texte-doux);
  margin-bottom: 1.8rem;
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--bleu-medium); }
.breadcrumb svg { width: 12px; height: 12px; opacity: 0.5; }
.page-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--bleu-profond);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 800px;
}
.page-title em { font-style: italic; color: var(--bleu-medium); }
.page-lead {
  font-size: 1.15rem;
  color: var(--texte-doux);
  max-width: 700px;
  line-height: 1.7;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bleu-profond);
  color: rgba(255, 255, 255, 0.7);
  padding: 5rem 2rem 2rem;
}
.footer-inner { max-width: 1300px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand img {
  height: 50px;
  margin-bottom: 1.2rem;
  filter: brightness(0) invert(1);
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--display);
  font-weight: 400;
  color: white;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}
.footer-col a {
  display: block;
  font-size: 0.88rem;
  padding: 0.4rem 0;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a:hover { color: white; }
.footer-bottom-left { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-credits { font-size: 0.78rem; color: rgba(255, 255, 255, 0.4); font-style: italic; }
.footer-credits a { color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: color 0.2s; }
.footer-credits a:hover { color: rgba(255, 255, 255, 0.85); }
.footer-disclaimer {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

/* ============ CARDS GENERIC ============ */
.card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid var(--bordure);
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--bleu-clair);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bleu-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}
.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--bleu-profond);
  fill: none;
  stroke-width: 1.5;
  transition: all 0.3s ease;
}
.card:hover .card-icon { background: var(--bleu-profond); }
.card:hover .card-icon svg { stroke: white; }
.card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--bleu-profond);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}
.card p {
  color: var(--texte-doux);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 2rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--bordure);
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav-item > a { padding: 0.8rem 0; }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--bordure);
    border-radius: 0;
    padding: 0 0 0 1rem;
    margin: 0.3rem 0 0.7rem 0.5rem;
  }
  .nav-item.has-dropdown:hover > a .chev { transform: none; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  section { padding: 5rem 1.5rem; }
  .header-inner { padding: 0.9rem 1.5rem; }
  .page-hero { padding: 9rem 1.5rem 4rem; }
  .footer-top { grid-template-columns: 1fr; }
  .card { padding: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .footer-credits { line-height: 1.6; }
}

/* ═══════════════════════════════════════════════════════════════
   EFFETS VISUELS RAFFINÉS (hover, scroll-reveal)
   ═══════════════════════════════════════════════════════════════ */

/* 1. CARTES QUI SE SOULÈVENT au survol */
.card,
.related-card,
.blog-home-card,
.cab-mosaic-item,
.soin-card {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}
.card:hover,
.related-card:hover,
.blog-home-card:hover,
.cab-mosaic-item:hover,
.soin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(21, 33, 49, 0.10);
  border-color: rgba(91, 139, 181, 0.35);
}

/* Cartes praticiens : effet plus marqué car ce sont des liens */
a.praticien-card,
a[class*="praticien"] {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s ease;
  display: block;
}
a.praticien-card:hover,
a[class*="praticien"]:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(21, 33, 49, 0.12);
}

/* 2. ZOOM SUR LES PHOTOS de la galerie + liseré */
.gallery-item {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  transition: box-shadow 0.4s ease;
}
.gallery-item img {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-item:hover {
  box-shadow: 0 8px 24px rgba(21, 33, 49, 0.15);
}
.gallery-item .caption {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 3. SOULIGNEMENT ANIMÉ sur les liens "Voir le profil" / "Lire l'article" */
.read-more,
.article-read-more,
.see-profile,
a[class*="read"],
a[class*="profile"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  padding-bottom: 2px;
}
.read-more::after,
.article-read-more::after,
.see-profile::after,
a[class*="read"]::after,
a[class*="profile"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.read-more:hover::after,
.article-read-more:hover::after,
.see-profile:hover::after,
a[class*="read"]:hover::after,
a[class*="profile"]:hover::after {
  width: 100%;
}

/* 4. FLÈCHE QUI GLISSE sur les boutons et liens d'action */
.btn svg,
.cta-link svg,
a svg {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn:hover svg,
.cta-link:hover svg,
a:hover > svg {
  transform: translateX(3px);
}

/* 5. FADE-IN AU SCROLL — animation déclenchée via IntersectionObserver (JS) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Délai progressif pour les éléments en grille */
.scroll-reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scroll-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.scroll-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.scroll-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.scroll-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.scroll-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.scroll-reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; opacity: 1; transform: translateY(0); }
.scroll-reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }

/* 6. RESPECT DES PRÉFÉRENCES D'ACCESSIBILITÉ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-reveal,
  .scroll-reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
