/* ========================================
   ARTICLES - Carrousel moderne avec personnalisation admin
   ======================================== */

/* Section principale - spécifique aux articles */
.actualites .page-section {
    padding: 40px 20px !important;
    max-width: 1400px;
    margin: 0 auto;
}

.actualites .page-section h1,
.recent-articles .page-section h1,
.search-results .page-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    /* La couleur est gérée par styleConfig.titlesColor dans base.html.twig */
}

/* Barre de recherche */
.search-bar {
    max-width: 600px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
}

.search-bar form {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.search-bar input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-bar button {
    padding: 14px 28px;
    background: var(--primary-color, #667eea);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
}

.search-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* ========================================
   CARROUSEL D'ARTICLES
   ======================================== */

.articles-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.articles-carousel {
    overflow: hidden;
    position: relative;
}

.articles-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
}

/* Card article dans le carrousel */
.article-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Image de l'article */
.article-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

/* Badge NOUVEAU */
.badge-new {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #ff4757;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
    z-index: 10;
}

/* Copyright */
.copyright {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    margin: 0;
}

/* Contenu de la card */
.article-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 16px 0;
    /* La couleur est héritée de styleConfig.titlesColor */
}

.article-header h2 a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.article-header h2 a:hover {
    opacity: 0.7;
}

/* Meta informations */
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.article-meta .date,
.article-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Extrait */
.article-excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer de la card */
.article-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.article-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color, #667eea);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.article-footer .btn:hover {
    transform: translateX(4px);
    opacity: 0.9;
}

/* Boutons de navigation du carrousel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color, #333);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color, #667eea);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color, #333);
    transform: translateY(-50%) scale(1);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Indicateurs du carrousel */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: var(--primary-color, #667eea);
    width: 32px;
    border-radius: 6px;
}

.carousel-indicator:hover {
    background: var(--primary-color, #667eea);
    opacity: 0.7;
}

/* Liens utiles */
.articles-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 50px;
    text-align: center;
}

.articles-links .btn2 {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color, #667eea);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    border: 2px solid var(--primary-color, #667eea);
    transition: all 0.3s ease;
}

.articles-links .btn2:hover {
    background: var(--primary-color, #667eea);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Message "Aucun article" */
.no-articles {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.no-articles h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.no-articles p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .articles-carousel-container {
        padding: 0 50px;
    }

    .article-card {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .article-image {
        height: 220px;
    }

    .page-section h1 {
        font-size: 2rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .search-bar form {
        flex-direction: column;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .article-card {
        flex: 0 0 calc(50% - 15px);
        min-width: calc(50% - 15px);
    }
}

@media (min-width: 1400px) {
    .articles-carousel-container {
        max-width: 1400px;
    }
}

/* Info de recherche */
.search-info {
    margin-bottom: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
}

.search-info p {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.search-info p:last-child {
    color: #6b7280;
    margin-bottom: 0;
}
