/*
Theme Name: Aide ISFSC
Theme URI: https://aide.isfsc.be
Author: Haute École ISFSC
Author URI: https://isfsc.be
Description: Thème block (Full Site Editing) sur mesure pour le portail d'aide aux étudiant·es de l'ISFSC. Inclut des patterns prêts à l'emploi pour la home, la FAQ, les tutoriels et les pages de service. Eugène (chatbot Typebot) intégré nativement.
Version: 1.13.1
Tested up to: 6.6
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aide-isfsc
Tags: full-site-editing, block-patterns, education, custom-colors, custom-logo, block-styles, wide-blocks, accessibility-ready
*/

/* =========================================================
   AIDE.ISFSC.BE — Feuille de style custom
   Note : la plupart des tokens (couleurs, polices, espaces)
   sont déjà gérés via theme.json. On ne met ici que ce qui
   ne se fait pas via l'interface Gutenberg.
   ========================================================= */

:root {
  --shadow-sm: 0 1px 2px rgba(20,20,20,.04), 0 4px 12px rgba(20,20,20,.05);
  --shadow-md: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.06);
  --shadow-lg: 0 2px 6px rgba(20,20,20,.06), 0 16px 36px rgba(20,20,20,.10);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* ------- Topbar ------- */
.wp-block-template-part.topbar,
.template-part--topbar {
  background: var(--wp--preset--color--ink);
  color: #EDEAE2;
  font-size: 13px;
}
.template-part--topbar .wp-block-group { padding-block: 8px; }
.template-part--topbar a { color: #EDEAE2; text-decoration: none; opacity: .85; }
.template-part--topbar a:hover { opacity: 1; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.status-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #6FD08E;
  box-shadow: 0 0 0 4px rgba(111,208,142,.18);
}

/* ------- Header sticky ------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,247,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.site-header .wp-block-site-title a {
  text-decoration: none;
  font-family: var(--wp--preset--font-family--display);
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--wp--preset--color--red);
  color: #fff;
  display: inline-grid; place-items: center;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.5px;
  text-decoration: none;
  vertical-align: middle;
  margin-right: 10px;
}

/* Logo du site — version 1 : uploadé via Apparence → Personnaliser → Identité du site */
.site-brand .wp-block-site-logo {
  margin: 0;
  flex: 0 0 auto;
}
.site-brand .wp-block-site-logo img,
.site-brand .wp-block-site-logo a {
  display: block;
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Logo du site — version 2 : URL hardcodée dans le template */
.site-brand .custom-site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
.site-brand .custom-site-logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* ------- Navigation ------- */
.wp-block-navigation .wp-block-navigation-item__content {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--wp--preset--color--ink-soft);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
  background: var(--wp--preset--color--paper);
  color: var(--wp--preset--color--ink);
}
.wp-block-navigation .nav-cta .wp-block-navigation-item__content,
.wp-block-navigation-item.nav-cta .wp-block-navigation-item__content {
  background: var(--wp--preset--color--ink);
  color: #fff !important;
}
.wp-block-navigation .nav-cta .wp-block-navigation-item__content:hover {
  background: var(--wp--preset--color--red) !important;
}

/* ------- Hero ------- */
.aide-hero {
  position: relative;
  padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
  overflow: hidden;
}
.aide-hero::after {
  content: ""; position: absolute;
  right: -120px; top: -80px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237,28,36,.16), transparent 65%);
  pointer-events: none; z-index: 0;
}
.aide-hero > * { position: relative; z-index: 1; }
.aide-hero h1 {
  font-size: var(--wp--preset--font-size--hero);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
}
.aide-hero h1 em {
  font-style: normal;
  color: var(--wp--preset--color--red);
  background: linear-gradient(180deg, transparent 60%, rgba(237,28,36,.16) 60%);
  padding: 0 2px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--wp--preset--color--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wp--preset--color--ink-soft);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--wp--preset--color--red);
}

/* ------- Search form custom ------- */
.aide-search .wp-block-search__inside-wrapper {
  background: var(--wp--preset--color--paper);
  border-radius: 22px;
  padding: 10px 10px 10px 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--wp--preset--color--line);
  max-width: 680px;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.aide-search .wp-block-search__inside-wrapper:focus-within {
  border-color: var(--wp--preset--color--ink);
  box-shadow: var(--shadow-lg);
}
.aide-search .wp-block-search__input {
  border: 0; outline: 0;
  font-size: 17px;
  background: transparent;
  padding: 12px 0;
}
.aide-search .wp-block-search__button {
  background: var(--wp--preset--color--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  transition: background .15s;
}
.aide-search .wp-block-search__button:hover {
  background: var(--wp--preset--color--red);
}

/* ------- Cards services ------- */
.is-style-card {
  background: var(--wp--preset--color--paper);
  border-radius: 14px;
  border: 1px solid var(--wp--preset--color--line);
  padding: 22px !important;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  height: 100%;
}
.is-style-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--wp--preset--color--ink);
}
.is-style-card a { text-decoration: none; }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-grid; place-items: center;
  margin-bottom: 16px;
  background: var(--wp--preset--color--red-soft);
  color: var(--wp--preset--color--red);
}
.is-style-card.theme-ochre .card-icon { background: var(--wp--preset--color--ochre-soft); color: #B47A00; }
.is-style-card.theme-moss .card-icon  { background: var(--wp--preset--color--moss-soft);  color: var(--wp--preset--color--moss); }
.is-style-card.theme-indigo .card-icon{ background: var(--wp--preset--color--indigo-soft);color: var(--wp--preset--color--indigo); }
.card-icon svg { width: 22px; height: 22px; }
.is-style-card h3 {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600 !important;
  font-size: 18px !important;
  margin: 0 0 6px !important;
  letter-spacing: -.3px;
}
/* Rend toute la card cliquable (stretched link sur le titre) */
.is-style-card h3 a {
  text-decoration: none;
  color: inherit;
}
.is-style-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  z-index: 1;
}
/* La flèche reste visible au-dessus du lien étiré, mais les clics passent à travers */
.is-style-card .card-arrow {
  z-index: 2;
  pointer-events: none;
}
.is-style-card p {
  color: var(--wp--preset--color--ink-soft);
  font-size: 14px;
  margin: 0 0 16px;
}
.card-meta {
  font-size: 12px !important;
  color: var(--wp--preset--color--ink-mute) !important;
  margin-top: auto !important;
}
.card-arrow {
  position: absolute; top: 22px; right: 22px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--wp--preset--color--cream);
  display: grid; place-items: center;
  color: var(--wp--preset--color--ink-soft);
  font-size: 14px;
  transition: background .15s, color .15s, transform .2s;
}
.is-style-card:hover .card-arrow {
  background: var(--wp--preset--color--ink);
  color: #fff;
  transform: translate(2px, -2px);
}

/* ------- Quickstart (dark block) ------- */
.aide-quickstart {
  background: var(--wp--preset--color--ink);
  color: #EDEAE2;
  border-radius: 22px;
  padding: 48px !important;
}
.aide-quickstart h2,
.aide-quickstart h3 { color: #fff !important; }
.aide-quickstart p { color: #C8C4B8; }
.aide-quickstart .wp-block-list { list-style: none; padding: 0; }
.aide-quickstart .wp-block-list li {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  margin: 0 0 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.aide-quickstart .wp-block-list li::before {
  content: counter(list-item);
  counter-increment: list-item;
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--wp--preset--color--red);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  font-size: 13px;
  font-family: var(--wp--preset--font-family--display);
}
.aide-quickstart .wp-block-list { counter-reset: list-item; }
.aide-quickstart .wp-block-buttons .wp-block-button__link {
  background: var(--wp--preset--color--red);
}
.aide-quickstart .wp-block-buttons .wp-block-button__link:hover {
  background: #fff;
  color: var(--wp--preset--color--ink);
}

/* ------- Vidéos ------- */
.is-style-video-card {
  background: var(--wp--preset--color--paper);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--line);
  transition: transform .2s, box-shadow .2s;
}
.is-style-video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.video-thumb {
  aspect-ratio: 16/9;
  display: grid; place-items: center;
  position: relative;
  color: #fff;
  overflow: hidden;
}
/* Variantes décoratives (gradient pour placeholders) */
.video-thumb.theme-red    { background: linear-gradient(135deg, #ED1C24 0%, #8A0E13 100%); }
.video-thumb.theme-indigo { background: linear-gradient(135deg, #2A4A8A 0%, #142850 100%); }
.video-thumb.theme-moss   { background: linear-gradient(135deg, #3F7A4B 0%, #1F3D26 100%); }
/* Vraie miniature YouTube */
.video-thumb--real img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform .4s ease;
}
.is-style-video-card:hover .video-thumb--real img {
  transform: scale(1.04);
}
/* Bouton play style YouTube */
.video-thumb::after {
  content: "▶";
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
  line-height: 1;
  padding-left: 4px; /* compense le centre de gravité du triangle */
  z-index: 1;
  transition: background .15s, transform .2s;
}
.is-style-video-card:hover .video-thumb::after {
  background: var(--wp--preset--color--red);
  transform: scale(1.08);
}
.video-link { display: block; }
.video-duration {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.65);
  color: #fff; font-size: 12px;
  padding: 3px 8px; border-radius: 6px;
}

/* ------- Eugène (chatbot) ------- */
.aide-eugene {
  background: linear-gradient(135deg, #FFEFEF 0%, #FFF4DB 100%);
  border-radius: 22px;
  padding: 40px !important;
}
.chat-mock {
  background: var(--wp--preset--color--paper);
  border-radius: 14px;
  border: 1px solid var(--wp--preset--color--line);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.chat-mock .bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  max-width: 85%;
  margin: 0 0 10px;
}
.chat-mock .bubble.user {
  background: var(--wp--preset--color--ink);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-mock .bubble.bot {
  background: var(--wp--preset--color--cream);
  border: 1px solid var(--wp--preset--color--line);
  border-bottom-left-radius: 4px;
}

/* ------- FAQ accordéon ------- */
.aide-faq .wp-block-details {
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 0 10px;
  transition: border-color .15s;
}
.aide-faq .wp-block-details[open] {
  border-color: var(--wp--preset--color--ink);
}
.aide-faq .wp-block-details summary {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between;
  align-items: center;
}
.aide-faq .wp-block-details summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 300;
  color: var(--wp--preset--color--red);
  transition: transform .2s;
}
.aide-faq .wp-block-details[open] summary::after {
  content: "−";
}
.aide-faq .wp-block-details p {
  color: var(--wp--preset--color--ink-soft);
  margin-top: 12px;
}

/* ------- Footer ------- */
.site-footer {
  background: var(--wp--preset--color--ink);
  color: #C8C4B8;
}

/* ============================================================
   STATUS DASHBOARD (v1.11.1) — visuel renforcé
   ============================================================ */

.aide-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.aide-status-card {
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--wp--preset--color--line);
  border-left: 4px solid var(--wp--preset--color--line);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aide-status-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.aide-status-card.is-ok      { border-left-color: var(--wp--preset--color--moss); }
.aide-status-card.is-warning { border-left-color: var(--wp--preset--color--ochre); }
.aide-status-card.is-error   { border-left-color: var(--wp--preset--color--red); }

.aide-status-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.aide-status-card h3 {
  margin: 0;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.3px;
  line-height: 1.1;
}
.aide-status-card h3 a {
  text-decoration: none;
  color: inherit;
}
.aide-status-card h3 a:hover {
  color: var(--wp--preset--color--red);
}

/* Pastille à côté du titre - décoratif uniquement */
.aide-status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.aide-status-card.is-ok      .aide-status-dot { background: var(--wp--preset--color--moss); box-shadow: 0 0 0 3px rgba(63,122,75,.18); }
.aide-status-card.is-warning .aide-status-dot { background: var(--wp--preset--color--ochre); box-shadow: 0 0 0 3px rgba(232,165,47,.18); }
.aide-status-card.is-error   .aide-status-dot { background: var(--wp--preset--color--red); box-shadow: 0 0 0 3px rgba(237,28,36,.20); }

/* Badge "Opérationnel" / "Maintenance" / "Panne" */
.aide-status-label {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 5px 10px;
  border-radius: 999px;
  margin: 0;
}
.aide-status-card.is-ok .aide-status-label {
  background: var(--wp--preset--color--moss-soft);
  color: var(--wp--preset--color--moss);
}
.aide-status-card.is-warning .aide-status-label {
  background: var(--wp--preset--color--ochre-soft);
  color: #B47A00;
}
.aide-status-card.is-error .aide-status-label {
  background: var(--wp--preset--color--red-soft);
  color: var(--wp--preset--color--red);
}

.aide-status-msg {
  font-size: 14px;
  color: var(--wp--preset--color--ink-soft);
  margin: 0;
  line-height: 1.5;
  padding-top: 4px;
  border-top: 1px dashed var(--wp--preset--color--line);
}

/* Variants du topbar pill */
.status-pill.is-warning::before { background: #E8A52F; box-shadow: 0 0 0 4px rgba(232,165,47,.22); }
.status-pill.is-error::before   { background: #ED1C24; box-shadow: 0 0 0 4px rgba(237,28,36,.22); }
.template-part--topbar .status-pill.is-warning,
.template-part--topbar .status-pill.is-error { font-weight: 600; }


/* v1.11.3 — Pill du topbar cliquable */
.aide-status-link { cursor: pointer; }
.aide-status-link:hover { opacity: .8; }
/* Neutraliser l'ancien pseudo-element pour éviter double dot */
.status-pill::before { display: none; }


/* ============================================================
   ANIMATIONS v1.12.1 — VERSION MUSCLE, bien visibles
   ============================================================ */

@keyframes aide-fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes aide-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes aide-slideInFromLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes aide-slideInFromRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes aide-zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes aide-bounce-in {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; transform: scale(1.05); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@keyframes aide-pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,165,47,.7); transform: scale(1); }
  50%      { box-shadow: 0 0 0 14px rgba(232,165,47,0); transform: scale(1.3); }
}
@keyframes aide-pulse-error {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237,28,36,.8); transform: scale(1); }
  50%      { box-shadow: 0 0 0 18px rgba(237,28,36,0); transform: scale(1.4); }
}
@keyframes aide-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(-10deg); }
  40%      { transform: rotate(10deg); }
  60%      { transform: rotate(-8deg); }
  80%      { transform: rotate(8deg); }
}
@keyframes aide-wave {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(20deg); }
  75%      { transform: rotate(-15deg); }
}
@keyframes aide-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@media (prefers-reduced-motion: no-preference) {

  /* HERO ENTRANCE — plus marquée */
  .aide-hero .eyebrow {
    animation: aide-zoomIn .6s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: .15s;
  }
  .aide-hero h1 {
    animation: aide-fadeInUp .9s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: .35s;
  }
  .aide-hero h1 em {
    background-size: 200% auto;
    animation: aide-fadeIn 1.2s ease-out both;
    animation-delay: .9s;
  }
  .aide-hero .has-large-font-size {
    animation: aide-fadeInUp .8s ease-out both;
    animation-delay: .6s;
  }

  /* CARDS SERVICES — entrée bien visible + hover dramatique */
  .is-style-card.aide-anim-pending {
    opacity: 0;
    transform: translateY(50px) scale(0.92);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  }
  .is-style-card.aide-anim-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  .is-style-card {
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s, border-color .35s;
  }
  .is-style-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 32px rgba(20,20,20,.15);
  }
  .is-style-card:hover .card-icon {
    transform: scale(1.2) rotate(-8deg);
  }
  .card-icon {
    transition: transform .4s cubic-bezier(.34,1.56,.64,1);
  }
  .is-style-card.aide-anim-visible .card-icon {
    animation: aide-bounce-in .7s cubic-bezier(.68,-0.55,.27,1.55) backwards;
    animation-delay: .25s;
  }
  .is-style-card .card-arrow {
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  }
  .is-style-card:hover .card-arrow {
    transform: translate(6px, -4px) scale(1.15);
    background: var(--wp--preset--color--red);
    color: #fff;
  }

  /* ÉMOJI 👋 sur la home — anime au chargement */
  .aide-hero h1 {
    position: relative;
  }
  .aide-hero h1::first-letter,
  .aide-hero h1 {
    display: inline-block;
  }

  /* BOUTONS — bounce + lift au hover */
  .wp-block-button__link {
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), background-color .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
  }
  .wp-block-button__link:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(237,28,36,.3);
  }
  .wp-block-button__link:active {
    transform: scale(0.95);
  }

  /* FAQ accordéon — ouverture marquée */
  .wp-block-details {
    transition: border-color .2s, background-color .2s;
  }
  .wp-block-details:hover {
    border-color: var(--wp--preset--color--ink);
  }
  .wp-block-details[open] > *:not(summary) {
    animation: aide-fadeInUp .4s ease-out;
  }
  .wp-block-details summary::after {
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  }

  /* TOPBAR PILL */
  .aide-status-link {
    animation: aide-fadeIn .6s ease-out both;
    animation-delay: .3s;
    transition: opacity .2s, transform .2s;
  }
  .aide-status-link.is-warning,
  .aide-status-link.is-error {
    animation: aide-slideInFromLeft .6s cubic-bezier(.22,.61,.36,1) both;
  }
  .aide-status-link:hover {
    transform: translateY(-2px) scale(1.03);
  }

  /* STATUS DASHBOARD — cascade visible + pulse marqué */
  .aide-status-card {
    animation: aide-fadeInUp .55s cubic-bezier(.22,.61,.36,1) both;
  }
  .aide-status-card:nth-child(1) { animation-delay: .05s; }
  .aide-status-card:nth-child(2) { animation-delay: .15s; }
  .aide-status-card:nth-child(3) { animation-delay: .25s; }
  .aide-status-card:nth-child(4) { animation-delay: .35s; }
  .aide-status-card:nth-child(5) { animation-delay: .45s; }
  .aide-status-card:nth-child(6) { animation-delay: .55s; }
  .aide-status-card:nth-child(7) { animation-delay: .65s; }
  .aide-status-card:nth-child(8) { animation-delay: .75s; }
  .aide-status-card:nth-child(9) { animation-delay: .85s; }

  .aide-status-card.is-warning .aide-status-dot {
    animation: aide-pulse-warning 2s ease-out infinite;
  }
  .aide-status-card.is-error .aide-status-dot {
    animation: aide-pulse-error 1.1s ease-out infinite;
  }

  /* Hover sur cards status */
  .aide-status-card {
    transition: transform .25s cubic-bezier(.22,.61,.36,1), box-shadow .25s;
  }
  .aide-status-card:hover {
    transform: translateY(-4px);
  }

  /* HEADER — logo qui wiggle au survol */
  .custom-site-logo {
    transition: transform .3s;
  }
  .custom-site-logo:hover img {
    animation: aide-wave 1s ease-in-out;
  }

  /* NAV LINKS — soulignement animé */
  .wp-block-navigation-item__content {
    position: relative;
    transition: color .2s;
  }
  .wp-block-navigation-item__content::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--wp--preset--color--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s cubic-bezier(.22,.61,.36,1);
  }
  .wp-block-navigation-item__content:hover::after {
    transform: scaleX(1);
  }
  .nav-cta .wp-block-navigation-item__content::after { display: none; }

  /* VIDÉOS — zoom + rotation léger au hover */
  .is-style-video-card {
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s;
  }
  .is-style-video-card:hover {
    transform: translateY(-6px) scale(1.02);
  }
  .video-thumb img,
  .video-thumb {
    transition: transform .5s cubic-bezier(.22,.61,.36,1);
  }
  .is-style-video-card:hover .video-thumb img {
    transform: scale(1.08);
  }

  /* FOOTER — fade in à l'arrivée */
  .site-footer, footer.site-footer {
    animation: aide-fadeIn 1s ease-out;
  }

  /* PARAGRAPHES dans le hero — entrée */
  .aide-hero p {
    transition: all .3s;
  }

  /* LIENS dans le contenu */
  .wp-block-post-content a:not(.wp-block-button__link),
  .entry-content a:not(.wp-block-button__link) {
    transition: color .2s;
    background-image: linear-gradient(to right, var(--wp--preset--color--red), var(--wp--preset--color--red));
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size .3s ease-out;
  }
  .wp-block-post-content a:not(.wp-block-button__link):hover,
  .entry-content a:not(.wp-block-button__link):hover {
    background-size: 100% 2px;
  }

  /* CHATBOT bubble entrance — pour Eugène/Typebot */
  iframe[id*="typebot"], div[id*="typebot"] {
    animation: aide-bounce-in .6s cubic-bezier(.34,1.56,.64,1);
  }
}

  /* ======== KIT BAC1 — animations sympa ======== */
  .aide-quickstart h2 {
    animation: aide-slideInFromLeft .9s cubic-bezier(.22,.61,.36,1) both;
  }
  .aide-quickstart > .wp-block-column:first-child > p,
  .aide-quickstart > .wp-block-column:first-child .wp-block-buttons {
    animation: aide-fadeInUp .8s ease-out both;
    animation-delay: .25s;
  }

  .aide-quickstart .wp-block-list li {
    opacity: 0;
    transform: translateX(60px) scale(.96);
    transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
  }
  .aide-quickstart.is-in-view .wp-block-list li {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(1) { transition-delay: .15s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(2) { transition-delay: .32s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(3) { transition-delay: .49s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(4) { transition-delay: .66s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(5) { transition-delay: .83s; }

  /* Numéros rouges qui POP */
  .aide-quickstart .wp-block-list li::before {
    transform: scale(0);
    transition: transform .5s cubic-bezier(.68,-0.55,.27,1.55);
  }
  .aide-quickstart.is-in-view .wp-block-list li::before { transform: scale(1); }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(1)::before { transition-delay: .4s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(2)::before { transition-delay: .57s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(3)::before { transition-delay: .74s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(4)::before { transition-delay: .91s; }
  .aide-quickstart.is-in-view .wp-block-list li:nth-child(5)::before { transition-delay: 1.08s; }

  /* Hover étape */
  .aide-quickstart .wp-block-list li {
    transition-property: opacity, transform, background, border-color, box-shadow;
  }
  .aide-quickstart .wp-block-list li:hover {
    transform: translateX(-4px) scale(1.02);
    background: rgba(237,28,36,.10);
    border-color: rgba(237,28,36,.40);
    box-shadow: 0 6px 20px rgba(237,28,36,.15);
  }
  .aide-quickstart .wp-block-list li:hover::before {
    transform: scale(1.18) rotate(-8deg);
    box-shadow: 0 4px 12px rgba(237,28,36,.5);
  }

  /* Bouton Voir le guide complet — pulse subtil */
  .aide-quickstart .wp-block-button__link {
    position: relative;
  }
  .aide-quickstart .wp-block-button__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(237,28,36,.6);
    animation: aide-pulse-cta 2.4s ease-out infinite;
    pointer-events: none;
  }
  @keyframes aide-pulse-cta {
    0%   { box-shadow: 0 0 0 0 rgba(237,28,36,.55); }
    70%  { box-shadow: 0 0 0 16px rgba(237,28,36,0); }
    100% { box-shadow: 0 0 0 0 rgba(237,28,36,0); }
  }

  /* ======== EUGÈNE — conversation animée ======== */
  .aide-eugene h2 {
    animation: aide-slideInFromLeft .8s cubic-bezier(.22,.61,.36,1) both;
  }
  .aide-eugene > .wp-block-column:first-child > p,
  .aide-eugene > .wp-block-column:first-child .wp-block-buttons {
    animation: aide-fadeInUp .7s ease-out both;
    animation-delay: .2s;
  }

  /* Bouton Discuter avec Eugène — pulse + scale léger en boucle */
  .aide-eugene .wp-block-button__link {
    animation: aide-cta-breathe 3s ease-in-out infinite;
  }
  @keyframes aide-cta-breathe {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(20,20,20,.18); }
    50%      { transform: scale(1.04); box-shadow: 0 8px 26px rgba(20,20,20,.32); }
  }

  /* Chat mock — entrée */
  .aide-eugene .chat-mock {
    opacity: 0;
    transform: scale(.92) translateY(20px);
    transition: opacity .7s ease-out, transform .7s cubic-bezier(.34,1.56,.64,1), box-shadow .7s;
  }
  .aide-eugene.is-in-view .chat-mock {
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 20px 50px rgba(20,20,20,.18);
  }

  /* Bulles — cascade en séquence comme un vrai chat */
  .aide-eugene .chat-mock .bubble {
    opacity: 0;
    transition: opacity .5s ease-out, transform .5s cubic-bezier(.34,1.56,.64,1);
  }
  .aide-eugene .chat-mock .bubble.user {
    transform: translateX(40px) scale(.85);
    transform-origin: bottom right;
  }
  .aide-eugene .chat-mock .bubble.bot {
    transform: translateX(-40px) scale(.85);
    transform-origin: bottom left;
  }
  .aide-eugene.is-in-view .chat-mock .bubble {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  .aide-eugene.is-in-view .chat-mock .bubble:nth-child(1) { transition-delay: .5s; }
  .aide-eugene.is-in-view .chat-mock .bubble:nth-child(2) { transition-delay: 1.1s; }
  .aide-eugene.is-in-view .chat-mock .bubble:nth-child(3) { transition-delay: 1.7s; }
  .aide-eugene.is-in-view .chat-mock .bubble:nth-child(4) { transition-delay: 2.3s; }

  /* Indicateur "Eugène tape..." entre les bulles */
  .aide-eugene .chat-mock::before {
    content: "● ● ●";
    position: absolute;
    left: 32px;
    bottom: 60px;
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--wp--preset--color--ink-soft, #6c6c6c);
    opacity: 0;
    animation: aide-typing-dots 1.4s ease-in-out infinite;
  }
  .aide-eugene .chat-mock { position: relative; }
  .aide-eugene.is-in-view .chat-mock::before {
    opacity: 0;
    animation: aide-typing-show 4s ease-out forwards;
  }
  @keyframes aide-typing-show {
    0%    { opacity: 0; }
    18%   { opacity: 0; }
    20%   { opacity: 1; }
    27%   { opacity: 1; }
    29%   { opacity: 0; }
    44%   { opacity: 1; }
    51%   { opacity: 1; }
    53%   { opacity: 0; }
    100%  { opacity: 0; }
  }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

