/**
 * Centrale Digitale — Shared Theme Styles
 * Common styles for header, footer, reset, variables, animations.
 * Enqueued via functions.php on all pages.
 */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #1A2B6B;
  --secondary: #1E7FD8;
  --accent: #F5C518;
  --accent-dark: #E8B000;
  --bg-light: #F7F9FC;
  --text: #1A1A2E;
  --white: #FFFFFF;
  --shadow: 0 8px 40px rgba(26,43,107,0.12);
  --shadow-hover: 0 20px 60px rgba(26,43,107,0.2);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== HEADER ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 10px 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
  background: rgba(26, 43, 107, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
header.scrolled {
  background: rgba(26, 43, 107, 0.95);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 4px 30px rgba(26, 43, 107, 0.4);
}

/* Logo — toujours light sur fond noir glass */
header .logo-light { display: block; }
header .logo-dark  { display: none; }

/* Navigation */
nav { display: flex; align-items: center; gap: 32px; }
nav a {
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: color var(--transition);
}
nav a:hover { color: var(--accent); }

/* Header CTA button */
.btn-cta-header {
  background: var(--accent); color: var(--primary);
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-cta-header:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245,197,24,0.4);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; top: 70px; left: 0; right: 0;
  background: var(--white); box-shadow: var(--shadow);
  padding: 24px 40px; flex-direction: column; gap: 16px; z-index: 999;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 15px; font-weight: 600; color: var(--primary);
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}
.mobile-menu .btn-cta-header { text-align: center; }

/* ===== FOOTER ===== */
footer {
  background: var(--text); color: var(--white); padding: 60px 40px 30px;
}
.footer-top {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px;
}
.footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-tagline {
  color: rgba(255,255,255,0.55); font-size: 14px;
  line-height: 1.7; max-width: 260px; margin-bottom: 16px;
}
.footer-social { display: flex; gap: 8px; }
.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  transition: background var(--transition), transform var(--transition);
}
.social-btn:hover { background: var(--accent); transform: translateY(-2px); }

.footer-col h4 {
  font-size: 15px; font-weight: 700; margin-bottom: 18px; color: var(--white);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.footer-col ul li {
  font-size: 14px; color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-col ul a { color: rgba(255,255,255,0.6); }
.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px; margin: 40px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-copy { color: rgba(255,255,255,0.4); font-size: 13px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.4); font-size: 12px; }
.footer-links a:hover { color: var(--accent); }

/* ===== SHARED BUTTONS ===== */
.btn-primary {
  background: var(--accent); color: var(--primary);
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(245,197,24,0.5);
}

.btn-outline-white {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1); border-color: var(--white);
}

/* ===== KEYFRAMES ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wordAppear {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sliderLoop {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulseCta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,197,24,0.4); }
  50%      { box-shadow: 0 0 0 15px rgba(245,197,24,0); }
}
@keyframes barGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}
@keyframes lineGrow {
  from { stroke-dashoffset: 400; }
  to   { stroke-dashoffset: 0; }
}

/* ===== RESPONSIVE — Header & Footer ===== */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
  header { padding: 10px 20px; }
  nav { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open + nav { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  header { padding: 8px 16px; }
  footer { padding: 40px 20px 20px; }
}
