/* Styles complémentaires du thème (comportements non couverts par le bundle compilé) */

/* Lien d'évitement accessibilité */
.ctf-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}
.ctf-skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: #0e2e52;
  color: #fff;
  border-radius: 0.5rem;
}

/* Header opaque au défilement */
.ctf-header {
  transition: background-color .4s ease, padding .3s ease, box-shadow .4s ease;
}
.ctf-header--scrolled {
  background-color: rgba(250, 247, 242, 0.92) !important;
  box-shadow: 0 8px 30px rgba(14, 46, 82, 0.08);
}

/* Scroll-reveal */
.ctf-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.ctf-reveal--visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .ctf-reveal { opacity: 1; transform: none; transition: none; }
}

/* Menu mobile */
.ctf-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 247, 242, 0.98);
  backdrop-filter: blur(12px);
  z-index: 60;
  padding-top: 6rem;
  overflow-y: auto;
}
.ctf-mobile-menu:not([hidden]) {
  display: block !important;
  height: 100vh !important;
  height: 100dvh !important;
}


/* TOC active */
.ctf-toc a.is-active,
[data-ctf-toc] a.is-active {
  color: #0097B2;
  font-weight: 600;
}

/* Contenu d'article (prose) */
.ctf-prose h2 { font-family: Pluto, "Source Sans 3", system-ui, sans-serif; color: #0e2e52; font-size: 1.9rem; margin: 2.2rem 0 1rem; line-height: 1.2; }
.ctf-prose h3 { font-family: Pluto, "Source Sans 3", system-ui, sans-serif; color: #0e2e52; font-size: 1.45rem; margin: 1.8rem 0 .8rem; }
.ctf-prose p { margin: 0 0 1.25rem; font-size: 1.06rem; line-height: 1.8; }
.ctf-prose ul, .ctf-prose ol { margin: 0 0 1.5rem 1.25rem; }
.ctf-prose ul { list-style: disc; }
.ctf-prose ol { list-style: decimal; }
.ctf-prose li { margin: 0 0 .6rem; line-height: 1.7; }
.ctf-prose a { color: #0097B2; text-decoration: underline; text-underline-offset: 2px; }
.ctf-prose a:hover { color: #e54c50; }
.ctf-prose blockquote { border-left: 4px solid #f8af3b; padding: .5rem 0 .5rem 1.5rem; margin: 1.5rem 0; font-style: italic; color: #0e2e52; }
.ctf-prose img { border-radius: 1rem; margin: 1.5rem 0; }
.ctf-prose strong { color: #0e2e52; font-weight: 700; }

/* Pagination */
.ctf-pagination .nav-links,
.navigation .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: center; }
.navigation .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 .75rem;
  border-radius: 9999px; border: 1px solid rgba(14,46,82,.15);
  color: #0e2e52; text-decoration: none; transition: all .25s ease;
}
.navigation .page-numbers:hover { border-color: #0097B2; color: #0097B2; }
.navigation .page-numbers.current { background: #0097B2; color: #fff; border-color: #0097B2; }

/* Widgets blog */
.ctf-widget { margin-bottom: 1.5rem; }
.ctf-widget ul { list-style: none; margin: 0; padding: 0; }
.ctf-widget li { margin-bottom: .5rem; }
.ctf-widget a { color: #0e2e52; text-decoration: none; transition: color .2s; }
.ctf-widget a:hover { color: #0097B2; }

/* ------------------------------------------------------------------ */
/* Questionnaire « Je fais le point » — toast + animations            */
/* ------------------------------------------------------------------ */
.ctf-q-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  z-index: 9999;
  max-width: min(92vw, 420px);
  background: #e54c50;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(14, 46, 82, 0.24);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}
.ctf-q-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes ctfQFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ctf-q-fade {
  animation: ctfQFade 0.4s ease both;
}



/* -------------------------------------------------------------------------
 * Menus déroulants (navigation)
 * ---------------------------------------------------------------------- */

/* Desktop : le sous-menu est masqué par défaut, révélé au survol/focus du parent. */
.ctf-nav-desktop .ctf-submenu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
}

/* Le padding-top de .ctf-submenu (pt-3) crée un pont invisible entre le lien
   parent et la carte : le survol ne se coupe pas en passant vers le menu. */
.ctf-nav-desktop .ctf-menu-li.group:hover > .ctf-submenu,
.ctf-nav-desktop .ctf-menu-li.group:focus-within > .ctf-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.ctf-nav-desktop .ctf-submenu-card {
  animation: ctfSubmenuIn 0.22s ease both;
}

@keyframes ctfSubmenuIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* La flèche « ↗ » d'une entrée de sous-menu s'accentue au survol. */
.ctf-submenu-item a:hover .ctf-submenu-arrow {
  opacity: 0.7;
  transform: translate(2px, -2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ctf-submenu-arrow {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Mobile : sous-menu replié par défaut, déplié via la classe .is-open. */
.ctf-mobile-menu .ctf-submenu-mobile {
  display: none;
}
.ctf-mobile-menu .ctf-menu-li-mobile.is-open > .ctf-submenu-mobile {
  display: flex;
}
.ctf-mobile-menu .ctf-submenu-toggle .ctf-chevron {
  transition: transform 0.25s ease;
}
.ctf-mobile-menu .ctf-menu-li-mobile.is-open > div .ctf-submenu-toggle .ctf-chevron {
  transform: rotate(180deg);
}
