/* ==========================================
   SITE ASSOCIATION BEAUFIEF - CSS GLOBAL
   Centre de loisirs & périscolaire
   Charte : Terre cuite / Beige lin / Vert sauge / Jaune moutarde
   
   Ce fichier contient UNIQUEMENT les styles partagés
   par toutes les pages (topbar, header, nav, footer,
   boutons, grilles communes, stats, info-banner).
   Les styles spécifiques à chaque page sont dans css/[page].css
========================================== */

:root {
  --terre-cuite: #b4463a;
  --beige-lin: #f6f0e6;
  --vert-sauge: #5c6f5c;
  --jaune-moutarde: #d8b24a;
  --texte: #2b2b2b;
  --gris: #666;
  --blanc: #ffffff;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  --radius: 18px;
  --font-title: "Poppins", sans-serif;
  --font-body: "Quicksand", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font-body); background: var(--beige-lin); color: var(--texte); line-height: 1.6; overflow-x: hidden; width: 100%; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; }
.container { width: 92%; max-width: 1200px; margin: auto; }

/* ==========================================
   TOPBAR
========================================== */
.topbar {
  background: var(--vert-sauge);
  color: var(--blanc);
  padding: 10px 0;
  font-size: 0.95rem;
}
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-left, .topbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}
.topbar-left a, .topbar-right a {
  font-weight: 600;
}
.topbar-right a:hover, .topbar-left a:hover {
  color: var(--jaune-moutarde);
}

/* ==========================================
   HEADER & NAVIGATION
========================================== */
header {
  background: var(--blanc);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar { padding: 15px 0; }
.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-zone img {
  width: 75px;
  height: auto;
}
.logo-zone h1 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--terre-cuite);
  font-weight: 800;
}
.logo-zone p {
  font-size: 0.85rem;
  color: var(--gris);
  margin-top: -4px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  align-items: center;
}
nav ul li a {
  font-weight: 600;
  color: var(--texte);
  padding: 8px 7px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 0.88rem;
}
nav ul li a:hover {
  background: var(--beige-lin);
  color: var(--terre-cuite);
}

nav ul li a.active {
  color: var(--terre-cuite);
  font-weight: 700;
}
nav ul li a.btn-primary {
  background: var(--terre-cuite);
  color: var(--blanc);
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 700;
}
nav ul li a.btn-primary:hover {
  background: #98392f;
  color: var(--blanc);
}

/* ==========================================
   MENU BURGER
========================================== */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
  padding: 5px;
}
.burger span {
  width: 28px;
  height: 3px;
  background: var(--terre-cuite);
  border-radius: 4px;
  transition: 0.3s;
  display: block;
}

/* Animation du burger actif */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}
.burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay sombre quand le menu est ouvert */
body.menu-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
body.menu-open {
  overflow: hidden;
}

/* ==========================================
   BOUTONS
========================================== */
.btn-primary {
  background: var(--terre-cuite);
  color: var(--blanc);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  display: inline-block;
  transition: 0.25s;
}
.btn-primary:hover {
  background: #98392f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(180, 70, 58, 0.3);
}
.btn-secondary {
  background: var(--jaune-moutarde);
  color: var(--texte);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  display: inline-block;
  transition: 0.25s;
}
.btn-secondary:hover {
  background: #c19b33;
  transform: translateY(-2px);
}

/* ==========================================
   SECTIONS GÉNÉRALES
========================================== */
.section {
  padding: 70px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 45px;
}
.section-title h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--terre-cuite);
  margin-bottom: 8px;
}
.section-title p {
  color: var(--gris);
  max-width: 700px;
  margin: auto;
}

/* ==========================================
   GRILLE 3 COLONNES & CARDS
========================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  transition: 0.3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.card:hover h3 {
  color: var(--terre-cuite);
  transition: 0.2s;
}
.service-card {
  text-align: center;
}
.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}
.card h3 {
  font-family: var(--font-title);
  margin-bottom: 10px;
  color: var(--vert-sauge);
}
.card p {
  color: var(--gris);
}
.card a {
  display: inline-block;
  margin-top: 15px;
  font-weight: 700;
  color: var(--terre-cuite);
}
.card a:hover {
  text-decoration: underline;
}

/* ==========================================
   SECTION STATISTIQUES
========================================== */
.stats-section {
  background: var(--vert-sauge);
  color: var(--blanc);
  padding: 60px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stats-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}
.stat-item {
  padding: 20px;
}
.stat-number {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  color: var(--jaune-moutarde);
  margin-bottom: 10px;
}
.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ==========================================
   BANNIÈRE INFO
========================================== */
.info-banner {
  background: var(--terre-cuite);
  color: var(--blanc);
  padding: 50px 0;
  text-align: center;
}
.info-banner h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  margin-bottom: 10px;
}
.info-banner p {
  max-width: 800px;
  margin: auto;
  margin-bottom: 20px;
}

/* ==========================================
   HIGHLIGHT BOX (commune à plusieurs pages)
========================================== */
.highlight-box {
  background: linear-gradient(to right, rgba(216, 178, 74, 0.08), var(--blanc));
  border-left: 8px solid var(--jaune-moutarde);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 25px 0;
}
.highlight-box strong {
  color: var(--terre-cuite);
}
.highlight-box h3 {
  color: var(--terre-cuite);
  margin-bottom: 15px;
  margin-top: 0 !important;
}
.highlight-box ul {
  padding-left: 20px;
  margin-top: 10px;
}
.highlight-box ul li {
  margin-bottom: 8px;
}
.highlight-box a {
  color: var(--terre-cuite);
  font-weight: bold;
  text-decoration: underline;
}
.highlight-box a:hover {
  color: #98392f;
}

/* ==========================================
   FOOTER
========================================== */
footer {
  background: var(--vert-sauge);
  color: var(--blanc);
  padding: 50px 0 0;
}

.footer-grid-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-family: var(--font-title);
  margin-bottom: 15px;
  color: var(--blanc);
  font-size: 1.1rem;
  border-bottom: 2px solid var(--jaune-moutarde);
  padding-bottom: 6px;
  display: inline-block;
}

.footer-col p {
  margin-bottom: 10px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.footer-col a {
  color: var(--blanc);
  transition: 0.2s;
}

.footer-col a:hover {
  color: var(--jaune-moutarde);
}

.btn-footer-portail {
  display: inline-block;
  background: var(--terre-cuite);
  color: var(--blanc) !important;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 10px;
  transition: 0.25s;
}

.btn-footer-portail:hover {
  background: #98392f;
  transform: translateY(-2px);
  color: var(--blanc) !important;
}

/* Section partenaires */
.footer-partners {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px 0;
  text-align: center;
}

.footer-partners h3 {
  font-family: var(--font-title);
  color: var(--blanc);
  margin-bottom: 20px;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--jaune-moutarde);
  padding-bottom: 6px;
  display: inline-block;
}

.partners-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.partners-logos a {
  display: block;
  transition: 0.3s;
  opacity: 0.9;
}

.partners-logos a:hover {
  opacity: 1;
  transform: scale(1.05);
}

.partners-logos img {
  height: 80px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================
   RESPONSIVE MOBILE — MENU BURGER
   (max-width: 1000px)
========================================== */
@media (max-width: 1000px) {
  .burger {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: var(--blanc);
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    padding: 80px 20px 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  nav ul.active {
    display: flex;
    right: 0;
  }

  nav ul li {
    width: 100%;
  }
  nav ul li a {
    display: block;
    padding: 15px 20px;
    border-radius: 8px;
  }
  nav ul li a:hover {
    background: var(--beige-lin);
  }

  /* "Centre de loisirs et mercredis" : annule le style inline en version burger */
  nav ul li a[href=" centre.html"] {
    flex-direction: row !important;
    align-items: flex-start !important;
    text-align: left !important;
    line-height: 1.6 !important;
    white-space: normal !important;
  }
  nav ul li a[href=" centre.html"] br {
    display: none;
  }
}

/* ==========================================
   RESPONSIVE - TABLETTES (max-width: 992px)
========================================== */
@media (max-width: 992px) {
  /* Grid 3 colonnes devient 2 */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats en 2 colonnes */
  .stats-grid, .stats-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px;
  }

  /* Footer en 2 colonnes */
  .footer-grid-main {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .partners-logos {
    gap: 30px;
  }

  .partners-logos img {
    height: 50px;
  }
}

/* ==========================================
   RESPONSIVE - MOBILES (max-width: 768px)
========================================== */
@media (max-width: 768px) {
  .container {
    width: 90%;
  }

  /* Topbar en colonne */
  .topbar {
    font-size: 0.85rem;
    padding: 8px 0;
  }
  .topbar-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .topbar-left, .topbar-right {
    flex-direction: column;
    gap: 5px;
  }

  /* Logo plus petit */
  .logo-zone img {
    width: 55px;
  }
  .logo-zone h1 {
    font-size: 1.1rem;
  }
  .logo-zone p {
    font-size: 0.75rem;
  }

  /* Sections */
  .section {
    padding: 50px 0;
  }
  .section-title h2 {
    font-size: 1.6rem;
  }

  /* Grid 3 devient 1 colonne */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Stats en 1 colonne */
  .stats-section {
    padding: 40px 0;
  }
  .stats-grid, .stats-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .stat-number {
    font-size: 2.5rem;
  }

  /* Info banner */
  .info-banner {
    padding: 40px 0;
  }
  .info-banner h2 {
    font-size: 1.5rem;
  }

  /* Footer en 1 colonne */
  footer {
    padding: 35px 0 0;
  }
  .footer-grid-main {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .footer-col h3 {
    font-size: 1.1rem;
  }
  .footer-col p, .footer-col a {
    font-size: 0.9rem;
  }

  .partners-logos {
    gap: 20px;
    flex-direction: column;
  }

  .partners-logos img {
    height: 45px;
  }
}

  /* Highlight box */
  .highlight-box {
    padding: 18px;
    border-left-width: 5px;
  }


/* ==========================================
   RESPONSIVE - PETITS MOBILES (max-width: 480px)
========================================== */
@media (max-width: 480px) {
  .container {
    width: 88%;
  }

  .section {
    padding: 40px 0;
  }
  .section-title h2 {
    font-size: 1.4rem;
  }

  .card {
    padding: 20px;
  }
  .service-card img {
    height: 150px;
  }

  .stat-number {
    font-size: 2rem;
  }
  .stat-label {
    font-size: 1rem;
  }

  .info-banner h2 {
    font-size: 1.3rem;
  }

  .btn-primary, .btn-secondary {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* ==========================================
   RESPONSIVE - TRÈS PETITS MOBILES (max-width: 400px)
========================================== */
@media (max-width: 400px) {
  .logo-zone {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .logo-zone img {
    width: 45px;
  }

  .section-title h2 {
    font-size: 1.2rem;
  }

  .card h3 {
    font-size: 1rem;
  }
  .card p {
    font-size: 0.9rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .btn-primary, .btn-secondary {
    padding: 9px 14px;
    font-size: 0.85rem;
  }
}