:root {
    --main-color: #88041a;
    --main-color-opposite: #e0dddd;
    --background-gradient: linear-gradient(120deg, #88041a 0%, #e7365d 100%);
    --text-color-primary: #ffffff;
    --text-color-secondary: rgba(255, 255, 255, 0.82);
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
}

body.home-page {
    background: var(--background-gradient);
}

.auth-text-field {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--main-color-opposite);
    color: var(--text-color-primary);
    border-radius: 0px;
}

.container-home {
    text-align: center;
    color: var(--text-color-primary);
}

.home-page .container-home {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.home-page .btn-group-home {
    margin-top: 0;
}

.crm-main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.crm-main-nav {
    background-color: var(--main-color) !important;
}

.crm-main-nav .nav-link .material-symbols-outlined {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
}

.crm-main-nav .nav-link .nav-link-label {
    display: inline;
}

.crm-main-nav .nav-link.active {
    color: #ffffff;
    font-weight: 700;
}

.crm-main-nav .nav-link.active .nav-link-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nav-item-mobile-only {
    display: none;
}
 
.form-label {
    color: var(--text-color-primary);
    font-weight: 600;
}

.form-text {
    color: var(--text-color-secondary);
}

.form-check-input:checked {
    background-color: var(--main-color);
    border-color: var(--main-color-opposite);
}

.form-check-input:focus {
    border-color: var(--main-color-opposite);
    box-shadow: 0 0 0 0.2rem rgba(136, 4, 26, 0.25);
}

.auth-help-text a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-help-text a:hover,
.auth-help-text a:focus-visible {
    color: #ffe4eb;
    text-decoration-thickness: 2px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-group-home {
    margin-top: 2rem;
}

.btn-home {
    margin: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-radius: 20px;
    width: 110px;
    height: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 3px solid var(--main-color-opposite);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-home .material-symbols-outlined {
    font-size: 36px;      /* taille du picto */
    line-height: 1;
}

/* mobile */
@media (max-width: 767px) {
    .has-auth-nav {
        padding-bottom: 74px;
    }

    .crm-main-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 1030;
        border-bottom: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.22);
    }

    .crm-main-nav .container {
        max-width: 100%;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .crm-main-nav .navbar-brand,
    .crm-main-nav .navbar-toggler,
    .crm-main-nav .d-flex {
        display: none !important;
    }

    .crm-main-nav .navbar-collapse {
        display: block !important;
        flex-basis: auto;
    }

    .crm-main-nav .navbar-nav {
        width: 100%;
        margin: 0 !important;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
    }

    .crm-main-nav .nav-item {
        flex: 1;
        text-align: center;
    }

    .nav-item-mobile-only {
        display: block;
    }

    .crm-main-nav .nav-link {
        padding: 0.5rem 0.25rem;
        position: relative;
        display: inline-flex;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        font-size: 0.7rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .crm-main-nav .nav-link .material-symbols-outlined {
        display: block;
        font-size: 1.05rem;
        line-height: 1;
    }

    .crm-main-nav .nav-link .nav-link-label {
        display: none;
    }

    .crm-main-nav .nav-link.active {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
    }

    .crm-main-nav .nav-link.active .nav-link-label {
        text-decoration: none;
    }

    .crm-main-nav .nav-link.active::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 18%;
        right: 18%;
        height: 3px;
        border-radius: 999px;
        background: #ffffff;
    }

    .btn-home {
        width: 90px;
        height: 90px;
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }

    .btn-home .material-symbols-outlined {
        font-size: 35px;
    }
}

/* Tablette */
@media (min-width: 768px) and (max-width: 1199px) {
    .btn-home {
        padding: 0.7rem 1.5rem;
        font-size: 1.05rem;
        width: 120px;
        height: 120px;
        border-width: 4px;
    }

    .btn-home .material-symbols-outlined {
        font-size: 50px;
    }
}

/* Grand ecran */
@media (min-width: 1200px) {
    .btn-home {
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
        width: 180px;
        height: 180px;
    }

    .btn-home .material-symbols-outlined {
        font-size: 50px;
        line-height: 2;
    }
}

.auth-card {
    background: rgba(13, 13, 13, 0.28);
    backdrop-filter: blur(4px);
}

.profile-card {
    background: rgba(13, 13, 13, 0.28);
    backdrop-filter: blur(4px);
    color: var(--text-color-primary);
}

.profile-title {
    color: var(--text-color-primary);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.profile-subtitle,
.profile-helper {
    color: var(--text-color-secondary);
}

.profile-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
}

.profile-avatar-placeholder {
    color: var(--text-color-primary);
}

.profile-avatar-placeholder .material-symbols-outlined {
    font-size: 3rem;
}

.profile-section-title {
    color: var(--text-color-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.profile-info-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 1.25rem;
}

.profile-info-list {
    display: grid;
    gap: 1rem;
}

.profile-info-list dt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.profile-info-list dd {
    color: var(--text-color-primary);
    margin: 0;
}

.profile-badge-role,
.profile-badge-verified,
.profile-badge-muted {
    border-radius: 999px;
    font-size: 0.82rem;
    padding: 0.45rem 0.8rem;
}

.profile-badge-role {
    background-color: rgba(255, 255, 255, 0.12);
}

.profile-badge-verified {
    background-color: rgba(25, 135, 84, 0.85);
}

.profile-badge-muted {
    background-color: rgba(108, 117, 125, 0.85);
}

.task-badge-overdue {
    background-color: rgba(220, 53, 69, 0.95);
    color: #fff;
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
}

.task-row-overdue {
    background-color: rgba(220, 53, 69, 0.12);
}

.task-mobile-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.task-mobile-card-overdue {
    border-left: 4px solid rgba(220, 53, 69, 0.95);
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.16) 0%, rgba(13, 13, 13, 0.28) 26%);
}

.chat-shell {
    overflow: hidden;
}

.chat-conversation-list .list-group-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.chat-conversation-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chat-last-message {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.chat-unread-badge {
    background: #20c997;
    color: #03231d;
    font-weight: 700;
}

.chat-thread {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    max-height: 58vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message-row {
    display: flex;
}

.chat-message-row-in {
    justify-content: flex-start;
}

.chat-message-row-out {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: min(85%, 560px);
    border-radius: 16px;
    padding: 0.7rem 0.9rem;
}

.chat-bubble-in {
    background: rgba(255, 255, 255, 0.12);
    border-top-left-radius: 6px;
}

.chat-bubble-out {
    background: rgba(32, 201, 151, 0.22);
    border-top-right-radius: 6px;
}

.chat-bubble-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.78);
}

.profile-card .form-control,
.profile-card .form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--main-color-opposite);
    color: var(--text-color-primary);
    border-radius: 0;
}

.profile-card .form-control:focus,
.profile-card .form-select:focus {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-color-primary);
    border-color: var(--main-color-opposite);
    box-shadow: 0 0 0 0.2rem rgba(231, 54, 93, 0.18);
}

.profile-card .form-select option {
    color: #212529;
}

.auth-title {
    color: #ffffff;
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

.auth-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

.auth-link:hover,
.auth-link:focus-visible {
    color: #ffe4eb;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/* Hide any third-party injected Toggle Theme widget. */
[id*="toggle-theme" i],
[class*="toggle-theme" i],
[aria-label*="toggle theme" i],
[title*="toggle theme" i],
[data-testid*="toggle-theme" i] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
