/*
Theme Name: Bodhimanda Yoga — Divi Child
Description: Thème enfant Divi pour Bodhimanda Yoga. Design system Com'Horizon Premium 2026.
Author: Com'Horizon
Author URI: https://com-horizon.com/
Template: Divi
Version: 1.0.0
Text Domain: bodhimanda
*/

/* =============================================
   DESIGN TOKENS — BODHIMANDA YOGA
   Source : Dossier stratégique Com'Horizon
   ============================================= */

:root {
  /* --- COULEURS PRIMAIRES (issues du logo, palette resserrée à 5 tokens) --- */
  --color-primary:       #e1510a;  /* orange brulé — CTA principal */
  --color-secondary:     #f5953b;  /* orange chaud — hover, accents */
  --color-warm-light:    #fccc5a;  /* jaune solaire doux */
  --color-cream:         #faf6ee;  /* crème neutre — background sections */
  --color-deep:          #9e1914;  /* rouge profond — titres premium */

  /* --- NEUTRES --- */
  --color-text:          #1a1410;  /* noir chaud */
  --color-text-muted:    #5a4c40;  /* brun doux */
  --color-bg:            #ffffff;
  --color-border:        #e8dfcc;  /* beige discret */
  --color-shadow:        rgba(26, 20, 16, 0.08);

  /* --- TYPOGRAPHIE --- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Échelle modulaire ratio 1.25 */
  --fs-h1: clamp(2.25rem, 4.5vw, 3rem);    /* 36 → 48px */
  --fs-h2: clamp(1.75rem, 3.5vw, 2.25rem); /* 28 → 36px */
  --fs-h3: clamp(1.375rem, 2.5vw, 1.75rem);/* 22 → 28px */
  --fs-h4: 1.375rem;                       /* 22px */
  --fs-body: 1.125rem;                     /* 18px */
  --fs-small: 0.875rem;                    /* 14px */

  --lh-display: 1.15;
  --lh-body: 1.7;

  /* --- ESPACEMENTS (système 8px) --- */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-12: 6rem;    /* 96px */
  --space-16: 8rem;    /* 128px */
  --section-py: clamp(4rem, 10vh, 8rem);

  /* --- RADIUS --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* --- SHADOWS --- */
  --shadow-sm:  0 1px 2px rgba(26, 20, 16, 0.04);
  --shadow-md:  0 4px 12px rgba(26, 20, 16, 0.08);
  --shadow-lg:  0 12px 32px rgba(26, 20, 16, 0.12);
  --shadow-xl:  0 24px 48px rgba(26, 20, 16, 0.16);

  /* --- ANIMATIONS --- */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 200ms var(--ease-out);
  --transition-base: 300ms var(--ease-out);
  --transition-slow: 600ms var(--ease-out);
}

/* =============================================
   BASE — normalisation
   ============================================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--lh-display);
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-deep);
}

/* Focus visible accessible (WCAG 2.2 AA) */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background-color: var(--color-warm-light);
  color: var(--color-text);
}

/* =============================================
   COMPOSANTS — BOUTONS
   ============================================= */

.bdh-btn,
.bdh-btn-primary,
.et_pb_button.bdh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 48px; /* tap target accessible */
}

.bdh-btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.bdh-btn-primary:hover {
  background: var(--color-deep);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.bdh-btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.bdh-btn-secondary:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.bdh-btn-ghost {
  background: transparent;
  color: var(--color-text);
  padding: 0.5rem 1rem;
}
.bdh-btn-ghost:hover {
  color: var(--color-primary);
}

/* =============================================
   COMPOSANTS — CARDS
   ============================================= */

.bdh-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.bdh-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-warm-light);
}

/* =============================================
   HEADER — glassmorphisme
   ============================================= */

#main-header.et-fixed-header {
  background-color: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 20, 16, 0.06);
}

/* =============================================
   FOOTER — signature Com'Horizon
   ============================================= */

#footer-bottom {
  background-color: var(--color-deep);
  padding: var(--space-2) 0;
}
#footer-info,
#footer-bottom .container,
#footer-bottom #et-footer-nav {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-small);
}
#footer-bottom a {
  color: var(--color-warm-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#footer-bottom a:hover {
  color: #ffffff;
}

/* =============================================
   READING PROGRESS BAR (articles blog)
   ============================================= */

.bdh-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  z-index: 9999;
  transition: width 100ms linear;
}

/* =============================================
   STICKY CTA MOBILE
   ============================================= */

.bdh-sticky-cta {
  position: fixed;
  bottom: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  z-index: 998;
  display: none;
  box-shadow: var(--shadow-xl);
}
@media (max-width: 768px) {
  .bdh-sticky-cta.is-visible {
    display: flex;
  }
}

/* =============================================
   SECTIONS — backgrounds alternés
   ============================================= */

.bdh-section-cream {
  background-color: var(--color-cream);
}
.bdh-section-warm {
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-warm-light) 100%);
}

/* =============================================
   ANIMATIONS — fade up on scroll
   ============================================= */

.bdh-fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.bdh-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   ACCESSIBILITÉ — reduced motion
   ============================================= */

@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;
  }
  .bdh-fade-up {
    opacity: 1;
    transform: none;
  }
}

/* =============================================
   ACCESSIBILITÉ — skip link
   ============================================= */

.bdh-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--space-2);
  z-index: 99999;
  text-decoration: none;
  font-weight: 600;
}
.bdh-skip-link:focus {
  top: 0;
}

/* =============================================
   ARTICLE TYPOGRAPHY (single post / page)
   ============================================= */

.single-post .et_pb_post_content p,
.single-post .et_pb_post_content li {
  max-width: 70ch;
  font-size: 1.125rem;
  line-height: 1.75;
}

.single-post blockquote {
  border-left: 4px solid var(--color-primary);
  background: var(--color-cream);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
