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

html, body {
  overflow-x: hidden;
}

/* =====================
   VARIABLES
   ===================== */
:root {
  --vert: #00a651;
  --bleu: #0072bc;
  --bleu-clair: #005fcc;
  --bleu-fonce: #004bb5;
  --jaune: #ffd100;
  --gris: #f5f5f5;
  --texte: #333;
}

/* =====================
   BASE
   ===================== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--texte);
  background: #fff;
}

/* Images responsive global (🔥 important Drupal) */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================
   HEADER
   ===================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--vert);
  color: white;
  position: relative;
  z-index: 800;
}

/* Logo */
.site-header .logo img {
  height: clamp(28px, 6vw, 50px);
}

/* Burger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* =====================
   SIDEBAR MENU
   ===================== */
.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 300px;
  height: 100dvh;
  background: var(--vert);
  padding-top: 80px;
  z-index: 1000;

  transform: translateX(100%);
  transition: transform 0.3s ease;

  box-shadow: -5px 0 20px rgba(0,0,0,0.2);
}

.side-menu.open {
  transform: translateX(0);
}

/* Liste menu */
.side-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.5rem;
}

.side-menu ul li {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.5rem;
}

.side-menu ul li:last-child {
  border-bottom: none;
}

/* Liens */
.side-menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.side-menu a:hover {
  color: var(--texte);
}

/* Bouton fermer */
.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: white;
}

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 900;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

/* =====================
   MAIN LAYOUT
   ===================== */
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* =====================
   NODE PAGE
   ===================== */
.node-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

.node-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.node-content {
  line-height: 1.6;
}

/* Images dans contenu Drupal */
.node-content img {
  width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* =====================
   HOMEPAGE
   ===================== */
body.front .homepage {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.homepage .left img {
  width: 100%;
  border-radius: 8px;
}

.homepage .right {
  max-width: 100%;
}

/* =====================
   MESSAGES DRUPAL
   ===================== */
.site-content [role="status"],
.site-content [role="contentinfo"] {
  text-align: center;
  margin: 1rem auto;
  font-weight: 600;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
  background: var(--gris);
  text-align: center;
  padding: 1rem;
}

/* =====================
   TABLETTE (>=768px)
   ===================== */
@media (min-width: 768px) {

  .site-header {
    flex-direction: row;
    padding: 1rem 2rem;
  }

  body.front .homepage {
    flex-direction: row;
    justify-content: center;
  }

  .homepage .right {
    margin-left: 2rem;
    max-width: 600px;
  }

  .homepage .left img {
    max-width: 400px;
  }

  .node-title {
    font-size: 2rem;
  }

}

/* =====================
   DESKTOP (>=1024px)
   ===================== */
@media (min-width: 1024px) {

  .side-menu {
    max-width: 320px;
  }

  .site-content {
    padding: 2rem;
  }

}