/* ==========================================================================
   Apporte ta bière à l'Edifiets — reconstruction statique
   Palette et typo reprises du site original (thème SiteOrigin North) :
   - Police : Truculenta 600 / 900
   - Vert principal : #38a572 (hover #337f56)
   - Jaune icônes : #fbb800 / vert icônes : #36ae74
   - Fond hero : #4a7f19
   ========================================================================== */

:root {
  --green: #38a572;
  --green-dark: #337f56;
  --green-icon: #36ae74;
  --yellow: #fbb800;
  --hero-bg: #4a7f19;
  --text: #29303b;
  --text-light: #6c7781;
  --bg-alt: #f4f7f5;
  --container: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Truculenta", sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
}

h1, h2, h3, h4, h5, h6 { font-weight: 900; line-height: 1.2; }

a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: var(--green-dark); }

img { max-width: 100%; height: auto; }

::selection { background-color: var(--green); color: #fff; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }

/* ===== Topbar ===== */
#topbar { background: #2c3038; }
.topbar-inner {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  transition: background .2s, transform .2s;
}
.social-btn svg { width: 15px; height: 15px; }
.social-btn:hover { background: var(--green-dark); color: #fff; transform: translateY(-2px); }

/* ===== En-tête ===== */
#masthead {
  padding: 25px 0;
  text-align: center;
  background: #fff;
}
.site-logo { display: inline-block; }

/* ===== Hero ===== */
#hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  background-color: var(--hero-bg);
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: url("../assets/img/hero_bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.77;
  /* léger zoom lent, discret */
  animation: hero-zoom 25s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}
.hero-content {
  position: relative;
  width: 100%;
  text-align: right;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.58);
  padding-top: 60px;
  padding-bottom: 60px;
}
.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up .8s ease .2s forwards;
}
.hero-content p {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up .8s ease .5s forwards;
}
@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Titres de section ===== */
.headline { text-align: center; margin-bottom: 50px; }
.headline h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.decoration {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}
.decoration span {
  display: block;
  width: 80px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}
.sub-headline {
  color: var(--text-light);
  font-size: 1.15rem;
  max-width: 760px;
  margin: 0 auto;
}

/* ===== Points forts ===== */
.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 50px;
}
.feature { text-align: center; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  color: var(--yellow);
  margin-bottom: 20px;
  transition: transform .3s ease;
}
.feature-icon svg { width: 44px; height: 44px; }
.feature:hover .feature-icon { transform: translateY(-6px) rotate(-4deg); }
.feature h3 { font-size: 1.5rem; margin-bottom: 10px; color: var(--text); }
.feature p { color: var(--text-light); }

/* ===== Vidéo ===== */
.video-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.video-wrapper video {
  width: 100%;
  display: block;
  border-radius: 6px;
  background: #000;
}
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 16 / 9;
  border: 3px dashed var(--green);
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--green-dark);
  text-align: center;
  padding: 20px;
}
.media-placeholder svg { width: 60px; height: 60px; opacity: .6; }
.media-placeholder p { font-size: 1.3rem; font-weight: 900; }
.media-placeholder small { color: var(--text-light); }
.media-placeholder code { font-family: monospace; font-size: .85em; }

/* ===== Carte / trajet ===== */
#map {
  height: 600px;
  width: 100%;
  border-radius: 6px;
  z-index: 0; /* sous le bouton scroll-to-top */
}
#elevation { margin-top: 30px; }
#elevation h3 { text-align: center; margin-bottom: 15px; font-size: 1.2rem; color: var(--text-light); }
#elevation-chart { width: 100%; display: block; }

/* ===== Équipe ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 40px 30px;
  justify-items: center;
}
.team-member {
  text-align: center;
  width: 100%;
  max-width: 220px;
}
.team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform .35s ease, box-shadow .35s ease;
}
.team-member:hover .team-photo {
  transform: translateY(-8px) rotate(-1.5deg) scale(1.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.team-member:hover .team-photo img { transform: scale(1.08); }

/* Placeholder en attendant les vraies photos */
.team-photo .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
}
.team-photo .placeholder .initial {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
}
.team-photo .placeholder svg { width: 46px; height: 46px; opacity: .5; }

.team-member h3 {
  margin-top: 16px;
  font-size: 1.45rem;
  transition: color .2s;
}
.team-member:hover h3 { color: var(--green); }
.team-member .roles {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: 4px;
}

/* ===== Footer ===== */
#colophon {
  background: #2c3038;
  color: #aab2bd;
  padding: 28px 0;
  text-align: center;
  font-size: .95rem;
}

/* ===== Bouton retour en haut ===== */
#scroll-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s, background .2s, visibility .3s;
  z-index: 1000;
}
#scroll-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-to-top:hover { background: var(--green-dark); }
#scroll-to-top svg { width: 20px; height: 20px; }

/* ===== Animations d'apparition au scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* décalage en cascade pour les éléments d'une même grille */
.features .reveal:nth-child(2), .team-grid .team-member:nth-child(3n+2) { transition-delay: .12s; }
.features .reveal:nth-child(3), .team-grid .team-member:nth-child(3n+3) { transition-delay: .24s; }
.features .reveal:nth-child(5) { transition-delay: .12s; }
.features .reveal:nth-child(6) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-overlay, .hero-content h1, .hero-content p { animation: none; opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .hero-content { text-align: center; }
  #map { height: 420px; }
  .section { padding: 50px 0; }
}
