/*
|--------------------------------------------------------------------------
| TROPIKEAU MODULES V2.3
|--------------------------------------------------------------------------
|
| Couche commune des pages Laravel.
|
| Elle vient corriger les anciens styles codés pour le mode sombre
| sans modifier la logique PHP / Blade des modules.
|
*/


/* =========================================================
   VARIABLES DE MODULES
   ========================================================= */

html[data-theme] {
    --tk-info-rgb: 93, 99, 235;
    --tk-success-rgb: 34, 197, 94;
    --tk-warning-rgb: 245, 158, 11;
    --tk-danger-rgb: 239, 68, 68;
}


/* =========================================================
   PAGES GENERIQUES
   CSE / TOTAL WASH / FAQ / PAGES FILAMENT
   ========================================================= */

html[data-theme] .portal-rich-content,
html[data-theme] .tk-rich-content {
    color: var(--tk-text) !important;
}

html[data-theme] .portal-rich-content
:is(
    p,
    li,
    figcaption,
    small
),
html[data-theme] .tk-rich-content
:is(
    p,
    li,
    figcaption,
    small
) {
    color: var(--tk-text) !important;
}

html[data-theme] .portal-rich-content
:is(h1,h2,h3,h4,h5,h6,strong),
html[data-theme] .tk-rich-content
:is(h1,h2,h3,h4,h5,h6,strong) {
    color: var(--tk-text) !important;
}

html[data-theme] .portal-rich-content a,
html[data-theme] .tk-rich-content a {
    color: var(--tk-primary) !important;
}

html[data-theme] .portal-rich-content blockquote,
html[data-theme] .tk-rich-content blockquote {
    color: var(--tk-text) !important;

    border-left-color:
        var(--tk-primary) !important;

    background:
        color-mix(
            in srgb,
            var(--tk-primary) 9%,
            transparent
        ) !important;
}

html[data-theme] .portal-rich-content
:is(th,td),
html[data-theme] .tk-rich-content
:is(th,td) {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
}

html[data-theme] .portal-rich-content th,
html[data-theme] .tk-rich-content th {
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .portal-rich-content details,
html[data-theme] .tk-rich-content details {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}


/* Images */

html[data-theme] .portal-rich-content img,
html[data-theme] .tk-rich-content img {
    box-shadow:
        0 14px 34px rgba(0,0,0,.13) !important;
}


/* =========================================================
   BLOCS DE L'EDITEUR RICHE
   ========================================================= */

html[data-theme] .tk-editor-button-secondary {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .tk-editor-button-primary {
    color: #fff !important;
    background: var(--tk-gradient) !important;
}

html[data-theme] .tk-editor-preview {
    outline-color: var(--tk-border) !important;
}


/* =========================================================
   IDENTIFIANTS CSE / TOTAL WASH
   ========================================================= */

html[data-theme] .tk-page-credentials {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .tk-page-credentials-title {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-credential-row {
    border-color: var(--tk-border) !important;
}

html[data-theme] .tk-credential-caption {
    color: var(--tk-muted) !important;
    opacity: 1 !important;
}

html[data-theme] .tk-credential-row strong {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-credential-button {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
}

html[data-theme] .tk-credential-button:hover {
    color: var(--tk-primary) !important;
    border-color: var(--tk-primary) !important;
}


/* =========================================================
   BOITE MAIL CSE
   ========================================================= */

html[data-theme] .tk-ce-mails {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .tk-ce-mails__head h2,
html[data-theme] .tk-ce-mail__subject {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-ce-mails__head p,
html[data-theme] .tk-ce-mails__status,
html[data-theme] .tk-ce-mail__meta {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-ce-mails__eyebrow {
    color: var(--tk-primary) !important;
}

html[data-theme] .tk-ce-mails__refresh {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
}

html[data-theme] .tk-ce-mail {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
}

html[data-theme] .tk-ce-mail details {
    border-color: var(--tk-border) !important;
}

html[data-theme] .tk-ce-mail summary {
    color: var(--tk-primary) !important;
}

html[data-theme] .tk-ce-mail pre {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}


/* =========================================================
   ACTUALITES - VARIABLES
   ========================================================= */

.tk-news-page,
.tk-article,
.tk-dashboard-news {
    --tk-news-accent: #7c65e8;
    --tk-news-accent-rgb: 124, 101, 232;
}

html[data-theme="light"]
:is(
    .tk-news-page,
    .tk-article,
    .tk-dashboard-news
) {
    --tk-news-accent: #6551c7;
    --tk-news-accent-rgb: 101, 81, 199;
}

html[data-theme="tropical"]
:is(
    .tk-news-page,
    .tk-article,
    .tk-dashboard-news
) {
    --tk-news-accent: #6d59c7;
    --tk-news-accent-rgb: 109, 89, 199;
}

html[data-theme="neon"]
:is(
    .tk-news-page,
    .tk-article,
    .tk-dashboard-news
) {
    --tk-news-accent: #bd55ff;
    --tk-news-accent-rgb: 189, 85, 255;
}


/* =========================================================
   ACTUALITES - LISTE
   ========================================================= */

html[data-theme] .tk-news-page {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-news-hero {
    color: var(--tk-text) !important;

    border-color: var(--tk-border) !important;

    background:
        linear-gradient(
            135deg,
            rgba(var(--tk-news-accent-rgb), .11),
            rgba(38, 170, 200, .055)
        ),
        var(--tk-panel-soft) !important;

    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .tk-news-hero h1 {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-news-kicker {
    color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-news-hero p {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-news-back {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
}

html[data-theme] .tk-news-back:hover {
    color: var(--tk-news-accent) !important;
    border-color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-news-card {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .tk-news-card
:is(h2,h3,strong) {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-news-card p {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-news-card a {
    color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-news-meta {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-news-meta span {
    color: var(--tk-news-accent) !important;

    background:
        rgba(
            var(--tk-news-accent-rgb),
            .11
        ) !important;
}

html[data-theme] .tk-news-empty {
    color: var(--tk-muted) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}


/* =========================================================
   ACTUALITE - ARTICLE
   ========================================================= */

html[data-theme] .tk-article {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-article-back {
    color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-article-hero {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;

    background:
        linear-gradient(
            135deg,
            rgba(var(--tk-news-accent-rgb), .105),
            rgba(62, 145, 220, .045)
        ),
        var(--tk-panel-soft) !important;

    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .tk-article-hero h1 {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-article-meta {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-article-meta span {
    color: var(--tk-news-accent) !important;

    background:
        rgba(
            var(--tk-news-accent-rgb),
            .11
        ) !important;
}

html[data-theme] .tk-article-hero p {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-article-content {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .tk-article-content
:is(h1,h2,h3,h4,strong) {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-article-content a {
    color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-article-content blockquote {
    border-left-color:
        var(--tk-news-accent) !important;

    background:
        rgba(
            var(--tk-news-accent-rgb),
            .085
        ) !important;
}


/* =========================================================
   ACTUALITES SUR L'ACCUEIL
   ========================================================= */

html[data-theme] .tk-dashboard-news {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-news-head span {
    color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-news-head h2 {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-news-head a {
    color: var(--tk-news-accent) !important;
}

html[data-theme] .tk-news-mini {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;

    background:
        linear-gradient(
            145deg,
            rgba(var(--tk-news-accent-rgb), .055),
            transparent
        ),
        var(--tk-panel-soft) !important;

    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .tk-news-mini strong {
    color: var(--tk-text) !important;
}

html[data-theme] .tk-news-mini small,
html[data-theme] .tk-news-mini time {
    color: var(--tk-muted) !important;
}

html[data-theme] .tk-news-mini-type {
    color: var(--tk-news-accent) !important;

    background:
        rgba(
            var(--tk-news-accent-rgb),
            .11
        ) !important;
}


/* Les alertes conservent leur couleur métier. */

html[data-theme] .tk-alert {
    color: #fff !important;
}

html[data-theme] .tk-alert small {
    color: rgba(255,255,255,.82) !important;
}


/* =========================================================
   UNIVERS MUSIQUE
   ========================================================= */

.music-page {
    --tk-music-accent: #16b795;
    --tk-music-accent-strong: #0e9479;
    --tk-music-accent-rgb: 22, 183, 149;

    color: var(--tk-text) !important;
}

html[data-theme="ocean"] .music-page {
    --tk-music-accent: #25d1ad;
    --tk-music-accent-strong: #17b896;
    --tk-music-accent-rgb: 37, 209, 173;
}

html[data-theme="light"] .music-page {
    --tk-music-accent: #0d9279;
    --tk-music-accent-strong: #08725f;
    --tk-music-accent-rgb: 13, 146, 121;
}

html[data-theme="tropical"] .music-page {
    --tk-music-accent: #0a9d83;
    --tk-music-accent-strong: #077863;
    --tk-music-accent-rgb: 10, 157, 131;
}

html[data-theme="neon"] .music-page {
    --tk-music-accent: #27e0bd;
    --tk-music-accent-strong: #16bd9e;
    --tk-music-accent-rgb: 39, 224, 189;
}


/* =========================================================
   MUSIQUE - ELEMENTS COMMUNS
   ========================================================= */

html[data-theme] .music-page
:is(h1,h2,h3,h4,strong) {
    color: var(--tk-text) !important;
}

html[data-theme] .music-page p,
html[data-theme] .music-page small {
    color: var(--tk-muted);
}

html[data-theme] .music-page .page-back-link {
    color: var(--tk-music-accent) !important;
}

html[data-theme] .music-page .music-tabs a {
    color: var(--tk-muted) !important;
    border: 1px solid transparent !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .music-page .music-tabs a:hover {
    color: var(--tk-text) !important;

    border-color:
        rgba(
            var(--tk-music-accent-rgb),
            .28
        ) !important;
}

html[data-theme] .music-page .music-tabs a.active {
    color: var(--tk-text) !important;

    border-color:
        rgba(
            var(--tk-music-accent-rgb),
            .32
        ) !important;

    background:
        rgba(
            var(--tk-music-accent-rgb),
            .11
        ) !important;
}


/* =========================================================
   MUSIQUE - CARTES
   ========================================================= */

html[data-theme] .music-page .music-card {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .music-page .music-card
:is(h2,h3,strong) {
    color: var(--tk-text) !important;
}

html[data-theme] .music-page .music-card p {
    color: var(--tk-muted) !important;
}


/* =========================================================
   MUSIQUE - FORMULAIRES / BOUTONS
   ========================================================= */

html[data-theme] .music-page
:is(input,select,textarea) {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-input) !important;
}

html[data-theme] .music-page
:is(input,textarea)::placeholder {
    color: var(--tk-muted) !important;
}

html[data-theme] .music-page
:is(input,select,textarea):focus {
    border-color: var(--tk-music-accent) !important;

    box-shadow:
        0 0 0 4px
        rgba(
            var(--tk-music-accent-rgb),
            .11
        ) !important;
}

html[data-theme] .music-page
:is(
    .music-button,
    .stats-refresh
) {
    color: #fff !important;

    border-color:
        rgba(
            var(--tk-music-accent-rgb),
            .28
        ) !important;

    background:
        linear-gradient(
            135deg,
            var(--tk-music-accent-strong),
            var(--tk-music-accent)
        ) !important;
}

html[data-theme] .music-page .music-button-danger {
    color: #fff !important;
    background: #c84b59 !important;
}

html[data-theme] .music-page .list-more-button,
html[data-theme] .music-page .artist-results-more {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}


/* =========================================================
   NOUVEAUTES MUSICALES
   ========================================================= */

html[data-theme] .release-check-text,
html[data-theme] .release-check-date,
html[data-theme] .release-details,
html[data-theme] .artist-details,
html[data-theme] .artist-search-type,
html[data-theme] .artist-search-description {
    color: var(--tk-muted) !important;
}

html[data-theme] .release-title,
html[data-theme] .artist-name,
html[data-theme] .artist-search-heading {
    color: var(--tk-text) !important;
}

html[data-theme] .release-item,
html[data-theme] .artist-result,
html[data-theme] .artist-search-result {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .artist-country,
html[data-theme] .section-counter,
html[data-theme] .release-badge {
    color: var(--tk-music-accent-strong) !important;

    background:
        rgba(
            var(--tk-music-accent-rgb),
            .11
        ) !important;
}

html[data-theme] .artist-followed {
    color: #21885a !important;
    background: rgba(34,197,94,.10) !important;
}

html[data-theme] .artist-spotify-link {
    color: var(--tk-music-accent) !important;
}


/* =========================================================
   RADAR PUBLIC
   ========================================================= */

html[data-theme] .radar-page-intro,
html[data-theme] .radar-flash {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .radar-page-intro p,
html[data-theme] .radar-flash p {
    color: var(--tk-muted) !important;
}

html[data-theme]
[class^="public-release-"],
html[data-theme]
[class*=" public-release-"] {
    color: var(--tk-text);
}

html[data-theme] .public-release-card {
    border-color: var(--tk-border) !important;
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .public-release-artist,
html[data-theme] .public-release-meta {
    color: var(--tk-muted) !important;
}

html[data-theme] .public-release-button {
    color: #fff !important;

    background:
        linear-gradient(
            135deg,
            var(--tk-music-accent-strong),
            var(--tk-music-accent)
        ) !important;
}

html[data-theme] .public-release-link {
    color: var(--tk-music-accent) !important;
}

html[data-theme] .public-release-present {
    color: #21885a !important;
    background: rgba(34,197,94,.10) !important;
}


/* =========================================================
   STATISTIQUES MUSIQUE
   ========================================================= */

html[data-theme] .stats-header {
    color: var(--tk-text) !important;
}

html[data-theme] .stats-kpi,
html[data-theme] .stats-period,
html[data-theme] .stats-card {
    color: var(--tk-text) !important;
    border-color: var(--tk-border) !important;
    background: var(--tk-panel) !important;
    box-shadow: var(--tk-shadow-soft) !important;
}

html[data-theme] .stats-kpi-label,
html[data-theme] .stats-kpi-detail,
html[data-theme] .stats-note,
html[data-theme] .stats-list-subtitle,
html[data-theme] .stats-recent-subtitle,
html[data-theme] .stats-recent-time {
    color: var(--tk-muted) !important;
}

html[data-theme] .stats-kpi-value,
html[data-theme] .stats-list-title,
html[data-theme] .stats-recent-title,
html[data-theme] .stats-user-name {
    color: var(--tk-text) !important;
}

html[data-theme] .stats-list-value,
html[data-theme] .stats-user-time {
    color: var(--tk-music-accent) !important;
}

html[data-theme] .stats-rank {
    color: var(--tk-music-accent-strong) !important;

    background:
        rgba(
            var(--tk-music-accent-rgb),
            .11
        ) !important;
}

html[data-theme] .stats-user-row,
html[data-theme] .stats-list-row,
html[data-theme] .stats-recent-row {
    border-color: var(--tk-border) !important;
}

html[data-theme] .stats-user-bar {
    background: var(--tk-panel-soft) !important;
}

html[data-theme] .stats-user-bar > * {
    background:
        linear-gradient(
            90deg,
            var(--tk-music-accent-strong),
            var(--tk-music-accent)
        ) !important;
}

html[data-theme] .stats-error {
    color: #b83e4b !important;
    border-color: rgba(239,68,68,.24) !important;
    background: rgba(239,68,68,.08) !important;
}


/* =========================================================
   CLAIR / TROPICAL : SECURITE DE CONTRASTE
   ========================================================= */

html[data-theme="light"]
:is(
    .portal-rich-content,
    .tk-rich-content,
    .tk-news-page,
    .tk-article,
    .music-page
),
html[data-theme="tropical"]
:is(
    .portal-rich-content,
    .tk-rich-content,
    .tk-news-page,
    .tk-article,
    .music-page
) {
    color: var(--tk-text) !important;
}

html[data-theme="light"]
:is(
    .tk-page-credentials,
    .tk-ce-mails,
    .tk-ce-mail,
    .tk-news-card,
    .tk-article-content,
    .music-card,
    .stats-card,
    .stats-kpi
),
html[data-theme="tropical"]
:is(
    .tk-page-credentials,
    .tk-ce-mails,
    .tk-ce-mail,
    .tk-news-card,
    .tk-article-content,
    .music-card,
    .stats-card,
    .stats-kpi
) {
    box-shadow:
        0 12px 34px rgba(31,62,90,.07) !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {

    html[data-theme] .tk-news-hero {
        align-items: stretch;
        flex-direction: column;
    }

    html[data-theme] .tk-news-mini-grid {
        grid-template-columns: 1fr !important;
    }

    html[data-theme] .tk-article-hero,
    html[data-theme] .tk-article-content {
        padding: 18px !important;
    }

    html[data-theme] .tk-page-credentials {
        padding: 14px !important;
    }

    html[data-theme] .tk-credential-row {
        align-items: stretch;
        flex-direction: column;
    }

    html[data-theme] .tk-credential-actions {
        flex-wrap: wrap;
    }

}
