html, body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Bandeau fin du haut ---------- */

.bandeau-haut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1d3557;
  color: #fff;
  padding: 8px 20px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  position: relative;
  z-index: 20;
}

.bandeau-haut-gauche {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-titre {
  font-weight: bold;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
}

.site-titre:hover {
  text-decoration: underline;
}

.bandeau-haut-droite {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lien-mon-compte {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
}

.lien-mon-compte:hover {
  text-decoration: underline;
}

.bandeau-haut-droite button,
.bandeau-haut-gauche button {
  padding: 5px 12px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.bandeau-haut-droite button:hover,
.bandeau-haut-gauche button:hover {
  background: rgba(255,255,255,0.15);
}

/* ---------- Menu deroulant Administration ---------- */

.menu-administration {
  position: relative;
}

.dropdown-admin {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  list-style: none;
  padding: 6px 0;
  min-width: 240px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
}

.dropdown-admin li {
  padding: 0;
}

.dropdown-admin a {
  display: block;
  padding: 8px 14px;
  color: #1d3557;
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-admin a:hover {
  background: #f0f4ff;
}

/* Titre du groupe de lignes reservees au webmestre */
.dropdown-admin .separateur-menu {
  margin-top: 6px;
  padding: 8px 14px 4px;
  border-top: 1px solid #ddd;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
}

/* ---------- Corps : menu lateral (1/6) + contenu ---------- */

.corps-site {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 5fr;
}

.menu-lateral {
  background: #f4f5f7;
  padding: 20px;
  border-right: 1px solid #ddd;
}

.menu-lateral h2 {
  font-size: 0.95rem;
  margin: 20px 0 6px 0;
}

.menu-lateral h2:first-child {
  margin-top: 0;
}

.menu-lateral h2 a {
  color: #1d3557;
  text-decoration: none;
}

.menu-lateral h2 a:hover {
  text-decoration: underline;
}

.menu-lateral ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-lateral li {
  margin-bottom: 4px;
}

.menu-lateral li ul {
  margin-top: 6px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 2px solid #dbe1e8;
}

.menu-lateral a {
  color: #444;
  text-decoration: none;
  font-size: 0.9rem;
}

.menu-lateral a:hover {
  text-decoration: underline;
}

/* ---------- Contenu principal ---------- */

.contenu-principal {
  padding: 24px 32px;
  background: #fff;
}

.bandeau-titre-lotissement {
  background: #1d3557;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 24px;
}

.section-actualites {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 24px;
}

.section-actualites h2 {
  font-size: 1.1rem;
  border-bottom: 2px solid #1d3557;
  padding-bottom: 8px;
  margin-top: 0;
}

.carte-actualite {
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 0;
}

.carte-actualite:last-child {
  border-bottom: none;
}

.carte-actualite h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
}

.carte-actualite .date-actualite {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 8px;
}

.galerie-actualite {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.vignette-actualite {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #ddd;
  transition: opacity 0.12s ease;
}

.vignette-actualite:hover {
  opacity: 0.8;
}

.lightbox-galerie {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox-galerie[hidden] {
  display: none;
}

.lightbox-galerie img {
  max-width: 88vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-fermer {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-fleche {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

.lightbox-fleche:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-fleche-gauche {
  left: 20px;
}

.lightbox-fleche-droite {
  right: 20px;
}

.carte-actualite img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 8px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.pagination button.actif {
  background: #1d3557;
  color: #fff;
  border-color: #1d3557;
}

/* ---------- Bandeau fin du bas ---------- */

.bandeau-bas {
  background: #1d3557;
  padding: 8px 20px;
  text-align: right;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.15);
}

.bandeau-bas button {
  padding: 6px 16px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.bandeau-bas button:hover {
  background: rgba(255,255,255,0.15);
}

@media (max-width: 800px) {
  .corps-site {
    grid-template-columns: 1fr;
  }

  .menu-lateral {
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
}

/* Groupes de menu avec sous-lignes, ouverts par un clic (liste
   superposee, ne decale pas le reste du menu) */
.groupe-menu-clic {
  position: relative;
}

.btn-toggle-sousmenu {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: bold;
  margin: 20px 0 6px 0;
  cursor: pointer;
  color: #1d3557;
}

.btn-toggle-sousmenu:hover {
  text-decoration: underline;
}

.sousmenu-clic {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  list-style: none;
  padding: 6px 0;
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
}

.sousmenu-clic li {
  margin-bottom: 0;
}

.sousmenu-clic a {
  display: block;
  padding: 8px 14px;
}

.sousmenu-clic a:hover {
  background: #f0f4ff;
}
