/* ================== RESET & BASE ================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Empêche le scroll horizontal */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;      /* important pour le flex */
}


/* Fond de page */
body {
  min-height: 100vh;             /* le body occupe toute la hauteur */
  display: flex;                 /* on active flexbox */
  flex-direction: column;        /* header / main / footer en colonne */
  overflow-x: hidden;

  background: url("IMG_0502 (1).JPG") no-repeat center center fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
  color: #fff;
}


/* Structure principale */
main {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  padding: 40px 0;
  flex: 1;
}

/* ================== HEADER & LOGO ================== */

header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: #111;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  min-height: 140px;
  overflow: visible;
}

/* Dégradé sous le header */
header::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to top, transparent, #111);
  z-index: -1;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  height: 100px;
  width: auto;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  letter-spacing: 2px;
  font-weight: 600;
}

/* ================== MENU BURGER & NAV ================== */

.burger {
  position: absolute;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #111;
  cursor: pointer;
  border: none;
  outline: none;
  padding: 0;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 45px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger span + span {
  margin-top: 8px;
}

/* Animation croix */
.burger.is-open span:nth-child(1) {
  transform: translateY(12px) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
  opacity: 0;
}
.burger.is-open span:nth-child(3) {
  transform: translateY(-12px) rotate(-45deg);
}

/* Panneau de navigation */
#site-nav {
  position: absolute;
  top: 100%;
  right: 30px;
  width: 240px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;

  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

/* Menu ouvert */
#site-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Liens de navigation */
#site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-family: Arial, sans-serif;
  padding: 8px 0;
}

#site-nav a:hover {
  color: #bbb;
}

/* Backdrop quand le menu est ouvert (html.nav-open ajouté en JS) */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

html.nav-open::before {
  opacity: 1;
  pointer-events: auto;
}

/* ================== ENCADRÉS DE TEXTE ================== */

/* Présentation + dates : style de base */
.encadre_presentation,
.encadre_dates,
.encadre_classique {
  background-color: #1a1a1a;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  padding: 20px;
  margin: 40px 20px 20px 20px;  /* un peu plus d’espace sous le header */
  overflow: visible;            /* on ne coupe plus le contenu */
  max-height: none;             /* plus de hauteur limitée */
  cursor: default;              /* ce n’est plus cliquable */
  width: 50%;
}

/* Effet “accordéon” sur ordinateur pour présentation + dates */
.encadre_presentation,
.encadre_dates {
  overflow: hidden;
  max-height: 60px; /* juste le titre visible */
  transition: max-height 0.8s ease, box-shadow 0.3s ease;
  cursor: pointer;
  width: 50%;
}

/* Au survol : on déplie */
.encadre_presentation:hover,
.encadre_dates:hover {
  max-height: 500px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7);
}

/* Présentation = à gauche (par défaut) */
.encadre_presentation {
  margin-left: 0;
}

/* Dates = à droite, plus étroit (effet diagonale) */
.encadre_dates {
  margin-left: auto;
  width: 25%;
}

/* Titres encadrés */
.encadre_presentation h2,
.encadre_dates h2,
.encadre_classique h2 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 24px;
}

/* Texte encadrés */
.encadre_presentation p,
.encadre_dates p,
.encadre_classique p {
  margin-top: 10px;
  font-size: 18px;
  text-align: justify;
}

/* Icone calendrier / autres icônes dans les titres */
.icon-title {
  height: 28px;
  width: auto;
}

/* Encadré dates : sous-titres */
.encadre_dates h3,
.encadre_classique h3 {
  margin-bottom: 7px;
  font-family: 'Cinzel', serif;
  font-size: 18px;
}

/* Encadré classique (si utilisé ailleurs) */
.encadre_classique {
  margin-right: auto;
  width: 50%;
}

/* ================== ACTUALITÉS (GRILLE) ================== */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3%;
  margin-top: 20px;
}

.encadre_Actu1,
.encadre_Actu2,
.encadre_Actu3 {
  background-color: #1a1a1a;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  padding: 20px;
  margin-top: 20px;
  width: 100%;
}

.encadre_Actu1 h2,
.encadre_Actu2 h2,
.encadre_Actu3 h2 {
  margin-bottom: 10px;
  font-family: 'Cinzel', serif;
  font-size: 24px;
}

.encadre_Actu1 p,
.encadre_Actu2 p,
.encadre_Actu3 p {
  font-size: 18px;
  text-align: justify;
}

/* Images dans les actus */
.image_actu {
  display: block;
  margin-top: 15px;
  width: 90%;
  height: auto;
}

/* ================== CARROUSEL (autres pages) ================== */

.carousel {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 700px;
  margin: 60px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-container img.active {
  opacity: 1;
  z-index: 1;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 50px;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 2;
}

.carousel button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev {
  left: 30px;
}
.next {
  right: 30px;
}

/* ================== BOUTON HELLOASSO ================== */

.don-button {
  display: inline-block;
  margin-top: 25px;
  padding: 16px 36px;
  background-color: white;
  color: #000;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  border: none;
  border-radius: 40px;
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.don-button:hover {
  background-color: #f4f4f4;
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.don-button:active {
  transform: scale(0.98);
}

/* ================== FOOTER & RÉSEAUX ================== */

footer {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: #111;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px;
  min-height: 60px;
}

/* Dégradé au-dessus du footer */
footer::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #111);
  z-index: -1;
}

.reseaux {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  margin: 0 auto;
}

.reseaux p {
  margin: 0;
}

.social-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

/* Effet au survol */
.social-logo:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* ================== VERSION MOBILE ================== */

@media (max-width: 768px) {

  /* Fond : moins de problèmes sur mobile */
  body {
    /* couleur de fond de base */
    background: #000 url("IMG_0502 (1).JPG") top center repeat-y;
    /* l’image prend toute la largeur, hauteur auto pour ne pas déformer */
    background-size: 100% auto;
    background-attachment: scroll;
  }

  /* Header plus compact */
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 20px;
    min-height: auto;
  }

  .logo-container {
    gap: 10px;
  }

  .logo-img {
    height: 70px;
  }

  .logo-text {
    font-size: 22px;
    letter-spacing: 1px;
  }

  /* Burger plus petit et plus près du bord */
  .burger {
    right: 20px;
    width: 60px;
    height: 60px;
  }

  .burger span {
    width: 32px;
    height: 3px;
  }

  /* Menu adapté à la largeur du téléphone */
  #site-nav {
    right: 10px;
    width: 80%;
    max-width: 260px;
    padding: 15px;
  }

  #site-nav a {
    font-size: 16px;
  }

  /* Main plus fluide */
  main {
    width: 94%;
    padding: 25px 0 30px 0;
  }

  /* Encadrés : pleine largeur et toujours ouverts */
  .encadre_presentation,
  .encadre_dates,
  .encadre_classique {
    width: 100%;
    margin: 15px 0;
    max-height: none;
    cursor: default;
  }

  .encadre_dates {
    margin-left: 0;
  }

  .encadre_presentation p,
  .encadre_dates p,
  .encadre_classique p,
  .encadre_Actu1 p,
  .encadre_Actu2 p,
  .encadre_Actu3 p {
    font-size: 16px;
  }

  /* Grille d'actu en une colonne */
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .encadre_Actu1,
  .encadre_Actu2,
  .encadre_Actu3 {
    width: 100%;
    margin-top: 15px;
  }

  .image_actu {
    width: 100%;
  }

  /* Carrousel plus bas et plus léger */
  .carousel {
    width: 100%;
    height: 260px;
    margin: 30px 0;
  }

  .carousel button {
    font-size: 28px;
    padding: 6px 10px;
  }

  .prev {
    left: 10px;
  }
  .next {
    right: 10px;
  }

  /* Réseaux sociaux en colonne */
  .reseaux {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
  }

  .social-logo {
    width: 40px;
    height: 40px;
  }

  /* Footer aligné au centre */
  footer {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: #111;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
  
    /* footer plus haut */
    padding: 40px 40px;  /* était 20px 40px */
    min-height: 200px;   /* était 60px */
  }
}
