/* =========================================
   INDEX.CSS — Styles spécifiques à la page d’accueil
   (Laisse styles communs dans styles.css)
   ========================================= */

/* =======================
   FLASH INFO (bande courte)
======================= */
.flash-info{
  background: #BDBDBD;
  color:#000;
  font-weight:bold;
  padding: 12px 0;
  border-radius: 10px;
  margin: 50px auto;
  display:block;
  width: 80%;
  max-width: 1000px;
  text-align:center;
  box-sizing:border-box;
}

/* (si tu as besoin d’une autre petite boîte flash) */
.flash-box{
  background: #BDBDBD;
  color:#000;
  font-weight:bold;
  padding:20px;
  border-radius:8px;
  max-width:800px;
  margin:0 auto;
}

/* =======================
  LIFTING
======================= */
.lifting{
  background: #BDBDBD;
  color: red;
  font-weight:bold;
  font-size: 20px;
  padding: 20px 0;
  border-radius: 10px;
  margin: 50px auto;
  display:block;
  width: 100%;
  max-width: 1200px;
  text-align:center;
  box-sizing:border-box;
}


/* =======================
   FLASH CONTAINER (bloc de lignes)
======================= */
.FlashContainer{
  width: min(1000px, 80%);
  margin: 40px auto;
  padding: 16px 12px;
  background: #BDBDBD;
  border: 1px solid #000;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;                          /* espacement vertical entre les lignes */
  box-sizing: border-box;
  text-align: center;
}

.flash-line{
  font-weight: bold;
  line-height: 1.2;
  font-size: clamp(14px, 2vw + 6px, 20px);
  color: #000;
  margin: 0;
}

.flash-sep{
  font-weight: bold;
  line-height: 1;
  font-size: clamp(14px, 2vw + 6px, 20px);
  margin: 6px 0 2px;
  color: #000;
}

/* petite anim douce */
@keyframes flash-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flash-line, .flash-sep{ animation: flash-rise .4s ease-out both; }
.flash-line:nth-child(1){ animation-delay: .1s; }
.flash-line:nth-child(2){ animation-delay: .2s; }
.flash-line:nth-child(3){ animation-delay: .3s; }
.flash-sep             { animation-delay: .4s; }
.flash-line:nth-child(5){ animation-delay: .5s; }


/* =======================
   Section MANON (Index)
======================= */

/* Conteneur global : simple grille 2 colonnes */
.manon-group {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 colonnes équilibrées */
  gap: 60px;                      /* espace entre les colonnes */
  align-items: start;
  justify-content: center;
  margin: 100px 50px auto 80px;;             /* centré par rapport à la page */
  max-width: 1400px;
  box-sizing: border-box;
}

/* Colonne gauche */
.manon-left {
  display: flex;
  flex-direction: column;
  gap: 18px; /* espace entre photo & diapo */
  margin-left: 0px; /* déplacement spécifique de la colonne gauche */
}

/* Photo responsive */

.manon-photo-box img {
  width: 120%;
  max-width: 600px;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Colonne droite : texte */

.manon-text-box {
  background: #BDBDBD;
  border: 1px solid #000;
  border-radius: 10px;
  padding: 30px;
  max-width: 700px;
  font-weight: bold;
  font-style: italic;
  line-height: 1.3;
  color: #000;
  margin: 120px auto auto auto; /* déplacement spécifique de la colonne droite */
}

.manon-text-box p {
  text-indent: 25px;
  margin: 0 0 8px;
}

/* ==========================
   ASSOCIATION + GENDARMES 
========================== */

.association-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;     /* étire les enfants à la même hauteur */
  flex-wrap: wrap;
  gap: 90px;
  max-width: 1400px;
  margin: 80px auto 40px;
  padding: 0 20px;
  box-sizing: border-box;
}

/* =======================
   TEXTE ASSOCIATION (responsive)
======================= */

.text-association {
  flex: 1 1 46%;
  max-width: 620px;
  background: #BDBDBD;
  border: 1px solid #000;
  border-radius: 10px;
  color: #000;
  padding: 28px 32px;
  line-height: 1.3;
  font-family: Verdana, Arial, sans-serif;
  font-style: italic;
  font-weight: normal;
  font-size: clamp(14px, 1.4vw, 16px);
  box-sizing: border-box;
  display: flex;            /* ✅ pour que le texte s’étire verticalement */
  flex-direction: column;
  justify-content: center;  /* centre verticalement le texte */
}

.text-association p {
  margin: 0 0 10px;
  text-indent: 25px;
}

/* =======================
   IMAGE GENDARMES (responsive)
======================= */

.gendarmes-image {
  flex: 1 1 46%;
  max-width: 750px;
  border: 1px solid #000;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;

  display: flex;            /* ✅ image occupe toute la hauteur */
  align-items: center;
  justify-content: center;
}

.gendarmes-image img {
  width: 100%;
  height: 100%;             /* ✅ image remplit la hauteur */
  object-fit: cover;        /* garde un cadrage équilibré sans déformation */
  border-radius: 10px;
}

/* Responsive smartphone portrait (≤480px) */
@media (max-width: 480px) {
  .association-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 40px auto 20px;
    padding: 0 12px;
  }

  .text-association,
  .gendarmes-image {
    flex: 1 1 100%;
    max-width: 95%;
    height: auto;           /* sur mobile, on enlève la hauteur forcée */
  }

  .gendarmes-image img {
    height: auto;           /* pour éviter l’écrasement sur petit écran */
    object-fit: contain;
  }
}

/* =======================
   VIDEO (Index) - Version agrandie et responsive
======================= */

/* ===== Vidéo responsive propre (contrôlée par le conteneur) ===== */

.video-space{
  position: relative;
  width: 100%;
  max-width: 800px;     /* plus grand sur desktop */
  margin: 80px auto;
  background: #000;       /* fond propre autour si besoin */
  border: 1px solid #000;
  border-radius: 10px;
  overflow: hidden;

  /* <<< règle le ratio ici : 16/9 pour YouTube standard */
  aspect-ratio: 16 / 9;
}

/* l’iframe remplit ENTIEREMENT la boîte ci-dessus */
.video-space iframe{
  position: absolute;
  inset: 0;              /* top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ==========================
   ZONE 3 BLOCS : Jour / Porteau / Nuit
========================== */

.zone-photos {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* gauche = diapo jour | centre = porteau | droite = diapo nuit */
  gap: 40px;                            /* espace entre les colonnes */
  align-items: center;
  justify-items: center;
  margin: 40px auto;
  max-width: 1600px;                     /* limite la largeur totale */
  padding: 0 20px;
  box-sizing: border-box;
}

/* === Diaporama Jour et Nuit === */
.diaporama,
.diaporama-nuit {
  position: relative;
  width: 100%;
  max-width: 400px;         /* largeur max sur desktop */
  aspect-ratio: 4 / 3;      /* format classique */
  background: #047303;
  border: 1px solid #000;
  border-radius: 10px;
  overflow: hidden;
}

.diaporama .slide,
.diaporama-nuit .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.diaporama .slide.active,
.diaporama-nuit .slide.active {
  opacity: 1;
}

.diaporama .slide img,
.diaporama-nuit .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ affiche l'image entière sans la déformer */
  border-radius: 10px;
  display: block;
}

/* === Image centrale Porteau === */
.porteau-image img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #000;
  border-radius: 10px;
}

/* ===========================
   DIAPORAMA JOUR
   =========================== */

.diaporama {
  position: relative;
  width: 100%;
  max-width: 500px;       /* largeur max sur desktop */
  aspect-ratio: 4 / 3;    /* format 4:3 */
  background: #047303;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: max-width 0.3s ease; /* petit effet fluide */
}

/* Slides du diaporama */
.diaporama .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.diaporama .slide.active {
  opacity: 1;
}

/* Responsive pour smartphone */
@media (max-width: 700px) {
  .diaporama {
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }
}

/* === Image centrale Porteau === */

.porteau-image img {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  border: none;
  border-radius: 10px;
}

/* ===========================
   DIAPORAMA NUIT
   =========================== */

.diaporama-nuit {
  position: relative;
  width: 100%;
  max-width: 500px;       /* largeur max sur desktop */
  aspect-ratio: 4 / 3;    /* format 4:3 */
  background: #047303;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: max-width 0.3s ease; /* petit effet fluide */
}

/* Slides du diaporama nuit */
.diaporama-nuit .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.diaporama-nuit .slide.active {
  opacity: 1;
}

/* -----------------------------------------
   INDEX — Smartphone (Portrait ≤480px)
------------------------------------------ */
@media (max-width: 480px) {

  /* Mainbox compacte */
  .mainbox {
    padding: 8px;
  }

  /* Header image titre */
  .site-header img {
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* === Section MANON === */
  .manon-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px auto;
    max-width: 95%;
  }

  .manon-left {
    order: 1;
  }

  .manon-photo-box,
  .manon-photo-box img {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* annule le décalage négatif du desktop */
  .manon-photo-box img {
    margin: 0 auto 15px !important;
  }

  .manon-text-box {
    order: 2;
    margin: 0 !important; /* supprime les marges desktop */
    padding: 14px;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.35;
  }

  /* === Zone photos === */
  .zone-photos {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin: 20px auto;
  }

  .diaporama,
  .diaporama-nuit {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .porteau-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
  }

  /* === Bloc Association === */
  .text-association {
    margin: 40px auto 30px auto;
    padding: 14px;
    font-size: 14px;
    line-height: 1.3;
    max-width: 95%;
  }

  /* === Image Gendarmes === */
  .gendarmes-image {
    width: 100%;
    max-width: 95%;
    border: 1px solid #000;
    border-radius: 10px;
    background: #fff;
    margin: 0 auto;
    overflow: hidden;
  }

  .gendarmes-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
  }

  /* === Vidéo === */
  .video-space {
    width: 100%;
    max-width: 100%;
    margin: 80px auto 20px auto;
  }

  /* === Footer mobile aligné à la mainbox === */
  .site-footer {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 10px;
    font-size: 13px;
    margin: 30px 8px 20px 8px; /* même largeur que la mainbox */
  }
}


