/* Style pour la section des actualités */
.section-actu {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.section-actu h1 {
    color: var(--ikColor1);
    margin-bottom: 10px;
    font-size: 2.5em;
}

.section-actu h2 {
    color: #666;
    margin-bottom: 50px;
    font-size: 1.3em;
    font-weight: 400;
}

/* Barre de recherche */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-input:focus {
    border-color: var(--ikColor1);
    box-shadow: 0 4px 10px rgba(139, 173, 47, 0.2);
}

.search-results {
    display: inline-block;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Carte masquée par la recherche */
.actu-card.hidden {
    display: none;
}

/* Grille des cards */
.actu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Card individuelle */
.actu-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.actu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(139,173,47,0.3);
}

.actu-card-image {
    width: 100%;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #ddd;
    position: relative;
}

/* Carrousel dans les cartes */
.actu-card-image.has-carousel {
    background: none;
    padding: 0;
}

.card-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-carousel-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-carousel-image.active {
    opacity: 1;
}

.card-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(139, 173, 47, 0.9);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
    transition: all 0.3s;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-carousel-btn:hover {
    background-color: rgba(139, 173, 47, 1);
    transform: translateY(-50%) scale(1.1);
}

.card-carousel-btn.prev {
    left: 10px;
}

.card-carousel-btn.next {
    right: 10px;
}

.card-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.card-carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.card-carousel-dots .dot.active {
    background-color: var(--ikColor1);
    border-color: var(--ikColor1);
    transform: scale(1.3);
}

.card-carousel-dots .dot:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.actu-card-image.no-image {
    display: none;
}

.actu-card.no-image .actu-card-content {
    border-top: 4px solid var(--ikColor1);
}

.actu-card-content {
    padding: 20px;
}

.actu-card-title {
    color: var(--ikColor1);
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.actu-card-preview {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.actu-card-date {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

/* Modal pour afficher le post complet */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: var(--ikColor1);
}

#modalBody {
    margin-top: 20px;
}

#modalBody h2 {
    color: var(--ikColor1);
    margin-bottom: 10px;
    font-size: 2em;
}

#modalBody img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

#modalBody p {
    color: #333;
    line-height: 1.7;
    font-size: 1.05em;
    text-align: justify;
    margin-bottom: 15px;
    margin-top: 15px;
}

#modalBody .post-date {
    color: #999;
    font-style: italic;
    margin-top: 20px;
    display: block;
}

/* Liens sociaux dans le modal */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#modalBody .post-link {
    display: inline-block;
    padding: 12px 25px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

#modalBody .fb-link {
    background-color: #1877f2;
}

#modalBody .fb-link:hover {
    background-color: #0d5dbf;
}

#modalBody .insta-link {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

#modalBody .insta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Container pour les reels Facebook */
.reel-container {
    width: 100%;
    max-width: 500px;
    margin: 15px auto 20px auto;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-height: 520px;
}

.reel-container iframe {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .reel-container {
        margin: 10px auto 15px auto;
        max-height: 450px;
        border-radius: 8px;
    }
    
    .reel-container iframe {
        border-radius: 8px;
    }
}

/* Carrousel d'images */
.image-carousel {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    overflow: hidden;
}

.carousel-images {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.carousel-images img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 10px;
}

.carousel-images img.active {
    opacity: 1;
}

/* Boutons de navigation */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Points de navigation */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dots .dot.active {
    background-color: var(--ikColor1);
}

.carousel-dots .dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-btn {
        display: none; /* Masquer les boutons sur mobile, swipe uniquement */
    }
    
    .card-carousel-btn {
        display: none; /* Masquer les boutons sur mobile pour les cartes aussi */
    }
    
    .actu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .section-actu h1 {
        font-size: 2em;
    }

    .section-actu h2 {
        font-size: 1.1em;
    }
}

/* Scrollbar pour le modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--ikColor1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--ikColor1Hover);
}
