/* Styles communs aux pages intérieures (hero de page, fil d'Ariane, partage...) */

/* ===== ASIDE ===== */
.aside-nav {
    flex: 0 0 250px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    background: #F6F9F7;
    border-radius: 12px;
    padding: 1rem 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}
.aside-nav .aside-title {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1rem 0.6rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.aside-nav .aside-title i {
    color: var(--jaune);
    margin-right: 0.4rem;
}
.aside-nav ul {
    list-style: none;
    padding: 0.3rem 0;
}
.aside-nav ul li {
    padding: 0;
}
.aside-nav ul li a {
    display: block;
    padding: 0.4rem 1rem;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    color: #3A4840;
    transition: var(--transition);
    border-left: 3px solid transparent;
    line-height: 1.6;
}
.aside-nav ul li a:hover {
    background: rgba(179, 18, 27, 0.04);
    color: var(--rouge);
    border-left-color: var(--rouge);
}
.aside-nav ul li a.active {
    background: rgba(179, 18, 27, 0.06);
    color: var(--rouge);
    border-left-color: var(--rouge);
    font-weight: 600;
}
.aside-nav ul li a i {
    font-size: 0.6rem;
    margin-right: 0.5rem;
    color: var(--vert);
    opacity: 0.5;
    width: 14px;
    text-align: center;
}
.aside-nav ul li a:hover i {
    opacity: 1;
}

@media (max-width: 992px) {
    .aside-nav { display: none; }
    .page-content .container { flex-direction: column; gap: 0; }
}

/* ===== ARABE (RTL) ===== */
html[dir="rtl"] .page-hero h1 i,
html[dir="rtl"] .content-main h2 i,
html[dir="rtl"] .content-main .note i,
html[dir="rtl"] .highlight-section h3 i,
html[dir="rtl"] .aside-nav .aside-title i,
html[dir="rtl"] .aside-nav ul li a i,
html[dir="rtl"] .graph-frame .graph-download a i {
    margin-right: 0;
    margin-left: 0.5rem;
}
html[dir="rtl"] .emission-card .card-link i,
html[dir="rtl"] .method-card .card-link i {
    margin-left: 0;
    margin-right: 0.3rem;
}
html[dir="rtl"] .aside-nav ul li a {
    border-left: none;
    border-right: 3px solid transparent;
}
html[dir="rtl"] .aside-nav ul li a:hover,
html[dir="rtl"] .aside-nav ul li a.active {
    border-right-color: var(--rouge);
}
html[dir="rtl"] .content-main ul li,
html[dir="rtl"] .highlight-section ul li {
    padding-left: 0;
    padding-right: 1.5rem;
}
html[dir="rtl"] .content-main ul li::before,
html[dir="rtl"] .highlight-section ul li::before {
    left: auto;
    right: 0;
    content: '◂';
}
html[dir="rtl"] .content-main .note,
html[dir="rtl"] .highlight-section {
    border-left: none;
    border-right: 4px solid var(--jaune);
}
html[dir="rtl"] .table-wrapper table th,
html[dir="rtl"] .table-wrapper table td {
    text-align: right;
}
/* « Retour » : la flèche pointe vers la droite en arabe */
html[dir="rtl"] .fa-arrow-left {
    transform: scaleX(-1);
}
html[dir="rtl"] .content-main .btn-back:hover i {
    transform: translateX(4px) scaleX(-1);
}
html[dir="rtl"] .page-hero::before {
    right: auto;
    left: -5%;
}
html[dir="rtl"] .page-hero::after {
    left: auto;
    right: -5%;
}

/* ===== CADRES GRAPHIQUES (communs à toutes les pages) ===== */
.graph-frame {
    background: #F6F9F7;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    width: 100%;
}
.graph-frame .graph-title {
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.8rem;
}
.graph-frame .graph-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    background: #E6EFE9;
    padding: 0.5rem;
}
.graph-frame .graph-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}
.graph-frame .graph-download {
    text-align: center;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 400;
    color: #6A7870;
    margin: 0.8rem 0;
}
.graph-frame .graph-download a {
    color: var(--rouge);
    font-weight: 600;
    transition: var(--transition);
}
.graph-frame .graph-download a:hover {
    color: var(--primary-color);
}
.graph-frame .graph-download a i {
    margin-right: 0.2rem;
}

.graph-frame .toggle-btn {
    display: block;
    margin: 0.5rem auto 0;
    padding: 0.4rem 1.8rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg-light);
    background: var(--primary-color);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}
.graph-frame .toggle-btn:hover {
    background: var(--rouge);
    transform: translateY(-2px);
}

.graph-frame .transcription {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.graph-frame .transcription.visible {
    display: block;
}
.graph-frame .transcription table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font);
    font-size: 0.85rem;
    max-width: 100%;
    margin: 0 auto;
}
.graph-frame .transcription table th {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 0.8rem;
    text-align: center;
    font-weight: 600;
}
.graph-frame .transcription table td {
    padding: 0.4rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.graph-frame .transcription table tr:nth-child(even) {
    background: #F6F9F7;
}
.graph-frame .transcription .hide-btn {
    display: block;
    margin: 0.5rem auto 0;
    padding: 0.3rem 1.5rem;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bg-light);
    background: #6A7870;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}
.graph-frame .transcription .hide-btn:hover {
    background: var(--rouge);
}

@media (max-width: 600px) {
    .graph-frame {
        padding: 1rem 0.8rem;
    }
    .graph-frame .graph-title {
        font-size: 0.95rem;
    }
    .graph-frame .transcription table {
        font-size: 0.75rem;
    }
    .graph-frame .transcription table th,
    .graph-frame .transcription table td {
        padding: 0.3rem 0.5rem;
    }
}

