html,
body,
#layout-content {
    min-height: 100%;
    background-color: transparent !important;
}

body {
    background-image: url('/images/background-tech.jpg') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

#layout-content {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#login-form {
    background: rgba(255,255,255,0.88) !important;
    padding: 28px !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 35px rgba(0,0,0,0.35) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#logo {
    display: block;
    margin: 0 auto 20px auto;
}

#login-footer {
    color: #111111 !important;
}

.darhfaust-forgot-password {
    margin-top: 12px;
    text-align: center;
}

.darhfaust-forgot-password a {
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.darhfaust-forgot-password a:hover,
.darhfaust-forgot-password a:focus {
    text-decoration: underline;
}

/* Corps des messages : lecture claire sur fond photo */
#messagebody,
.message-part,
.message-htmlpart,
.message-part-wrapper,
#compose-content,
.mce-content-body,
iframe {
    background: #ffffff !important;
    color: #111111 !important;
}

/* Encadrement lisible des zones de lecture/rédaction */
#messagebody,
.message-part,
.message-part-wrapper,
#compose-content {
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
}

/* Bouton clair / sombre pour les messages */
#darhfaust-message-theme-toggle {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 9999;
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.92);
    color: #111111;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
}

/* Mode sombre pour lecture / rédaction */
body.darhfaust-message-dark #messagebody,
body.darhfaust-message-dark #messagebody *,
body.darhfaust-message-dark #compose-content,
body.darhfaust-message-dark .mce-content-body {
    background: #151515 !important;
    color: #f5f5f5 !important;
}

body.darhfaust-message-dark #darhfaust-message-theme-toggle {
    background: #151515;
    color: #ffffff;
}

/* =========================
   PAGE D'ACCUEIL DARHFAUST
   ========================= */

#darhfaust-home {
    width: 100%;
    min-height: 100vh;
    padding: 18px;
    box-sizing: border-box;
}

.darhfaust-topbar {
    max-width: 1600px;
    margin: 0 auto 18px auto;
    background: rgba(7, 20, 38, 0.94);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.30);
    overflow: hidden;
}

.darhfaust-topbar-title {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .5px;
    background: rgba(23,104,169,.95);
}

.darhfaust-ticker {
    padding: 12px 16px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.darhfaust-home-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(380px, 1fr) minmax(280px, 340px);
    gap: 22px;
    align-items: start;
}

.darhfaust-side {
    background: rgba(255,255,255,.93);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.30);
    overflow: hidden;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.darhfaust-widget-title {
    background: #081426;
    color: #fff;
    padding: 14px 16px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .5px;
}

.darhfaust-section-title {
    padding: 12px 14px 8px;
    font-weight: 800;
    color: #1768a9;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.darhfaust-ranking-title {
    margin-top: 10px;
}

.darhfaust-widget-content {
    padding: 12px 14px;
    color: #111;
    font-size: 14px;
    line-height: 1.4;
}

.darhfaust-news-focus {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #1768a9;
    background: rgba(23,104,169,.08);
}

.darhfaust-login-center {
    min-width: 0;
}

.darhfaust-login-center #layout-content {
    width: 100% !important;
    max-width: 620px;
    margin: 0 auto;
}

.darhfaust-login-center #login-form {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .darhfaust-home-grid {
        grid-template-columns: 1fr;
    }

    .darhfaust-login-center {
        order: -1;
    }

    .darhfaust-side {
        max-height: none;
    }
}

@media (max-width: 600px) {
    #darhfaust-home {
        padding: 8px;
    }

    .darhfaust-home-grid {
        gap: 12px;
    }

    .darhfaust-topbar {
        margin-bottom: 12px;
    }
}

/* Empilement des widgets latéraux */
.darhfaust-side-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

/* Chaque bloc latéral garde sa propre hauteur */
.darhfaust-side-stack .darhfaust-side {
    max-height: none;
    overflow: hidden;
}

/* Ligue 1 / Champions League */
.darhfaust-football,
.darhfaust-champions {
    min-height: 300px;
}

/* Actualités Afrique / Cyber */
.darhfaust-news,
.darhfaust-cyber {
    min-height: 300px;
}

/* Contenu défilable à l'intérieur des cadres */
.darhfaust-football .darhfaust-widget-content,
.darhfaust-champions .darhfaust-widget-content,
.darhfaust-news .darhfaust-widget-content,
.darhfaust-cyber .darhfaust-widget-content {
    max-height: 260px;
    overflow-y: auto;
}

/* Centre toujours aligné en haut */
.darhfaust-login-center {
    padding-top: 125px;
}

/* Grand écran */
@media (min-width: 1400px) {
    .darhfaust-home-grid {
        grid-template-columns: 360px minmax(420px, 1fr) 360px;
        gap: 28px;
    }

    .darhfaust-football,
    .darhfaust-champions,
    .darhfaust-news,
    .darhfaust-cyber {
        min-height: 320px;
    }
}

/* Écrans intermédiaires */
@media (max-width: 1399px) and (min-width: 1101px) {
    .darhfaust-home-grid {
        grid-template-columns: 320px minmax(380px, 1fr) 320px;
        gap: 18px;
    }

    .darhfaust-login-center {
        padding-top: 90px;
    }
}

/* Mobile / tablette */
@media (max-width: 1100px) {
    .darhfaust-side-stack {
        gap: 12px;
    }

    .darhfaust-login-center {
        padding-top: 0;
    }
}

/* Restauration position initiale du logo et du formulaire */
.darhfaust-login-center {
    padding-top: 0 !important;
}

.darhfaust-login-center #layout-content {
    max-width: 620px;
    margin: 0 auto;
}

.darhfaust-login-center #logo {
    margin: 0 auto 20px auto !important;
}

.darhfaust-login-center #login-form {
    margin-top: 0 !important;
}

/* Remonte le bloc central */
@media (min-width: 1101px) {
    .darhfaust-login-center {
        transform: translateY(-55px);
    }
}

/* =========================
   PERSONNALISATION DASHBOARD
   ========================= */

#darhfaust-customize-bar {
    max-width: 1600px;
    margin: 0 auto 10px auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

#darhfaust-customize-bar button {
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255,255,255,.94);
    color: #111;
    box-shadow: 0 3px 10px rgba(0,0,0,.22);
}

body.darhfaust-customize-mode .darhfaust-movable-widget {
    outline: 2px dashed #1768a9;
    outline-offset: 3px;
    cursor: move;
    user-select: none;
}

body.darhfaust-customize-mode .darhfaust-movable-widget::before {
    content: "↕ Déplacer";
    display: block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: #1768a9;
    text-align: center;
}

.darhfaust-dragging {
    opacity: .55;
}

.darhfaust-widget-hidden {
    display: none !important;
}

/* Logo et connexion : jamais déplaçables */
.darhfaust-login-center,
.darhfaust-login-center #layout-content,
.darhfaust-login-center #logo,
.darhfaust-login-center #login-form {
    cursor: default !important;
}

/* =========================
   CLASSEMENT TYPE EUROSPORT
   ========================= */

#ligue1-standings {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
}

.darhfaust-standings-table {
    width: 100%;
    font-size: 12px;
}

.darhfaust-standing-row {
    display: grid;
    grid-template-columns: 28px minmax(120px, 1fr) 32px 28px 28px 28px 38px;
    align-items: center;
    gap: 4px;
    min-height: 34px;
    padding: 3px 8px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.darhfaust-standing-row:nth-child(even):not(.darhfaust-standing-header) {
    background: rgba(0,0,0,.025);
}

.darhfaust-standing-header {
    position: sticky;
    top: 0;
    z-index: 3;
    min-height: 30px;
    background: #e8edf2;
    color: #1b4f77;
    font-weight: 800;
    border-bottom: 1px solid rgba(0,0,0,.16);
}

.darhfaust-standing-header span:not(:nth-child(2)),
.darhfaust-standing-row > span:not(.darhfaust-standing-team) {
    text-align: center;
}

.darhfaust-standing-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    overflow: hidden;
}

.darhfaust-standing-team > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.darhfaust-team-crest {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 22px;
}

.darhfaust-standing-pos {
    font-weight: 700;
}

.darhfaust-standing-points {
    font-weight: 900;
}

/* =========================
   PROCHAINS MATCHS HORIZONTAL
   ========================= */

#ligue1-next-content {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
}

.darhfaust-ticker-track {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 34px;
    animation: darhfaustTicker 34s linear infinite;
    will-change: transform;
}

#ligue1-next-content:hover .darhfaust-ticker-track {
    animation-play-state: paused;
}

.darhfaust-ticker-item {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700;
    padding-right: 12px;
}

.darhfaust-ticker-item::after {
    content: "  •";
    margin-left: 24px;
    opacity: .45;
}

@keyframes darhfaustTicker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Empêche le widget Ligue 1 de pousser les autres cadres */
.darhfaust-football {
    overflow: hidden !important;
}

.darhfaust-football #ligue1-results {
    max-height: 145px;
    overflow-y: auto;
}

@media (max-width: 1100px) {
    #ligue1-standings {
        max-height: 320px;
    }

    .darhfaust-standing-row {
        grid-template-columns: 26px minmax(105px, 1fr) 30px 26px 26px 26px 34px;
        font-size: 11px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .darhfaust-team-crest {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }
}

/* =========================
   DERNIERS RESULTATS LIGUE 1
   ========================= */

#ligue1-results {
    padding: 4px 8px !important;
}

.darhfaust-result-row {
    display: grid;
    grid-template-columns: minmax(95px,1fr) 52px minmax(95px,1fr);
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.darhfaust-result-team {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-weight: 600;
}

.darhfaust-result-home {
    justify-content: flex-start;
}

.darhfaust-result-away {
    justify-content: flex-end;
    text-align: right;
}

.darhfaust-result-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.darhfaust-result-crest {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain;
    flex: 0 0 22px;
}

.darhfaust-result-score {
    text-align: center;
    font-weight: 900;
    font-size: 13px;
    white-space: nowrap;
}

/* =========================
   SCROLL PAGE D'ACCUEIL
   ========================= */

html,
body {
    min-height: 100%;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

#darhfaust-home {
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 40px;
}

.darhfaust-home-grid {
    overflow: visible !important;
}


/* =========================
   CHAMPIONS LEAGUE
   ========================= */

.darhfaust-champions {
    overflow: hidden !important;
}

.darhfaust-champions #ucl-results {
    max-height: 145px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px !important;
}

.darhfaust-champions #ucl-standings {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
}

.darhfaust-champions .darhfaust-standings-table {
    width: 100%;
}

@media (max-width: 1100px) {
    .darhfaust-champions #ucl-standings {
        max-height: 320px;
    }
}

/* =========================
   6 LIGNES VISIBLES PUIS SCROLL
   ========================= */

/* Résultats : 6 matchs visibles */
#ligue1-results,
#ucl-results {
    max-height: 222px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Classements : entête + 6 équipes visibles */
#ligue1-standings,
#ucl-standings {
    max-height: 246px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Hauteur régulière des lignes */
.darhfaust-result-row {
    min-height: 34px;
}

.darhfaust-standing-row {
    min-height: 34px;
}

/* Conserve l'entête du classement visible pendant le scroll */
.darhfaust-standing-header {
    position: sticky;
    top: 0;
    z-index: 5;
}

/* =========================
   LOGOS DANS LE TICKER MATCHS
   ========================= */

.darhfaust-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
}

.darhfaust-ticker-team {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.darhfaust-ticker-crest {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain;
    flex: 0 0 20px;
}

.darhfaust-ticker-date {
    font-weight: 700;
    opacity: .8;
}

.darhfaust-ticker-vs {
    opacity: .65;
    font-weight: 700;
}

/* =========================
   BADGES COMPETITIONS TICKER
   ========================= */

.darhfaust-ticker-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .4px;
    background: rgba(23,104,169,.12);
    border: 1px solid rgba(23,104,169,.35);
    color: #1768a9;
    flex: 0 0 auto;
}

/* Masquer le bouton clair/sombre uniquement sur la page de connexion */
body.task-login #darhfaust-message-theme-toggle,
body.login-page #darhfaust-message-theme-toggle,
body:not(.task-mail):not(.task-settings):not(.task-addressbook) #darhfaust-message-theme-toggle {
    display: none !important;
}

/* Amélioration des blocs actualités */
#darhfaust-news-content,
#darhfaust-cyber-content {
    max-height: 330px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 8px 10px;
    background: rgba(255,255,255,.96);
}

.darhfaust-news-item {
    display: block;
    padding: 10px 8px;
    margin: 0 0 6px;
    border-radius: 8px;
    text-decoration: none !important;
    background: rgba(247,249,252,.98);
    border: 1px solid rgba(23,104,169,.12);
    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

.darhfaust-news-item:hover {
    background: #ffffff;
    border-color: rgba(23,104,169,.30);
    transform: translateY(-1px);
}

.darhfaust-news-title {
    color: #182433;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
}

.darhfaust-news-meta {
    color: #718096;
    font-size: 11px;
    font-weight: 600;
}

#darhfaust-news-content::-webkit-scrollbar,
#darhfaust-cyber-content::-webkit-scrollbar {
    width: 6px;
}

#darhfaust-news-content::-webkit-scrollbar-thumb,
#darhfaust-cyber-content::-webkit-scrollbar-thumb {
    background: rgba(23,104,169,.35);
    border-radius: 10px;
}

#darhfaust-news-content::-webkit-scrollbar-track,
#darhfaust-cyber-content::-webkit-scrollbar-track {
    background: transparent;
}

/* Cartes actualités avec miniature */
.darhfaust-news-item {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
}

.darhfaust-news-thumb {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(23,104,169,.10);
}

.darhfaust-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.darhfaust-news-text {
    flex: 1 1 auto;
    min-width: 0;
}

.darhfaust-news-title {
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.darhfaust-news-meta {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================
   MODE SOMBRE GLOBAL DARHFAUST
   ========================= */

body.darhfaust-message-dark {
    background: #111827 !important;
    color: #e5e7eb !important;
}

body.darhfaust-message-dark #layout,
body.darhfaust-message-dark #layout-sidebar,
body.darhfaust-message-dark #layout-list,
body.darhfaust-message-dark #layout-content,
body.darhfaust-message-dark .listing,
body.darhfaust-message-dark .scroller,
body.darhfaust-message-dark .content,
body.darhfaust-message-dark .footer,
body.darhfaust-message-dark .toolbar,
body.darhfaust-message-dark .menu,
body.darhfaust-message-dark .boxcontent,
body.darhfaust-message-dark .boxfooter,
body.darhfaust-message-dark .preferences-frame,
body.darhfaust-message-dark .contactlist,
body.darhfaust-message-dark .messagelist {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

body.darhfaust-message-dark table,
body.darhfaust-message-dark tbody,
body.darhfaust-message-dark tr,
body.darhfaust-message-dark td,
body.darhfaust-message-dark th {
    color: #e5e7eb !important;
}

body.darhfaust-message-dark .listing li,
body.darhfaust-message-dark .listing tbody tr,
body.darhfaust-message-dark .messagelist tbody tr {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}

body.darhfaust-message-dark .listing li:hover,
body.darhfaust-message-dark .listing tbody tr:hover,
body.darhfaust-message-dark .messagelist tbody tr:hover {
    background-color: #273549 !important;
}

body.darhfaust-message-dark .listing .selected,
body.darhfaust-message-dark .messagelist .selected {
    background-color: #374151 !important;
}

body.darhfaust-message-dark input,
body.darhfaust-message-dark select,
body.darhfaust-message-dark textarea {
    background: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #4b5563 !important;
}

body.darhfaust-message-dark a {
    color: #93c5fd;
}

body.darhfaust-message-dark .btn,
body.darhfaust-message-dark button:not(#darhfaust-message-theme-toggle) {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #4b5563 !important;
}

body.darhfaust-message-dark #darhfaust-message-theme-toggle {
    background: #f9fafb !important;
    color: #111827 !important;
}

/* Garder le fond d'écran visible en mode sombre */
body.darhfaust-message-dark {
    background-color: transparent !important;
}

body.darhfaust-message-dark #layout,
body.darhfaust-message-dark #layout-sidebar,
body.darhfaust-message-dark #layout-list,
body.darhfaust-message-dark #layout-content {
    background-color: rgba(17, 24, 39, 0.88) !important;
}

/* Texte très clair en mode sombre */
body.darhfaust-message-dark,
body.darhfaust-message-dark #layout,
body.darhfaust-message-dark #layout *,
body.darhfaust-message-dark .listing *,
body.darhfaust-message-dark .messagelist *,
body.darhfaust-message-dark .contactlist *,
body.darhfaust-message-dark .content *,
body.darhfaust-message-dark .boxcontent *,
body.darhfaust-message-dark .preferences-frame * {
    color: #ffffff !important;
}

/* Liens : bleu très clair pour rester visibles */
body.darhfaust-message-dark a {
    color: #bfdbfe !important;
}

/* Textes secondaires */
body.darhfaust-message-dark .text-muted,
body.darhfaust-message-dark .secondary,
body.darhfaust-message-dark .description,
body.darhfaust-message-dark small {
    color: #e5e7eb !important;
}

/* Champs de saisie */
body.darhfaust-message-dark input,
body.darhfaust-message-dark textarea,
body.darhfaust-message-dark select {
    color: #ffffff !important;
}

/* Placeholder */
body.darhfaust-message-dark input::placeholder,
body.darhfaust-message-dark textarea::placeholder {
    color: #d1d5db !important;
    opacity: 1 !important;
}

/* Corriger le mode sombre pour conserver l'image de fond */
body.darhfaust-message-dark #layout,
body.darhfaust-message-dark #layout-content {
    background: transparent !important;
}

body.darhfaust-message-dark #layout-sidebar,
body.darhfaust-message-dark #layout-list {
    background-color: rgba(17, 24, 39, 0.92) !important;
}

/* Restaurer l'image de fond DARHFAUST en mode sombre */
body.darhfaust-message-dark {
    background-color: transparent !important;
    background-image: url('/images/background-tech.jpg') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

/* Transparence de la zone de prévisualisation pour laisser voir le fond DARHFAUST */
body.darhfaust-message-dark #layout-content .iframe-wrapper,
body.darhfaust-message-dark #messagecontframe {
    background: transparent !important;
    background-color: transparent !important;
}

/* =========================
   CORRECTION SOMBRE GLOBALE
   ========================= */

/* Bandeaux supérieurs totalement sombres */
body.darhfaust-message-dark #layout > div > .header,
body.darhfaust-message-dark #layout-list > .header,
body.darhfaust-message-dark #layout-sidebar > .header,
body.darhfaust-message-dark #layout-content > .header,
body.darhfaust-message-dark .toolbar,
body.darhfaust-message-dark .menu.toolbar,
body.darhfaust-message-dark .searchbar {
    background: #111827 !important;
    background-color: #111827 !important;
    border-color: #374151 !important;
    color: #ffffff !important;
}

/* Titres, boutons et icônes des bandeaux en blanc */
body.darhfaust-message-dark #layout > div > .header *,
body.darhfaust-message-dark .toolbar *,
body.darhfaust-message-dark .menu.toolbar *,
body.darhfaust-message-dark .searchbar *,
body.darhfaust-message-dark .header-title,
body.darhfaust-message-dark .header a,
body.darhfaust-message-dark .header button {
    color: #ffffff !important;
}

/* Zones iframe transparentes : Courrier, Contacts, Paramètres, etc. */
body.darhfaust-message-dark .iframe-wrapper,
body.darhfaust-message-dark .iframe-wrapper iframe,
body.darhfaust-message-dark #messagecontframe {
    background: transparent !important;
    background-color: transparent !important;
}

/* Zone de contenu générale transparente pour garder le même fond partout */
body.darhfaust-message-dark #layout-content,
body.darhfaust-message-dark #layout-content > .content,
body.darhfaust-message-dark #layout-content > .formcontent {
    background: transparent !important;
    background-color: transparent !important;
}

/* Panneaux fonctionnels sombres, sans masquer le fond principal */
body.darhfaust-message-dark #layout-sidebar,
body.darhfaust-message-dark #layout-list {
    background: rgba(17, 24, 39, 0.94) !important;
}

/* =========================
   MODE CLAIR GLOBAL DARHFAUST
   ========================= */

/* Conserver le fond d'écran sur toutes les vues */
body:not(.darhfaust-message-dark),
body:not(.darhfaust-message-dark) #layout,
body:not(.darhfaust-message-dark) #layout-content,
body:not(.darhfaust-message-dark) #layout-content > .content,
body:not(.darhfaust-message-dark) #layout-content > .formcontent,
body:not(.darhfaust-message-dark) .iframe-wrapper,
body:not(.darhfaust-message-dark) .iframe-wrapper iframe,
body:not(.darhfaust-message-dark) #messagecontframe {
    background-color: transparent !important;
}

/* Panneaux principaux clairs et légèrement transparents */
body:not(.darhfaust-message-dark) #layout-sidebar,
body:not(.darhfaust-message-dark) #layout-list,
body:not(.darhfaust-message-dark) .listing,
body:not(.darhfaust-message-dark) .scroller,
body:not(.darhfaust-message-dark) .boxcontent,
body:not(.darhfaust-message-dark) .preferences-frame,
body:not(.darhfaust-message-dark) .contactlist,
body:not(.darhfaust-message-dark) .messagelist {
    background: rgba(255,255,255,0.94) !important;
}

/* Bandeaux supérieurs clairs homogènes */
body:not(.darhfaust-message-dark) #layout > div > .header,
body:not(.darhfaust-message-dark) #layout-list > .header,
body:not(.darhfaust-message-dark) #layout-sidebar > .header,
body:not(.darhfaust-message-dark) #layout-content > .header,
body:not(.darhfaust-message-dark) .toolbar,
body:not(.darhfaust-message-dark) .menu.toolbar,
body:not(.darhfaust-message-dark) .searchbar {
    background: rgba(255,255,255,0.96) !important;
    border-color: #d4dbde !important;
}

/* Fond du document de prévisualisation */
body:not(.darhfaust-message-dark) #messagecontframe {
    background: transparent !important;
}

/* =========================
   MENU GAUCHE LISIBLE EN MODE CLAIR
   ========================= */

body:not(.darhfaust-message-dark) #layout-menu,
body:not(.darhfaust-message-dark) #taskmenu,
body:not(.darhfaust-message-dark) #taskmenu .special-buttons,
body:not(.darhfaust-message-dark) #taskmenu .action-buttons {
    background: #2f3a3f !important;
    background-color: #2f3a3f !important;
}

/* Texte et icônes blancs */
body:not(.darhfaust-message-dark) #taskmenu a,
body:not(.darhfaust-message-dark) #taskmenu a:before,
body:not(.darhfaust-message-dark) #taskmenu span.inner {
    color: #ffffff !important;
}

/* Élément sélectionné */
body:not(.darhfaust-message-dark) #taskmenu a.selected {
    background: #45555c !important;
    color: #ffffff !important;
}

/* Survol */
body:not(.darhfaust-message-dark) #taskmenu a:hover {
    background: #45555c !important;
    color: #ffffff !important;
}

/* Rédiger conserve son bleu */
body:not(.darhfaust-message-dark) #taskmenu a.compose,
body:not(.darhfaust-message-dark) #taskmenu a.compose:before {
    color: #37beff !important;
}

/* Déconnexion reste rouge */
body:not(.darhfaust-message-dark) #taskmenu a.logout,
body:not(.darhfaust-message-dark) #taskmenu a.logout:before {
    color: #ff5552 !important;
}
