/* ==========================================================
   SIDEBAR — QUARTIER GÉNÉRAL
   ========================================================== */

.sidebar-card {
    width: 100%;
    color: var(--campaign-text);
}


/* ==========================================================
   PANNEAUX / ACCORDÉONS
   ========================================================== */

.campaign-panel {

    width: 100%;

    margin-bottom: 12px;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            rgba(34, 31, 26, .94),
            rgba(25, 23, 20, .96)
        );

    border: 1px solid rgba(190, 160, 95, .18);

    border-radius: 10px;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .22);

    backdrop-filter: blur(3px);

    transition:
        border-color .25s ease,
        box-shadow .25s ease;
}


.campaign-panel:hover {

    border-color:
        rgba(190, 160, 95, .28);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, .28);

}


/* ==========================================================
   HEADER ACCORDÉON
   ========================================================== */

.accordion-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    min-height: 48px;

    padding: 0 14px;

    box-sizing: border-box;

    border: 0;

    background:
        linear-gradient(
            90deg,
            rgba(190, 160, 95, .06),
            rgba(190, 160, 95, .015)
        );

    color: var(--campaign-text);

    cursor: pointer;

    text-align: left;

    transition:
        background .2s ease,
        color .2s ease;
}


.accordion-header:hover {

    background:
        linear-gradient(
            90deg,
            rgba(190, 160, 95, .12),
            rgba(190, 160, 95, .025)
        );

}


/* ==========================================================
   TITRE
   ========================================================== */

.campaign-panel-title {

    position: relative;

    margin: 0;

    padding-left: 18px;

    color: #eee6d8;

    font-family: "Cinzel", serif;

    font-size: .76rem;

    font-weight: 500;

    letter-spacing: .08em;

    text-transform: uppercase;
}


.campaign-panel-title::before {

    content: "◈";

    position: absolute;

    left: 0;

    top: 50%;

    transform: translateY(-50%);

    color: #bea05f;

    font-size: .58rem;

}


/* ==========================================================
   ICÔNE + / -
   ========================================================== */

.accordion-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 24px;
    height: 24px;

    flex-shrink: 0;

    border: 1px solid rgba(190, 160, 95, .20);

    border-radius: 6px;

    background: rgba(190, 160, 95, .05);

    color: #bea05f;

    font-size: .90rem;

    line-height: 1;

    transition:
        transform .25s ease,
        background .2s ease,
        border-color .2s ease;
}


.accordion-header:hover .accordion-icon {

    background:
        rgba(190, 160, 95, .12);

    border-color:
        rgba(190, 160, 95, .40);

}


/* ==========================================================
   CONTENU ACCORDÉON
   ========================================================== */

.accordion-content {

    overflow: hidden;

}


.campaign-panel-body {

    padding: 14px;

    border-top:
        1px solid rgba(190, 160, 95, .10);

}


/* ==========================================================
   ESPACEMENT DES ÉLÉMENTS
   ========================================================== */

/*
 * Le Twig utilise actuellement les classes Tailwind
 * space-y-4 / space-y-3.
 *
 * On garde leur fonctionnement mais on harmonise
 * l'espacement avec le reste du panneau.
 */

.campaign-panel-body .space-y-4 > * + * {

    margin-top: 11px;

}


.campaign-panel-body .space-y-3 > * + * {

    margin-top: 9px;

}


/* ==========================================================
   INFORMATIONS DE CAMPAGNE
   ========================================================== */

.campaign-panel-body .flex.items-center.justify-between {

    min-height: 28px;

    padding: 6px 7px;

    border-radius: 6px;

    transition:
        background .2s ease;

}


.campaign-panel-body .flex.items-center.justify-between:hover {

    background:
        rgba(190, 160, 95, .045);

}


/* Labels */

.campaign-panel-body .text-slate-400 {

    color: #898277 !important;

    font-size: .70rem;

}


/* Valeurs */

.campaign-panel-body .flex.items-center.justify-between > span:last-child {

    color: #ded5c5;

    font-family: "Cinzel", serif;

    font-size: .75rem;

}


/* ==========================================================
   TOUR ACTUEL
   ========================================================== */

.campaign-panel-body .text-2xl {

    color: #d8b36a !important;

    font-family: "Cinzel", serif;

    font-size: 1.35rem;

    font-weight: 400;

    text-shadow:
        0 2px 8px rgba(190, 160, 95, .18);

}


/* ==========================================================
   CARTES DES ÉQUIPES
   ========================================================== */

.team-card {

    position: relative;

    overflow: hidden;

    padding: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, .035),
            rgba(255, 255, 255, .012)
        );

    border:
        1px solid rgba(190, 160, 95, .16);

    border-radius: 9px;

    transition:
        transform .20s ease,
        border-color .20s ease,
        box-shadow .20s ease,
        background .20s ease;

}


/* Ligne colorée de faction */

.team-card::before {

    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 3px;

    background: var(--team-color);

    box-shadow:
        0 0 8px color-mix(
            in srgb,
            var(--team-color) 45%,
            transparent
        );

}


/* Petit halo supérieur */

.team-card::after {

    content: "";

    position: absolute;

    top: 0;
    left: 3px;
    right: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            color-mix(
                in srgb,
                var(--team-color) 50%,
                transparent
            ),
            transparent
        );

    opacity: .8;

}


.team-card:hover {

    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            rgba(190, 160, 95, .07),
            rgba(255, 255, 255, .015)
        );

    border-color:
        color-mix(
            in srgb,
            var(--team-color) 55%,
            rgba(190, 160, 95, .20)
        );

    box-shadow:
        0 8px 18px rgba(0, 0, 0, .28),
        0 0 12px color-mix(
            in srgb,
            var(--team-color) 15%,
            transparent
        );

}


/* ==========================================================
   HEADER ÉQUIPE
   ========================================================== */

.team-card-header {

    display: flex;

    align-items: center;

    gap: 11px;

}


.team-emblem {

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    object-fit: contain;

    filter:
        drop-shadow(
            0 2px 5px rgba(0, 0, 0, .45)
        );

}


.team-card-info {

    flex: 1;

    min-width: 0;

}


/* ==========================================================
   NOM ÉQUIPE
   ========================================================== */

.team-card-title {

    overflow: hidden;

    color: #eee6d8;

    font-family: "Cinzel", serif;

    font-size: .78rem;

    font-weight: 600;

    letter-spacing: .06em;

    line-height: 1.2;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.team-card-subtitle {

    margin-top: 4px;

    color: #d0ad68;

    font-size: .68rem;

    font-weight: 600;

}


/* ==========================================================
   SÉPARATEUR
   ========================================================== */

.team-card-divider {

    height: 1px;

    margin: 12px 0;

    background:
        linear-gradient(
            90deg,
            rgba(190, 160, 95, .20),
            rgba(190, 160, 95, .04),
            transparent
        );

}


/* ==========================================================
   STATISTIQUES ÉQUIPE
   ========================================================== */

.team-card-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 7px;

}


.team-stat {

    display: flex;

    align-items: center;

    gap: 6px;

    min-height: 32px;

    padding: 5px 8px;

    box-sizing: border-box;

    background:
        rgba(0, 0, 0, .16);

    border:
        1px solid rgba(190, 160, 95, .08);

    border-radius: 6px;

}


.team-stat-icon {

    font-size: .78rem;

    line-height: 1;

}


.team-stat span:last-child {

    color: #d6cdbc;

    font-size: .70rem;

    font-weight: 600;

}


/* ==========================================================
   PV — MISE EN AVANT
   ========================================================== */

.team-card-subtitle::first-letter {

    color: #e1bd70;

}


/* ==========================================================
   SCROLLBAR SIDEBAR
   ========================================================== */

.sidebar-card::-webkit-scrollbar {

    width: 5px;

}


.sidebar-card::-webkit-scrollbar-track {

    background: rgba(0, 0, 0, .15);

}


.sidebar-card::-webkit-scrollbar-thumb {

    background:
        rgba(190, 160, 95, .25);

    border-radius: 999px;

}


.sidebar-card::-webkit-scrollbar-thumb:hover {

    background:
        rgba(190, 160, 95, .45);

}


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

@media (max-width: 900px) {

    .campaign-panel-title {

        font-size: .70rem;

    }

    .campaign-panel-body {

        padding: 11px;

    }

    .team-card {

        padding: 12px;

    }

    .team-emblem {

        width: 38px;
        height: 38px;

    }

}


@media (max-width: 600px) {

    .campaign-panel {

        border-radius: 8px;

    }

    .accordion-header {

        min-height: 44px;

        padding: 0 11px;

    }

    .campaign-panel-body {

        padding: 10px;

    }

    .team-card {

        padding: 11px;

    }

}