:root {
  --violet: #7b4fa3;
  --violet-light: #f3ecf8;
  --green: #5f7d5b;
  --beige: #f8f5f0;
  --gold: #c8a34d;
}

@font-face {
  font-family: "musetta";
  src: url("fonts/musetta.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: "Inter", sans-serif;
  color: #333;
  background-color: var(--beige);
  line-height: 1.6;
}

/* HEADER */
.hero-slider {
  position: relative;
  min-height: 100vh;
  height: auto;
  overflow: hidden;
}

/* Carrousel */
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.slide.active { opacity: 1; }

@media (max-width: 768px) {
  .slide {
    background-position: center top;
  }
}

/* MENU */
/* ======================
   MENU DESKTOP
   ====================== */

.main-header{
  position: fixed;
  top:0;
  left:0;
  width:100%;
  z-index:2000;
  display:flex;
  justify-content:center;
  padding:20px 0;
  background:linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
}

.hero-menu{
  display:flex;
  gap:40px;
}

.hero-menu a{
  position:relative;
  color:white;
  text-decoration:none;
  font-size:1rem;
  letter-spacing:1px;
  font-weight:500;
  padding:4px 0;
  transition:opacity 0.25s ease;
}

/* effet underline élégant */

.hero-menu a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0%;
  height:2px;
  background:white;
  transition:width 0.3s ease;
}

.hero-menu a:hover::after{
  width:100%;
}

.hero-menu a:hover{
  opacity:0.8;
}

/* ======================
   MENU MOBILE
   ====================== */

.menu-toggle{
  display:none;
}

@media (max-width:768px){

  .menu-toggle{
    display:block;
    position:fixed;
    top:18px;
    left:18px;
    z-index:3000;
    background:rgba(0,0,0,0.8);
    border:none;
    color:white;
    font-size:24px;
    padding:8px 12px;
    border-radius:6px;
    cursor:pointer;
  }

  .hero-menu{
    position:fixed;
    top:0;
    left:-100%;
    width:260px;
    height:100vh;
    background:#111;
    flex-direction:column;
    align-items:flex-start;
    padding-top:90px;
    padding-left:30px;
    gap:28px;
    transition:left 0.35s ease;
  }

  .hero-menu.active{
    left:0;
  }

  .hero-menu a{
    font-size:1.2rem;
  }

}

/* Overlay */
.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

/* Texte animé */
.hero-text {
  color: #fff;
  padding: 1.5rem 2rem;
  border-radius: 15px;
  max-width: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.foire-text {
  font-family: "musetta";
  font-size: 8rem;
  overflow: hidden;
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

/* Edition */
.edition {
  background: var(--violet);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1rem;
}

/* Date box */
.date-box {
  margin-top: 0.8rem;
  background: rgba(255,255,255,0.60);
  padding: 0.5rem 1rem;
  font-weight: 500;
  line-height: 1.2;
  font-family: "Segoe UI";
}
.date-box span {
  display: block;
  text-transform: uppercase;
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

/* Bouton */
.btn-primary {
  background: var(--gold);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
  transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover {
  background: #b08c3a;
  transform: translateY(-2px);
}


/* SECTIONS */
.section {
  padding: 4rem 10%;
  text-align: center;
}

.section h2 {
  font-family: "Segoe UI", sans-serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--violet);
}

/* INTRO */
.intro p {
  max-width: 700px;
  margin: auto;
}

.daytitle {
  font-size: 230%;
}

.monthtitle {
  font-size: 330%;
}

.yeartitle {
  font-size: 430%;
}

/* PROGRAMME */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.card h3 {
  color: var(--green);
  margin-bottom: 0.8rem;
}

/* TELECHARGEMENTS */
.downloads {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.download-btn {
  background: var(--violet);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, background 0.3s;
}

.download-btn:hover {
  background: #68408c;
  transform: translateY(-3px);
}

/* FOOTER */
footer {
  background: var(--violet);
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: white;
}

/* CHIFFRES */
.chiffres {
  background: var(--violet-light);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat span {
  font-size: 3rem;
  font-weight: 700;
  color: var(--violet);
}

.stat p {
  margin-top: 0.5rem;
  color: var(--green);
}

/* PROGRAMME */
.day {
  background: white;
  max-width: 700px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  text-align: left;
}

.day h3 {
  color: var(--violet);
  margin-bottom: 1rem;
  font-family: "Segoe UI", sans-serif;
}

.day ul {
  list-style: none;
}

.day li {
  padding: 0.4rem 0;
}

/* FOOTER SOCIAL */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-icons {
  display: flex;
  gap: 1.2rem;
}

.social-icons a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.3s;
}

.social-icons a:hover {
  transform: translateY(-4px);
  background: var(--gold);
}

.social-icons svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* CONTACT */
.contact {
  background: #fff;
  font-family: "Segoe UI", sans-serif;
}

.contact-intro {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.contact-form {
  max-width: 500px;
  margin: auto;
  background: var(--violet-light);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--green);
}

.form-group input,
.form-group textarea {
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--violet);
}

.captcha-group label {
  font-size: 0.9rem;
}

.form-message {
  margin-top: 1rem;
  font-weight: 500;
}

/* SECTION SPONSORS */
.sponsors-section {
  padding: 4rem 2rem;
  background: #f7f4f0;
  text-align: center;
}

.sponsors-section h2 {
  font-family: "Segoe UI", sans-serif;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: var(--violet);
}

/* Grille */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Case map */
.map-item {
  height: 240px;
  background: var(--violet);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.map-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  margin: 1rem;
}

.map-item img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s, transform 0.3s;
}

.map-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* Case sponsor */
.sponsor-item {
  height: 120px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Logo */
.sponsor-item img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s, transform 0.3s;
}

.sponsor-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* MODALE MENTIONS LÉGALES */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  border-radius: 16px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h2 {
  margin-top: 0;
  color: #5a3e6b;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* GALERIE PHOTOS */
.galerie {
  background: var(--beige);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.4s ease;
}

/* Effet hover */
.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* VIDEO TEASER */
.video-teaser {
  background: var(--violet-light);
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 1024px) {
  .foire-text {
    font-size: 5rem;
  }
}

@media (max-width: 768px) {
  .hero-overlay {
    padding: 1.5rem;
  }

  .foire-text {
    font-size: 3.2rem;
  }

  .edition {
    font-size: 0.9rem;
  }

  .date-box {
    padding: 0.4rem 0.8rem;
  }

  .daytitle { font-size: 160%; }
  .monthtitle { font-size: 220%; }
  .yeartitle { font-size: 280%; }
}

@media (max-width: 480px) {
  .foire-text {
    font-size: 2.4rem;
  }

  .hero-text {
    gap: 0.6rem;
  }
}

.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35),
    rgba(0,0,0,0.15)
  );
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
}

/* ==========================
   MOBILE – SCROLL HORIZONTAL
   ========================== */
@media (max-width: 768px) {

  .gallery-grid {
    display: flex;                /* remplace le grid desktop */
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
  }

  .gallery-item {
    flex: 0 0 80%;                /* largeur de chaque photo */
    max-width: 80%;
    scroll-snap-align: center;
  }

  .gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
  }

  /* SPONSORS */
  .sponsors-grid {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
  }

    .sponsor-item {
    flex: 0 0 60%;
    max-width: 60%;
    scroll-snap-align: center;
  }

  /* Masquer scrollbar (optionnel) */
  .gallery-grid::-webkit-scrollbar,
  .sponsors-grid::-webkit-scrollbar {
    display: none;
  }

  .gallery-grid,
  .sponsors-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}