/* ==========================================================================
   BASE.CSS — Styles partagés par toutes les pages du site.
   Avant : ce bloc était copié-collé dans le <style> de chaque fichier .php
   (pass.php, donnees.php, accueil.php...). Toute modif demandait de
   répéter le changement partout. Maintenant : un seul fichier, un seul endroit.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Lato:wght@300;400;700;900&display=swap');

:root {
  --primary: #8B0000;
  --primary-hover: #6B0000;
  --gold: #C4A962;
  --gold-dark: #A8873C;
  --dark: #2C2416;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #FAFAFA;
  --bg-gray: #F8F8F8;
  --border: #E5E5E5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- HEADER / NAVIGATION ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5%;
  max-width: 1600px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  height: 75px;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F5F5F5;
  color: var(--text-dark);
  padding: 11px 22px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.closed .dot { background: var(--primary); box-shadow: 0 0 8px rgba(139, 0, 0, 0.4); }
.open .dot   { background: #4CAF50; box-shadow: 0 0 8px rgba(76, 175, 80, 0.4); }
.open   { background: rgba(76, 175, 80, 0.1); border-color: rgba(76, 175, 80, 0.3); }
.closed { background: rgba(139, 0, 0, 0.08); border-color: rgba(139, 0, 0, 0.2); }

.menu {
  display: flex;
  gap: 42px;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.3px;
  position: relative;
  transition: color 0.3s ease;
}

.menu a:not(.btn-nav):hover { color: var(--primary); }

.menu a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.menu a:not(.btn-nav):hover::after { width: 100%; }

.btn-nav {
  background: var(--primary);
  color: white !important;
  padding: 13px 32px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.2);
}

.btn-nav:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

.btn-nav::after { display: none !important; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(8px, -8px); }

/* ---------- DIVIDER générique ---------- */
.divider {
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 35px auto 70px;
  position: relative;
}

.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.divider::before { left: -15px; }
.divider::after { right: -15px; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--bg-gray);
  border-top: 1px solid var(--border);
  padding: 80px 5% 45px;
  text-align: center;
  margin-top: 120px;
}

.footer-disclaimer {
  font-size: 13px;
  color: #999;
  margin-bottom: 50px;
  font-style: italic;
  font-weight: 300;
}

footer strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin-bottom: 35px;
  color: var(--dark);
  letter-spacing: 1.2px;
  font-weight: 600;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 35px;
  flex-wrap: wrap;
  margin: 40px 0 60px;
}

.social-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  position: relative;
  padding-bottom: 3px;
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.social-links a:hover { color: var(--primary); }
.social-links a:hover::after { width: 100%; }

footer hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 60px auto 40px;
  max-width: 1300px;
}

.legal {
  font-size: 13px;
  color: #999;
  font-weight: 300;
}

.legal a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal a:hover { color: var(--primary); }

/* ---------- RESPONSIVE COMMUN ---------- */
@media (max-width: 968px) {
  .menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 420px;
    height: 100vh;
    flex-direction: column;
    background: white;
    padding: 130px 45px 50px;
    transition: left 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 8px 0 30px rgba(0,0,0,0.2);
    align-items: flex-start;
    gap: 32px;
    overflow-y: auto;
  }

  .menu.show { left: 0; }
  .menu-toggle { display: flex; }

  nav { padding: 16px 20px; }
  .logo { height: 65px; }
}

@media (max-width: 640px) {
  .status-badge { display: none; }
}

/* ══════════════════════════════════════════
   BANDEAU D'ANNONCE (piloté depuis la DB)
   ══════════════════════════════════════════ */
#bandeau-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
}

#site-bandeau {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1001;
  min-height: 42px;
  flex-wrap: wrap;
}

#site-bandeau .band-icon { font-size: 15px; flex-shrink: 0; }

#site-bandeau .band-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#site-bandeau .band-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.9;
  border: 1px solid currentColor;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-radius: 2px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

#site-bandeau .band-more:hover { opacity: 1; }

#site-bandeau .band-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
  transition: opacity 0.2s;
  padding: 4px;
}

#site-bandeau .band-close:hover { opacity: 1; }

#bandeau-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#bandeau-popup-overlay.open { opacity: 1; pointer-events: all; }

#bandeau-popup {
  background: white;
  max-width: 520px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  opacity: 0;
  position: relative;
}

#bandeau-popup-overlay.open #bandeau-popup { transform: scale(1) translateY(0); opacity: 1; }

#bandeau-popup-header { padding: 20px 24px; display: flex; align-items: center; gap: 12px; color: white; }
#bandeau-popup-header i { font-size: 20px; flex-shrink: 0; }
#bandeau-popup-header h3 { font-family: 'Cinzel', serif; font-size: 1.2rem; font-weight: 600; flex: 1; line-height: 1.3; }
#bandeau-popup-body { padding: 24px; }
#bandeau-popup-body p { font-size: 1rem; color: #555; line-height: 1.8; white-space: pre-line; }

#bandeau-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#bandeau-popup-close:hover { background: rgba(0,0,0,0.6); }
#bandeau-popup-footer { padding: 0 24px 24px; }

#bandeau-popup-footer button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

#bandeau-popup-footer button:hover { background: var(--primary-hover); }

body.has-bandeau .hero-wrapper,
body.has-bandeau main { margin-top: 42px; }

@media (max-width: 640px) {
  body.has-bandeau .hero-wrapper,
  body.has-bandeau main { margin-top: 42px; }
}
