/* ==========================================================================
   1. GÉNÉRAL ET TYPOGRAPHIE
   ========================================================================== */
body {
    background-color: #DFC391;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
}

h1 {
    font-family: 'Rammetto One', cursive, sans-serif;
}

h2, h3, h4, h5, h6 {
    font-family: 'DynaPuff', cursive, sans-serif;
}

.container.site {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

/* ==========================================================================
   2. HEADER & IMAGES RESPONSIVES
   ========================================================================== */
.text-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap; /* Empeche le retour a la ligne pour rester côte à côte */
    gap: 15px;
    margin-bottom: 1rem;
    width: 100%;
}

.imagetitre {
    opacity: 0.4;
    height: 80px;         /* Ajuste la hauteur selon tes besoins */
    width: auto;          /* Laisse la largeur s'adapter automatiquement */
    max-width: 65%;       /* Donne la part principale à l'image de fond */
    object-fit: cover;
    border-radius: 10px;
}

.imagelogo {
    display: block;
    height: 80px;         /* Même hauteur que l'image de titre pour être alignés */
    width: auto;
    max-width: 30%;
    object-fit: contain;
    margin: 0;            /* Supprime les marges auto qui cassaient le flex */
}

/* Ajustement pour les écrans PC / Tablettes */
@media (min-width: 768px) {
    .imagetitre {
        height: 180px;     /* Redonne une belle taille sur grand écran */
    }
    .imagelogo {
        height: 180px;
        max-height: 180px;
    }
}

/* ==========================================================================
   3. NAVIGATION RESPONSIVE (BURGER SUR MOBILE / GRILLE SUR DESKTOP)
   ========================================================================== */

/* Style du bouton burger mobile */
.navbar-toggler {
    font-family: 'DynaPuff', cursive, sans-serif;
    border-radius: 12px !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #000;
}

/* Masquage strict de l'onglet recherche caché */
#mainNav ul.nav-pills > .nav-item.d-none,
#tabSearchNav.d-none {
    display: none !important;
}

/* Style de base des liengs d'onglets */
#mainNav ul.nav-pills .nav-link {
    width: 100%;
    min-height: 48px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.2;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #000;
    font-family: 'DynaPuff', cursive, sans-serif;
    border-radius: 12px;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s ease, color 0.2s ease;
}

#mainNav ul.nav-pills .nav-link.active,
#mainNav ul.nav-pills .nav-link:hover {
    color: #000;
    background-color: #D9D9D9;
    font-weight: bold;
}

/* Desktop (>= 768px) : Alignement horizontal et répartition égale */
@media (min-width: 768px) {
    #mainNav ul.nav-pills {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }

    #mainNav ul.nav-pills > .nav-item:not(.d-none) {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        display: flex !important;
        margin: 0 2px !important;
    }

    #mainNav ul.nav-pills .nav-link {
        height: 100%;
        min-height: 55px;
        font-size: 0.85rem;
        padding: 4px 6px;
        background-color: transparent;
    }
}

/* ==========================================================================
   4. CARROUSEL INFINI (.infinite-carousel) - CORRIGÉ
   ========================================================================== */
.infinite-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.infinite-carousel .carousel-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: scrollInfinite 25s linear infinite;
}

.infinite-carousel .carousel-item-wrapper {
    position: relative;
    padding: 6px;
    flex-shrink: 0;
    display: inline-block;
}

/* Tailles adaptées aux smartphones (< 576px) */
.infinite-carousel .carousel-item-wrapper img {
    width: 170px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}

/* Tailles pour Tablettes et PC (>= 576px) */
@media (min-width: 576px) {
    .infinite-carousel .carousel-item-wrapper img {
        width: 300px;
        height: 370px;
    }
}

.infinite-carousel .carousel-item-title {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-family: 'DynaPuff', cursive, sans-serif;
    font-size: 0.8rem;
    text-align: center;
    padding: 6px 8px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pause au survol ou au toucher tactile */
.infinite-carousel:hover .carousel-track,
.infinite-carousel:active .carousel-track {
    animation-play-state: paused;
}

/* Correction de l'animation CSS */
@keyframes scrollInfinite {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* ==========================================================================
   5. FOOTER & COMPOSANTS DIVERS
   ========================================================================== */
#Copyright {
    text-align: center;
    font-family: 'DynaPuff', cursive, sans-serif;
}

/* ==========================================================================
   6. BACKADMIN TEXTE DEFILEMENT
   ========================================================================== */

/* Style du défilement */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 12px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
        
.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
}
        
.marquee-container:hover .marquee-content {
    animation-play-state: paused; /* Pause au survol */
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

