/* =========================================
   GUIDE RAIDEUR STYLES (styles.guide.css)
   ========================================= */

/* --- Layout --- */
.guideWrap {
    max-width: 1400px;
    /* Plus large pour la sidebar */
    padding-top: 20px;
}

.guideHeader {
    margin-bottom: 40px;
}

.guideLayout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    position: relative;
    /* responsive below */
}

/* --- Sidebar --- */
.guideSidebar {
    /* Sticky Magic */
    position: sticky;
    top: 24px;
    height: fit-content;
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    padding: 16px;
    background: rgba(19, 9, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.tocTitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 12px;
    font-weight: 700;
}

.tocLink {
    display: block;
    padding: 8px 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.tocLink:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.tocLink.active {
    color: #fff;
    background: rgba(185, 140, 255, 0.1);
    border-left-color: var(--accent);
    font-weight: 600;
}

.tocAd {
    margin-top: 24px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(185, 140, 255, 0.1), rgba(102, 247, 255, 0.05));
    border-radius: 8px;
    border: 1px solid rgba(185, 140, 255, 0.2);
}

.tocAdTitle {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 4px;
}

.tocAd p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

/* --- Content Cards --- */
.guideContent {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    /* Fix flex child overflow issues */
}

.guideCard {
    background: rgba(16, 12, 26, 0.72);
    border: 1px solid rgba(214, 185, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Firefox fallback: No blur, simpler transparency for performance */
@supports (-moz-appearance:none) {

    .guideCard,
    .guideSidebar {
        backdrop-filter: none !important;
        background: #100c1a !important;
        /* Higher opacity to compensate */
    }

    /* Restore banner image for Intro card on Firefox */
    #intro.guideCard {
        background: linear-gradient(rgba(16, 12, 26, 0.9), rgba(16, 12, 26, 0.9)), url('/assets/leveling.jpg') center/cover no-repeat !important;
        background-clip: padding-box;
    }
}

/* Header de carte avec image de fond subtile ou gradient */
#intro.guideCard {
    background: linear-gradient(rgba(16, 12, 26, 0.9), rgba(16, 12, 26, 0.9)), url('/assets/leveling.jpg') center/cover no-repeat;
    background-clip: padding-box;
}

.guideTitle {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 8px 0;
    background: linear-gradient(90deg, #fff, #b98cff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.guideSubtitle {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.sectionTitle {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- TL;DR Box --- */
.tldrBox {
    background: rgba(102, 247, 255, 0.05);
    border-left: 3px solid var(--accent2);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
}

.tldrBox.warningTldr {
    background: rgba(255, 89, 89, 0.08);
    border-left-color: #ff5959;
}

.tldrLabel {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent2);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.warningTldr .tldrLabel {
    color: #ff5959;
}

.tldrList {
    margin: 0;
    padding-left: 18px;
}

.tldrList li {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

/* --- Resource Grid --- */
.resourceGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.resourceCard {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s ease;
}

.resourceCard:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.resourceIcon {
    font-size: 20px;
    color: var(--accent);
}

/* --- Typography Content --- */
.guideLink,
.profLink,
.contentBlock a,
.timelineContent a {
    color: var(--accent2);
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 247, 255, 0.3);
    transition: all 0.2s ease;
}

.guideLink:hover,
.profLink:hover,
.contentBlock a:hover,
.timelineContent a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.contentBlock h3 {
    font-size: 18px;
    color: #fff;
    margin-top: 28px;
    margin-bottom: 12px;
}

.contentBlock p {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.contentBlock ul {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    padding-left: 20px;
}

.contentBlock li {
    margin-bottom: 8px;
}

.guideNote {
    font-size: 13px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6) !important;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 12px;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
}

/* Vertical line centered at 15px from parent left */
.timeline::before {
    content: '' !important;
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timelineItem {
    position: relative;
    margin-bottom: 32px;
}

.timelineItem::before {
    content: '';
    position: absolute;
    left: -15px;
    /* Exactly centered on the line (15px center - 30px padding) */
    transform: translateX(-50%);
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg0);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
    transition: all 0.2s ease;
}

.timelineItem.activeWeek::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent), 0 0 5px rgba(255, 255, 255, 0.2);
}
.timelineArchive {
    margin-top: 20px;
}

.timelinePastWeeks {
    padding-top: 8px;
}

.timelinePastWeeks .timelineItem {
    margin-bottom: 24px;
}

.timelineDate {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--accent2);
    font-weight: 700;
    margin-bottom: 4px;
}

.timelineContent h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.timelineContent ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--muted);
}

/* --- Content Details (Accordions) --- */
.guideDetails {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.guideDetails[open] {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.guideDetails summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent2);
    list-style: none;
    /* Hide default triangle */
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
}

.guideDetails summary::-webkit-details-marker {
    display: none;
}

.guideDetails summary::after {
    content: '\f078';
    /* FontAwesome Chevron Down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.guideDetails[open] summary::after {
    transform: rotate(180deg);
}

.guideDetails summary:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.detailsContent {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.detailsContent p {
    margin-bottom: 12px;
}

.detailsContent p:last-child {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Addons Grid --- */
.addonGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.addonItem {
    background: rgba(0, 0, 0, 0.2);
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.addonHead h3 {
    margin: 0;
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.addonTags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.addonTag {
    font-size: 11px;
    letter-spacing: 0.02em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.addonList {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.addonList li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.addonList a {
    display: block;
    color: #bfe7ff;
    text-decoration: none;
    font-weight: 600;
}

.addonList a:hover {
    color: var(--accent);
}

.addonNote {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.addonNote em {
    font-style: italic;
}

.addonItem--priority .addonHead h3 {
    color: #ffcf6a;
}

.addonItem--ui .addonHead h3 {
    color: #9bd6ff;
}

.addonItem--cooldowns .addonHead h3 {
    color: #c6a6ff;
}

.addonItem--raidframes .addonHead h3 {
    color: #8ef3c5;
}

.addonItem--nameplates .addonHead h3 {
    color: #ffd0a6;
}

.addonItem--actions .addonHead h3 {
    color: #9fe0ff;
}

.addonItem--bossmods .addonHead h3 {
    color: #ff9fa3;
}

.addonItem--mplus .addonHead h3 {
    color: #b6ff9b;
}

.addonItem--misc .addonHead h3 {
    color: #bcd6ff;
}


.consoleCommandBox {
    margin-top: 24px;
    background: #000;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    color: #0f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.consoleCommandBox p {
    color: #888;
    margin: 0 0 8px 0;
}

/* --- Profession Grid Links --- */
.professionGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profLink {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.profLink:hover {
    background: rgba(102, 247, 255, 0.1);
    border-color: var(--accent2);
}

/* --- Back To Top --- */
.backToTop {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.backToTop:hover {
    background: #cba6ff;
    transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .guideLayout {
        grid-template-columns: 1fr;
    }

    .guideSidebar {
        display: none;
        /* Hide sidebar on small screens for now, or make it a drawer */
    }
}
