/*
 * MSN Troc - Additional Styles
 * Animations avancées, éditeur Gutenberg, impression
 */

/* ── Pagination Styles ── */
.nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 40px 0;
  flex-wrap: wrap;
}

.page-numbers {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45,125,210,0.1);
  border: 1px solid rgba(45,125,210,0.3);
  color: var(--blue-light);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--grad-button);
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-metal);
}

.page-numbers.dots {
  background: none;
  border-color: transparent;
  color: var(--blue-sky);
}

/* ── Comment Form Overrides ── */
#respond {
  padding: 36px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(45,125,210,0.2);
  border-radius: var(--radius-lg);
  margin-top: 40px;
}

.comment-reply-link {
  color: var(--blue-light);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.comment-reply-link:hover { color: var(--white); }

.comment-list ol { list-style: none; padding-left: 24px; margin-top: 16px; }

/* ── Entry Content Typography ── */
.entry-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 40px 0 16px;
  background: linear-gradient(135deg, #fff, #a8d4f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  margin: 28px 0 12px;
}

.entry-content p { color: var(--blue-sky); line-height: 1.85; margin-bottom: 18px; }

.entry-content ul, .entry-content ol {
  color: var(--blue-sky);
  padding-left: 24px;
  margin-bottom: 18px;
  line-height: 1.8;
}

.entry-content li { margin-bottom: 6px; }

.entry-content blockquote {
  border-left: 3px solid var(--blue-bright);
  padding: 16px 24px;
  margin: 28px 0;
  background: rgba(45,125,210,0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--violet-light);
  font-size: 1.05rem;
}

.entry-content a {
  color: var(--blue-light);
  text-decoration: underline;
  text-decoration-color: rgba(91,163,232,0.4);
  transition: all 0.3s;
}

.entry-content a:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 20px 0;
  box-shadow: var(--shadow-card);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.entry-content table th,
.entry-content table td {
  padding: 12px 16px;
  border: 1px solid rgba(45,125,210,0.2);
  color: var(--blue-sky);
  text-align: left;
}

.entry-content table th {
  background: rgba(45,125,210,0.15);
  color: var(--white);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.entry-content table tr:hover td {
  background: rgba(45,125,210,0.05);
}

.entry-content code {
  background: rgba(45,125,210,0.15);
  border: 1px solid rgba(45,125,210,0.25);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: monospace;
  color: var(--blue-sky);
  font-size: 0.88em;
}

.entry-content pre {
  background: var(--black-soft);
  border: 1px solid rgba(45,125,210,0.2);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue-sky);
}

.entry-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), transparent);
  margin: 40px 0;
}

/* ── Breadcrumbs ── */
.breadcrumbs {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(45,125,210,0.15);
  padding: 12px 0;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--blue-sky);
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: rgba(91,163,232,0.5);
}

.breadcrumbs li:last-child { color: var(--white); }

.breadcrumbs a {
  color: var(--blue-sky);
  transition: color 0.3s;
}

.breadcrumbs a:hover { color: var(--white); }

/* ── Gutenberg Block Overrides ── */
.wp-block-quote {
  border-left: 3px solid var(--blue-bright);
  padding: 16px 24px;
  margin: 28px 0;
  background: rgba(45,125,210,0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.wp-block-quote p { color: var(--violet-light); font-style: italic; }
.wp-block-quote cite { color: var(--blue-sky); font-size: 0.85rem; }

.wp-block-button .wp-block-button__link {
  background: var(--grad-button) !important;
  color: var(--white) !important;
  border-radius: var(--radius-xl) !important;
  border: none !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  transition: var(--transition) !important;
  padding: 14px 32px !important;
}

.wp-block-button .wp-block-button__link:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-glow) !important;
}

.wp-block-separator {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), var(--violet-light), var(--blue-bright), transparent);
  margin: 40px auto;
  max-width: 400px;
}

.wp-block-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.wp-block-image img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.wp-block-gallery {
  gap: 12px !important;
}

.wp-block-gallery .wp-block-image img {
  border-radius: var(--radius-sm);
}

/* ── Skip Link (Accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--blue-bright);
  color: var(--white);
  padding: 10px 20px;
  z-index: 9999;
  font-weight: 700;
  transition: top 0.3s;
}

.skip-link:focus { top: 0; }

/* ── Back to Top Button ── */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-button);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-metal);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 500;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  color: var(--white);
}

/* ── Loading Screen ── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--blue-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  background: var(--grad-metal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  animation: pulse 2s ease-in-out infinite;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(45,125,210,0.2);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-bright), var(--violet-light), var(--blue-light));
  border-radius: 2px;
  animation: loadBar 1.2s ease-in-out;
}

@keyframes loadBar {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Tag Cloud ── */
.tagcloud a {
  display: inline-block;
  background: rgba(45,125,210,0.1);
  border: 1px solid rgba(45,125,210,0.25);
  border-radius: 20px;
  color: var(--blue-sky);
  font-size: 0.78rem !important;
  padding: 4px 12px;
  margin: 3px;
  transition: var(--transition);
  text-decoration: none;
}

.tagcloud a:hover {
  background: var(--grad-button);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Print ── */
@media print {
  .site-header, .site-footer, .hero-orb, #particleCanvas,
  .back-to-top, .hamburger, .mobile-menu, .cta-banner { display: none !important; }

  body { background: #fff; color: #000; }
  .entry-content p, .entry-content li { color: #333; }
  a { color: #1a4a8a; }

  .container { max-width: 100%; padding: 0 20px; }
  .section { padding: 20px 0; }
}

/* ── Accessibility Focus Styles ── */
*:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
