/* =========================================
   BLOG CSS - BOUTON D'OR PERPIGNAN
   Override Templates v2
   ========================================= */

:root {
    --blog-primary: #c41e3a;
    --blog-primary-light: #e85a71;
    --blog-secondary: #f8f5f2;
    --blog-dark: #000;
    --blog-text: #333;
    --blog-text-light: #666;
    --blog-border: #e5e0db;
    --blog-white: #fff;
    --blog-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --blog-shadow-hover: 0 12px 40px rgba(196, 30, 58, 0.15);
    --blog-radius: 16px;
    --blog-radius-sm: 10px;
}

/* =====================
   FORCE BLACK TEXT - Override theme #e0e0e0
   ===================== */
#module-everpsblog-blog,
#module-everpsblog-post,
#module-everpsblog-category,
#module-everpsblog-tag {
    color: #000 !important;
}

#module-everpsblog-blog h1,
#module-everpsblog-blog h2,
#module-everpsblog-blog h3,
#module-everpsblog-blog h4,
#module-everpsblog-blog h5,
#module-everpsblog-blog h6,
#module-everpsblog-blog p,
#module-everpsblog-blog span,
#module-everpsblog-blog a,
#module-everpsblog-post h1,
#module-everpsblog-post h2,
#module-everpsblog-post h3,
#module-everpsblog-post h4,
#module-everpsblog-post h5,
#module-everpsblog-post h6,
#module-everpsblog-post p,
#module-everpsblog-post span,
#module-everpsblog-category h1,
#module-everpsblog-category h2,
#module-everpsblog-category h3,
#module-everpsblog-category p,
#module-everpsblog-category span,
#module-everpsblog-category a,
#module-everpsblog-tag h1,
#module-everpsblog-tag h2,
#module-everpsblog-tag h3,
#module-everpsblog-tag p,
#module-everpsblog-tag span,
#module-everpsblog-tag a {
    color: #000 !important;
}

/* Exceptions pour les liens et boutons */
#module-everpsblog-blog a:hover,
#module-everpsblog-post a:hover,
#module-everpsblog-category a:hover,
#module-everpsblog-tag a:hover,
.blog-back-link,
.blog-post-category-link,
.blog-card-readmore,
.blog-tag,
.share-btn {
    color: var(--blog-primary) !important;
}

/* Header blanc */
.blog-header h1,
.blog-header .blog-subtitle {
    color: #fff !important;
}

.blog-subtitle {
    color: rgba(255,255,255,0.9) !important;
}

/* Boutons actifs */
.blog-cat-btn.active {
    color: #fff !important;
}

/* Boutons share */
.share-btn,
.share-btn:hover {
    color: #fff !important;
}

/* =====================
   BLOG HEADER
   ===================== */
.blog-header {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-primary-light) 100%);
    padding: 50px 30px;
    border-radius: var(--blog-radius);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '🧶';
    position: absolute;
    font-size: 150px;
    opacity: 0.1;
    right: -20px;
    top: -30px;
}

.blog-header h1 {
    color: var(--blog-white);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

/* =====================
   CATEGORY FILTERS
   ===================== */
.blog-categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 35px;
    padding: 0 10px;
}

.blog-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--blog-white);
    border: 2px solid var(--blog-border);
    border-radius: 50px;
    color: #000 !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.blog-cat-btn:hover {
    border-color: var(--blog-primary);
    color: var(--blog-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.1);
}

.blog-cat-btn.active {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: var(--blog-white) !important;
}

.blog-cat-btn span {
    font-size: 1.1rem;
}

/* =====================
   POSTS GRID
   ===================== */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================
   BLOG CARD
   ===================== */
.blog-card {
    background: var(--blog-white);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--blog-shadow-hover);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Card Image */
.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--blog-secondary);
}

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

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

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blog-secondary) 0%, #ebe5df 100%);
}

.blog-card-placeholder span {
    font-size: 4rem;
    opacity: 0.3;
}

.blog-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.05));
    pointer-events: none;
}

/* Card Content */
.blog-card-content {
    padding: 22px;
}

.blog-card-category {
    display: inline-block;
    background: var(--blog-secondary);
    color: var(--blog-primary) !important;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #000 !important;
    margin: 0 0 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--blog-primary) !important;
}

.blog-card-excerpt {
    color: #333 !important;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 18px;
}

/* Card Footer */
.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--blog-border);
}

.blog-card-date {
    color: #555 !important;
    font-size: 0.8rem;
}

.blog-card-readmore {
    color: var(--blog-primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-readmore {
    transform: translateX(5px);
}

/* =====================
   EMPTY STATE
   ===================== */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--blog-secondary);
    border-radius: var(--blog-radius);
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.blog-empty h3 {
    color: #000 !important;
    margin: 0 0 10px;
}

.blog-empty p {
    color: #333 !important;
    margin: 0;
}

/* =====================
   PAGINATION
   ===================== */
.blog-pagination {
    margin-top: 20px;
}

.blog-pagination .pagination .page-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination .pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border-radius: var(--blog-radius-sm);
    background: var(--blog-white);
    border: 2px solid var(--blog-border);
    color: #000 !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-pagination .pagination li a:hover,
.blog-pagination .pagination li.current a {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: var(--blog-white) !important;
}

/* =====================
   SINGLE POST
   ===================== */
.blog-post {
    max-width: 850px;
    margin: 0 auto;
}

.blog-post-header {
    margin-bottom: 30px;
}

.blog-post-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.blog-back-link {
    color: var(--blog-primary) !important;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.blog-back-link:hover {
    transform: translateX(-5px);
}

.blog-post-category-link {
    background: var(--blog-secondary);
    color: var(--blog-primary) !important;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-post-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #000 !important;
    line-height: 1.25;
    margin: 0 0 20px;
}

.blog-post-meta {
    display: flex;
    gap: 25px;
    color: #555 !important;
    font-size: 0.95rem;
}

.blog-post-meta span {
    color: #555 !important;
}

.blog-post-featured-image {
    margin-bottom: 35px;
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.blog-post-content {
    background: var(--blog-white);
    padding: 40px;
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.85;
    color: #333 !important;
}

.blog-post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blog-primary) !important;
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--blog-secondary);
}

.blog-post-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000 !important;
    margin: 30px 0 15px;
}

.blog-post-content p {
    margin-bottom: 20px;
    color: #333 !important;
}

.blog-post-content img {
    border-radius: var(--blog-radius-sm);
    max-width: 100%;
    height: auto;
    margin: 25px 0;
    box-shadow: var(--blog-shadow);
}

.blog-post-content a {
    color: var(--blog-primary) !important;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.blog-post-content a:hover {
    border-bottom-color: var(--blog-primary);
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 20px 0 25px 25px;
    color: #333 !important;
}

.blog-post-content li {
    margin-bottom: 10px;
    color: #333 !important;
}

.blog-post-content blockquote {
    background: var(--blog-secondary);
    border-left: 5px solid var(--blog-primary);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 0 var(--blog-radius-sm) var(--blog-radius-sm) 0;
    font-style: italic;
    color: #333 !important;
}

/* Protected Content */
.blog-post-protected {
    text-align: center;
    padding: 50px 30px;
}

.protected-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.protected-form {
    max-width: 350px;
    margin: 30px auto 0;
    display: flex;
    gap: 10px;
}

.protected-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--blog-border);
    border-radius: var(--blog-radius-sm);
    font-size: 1rem;
    color: #000 !important;
}

.protected-form button {
    background: var(--blog-primary);
    color: var(--blog-white) !important;
    border: none;
    padding: 15px 30px;
    border-radius: var(--blog-radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* Tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.tags-label {
    font-weight: 600;
    color: #000 !important;
}

.blog-tag {
    background: var(--blog-secondary);
    color: var(--blog-primary) !important;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-tag:hover {
    background: var(--blog-primary);
    color: var(--blog-white) !important;
}

/* Share */
.blog-post-share {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: var(--blog-secondary);
    border-radius: var(--blog-radius-sm);
    margin-bottom: 30px;
}

.share-label {
    font-weight: 600;
    color: #000 !important;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blog-white) !important;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.05);
    color: var(--blog-white) !important;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-pinterest { background: #e60023; }

/* =====================
   COMMENTS
   ===================== */
.blog-comments-section {
    background: var(--blog-white);
    padding: 40px;
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    margin-bottom: 30px;
}

.blog-comments-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000 !important;
    margin: 0 0 25px;
}

.blog-comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.blog-comment-form .form-group {
    margin-bottom: 20px;
}

.blog-comment-form label {
    display: block;
    font-weight: 600;
    color: #000 !important;
    margin-bottom: 8px;
}

.blog-comment-form input[type="text"],
.blog-comment-form input[type="email"],
.blog-comment-form textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--blog-border);
    border-radius: var(--blog-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    color: #000 !important;
}

.blog-comment-form input:focus,
.blog-comment-form textarea:focus {
    border-color: var(--blog-primary);
    outline: none;
}

.blog-comment-form small {
    display: block;
    color: #555 !important;
    font-size: 0.8rem;
    margin-top: 5px;
}

.blog-comment-form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.blog-comment-form .form-check input {
    width: auto;
    margin-top: 4px;
}

.blog-comment-form .form-check label {
    font-weight: 400;
    font-size: 0.9rem;
    margin: 0;
    color: #333 !important;
}

.btn-submit-comment {
    background: var(--blog-primary);
    color: var(--blog-white) !important;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-comment:hover {
    background: var(--blog-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

/* Comments List */
.blog-comments-list {
    background: var(--blog-white);
    padding: 40px;
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    margin-bottom: 30px;
}

.blog-comments-list h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000 !important;
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--blog-border);
}

.blog-comment {
    display: flex;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--blog-border);
}

.blog-comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: var(--blog-primary);
    color: var(--blog-white) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 700;
    color: #000 !important;
}

.comment-date {
    color: #555 !important;
    font-size: 0.85rem;
}

.comment-content {
    color: #333 !important;
    line-height: 1.6;
}

/* Login Required */
.blog-login-required {
    text-align: center;
    padding: 40px 20px;
    background: var(--blog-secondary);
    border-radius: var(--blog-radius-sm);
}

.blog-login-required p {
    color: #000 !important;
}

.btn-login {
    display: inline-block;
    background: var(--blog-primary);
    color: var(--blog-white) !important;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--blog-primary-light);
    color: var(--blog-white) !important;
}

/* =====================
   RELATED POSTS
   ===================== */
.blog-related-posts {
    margin-top: 50px;
}

.blog-related-posts h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000 !important;
    margin: 0 0 25px;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================
   PRODUCTS SECTION
   ===================== */
.blog-products-section {
    margin-top: 50px;
    padding: 40px;
    background: var(--blog-secondary);
    border-radius: var(--blog-radius);
}

.blog-products-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000 !important;
    margin: 0 0 25px;
    text-align: center;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .blog-header {
        padding: 35px 20px;
    }

    .blog-header h1 {
        font-size: 1.7rem;
    }

    .blog-subtitle {
        font-size: 0.95rem;
    }

    .blog-categories-filter {
        gap: 8px;
    }

    .blog-cat-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .blog-post-title {
        font-size: 1.8rem;
    }

    .blog-post-content {
        padding: 25px;
        font-size: 1rem;
    }

    .blog-post-meta-top {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .blog-post-share {
        flex-direction: column;
        text-align: center;
    }

    .blog-comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .blog-comments-section,
    .blog-comments-list {
        padding: 25px;
    }
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }
.blog-card:nth-child(7) { animation-delay: 0.35s; }
.blog-card:nth-child(8) { animation-delay: 0.4s; }
.blog-card:nth-child(9) { animation-delay: 0.45s; }

/* Hide old classes from original module */
#module-everpsblog-blog .article.everpsblog,
#module-everpsblog-category .article.everpsblog,
#module-everpsblog-tag .article.everpsblog {
    display: none;
}
