/* ============================================
 * MINI-ARTICLES-COLLAPSE.CSS
 * Système collapse/expand pour les mini-articles (ingrédients, ustensiles)
 * Contient UNIQUEMENT : collapse, gradient, bouton "Lire la suite"
 * Les styles de conteneurs viennent de .article-content (page-article-layout.css)
 * ============================================ */

/* ============================================
 * SYSTÈME DE COLLAPSE/EXPAND
 * ============================================ */

.mini-article-collapsible {
    position: relative;
}

.mini-article-collapsible .mini-article-content {
    max-height: 256px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease-in-out;
}

/* Gradient de fondu - Mode clair */
.mini-article-collapsible[data-collapsed="true"]:not(.no-collapse) .mini-article-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        var(--card-bg, #ffffff) 100%
    );
    pointer-events: none;
}

/* État déplié : hauteur maximale */
.mini-article-collapsible[data-collapsed="false"] .mini-article-content {
    max-height: 5000px;
}

/* État déplié : pas de gradient */
.mini-article-collapsible[data-collapsed="false"] .mini-article-content::after {
    display: none;
}

/* Contenu court : pas de gradient */
.mini-article-collapsible.no-collapse .mini-article-content::after {
    display: none;
}

/* ============================================
 * BOUTON "LIRE LA SUITE"
 * ============================================ */

.mini-article-toggle-container {
    display: flex;
    justify-content: center;
    margin: 1.2rem 0 0.5rem 0;
}

.mini-article-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    border: 1px solid #FF6B6B;
    border-radius: 8px;
    color: var(--text-primary, #1f2937);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mini-article-toggle-btn:hover {
    background-color: #FF6B6B;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.mini-article-toggle-btn:active {
    transform: translateY(0);
}

/* Icône chevron */
.toggle-icon {
    transition: transform 0.3s ease;
}

.mini-article-collapsible[data-collapsed="false"] .toggle-icon {
    transform: rotate(180deg);
}

/* ============================================
 * SECTION AVANTAGES & INCONVÉNIENTS (ustensiles uniquement)
 * ============================================ */

.avantages-section-block,
.inconvenients-section-block {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.avantages-section-block {
    background: linear-gradient(to right,
        rgba(56, 161, 105, 0.08) 0%,
        rgba(56, 161, 105, 0.02) 100%
    );
    border-left: 4px solid #38a169;
    box-shadow: 0 1px 3px rgba(56, 161, 105, 0.1);
}

.inconvenients-section-block {
    background: linear-gradient(to right,
        rgba(229, 62, 62, 0.08) 0%,
        rgba(229, 62, 62, 0.02) 100%
    );
    border-left: 4px solid #e53e3e;
    box-shadow: 0 1px 3px rgba(229, 62, 62, 0.1);
}

.avantages-section-block:hover {
    background: linear-gradient(to right,
        rgba(56, 161, 105, 0.12) 0%,
        rgba(56, 161, 105, 0.03) 100%
    );
    box-shadow: 0 2px 6px rgba(56, 161, 105, 0.15);
}

.inconvenients-section-block:hover {
    background: linear-gradient(to right,
        rgba(229, 62, 62, 0.12) 0%,
        rgba(229, 62, 62, 0.03) 100%
    );
    box-shadow: 0 2px 6px rgba(229, 62, 62, 0.15);
}

.avantages-section-block:last-child,
.inconvenients-section-block:last-child {
    margin-bottom: 0;
}

.avantages-subtitle,
.inconvenients-subtitle {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary, #2d3748);
}

.avantages-subtitle i {
    color: #38a169;
    font-size: 1.25rem;
}

.inconvenients-subtitle i {
    color: #e53e3e;
    font-size: 1.25rem;
}

.avantages-list,
.inconvenients-list {
    margin: 0;
    padding-left: 24px;
    list-style: none;
}

.avantages-list li,
.inconvenients-list li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-secondary, #4a5568);
    position: relative;
    padding-left: 8px;
}

.avantages-list li::before {
    content: "✓";
    position: absolute;
    left: -20px;
    color: #38a169;
    font-weight: bold;
    font-size: 1.1em;
}

.inconvenients-list li::before {
    content: "✗";
    position: absolute;
    left: -20px;
    color: #e53e3e;
    font-weight: bold;
    font-size: 1.1em;
}

.avantages-list li:last-child,
.inconvenients-list li:last-child {
    margin-bottom: 0;
}

/* Mode sombre - Avantages & Inconvénients */
body.dark-mode .avantages-section-block {
    background: linear-gradient(to right,
        rgba(56, 161, 105, 0.15) 0%,
        rgba(56, 161, 105, 0.05) 100%
    );
    border-left-color: #48bb78;
}

body.dark-mode .inconvenients-section-block {
    background: linear-gradient(to right,
        rgba(229, 62, 62, 0.15) 0%,
        rgba(229, 62, 62, 0.05) 100%
    );
    border-left-color: #fc8181;
}

body.dark-mode .avantages-subtitle,
body.dark-mode .inconvenients-subtitle {
    color: #ffffff;
}

body.dark-mode .avantages-subtitle i {
    color: #48bb78;
}

body.dark-mode .inconvenients-subtitle i {
    color: #fc8181;
}

body.dark-mode .avantages-list li,
body.dark-mode .inconvenients-list li {
    color: #e0e0e0;
}

body.dark-mode .avantages-list li::before {
    color: #48bb78;
}

body.dark-mode .inconvenients-list li::before {
    color: #fc8181;
}

/* ============================================
 * RESPONSIVE
 * ============================================ */

@media (max-width: 768px) {
    .mini-article-collapsible .mini-article-content {
        max-height: 240px;
    }

    .mini-article-toggle-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .avantages-section-block,
    .inconvenients-section-block {
        padding: 14px 16px;
        margin-bottom: 20px;
    }

    .avantages-subtitle,
    .inconvenients-subtitle {
        font-size: 1.05rem;
    }

    .avantages-list,
    .inconvenients-list {
        padding-left: 20px;
    }
}
