﻿/*:root {
    --dg-primary: #64b763;
    --dg-primary-2: #c05010;
    --dg-secondary: #806030;
    --dg-accent: #d2a260;
    --dg-gold: #f0d090;

    --dg-bg: #4b4036;
    --dg-bg-2: #5a4b3f;
    --dg-surface: #705d4d;
    --dg-surface-2: #806a57;
    --dg-border: rgba(224, 96, 16, 0.18);

    --dg-text: #f0f0f0;
    --dg-text-muted: #ddd4c4;

    --dg-radius: 14px;
    --dg-radius-sm: 10px;
    --dg-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    --dg-shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.2);
}*/

/* Optional day mode (activate with: <html data-theme="day">) */
/*:root[data-theme="day"] {
    --dg-bg: #f0f0f0;
    --dg-bg-2: #ece6da;
    --dg-surface: #fffdf8;
    --dg-surface-2: #f8f3e9;
    --dg-border: rgba(128, 96, 48, 0.24);
    --dg-text: #2f2618;
    --dg-text-muted: #5d4a31;
    --dg-shadow: 0 10px 24px rgba(74, 56, 44, 0.12);
    --dg-shadow-soft: 0 4px 14px rgba(74, 56, 44, 0.1);
}*/

/*:root {
    --dg-primary: #22333B;*/ /* Bleu-gris profond */
    /*--dg-primary-2: #5E503F;*/ /* Brun sombre */
    /*--dg-secondary: #C6AC8F;*/ /* Beige chaud */
    /*--dg-accent: #EAE0D5;*/ /* Crème très clair */
    /*--dg-gold: #C6AC8F;*/ /* Recyclé comme ton doré doux */

    /*--dg-bg: #0A0908;*/ /* Fond très sombre */
    /*--dg-bg-2: #1a1816;*/ /* Variation sombre */
    /*--dg-surface: #22333B;*/ /* Surface froide */
    /*--dg-surface-2: #5E503F;*/ /* Surface chaude */
    /*--dg-border: rgba(198, 172, 143, 0.22);
    --dg-text: #EAE0D5;*/ /* Texte clair */
    /*--dg-text-muted: #C6AC8F;*/ /* Texte adouci */

    /*--dg-radius: 14px;
    --dg-radius-sm: 10px;
    --dg-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    --dg-shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.2);
}
    :root[data-theme="day"] {
        --dg-bg: #EAE0D5;*/ /* Fond crème */
        /*--dg-bg-2: #f3ebe0;
        --dg-surface: #fffdf8;
        --dg-surface-2: #f7f1e8;
        --dg-border: rgba(34, 51, 59, 0.22);
        --dg-primary: #22333B;*/ /* Accent sombre */
        /*--dg-primary-2: #5E503F;
        --dg-secondary: #C6AC8F;
        --dg-accent: #22333B;
        --dg-text: #0A0908;*/ /* Texte très sombre */
        /*--dg-text-muted: #5E503F;
        --dg-shadow: 0 10px 24px rgba(34, 51, 59, 0.12);
        --dg-shadow-soft: 0 4px 14px rgba(34, 51, 59, 0.1);
    }*/

:root {
    --dg-primary: #6BAB90; /* Vert principal */
    --dg-primary-2: #55917F; /* Vert profond / accent */
    --dg-secondary: #5E4C5A; /* Violet-brun sombre */
    --dg-accent: #E1F0C4; /* Vert clair lumineux */
    --dg-gold: #FFE2D1; /* Ton clair chaud */

    --dg-bg: #1A1A1A; /* Fond sombre neutre */
    --dg-bg-2: #222222;
    --dg-surface: #2A2A2A;
    --dg-surface-2: #333333;
    --dg-border: rgba(107, 171, 144, 0.22); /* dérivé du primary */

    --dg-text: #F5F5F5; /* Texte clair */
    --dg-text-muted: #CFCFCF; /* Texte adouci */

    --dg-radius: 14px;
    --dg-radius-sm: 10px;
    --dg-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    --dg-shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.2);
    
}

    :root[data-theme="day"] {
        --dg-bg: #FFE2D1; /* Fond clair chaleureux */
        --dg-bg-2: #FFF1E8;
        --dg-surface: #FFFFFF;
        --dg-surface-2: #F8F4F2;
        --dg-border: rgba(94, 76, 90, 0.22); /* dérivé du secondary */

        --dg-primary: #6BAB90;
        --dg-primary-2: #55917F;
        --dg-secondary: #5E4C5A;
        --dg-accent: #E1F0C4;
        --dg-text: #2A2A2A; /* Texte sombre */
        --dg-text-muted: #5E4C5A;
        --dg-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
        --dg-shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.1);
        
    }



html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Roboto", "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--dg-text);
    background: radial-gradient(1200px 500px at 15% -5%, rgba(224, 96, 16, 0.08), transparent 55%), radial-gradient(900px 500px at 90% 0%, rgba(128, 96, 48, 0.07), transparent 60%), linear-gradient(160deg, var(--dg-bg), var(--dg-bg-2));
}

a {
    color: var(--dg-accent);
}

a:hover {
    color: #f0d090;
}

/* Global MudBlazor surfaces */
.mud-appbar {
    background: linear-gradient(135deg, var(--dg-primary-2), var(--dg-primary)) !important;
    color: var(--dg-text) !important;
    border-bottom: 1px solid rgba(224, 96, 16, 0.32);
    backdrop-filter: blur(4px);
}

.mud-container {
    animation: dg-fade-in .2s ease-out;
}

.mud-paper,
.mud-card {
    border-radius: var(--dg-radius) !important;
    border: 1px solid var(--dg-border) !important;
    /* background: linear-gradient(170deg, rgba(112, 93, 77, 0.78), rgba(95, 79, 66, 0.78)) !important;*/
    background: #5E4C5A !important;
}

.mud-paper .mud-typography,
.mud-card .mud-typography {
    color: #f3efe7 !important;
}

/* Buttons */
.mud-button-root {
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 700 !important;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

    .mud-button-root:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
    }

/*.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--dg-primary-2), var(--dg-primary)) !important;
    box-shadow: 0 8px 18px rgba(140, 74, 47, 0.35);
}

    .mud-button-filled.mud-button-filled-primary .mud-button-label,
    .mud-button-filled.mud-button-filled-secondary .mud-button-label,
    .mud-button-filled.mud-button-filled-info .mud-button-label,
    .mud-button-filled.mud-button-filled-error .mud-button-label {
        color: #ffffff !important;
    }

.mud-button-filled.mud-button-filled-warning .mud-button-label {
    color: #1f1f1f !important;
}

.mud-button-outlined {
    border-color: rgba(224, 96, 16, 0.5) !important;
}*/

.mud-icon-button-root {
    border-radius: 10px !important;
}



/* Correction globale de lisibilité pour tous les MudTextField */
.mud-input-control .mud-input-outlined,
.mud-input-control .mud-input-filled {
    background-color: #ffffff !important;
    border-radius: 12px !important;
}

.mud-input-control .mud-input-slot,
.mud-input-control input,
.mud-input-control textarea {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
}

.mud-input-control .mud-input-label,
.mud-input-control .mud-input-adornment,
.mud-input-control .mud-input-adornment .mud-icon-root {
    color: #000000 !important;
}

.mud-input-control input::placeholder,
.mud-input-control textarea::placeholder {
    color: #555555 !important;
    opacity: 1 !important;
}

.mud-input-control .mud-input-outlined:hover .mud-input-outlined-border,
.mud-input-control.mud-input-focused .mud-input-outlined-border {
    border-color: var(--dg-secondary) !important;
}

/* Disabled state lisible */
.mud-input-control.mud-disabled .mud-input-outlined,
.mud-input-control.mud-disabled .mud-input-filled {
    background-color: #f4efe6 !important;
}

.mud-input-control.mud-disabled input,
.mud-input-control.mud-disabled textarea,
.mud-input-control.mud-disabled .mud-input-slot {
    color: #7a6a56 !important;
}

/* Chips */
.mud-chip {
    border-radius: 999px !important;
    font-weight: 700 !important;
}

.mud-chip-filled.mud-chip-color-primary {
    background: linear-gradient(135deg, #e06010, #c05010) !important;
}

.mud-chip-filled.mud-chip-color-info {
    background: #504020 !important;
}

.mud-chip-filled.mud-chip-color-secondary {
    background: #806030 !important;
}

.mud-chip-filled .mud-chip-content {
    color: #ffffff !important;
}

.mud-chip-filled.mud-chip-color-warning .mud-chip-content {
    color: #2a2208 !important;
}

.mud-chip-outlined {
    background: #f9f2e4 !important;
    border-color: #806030 !important;
}

.mud-chip-outlined .mud-chip-content {
    color: #4a382c !important;
}

/* Tabs */
.mud-tabs-toolbar {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(224, 96, 16, 0.24);
}

.mud-tab {
    text-transform: none !important;
    font-weight: 700 !important;
    min-height: 44px;
    color: #5f6770 !important;
}

.mud-tab.mud-tab-active {
    color: #3a2b22 !important;
    background-color: rgba(210, 162, 96, 0.7) !important;
    border-radius: 10px 10px 0 0;
}

.mud-tabs-slider {
    height: 3px !important;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--dg-secondary), var(--dg-gold)) !important;
}

/* Tables */
.mud-table-root {
    border-radius: var(--dg-radius-sm);
}

.mud-table-container {
    border-radius: var(--dg-radius-sm);
}

.mud-table-head .mud-table-cell {
    background: rgba(224, 96, 16, 0.4) !important;
    color: #fff5ea !important;
    font-weight: 700 !important;
}

.mud-table-body .mud-table-row:hover {
    background: rgba(210, 162, 96, 0.18) !important;
}

.mud-table-pagination {
    border-top: 1px solid rgba(128, 96, 48, 0.24);
}

/* Dialog (clair, opaque, texte sombre) */
.mud-dialog {
    border-radius: 16px !important;
    border: 1px solid rgba(128, 96, 48, 0.28) !important;
    background: linear-gradient(170deg, #fffaf2, #f5ead9) !important;
    opacity: 1 !important;
    color: #2f2618 !important;
}

.mud-dialog-title,
.mud-dialog-title .mud-typography {
    color: #2f2618 !important;
    font-weight: 700 !important;
}

.mud-dialog-content {
    background-color: #fffdf8 !important;
    color: #2f2618 !important;
}

.mud-dialog-actions {
    background-color: #f8f1e6 !important;
}

.mud-dialog .mud-button-close,
.mud-dialog .mud-button-close .mud-icon-root,
.mud-dialog .mud-dialog-title .mud-icon-button,
.mud-dialog .mud-dialog-title .mud-icon-button .mud-icon-root {
    color: #4a382c !important;
}

/* Dialog inputs: texte sombre lisible */

.dgdialog .mud-input-control .mud-input-outlined, .dgdialog .mud-input-control .mud-input-filled {
    background-color: #fffdf8 !important;
}

.dgdialog .mud-input-control .mud-input-label,
.dgdialog .mud-input-control .mud-input-adornment,
.dgdialog .mud-input-control .mud-input-adornment .mud-icon-root {
    color: #4a382c !important;
}

.dgdialog .mud-input-control input,
.dgdialog .mud-input-control textarea,
.dgdialog .mud-input-control .mud-input-slot {
    color: #2f2618 !important;
    -webkit-text-fill-color: #2f2618 !important;
    caret-color: #2f2618 !important;
}

.dgdialog .mud-input-control input::placeholder,
.dgdialog .mud-input-control textarea::placeholder {
    color: #8a7a63 !important;
    opacity: 1 !important;
}

.mud-progress-circular circle {
    stroke: var(--dg-secondary) !important;
}

hr,
.mud-divider {
    border-color: rgba(128, 96, 48, 0.24) !important;
}

/* Markdown help dialogs */
.markdown-container {
    font-family: "Roboto", "Montserrat", "Helvetica", "Arial", sans-serif !important;
    font-size: 1.02rem !important;
    line-height: 1.7 !important;
    color: #2f2618 !important;
}

.markdown-container h1,
.markdown-container h2,
.markdown-container h3,
.markdown-container h4,
.markdown-container h5,
.markdown-container h6 {
    margin-top: 1rem;
    margin-bottom: .5rem;
    color: #2f2618 !important;
}

.markdown-container p,
.markdown-container li,
.markdown-container span,
.markdown-container strong,
.markdown-container em {
    color: #3a2b22 !important;
}

.markdown-container a {
    color: #8c4a2f !important;
    text-decoration: underline;
}

.markdown-container ul {
    padding-left: 1.25rem;
}

.markdown-container code {
    background: #efe3d2 !important;
    color: #2f2618 !important;
    padding: 0 .25rem;
    border-radius: 4px;
}

.markdown-container pre {
    background: #f3e9db !important;
    color: #2f2618 !important;
    border: 1px solid rgba(128, 96, 48, 0.24);
    border-radius: 8px;
    padding: .75rem;
}

@keyframes dg-fade-in {
    from {
        opacity: .7;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dgdialog {
    --mud-input-background: #fffdf8;
    --mud-input-border-color: rgba(128, 96, 48, 0.24);
    --mud-input-focus-border-color: var(--dg-secondary);
    --mud-input-color: #2f2618;
}

.dgdialog .mud-input-control .mud-input-label,
.dgdialog .mud-input-control .mud-input-adornment,
.dgdialog .mud-input-control .mud-input-adornment .mud-icon-root {
    color: #4a382c !important;
}

.dgdialog .mud-input-control input,
.dgdialog .mud-input-control textarea,
.dgdialog .mud-input-control .mud-input-slot {
    color: #2f2618 !important;
    -webkit-text-fill-color: #2f2618 !important;
    caret-color: #2f2618 !important;
}

.dgdialog .mud-input-control input::placeholder,
.dgdialog .mud-input-control textarea::placeholder {
    color: #8a7a63 !important;
    opacity: 1 !important;
}

/* Variante ciblée : search-textfield en fond dark + texte blanc */
.search-textfield .mud-input-outlined,
.search-textfield .mud-input-filled {
    background-color: #2f2618 !important;
    border-radius: 12px !important;
}

.search-textfield .mud-input-outlined-border {
    border-color: rgba(240, 208, 144, 0.45) !important;
}

.search-textfield .mud-input-slot,
.search-textfield input,
.search-textfield textarea {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
}

.search-textfield .mud-input-label,
.search-textfield .mud-input-adornment,
.search-textfield .mud-input-adornment .mud-icon-root {
    color: #ffffff !important;
}

.search-textfield input::placeholder,
.search-textfield textarea::placeholder {
    color: #ddd4c4 !important;
    opacity: 1 !important;
}

.search-textfield .mud-input-outlined:hover .mud-input-outlined-border,
.search-textfield.mud-input-focused .mud-input-outlined-border {
    border-color: #f0d090 !important;
}

