:root {
  --teal: #0f766e;
  --teal-dark: #0b5a54;
  --teal-light: #e6f4f3;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #fdf9f2;
  --cream: #f3e9da;
  --border: #e5e7eb;
  --danger: #dc2626;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--teal); }

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(253, 249, 242, 0.95);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--teal-dark);
  text-decoration: none;
  animation: none;
}

nav.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover { color: var(--teal); }

nav.site-nav a.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}

nav.site-nav a.btn-nav {
  color: white;
  border-bottom: none;
  margin-left: 0.5rem;
}

nav.site-nav a.btn-nav:hover { color: white; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.3rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  nav.site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-top: 1rem;
    gap: 0.75rem;
  }

  nav.site-nav.open { display: flex; }

  header.site-header {
    flex-wrap: wrap;
  }
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--teal-dark); }

.btn.secondary {
  background: white;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.btn.secondary:hover { background: var(--teal-light); }

.btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--cream), var(--bg));
}

.hero-content { flex: 1 1 380px; }

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 1rem;
  color: var(--teal-dark);
  animation: titre-apparition 0.8s ease both;
  animation-delay: 0.1s;
}

.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.5rem; }

.hero-visual {
  flex: 1 1 300px;
  min-height: 220px;
  border-radius: var(--radius);
  background: var(--teal-light);
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

section { padding: 3rem 2rem; max-width: 1100px; margin: 0 auto; }

section h2 {
  position: relative;
  display: inline-block;
  color: var(--teal-dark);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--teal);
  transition: width 0.7s ease 0.2s;
}

section h2.visible::after { width: 56px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: white;
}

.card h3 { margin-top: 0; color: var(--teal-dark); }
.card p { color: var(--muted); margin-bottom: 0; }

.team-member {
  text-align: center;
}

.team-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 0.75rem;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.3rem;
}

.footer-grid a:hover { color: var(--teal); }

.footer-title {
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* --- Pages de contenu (sous-pages) --- */

.page-hero {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--cream), var(--bg));
  text-align: center;
}

@keyframes titre-apparition {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes trait-dessine {
  from { width: 0; }
  to { width: 64px; }
}

.page-hero h1 {
  position: relative;
  display: inline-block;
  color: var(--teal-dark);
  font-size: 2.1rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  animation: titre-apparition 0.8s ease both;
  animation-delay: 0.1s;
}

.page-hero h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--teal);
  transform: translateX(-50%);
  animation: trait-dessine 0.6s ease both;
  animation-delay: 0.1s;
}

.page-hero p { transition-delay: 150ms; }

.page-hero p {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.breadcrumb a { color: var(--muted); }

/* Photos */

.photo-placeholder {
  border-radius: var(--radius);
  min-height: 180px;
  overflow: hidden;
  position: relative;
  margin: 0;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.photo-placeholder figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: white;
  background: linear-gradient(to top, rgba(11, 90, 84, 0.85), transparent);
}

.photo-placeholder--round {
  border-radius: 50%;
  width: 110px;
  height: 110px;
  min-height: 0;
  margin: 0 auto 0.75rem;
}

.photo-placeholder--round img { min-height: 0; }

.photo-placeholder--wide { height: 320px; }

.photo-placeholder--wide img { height: 320px; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.photo-gallery .photo-placeholder { min-height: 160px; }
.photo-gallery .photo-placeholder img { min-height: 160px; }

.map-placeholder {
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--teal-dark);
  min-height: 180px;
  text-align: center;
  padding: 1rem;
}

.map-placeholder span { font-size: 2.5rem; }

.map-placeholder p {
  font-size: 0.8rem;
  color: var(--teal-dark);
  opacity: 0.75;
  margin: 0;
}

.map-placeholder--wide { min-height: 260px; }

a.map-placeholder {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

a.map-placeholder:hover { opacity: 0.85; }

.map-placeholder .map-adresse {
  font-weight: 600;
  opacity: 1;
}

/* Cartes valeurs / avantages */

.value-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: white;
}

.value-card .icon { font-size: 1.8rem; margin-bottom: 0.5rem; display: block; }

/* Équipe */

.staff-card { text-align: center; }

.staff-specialite {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.1rem 0 0.6rem;
}

/* Timeline (étapes d'un traitement) */

.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  counter-reset: etape;
}

.timeline li {
  counter-increment: etape;
  position: relative;
  padding: 0 0 1.5rem 3rem;
  border-left: 2px solid var(--teal-light);
}

.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline li::before {
  content: counter(etape);
  position: absolute;
  left: -18px;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline h4 { margin: 0 0 0.3rem; color: var(--teal-dark); }
.timeline p { margin: 0; color: var(--muted); }

/* FAQ */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.9rem;
  background: white;
}

.faq-item h4 { margin: 0 0 0.4rem; color: var(--teal-dark); }
.faq-item p { margin: 0; color: var(--muted); }

/* Bandeau urgence */

.urgence-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.urgence-banner h3 { color: #991b1b; margin-top: 0; }

.urgence-banner .btn { background: #b91c1c; }
.urgence-banner .btn:hover { background: #991b1b; }

/* Liens "en savoir plus" sur les cartes soins */

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

/* --- Page de prise de rendez-vous --- */

.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .booking-layout { grid-template-columns: 1fr; }
}

.booking-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: white;
}

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.field input[type="date"],
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.slot-btn {
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: white;
  color: var(--teal-dark);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.slot-btn:hover { background: var(--teal-light); }

.slot-btn.selected {
  background: var(--teal);
  color: white;
}

.empty-msg, .info-msg {
  color: var(--muted);
  font-style: italic;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }

/* --- Admin --- */

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

table.admin-table th,
table.admin-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

table.admin-table th { color: var(--muted); font-weight: 600; }

.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.confirme { background: #dcfce7; color: #166534; }
.status-badge.annule { background: #fee2e2; color: #991b1b; }

.link-danger {
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Animations d'apparition et de survol --- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.booking-layout > div > p.reveal:nth-of-type(2) { transition-delay: 150ms; }
.booking-layout > div > p.reveal:nth-of-type(3) { transition-delay: 300ms; }

.grid > .reveal:nth-child(2),
.photo-gallery > .reveal:nth-child(2) { transition-delay: 90ms; }
.grid > .reveal:nth-child(3),
.photo-gallery > .reveal:nth-child(3) { transition-delay: 180ms; }
.grid > .reveal:nth-child(4),
.photo-gallery > .reveal:nth-child(4) { transition-delay: 270ms; }
.grid > .reveal:nth-child(5) { transition-delay: 360ms; }
.grid > .reveal:nth-child(6) { transition-delay: 450ms; }

.timeline li.reveal:nth-child(2) { transition-delay: 90ms; }
.timeline li.reveal:nth-child(3) { transition-delay: 180ms; }
.timeline li.reveal:nth-child(4) { transition-delay: 270ms; }

.hero-visual.reveal { transition-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .page-hero h1, .hero h1, .page-hero h1::after {
    animation: none;
  }

  .page-hero h1::after { width: 64px; }
}

.card, .value-card, .staff-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover, .value-card:hover, .staff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
}

.photo-placeholder img {
  transition: transform 0.5s ease;
}

.photo-placeholder:hover img {
  transform: scale(1.06);
}

