/*
Theme Name: SmartMag Child
Theme URI: https://smartmag.theme-sphere.com/
Description: A child theme of SmartMag
Author: ThemeSphere
Author URI: https://theme-sphere.com
Template: smart-mag
Version: 1.1
*/

/* FAQ Styling - Version Accordéon */
.post-faq {
    margin: 30px 0;
    margin-bottom: 0px !important;
    padding: 0;
    background: var(--c-contrast-10);
    border-left: 4px solid var(--c-main);
    border-radius: 4px;
    overflow: hidden;
}

.post-faq-head {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-main);
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid var(--c-separator);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: default;
    background: var(--c-contrast-10);
    margin-bottom: 0 !important;
}

/* Question - cible la classe post-faq-question */
.post-faq-question {
    display: block;
    margin: 0;
    padding: 12px 12px 12px 35px;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid var(--c-separator);
    background: var(--c-contrast-10);
    transition: all 0.2s ease;
    font-weight: 600;
    margin-bottom: 0 !important;
}

.post-faq-question:hover {
    color: var(--c-main);
    background: var(--c-contrast-5);
}

/* Icône + / - (initialement '-' car ouvert) */
.post-faq-question::before {
    content: '−';
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 20px;
    font-weight: 300;
    color: var(--c-main);
}

/* Quand fermé, affiche '+' */
.post-faq.collapsed .post-faq-question::before {
    content: '+';
}

.post-faq.collapsed .post-faq-question.active::before {
    content: '−';
}

/* Réponse - visible par défaut */
.post-faq-answer {
    margin: 0;
    padding: 12px 20px 18px;
    opacity: 1;
    max-height: none;
    transition: all 0.3s ease;
    margin-bottom: 0 !important;
    background: var(--c-contrast-10);
}

/* Réponse cachée après collapse */
.post-faq.collapsed .post-faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 20px;
}

.post-faq.collapsed .post-faq-answer.active {
    max-height: 400px;
    opacity: 1;
    padding: 12px 20px 18px;
}

/* Dernière réponse sans bordure */
.post-faq-answer:last-child {
    border-bottom: none;
}

/* Social Share B Styling */
.post-share-b form.service {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.post-share-b .share-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
    height: 100%;
}

.post-share-b .share-button:hover {
    opacity: 0.8;
}

/* Summary Styling */
.post-summary {
    margin: 30px 0;
    padding: 20px;
    background: var(--c-contrast-10);
    border-left: 4px solid var(--c-main);
    border-radius: 4px;
    
}

.post-summary-head {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-main);
    margin: 0 0 12px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-summary-content {
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: var(--c-text);
}

/* ===== Editorial Boxes ===== */
.editorial-box-tip,
.editorial-box-advice,
.editorial-box-warning,
.editorial-box-example {
    margin: 30px 0;
    padding: 20px;
    background: var(--c-contrast-10);
    border-left: 4px solid var(--c-main);
    border-radius: 4px;
}

.editorial-box-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-main);
    margin: 0 0 12px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editorial-box-content {
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: var(--c-text);
}

/* ===== Table of Contents ===== */
.table-of-contents {
    margin: 30px 0;
    background: var(--c-contrast-10);
    border-left: 4px solid var(--c-main);
    border-radius: 4px;
    overflow: hidden;
}

.table-of-contents details {
    margin: 0;
    padding: 0;
}

.table-of-contents summary {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-main);
    padding: 15px 20px;
    border-bottom: 1px solid var(--c-separator);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: var(--c-contrast-10);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.table-of-contents summary::-webkit-details-marker {
    display: none;
}

/* Icône flèche */
.table-of-contents summary::before {
    content: '▸';
    font-size: 14px;
    color: var(--c-main);
    transition: transform 0.2s ease;
    display: inline-block;
}

.table-of-contents details[open] summary::before {
    transform: rotate(90deg);
}

.table-of-contents summary:hover {
    background: var(--c-contrast-5);
}

.table-of-contents ul {
    margin: 0;
    padding: 12px 20px 16px 20px;
    list-style: none;
}

.table-of-contents ul li {
    padding: 5px 0;
    border-bottom: 1px solid var(--c-separator);
    counter-increment: toc-counter;
}

.table-of-contents ul li:last-child {
    border-bottom: none;
}

.table-of-contents ul li a {
    color: var(--c-text);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.table-of-contents ul li a::before {
    content: '→';
    color: var(--c-main);
    font-size: 12px;
    flex-shrink: 0;
}

.table-of-contents ul li a:hover {
    color: var(--c-main);
}

