/*DEBUT global -----------------------------------------------------*/
main {
    background: white;
}
.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 40px;
}
/*FIN global*/


/*DEBUT carte evenement -----------------------------------------------------*/
.card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 5%;
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.18);
    background-color: rgb(240, 240, 240);
}
h2 {
    padding-left: 28px;
    text-indent: -24px;
    width: 90%;
    margin-top: 10px;
}
.card p {
    margin: 0 12px 0;
    padding: 0 12px 12px 18px;
    color: #bb4144;
}
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3; 
    overflow: hidden;
    flex-shrink: 0;
}
.image-container img,
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    display: block; 
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 100% du conteneur image seulement */
    background-color: rgb(255, 255, 255, 0.8);
    opacity: 0;
    transition: .5s ease;
    pointer-events: none;
    z-index: 1000;
}
.image-container:hover .overlay {
    opacity: 1;
    pointer-events: auto;
}
.overlay p {
    color: black;
    margin-top: 10px;
}
/*FIN carte evenement*/


/*DEBUT bouton play sous image -----------------------------------------------------*/
/*mini barre sous image*/
.mini-barres {
    position: relative;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.5) 10%,
        rgba(220,0,0,0.7) 50%,
        rgba(255,255,255,0.5) 90%,
        rgba(255,255,255,0) 100%
    );
    opacity: 0.95;
    border: none;
    z-index: 1000;
    display: block; /* Affiche toujours la barre */
}
/* Bouton play au centre */
.mini-barres::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: #bb4144;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1001;
    opacity: 1;
}
/* Icône play (triangle) */
.mini-barres::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 18px solid white;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    z-index: 1002;
    pointer-events: none;
}
/* Effet hover sur le bouton */
.mini-barres:hover::after {
    background: #a03437;
    transform: translate(-50%, -50%) scale(1.1);
    transition: all 0.2s ease;
}
/* Icône pause (deux barres) quand en lecture */
.mini-barres.playing::before {
    border: none;
    background: white;
    width: 5px;
    height: 18px;
    box-shadow: 8px 0 0 white;
    left: 50%;
    transform: translate(-140%, -50%);
}
/* Cache le bouton s'il n'y a qu'une image */
.mini-barres.single-image::after,
.mini-barres.single-image::before {
    display: none;
}
/*FIN bouton play sous image*/


/*DEBUT responsive -----------------------------------------------------*/
/* iPad - portrait */
@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .container {
        width: 90%;
        grid-template-columns: repeat(2, 1fr); 
        grid-gap: 25px;
    }
    .overlay p {
        font-size: 0.9rem;
    }
}
/* iPad — landscape */
@media screen and (min-width: 1024px) and (max-width: 1367px) and (orientation: landscape) {
    .overlay p {
        font-size: 0.7rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}
/* Téléphone - portrait */
 @media screen and (max-width: 768px) {
    .container {
        position: relative;
        float: none;
        left: 0;
        top: 20px;
        width: 90%;
        transform: none;
        margin: 20px auto;
        display: block; 
        grid-template-columns: none; 
        grid-gap: 0;
    }
} 
/* Téléphone - landscape */
@media screen and (max-height: 767px) and (orientation: landscape) {
    main {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        padding-bottom: 20px;
    }
    .container {
        position: relative;
        float: none;
        left: 0;
        top: 15px;
        width: 80%;
        transform: none;
        margin: 15px auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr); 
        column-gap: 7%;
    }
    .overlay p {
        font-size: 0.9rem;
    }
} 
/*FIN responsive*/

