/*
 * HebergComm Forum — thème v4
 *
 * Adaptation Flarum dédiée :
 * - largeur augmentée ;
 * - bandeaux compacts ;
 * - navigation mieux alignée ;
 * - logo plus visible ;
 * - contenu principal plus grand.
 */

:root {
    --hc-bg: #050914;
    --hc-bg-dark: #020611;

    --hc-panel: #111827;
    --hc-panel-dark: #0f172a;
    --hc-panel-transparent: rgba(17, 24, 39, .96);

    --hc-border: rgba(148, 163, 184, .17);
    --hc-border-strong: rgba(148, 163, 184, .30);

    --hc-blue: #2563eb;
    --hc-blue-light: #5689ff;

    --hc-gold: #d8a84e;
    --hc-gold-light: #f1d58a;

    --hc-text: #f8fafc;
    --hc-muted: #9aa9c0;

    --hc-shadow: 0 18px 50px rgba(0, 0, 0, .30);
}

/* ==========================================================
 * FOND
 * ========================================================== */

html,
body {
    min-height: 100%;
    background: var(--hc-bg-dark);
}

body {
    margin: 0;

    color: var(--hc-text) !important;

    background:
        radial-gradient(
            circle at 12% 4%,
            rgba(37, 99, 235, .25),
            transparent 31%
        ),
        radial-gradient(
            circle at 89% 4%,
            rgba(216, 168, 78, .14),
            transparent 28%
        ),
        radial-gradient(
            circle at 52% 115%,
            rgba(14, 116, 144, .14),
            transparent 37%
        ),
        linear-gradient(
            140deg,
            #030711 0%,
            #07101f 44%,
            #080b12 100%
        ) !important;

    background-attachment: fixed !important;

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

.App,
.App-content,
.IndexPage,
.DiscussionPage,
.UserPage,
.SettingsPage,
.TagsPage {
    background: transparent !important;
}

.hc-sitebar,
.hc-footer {
    display: none !important;
}

/* ==========================================================
 * LARGEUR GÉNÉRALE
 * ========================================================== */

.container {
    width: min(1460px, calc(100% - 56px)) !important;
    max-width: 1460px !important;
}

/* ==========================================================
 * EN-TÊTE
 * ========================================================== */

.Header {
    position: relative;

    min-height: 88px;

    border-bottom:
        1px solid rgba(148, 163, 184, .13) !important;

    background:
        rgba(7, 12, 22, .92) !important;

    box-shadow:
        0 12px 36px rgba(0, 0, 0, .25) !important;

    backdrop-filter: blur(16px);
}

.Header .container {
    min-height: 88px;

    display: flex;
    align-items: center;

    gap: 24px;
}

.Header-title {
    margin: 0 auto 0 0 !important;
}

.Header-title a {
    display: flex !important;
    align-items: center;

    min-height: 72px;

    color: var(--hc-gold-light) !important;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    text-decoration: none !important;
}

.Header-title img {
    display: block;

    width: 210px !important;
    max-width: 210px !important;

    height: 72px !important;
    max-height: 72px !important;

    object-fit: contain !important;
    object-position: left center !important;

    filter:
        drop-shadow(0 8px 20px rgba(0, 0, 0, .44))
        saturate(1.08);
}

.Header-primary,
.Header-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.Search {
    margin-left: auto;
}

.Search-input input {
    width: 290px !important;
    min-height: 42px;

    margin: 0;

    padding-left: 42px !important;

    border:
        1px solid var(--hc-border-strong) !important;

    border-radius: 11px !important;

    color: var(--hc-text) !important;

    background:
        rgba(7, 14, 29, .90) !important;
}

.Search-input input:focus {
    border-color:
        rgba(216, 168, 78, .65) !important;

    box-shadow:
        0 0 0 3px rgba(216, 168, 78, .13) !important;
}

/* ==========================================================
 * BANDEAU D'ACCUEIL ET BANDEAU DES ÉTIQUETTES
 * ========================================================== */

.Hero,
.WelcomeHero,
.TagHero {
    position: relative;

    width: min(1460px, calc(100% - 56px)) !important;
    max-width: 1460px !important;

    min-height: 0 !important;

    margin: 28px auto 22px !important;
    padding: 0 !important;

    border:
        1px solid var(--hc-border) !important;

    border-radius: 18px !important;

    color: var(--hc-text) !important;

    background:
        radial-gradient(
            circle at 10% 0,
            rgba(37, 99, 235, .14),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            rgba(17, 24, 39, .97),
            rgba(15, 23, 42, .97)
        ) !important;

    box-shadow: var(--hc-shadow) !important;

    overflow: hidden;
}

/*
 * Empêche le conteneur de la Hero d'hériter de la grille
 * utilisée pour la navigation et les discussions.
 */
.Hero > .container,
.WelcomeHero > .container,
.TagHero > .container,
.IndexPage .Hero .container,
.IndexPage .WelcomeHero .container {
    display: block !important;

    width: 100% !important;
    max-width: none !important;

    min-height: 0 !important;

    margin: 0 !important;
    padding: 27px 70px !important;

    box-sizing: border-box;

    text-align: center !important;
}

.TagHero > .container {
    padding-top: 22px !important;
    padding-bottom: 22px !important;
}

.Hero-title,
.WelcomeHero-title {
    max-width: 900px;

    margin: 0 auto 8px !important;

    color: var(--hc-gold-light) !important;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(27px, 2.4vw, 36px) !important;
    line-height: 1.2 !important;

    font-weight: 700;

    letter-spacing: .2px;

    text-shadow:
        0 4px 18px rgba(0, 0, 0, .32);
}

.TagHero .Hero-title {
    margin-bottom: 0 !important;

    font-size:
        clamp(27px, 2.2vw, 34px) !important;
}

.Hero-subtitle,
.WelcomeHero-subtitle {
    max-width: 780px;

    margin: 0 auto !important;

    color: #aebbd0 !important;

    font-size: 15px !important;
    line-height: 1.65 !important;
}

.Hero-close {
    position: absolute !important;

    top: 15px !important;
    right: 15px !important;
    left: auto !important;

    margin: 0 !important;
}

/* ==========================================================
 * PAGE PRINCIPALE
 * ========================================================== */

.IndexPage {
    padding: 0 0 55px !important;
}

/*
 * Cette règle cible uniquement le conteneur principal.
 * Elle ne touche pas le conteneur du bandeau.
 */
.IndexPage > .container {
    width: min(1460px, calc(100% - 56px)) !important;
    max-width: 1460px !important;

    display: grid !important;

    grid-template-columns:
        270px minmax(0, 1fr);

    align-items: start;

    gap: 24px;

    margin: 0 auto !important;
}

.IndexPage-nav {
    width: auto !important;
    min-width: 0;

    margin: 0 !important;
}

.IndexPage-results {
    width: auto !important;
    min-width: 0;

    margin: 0 !important;
}

/* ==========================================================
 * MENU LATÉRAL
 * ========================================================== */

.sideNav {
    position: sticky;
    top: 108px;

    width: auto !important;

    padding: 14px !important;

    border:
        1px solid var(--hc-border) !important;

    border-radius: 18px !important;

    color: var(--hc-text) !important;

    background:
        linear-gradient(
            180deg,
            rgba(17, 24, 39, .98),
            rgba(15, 23, 42, .98)
        ) !important;

    box-shadow: var(--hc-shadow) !important;
}

.IndexPage-newDiscussion {
    margin: 0 0 12px !important;
}

.IndexPage-newDiscussion .Button {
    width: 100%;

    min-height: 44px !important;
}

.sideNav .Dropdown--select .Dropdown-toggle {
    display: none !important;
}

.sideNav .Dropdown--select .Dropdown-menu {
    position: static !important;

    display: flex !important;
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    flex-direction: column;
    gap: 5px;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}

.sideNav .Dropdown-menu > li > a,
.sideNav .Dropdown-menu > li > button {
    display: flex !important;
    align-items: center;

    gap: 10px;

    min-height: 43px;

    margin: 0 !important;
    padding: 10px 12px !important;

    border:
        1px solid transparent !important;

    border-radius: 11px !important;

    color: #d9e4f5 !important;

    background: transparent !important;

    font-weight: 650 !important;
}

.sideNav .Dropdown-menu > li > a:hover,
.sideNav .Dropdown-menu > li > button:hover {
    border-color:
        rgba(147, 197, 253, .22) !important;

    color: #fff !important;

    background:
        rgba(37, 99, 235, .12) !important;
}

.sideNav .Dropdown-menu > li.active > a,
.sideNav .Dropdown-menu > li.active > button {
    border-color:
        rgba(216, 168, 78, .42) !important;

    color:
        var(--hc-gold-light) !important;

    background:
        linear-gradient(
            135deg,
            rgba(216, 168, 78, .18),
            rgba(37, 99, 235, .14)
        ) !important;
}

/* ==========================================================
 * BARRE D'OUTILS
 * ========================================================== */

.IndexPage-toolbar {
    width: 100%;

    min-height: 46px;

    margin: 0 0 12px !important;
    padding: 0 !important;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.IndexPage-toolbar-view,
.IndexPage-toolbar-action {
    display: flex;
    align-items: center;

    gap: 8px;
}

/* ==========================================================
 * LISTE DES DISCUSSIONS
 * ========================================================== */

.DiscussionList {
    width: 100% !important;

    min-height: 390px;

    border:
        1px solid var(--hc-border) !important;

    border-radius: 18px !important;

    color: var(--hc-text) !important;

    background:
        linear-gradient(
            180deg,
            rgba(17, 24, 39, .97),
            rgba(15, 23, 42, .97)
        ) !important;

    box-shadow: var(--hc-shadow) !important;

    overflow: hidden;
}

.DiscussionList-discussions {
    min-height: 390px;
}

.DiscussionList .EmptyState,
.DiscussionList .LoadingIndicator-container {
    min-height: 390px;

    display: flex !important;

    align-items: center;
    justify-content: center;
}

.EmptyState {
    color: var(--hc-muted) !important;
}

.EmptyState-title {
    color: #aebbd0 !important;

    font-size: 18px !important;
    font-weight: 500 !important;
}

.DiscussionListItem {
    border-bottom:
        1px solid rgba(148, 163, 184, .11) !important;

    background: transparent !important;
}

.DiscussionListItem:last-child {
    border-bottom: 0 !important;
}

.DiscussionListItem:hover,
.DiscussionListItem.active {
    background:
        linear-gradient(
            90deg,
            rgba(37, 99, 235, .10),
            rgba(37, 99, 235, .025)
        ) !important;
}

.DiscussionListItem-title {
    color: #f8fafc !important;

    font-weight: 750 !important;
}

.DiscussionListItem-info,
.DiscussionListItem-count,
.DiscussionListItem-terminal {
    color: var(--hc-muted) !important;
}

/* ==========================================================
 * BOUTONS
 * ========================================================== */

.Button {
    min-height: 39px !important;

    padding: 9px 14px !important;

    border:
        1px solid var(--hc-border-strong) !important;

    border-radius: 10px !important;

    color: #e5e7eb !important;

    background:
        rgba(15, 23, 42, .92) !important;

    font-weight: 750 !important;

    box-shadow: none !important;
}

.Button:hover,
.Button:focus {
    border-color:
        rgba(216, 168, 78, .45) !important;

    color: #fff !important;

    background:
        rgba(30, 41, 59, .98) !important;
}

.Button--primary,
.IndexPage-newDiscussion .Button {
    border-color:
        rgba(112, 153, 255, .60) !important;

    color: #fff !important;

    background:
        linear-gradient(
            135deg,
            #3159dc,
            #4d88ff
        ) !important;

    box-shadow:
        0 9px 22px rgba(37, 99, 235, .28) !important;
}

.Button--primary:hover,
.IndexPage-newDiscussion .Button:hover {
    background:
        linear-gradient(
            135deg,
            #3d68eb,
            #6096ff
        ) !important;
}

/* ==========================================================
 * FORMULAIRES, MENUS ET MESSAGES
 * ========================================================== */

.FormControl,
.TextEditor-editor,
.Select-control {
    min-height: 40px;

    border:
        1px solid var(--hc-border-strong) !important;

    border-radius: 10px !important;

    color: var(--hc-text) !important;

    background: #09111f !important;
}

.FormControl:focus,
.TextEditor-editor:focus,
.Select-control.focused {
    border-color:
        rgba(216, 168, 78, .62) !important;

    box-shadow:
        0 0 0 3px rgba(216, 168, 78, .13) !important;
}

.Dropdown-menu,
.Modal-content,
.Composer,
.Post,
.UserCard {
    border:
        1px solid var(--hc-border) !important;

    border-radius: 17px !important;

    color: var(--hc-text) !important;

    background:
        linear-gradient(
            180deg,
            rgba(17, 24, 39, .99),
            rgba(15, 23, 42, .99)
        ) !important;

    box-shadow: var(--hc-shadow) !important;
}

.Dropdown-menu > li > a,
.Dropdown-menu > li > button {
    color: #dbeafe !important;
}

.Dropdown-menu > li > a:hover,
.Dropdown-menu > li > button:hover {
    color: #fff !important;

    background:
        rgba(37, 99, 235, .13) !important;
}

.Modal-title,
.Composer-title,
.PostUser-name,
.username {
    color: var(--hc-gold-light) !important;
}

.Post {
    margin-bottom: 18px;
}

.Post-body {
    color: #e6edf8 !important;

    line-height: 1.72;
}

a {
    color: #93c5fd;
}

a:hover,
a:focus {
    color: var(--hc-gold-light);
}

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

@media (max-width: 1100px) {
    .container,
    .Hero,
    .WelcomeHero,
    .TagHero,
    .IndexPage > .container {
        width: calc(100% - 32px) !important;
    }

    .IndexPage > .container {
        grid-template-columns:
            235px minmax(0, 1fr);

        gap: 18px;
    }

    .Header-title img {
        width: 180px !important;
        max-width: 180px !important;

        height: 62px !important;
        max-height: 62px !important;
    }

    .Search-input input {
        width: 230px !important;
    }
}

@media (max-width: 767px) {
    .container,
    .Hero,
    .WelcomeHero,
    .TagHero,
    .IndexPage > .container {
        width: calc(100% - 20px) !important;
    }

    .Header,
    .Header .container {
        min-height: 64px;
    }

    .Header-title img {
        width: 138px !important;
        max-width: 138px !important;

        height: 48px !important;
        max-height: 48px !important;
    }

    .Search {
        display: none;
    }

    .Hero,
    .WelcomeHero,
    .TagHero {
        margin-top: 16px !important;
    }

    .Hero > .container,
    .WelcomeHero > .container,
    .TagHero > .container,
    .IndexPage .Hero .container,
    .IndexPage .WelcomeHero .container {
        padding:
            24px 38px !important;
    }

    .IndexPage > .container {
        display: block !important;
    }

    .IndexPage-nav {
        margin-bottom: 14px !important;
    }

    .sideNav {
        position: static;

        padding: 9px !important;
    }

    .DiscussionList,
    .DiscussionList-discussions,
    .DiscussionList .EmptyState {
        min-height: 280px;
    }
}

@media (max-width: 480px) {
    .Hero > .container,
    .WelcomeHero > .container,
    .TagHero > .container,
    .IndexPage .Hero .container,
    .IndexPage .WelcomeHero .container {
        padding:
            22px 18px !important;
    }

    .Hero-title,
    .WelcomeHero-title {
        font-size: 25px !important;
    }

    .Hero-subtitle,
    .WelcomeHero-subtitle {
        font-size: 14px !important;
    }
}
