*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: #1a0000;
  background-image: url("image/Motif%20Pouet%20ligne%20diagonale.png");
  background-repeat: repeat;
  background-size: 100px 100px;
  animation: fond-scroll 20s linear infinite;
  color: #ffcccc;
  font-family: "Times New Roman", serif;
  padding: 15px;
}
 

@keyframes fond-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 400px 400px; }
}
 

.banniere {
  position: relative;
  border: 4px dashed#ff0000;
  background-color: #000000;
  background-image: url("image/motif_pouet%20banni%C3%A8re.png");
   animation: fond-scroll 20s linear infinite;
  background-repeat: repeat;
  background-size: 50px 50px; 
  height: 139px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
@keyframes fond-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 400px 400px; }
}
 
.banniere img {
  max-height: 80px;
  width: auto;
  display: block;
}


.page-wrapper {
  max-width: 950px;
  margin: 0 auto;
  position: relative;
}


.banniere img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}


nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background-color: #000000;
  background-image: url("image/Motif_Pouet_ligne_diagonale.png");
  background-size: 60px 60px;
  border: 2px outset #ff0000;
  padding: 10px 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

nav a {
  color: #ffcc00;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

nav a:hover,
nav a.actif {
  color: #ffffff;
  text-decoration: underline;
}

nav .sitemap-btn {
  margin-left: auto;
  background: #1a0000;
  padding: 7px;
  border-radius: -1px;
  cursor: pointer;
}

nav .sitemap-btn img {
  width: 50px;
  height: 51px;
  display: block;
}


main {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.panel {
  background-color: rgba(0, 0, 0, 0.75);
  border: 4px double #ff0000;
  padding: 20px;
}

.panel h1, .panel h2 {
  color: #ff0000;
  text-shadow: 2px 2px #ffff00;
}

.panel h2 {
  border-bottom: 1px solid #ff0000;
  font-size: 22px;
}

.panel-accueil {
  flex: 1 1 380px;
}

.panel-accueil h1 {
  text-align: center;
  font-size: 32px;
}

.perso-img {
  display: block;
  max-width: 220px;
  margin: 15px auto 0 auto;
  
}


.panel-scroll {
  flex: 1 1 380px;
  max-height: 500px;
  overflow-y: auto;
}

.panel-scroll h2 {
  text-align: center;
  border-bottom: none;
}

.maj-entree {
  background-color: rgba(32, 0, 0, 0.9);
  border: 1px solid #ff0000;
  padding: 10px 12px;
  margin-bottom: 12px;
  position: relative;
}

.maj-entree .date {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 13px;
  color: #ffcc00;
}

.maj-entree p {
  margin: 6px 0;
}


.separateur {
  text-align: center;
  margin: 20px 0;
  font-size: 18px;
  letter-spacing: 4px;
  color: #ff0000;
}

.decor-gauche {
  position: fixed;
  left: 64px;
  top: 100px;
  width: 300px;
  display: block;
  cursor: pointer;
}

.decor-gauche img {
  width: 152%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.decor-gauche:hover img {
  transform: rotate(8deg);
}
.liens-sidebar {
  position: fixed;
  right: 20px;
  top: 220px;
  background-color: rgba(0, 0, 0, 0.85);
  border: 2px double #ff0000;
  padding: 12px;
  text-align: center;
  width: 150px;
}

.liens-sidebar h3 {
  font-size: 18px;
  margin: 0 0 10px 0;
  color: #ff6666;
  text-decoration: underline;
}

.liens-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.liens-grid a img {
  width: 55px;
  height: 55px;
  display: block;
}


.carte-btn {
  /* Bouton "Carte du site" en bas à gauche : remplacé par le bouton
     carte déjà présent dans la nav, donc masqué partout d'un coup ici. */
  display: none;
}


.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.ouvert {
  display: flex;
}

.modal-box {
  background-color: #1a0000;
  border: 4px double #ff0000;
  padding: 25px 30px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  color: #ffcccc;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff0000;
  color: #000;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: bold;
}

.modal-box ul {
  list-style: none;
  padding: 0;
}

.modal-box li {
  margin-bottom: 18px;
}

.modal-box a {
  font-weight: bold;
}


.galerie-hauts {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.cadre-image {
  flex: 1 1 300px;
  border: 3px double #ffff00;
  background-color: rgba(32, 0, 0, 0.8);
  overflow: hidden;
}

.cadre-image img {
  width: 100%;
  display: block;
}

.galerie {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.img-frame {
  border: 3px double #ffff00;
  background-color: rgba(32, 0, 0, 0.8);
  text-align: center;
  padding: 8px;
  width: 150px;
}

.img-frame img {
  width: 130px;
  height: 100px;
  object-fit: cover;
  cursor: zoom-in;

}


.lightbox-box {
  background-color: transparent;
  border: none;
  padding: 0;
  max-width: 90%;
  max-height: 90vh;
  text-align: center;
}

.lightbox-box img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 85vh;
  border: 4px double #ffff00;
  background-color: rgba(32, 0, 0, 0.9);
}

.img-frame p {
  font-size: 12px;
  color: #ffcc00;
  margin: 5px 0 0 0;
}

.stamps-titre {
  text-align: center;
  margin: 28px 0 21px 0;
  background-color: #000000;
  color: #f91e1e;
}

.stamps-grille {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}



.carte {
  background-color: rgba(32, 0, 0, 0.9);
  border: 1px solid #ff0000;
  padding: 12px 15px;
  margin-bottom: 15px;
}

.carte h3 {
  margin-top: 0;
  color: #ffcc00;
}

.full-panel {
  flex: 1 1 100%;
}


footer {
  text-align: center;
  margin: 25px 0 10px 0;
  font-size: 14px;
  color: #ff9999;
}

footer a {
  margin: 0 8px;
}


/* ===================================================================
   RESPONSIVE / MOBILE
   =================================================================== */

@media (max-width: 800px) {

  body {
    padding: 8px;
  }

  .decor-gauche {
    position: static;
    width: 55%;
    max-width: 220px;
    margin: 10px auto;
    left: auto;
    top: auto;
  }

  .decor-gauche img {
    width: 100%;
  }

  .liens-sidebar {
    position: static;
    width: auto;
    margin-top: 15px;
  }

  main {
    gap: 10px;
  }

  .panel {
    padding: 14px;
  }

  .panel-accueil h1 {
    font-size: 24px;
  }

  .perso-img {
    max-width: 160px;
  }
}

@media (max-width: 600px) {

  .banniere {
    height: 90px;
  }

  .banniere img {
    height: 90px;
    max-height: none;
  }

  nav {
    gap: 8px 12px;
    padding: 8px 10px;
    justify-content: center;
  }

  nav a {
    font-size: 15px;
  }

  nav .sitemap-btn {
    margin-left: 0;
  }

  .panel h1 {
    font-size: 22px;
  }

  .panel h2 {
    font-size: 18px;
  }

  .modal-box {
    padding: 18px 16px;
    width: 92%;
  }

  .carte {
    padding: 10px 12px;
  }

  .galerie {
    justify-content: center;
  }

  .img-frame {
    width: 44%;
    min-width: 130px;
  }

  .stamps-grille img {
    width: 70px;
    height: auto;
  }

  .carte-btn {
    padding: 6px 10px;
    font-size: 13px;
    left: 10px;
    bottom: 10px;
  }

  audio {
    max-width: 100%;
  }
}

@media (max-width: 420px) {

  .liens-sidebar {
    width: 100%;
  }

  .liens-grid a img {
    width: 60px;
    height: 60px;
  }

  .img-frame {
    width: 100%;
  }

  nav a {
    font-size: 14px;
  }
}