/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Forum', serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    height: 80vh;
/* Hauteur du header */
}

.leade {
    font-size: 2.5rem;
}

/* ===== CAROUSEL ===== */
.master-carousel {
    height: 80vh;
    min-height: 600px;
}

.carousel-item {
    height: 80vh;
    transition: transform 0.6s ease;
}

.carousel-item img {
    height: 80vh;
    object-fit: cover;
    filter: grayscale(0%);
    transition: filter 0.5s ease;
}


.carousel-caption {
    bottom: 1%;
    text-align: left;
    left: 10%;
    right: auto;
    padding: 2rem;
    border-radius: 8px;
    line-height: 30px;
}

/* ===== TIMELINE GRID ===== */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 80vh;
    min-height: 600px;
}

.timeline-item {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.timeline-item:hover {
    flex-grow: 1.3;
}

.timeline-bg {
    position: absolute;
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

.timeline-content {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    opacity: 0;
    transition: all 0.5s ease;
}

.timeline-item:hover .timeline-content {
    opacity: 1;
}

/* ===== INSPIRATION SECTION ===== */
.inspiration-section {
    padding: 1rem 0;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #eee;
    height: 9vh;
}

.luxurious-script {
    font-family: 'Luxurious Script', cursive;
    font-size: 2.5rem;
    color: #333;
    margin: 0;
}
.carousel-control-prev-icon, .carousel-control-next-icon, .carousel-control-prev, .carousel-control-next {
    color:white !important;
    opacity: 1 !important;
    z-index: 20; /* S'assurer que les contrôles restent au-dessus de tout */
}

/* ===== SOLUTION CORRIGÉE - Dégradé visible et texte lisible ===== */
.timeline-item {
    position: relative; /* S'assure que le z-index fonctionne */
}

.timeline-bg {
    position: relative; /* Nécessaire pour le pseudo-élément */
}

.timeline-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1; /* Entre l'image et le texte */
}

.timeline-content {
    position: relative;
    z-index: 2; /* Au-dessus du dégradé */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Améliore la lisibilité */
}

.timeline-item:hover .timeline-bg::after {
    opacity: 1;
}
.carousel-control-prev, .carousel-control-next {
    pointer-events: none;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    pointer-events: auto;
}

@media (max-width: 956px) and (orientation: landscape) {
    /* Ajustements pour le carousel principal */
    .master-carousel, 
    .carousel-item,
    .carousel-inner, 
    .carousel-item img,
    .timeline-grid,
    main {
      height: calc(100vh - 10vh - 40px) !important;
      min-height: unset !important;
    }
  
    /* Optimisation de la grille timeline */
    .timeline-grid {
      gap: 0;
    }
  
    .timeline-item {
      height: calc(100vh - 10vh - 40px) !important;
    }
  
    .timeline-bg {
      height: calc(100vh - 10vh - 40px) !important;
    }
  
    /* Ajustement du texte */
    .carousel-caption {
      bottom: 2% !important;
      left: 5% !important;
      padding: 1rem !important;
    }
  
    .carousel-caption h2 {
      font-size: 1.8rem !important;
    }
  
    .carousel-caption .leade {
      font-size: 1.2rem !important;
    }
  
    /* Masquer la section inspiration en paysage */
    .inspiration-section {
      display: none !important;
    }
  
    /* Optimisation des contrôles du carousel */
    .carousel-control-prev,
    .carousel-control-next {
      width: 8% !important;
    }

    .timeline-content {
        position: absolute;
        bottom: 10%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        text-align: center;
        z-index: 2;
        /* Assure que le texte ne soit pas coupé */
        padding: 0 10px;
    }
    h3 {
        font-size: 1.2rem; /* Ajustement de la taille du texte pour les petits écrans */
    }
    p {
        font-size: 1rem; /* Ajustement de la taille du texte pour les petits écrans */
    }
  }

@media (max-width: 800px) and (orientation: portrait) {
    .timeline-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0;
        height: calc(var(--vh, 1vh) * 92); /* Réduit à 92vh pour éviter les coupures */
    }

    .timeline-item {
        height: calc(var(--vh, 1vh) * 46); /* La moitié de la hauteur disponible */
        position: relative;
        overflow: hidden;
    }

    .timeline-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
    }

    .timeline-content {
        position: absolute;
        bottom: 10%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        text-align: center;
        z-index: 2;
        /* Assure que le texte ne soit pas coupé */
        padding: 0 10px;
    }

    .master-carousel {
        height: calc(var(--vh, 1vh) * 92); /* Même hauteur que la grille */
    }

    .carousel-item {
        height: calc(var(--vh, 1vh) * 92);
    }

    .carousel-item img {
        height: calc(var(--vh, 1vh) * 92);
        object-fit: cover;
        filter: grayscale(0%);
        transition: filter 0.5s ease;
    }

    .inspiration-section {
        display: none;
    }
    /* Ajout d'une marge de sécurité en bas */
    .carousel-caption {
        bottom: 2%;
        left: 5%;
    }

    body {
        overflow: hidden;
        min-height: calc(var(--vh, 1vh) * 100);
    }

    /* S'assurer que les contrôles restent au-dessus de tout */
    .carousel-control-prev,
    .carousel-control-next {
        z-index: 20; /* Supérieur au z-index des éléments de la grille (10) */
    }
    .leade {
        font-size: 2rem; /* Réduit la taille du texte pour les petits écrans */
    }
}
@media (max-width: 768px) {
    .leade {
        font-size: 1.4rem;
    }
}
/* Ajout de styles pour les liens dans les h3 de .timeline-content */
.timeline-content h3 a {
  color: white; /* Couleur blanche par défaut */
  text-decoration: none; /* Supprime le soulignement */
  transition: color 0.3s ease; /* Transition fluide pour le changement de couleur */
}

.timeline-content h3 a:hover {
  color: rgb(236, 236, 197); /* Couleur beige au survol */
}