/* Page d'accueil WAPIEV — styles modernisés (couleurs inchangées) */

.home-page {
  --norm: #eb7a03;
  --evid: #2b205c;
  --bg-soft: #f7f4e8;
  --bg-card: #ffffff;
  --shadow: 0 12px 40px rgba(43, 32, 92, 0.12);
  --shadow-hover: 0 18px 48px rgba(235, 122, 3, 0.22);
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --max-width: 1100px;
  --header-offset: 0px;

  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: linear-gradient(180deg, #f3eb81 0%, var(--bg-soft) 28%, #f1f0e0 100%);
  color: var(--evid);
  line-height: 1.65;
  scroll-behavior: smooth;
}

.home-page * {
  box-sizing: border-box;
}

.home-page a {
  color: var(--evid);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.home-page a:hover {
  color: var(--norm);
}

/* ——— Hero ——— */

.home-page .site-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(43, 32, 92, 0.92), rgba(235, 122, 3, 0.75));
}

.home-page .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
}

.home-page .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(43, 32, 92, 0.15) 0%,
    rgba(43, 32, 92, 0.45) 100%
  );
  z-index: 1;
}

.home-page .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.home-page .hero-logo {
  height: min(30vh, 220px);
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  transition: transform 0.35s ease;
}

.home-page .hero-logo:hover {
  transform: scale(1.02);
}

/* ——— Navigation cartes ——— */

.home-page .page-wrap {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.home-page .menuprincipal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  padding: 2.5rem 0 1.5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 5;
}

.home-page .itemmenu1,
.home-page .itemmenu2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-height: 200px;
  height: auto;
  width: auto;
  padding: 1.35rem 1.1rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid rgba(43, 32, 92, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-page .itemmenu1:hover,
.home-page .itemmenu2:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(235, 122, 3, 0.45);
  background: #fffdf6;
  font-weight: inherit;
}

.home-page .imagemenu {
  height: 72px;
  width: auto;
  object-fit: contain;
}

.home-page .titremenu {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--norm);
  line-height: 1.3;
}

.home-page .menuprincipal a {
  color: var(--evid);
  width: 100%;
}

.home-page .titremenu2 {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--evid);
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.home-page .titremenu2:hover {
  font-weight: 600;
  color: var(--norm);
  border-bottom-color: rgba(235, 122, 3, 0.5);
}

.home-page .evidence,
.home-page .titremenu2.evidence:hover {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--evid);
}

.home-page .titremenu2.evidence:hover {
  color: var(--norm);
}

/* ——— Coordonnées ——— */

.home-page .coordonnees {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0 2.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--norm), #d96a02);
  box-shadow: var(--shadow);
}

.home-page .itemcoordonnees {
  width: auto;
  min-width: 200px;
  text-align: center;
  line-height: 1.5;
}

.home-page .imagecoordonnees {
  height: 48px;
  width: auto;
  margin-bottom: 0.35rem;
}

.home-page .liencoordonnees {
  display: block;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.home-page .liencoordonnees:hover {
  color: #fff;
  text-decoration: underline;
  opacity: 0.92;
}

/* ——— Contenu ——— */

.home-page main {
  padding-bottom: 2rem;
}

.home-page section {
  margin: 0 auto 2rem;
  width: min(100%, var(--max-width));
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(43, 32, 92, 0.06);
}

.home-page section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: #fff;
  background: linear-gradient(135deg, var(--norm), var(--evid));
  border: none;
}

.home-page h3 {
  margin: 1.25rem 1.25rem 0.75rem;
  padding: 0.55rem 0.85rem;
  font-size: 1.1rem;
  color: #fff;
  background: var(--norm);
  border-radius: 0.5rem;
  display: inline-block;
  scroll-margin-top: 1rem;
}

.home-page .container {
  margin: 0;
  padding: 0 1.25rem 1.35rem;
  color: var(--norm);
  width: 100%;
}

.home-page p {
  margin: 0 0 1rem;
  color: var(--norm);
  font-size: 1rem;
  width: 100%;
  max-width: none;
}

.home-page .container ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: var(--norm);
}

.home-page .container li {
  margin-bottom: 0.45rem;
}

.home-page .container a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-page .col2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0 1.25rem 1.35rem;
}

.home-page .itcol2 {
  width: auto;
  margin: 0;
  padding: 1rem 1.1rem;
  background: #faf8f0;
  border-radius: var(--radius);
  border: 1px solid rgba(235, 122, 3, 0.15);
}

.home-page .itcol2 p {
  margin-bottom: 0.65rem;
}

/* ——— Pied de page ——— */

.home-page footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
  padding: 1.75rem 1rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--evid);
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(43, 32, 92, 0.08);
}

.home-page footer p {
  margin: 0 auto;
  max-width: 52rem;
  text-align: center;
  line-height: 1.6;
}

.home-page footer a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ——— Bouton retour haut ——— */

.home-page .back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, var(--norm), var(--evid));
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(43, 32, 92, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.home-page .back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.home-page .back-to-top:hover {
  transform: translateY(-2px);
}

/* ——— Ancres ——— */

.home-page [id] {
  scroll-margin-top: 1rem;
}

/* ——— Responsive ——— */

@media (max-width: 640px) {
  .home-page .site-hero {
    min-height: 42vh;
  }

  .home-page .menuprincipal {
    margin-top: -2rem;
    padding-top: 1.5rem;
  }

  .home-page .itemmenu1,
  .home-page .itemmenu2 {
    min-height: auto;
  }

  .home-page section h2 {
    padding: 0.85rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page {
    scroll-behavior: auto;
  }

  .home-page *,
  .home-page .back-to-top {
    transition: none !important;
  }
}
