/* ===== Réglages généraux ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #730100;
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* ===== Diaporama ===== */
.diaporama {
  position: relative;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 24px 24px 100px;
  text-align: center;
  opacity: 0;
  animation: defilement 15s infinite;  /* 3 slides x 5 s */
}

.slide:nth-child(1) { background: radial-gradient(circle at 50% 35%, #730100, #4a0508); animation-delay: 0s; }
.slide:nth-child(2) { background: radial-gradient(circle at 50% 35%, #730100, #4a0508); animation-delay: 5s; }
.slide:nth-child(3) { background: radial-gradient(circle at 50% 35%, #730100, #4a0508); animation-delay: 10s; }

.slide img {
  width: min(420px, 85%);
  max-height: 45vh;
  object-fit: contain;
}

.slide img.logo {
  width: auto;
  max-width: 85%;
  max-height: 52vh;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .45);
}

.message h1,
.message h2 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: #f3efec;
  margin-bottom: 14px;
}

.message p {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  line-height: 1.6;
}

@keyframes defilement {
  0%   { opacity: 0; transform: translateX(60px); }
  5%   { opacity: 1; transform: translateX(0); }
  33%  { opacity: 1; transform: translateX(0); }
  38%  { opacity: 0; transform: translateX(-60px); }
  100% { opacity: 0; }
}

/* ===== Pied de page ===== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding-bottom: 16px;
  text-align: center;
}

footer a { color: #f3efec; }

/* Barre animée aux couleurs de chantier */
.progression {
  height: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}

.progression span {
  display: block;
  width: calc(100% + 56px);
  height: 100%;
  background: repeating-linear-gradient(45deg, #e8e4e1 0 20px, #4a0508 20px 40px);
  animation: chantier 1.5s linear infinite;
}

@keyframes chantier {
  from { transform: translateX(-56.57px); }
  to   { transform: translateX(0); }
}

/* Accessibilité : sans animation, seule la première slide s'affiche */
@media (prefers-reduced-motion: reduce) {
  .slide, .progression span { animation: none; }
  .slide:nth-child(1) { opacity: 1; }
}
