﻿.home-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.home-badge {
  display: inline-block;
  background: #004080;
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 16px;
}

.home-hero-content h1 {
  font-size: 52px;
  color: #004080;
  margin-top: 0;
  margin-bottom: 18px;
  font-family: "Roboto", Arial, sans-serif;
}

.home-hero-content p {
  font-size: 21px;
  line-height: 1.8;
}

.home-buttons {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.home-btn {
  background: #004080;
  color: white;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 8px;
  font-weight: bold;
}

.home-btn-outline {
  background: white;
  color: #004080;
  border: 2px solid #004080;
}

20% { transform: translateX(0); }

  25% { transform: translateX(-100%); }
  45% { transform: translateX(-100%); }

  50% { transform: translateX(-200%); }
  70% { transform: translateX(-200%); }

  75% { transform: translateX(-300%); }
  95% { transform: translateX(-300%); }

  100% { transform: translateX(0); }
}

.home-cards {
  max-width: 1200px;
  margin: 10px auto 40px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}

.home-card {
  background: white;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.home-card h2 {
  color: #004080;
}

.home-card p {
  font-size: 17px;
  line-height: 1.7;
}

.home-card a {
  display: inline-block;
  margin-top: 12px;
  color: #004080;
  font-weight: bold;
}

.home-affiche {
  max-width: 1100px;
  margin: 0 auto 50px;
  padding: 24px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  text-align: center;
}

.home-affiche img {
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  margin-top: 20px;
}

.home-affiche-content h2 {
  color: #004080;
  font-size: 38px;
}

.home-affiche-content p {
  font-size: 20px;
  line-height: 1.7;
}

@media (max-width: 900px) {

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {

  .home-hero-content h1 {
    font-size: 36px;
  }

  .home-hero-content p,
  .home-affiche-content p {
    font-size: 18px;
  }

}

/* Ancien diaporama conservé */
.diaporama .container {
  width: 85vmin;
  margin: 20px auto;
  overflow: hidden;
  border: 20px solid #ffffff;
  border-radius: 8px;
  box-shadow: 10px 25px 30px rgba(30,30,200,0.3);
  position: relative;
}

.diaporama .wrapper {
  display: flex;
  width: 400%;
  animation: slide 20s infinite linear;
}

@keyframes slide {
  0%, 25% { transform: translateX(0); }
  25.1%, 50% { transform: translateX(-25%); }
  50.1%, 75% { transform: translateX(-50%); }
  75.1%, 100% { transform: translateX(-75%); }
}

.diaporama img {
  width: 25%;
}

@media only screen and (max-width: 768px) {
  .diaporama .container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  .diaporama .wrapper {
    width: 400%;
    overflow: hidden;
  }

  .diaporama img {
    width: 25%;
  }
}


/* =========================
   CARTE HISTORIQUE
========================= */

.home-card-status {
  display: inline-block;
  margin-top: 4px;
  margin-bottom: 14px;
  padding: 5px 10px;
  background: #ececec;
  color: #666;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.home-card-button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s ease;
}

.home-card-button-muted {
  background: #dcdcdc;
  color: #555;
}

.home-card-button-muted:hover {
  background: #cfcfcf;
  color: #333;
}


/* Bandeau défilant accueil */
.event-alert {
  margin: 0;
  padding: 18px;
  background: linear-gradient(90deg, #004080, #0066cc, #004080);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: 900;
  overflow: hidden;
}

.event-alert marquee {
  display: block;
}

.event-alert a {
  color: #004080;
  background: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 900;
  margin-left: 12px;
}

@media (max-width: 768px) {
  .event-alert {
    font-size: 21px;
    padding: 14px;
  }
}


/* Citation du moment */
.citation-militaire {
  max-width: 900px;
  margin: 18px auto 25px;
  padding: 0 16px;
}

.citation-militaire-inner {
  background: #f4f6f2;
  border-left: 5px solid #004080;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.citation-label {
  display: block;
  color: #004080;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.citation-texte {
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  font-style: italic;
}

@media (max-width: 768px) {
  .citation-texte {
    font-size: 16px;
  }
}


/* Cartes secondaires discrètes */
.home-cards-discreet {
  max-width: 1050px;
  margin: 20px auto 35px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.home-card-muted {
  background: #ffffff;
  border: 1px solid rgba(0,64,128,0.12);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.home-card-muted h2 {
  margin: 8px 0;
  color: #004080;
  font-size: 21px;
}

.home-card-muted p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

.home-card-tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef3f8;
  color: #004080;
  font-size: 12px;
  font-weight: 700;
}

.home-card-button {
  display: inline-block;
  margin-top: 10px;
  color: #004080;
  font-weight: 700;
  text-decoration: none;
}

.home-card-button:hover {
  text-decoration: underline;
}

.home-card-button-muted {
  color: #666;
}

@media (max-width: 900px) {
  .home-cards-discreet {
    grid-template-columns: 1fr;
  }
}


/* Citation du moment */
.citation-moment {
  max-width: 1200px;
  margin: 35px auto 30px;
  padding: 0 18px;
}

.citation-moment-inner {
  background: #f7f9fc;
  border-left: 6px solid #004080;
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.citation-label {
  display: block;
  color: #004080;
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 12px;
}

.citation-label small {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 13px;
  font-weight: 500;
}

.citation-texte {
  font-size: 22px;
  line-height: 1.7;
  color: #333;
  font-style: italic;
}

/* Bouton devenir membre sur affiche */
.home-member-btn {
  display: inline-block;
  margin-top: 16px;
  background: #004080;
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 900;
  font-size: 18px;
}

.home-member-btn:hover {
  background: #0066cc;
  color: white;
}

@media (max-width: 768px) {
  .citation-moment {
    margin: 25px auto;
    padding: 0 10px;
  }

  .citation-moment-inner {
    padding: 18px;
  }

  .citation-texte {
    font-size: 18px;
    line-height: 1.6;
  }
}


/* Bouton devenir membre bas accueil */
.home-member-footer {
  text-align: center;
  margin: 28px auto 45px;
}

.home-member-btn {
  display: inline-block;
  background: linear-gradient(135deg,#004080,#0066cc);
  color: white;
  padding: 16px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: all 0.25s ease;
}

.home-member-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg,#0066cc,#004080);
  color: white;
}

@media (max-width: 768px) {
  .home-member-btn {
    width: calc(100% - 40px);
    max-width: 420px;
    font-size: 18px;
    padding: 15px 18px;
  }
}


/* Alignement desktop cartes accueil */
.home-cards-discreet {
  justify-content: center;
}

.home-cards-discreet:has(article:nth-child(2):last-child),
.home-cards-discreet:has(article:nth-child(2)) {
  max-width: 900px;
}

.home-card-muted {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}

.home-card-muted h2 {
  text-align: center;
}

.home-card-muted p {
  text-align: center;
}

.home-card-button {
  align-self: center;
}

/* Si seulement 2 cartes visibles */
@media (min-width: 901px) {

  .home-cards-discreet {
    grid-template-columns: repeat(2, minmax(320px, 420px));
  }

}


/* Correction débordement accueil iPad */
.home-hero,
.home-cards,
.home-cards-discreet,
.home-affiche,
.citation-moment,
.diaporama,
.diaporama .container {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-cards,
  .home-cards-discreet {
    grid-template-columns: 1fr;
  }

  .diaporama .container {
    width: 100%;
  }
}

