/* ==========================================================================
   BOKONZI — page Actualités
   Reprend les tokens du site (couleurs, polices, courbes de mouvement).
   ========================================================================== */

.actus-page {
  --rail: 0px; /* pas de rail-plateau sur cette page */
}
.actus-page main {
  padding-left: 0;
}
/* la capsule du site sert ici de lien de retour */
.actus-page header a[class*="menuBtn"] {
  text-decoration: none;
}
/* sur un article, le grand en-tête s'efface : le titre de l'article prend sa place */
.is-article .ax-hero {
  display: none;
}
.is-article .ax-article {
  padding-top: clamp(3rem, 1rem + 7vw, 9rem);
}

/* ---------- En-tête ---------- */
.ax-hero {
  position: relative;
  overflow: hidden;
  background: var(--petrole);
  color: var(--creme);
  padding: calc(var(--section-y) * 0.9) var(--gutter) calc(var(--section-y) * 0.55);
  border-radius: 0 0 var(--r-frame) var(--r-frame);
}
.ax-hero-in {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
}
.ax-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: ax-rise 0.8s var(--ease-out) 0.1s forwards;
}
.ax-label span {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  margin-right: 0.6rem;
  border-radius: var(--r-pill);
  background: var(--soleil);
  color: var(--petrole-ink);
  font-weight: 700;
}
.ax-title {
  font-size: var(--fs-mega);
  font-weight: 500;
  line-height: 0.9;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.ax-word {
  display: inline-block;
  transform: translateY(105%) rotate(4deg);
  transform-origin: 0 100%;
  animation: ax-word 1.1s var(--ease-out) 0.2s forwards;
}
.ax-word i {
  font-style: normal;
  color: var(--orange);
}
.ax-lead {
  max-width: 34rem;
  margin-top: 1.6rem;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: color-mix(in srgb, var(--creme) 88%, transparent);
  opacity: 0;
  animation: ax-rise 0.9s var(--ease-out) 0.45s forwards;
}

/* chemin en pointillés qui se dessine */
.ax-trail {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 46%;
  pointer-events: none;
}
.ax-trail path {
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0.012 0.03;
  opacity: 0.55;
  -webkit-mask: none;
  clip-path: inset(0 100% 0 0);
  animation: ax-draw 2.2s var(--ease-out) 0.3s forwards;
}
.ax-trail path + path {
  animation-delay: 0.55s;
}

/* pions qui surgissent puis flottent */
.ax-pions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ax-pion {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  transform: scale(0) rotate(-180deg);
  animation:
    ax-pop 0.9s var(--ease-play) calc(0.5s - var(--d) * 0.08) forwards,
    ax-float 7s ease-in-out calc(1.4s + var(--d)) infinite;
}
@media (max-width: 700px) {
  .ax-pion {
    opacity: 0.6;
    --s: 30px !important;
  }
  .ax-pion:nth-child(n + 3) {
    display: none;
  }
}

/* ---------- Filtres ---------- */
.ax-list {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--gutter) var(--section-y);
}
.ax-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.2rem);
}
.ax-filters[hidden] {
  display: none;
}
.ax-chip {
  --c: var(--petrole);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 42px;
  padding: 0 1.1rem 0 0.8rem;
  border: 1.5px solid color-mix(in srgb, var(--petrole) 22%, transparent);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--petrole-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    transform var(--dur) var(--ease-play),
    background var(--dur-fast),
    color var(--dur-fast),
    border-color var(--dur-fast);
}
.ax-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  transition: transform var(--dur) var(--ease-play);
}
.ax-chip:hover {
  transform: rotate(-2deg) translateY(-2px);
}
.ax-chip:hover::before {
  transform: scale(1.35);
}
.ax-chip[aria-selected="true"] {
  background: var(--c);
  border-color: var(--c);
  color: var(--creme);
}
.ax-chip[aria-selected="true"]::before {
  background: var(--creme);
}

/* ---------- Grille d'articles ---------- */
.ax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(1.4rem, 1rem + 1.5vw, 2.4rem);
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}
.ax-grid.is-leaving {
  opacity: 0;
  transform: translateY(-18px);
}

.ax-card {
  --c: var(--corail);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  border-radius: var(--r-frame);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--petrole) 8%, transparent);
  transition:
    transform var(--dur) var(--ease-play),
    box-shadow var(--dur) var(--ease-out);
}
.ax-card:hover {
  transform: translateY(-8px) rotate(-0.6deg);
  box-shadow:
    0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent),
    0 26px 50px -30px rgb(0 40 60 / 0.55);
}
/* révélation « settle » : la carte tombe puis se redresse */
.ax-card.will-settle {
  opacity: 0;
  transform: translateY(34px) rotate(var(--tilt, 4deg));
}
.ax-card.is-settled {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.9s var(--ease-play),
    box-shadow var(--dur) var(--ease-out);
}
.ax-card.is-settled:hover {
  transform: translateY(-8px) rotate(-0.6deg);
}

.ax-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--c) 22%, var(--creme));
  overflow: hidden;
}
.ax-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.ax-card:hover .ax-media img {
  transform: scale(1.06) rotate(-1deg);
}
.ax-media-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.ax-media-empty svg {
  width: 34%;
  height: auto;
  transition: transform var(--dur) var(--ease-play);
}
.ax-card:hover .ax-media-empty svg {
  transform: rotate(-12deg) scale(1.05);
}
.ax-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--c);
  color: var(--creme);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ax-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
  padding: 1.4rem 1.5rem 1.6rem;
}
.ax-date {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--petrole-ink) 62%, transparent);
}
.ax-card h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.ax-excerpt {
  color: color-mix(in srgb, var(--petrole-ink) 80%, transparent);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ax-read {
  margin-top: auto;
  padding-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--petrole);
}
/* bouton « pion » : le point glisse sur sa piste */
.ax-track {
  position: relative;
  width: 34px;
  height: 14px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--c) 25%, transparent);
}
.ax-track::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  transition: transform var(--dur) var(--ease-play);
}
.ax-card:hover .ax-track::after,
.ax-back:hover .ax-track::after {
  transform: translateX(20px);
}

/* Première actualité mise en avant (grand écran) */
@media (min-width: 900px) {
  .ax-card.is-featured {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 420px;
  }
  .ax-card.is-featured .ax-media {
    flex: 1.25;
    aspect-ratio: auto;
  }
  .ax-card.is-featured .ax-body {
    flex: 1;
    justify-content: center;
    padding: clamp(2rem, 1rem + 2.5vw, 3.5rem);
    gap: 1rem;
  }
  .ax-card.is-featured h2 {
    font-size: var(--fs-lg);
  }
  .ax-card.is-featured .ax-excerpt {
    -webkit-line-clamp: 5;
    font-size: var(--fs-md);
  }
}

/* Chargement */
.ax-skel {
  border-radius: var(--r-frame);
  background: var(--papier);
  overflow: hidden;
  min-height: 380px;
  position: relative;
}
.ax-skel::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--creme-2);
}
.ax-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: ax-shimmer 1.4s ease-in-out infinite;
}

/* « Voir plus » */
.ax-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(2.4rem, 1.6rem + 2vw, 3.6rem);
}
.ax-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  height: 52px;
  padding: 0 1.4rem 0 1rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--petrole);
  color: var(--creme);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-play), background var(--dur-fast);
}
.ax-btn:hover {
  background: var(--petrole-deep);
  transform: translateY(-3px) rotate(-2deg);
}
.ax-btn[hidden] {
  display: none;
}
.ax-btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.ax-btn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- État vide : « Bientôt » ---------- */
.ax-empty {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  gap: 1.2rem;
  justify-items: start;
  padding: clamp(2.2rem, 1.4rem + 4vw, 4.5rem);
  border-radius: var(--r-frame);
  background: var(--papier);
  border: 2px dashed color-mix(in srgb, var(--petrole) 20%, transparent);
  overflow: hidden;
}
.ax-empty h2 {
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.05;
  max-width: 18ch;
}
.ax-empty p {
  max-width: 36rem;
  color: color-mix(in srgb, var(--petrole-ink) 80%, transparent);
}
.ax-empty-pions {
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
  top: 50%;
  translate: 0 -50%;
  display: flex;
  gap: 0.9rem;
}
.ax-empty-pions svg {
  width: clamp(34px, 5vw, 64px);
  height: auto;
  animation: ax-hop 2.4s var(--ease-play) infinite;
}
.ax-empty-pions svg:nth-child(2) {
  animation-delay: 0.25s;
}
.ax-empty-pions svg:nth-child(3) {
  animation-delay: 0.5s;
}
@media (max-width: 760px) {
  .ax-empty-pions {
    position: static;
    translate: none;
    order: -1;
  }
}

/* ---------- Article ---------- */
.ax-article {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--gutter) var(--section-y);
}
.ax-article[hidden] {
  display: none;
}
.ax-back {
  --c: var(--corail);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  color: var(--petrole);
  margin-bottom: 2rem;
}
.ax-back .ax-track {
  transform: scaleX(-1);
}
.ax-article-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 1.2rem + 2vw, 3rem);
}
.ax-article-head .ax-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
.ax-article-head .ax-tag {
  position: static;
}
.ax-article h1 {
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: 1;
}
.ax-cover {
  background: var(--creme-2);
  margin: 0 0 clamp(2rem, 1.4rem + 2vw, 3.2rem);
  border-radius: var(--r-frame);
  overflow: hidden;
  clip-path: inset(0 0 0 0 round var(--r-frame));
}
.ax-cover.will-open {
  clip-path: inset(38% 38% 38% 38% round 999px);
}
.ax-cover.is-open {
  clip-path: inset(0 0 0 0 round var(--r-frame));
  transition: clip-path 1.1s var(--ease-out);
}
.ax-cover img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

/* contenu rédigé dans WordPress */
.ax-content {
  max-width: 68ch;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.18rem);
  line-height: 1.75;
}
.ax-content > * + * {
  margin-top: 1.2em;
}
.ax-content h2,
.ax-content h3,
.ax-content h4 {
  margin-top: 1.8em;
  line-height: 1.1;
  font-weight: 600;
}
.ax-content h2 {
  font-size: var(--fs-lg);
}
.ax-content h3 {
  font-size: var(--fs-md);
}
.ax-content a {
  color: var(--petrole);
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.ax-content img,
.ax-content video,
.ax-content iframe {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-soft);
}
.ax-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}
.ax-content figure {
  margin-left: 0;
  margin-right: 0;
}
.ax-content figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--petrole-ink) 62%, transparent);
}
.ax-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 6px solid var(--corail);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: var(--fs-md);
}
.ax-content ul,
.ax-content ol {
  padding-left: 1.3em;
}
.ax-content li + li {
  margin-top: 0.4em;
}
.ax-content .wp-block-gallery,
.ax-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}
.ax-content .alignwide,
.ax-content .alignfull {
  max-width: none;
}
.ax-content .wp-block-button__link {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: var(--r-pill);
  background: var(--petrole);
  color: var(--creme);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
}

.ax-more-title {
  margin: var(--section-y) 0 1.8rem;
  font-size: var(--fs-lg);
  font-weight: 500;
}

.ax-noscript {
  padding: 3rem var(--gutter);
  text-align: center;
}

/* ---------- Animations ---------- */
@keyframes ax-word {
  to {
    transform: none;
  }
}
@keyframes ax-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ax-draw {
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes ax-pop {
  to {
    transform: scale(1) rotate(0deg);
  }
}
@keyframes ax-float {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -12px;
    rotate: 6deg;
  }
}
@keyframes ax-hop {
  0%,
  60%,
  100% {
    transform: none;
  }
  30% {
    transform: translateY(-14px) rotate(-8deg);
  }
}
@keyframes ax-shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Réglage « réduire les animations » : tout s'affiche directement */
@media (prefers-reduced-motion: reduce) {
  .ax-word,
  .ax-label,
  .ax-lead,
  .ax-pion,
  .ax-trail path {
    animation: none !important;
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  .ax-card.will-settle,
  .ax-cover.will-open {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0 round var(--r-frame));
  }
  .ax-empty-pions svg {
    animation: none;
  }
}
