/*
Theme Name: Baluki
Template: twentytwentyfive
Description: Thème de la revue BALUKI — Sciences géographiques, Environnement et Aménagement.
Version: 1.0.0
Author: EG CONSULTING
Text Domain: baluki
*/

/* En-tête */
.bk-topbar { font-size: .8125rem; letter-spacing: .02em; }
.bk-topbar a { text-decoration: none; }
.bk-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.bk-header .wp-block-navigation a { text-decoration: none; font-weight: 500; }
.bk-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }
.bk-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--primary); box-shadow: inset 0 -2px 0 var(--wp--preset--color--accent); }
.bk-brand { line-height: 1.1; }
.bk-brand .wp-block-site-title a { text-decoration: none; letter-spacing: .08em; }
.bk-mark { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--wp--preset--color--primary); color: #fff; font-family: var(--wp--preset--font-family--serif); font-weight: 700; font-size: 1.4rem; flex: none; }

/* Hero */
.bk-hero { position: relative; overflow: hidden; }
.bk-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: repeating-radial-gradient(circle at 85% 30%, transparent 0 22px, rgba(255,255,255,.55) 22px 23px); }
.bk-hero > * { position: relative; z-index: 1; }
.bk-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; }

/* Cartes */
.bk-card { border: 1px solid var(--wp--preset--color--line); border-radius: 14px; background: var(--wp--preset--color--base); height: 100%; transition: box-shadow .2s, transform .2s; }
.bk-card:hover { box-shadow: 0 10px 30px rgba(40, 0, 0, .08); transform: translateY(-2px); }
.bk-stat { border-left: 3px solid var(--wp--preset--color--accent); }

/* Couvertures typographiques des numéros */
.bk-issue { aspect-ratio: 3 / 4; border-radius: 10px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, var(--wp--preset--color--primary) 0%, #2A0000 100%); color: #fff; }
.bk-issue.is-alt { background: linear-gradient(160deg, #800000 0%, #3D0000 100%); }
.bk-issue .bk-issue-label { font-family: var(--wp--preset--font-family--serif); letter-spacing: .12em; font-weight: 700; }
.bk-issue .bk-issue-date { color: var(--wp--preset--color--accent-soft); }

/* Équipe */
.bk-person { display: flex; gap: 1rem; align-items: flex-start; }
.bk-initials { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--wp--preset--color--surface); color: var(--wp--preset--color--primary); font-weight: 700; font-family: var(--wp--preset--font-family--serif); }
.bk-person p { margin: 0; }

/* Étapes */
.bk-steps { counter-reset: step; list-style: none; padding-left: 0; }
.bk-steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.1rem; }
.bk-steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--wp--preset--color--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }

/* Pied de page */
.bk-footer a { text-decoration: none; }
.bk-footer a:hover { text-decoration: underline; }

@media (max-width: 781px) {
  .bk-topbar .bk-topbar-right { display: none; }
}

/* ============ Accueil dynamique ============ */
.bk-accent { color: var(--wp--preset--color--accent); }
.bk-muted { color: var(--wp--preset--color--muted); }
.bk-small { font-size: .9rem; }
.bk-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: 8px; font-weight: 600; font-size: .95rem;
  text-decoration: none !important; background: var(--wp--preset--color--primary); color: #fff !important; transition: transform .2s, box-shadow .2s, background .2s; }
.bk-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); background: var(--wp--preset--color--primary-dark); }
.bk-btn-accent { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--primary-dark) !important; }
.bk-btn-accent:hover { background: #7E5D1C; }
.bk-btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.55); }
.bk-btn-ghost:hover { background: rgba(255,255,255,.1); }
.bk-link-arrow { font-weight: 600; text-decoration: none !important; }
.bk-link-arrow span { display: inline-block; transition: transform .2s; }
.bk-link-arrow:hover span { transform: translateX(4px); }

/* Hero */
.bk-hero::after { display: none; }
.bk-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; min-height: min(86vh, 760px); padding: 3rem 0; }
.bk-hero .bk-eyebrow { color: var(--wp--preset--color--accent-soft); }
.bk-hero-title { color: #fff !important; font-size: clamp(2.4rem, 5.2vw, 4rem) !important; line-height: 1.08 !important; margin: .6rem 0 1.2rem; }
.bk-hl { color: var(--wp--preset--color--accent); font-style: italic; }
.bk-hero-lead { font-size: 1.15rem; color: #F4F0DC; max-width: 36rem; }
.bk-hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 2.2rem; }
.bk-hero-meta { display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 0; padding-top: 1.4rem; border-top: 1px solid rgba(237,232,202,.25); }
.bk-hero-meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--wp--preset--color--accent-soft); }
.bk-hero-meta dd { margin: .2rem 0 0; font-family: var(--wp--preset--font-family--serif); font-size: 1.2rem; font-weight: 600; }
.bk-hero-visual { position: relative; }
.bk-hero-art { width: 100%; height: auto; display: block; overflow: visible; }
.bk-layer { transition: transform .4s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.bk-contour { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: bkDraw 3.2s cubic-bezier(.45,.05,.25,1) forwards; animation-delay: var(--d, 0s); }
.bk-contour.c-major { stroke-width: 1.8; }
@keyframes bkDraw { to { stroke-dashoffset: 0; } }
.bk-river, .bk-river-bed { stroke-dasharray: 1100; stroke-dashoffset: 1100; animation: bkDraw 2.6s .5s ease-out forwards; }
.bk-river-flow { animation: bkFlow 2.4s linear infinite; opacity: 0; animation: bkFlow 2.4s linear infinite, bkFade 1s 2.8s forwards; }
@keyframes bkFlow { to { stroke-dashoffset: -64; } }
@keyframes bkFade { to { opacity: .85; } }
.bk-route { animation: bkFlow 3s linear infinite reverse; }
.bk-pulse { transform-origin: center; transform-box: fill-box; animation: bkPulse 2.4s ease-out infinite; }
@keyframes bkPulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.6); opacity: 0; } }
.bk-compass { animation: bkSpin 40s linear infinite; transform-origin: 0 0; }
@keyframes bkSpin { to { transform: rotate(360deg); } }

/* Révélation au défilement */
.bk-js .bk-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--delay, 0s); }
.bk-js .bk-reveal.is-in { opacity: 1; transform: none; }

/* Sections */
.bk-section-head { max-width: 40rem; margin-bottom: 2.4rem; }
.bk-section-head h2 { margin: .3rem 0 .6rem; }
.bk-section-head.bk-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.bk-disc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.bk-disc { padding: 2rem 1.8rem; position: relative; overflow: hidden; }
.bk-disc::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--wp--preset--color--accent); transition: width .5s; }
.bk-disc:hover::before { width: 100%; }
.bk-disc h3 { margin: 1.1rem 0 .4rem; }
.bk-disc p { color: var(--wp--preset--color--muted); margin: 0; }
.bk-ill { width: 96px; height: 96px; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.bk-disc:hover .bk-ill { transform: scale(1.08) rotate(-3deg); }
.bk-orbit { transform-origin: 60px 60px; animation: bkSpin 9s linear infinite; }
.bk-leaf { transform-origin: 60px 50px; animation: bkSway 4s ease-in-out infinite; }
.bk-leaf-2 { animation-delay: -2s; }
@keyframes bkSway { 50% { transform: rotate(6deg); } }
.bk-drop { animation: bkDrop 2.2s ease-in infinite; }
@keyframes bkDrop { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.bk-build { animation: bkRise 3.5s ease-in-out infinite; }
@keyframes bkRise { 50% { transform: translateY(-3px); } }

/* Chiffres */
.bk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.bk-stat-item { border-left: 2px solid var(--wp--preset--color--accent); padding-left: 1.2rem; }
.bk-num { display: block; font-family: var(--wp--preset--font-family--serif); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; line-height: 1; color: #fff; }
.bk-lbl { display: block; margin-top: .5rem; color: var(--wp--preset--color--accent-soft); font-size: .9rem; }

/* Numéros */
.bk-issues-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 1.2rem; overflow-x: auto; padding: .5rem .2rem 1.4rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.bk-issues-strip .bk-issue { scroll-snap-align: start; padding: 1.3rem; text-decoration: none; position: relative; overflow: hidden; color: #fff; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.bk-issues-strip .bk-issue:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 18px 40px rgba(61,0,0,.3); }
.bk-issue-art { position: absolute; left: 0; right: 0; top: 38%; width: 100%; color: var(--wp--preset--color--accent-soft); }
.bk-issue .bk-issue-date { display: block; font-size: .85rem; }
.bk-issue .bk-issue-name { display: block; font-weight: 600; }

/* Calendrier */
.bk-timeline { position: relative; padding: 4.2rem 0 4.6rem; }
.bk-tl-track { height: 6px; border-radius: 6px; background: var(--wp--preset--color--line); overflow: hidden; }
.bk-tl-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent)); transition: width 2.2s cubic-bezier(.45,.05,.25,1) .3s; }
.bk-timeline.is-in .bk-tl-fill { width: 100%; }
.bk-tl-months { display: grid; grid-template-columns: repeat(12, 1fr); margin-top: .6rem; font-size: .75rem; color: var(--wp--preset--color--muted); text-align: center; }
.bk-tl-ev { position: absolute; left: var(--x); transform: translateX(-50%); text-align: center; width: 9rem; font-size: .85rem; line-height: 1.3; }
.bk-tl-ev::before { content: ""; position: absolute; left: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translateX(-50%); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--wp--preset--color--line); }
.bk-tl-dead { top: 0; } .bk-tl-dead::before { top: 3.75rem; background: var(--wp--preset--color--accent); }
.bk-tl-pub { bottom: 0; } .bk-tl-pub::before { bottom: 4.1rem; background: var(--wp--preset--color--primary); }
.bk-tl-ev b { display: block; font-family: var(--wp--preset--font-family--serif); color: var(--wp--preset--color--primary-dark); font-size: 1.05rem; }
.bk-tl-ev small { color: var(--wp--preset--color--muted); }

/* Direction & CTA */
.bk-direction { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.bk-people { padding: 1.8rem; }
.bk-people hr { border: 0; border-top: 1px solid var(--wp--preset--color--line); margin: 1.3rem 0; }
.bk-name { font-weight: 700; }
.bk-person .bk-eyebrow { margin-bottom: .2rem; }
.bk-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.bk-cta-inner h2 { margin: 0 0 .3rem; }
.bk-cta-inner p { margin: 0; }

@media (max-width: 900px) {
  .bk-hero-grid { grid-template-columns: 1fr; min-height: 0; padding: 2.5rem 0 1rem; }
  .bk-hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .bk-disc-grid, .bk-direction { grid-template-columns: 1fr; }
  .bk-stats { grid-template-columns: repeat(2, 1fr); }
  .bk-timeline { padding: 0; }
  .bk-tl-track, .bk-tl-months { display: none; }
  .bk-tl-ev { position: static; transform: none; width: auto; text-align: left; padding: .6rem 0 .6rem 1.8rem; border-left: 2px solid var(--wp--preset--color--line); }
  .bk-tl-ev::before { left: -8px; top: .9rem !important; bottom: auto !important; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bk-contour, .bk-river, .bk-river-bed { stroke-dashoffset: 0; }
}
.bk-wrap { width: 100%; }
.bk-disc { height: auto; }
.bk-tl-pub::before { bottom: 3.2rem; }
