/* =========================================================
   XINHUI — Site web (FR / EN / 中文)
   Palette inspirée des maquettes : bleu ciel, navy, blanc, papier
   ========================================================= */

:root {
  --blue-100: #EAF5FB;
  --blue-200: #C7E3F2;
  --blue-300: #87C2E2;
  --blue-400: #5BA9DC;
  --blue-500: #4A8DBE;
  --blue-600: #2A5A7E;
  --navy: #1F3A52;
  --ink: #1A2B3D;
  --body: #4A5568;
  --muted: #6B7C8C;
  --paper: #FAF6EE;
  --bg: #FFFFFF;
  --bg-soft: #F5F9FC;
  --line: #E1ECF3;
  --shadow-sm: 0 1px 2px rgba(31, 58, 82, 0.06);
  --shadow-md: 0 4px 16px rgba(31, 58, 82, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 58, 82, 0.12);
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --container: 1200px;
  --nav-w: 110px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--blue-500);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--blue-600); }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

/* =========================================================
   HEADER (bandeau bleu, logo, langue)
   ========================================================= */

.top-bar {
  background: linear-gradient(180deg, var(--blue-300) 0%, var(--blue-400) 100%);
  color: white;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.top-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 2px;
  color: white;
}
.brand-yin {
  width: 28px;
  height: 28px;
  display: inline-block;
}
.brand-tag {
  font-size: .8rem;
  color: rgba(255,255,255,.92);
  margin-left: 8px;
  white-space: nowrap;
}
.brand-tag-zh { display: block; font-size: .85rem; }

.lang-switch {
  display: inline-flex;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  backdrop-filter: blur(4px);
}
.lang-switch button {
  background: transparent;
  border: none;
  color: white;
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.lang-switch button:hover { background: rgba(255,255,255,.15); }
.lang-switch button.active {
  background: white;
  color: var(--blue-600);
}

/* =========================================================
   LAYOUT (sidebar nav à droite + contenu principal)
   ========================================================= */

.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: 1fr var(--nav-w);
  gap: 32px;
  min-height: 70vh;
}

main.content { min-width: 0; }

/* Navigation latérale (boutons bleus empilés) */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 100px;
  align-self: start;
}

.side-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--blue-300), var(--blue-400));
  color: white;
  padding: 14px 8px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .5px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,.4);
  line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.side-nav a span.zh { display: block; font-size: .78rem; font-weight: 500; margin-top: 4px; opacity: .9; }
.side-nav a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, var(--blue-400), var(--blue-500));
  color: white;
}
.side-nav a.current {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
  color: white;
}

/* =========================================================
   HERO (page d'accueil)
   ========================================================= */

.hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #F5EFE2 0%, #EAF1F7 60%, #DCE8F2 100%);
  min-height: 480px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: 48px;
  gap: 32px;
  box-shadow: var(--shadow-md);
}
.hero-text h1 {
  font-family: 'Caveat', 'Patrick Hand', cursive;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  color: var(--blue-600);
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero-text .subline {
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.hero-text .subline.zh { font-size: 1.15rem; }
.hero-cta {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-portrait {
  width: 100%;
  height: 380px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #E8DFC8 0%, #C9BBA0 100%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-portrait .placeholder {
  text-align: center;
  color: var(--blue-600);
  padding: 24px;
}
.hero-portrait .placeholder strong { display:block; font-size: 1.1rem; margin-bottom: 6px; }
.hero-portrait .placeholder small { color: var(--muted); font-size: .8rem; }

/* Image qui couvre le bloc portrait (cache le placeholder par-dessus) */
.hero-portrait-img,
.diploma-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.diploma-img { border-radius: 8px; }

/* =========================================================
   BOUTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, var(--blue-400), var(--blue-500));
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: white;
  color: var(--blue-600);
  border: 1px solid var(--blue-300);
}
.btn-ghost:hover {
  background: var(--blue-100);
}
.btn-block { width: 100%; }

/* =========================================================
   SECTIONS GÉNÉRIQUES
   ========================================================= */

.section {
  margin-top: 48px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--blue-300), transparent);
}
.section-title h2 { margin: 0; }
.kicker {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-600);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Cartes services */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-thumb {
  height: 140px;
  border-radius: var(--r-sm);
  margin: -8px -8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: white;
}
.card-thumb.tcm     { background: linear-gradient(135deg, #B97a3a, #6E4423); }
.card-thumb.astro   { background: linear-gradient(135deg, #6B5237, #2C1F12); }
.card-thumb.yijing  { background: linear-gradient(135deg, #C8A765, #8E6D2C); }
.card-thumb.fengshui{ background: linear-gradient(135deg, #4A8076, #1F3F38); }
.card-thumb.qi      { background: linear-gradient(135deg, #5BA9DC, #2A5A7E); }

.card h3 { margin-top: 0; color: var(--blue-600); }
.card p { color: var(--body); font-size: .95rem; margin-bottom: 0; }

/* Liste de méthodes */
.method-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}
.method-list li {
  background: var(--bg-soft);
  border-left: 3px solid var(--blue-400);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: .95rem;
}
.method-list li strong { color: var(--blue-600); }

/* Approche / méthodes — 2 colonnes */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

/* Crédentials */
.credentials {
  background: var(--bg-soft);
  border-radius: var(--r-md);
  padding: 24px;
  border: 1px solid var(--line);
}
.credentials ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.credentials li::before {
  content: '◆';
  color: var(--blue-400);
  margin-right: 10px;
  font-size: .7rem;
}

/* =========================================================
   BOOKING
   ========================================================= */

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.price-card {
  background: var(--bg);
  border: 2px solid var(--blue-200);
  border-radius: var(--r-md);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  transition: all .2s ease;
}
.price-card:hover {
  border-color: var(--blue-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.price-card .duration {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 500;
}
.price-card .price-main {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blue-600);
  margin: 8px 0 4px;
}
.price-card .price-alt {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  font-size: .9rem;
}
.price-card ul li::before {
  content: '✓';
  color: var(--blue-400);
  font-weight: 700;
  margin-right: 8px;
}

/* Formulaire questionnaire */
.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.form-field label .req { color: #C04545; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: .95rem;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  transition: border .15s ease, box-shadow .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(91, 169, 220, .18);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field .help { font-size: .8rem; color: var(--muted); margin: 0; }
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: .88rem;
}
.consent input { margin-top: 4px; }
.consent .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ABF6B; flex-shrink: 0; margin-top: 6px;
}

/* Calendly slot (legacy, peut être retiré) */
.calendly-slot {
  border: 2px dashed var(--blue-300);
  border-radius: var(--r-md);
  padding: 32px;
  text-align: center;
  background: var(--bg-soft);
  margin-top: 16px;
}
.calendly-slot h3 { color: var(--blue-600); margin-top: 0; }
.calendly-slot code {
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: .85rem;
  color: var(--ink);
  border: 1px solid var(--line);
}

/* Bloc paiement — deux colonnes */
.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.payment-card {
  background: var(--bg);
  border: 2px solid var(--blue-200);
  border-radius: var(--r-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .2s ease;
}
.payment-card:hover {
  border-color: var(--blue-400);
  box-shadow: var(--shadow-md);
}
.payment-card h3 {
  margin: 0 0 4px;
  color: var(--blue-600);
  display: flex;
  align-items: center;
  gap: 10px;
}
.payment-card h3 .flag {
  font-size: 1.4rem;
}
.payment-card .help {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

/* QR codes WeChat / Alipay */
.qr-pair {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 8px 0;
}
.qr-block {
  flex: 1 1 140px;
  text-align: center;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: 14px;
  border: 1px solid var(--line);
}
.qr-block img,
.qr-block .qr-placeholder {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  margin: 0 auto;
  display: block;
  border-radius: 6px;
  object-fit: contain;
  background: white;
}
.qr-block .qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--blue-300);
  color: var(--blue-600);
  font-size: 2rem;
}
.qr-block .qr-label {
  font-weight: 600;
  font-size: .85rem;
  margin-top: 10px;
  color: var(--ink);
}
.qr-block .qr-sub {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Cartes Choisir la durée — info uniquement, pas de bouton */
.duration-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.duration-cards .price-card { cursor: default; }
.duration-cards .price-card:hover {
  transform: none;
  border-color: var(--blue-200);
  box-shadow: none;
}

@media (max-width: 720px) {
  .payment-grid,
  .duration-cards { grid-template-columns: 1fr; }
}

/* === Étape "Et après ?" — timeline numérotée === */
.next-steps {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.next-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-400);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.next-step:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
}
.next-step .next-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-300), var(--blue-500));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.next-step h3 {
  margin: 0 0 6px;
  color: var(--blue-600);
  font-size: 1.05rem;
}
.next-step p {
  margin: 0;
  color: var(--body);
  font-size: .95rem;
}

/* === Modes de paiement acceptés (badges info, pas de CTA) === */
.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
}
.pm-badge.wechat { border-color: #2DC100; background: #F0FFF0; color: #1B7E00; }
.pm-badge.alipay { border-color: #1677FF; background: #F0F7FF; color: #0E5FCC; }

@media (max-width: 540px) {
  .next-step { grid-template-columns: 44px 1fr; gap: 12px; padding: 16px; }
  .next-step .next-num { width: 32px; height: 32px; font-size: .95rem; }
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  background: linear-gradient(180deg, var(--blue-300) 0%, var(--blue-400) 100%);
  color: rgba(255,255,255,.95);
  padding: 32px 24px;
  text-align: center;
  margin-top: 64px;
  font-size: .9rem;
}
footer a { color: white; text-decoration: underline; }
footer .footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: left;
  margin-bottom: 24px;
}
footer h4 { color: white; margin: 0 0 8px; font-size: 1rem; }
footer .copyright {
  border-top: 1px solid rgba(255,255,255,.25);
  padding-top: 16px;
  font-size: .82rem;
  opacity: .9;
}

/* =========================================================
   I18N — affichage par langue
   Règle simple: tout élément avec [data-lang] est masqué,
   sauf si la langue active correspond. !important pour éviter
   les conflits de spécificité avec d'autres composants.
   ========================================================= */

[data-lang] { display: none !important; }
body.lang-fr [data-lang="fr"],
body.lang-en [data-lang="en"],
body.lang-zh [data-lang="zh"] { display: revert !important; }

/* Exception : les boutons du sélecteur de langue restent toujours visibles
   (ils utilisent data-lang pour identifier la langue cible, pas l'affichage) */
body .lang-switch button[data-lang] { display: inline-block !important; }

/* Sous-titre chinois sur les boutons de nav latérale :
   visible en FR/EN, masqué quand la langue active est ZH */
.nav-zh-sub {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  margin-top: 4px;
  opacity: .9;
}
body.lang-zh .nav-zh-sub { display: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
  }
  .side-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
  }
  .side-nav a {
    flex: 1 1 calc(50% - 12px);
    min-height: 56px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    min-height: auto;
  }
  .hero-portrait { height: 280px; }
  .split { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .top-bar-inner { gap: 12px; }
  .brand-tag { display: none; }
}

@media (max-width: 540px) {
  .page { padding: 20px 16px 48px; }
  .hero { padding: 24px 18px; }
  .hero-text h1 { font-size: 2rem; }
  .top-bar-inner { padding: 0 16px; }
  .lang-switch button { padding: 5px 10px; font-size: .8rem; }
}
