/* ═══════════════════════════════════════════════════════════════════════════
   GUIDE MONEY MANAGEMENT - Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   Conteneur principal
   ───────────────────────────────────────────────────────────────────────────── */
.guide-content {
    font-size: 0.95rem;
    line-height: 1.7;
}

.guide-content p {
    margin-bottom: 1rem;
}

.guide-content h4 {
    color: var(--tblr-body-color);
    font-weight: 600;
    margin-top: 1.5rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Bloc Analogie
   ───────────────────────────────────────────────────────────────────────────── */
.guide-analogy {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--tblr-blue-lt) 0%, var(--tblr-azure-lt) 100%);
    border-radius: 0.75rem;
    border-left: 4px solid var(--tblr-blue);
}

.guide-analogy__icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--tblr-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.guide-analogy__content {
    flex: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Callouts (info, warning, success)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-callout {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid;
}

.guide-callout__icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.guide-callout--info {
    background: var(--tblr-azure-lt);
    border-color: var(--tblr-azure);
}
.guide-callout--info .guide-callout__icon {
    color: var(--tblr-azure);
}

.guide-callout--warning {
    background: var(--tblr-yellow-lt);
    border-color: var(--tblr-yellow);
}
.guide-callout--warning .guide-callout__icon {
    color: var(--tblr-yellow);
}

.guide-callout--success {
    background: var(--tblr-green-lt);
    border-color: var(--tblr-green);
}
.guide-callout--success .guide-callout__icon {
    color: var(--tblr-green);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Listes stylisées
   ───────────────────────────────────────────────────────────────────────────── */
.guide-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.guide-list li i {
    flex-shrink: 0;
    color: var(--tblr-blue);
    margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Piliers (3 colonnes)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-pillar {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--tblr-bg-surface);
    border-radius: 0.75rem;
    border: 1px solid var(--tblr-border-color);
    height: 100%;
}

.guide-pillar__number {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tblr-blue);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
}

.guide-pillar__title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.guide-pillar__desc {
    color: var(--tblr-secondary);
    font-size: 0.875rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Comparaison (bon vs mauvais)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .guide-comparison {
        grid-template-columns: 1fr;
    }
}

.guide-comparison__item {
    padding: 1.25rem;
    border-radius: 0.5rem;
}

.guide-comparison__item--bad {
    background: var(--tblr-red-lt);
    border: 1px solid var(--tblr-red);
}

.guide-comparison__item--good {
    background: var(--tblr-green-lt);
    border: 1px solid var(--tblr-green);
}

.guide-comparison__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.guide-comparison__item--bad .guide-comparison__header {
    color: var(--tblr-red);
}

.guide-comparison__item--good .guide-comparison__header {
    color: var(--tblr-green);
}

.guide-comparison__item ul {
    margin: 0;
    padding-left: 1.25rem;
}

.guide-comparison__item li {
    margin-bottom: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Formule encadrée
   ───────────────────────────────────────────────────────────────────────────── */
.guide-formula {
    background: var(--tblr-bg-surface);
    border: 2px dashed var(--tblr-border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    text-align: center;
}

.guide-formula__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-secondary);
    margin-bottom: 0.5rem;
}

.guide-formula__content {
    font-size: 1.1rem;
}

.guide-formula__content code {
    background: var(--tblr-yellow-lt);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.95rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Score (8.5/10)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-score {
    text-align: center;
    padding: 1rem 0;
}

.guide-score__value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--tblr-blue);
    line-height: 1;
}

.guide-score__value span {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--tblr-secondary);
}

.guide-score__label {
    font-size: 0.875rem;
    color: var(--tblr-secondary);
    margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Glossaire
   ───────────────────────────────────────────────────────────────────────────── */
.guide-glossary {
    margin: 0;
}

.guide-glossary dt {
    font-weight: 600;
    color: var(--tblr-body-color);
    margin-top: 0.75rem;
}

.guide-glossary dt:first-child {
    margin-top: 0;
}

.guide-glossary dd {
    margin-left: 0;
    color: var(--tblr-secondary);
    font-size: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--tblr-border-color);
}

.guide-glossary dd:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Checklist
   ───────────────────────────────────────────────────────────────────────────── */
.guide-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
}

.guide-checklist li i {
    color: var(--tblr-green);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Exemples encadrés
   ───────────────────────────────────────────────────────────────────────────── */
.guide-example {
    border: 1px solid var(--tblr-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.guide-example__header {
    background: var(--tblr-bg-surface);
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--tblr-border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-example__header i {
    color: var(--tblr-blue);
}

.guide-example__body {
    padding: 1rem;
}

.guide-example__step {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--tblr-border-color);
}

.guide-example__step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.guide-example__step .step-number {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tblr-azure);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Échelle (sentiment sizing)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-scale {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.guide-scale__item {
    flex: 1;
    max-width: 150px;
    text-align: center;
    padding: 1rem;
    background: var(--tblr-bg-surface);
    border-radius: 0.5rem;
    border: 2px solid var(--scale-color, var(--tblr-border-color));
}

.guide-scale__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--scale-color);
}

.guide-scale__label {
    display: block;
    font-size: 0.75rem;
    color: var(--tblr-secondary);
    margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Limites (barres visuelles)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-limits {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-limits__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-limits__bar {
    height: 1.5rem;
    border-radius: 0.25rem;
    min-width: 8px;
}

.guide-limits__label {
    display: flex;
    justify-content: space-between;
    flex: 1;
    font-size: 0.875rem;
}

.guide-limits__label span {
    color: var(--tblr-secondary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Types de stop (3 colonnes)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-stop-type {
    border: 1px solid var(--tblr-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.guide-stop-type__header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-stop-type__body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-stop-type__body p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.guide-stop-type__example {
    background: var(--tblr-bg-surface);
    padding: 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-top: auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Trailing Stop Visual
   ───────────────────────────────────────────────────────────────────────────── */
.guide-trailing-visual {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.guide-trailing-step {
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    min-width: 140px;
    flex: 1;
    max-width: 180px;
}

.guide-trailing-step .step-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.guide-trailing-step .step-content {
    font-size: 0.8rem;
    line-height: 1.5;
}

.guide-trailing-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--tblr-secondary);
}

@media (max-width: 768px) {
    .guide-trailing-arrow {
        transform: rotate(90deg);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Secteurs
   ───────────────────────────────────────────────────────────────────────────── */
.guide-sectors {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-sector {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--tblr-bg-surface);
    border-radius: 0.5rem;
    border: 1px solid var(--tblr-border-color);
}

.guide-sector__icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.25rem;
}

.guide-sector__info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-sector__info span {
    font-size: 0.75rem;
    color: var(--tblr-secondary);
}

.guide-sector__limit {
    font-weight: 600;
    color: var(--tblr-orange);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Corrélation Scale
   ───────────────────────────────────────────────────────────────────────────── */
.guide-correlation {
    position: relative;
    padding: 2.5rem 2rem 3rem;
}

.guide-correlation__scale {
    position: relative;
    height: 2rem;
}

.guide-correlation__bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, 
        var(--tblr-green) 0%, 
        var(--tblr-yellow) 50%, 
        var(--tblr-red) 100%);
    border-radius: 4px;
    transform: translateY(-50%);
}

.guide-correlation__point {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.guide-correlation__point .value {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    background: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid var(--tblr-border-color);
}

.guide-correlation__point .label {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--tblr-secondary);
    white-space: nowrap;
}

.guide-correlation__point--limit .value {
    background: var(--tblr-orange);
    color: white;
    border-color: var(--tblr-orange);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Tables de configuration
   ───────────────────────────────────────────────────────────────────────────── */
.guide-config-section {
    border: 1px solid var(--tblr-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.guide-config-section__title {
    background: var(--tblr-bg-surface);
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--tblr-border-color);
    display: flex;
    align-items: center;
}

.guide-config-section__title i {
    color: var(--tblr-blue);
}

.guide-config-table {
    margin-bottom: 0;
}

.guide-config-table code {
    background: var(--tblr-bg-surface);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
}

.guide-config-table th {
    background: var(--tblr-bg-surface);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.guide-config-table td {
    vertical-align: middle;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Panneau slide-in (aide contextuelle)
   ───────────────────────────────────────────────────────────────────────────── */
.guide-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--tblr-bg-surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.guide-slide-panel[data-open="true"] {
    transform: translateX(0);
}

.guide-slide-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color);
    background: var(--tblr-blue);
    color: white;
}

.guide-slide-panel__header h4 {
    margin: 0;
    font-size: 1rem;
}

.guide-slide-panel__header .btn-close {
    filter: invert(1);
}

.guide-slide-panel__content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.guide-slide-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1049;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.guide-slide-backdrop[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Navigation onglets (override pour responsive)
   ───────────────────────────────────────────────────────────────────────────── */
#guide-tabs {
    flex-wrap: wrap;
}

#guide-tabs .nav-link {
    white-space: nowrap;
}

@media (max-width: 992px) {
    #guide-tabs {
        gap: 0.25rem;
    }
    
    #guide-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    #guide-tabs .nav-link i {
        display: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Thème sombre
   ───────────────────────────────────────────────────────────────────────────── */
[data-theme="dark"] .guide-analogy__icon {
    background: var(--tblr-bg-surface);
}

[data-theme="dark"] .guide-correlation__point .value {
    background: var(--tblr-bg-surface);
}

[data-theme="dark"] .guide-trailing-step .step-icon {
    filter: grayscale(0);
}
