/* ═══════════════════════════════════════════════════
   CHARTE GRAPHIQUE SPST BTP — www.spstbtp.fr
   Bleu marine #1E3068 + Vert lime #8DC11E + Fond blanc
   ═══════════════════════════════════════════════════ */

/* Variables CSS */
:root {
  --spst-marine:  #1E3068;
  --spst-marine2: #162550;
  --spst-vert:    #8DC11E;
  --spst-vert2:   #7AAD10;
  --spst-vert3:   #A8D62A;
  --spst-fond:    #F7F8FA;
  --spst-fond2:   #EEF1F7;
  --spst-texte:   #0D1526;
  --spst-gris:    #667085;
  --spst-border:  #DDE3EE;
}

/* Police Google Fonts — Barlow */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@700;800&display=swap');

body {
  font-family: 'Barlow', -apple-system, sans-serif;
  background: #ffffff;
  color: var(--spst-texte);
}

/* Titres h1-h4 */
h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  color: var(--spst-marine);
  letter-spacing: -0.3px;
}

/* Liens */
a { color: var(--spst-marine); }
a:hover { color: var(--spst-vert2); }

/* Bande verte animée en haut de page */
.site-header::before,
.ast-site-header-wrap::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #8DC11E, #A8D62A, #1E3068, #8DC11E);
  background-size: 300% 100%;
  animation: spstGradient 5s linear infinite;
}
@keyframes spstGradient {
  0%   { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

/* En-tête navigation */
.site-header, .ast-site-header-wrap {
  background: #ffffff !important;
  border-bottom: 1px solid var(--spst-border);
  box-shadow: 0 1px 8px rgba(30,48,104,0.06);
}

/* Logo texte fallback */
.site-title a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--spst-marine) !important;
  letter-spacing: -0.5px;
}

/* Liens de navigation */
.ast-nav-menu > li > a,
.main-navigation a {
  color: #667085 !important;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.ast-nav-menu > li > a:hover,
.ast-nav-menu > li.current-menu-item > a {
  color: var(--spst-marine) !important;
  border-bottom: 3px solid var(--spst-vert);
}

/* Bouton principal */
.wp-block-button__link,
.ast-button,
button[type="submit"],
input[type="submit"] {
  background: var(--spst-marine) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  border: 2px solid var(--spst-marine) !important;
  transition: background 0.15s !important;
}
.wp-block-button__link:hover {
  background: var(--spst-marine2) !important;
  border-color: var(--spst-marine2) !important;
}

/* Sections alternées fond gris */
.section-gris, .wp-block-group.has-background {
  background: var(--spst-fond) !important;
}

/* Cartes actualités */
.actu-card, .wp-block-post {
  background: #ffffff;
  border: 1px solid var(--spst-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}
.actu-card:hover {
  box-shadow: 0 4px 18px rgba(30,48,104,0.10);
  transform: translateY(-2px);
}

/* Badges catégories */
.badge-prevention { background: #8DC11E; color: #162550; }
.badge-reglementation { background: rgba(30,48,104,0.10); color: #1E3068; }
.badge-innovation { background: #1E3068; color: #ffffff; }
.badge-video { background: #FF0000; color: #ffffff; }

/* Footer */
.site-footer, .ast-site-footer {
  background: var(--spst-marine) !important;
  color: rgba(255,255,255,0.75) !important;
}
.site-footer a, .ast-site-footer a {
  color: rgba(255,255,255,0.60) !important;
}
.site-footer a:hover {
  color: var(--spst-vert3) !important;
}

/* Point de synchronisation animé */
.sync-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--spst-vert);
  animation: syncPulse 2.5s ease infinite;
}
@keyframes syncPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* Badges départements */
.dept-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--spst-border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--spst-marine);
  background: #fff;
  text-decoration: none;
  transition: all 0.12s;
  margin: 2px;
}
.dept-badge:hover,
.dept-badge.featured {
  background: var(--spst-marine);
  color: #fff;
  border-color: var(--spst-marine);
}

/* Accessibilité RGAA */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--spst-marine);
  color: #fff;
  padding: 8px 16px;
  font-weight: 700;
  z-index: 9999;
}
.skip-link:focus { left: 0; }
*:focus-visible {
  outline: 3px solid var(--spst-vert);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .grid-3-col { grid-template-columns: 1fr; }
  .grid-2-col { grid-template-columns: 1fr; }
}