/* ═══════════════════════════════════════════════════════════════
   Animations · L'Espoir asbl micro-interactions
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Send-button: paper plane lifts off on hover ── */
.icon-send {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover .icon-send,
button:hover .icon-send {
  transform: translate(6px, -6px) rotate(-18deg);
}

/* ── 2. Curly underline · draw-in when revealed ── */
.curly-svg path {
  stroke-dasharray: 110;
  stroke-dashoffset: 110;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}
.curly-svg.curly-drawn path {
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .curly-svg path { stroke-dashoffset: 0; transition: none; }
}

/* ── 3. Filter-pills · press feedback on click ── */
.actu-filter {
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease;
  user-select: none;
}
.actu-filter:active {
  transform: scale(0.94);
}

/* ── 4. Service-card icons · tilt + scale on hover ── */
.service-card { transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease; }
.service-card .material-symbols-outlined,
.service-card .service-icon {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}
.service-card:hover .material-symbols-outlined,
.service-card:hover .service-icon {
  transform: rotate(-8deg) scale(1.12);
}

/* ── 5. Form-field focus · smooth cassis glow ── */
.form-field {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.form-field:focus {
  border-color: #C04B72;
  box-shadow: 0 0 0 4px rgba(192, 75, 114, 0.10);
  outline: none;
}

/* ── 6. Nav-links · straight underline with cassis accent on hover ── */
.nav-link {
  position: relative;
  padding-bottom: 6px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: #002626;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.32s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}
.nav-link:hover::after {
  background: #C04B72;
}

/* ── 8. 404 icon · gentle wackel on page load ── */
@keyframes wackel-404 {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-12deg); }
  30% { transform: rotate(8deg); }
  45% { transform: rotate(-6deg); }
  60% { transform: rotate(4deg); }
  75% { transform: rotate(-2deg); }
}
.icon-wackel {
  animation: wackel-404 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.4s 1;
  transform-origin: center;
  display: inline-block;
}
@media (prefers-reduced-motion: reduce) {
  .icon-wackel { animation: none; }
}

/* ── 9. Tilt images · image inside also subtly transforms on hover ── */
.service-img-wrap img,
.tilt-img img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.service-img-wrap:hover img,
.tilt-img:hover img {
  transform: scale(1.04);
}

/* ═══════════════════════════════════════════════════════════════
   9e. PAGE TRANSITION OVERLAY · soft fade + slide between pages
        Created dynamically by JS · no HTML changes needed.
        - On link click: overlay fades in (cream), then browser navigates
        - On new page load: overlay fades out, content slides up + fades in
   ═══════════════════════════════════════════════════════════════ */
.page-transition {
  position: fixed;
  inset: 0;
  background: #EFE7DA;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-transition.is-active {
  opacity: 1;
  pointer-events: all;
}

/* Content slide-in when arriving from a transition */
body.is-entering main {
  animation: page-enter 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes page-enter {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Reduced motion · skip all transition animation */
@media (prefers-reduced-motion: reduce) {
  .page-transition { transition: none; }
  body.is-entering main { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   9d. READING PROGRESS BAR · for long-form pages
        Activated only on pages that include the .reading-progress div.
   ═══════════════════════════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: rgba(0, 38, 38, 0.06);
  z-index: 100;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0;
  background: #C04B72;
  transition: width 0.08s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .reading-progress-bar { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   9c. VANILLA-TILT · subtle 3D parallax on key cards
        Mobile uses .in-view system (no hover), so Tilt is desktop-only.
        Init logic in animations.js · respects prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════ */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-card,
  .maison-feature,
  .impact-card,
  .featured-card {
    transform-style: preserve-3d;
    will-change: transform;
  }
}

/* ═══════════════════════════════════════════════════════════════
   9b. MATERIAL SYMBOLS · filled modifier
        Replaces repetitive inline style font-variation-settings:'FILL' 1
   ═══════════════════════════════════════════════════════════════ */
.material-symbols-outlined.is-filled {
  font-variation-settings: 'FILL' 1;
}

/* ═══════════════════════════════════════════════════════════════
   10. UNIVERSAL CARD HOVER · subtle lift + shadow
        Applies to every card-like surface across all pages.
        Uses cubic-bezier(0.4,0,0.2,1) for material-like motion.
   ═══════════════════════════════════════════════════════════════ */
.value-pill,
.why-item,
.actu-card,
.person-card,
.method-card,
.maison-feature,
.info-card,
.don-card,
.quick-card,
.valeur-card,
.impact-card,
.featured-card,
.stat-card,
.service-contact-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.35s ease,
              border-color 0.35s ease;
  will-change: transform;
}

/* Specificity bumps for cards inside .scroll-reveal.revealed (which sets transform: none) */
.value-pill:hover,
.why-item:hover,
.actu-card:hover,
.person-card:hover,
.method-card:hover,
.maison-feature:hover,
.info-card:hover,
.don-card:hover,
.quick-card:hover,
.valeur-card:hover,
.impact-card:hover,
.featured-card:hover,
.stat-card:hover,
.service-contact-card:hover,
.scroll-reveal.revealed.value-pill:hover,
.scroll-reveal.revealed.why-item:hover,
.scroll-reveal.revealed.actu-card:hover,
.scroll-reveal.revealed.person-card:hover,
.scroll-reveal.revealed.method-card:hover,
.scroll-reveal.revealed.valeur-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 38, 38, 0.10);
}
/* Slightly deeper lift on key cards */
.featured-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(0, 38, 38, 0.12); }

/* Featured-article inner image · subtle zoom on hover */
.featured-card-img img,
.featured-article img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.featured-card:hover .featured-card-img img,
.featured-article:hover img {
  transform: scale(1.04);
}

/* ── Value-pill icon · gentle wobble when card lifts ── */
.value-pill .material-symbols-outlined,
.why-item .material-symbols-outlined {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.value-pill:hover .material-symbols-outlined,
.why-item:hover .material-symbols-outlined {
  transform: scale(1.12) rotate(-6deg);
}

/* ═══════════════════════════════════════════════════════════════
   11. TIMELINE · line draw-in + dot pop-in animation
        On apropos.html · activated via .in-view on each item
   ═══════════════════════════════════════════════════════════════ */
.timeline-item {
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateX(-20px);
  will-change: transform, opacity;
}
.timeline-item.timeline-revealed {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item .timeline-dot {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s,
              box-shadow 0.4s ease 0.15s;
  transform: scale(0);
  transform-origin: center;
}
.timeline-item.timeline-revealed .timeline-dot {
  transform: scale(1);
  box-shadow: 0 0 0 4px rgba(192, 75, 114, 0.12);
}
.timeline-item .timeline-line {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
  transform: scaleY(0);
  transform-origin: top center;
}
.timeline-item.timeline-revealed .timeline-line {
  transform: scaleY(1);
}
.timeline-item .timeline-year,
.timeline-item .timeline-marker + div > * {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
              opacity 0.5s ease 0.15s;
  opacity: 0;
  transform: translateY(8px);
}
.timeline-item.timeline-revealed .timeline-year,
.timeline-item.timeline-revealed .timeline-marker + div > * {
  opacity: 1;
  transform: translateY(0);
}
.timeline-item:hover .timeline-dot {
  transform: scale(1.18);
  box-shadow: 0 0 0 6px rgba(192, 75, 114, 0.18);
}
@media (prefers-reduced-motion: reduce) {
  .timeline-item,
  .timeline-item .timeline-dot,
  .timeline-item .timeline-line,
  .timeline-item .timeline-year,
  .timeline-item .timeline-marker + div > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   11b. CHECKLIST · sequential reveal of check items on scroll
        Each child item fades + slides in with 80ms stagger.
        Activated by .checklist.revealed class (JS observer).
   ═══════════════════════════════════════════════════════════════ */
.checklist > * {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.checklist.revealed > *:nth-child(1) { transition-delay: 0ms; }
.checklist.revealed > *:nth-child(2) { transition-delay: 80ms; }
.checklist.revealed > *:nth-child(3) { transition-delay: 160ms; }
.checklist.revealed > *:nth-child(4) { transition-delay: 240ms; }
.checklist.revealed > *:nth-child(5) { transition-delay: 320ms; }
.checklist.revealed > *:nth-child(6) { transition-delay: 400ms; }
.checklist.revealed > *:nth-child(n+7) { transition-delay: 480ms; }
.checklist.revealed > * {
  opacity: 1;
  transform: translateX(0);
}
/* check_circle icon pulses in with a tiny scale-bounce when its row reveals */
.checklist > * .material-symbols-outlined {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.6);
}
.checklist.revealed > * .material-symbols-outlined {
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .checklist > *,
  .checklist > * .material-symbols-outlined {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   11c. FAQ · smooth open/close animation via JS-driven max-height
        Native <details> only animates the chevron. The .faq-body
        height transition is done by JS on toggle event.
   ═══════════════════════════════════════════════════════════════ */
.faq-item .faq-body {
  overflow: hidden;
  /* Default state · closed (JS sets height: 0 explicitly). When open,
     JS sets height to scrollHeight then back to 'auto' after transition. */
  transition: height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease 0.04s;
  opacity: 0;
}
.faq-item[open] .faq-body {
  opacity: 1;
}
/* The body content itself can have a tiny lift-in when opening */
.faq-item .faq-body > * {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
  transform: translateY(-4px);
}
.faq-item[open] .faq-body > * {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .faq-item .faq-body,
  .faq-item .faq-body > * {
    transition: none !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   12. PERSON-CARD avatar · subtle scale on card hover
   ═══════════════════════════════════════════════════════════════ */
.person-card .person-initials,
.person-card img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.person-card:hover .person-initials,
.person-card:hover img {
  transform: scale(1.06);
}

/* ═══════════════════════════════════════════════════════════════
   12b. TRUST-STRIP · scannable trust badges (don.html hero etc.)
        Used in place of disclaimer-style paragraphs for fast-read
        credibility cues. Reusable on any page.
   ═══════════════════════════════════════════════════════════════ */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  margin-bottom: 32px;
  max-width: 620px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(0,38,38,0.78);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,38,38,0.10);
  border-radius: 100px;
  padding: 0.42rem 0.85rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.trust-badge:hover {
  background: #fff;
  border-color: rgba(0,38,38,0.18);
  transform: translateY(-1px);
}
.trust-badge .material-symbols-outlined {
  font-size: 16px;
  color: #C04B72;
  font-variation-settings: 'FILL' 1;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   13. METHOD-CARD icon (don.html) · slight tilt on hover
   ═══════════════════════════════════════════════════════════════ */
.method-card .material-symbols-outlined {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.method-card:hover .material-symbols-outlined {
  transform: rotate(-8deg) scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   Scroll-margin · Sticky navbar offset for anchor jumps
   ═══════════════════════════════════════════════════════════════ */
:where([id]) {
  scroll-margin-top: 96px;
}

/* ═══════════════════════════════════════════════════════════════
   Touch · auto-reveal hover states on mobile when in view
   (no hover events on touch devices, so we simulate the state)
   ═══════════════════════════════════════════════════════════════ */
@media (hover: none) {
  /* Lift effect mirrors :hover on touch devices when centered in viewport */
  .service-card.in-view,
  .stat-card.in-view,
  .actu-card.in-view,
  .maison-feature.in-view,
  .quick-card.in-view,
  .info-card.in-view,
  .method-card.in-view,
  .don-card.in-view,
  .service-contact-card.in-view,
  .value-pill.in-view,
  .why-item.in-view,
  .person-card.in-view,
  .valeur-card.in-view,
  .impact-card.in-view {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 38, 38, 0.10);
  }
  .featured-card.in-view {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(0, 38, 38, 0.12);
  }
  /* Featured image zoom */
  .featured-card.in-view .featured-card-img img,
  .featured-article.in-view img {
    transform: scale(1.04);
  }
  /* Service-card icon wobble */
  .service-card.in-view .material-symbols-outlined,
  .service-card.in-view .service-icon {
    transform: rotate(-8deg) scale(1.12);
  }
  /* Value-pill icon wobble */
  .value-pill.in-view .material-symbols-outlined,
  .why-item.in-view .material-symbols-outlined {
    transform: scale(1.12) rotate(-6deg);
  }
  /* Method-card icon tilt */
  .method-card.in-view .material-symbols-outlined {
    transform: rotate(-8deg) scale(1.1);
  }
  /* Person-card avatar scale */
  .person-card.in-view .person-initials,
  .person-card.in-view img {
    transform: scale(1.06);
  }
  /* Service-img-wrap straightens + lifts */
  .service-img-wrap.in-view,
  .tilt-img.in-view {
    transform: rotate(0deg) translateY(-3px);
  }
  .service-img-wrap.in-view.tilt-right,
  .tilt-img.in-view.tilt-right {
    transform: rotate(0deg) translateY(-3px);
  }
  /* Service-img zoom */
  .service-img-wrap.in-view img,
  .tilt-img.in-view img {
    transform: scale(1.04);
  }
  /* Timeline dot pulse */
  .timeline-item.in-view .timeline-dot {
    transform: scale(1.18);
    box-shadow: 0 0 0 6px rgba(192, 75, 114, 0.18);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Print stylesheet · cleaner output for paper
   ═══════════════════════════════════════════════════════════════ */
@media print {
  nav, footer, .mobile-drawer, .mobile-drawer-backdrop,
  .scroll-indicator, .hamburger, .skip-link,
  [aria-hidden="true"], video, iframe, .blob {
    display: none !important;
  }
  body { background: #fff !important; color: #000 !important; }
  section { background: #fff !important; padding: 1rem 0 !important; page-break-inside: avoid; }
  h1, h2, h3 { color: #000 !important; page-break-after: avoid; }
  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .curly-svg, .icon-heart, .material-symbols-outlined { display: none !important; }
  .service-img-wrap, .tilt-img { transform: none !important; box-shadow: none !important; }
  img { max-width: 100% !important; page-break-inside: avoid; }
  @page { margin: 1.5cm; }
}
