/* Police générale */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #F7FFE1;
}

/* Solution Agressive pour éviter le défilement horizontal causé par des éléments débordants */
body {
    overflow-x: hidden; 
}

/* Forcer la désactivation sur l'élément HTML lui-même */
html {
    overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem 5rem;
  background: #F7FFE1;
  position: sticky;
  top: 0;
  z-index: 1000;

  gap: 2rem; /* espace logo <-> menu */
}

/* Logo */
.logo img {
  height: 130px; /* ajuste la taille du logo */
  width: auto;
}

/* Menu principal (desktop) */
.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.menu a {
  text-decoration: none;
  font-weight: 500;
  color: #002400;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #002400; /* couleur au survol */
}

/* --- DÉBUT : Styles spécifiques MOBILE (Burger Menu) --- */

/* Bouton Burger */
.burger-menu {
    display: none; /* Caché par défaut, affiché en mobile */
    cursor: pointer;
    font-size: 2rem;
    color: #002400;
    position: absolute; /* Positionné par rapport à .navbar */
    right: 20px;
    z-index: 1001; /* Au-dessus de tout */
}

/* Overlay / Fenêtre modale du Menu Mobile */
.mobile-menu-overlay {
    height: 100%;
    width: 0; /* Menu fermé par défaut */
    position: fixed;
    z-index: 2000; /* Devant le reste */
    top: 0;
    right: 0;
    background-color: #002400; /* Couleur sombre */
    overflow-x: hidden;
    transition: 0.5s; /* Animation d'ouverture */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.mobile-menu-overlay.open {
    width: 100%; /* Menu ouvert */
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.mobile-menu-content a {
    padding: 15px 0;
    text-decoration: none;
    font-size: 1.8rem;
    color: #F7FFE1; /* Texte clair */
    display: block;
    transition: 0.3s;
}

.mobile-menu-content a:hover {
    color: #fff176; /* Jaune au survol */
}

/* Bouton Fermer (X) */
.mobile-menu-overlay .closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    color: #F7FFE1;
    text-decoration: none;
}

/* Media Query pour les petits écrans (max-width: 900px) */
@media (max-width: 900px) {
    /* Navbar générale */
    .navbar {
        padding: 0.5rem 1rem;
        justify-content: space-between; /* Pour mieux positionner le logo et le burger */
    }

    /* Logo en mobile */
    .logo img {
        height: 80px; /* Logo plus petit */
    }

    /* Masquer le menu classique sur mobile */
    .navbar .menu {
        display: none;
    }

    /* Afficher le bouton burger */
    .burger-menu {
        display: block;
        position: static; /* Le laisse dans le flux normal de .navbar */
    }

    /* Cacher l'image d'accueil sur mobile */
    .hero-image {
        display: none;
    }

    /* Réorganiser la section d'accueil */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-text {
        flex: none;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}
/* --- FIN : Styles spécifiques MOBILE --- */


/* Section d'accueil (hero) */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 2rem;
  background: #F7FFE1; 
  border-radius: 10px;
  margin: 2rem auto;
  max-width: 1200px;
}

/* Texte */
.hero-text {
  flex: 1;
}

.hero-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #555;
}

/* Boutons */
.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #002400; /* vert foncé */
  color: #F7FFE1;
}

.btn-primary:hover {
  background: #002400;
}

.btn-secondary {
  border: 2px solid #002400;
  color: #002400;
}

.btn-secondary:hover {
  background: #002400;
  color: #F7FFE1;
}

/* Image */
.hero-image {
  flex: 0.4;
  text-align: right;
}

.hero-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tangerine-title {
  font-family: 'Tangerine', cursive !important;
  font-size: 4rem !important; /* essaye 4rem pour voir le changement */
  color: #002400;
  line-height: 1.2;
}

/* === Carrousel CodePen style === */
.carousel {
  width: 100%;
  max-width: 900px;
  margin: 4rem auto;
  position: relative;
  perspective: 1000px;
  height: 420px; /* hauteur du carrousel */
  overflow: hidden;
}

.carousel__wrapper {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item {
  position: absolute;
  max-width: 418px;
  height: 100%;
  opacity: 0;
  transform: translateX(200%) scale(0.7);
  transition: transform 1s ease, opacity 1s ease;
}

.item img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.item.active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 3;
}

.item.prev {
  transform: translateX(-100%) scale(0.9);
  opacity: 0.8;
  z-index: 2;
}

.item.next {
  transform: translateX(100%) scale(0.9);
  opacity: 0.8;
  z-index: 2;
}

/* ... styles précédents ... */

/* === GRILLE PHOTOS (Grille Dense pour éviter les trous) === */
.photo-grid {
  display: grid;
  /* La grille aura au minimum 3 colonnes, chacune faisant au moins 250px */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
  
  /* L'élément clé : il demande au navigateur de remplir les trous ! */
  grid-auto-flow: dense; 
  
  /* Hauteur de base pour les lignes (définit l'unité de taille pour .tall) */
  grid-auto-rows: 250px; 
  
  gap: 1rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.grid-item img {
  width: 100%;
  height: 100%; /* Important pour que l'image remplisse l'espace .grid-item */
  object-fit: cover; 
  display: block;
  transition: transform 0.3s;
}

.grid-item img:hover {
  transform: scale(1.05);
}

/* Variantes pour les grandes cases */
.grid-item.wide {
  grid-column: span 2; /* S'étend sur deux colonnes */
}

.grid-item.tall {
  grid-row: span 2; /* S'étend sur deux lignes */
}

/* Media Query pour les petits écrans */
@media (max-width: 900px) {
  /* En tablette, on réduit les colonnes si nécessaire */
  .photo-grid {
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      grid-auto-rows: 180px;
  }
}
@media (max-width: 600px) {
  /* En mobile, on passe à une seule colonne pour le 'wide' */
  .photo-grid {
      grid-template-columns: 1fr;
      grid-auto-rows: 200px;
  }
  .grid-item.wide {
      grid-column: span 1; /* Le wide redevient normal en mobile */
  }
}

/* ... styles suivants ... */

/* === Footer === */
.footer {
  background: #002400;              /* vert foncé */
  color: #F7FFE1;                   /* texte clair */
  padding: 1.5rem 0rem;
  margin-top: 3rem;
  border-top-left-radius: 20px;     /* arrondi en haut gauche */
  border-top-right-radius: 20px;    /* arrondi en haut droite */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo img {
  height: 150px;
  margin-bottom: 1rem;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-menu a {
  color: #F7FFE1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: #fff176; /* joli jaune doux au survol */
}

.footer-text {
  font-size: 0.9rem;
  margin-top: 1rem;
}

.footer-credit {
  font-size: 0.7rem;
  margin-top: 1rem;
  opacity: 0.8;
}

/* === Section Notre histoire === */
.timeline {
  max-width: 1200px;
  margin: 0 auto;         /* centre la section sans espace vertical inutile */
  padding: 0.3rem 2rem 2rem; /* haut = 1rem, côtés = 2rem, bas = 2rem */
  text-align: center;
}

.timeline-title {
  font-size: 3rem;
  margin-bottom: 3rem;
  color: #002400;
  font-family: 'Tangerine', cursive;
}

.timeline-card {
  flex: 0 0 320px;        /* largeur fixe */
  height: 450px;          /* hauteur uniforme */
  background: #002400;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column; /* texte en haut, image en bas */
  overflow: hidden;
  transition: transform 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-5px);
}

/* Partie texte = haut */
.timeline-text {
  flex: 1;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline-text h3 {
  font-size: 1.4rem;
  color: #F7FFE1;
  margin-bottom: 0.5rem;
}

.timeline-text p {
  font-size: 1rem;
  color: #F7FFE1;
}

/* Partie image en bas avec radius en haut */
.timeline-image {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden; /* évite que l’image dépasse */
  border-radius: 15px 15px 0 0; /* arrondi en haut gauche + haut droite */
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-text {
  flex: 0.7;
}

.timeline-image {
  flex: 1.3;
}

/* Conteneur carrousel */
.timeline-container {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem;
}

.timeline-container::-webkit-scrollbar {
  display: none; /* cache la barre */
}

.cta-section {
  text-align: center;
  margin: 2rem auto;
}

.cta-buttons {
  display: inline-block;
}

/* === LIGHTBOX (agrandissement des photos) === */
.lightbox {
  display: none; /* Cachée par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* Fond noir semi-transparent */
  justify-content: center;
  align-items: center;
  z-index: 3000; /* Plus haut que la navbar et tout le reste */
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  animation: fadeIn 0.3s ease;
}

/* Bouton de fermeture (×) */
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

.lightbox .close:hover {
  color: #fff176; /* petit effet doré au survol */
}

/* Animation d’apparition */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
