@import url("./tokens.css");
@import url("./base.css");
@import url("./bootstrap-overrides.css");
@import url("./utilities.css");
@import url("./components/buttons.css");
@import url("./components/cards.css");
@import url("./components/badges.css");
@import url("./components/metrics.css");
@import url("./components/page-header.css");
@import url("./components/filters.css");
@import url("./components/forms.css");
@import url("./components/document-list.css");
@import url("./components/responsive.css?v=20261128-calendar-creation-v1");
@import url("./pages/dossier-reference.css");
@import url("./pages/dashboard.css");
@import url("./pages/dossiers.css");
@import url("./pages/files.css?v=20261124-directory-badges-v1");
@import url("./pages/search.css");
@import url("./pages/projects.css?v=20261004-location-v1");
@import url("./pages/resources.css");
@import url("./pages/activities.css");
@import url("./pages/checklists.css?v=20261123-project-cards-v1");
@import url("./pages/contacts.css?v=contactsMobileCardsV3");
@import url("./pages/activity-types-admin.css");
@import url("./pages/planning-queue.css");
@import url("./pages/photos-library.css?v=20261124-camera-gallery-v1");

        .app-navbar {
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.98));
            border: 1px solid rgba(148, 163, 184, .18);
            box-shadow: 0 18px 50px rgba(0, 0, 0, .38);
        }

        .app-navbar .navbar-brand,
        .app-navbar .nav-link {
            color: #f8fafc;
            background: transparent;
        }
        .app-navbar .navbar-brand img {
            width: 130px;
            height: auto;
        }
        .app-navbar .navbar-brand {
            letter-spacing: 0;
        }

        .app-menu {
            display: flex;
            flex-direction: column;
            gap: 0;
            width: 100%;
        }

        .app-navbar .nav-section {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 18px 0 16px;
            border-top: 1px solid rgba(148, 163, 184, .2);
        }

        .app-navbar .nav-section:first-child {
            border-top: 0;
            padding-top: 10px;
        }

        .app-navbar .nav-section-title {
            color: rgba(203, 213, 225, .72);
            font-size: .78rem;
            font-weight: 800;
            letter-spacing: .06em;
            line-height: 1;
            text-transform: uppercase;
            padding: 0 10px;
            white-space: nowrap;
        }

        .app-navbar .nav-section-content {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-left: .45rem;
        }

        .app-navbar .nav-link {
            position: relative;
            display: flex;
            align-items: center;
            gap: .65rem;
            min-height: 38px;
            border-radius: 8px;
            padding: .5rem .75rem .5rem .95rem;
            color: rgba(248, 250, 252, .9);
            font-size: .93rem;
            font-weight: 500;
            line-height: 1.2;
            opacity: 1;
            text-decoration: none;
            white-space: nowrap;
        }

        .app-navbar .nav-link i {
            width: 1rem;
            flex-shrink: 0;
            color: rgba(226, 232, 240, .95);
            font-size: .98rem;
            line-height: 1;
            text-align: center;
        }
        
        .app-navbar .nav-link:hover {
            background: rgba(148, 163, 184, .1);
            color: #ffffff;
        }

        .app-navbar .nav-link.active {
            background: linear-gradient(90deg, rgba(80, 80, 80, .25), rgba(150, 150, 150, .25));
            color: #ffffff;
            font-weight: 800;
        }

        .app-navbar .nav-link.active::before {
            content: '';
            position: absolute;
            top: 7px;
            bottom: 7px;
            left: 0;
            width: 4px;
            border-radius: 0 999px 999px 0;
            background: #03d72a;
        }

        .app-navbar .nav-link.active i {
            color: #03d72a;
        }

        .app-navbar .nav-label {
            color: rgba(248, 250, 252, .86);
            cursor: default;
        }

        .app-navbar .nav-label:hover {
            background: transparent;
            color: rgba(248, 250, 252, .86);
        }

        .app-shell {
            padding-top: 28px;
            padding-bottom: 48px;
        }






        .action-bar {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .admin-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* BOUTONS - compatibility layer until Phase 2 extraction */

        .btn {
            border-radius: 10px;
            font-weight: 600;
        }

        .btn-sm {
            border-radius: 8px;
        }

        .btn-primary {
            background: #111827 !important;
            border-color: #111827 !important;
            color: #ffffff !important;
        }

        .btn-primary:hover,
        .btn-primary:focus {
            background: #1f2937 !important;
            border-color: #1f2937 !important;
            color: #ffffff !important;
        }

        .btn-outline-primary {
            color: #111827 !important;
            border-color: #111827 !important;
        }

        .btn-outline-primary:hover,
        .btn-outline-primary:focus {
            background: #111827 !important;
            border-color: #111827 !important;
            color: #ffffff !important;
        }

        .table {
            border-color: var(--border);
        }

        .table th {
            width: 42%;
            background: #f8fafc;
        }

        .badge-soft {
            background: #eaf3ff;
            color: #0f3f7a;
            border-radius: 999px;
            font-size: 0.8rem;
            padding: 0.35rem 0.65rem;
        }

        .muted-small {
            color: var(--muted);
            font-size: 0.9rem;
        }


        .main-photo-thumb {
            height: 360px;
            width: 100%;
            object-fit: cover;
            border-radius: 18px;
        }

        .photo-thumb {
            height: 180px;
            width: 100%;
            object-fit: cover;
            border-radius: 14px;
        }

        @media (max-width: 768px) {
            .app-navbar .container {
                gap: 14px;
            }

            .navbar-top {
                width: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .action-bar {
                align-items: stretch;
            }

            .action-bar > a,
            .admin-actions,
            .admin-actions a {
                width: 100%;
            }

            .admin-actions {
                display: grid;
                grid-template-columns: 1fr;
            }

            h1 {
                font-size: 2rem;
            }
        }

/* FORMULAIRES ET CONTRÔLES - compatibility layer until Phase 2 extraction */

.form-check-input {
    border-color: #9ca3af;
}

.form-check-input:checked {
    background-color: #111827;
    border-color: #111827;
}

.form-check-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: #111827;
    box-shadow: 0 0 0 .2rem rgba(17, 24, 39, .12);
}



.project-color-dot {
    width: 6px;
    height: 22px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

/* Shared project filter styles kept here because Dashboard, Documents, Checklists and Resources reuse them. */
/* FILTRES PROJETS */

.project-filter-card {
    border-radius: 14px;
}

.project-filter-card .app-section-header {
    align-items: center;
    gap: .65rem;
    margin-bottom: .75rem !important;
}

.project-filter-card .app-section-header > div {
    min-width: 0;
}

.project-filter-card .app-section-title {
    line-height: 1.15;
}

.project-filter-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
}

.project-filter-title-row .app-section-title {
    margin-bottom: 0;
}

.project-filter-count {
    color: #64748b;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.project-filter-card .app-section-description {
    line-height: 1.25;
}

.project-filter-card .project-filter-options,
.project-filter-card #filesTypeFilters,
.project-filter-card #agendaFilters {
    gap: .45rem !important;
}

.project-filter-card #filesTypeFilters .filter-pill,
.search-page .search-query-card .filter-pill {
    min-height: 36px;
    padding: 6px 10px !important;
    border: 1px solid #dbe3ec !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
}

.project-filter-card #filesTypeFilters .filter-pill .form-check-label,
.search-page .search-query-card .filter-pill .form-check-label {
    font-size: .88rem;
    line-height: 1.15;
}

.project-filter-card .filter-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 16px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.project-filter-card .filter-pill .form-check-input {
    display: inline-block !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    float: none !important;
}

.project-filter-card .filter-pill .filter-pill-check {
    display: none !important;
}

.project-filter-card .filter-pill .form-check-label,
.project-filter-card .filter-pill:has(input:checked) .form-check-label {
    margin: 0 !important;
    color: #1f2a44;
    font-size: .95rem;
    font-weight: 700;
}

.project-filter-card .filter-pill .project-color-dot {
    margin: 0 !important;
}

.project-filter-card .project-filter-options .filter-pill {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 0 !important;
    min-height: 36px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #dbe3ec !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
    color: #64748b;
    overflow: hidden;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-filter-card .project-filter-options .filter-pill:hover {
    border-color: color-mix(in srgb, var(--project-color, #94a3b8) 32%, #cbd5e1) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08) !important;
    transform: translateY(-1px);
}

.project-filter-card .project-filter-options .filter-pill.is-selected {
    background: color-mix(in srgb, var(--project-color, #94a3b8) 9%, #ffffff) !important;
    border-color: color-mix(in srgb, var(--project-color, #94a3b8) 42%, #dbe3ec) !important;
    color: #111827;
}

.project-filter-card .project-filter-options .filter-pill.is-deselected {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #64748b;
}

.project-filter-card .project-filter-options .project-filter-chip-label {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    padding: 7px 6px 7px 10px;
    cursor: pointer;
}

.project-filter-card .project-filter-options .filter-pill .project-color-dot {
    width: 5px;
    height: 24px;
    margin: 0 !important;
    background: var(--project-color, #94a3b8) !important;
    opacity: .95;
}

.project-filter-card .project-filter-options .filter-pill.is-deselected .project-color-dot {
    opacity: .55;
}

.project-filter-card .project-filter-options .filter-pill .form-check-input {
    width: 1rem;
    height: 1rem;
    margin: 0 !important;
    border-color: #cbd5e1;
    cursor: pointer;
}

.project-filter-card .project-filter-options .filter-pill .form-check-input:checked {
    background-color: #111827;
    border-color: #111827;
}

.project-filter-card .project-filter-options .filter-pill .form-check-label,
.project-filter-card .project-filter-options .filter-pill:has(input:checked) .form-check-label {
    min-width: 0;
    margin: 0 !important;
    color: inherit;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-filter-card .project-filter-options .filter-pill.is-deselected .form-check-label {
    color: #64748b;
    font-weight: 700;
}

.project-filter-chip-action {
    width: 30px;
    min-width: 30px;
    height: 34px;
    border: 0;
    border-left: 1px solid rgba(148, 163, 184, .28);
    background: transparent;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.project-filter-chip-action:hover,
.project-filter-chip-action:focus {
    background: rgba(15, 23, 42, .06);
    color: #0f172a;
}

.project-filter-card .project-filter-options .filter-pill.is-deselected .project-filter-chip-action {
    color: #64748b;
}


/* LOGIN */

.login-page {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(7,26,51,.72), rgba(7,26,51,.72)),
        url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c');
    background-size: cover;
    background-position: center;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255,255,255,.96);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #071a33;
}

.login-subtitle {
    color: #64748b;
    margin-top: 8px;
}

.login-button {
    background: #c8a46b;
    border-color: #c8a46b;
    font-weight: 700;
}

.login-button:hover {
    background: #b48e52;
    border-color: #b48e52;
}


.login-logo-img {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 12px auto;
}


/* Layout responsive : garder les containers fluides jusqu'au palier desktop */
@media (min-width: 576px) and (max-width: 991.98px) {
    .container {
        max-width: 100% !important;
    }
}

.calendar-card {
    overflow-x: auto;
}


#calendar,
#dossierCalendar {
    min-height: 760px;
}


.dossier-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.dossier-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 10px;
    color: #334155;
    font-size: .86rem;
    font-weight: 700;
    background: #ffffff;
}

.dossier-calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.dossier-calendar-legend-dot-wait {
    background: #C8A46B;
}

.dossier-calendar-legend-dot-action {
    background: #425C4D;
}

.dossier-calendar-legend-dot-holiday {
    background: #d8c29a;
}

.fc .dossier-calendar-event-wait {
    border-left: 4px solid #B48E52 !important;
}

.fc .dossier-calendar-event-action {
    border-left: 4px solid #2f4639 !important;
}

.fc .calendar-holiday-event {
    border: 1px solid rgba(148, 115, 63, .22) !important;
    border-left: 3px solid currentColor !important;
    box-shadow: none !important;
    opacity: .62;
}

.fc .calendar-holiday-event .fc-event-main {
    color: #334155 !important;
}

.calendar-holiday-content {
    min-height: 18px;
    padding: 1px 5px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.15;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-holiday-dashboard-banner {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.calendar-holiday-dashboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--holiday-color, #C8A46B) 34%, #ffffff);
    border-left: 4px solid var(--holiday-color, #C8A46B);
    border-radius: 8px;
    background: color-mix(in srgb, var(--holiday-color, #C8A46B) 10%, #ffffff);
    color: #334155;
    padding: 12px 18px;
    font-size: .9rem;
}

.calendar-holiday-dashboard-content {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-holiday-inline {
    margin-bottom: 12px;
    padding: 8px 14px;
    opacity: .82;
}

.calendar-holiday-dashboard-name {
    color: #0f172a;
    font-weight: 800;
    white-space: nowrap;
}

.calendar-holiday-dashboard-date {
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.dashboard-section-heading-title {
    flex: 1 1 auto;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.15;
}

.dashboard-section-icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 1.35rem;
    border: 1px solid rgba(59, 130, 246, .45);
    background: rgba(59, 130, 246, .06);
    color: #0f6fad;
}

.dashboard-section-icon-warning {
    border-color: rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .07);
    color: #d97706;
}

.dashboard-section-icon-holiday {
    border-color: color-mix(in srgb, var(--holiday-color, #C8A46B) 55%, #ffffff);
    background: color-mix(in srgb, var(--holiday-color, #C8A46B) 10%, #ffffff);
    color: color-mix(in srgb, var(--holiday-color, #C8A46B) 80%, #7c2d12);
}

.dashboard-section-count {
    margin-left: auto;
    min-width: 38px;
    justify-content: center;
}

.fc {
    font-family: inherit;
    color: #111827;
}

.fc a {
    color: inherit !important;
    text-decoration: none !important;
}

.fc-toolbar {
    gap: 14px;
    align-items: center;
    margin-bottom: 24px !important;
}

.fc-toolbar-title {
    color: #111827;
    font-weight: 800;
    font-size: 2rem !important;
    text-transform: lowercase;
}

.fc-button {
    background: #f8fafc !important;
    border: 1px solid #dbe3ec !important;
    color: #111827 !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    text-transform: none !important;
}

.fc-prev-button,
.fc-next-button {
    background: #1f2937 !important;
    color: #fff !important;
    border-color: #1f2937 !important;
}

.fc-button-active {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #fff !important;
}

.fc-col-header-cell {
    background: #fff;
}

.fc-col-header-cell-cushion {
    color: #4b5563 !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: .85rem;
    padding: 12px 0 !important;
}

.fc-daygrid-day-number {
    color: #0f766e !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 8px !important;
}

.fc-day-other .fc-daygrid-day-number {
    color: #cbd5e1 !important;
}

.fc-day-today {
    background: rgba(245, 158, 11, .10) !important;
}

.fc-scrollgrid,
.fc-scrollgrid td,
.fc-scrollgrid th {
    border-color: #e5e7eb !important;
}

.fc-event {
    cursor: pointer;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 2px 6px !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
}

.fc-daygrid-event {
    margin-top: 3px !important;
}

.fc .fc-timegrid-event-harness > .fc-timegrid-event {
    margin-inline: 2px;
}

.fc .fc-daygrid-event .fc-event-resizer-start {
    display: none;
}

.fc-list {
    border: 0 !important;
}

.fc-list-day-cushion {
    background: #f8fafc !important;
    color: #111827 !important;
    font-weight: 800;
}

.fc-list-event-title,
.fc-list-event-time {
    color: #111827 !important;
}





.assistant-vocal-mobile-action {
    border: 0;
    background: transparent;
}

.assistant-vocal-global-action {
    white-space: nowrap;
}

.assistant-vocal-modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
}

.assistant-vocal-subtitle {
    color: #64748b;
    font-size: .82rem;
}

.assistant-vocal-talk-button {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.assistant-vocal-output {
    min-height: 64px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
}

.assistant-vocal-hands-free-notice {
    padding: 8px 10px;
    border: 1px solid #fde68a;
    border-radius: 6px;
    background: #fffbeb;
    color: #92400e;
    font-size: .86rem;
    font-weight: 700;
    text-align: center;
}

.assistant-vocal-modal.is-hands-free .assistant-vocal-modal-content {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .22), 0 22px 60px rgba(15, 23, 42, .22);
}

.calendar-mobile-filter-panel {
    display: none;
}

.calendar-mobile-filter-panel.calendar-filter-panel-all-widths {
    display: block;
    margin: 2px 0 8px;
}

.calendar-mobile-filter-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: .8rem;
    font-weight: 800;
    text-align: left;
}

.calendar-mobile-filter-toggle.is-filtered {
    border-color: #c8a46b;
    background: #fffaf0;
}

.calendar-mobile-filter-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.calendar-mobile-filter-summary {
    min-width: 0;
    color: #64748b;
    font-size: .74rem;
    font-weight: 700;
    text-align: right;
    white-space: normal;
}

.calendar-mobile-filter-chevron {
    color: #64748b;
    font-size: .85rem;
    transition: transform .16s ease;
}

.calendar-mobile-filter-toggle[aria-expanded="true"] .calendar-mobile-filter-chevron {
    transform: rotate(180deg);
}

.calendar-mobile-filter-panel .project-filter-card-compact {
    margin: 6px 0 0 !important;
    padding: 8px 0 0 !important;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.calendar-mobile-filter-panel .app-section-header {
    margin-bottom: 6px !important;
}

.calendar-mobile-project-filter .project-filter-title-row {
    display: none;
}

@media (max-width: 575.98px) {
    .calendar-desktop-project-filter {
        display: none;
    }

    .calendar-card {
        padding: 10px !important;
    }

    #calendar,
    #dossierCalendar {
        min-height: auto;
    }

    .fc-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        margin-bottom: 8px !important;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 4px;
        min-width: 0;
    }

    .fc-toolbar-chunk:first-child:empty {
        display: none;
    }

    .fc-toolbar-chunk:nth-child(2) {
        display: grid;
        grid-template-columns: 34px 34px minmax(0, 1fr) auto;
        align-items: center;
        order: -1;
    }

    .fc-toolbar-chunk:last-child {
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .fc-toolbar-title {
        font-size: 1.05rem !important;
        line-height: 1.15;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    #resourceCalendar .fc-toolbar-chunk:nth-child(2) {
        display: flex;
        grid-template-columns: none;
        justify-content: center;
    }

    #resourceCalendar .fc-toolbar-title {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }


    #resourceCalendar .fc-event {
        padding: 1px 3px !important;
        border-radius: 6px !important;
        font-size: .58rem !important;
        line-height: 1.05 !important;
    }

    #resourceCalendar .fc-timegrid-event {
        padding: 1px 2px !important;
    }

    #resourceCalendar .calendar-event-resource-content {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
        line-height: 1.05;
    }

    #resourceCalendar .calendar-event-resource-task {
        min-width: 0;
        display: block;
        font-size: .58rem;
        font-weight: 650;
        line-height: 1.08;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: auto;
    }

    #resourceCalendar .calendar-event-resource-task .activity-type-icon {
        width: .58rem;
        height: .58rem;
        margin-right: 2px !important;
        vertical-align: -0.08em;
    }

    #resourceCalendar .calendar-event-resource-project,
    #resourceCalendar .calendar-event-resource-team,
    #resourceCalendar .calendar-event-resource-status {
        font-size: .48rem;
        line-height: 1.05;
    }

    #resourceCalendar .calendar-event-resource-content.is-all-day .calendar-event-resource-status {
        display: none;
    }

    .fc-button {
        min-height: 34px !important;
        padding: 5px 8px !important;
        font-size: .74rem !important;
        border-radius: 8px !important;
        line-height: 1.05 !important;
    }

    .fc .fc-prev-button,
    .fc .fc-next-button {
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px !important;
    }

    .fc .fc-prev-button .fc-icon,
    .fc .fc-next-button .fc-icon {
        font-size: 15px !important;
    }

    .fc .fc-today-button {
        min-width: 0;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .fc .fc-button-group {
        display: flex;
        min-width: 0;
    }

    .calendar-weekend-toolbar.is-in-calendar-toolbar {
        margin: 0;
    }

    .calendar-weekend-toolbar.is-in-calendar-toolbar .btn {
        min-height: 34px;
        padding: 5px 7px;
        border-radius: 8px;
        font-size: .7rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .calendar-weekend-toolbar.is-in-calendar-toolbar .btn i {
        display: none;
    }

    .calendar-mobile-filter-panel {
        display: block;
        margin: 2px 0 8px;
    }

    .fc-view-harness {
        min-height: 520px;
    }
}

.activity-agenda-list {
    display: grid;
    gap: 6px;
}

.activity-agenda-item {
    width: 100%;
    padding: 9px 10px;
    display: grid;
    gap: 2px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    text-align: left;
}

.activity-agenda-item:hover,
.activity-agenda-item:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
}

.activity-agenda-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: .76rem;
}

.activity-agenda-owner {
    color: #334155;
    font-weight: 650;
}

.activity-agenda-text {
    overflow-wrap: anywhere;
    font-size: .9rem;
}

.activity-agenda-past-toggle {
    margin-top: 9px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #475569;
    font-size: .82rem;
    font-weight: 650;
}

#activityAgendaPast {
    margin-top: 6px;
}

.fc .calendar-agenda-event {
    border-width: 1px 1px 1px 4px;
    border-style: solid;
    box-shadow: none;
}

.fc .calendar-agenda-event .fc-event-main {
    color: #0f172a;
}

.calendar-agenda-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
}

.calendar-agenda-content .calendar-event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.calendar-agenda-meta-left {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 0 0 auto;
}

.calendar-agenda-project {
    min-width: 0;
    max-width: 48%;
    overflow: hidden;
    color: #64748b;
    font-size: .62rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: right;
}


.calendar-agenda-label {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.calendar-agenda-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #334155;
    font-size: .78rem;
    line-height: 1.2;
}

.calendar-agenda-reminder-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #334155;
    font-size: .72rem;
    line-height: 1.2;
}

.calendar-weekend-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.calendar-weekend-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.calendar-agenda-content .calendar-event-title {
    width: 100%;
    min-width: 0;
    color: #0f172a;
    font-weight: 700;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

.calendar-agenda-content .calendar-event-time {
    color: #334155;
}

.calendar-agenda-content.is-time-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    white-space: normal;
}

.calendar-agenda-content.is-time-grid .calendar-event-time {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.calendar-agenda-content.is-time-grid .calendar-event-title {
    width: 100%;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
}

.calendar-agenda-content.is-time-grid .calendar-agenda-icon,
.calendar-agenda-content.is-time-grid .calendar-agenda-reminder-icon {
    margin-top: 0;
}

.calendar-create-choice {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calendar-agenda-move-notice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-agenda-move-notice > span {
    flex: 1;
}

@media (max-width: 575.98px) {
    .calendar-weekend-toolbar {
        justify-content: flex-start;
    }

    .calendar-agenda-move-notice {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-agenda-move-notice .btn-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

.fc-event {
    overflow: hidden !important;
}

.calendar-event-content {
    display: block;
    width: 100%;
    line-height: 1.15;
    overflow: hidden;
}

.calendar-event-time {
    font-size: .72rem;
    font-weight: 700;
    opacity: .9;
    margin-bottom: 2px;
}

.calendar-event-title {
    display: block;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    line-height: 1.15;
}

.calendar-event-status {
    display: inline-block;
    font-size: .85rem;
    margin-left: 4px;
    line-height: 1;
}

.fc-daygrid-event {
    border-radius: 8px !important;
}


.fc .fc-daygrid-event .calendar-event-content {
    overflow: visible;
}

.fc .fc-daygrid-event .calendar-event-title {
    display: block;
    white-space: normal;
}

@media (max-width: 575.98px) {
    .fc .calendar-agenda-content .calendar-event-title {
        font-size: .68rem;
        line-height: 1.15;
    }

    .fc .calendar-agenda-content .calendar-agenda-project {
        max-width: 44%;
        font-size: .56rem;
    }

    .fc .calendar-agenda-content .calendar-agenda-meta-left {
        gap: 3px;
    }

    .fc .fc-daygrid-event {
        min-height: 28px;
        height: auto !important;
    }

    .fc .fc-daygrid-view .calendar-event-time,
    .fc .fc-daygrid-view .calendar-event-status,
    .fc .fc-daygrid-view .calendar-event-type,
    .fc .fc-daygrid-view .calendar-event-type-separator,
    .fc .fc-daygrid-view .activity-type-icon,
    .fc .fc-daygrid-view .calendar-agenda-icon,
    .fc .fc-daygrid-view .calendar-agenda-reminder-icon,
    .fc .fc-timegrid-view .calendar-event-type,
    .fc .fc-timegrid-view .calendar-event-type-separator,
    .fc .fc-timegrid-view .activity-type-icon,
    .fc .fc-timegrid-view .calendar-event-status,
    .fc .fc-timegrid-view .calendar-agenda-icon,
    .fc .fc-timegrid-view .calendar-agenda-reminder-icon {
        display: none !important;
    }

    .fc .fc-daygrid-view .calendar-event-title,
    .fc .fc-timegrid-view .calendar-event-title,
    .fc .fc-timegrid-view .calendar-event-name {
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        text-overflow: clip !important;
    }

    .fc .fc-timegrid-view .calendar-event-content {
        overflow: hidden;
    }
}





.fc .fc-prev-button,
.fc .fc-next-button {
    background: #f8fafc !important;
    border: 1px solid #dbe3ec !important;
    color: #1f2937 !important;
    border-radius: 12px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
}

.fc .fc-prev-button .fc-icon,
.fc .fc-next-button .fc-icon {
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 18px !important;
}

.fc .fc-prev-button:hover,
.fc .fc-next-button:hover {
    background: #eef2f7 !important;
}

.fc .fc-today-button {
    background: transparent !important;
    border: 0 !important;
    color: #334155 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}





.activity-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
    padding: 0;
}

.activity-modal-header-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

#taskModalActivityMenu {
    margin-left: auto;
}

.activity-modal-header-actions .btn,
.activity-modal-header-actions .btn-close {
    min-height: 36px;
}

.activity-modal-header-actions .btn-close {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: .5rem;
    background-size: 1rem;
}

.activity-modal-summary {
    display: flex;
    gap: .625rem;
    min-width: 0;
    margin: 0;
}

.activity-modal-main {
    flex: 1;
    min-width: 0;
}

.activity-modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .25rem;
}

.activity-modal-heading {
    flex: 1;
    min-width: 0;
}

.activity-modal-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.activity-modal-status {
    margin-top: .375rem;
    width: fit-content;
}

.activity-modal-project {
    margin-top: .25rem;
    color: #64748b;
    font-size: .85rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.activity-modal-date {
    color: #334155;
    font-weight: 600;
}

.photo-card-name {
    font-weight: 600;
    color: #111827;
}

.photo-card .d-flex {
    min-width: 0;
}

.photo-card-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.photo-card button {
    flex-shrink: 0;
}
.search-result-card {
    border-left: 5px solid #e5e7eb;
}

.task-title {
    color: #111827;
    font-weight: 750;
    font-size: 1.05rem;
    line-height: 1.25;
}

.project-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}


@media (max-width: 575.98px) {
    .project-pill {
        margin-top: 12px;
    }

    .search-result-card .d-flex {
        display: block !important;
    }
}

/* LOGIN */
.login-page {
    min-height: 100vh;
    background: #f4f7fb;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-img {
    max-width: 210px;
    height: auto;
    margin-bottom: 12px;
}

.login-subtitle {
    color: #64748b;
    font-weight: 600;
}

.login-button {
    background: #111827;
    color: #ffffff;
    border: 1px solid #111827;
    font-weight: 700;
    border-radius: 12px;
}

.login-button:hover,
.login-button:focus {
    background: #1f2937;
    color: #ffffff;
    border-color: #1f2937;
}


.project-color-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.activity-date-line {
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.activity-date-hours {
    margin-top: .125rem;
    font-size: .85rem;
    font-weight: 400;
    color: #64748b;
}

.activity-date-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef2f7;
    color: #334155;
    padding: 5px 12px;
    font-size: .9rem;
    font-weight: 800;
}

#activityPhotosList {
    margin: .375rem 0 0;
}

#activityPhotosList > .fw-semibold,
.activity-photo-upload .form-label {
    font-size: 1rem;
    margin-bottom: 6px;
}

.photo-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 10px;
    margin-bottom: 4px;
}





html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .navbar-toggler {
    border: 1px solid rgba(255,255,255,.20) !important;
    border-radius: 10px !important;
    padding: .25rem .55rem !important;
    font-size: .9rem !important;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .navbar-toggler i {
    font-size: 1.4rem !important;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .navbar-collapse {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .nav-section {
    padding: 14px 0;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .nav-link {
    min-height: 44px;
    padding: .68rem .8rem .68rem 1rem;
}



/* PHOTOS CHANTIER */

.activity-photo-group {
    padding-left: 14px;
    border-left: 3px solid #94a3b8;
    margin-bottom: 28px;
}

.activity-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.activity-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-file-delete-action {
    color: #64748b;
}
.photo-file-delete-action:hover,
.photo-file-delete-action:focus-visible {
    color: #334155;
}
.activity-file-action {
    border: 0;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 1.05rem;
    padding: 4px;
    flex-shrink: 0;
    cursor: pointer;
}

.activity-file-action:hover {
    color: #111827;
    opacity: .8;
}


.calendar-event-focused {
    box-shadow: 0 0 0 2px rgba(200, 164, 107, 0.95), 0 8px 18px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.activity-file-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

@media (max-width: 768px) {
    .activity-photo-group {
        padding-left: 12px;
    }

    .activity-file-row {
        gap: 8px;
    }

    .activity-file-name {
        font-size: .95rem;
    }

    .activity-file-thumb {
        width: 56px;
        height: 56px;
    }
}

/* Shared project-section-* accordion styles kept here because Contacts and Projets both use them. */
/* =========================================================
   Projet / Sections collapsibles réutilisables
   ========================================================= */

.project-section-button {
    width: 100%;
    min-height: 92px;
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: #ffffff;
    padding: 18px;
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.project-section-button:hover {
    background: #f8fbff;
    border-color: #93c5fd;
}

.project-section-icon {
    font-size: 2rem;
    line-height: 1;
}

.project-section-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: #0f172a;
}

.project-section-subtitle {
    color: #64748b;
    font-size: .95rem;
}

/* =========================================================
   Modal activité - sections, espacements et cartes
   ========================================================= */

.activity-inline-action {
    padding: 0;
    line-height: 1;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 800;
}

/* Date et actions Photos : dimensions dictées par le contenu. */
.activity-modal-summary > .project-color-dot {
    width: 4px;
    height: auto;
    min-height: 0;
    align-self: stretch;
    border-radius: 999px;
    flex: 0 0 4px;
    margin: 0;
}

.activity-modal-quick-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    border-top: 1px solid #e2e8f0;
    margin-top: .75rem;
    padding-top: .75rem;
}

.activity-modal-date-card { flex: 1; min-width: 0; cursor: pointer; }
.activity-modal-date-card:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

.activity-photos-heading,
.activity-people-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .25rem;
}

#taskModal .activity-modal-photo-action,
#taskModal .activity-modal-agenda-action {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 8px;
}

#taskModal .activity-modal-photo-action {
    border: 1px solid #9bbfba;
    background: transparent;
    color: #0f766e;
}

#taskModal .activity-modal-photo-action:hover,
#taskModal .activity-modal-photo-action:focus-visible { background: #f0fdfa; }
.activity-modal-photo-action i { font-size: 1.1rem; }

.activity-modal-section {
    min-width: 0;
    margin-bottom: .75rem;
    padding: .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
}

.activity-modal-section:last-child { margin-bottom: 0; }

#activityPhotosSection,
#taskModalPeople {
    font-weight: 400;
}

#activityPhotosSection .activity-photos-toggle {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    width: auto;
    min-height: 36px;
    margin: 0;
}

#activityPhotosSection .activity-photos-toggle:disabled { opacity: 1; }
.activity-people-heading .btn { flex: 0 0 auto; min-height: 36px; }

.activity-person-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .375rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.activity-person-row.has-actions { grid-template-columns: minmax(0, 1fr) auto auto; }
.activity-person-name { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; font-weight: 600; }
.activity-person-name small { font-weight: 400; }
.activity-person-response > .app-badge { min-height: 36px; cursor: pointer; }
.activity-person-menu { display: grid; place-items: center; width: 36px; min-height: 36px; padding: .25rem; color: #475569; }
.activity-person-menu:hover { background: #f1f5f9; }
.activity-person-response > button:focus-visible,
.activity-person-menu:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.activity-person-row .dropdown-menu { font-size: .875rem; }
.activity-person-row .dropdown-item { min-height: 36px; display: flex; align-items: center; white-space: normal; }

.activity-photo-icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 !important;
    text-decoration: none;
    font-size: .9rem;
    line-height: 1.1;
    color: #111827;
    font-weight: 800;
}

.activity-photo-icon-button strong {
    font-size: 1.05rem;
    line-height: 1;
}

/* Sections de l’activité et accordéons */
.activity-dossiers-toggle,
.activity-photos-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    margin-bottom: 6px;
    text-align: left;
    font-weight: 700;
    color: #111827;
}

.activity-dossiers-arrow,
.activity-photos-arrow {
    display: inline-block;
    width: 16px;
}

.activity-dossiers-list,
.activity-photos-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-left: 0;
}

.activity-dossier-card,
.activity-photos-list .photo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 10px;
    margin-bottom: 0;
}

.activity-photos-list .btn-sm {
    padding: .15rem .35rem;
    font-size: .75rem;
}

.activity-photo-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
}
.activity-photo-thumb-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 0 !important;
}
.activity-photo-thumb-link {
    display: block;
    aspect-ratio: 1;
    background: #eef2f7;
}
.activity-photo-thumb-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.activity-photo-thumb-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}
.activity-photo-thumb-meta .photo-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .72rem;
}
.activity-photo-thumb-card .photo-delete-btn {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}
.activity-photo-thumb-card .photo-delete-btn:hover,
.activity-photo-thumb-card .photo-delete-btn:focus-visible {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}
.activity-photo-thumb-card .photo-delete-btn:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}

/* General actions remain outside the scrolling content. */
#taskModalActions:not(:empty) {
    display: flex;
    flex-wrap: wrap;
    justify-content: stretch;
    gap: .5rem;
    border-top: 1px solid #e2e8f0;
    padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom));
}
#taskModalActions:empty { display: none; }
#taskModalActions > .btn { flex: 1 1 100%; margin: 0; }
/* One searchable list; the header, search and actions stay outside its scroller. */
.activity-people-search { padding: 0 1rem .75rem; flex: 0 0 auto; }
.activity-people-modal .modal-body { padding-top: 0; }
.activity-people-list { border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.activity-people-list > p { padding: .75rem; }
.activity-people-option {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-height: 44px;
    margin: 0;
    padding: .75rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}
.activity-people-option:last-child { border-bottom: 0; }
.activity-people-option[hidden] { display: none; }
.activity-people-option .form-check-input { flex: 0 0 auto; margin: .2rem 0 0; }
.activity-people-option > span { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .5rem; }
.activity-people-option-name { display: block; word-break: normal; overflow-wrap: normal; }
.activity-people-modal .modal-footer { display: flex; flex-wrap: wrap; gap: .5rem; }
.activity-people-modal .modal-footer > .btn { flex: 1 1 0; width: auto; min-height: 44px; margin: 0; }
#activityPeopleMessage:empty { display: none; }

/* Navigation mode is shared with Bootstrap via navigation-mode.js. */

html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]),
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) body {
    overflow-x: hidden;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) main.app-shell {
    margin-left: 0;
    width: auto;
    max-width: 100%;
    padding-top: 18px;
}


html[data-navigation-mode="sidebar"] .app-navbar {
    display: block;
    position: fixed;
    inset: 0;
    width: 290px;
    height: auto;
    z-index: 1030;
    padding: 10px 18px 16px;
    overflow-y: visible;
    overflow-x: hidden;
    border-radius: 8px;
}
html[data-navigation-mode="sidebar"] .app-navbar .container {
    width: 100%;
    max-width: none;
    min-height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-brand {
    justify-content: center;
    flex-direction: row;
    gap: 12px;
    margin: 8px 0 10px 0;
    font-size: 1.32rem;
    font-weight: 850 !important;
    text-align: center;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-brand i {
    font-size: 2rem !important;
    line-height: 1;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-toggler {
    display: none;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-collapse {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    height: auto !important;
    overflow: visible !important;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-collapse.collapse,
html[data-navigation-mode="sidebar"] .app-navbar .navbar-collapse.collapsing {
    display: flex !important;
    height: auto !important;
    overflow: visible !important;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-collapse.collapsing {
    transition: none !important;
}
html[data-navigation-mode="sidebar"] .app-menu-scroll {
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-nav {
    flex-direction: column;
    width: 100%;
}
html[data-navigation-mode="sidebar"] .app-navbar .nav-section-content {
    margin-left: 0;
}
html[data-navigation-mode="sidebar"] main.app-shell {
    margin-left: 318px;
    width: calc(100% - 318px);
    max-width: none;
    padding-left: 32px;
    padding-right: 32px;
}


/* IMPRESSION / PDF - calendrier ressources */
@media print {
    .app-navbar,
    .navbar,
    .project-filter-card,
    #resourceConflictPanel,
    .btn,
    .fc-toolbar-chunk:first-child,
    .fc-toolbar-chunk:last-child {
        display: none !important;
    }

    main.app-shell {
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .calendar-card,
    .page-card {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body {
        background: #ffffff !important;
    }

    @page {
        size: landscape;
        margin: 10mm;
    }
}

.photo-card-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.activity-type-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.calendar-event-title .activity-type-icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
}

.calendar-event-type {
    font-weight: 800;
}

.calendar-event-status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    font-weight: 800;
}

.calendar-event-status-indicator.is-confirmed {
    color: #ffffff;
}

.calendar-event-status-indicator.is-pending {
    color: #fbbf24;
}

.calendar-milestone-action-panel {
    position: fixed;
    z-index: 1080;
    width: min(320px, calc(100vw - 24px));
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    padding: 14px;
    color: #111827;
}

.calendar-milestone-action-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 1.25rem;
    line-height: 1;
    padding: 2px 4px;
}

.calendar-milestone-action-kicker {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-milestone-action-title {
    padding-right: 24px;
    font-weight: 800;
    margin-top: 2px;
}

.calendar-milestone-action-meta,
.calendar-milestone-action-date,
.calendar-milestone-action-state {
    color: #4b5563;
    font-size: 0.9rem;
    margin-top: 6px;
}

.calendar-milestone-confirm-btn {
    margin-top: 12px;
}

.activity-type-icon-modal {
    width: 40px;
    height: 40px;
    margin-right: 8px;
}

.activity-modal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.activity-description-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .25rem;
    min-height: 36px;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    font-weight: 700;
    color: #111827;
}

.activity-description-arrow {
    display: inline-block;
    width: 16px;
}

.activity-inline-icon-action {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 1;
    font-size: 1.15rem;
}

.activity-description-body {
    overflow-wrap: anywhere;
}


.activity-dossiers-toggle,
.activity-notes-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    margin-bottom: 6px;
    text-align: left;
    font-weight: 700;
    color: #111827;
}

.activity-dossiers-arrow,
.activity-notes-arrow {
    display: inline-block;
    width: 16px;
}

.activity-dossiers-body,
.activity-notes-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-note-card {
    border-bottom: 1px solid #e2e8f0;
    padding: .5rem 0;
    color: #334155;
    overflow-wrap: anywhere;
}
.activity-note-card:last-child { border-bottom: 0; }

.activity-note-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: .88rem;
}

.activity-note-card-header strong {
    color: #111827;
}

.activity-note-card-header span {
    color: #64748b;
    white-space: nowrap;
}

.activity-note-card-body {
    font-size: .95rem;
    line-height: 1.35;
}

.activity-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ----- Section Notes : séparation visuelle ----- */

.activity-notes-list{
    margin-top:18px;
}

#activityNoteForm{
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid #e2e8f0;
}


#taskModalDescriptionText {
    cursor: text;
    font-weight: 400;
    white-space: pre-wrap;
}

/* Correction layout accordéons activité : contenu sous le titre */
#taskModalDescription,
#activityDossiersSection,
#activityPhotosSection,
#activityNotesSection {
    display: block;
}

.activity-modal-section-header {
    display: flex;
    align-items: center;
    width: 100%;
}

.activity-description-body,
.activity-dossiers-body,
.activity-dossiers-list,
.activity-photos-list,
.activity-notes-body {
    width: 100%;
    margin-top: 10px;
}

.activity-description-body.d-none,
.activity-dossiers-body.d-none,
.activity-dossiers-list.d-none,
.activity-photos-list.d-none,
.activity-notes-body.d-none {
    display: none !important;
}


.activity-dossier-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #334155;
}

.activity-dossier-card-main {
    min-width: 0;
}

.activity-dossier-title {
    color: #111827;
    font-weight: 700;
    line-height: 1.25;
}

.activity-dossier-meta,
.activity-dossier-point {
    color: #64748b;
    line-height: 1.25;
}

.activity-dossier-card .btn {
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .activity-dossier-card {
        align-items: stretch;
        flex-direction: column;
    }

    .activity-dossier-card .btn {
        width: 100%;
    }
}

.activity-modal-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-modal-type-icon .activity-type-icon-modal {
    width: 32px;
    height: 32px;
    margin-right: 0;
}

/* Assistant création d'activité *//* Assistant création d'activité */
.create-task-step-title {
    font-size: 1.06rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #0f172a;
}

.create-task-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.create-task-option-card {
    min-height: 74px;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    justify-content: flex-start;
    white-space: normal;
}

.create-task-option-card .create-task-option-label {
    font-size: .95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#createTaskActivityTypeSearch {
    width: 100%;
}

.create-task-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 60px;
    gap: 8px;
}

.create-task-option-card.create-task-type-card {
    min-width: 0;
    min-height: 56px;
    height: 100%;
    padding: 8px 10px;
    gap: 8px;
}

.create-task-type-card .create-task-option-label {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    font-size: .875rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.create-task-option-card.is-selected,
.create-task-option-card.btn-primary {
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.12);
}

.create-task-back-btn {
    font-weight: 700;
    text-decoration: none;
}

.create-task-summary-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.create-task-summary-card {
    position: relative;
    padding-right: 40px;
    margin-bottom: 0;
    min-height: 56px;
}

.create-task-summary-action {
    display: block;
    width: 100%;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.create-task-summary-action:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.create-task-summary-action:focus-visible {
    outline: 0;
    border-color: #345995;
    box-shadow: 0 0 0 3px rgba(52, 89, 149, .18);
}

.create-task-summary-edit-hint {
    position: absolute;
    top: 50%;
    right: 14px;
    color: #64748b;
    font-size: .95rem;
    line-height: 1;
    transform: translateY(-50%);
}

.create-task-summary-title {
    margin-bottom: 4px;
}

.create-task-summary-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.create-task-summary-value .activity-type-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-right: 0;
}

.create-task-date-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.create-task-date-card .btn {
    flex-shrink: 0;
}

.create-task-type-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .create-task-summary-card {
        min-height: 54px;
        padding-block: 8px;
    }

    .create-task-option-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .create-task-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 56px;
        gap: 8px;
    }

    .create-task-option-card {
        min-height: 72px;
        padding: 12px 11px;
    }

    #createTaskModal .modal-dialog {
        margin: 0.5rem;
    }
}

@media (max-width: 359.98px) {
    .create-task-option-card.create-task-type-card {
        padding-inline: 8px;
        gap: 6px;
    }

    .create-task-type-card .create-task-type-icon {
        width: 28px;
        height: 28px;
    }

    .create-task-type-card .create-task-option-label {
        font-size: .8125rem;
    }
}

#createTaskAvailabilityPanel {
    background: #f3f4f6 !important;
    border-color: #dbe3ec !important;
}

/* Design system convergence/* Design system convergence — dossier reference shell + modern sidebar */
body {
    min-height: 100vh;
    background: #f3f6fb;
}

.page-card {
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.app-filter-card,
.calendar-card,
.resource-list-card,
.planning-queue-form-card,
.planning-queue-list-card,
.search-page .search-project-block,
.files-page .files-owner-section,
.files-page .files-source-block,
.search-page .search-query-card {
    border-color: #dbe3ec;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.app-filter-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 0.96));
}

.app-page-header {
    margin-bottom: 1.75rem;
}

.app-page-title {
    font-size: clamp(2rem, 3vw, 2.45rem);
    line-height: 1.05;
}

.app-page-subtitle {
    max-width: 72ch;
    line-height: 1.55;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
}

.btn-sm {
    border-radius: 10px;
}

.form-control,
.form-select {
    border-radius: 12px;
    border-color: #dbe3ec;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.app-table thead th {
    border-bottom-color: #dbe3ec;
    background: #f8fafc;
    color: #475569;
}

.app-table tbody td {
    border-color: #edf2f7;
}

.app-table tbody tr:hover {
    background: #f8fbff;
}

.app-navbar {
    background: #f8fafc;
    border: 0;
    border-right: 1px solid #e2e8f0;
    box-shadow: none;
}

.app-navbar .navbar-brand,
.app-navbar .nav-link {
    color: #0f172a;
}

.app-navbar .navbar-brand img {
    width: 150px;
    height: auto;
}

.app-navbar .nav-section {
    gap: 10px;
    padding: 18px 0 18px;
    border-top-color: #e2e8f0;
}

.app-navbar .nav-section:first-child {
    padding-top: 0;
}

.app-navbar .nav-section-title {
    color: #94a3b8;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 0 12px;
}

.app-navbar .nav-link {
    gap: .8rem;
    min-height: 46px;
    border-radius: 14px;
    padding: .75rem .95rem .75rem 1.05rem;
    color: #334155;
    font-size: .96rem;
    font-weight: 600;
}

.app-navbar .nav-link i {
    width: 1.1rem;
    color: #64748b;
    font-size: 1rem;
}

.app-navbar .nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.app-navbar .nav-link.active {
    background: #eaf2ff;
    color: #1d4ed8;
    font-weight: 800;
}

.app-navbar .nav-link.active::before {
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: #2563eb;
}

.app-navbar .nav-link.active i {
    color: #2563eb;
}





html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .container {
    position: relative;
    gap: 0;
    min-height: 52px;
    padding-top: 6px;
    padding-bottom: 6px;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .navbar-brand {
    position: absolute;
    left: 50%;
    top: 32px;
    justify-content: center;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%);
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .navbar-brand img {
    width: 92px;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .navbar-toggler {
    position: relative;
    z-index: 2;
    margin-left: auto;
    min-width: 40px;
    min-height: 40px;
    color: #0f172a !important;
}
html:is([data-navigation-mode="hamburger"], [data-navigation-mode="bottom"]) .app-navbar .navbar-collapse {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}


html[data-navigation-mode="sidebar"] .app-navbar {
    width: 304px;
    padding: 24px 18px 18px;
}
html[data-navigation-mode="sidebar"] .app-navbar .navbar-brand {
    justify-content: flex-start;
    margin: 10px 0 26px;
    padding: 0 10px;
    /* text-align: center; */
}
html[data-navigation-mode="sidebar"] main.app-shell {
    margin-left: 332px;
    width: calc(100% - 332px);
    padding-left: 36px;
    padding-right: 36px;
    padding-top: 32px;
}


.mobile-bottom-nav {
    display: none;
}

html[data-navigation-mode="bottom"] .app-navbar .navbar-toggler,
html[data-navigation-mode="bottom"] .app-navbar .navbar-collapse {
    display: none !important;
}
html[data-navigation-mode="bottom"] main.app-shell {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 6px;
    min-height: 76px;
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    background: #121212;
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, .18);
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link {
    min-width: 0;
    min-height: 58px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #8b8f98;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 4px 6px;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link i {
    font-size: 1.32rem;
    line-height: 1;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link.active {
    background: rgba(37, 99, 235, .1);
    color: #6ea0ff;
    box-shadow: inset 0 0 0 1px rgba(110, 160, 255, .08), 0 0 18px rgba(37, 99, 235, .08);
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link:hover,
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link:focus-visible {
    color: #d3d6dc;
    background: rgba(255, 255, 255, .045);
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link.active:hover,
html[data-navigation-mode="bottom"] .mobile-bottom-nav-link.active:focus-visible {
    color: #6ea0ff;
    background: rgba(37, 99, 235, .12);
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-more {
    min-width: 0;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-more-toggle {
    width: 100%;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu {
    width: min(280px, calc(100vw - 16px));
    margin-bottom: 8px !important;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    padding: 8px;
    background: #151515;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item {
    min-height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d3d6dc;
    font-weight: 700;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item i {
    width: 1.1rem;
    color: #8b8f98;
    text-align: center;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item:hover,
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, .045);
    color: #f3f4f6;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item.active,
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item:active {
    background: rgba(37, 99, 235, .1);
    color: #6ea0ff;
}
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item.active i,
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu .dropdown-item:active i {
    color: #6ea0ff;
}


.dashboard-task-card,
.dashboard-project-group,
.dashboard-list-row {
    border-radius: 16px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.dashboard-task-card:hover,
.dashboard-project-group:hover,
.dashboard-list-row:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--project-color, #94a3b8) 42%, #cbd5e1);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-task-card[style*="--project-color"],
.task-card[style*="--project-color"] {
    border-left-color: var(--project-color, #94a3b8) !important;
}

.dashboard-task-card[style*="--project-color"]:hover,
.task-card[style*="--project-color"]:hover {
    border-left-color: var(--project-color, #94a3b8) !important;
}

.task-line-title .activity-type-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.project-filter-card-compact {
    position: relative;
}

.project-filter-card-compact .app-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.project-filter-card-compact .app-section-header .btn {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: .78rem;
    line-height: 1.05;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .project-filter-card {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }

    .project-filter-card:not(.project-filter-card-compact) .app-section-header {
        margin-bottom: 8px !important;
    }

    .project-filter-card:not(.project-filter-card-compact) .app-section-title {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .project-filter-card:not(.project-filter-card-compact) .app-section-description {
        font-size: .76rem;
    }

    .project-filter-card:not(.project-filter-card-compact) .app-action-row {
        gap: 6px;
        width: auto;
    }

    .project-filter-card:not(.project-filter-card-compact) .app-action-row .btn {
        width: auto;
    }

    .project-filter-card-compact {
        padding: 8px 10px 10px !important;
        margin-bottom: 10px !important;
    }

    .project-filter-card-compact .app-section-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 6px;
        margin-bottom: 6px !important;
    }

    .project-filter-card-compact .app-section-title {
        font-size: .9rem;
        line-height: 1.1;
        margin-bottom: 0;
    }

    .project-filter-card-compact .project-filter-count {
        font-size: .7rem;
    }

    .project-filter-card-compact .app-section-description {
        display: none;
    }

    .project-filter-card-compact .app-section-header .btn {
        min-height: 32px;
        max-width: 104px;
        padding: 4px 7px;
        font-size: .68rem;
        line-height: 1.05;
        white-space: normal;
    }

    .project-filter-card-compact .project-filter-options {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px !important;
    }

    .project-filter-card-compact .filter-pill {
        width: 100%;
        min-width: 0;
        min-height: 32px;
        grid-template-columns: minmax(0, 1fr) !important;
        line-height: 1.1;
    }

    .project-filter-card-compact .project-filter-options .project-filter-chip-label {
        width: 100%;
        grid-template-columns: auto 4px minmax(0, 1fr);
        gap: 4px;
        min-height: 32px;
        padding: 3px 6px;
    }

    .project-filter-card-compact .project-filter-options .filter-pill .form-check-input {
        width: .86rem;
        height: .86rem;
        flex: 0 0 auto;
    }

    .project-filter-card-compact .project-filter-options .filter-pill .project-color-dot {
        width: 4px;
        height: 16px;
        flex: 0 0 auto;
    }

    .project-filter-card-compact .project-filter-options .filter-pill .form-check-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .78rem !important;
    }

    .project-filter-card-compact .project-filter-chip-action {
        display: none;
    }
}

/* Search convergence overrides kept here to preserve the late global cascade. */
.search-page .search-results-summary {
    gap: 10px;
    margin-bottom: 16px;
}

.search-page .search-results-summary strong,
.search-page .search-results-summary span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    padding: 8px 12px;
    background: #ffffff;
}

/* Shared Search/Documents convergence override kept here to preserve cascade until page migrations are complete. */
.search-page .search-project-header,
.files-page .files-owner-summary {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modal-content {
    border-radius: 20px;
    border-color: #e2e8f0;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}


.pwa-push-prompt {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: #121212;
    color: #f8fafc;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

.pwa-push-prompt-text {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1;
}

.pwa-push-prompt-text strong {
    font-size: .92rem;
    line-height: 1.15;
}

.pwa-push-prompt-text span {
    color: #b8bec8;
    font-size: .78rem;
    line-height: 1.25;
}

.pwa-push-prompt-button,
.pwa-push-prompt-dismiss {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
}

.pwa-push-prompt-button {
    min-height: 36px;
    padding: 0 14px;
    background: #2563eb;
    color: #ffffff;
}

.pwa-push-prompt-button:disabled {
    opacity: .72;
}

.pwa-push-prompt-dismiss {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, .08);
    color: #d1d5db;
    font-size: 1.2rem;
}

@media (min-width: 576px) {
    .pwa-push-prompt {
        left: auto;
        width: min(420px, calc(100vw - 32px));
        bottom: 24px;
    }
}


/* Centre de notifications */
.notifications-panel {
    padding: 0;
    overflow: hidden;
}

.notifications-list {
    display: flex;
    flex-direction: column;
}

.notifications-selection-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #e5edf5;
}

.notification-select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    cursor: pointer;
}

.notification-select-all .form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
}

.notification-selection-count {
    color: #64748b;
    font-size: .875rem;
}

.notification-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e5edf5;
}

.notification-select {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-select .form-check-input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.notification-row {
    display: grid;
    flex: 1;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    color: #0f172a;
    text-decoration: none;
    background: #ffffff;
    transition: background-color .16s ease, transform .16s ease;
}

/* Photos mobile/offline */
.photos-page {
    display: grid;
    gap: 22px;
}

.photos-connection-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    background: #ffffff;
    color: #334155;
}

.photos-connection-banner i {
    font-size: 1.3rem;
}

.photos-connection-banner span {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.photos-connection-banner.is-online {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.photos-connection-banner.is-offline {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.photos-create-card,
.photos-batch-card {
    border-color: #dbe3ec;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.photos-file-picker {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 14px;
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
}

.photos-file-picker:focus-within,
.photos-file-picker:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.photos-file-picker-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    font-size: 1.35rem;
}

.photos-file-picker > span:last-child {
    display: grid;
    gap: 3px;
}

.photos-file-picker small,
.photos-selection-summary,
.photos-storage-summary,
.photos-batch-actions span {
    color: #64748b;
    font-size: .84rem;
}

.photos-selection-summary {
    margin-top: 8px;
}

.photos-create-actions {
    justify-content: space-between;
    margin-top: 18px;
}

.photos-queue-section,
.photos-batch-list {
    display: grid;
    gap: 14px;
}

.photos-empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 38px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
}

.photos-empty-state i {
    margin-bottom: 5px;
    font-size: 2rem;
}

.photos-empty-state strong {
    color: #334155;
}

.photos-batch-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.photos-batch-header h3 {
    margin: 2px 0;
    color: #0f172a;
    font-size: 1.08rem;
}

.photos-batch-project {
    color: #425c4d;
    font-size: .77rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.photos-batch-date,
.photos-batch-note {
    color: #64748b;
    font-size: .87rem;
}

.photos-batch-note {
    margin: 10px 0 0;
}

.photos-batch-error {
    margin: 8px 0 0;
    font-size: .84rem;
}

.photos-media-list {
    display: grid;
    gap: 1px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #e2e8f0;
}

.photos-media-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 7px 10px 7px 7px;
    background: #ffffff;
}

.photos-media-thumb {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 10px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 1.3rem;
}

.photos-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photos-media-info,
.photos-media-state {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.photos-media-info strong {
    overflow: hidden;
    color: #0f172a;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photos-media-info span,
.photos-media-info small {
    font-size: .78rem;
}

.photos-media-state {
    justify-items: end;
}

.photos-media-state .btn {
    min-height: 32px;
    padding: 5px 9px;
}

.photos-batch-actions {
    justify-content: space-between;
    margin-top: 12px;
}

@media (max-width: 575.98px) {
    .photos-page .app-page-actions,
    .photos-page .app-page-actions .btn,
    .photos-create-actions,
    .photos-create-actions .btn {
        width: 100%;
    }

    .photos-create-actions {
        align-items: stretch;
    }

    .photos-media-row {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .photos-media-thumb {
        width: 56px;
        height: 56px;
    }

    .photos-media-state {
        grid-column: 1 / -1;
        grid-template-columns: auto auto auto;
        justify-content: end;
        justify-items: stretch;
        align-items: center;
        padding: 2px 0 4px;
    }
}

/* Hôte caméra global : DOM présent sans donnée métier, activé après capture. */
.photo-flow-global {
    position: fixed;
    inset: 0;
    z-index: 1080;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.photo-flow-global.is-open {
    width: 100%;
    height: 100%;
    padding: 76px 16px 24px;
    overflow-y: auto;
    background: rgba(248, 250, 252, .98);
    opacity: 1;
    pointer-events: auto;
}
.photo-flow-global.is-open .photo-flow-step {
    width: min(100%, 760px);
    margin-inline: auto;
}

/* Photos — parcours terrain sans friction */
.photo-flow {
    width: min(100%, 760px);
    margin: 0 auto;
    gap: 18px;
}

.photo-flow-header {
    margin-bottom: 0;
}

.photo-flow-step {
    display: grid;
    gap: 24px;
    padding: 26px;
    border: 1px solid #dbe3ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.photo-flow-step[hidden],
.photo-flow-step > [hidden] {
    display: none !important;
}

.photo-flow-prompt,
.photo-flow-confirmation,
.photo-flow-locating {
    display: flex;
    align-items: center;
    gap: 16px;
}

.photo-flow-prompt h2,
.photo-flow-question h2,
.photo-flow-confirmation h2,
.photo-flow-locating h2,
.photo-flow-thanks h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    line-height: 1.2;
}

.photo-flow-prompt p,
.photo-flow-question p,
.photo-flow-confirmation p,
.photo-flow-locating p,
.photo-flow-thanks p {
    margin: 6px 0 0;
    color: #64748b;
}

.photo-flow-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    flex: 0 0 auto;
    border-radius: 18px;
    background: #111827;
    color: #ffffff;
    font-size: 1.75rem;
}

.photo-flow-icon-small {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.3rem;
}

.photo-flow-primary-action,
.photo-flow-secondary-action,
.photo-flow-actions .btn {
    min-height: 54px;
    font-size: 1rem;
    font-weight: 700;
}

.photo-flow-primary-action,
.photo-flow-secondary-action {
    width: 100%;
}

.photo-flow-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.photo-flow-actions {
    display: grid;
    gap: 10px;
}

.photo-flow-actions-split {
    grid-template-columns: 1fr 1fr;
}

.photo-review-frame {
    display: grid;
    place-items: center;
    width: 100%;
    max-height: 62vh;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.photo-review-frame img {
    display: block;
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
}

.photo-flow-question {
    display: grid;
    gap: 2px;
    text-align: center;
}

.photo-flow-confirmation {
    padding: 16px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: #f0fdf4;
}

.photo-flow-confirmation > span,
.photo-flow-thanks-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #166534;
    color: #ffffff;
    font-size: 1.55rem;
}

.photo-flow-confirmation-project {
    align-items: flex-start;
}

.photo-kept-strip {
    display: flex;
    gap: 8px;
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.photo-kept-thumb {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 2px solid #ffffff;
    border-radius: 12px;
    background: #e2e8f0;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.photo-kept-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-flow-locating {
    grid-template-columns: auto 1fr;
    min-height: 150px;
}

.photo-flow-locating .spinner-border {
    width: 2.4rem;
    height: 2.4rem;
    color: #425c4d;
}

.photo-project-suggestion-card {
    display: grid;
    gap: 4px;
    padding: 20px;
    border: 2px solid #425c4d;
    border-radius: 16px;
    background: #f8faf9;
    text-align: center;
}

.photo-project-suggestion-card strong {
    color: #0f172a;
    font-size: 1.25rem;
}

.photo-project-suggestion-card span {
    color: #64748b;
    font-size: .88rem;
}

.photo-optional-details {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.photo-optional-details summary {
    position: relative;
    z-index: 1;
    padding: 15px 16px;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.photo-optional-details summary::marker {
    color: #425c4d;
}

.photo-optional-fields .form-control {
    position: relative;
    z-index: 1;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.35;
    pointer-events: auto;
    touch-action: manipulation;
}

.photo-optional-fields textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.photo-optional-details summary span {
    color: #64748b;
    font-size: .82rem;
    font-weight: 500;
}

.photo-optional-fields {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
}

.photo-batch-note-field {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 7px;
}

.photo-batch-note-field .form-label {
    margin: 0;
}

.photo-batch-note-field textarea.form-control {
    min-height: 112px;
    font-size: 16px;
    line-height: 1.45;
    pointer-events: auto;
    touch-action: auto;
    user-select: text;
    -webkit-user-select: text;
    resize: vertical;
}

.photo-flow-change-project {
    color: #475569;
    text-decoration: none;
}

.photo-flow-thanks {
    justify-items: center;
    padding-block: 42px;
    text-align: center;
}

.photo-flow-thanks-icon {
    width: 76px;
    height: 76px;
    background: #425c4d;
    font-size: 2.2rem;
}

.photo-flow-thanks .photo-flow-actions {
    width: min(100%, 440px);
}

.photo-flow-error {
    margin: 0;
    border-radius: 14px;
}

.photo-recovery {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #fcd34d;
    border-radius: 14px;
    background: #fffbeb;
    color: #78350f;
}

.photo-recovery > div {
    display: grid;
    gap: 2px;
}

.photo-recovery span {
    font-size: .86rem;
}

@media (max-width: 575.98px) {
    .photo-flow {
        gap: 14px;
    }

    .photo-flow-header {
        padding-inline: 2px;
    }

    .photo-flow-step {
        gap: 20px;
        padding: 18px;
        border-radius: 16px;
    }

    .photo-flow-prompt {
        align-items: flex-start;
    }

    .photo-flow-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        font-size: 1.5rem;
    }

    .photo-flow-icon-small {
        width: 44px;
        height: 44px;
        border-radius: 13px;
        font-size: 1.15rem;
    }

    .photo-flow-actions-split {
        grid-template-columns: 1fr 1fr;
    }

    .photo-flow-actions-split .btn {
        padding-inline: 8px;
    }

    .photo-recovery {
        align-items: stretch;
        flex-direction: column;
    }
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-row:hover,
.notification-row:focus-visible {
    background: #f8fbff;
    color: #0f172a;
}

.notification-item.unread,
.notification-row.unread {
    background: #f4f8ff;
}

.notification-item.is-selected,
.notification-item.is-selected .notification-row {
    background: #e8f1fc;
}

.notification-item.is-selected {
    box-shadow: inset 3px 0 #2563eb;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #2563eb;
    font-size: 1.12rem;
}

.notification-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.notification-title-line strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .98rem;
}

.notification-body {
    color: #475569;
    line-height: 1.35;
}

.notification-meta {
    color: #94a3b8;
    font-size: .78rem;
    font-weight: 700;
}

.notification-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #2563eb;
}

.notification-arrow {
    color: #94a3b8;
    text-align: right;
}

.notifications-empty {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 20px;
    color: #64748b;
    text-align: center;
}

.notifications-empty i {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #2563eb;
    font-size: 1.35rem;
}

.notifications-empty strong {
    color: #0f172a;
    font-size: 1rem;
}

.mobile-top-bar { display: none; }

.notification-count-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;
    font-size: .68rem;
    font-weight: 850;
    line-height: 1;
}

/* One set of global controls, outside the collapsible sections in every navigation mode. */
.app-global-header {
    min-height: 60px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    z-index: 1041;
}
.app-global-header .mobile-top-logo {
    display: flex;
    flex: 0 1 94px;
    min-width: 40px;
    align-items: center;
    text-decoration: none;
}
.app-global-header .mobile-top-logo img { width: 100%; max-height: 40px; object-fit: contain; }
.app-global-header .global-logo-light { display: none; }
.app-global-header .mobile-top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.app-global-header .mobile-top-icon,
.app-global-header .global-nav-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    text-decoration: none;
    font-size: 1.18rem;
}
.app-global-header .mobile-top-icon:hover,
.app-global-header .mobile-top-icon:focus-visible,
.app-global-header .global-nav-toggle:hover,
.app-global-header .global-nav-toggle:focus-visible { background: #f1f5f9; color: #111827; }
.app-global-header .notification-count-badge { position: absolute; top: 2px; right: 0; }
.app-global-header .global-nav-toggle { display: none; font-size: 1.75rem; }
.account-control-name, .account-control-arrow { display: none; }
.account-menu .dropdown-menu { width: min(320px, calc(100vw - 24px)); padding: 8px; }
.account-menu .account-full-name { white-space: normal; overflow-wrap: anywhere; color: #0f172a; font-weight: 600; }
.account-menu .dropdown-item { min-height: 44px; display: flex; align-items: center; gap: 8px; }

html[data-navigation-mode="sidebar"] .app-global-header {
    margin-left: 332px;
    padding-right: 36px;
    padding-left: 36px;
}
html[data-navigation-mode="sidebar"] .app-global-header .mobile-top-logo { display: none; }
html[data-navigation-mode="sidebar"] .account-toggle { width: auto; max-width: min(360px, 35vw); padding: 0 10px; gap: 8px; }
html[data-navigation-mode="sidebar"] .account-control-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
html[data-navigation-mode="sidebar"] .account-control-arrow { display: block; flex-shrink: 0; font-size: .7rem; }

html:is([data-navigation-mode="bottom"], [data-navigation-mode="hamburger"]) .app-global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding-top: env(safe-area-inset-top);
    min-height: calc(60px + env(safe-area-inset-top));
}
html[data-navigation-mode="hamburger"] .app-global-header .global-nav-toggle { display: inline-flex; }
html[data-navigation-mode="hamburger"] .app-global-header ~ .app-navbar { margin-top: calc(60px + env(safe-area-inset-top)); padding: 0; border: 0; }
html[data-navigation-mode="hamburger"] .app-global-header ~ .app-navbar .container { min-height: 0; padding-top: 0; padding-bottom: 0; }
html[data-navigation-mode="hamburger"] .app-global-header ~ .app-navbar .navbar-brand { display: none; }
html[data-navigation-mode="bottom"] .app-navbar { display: none !important; }
html[data-navigation-mode="bottom"] .mobile-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1041;
    min-height: calc(60px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 10px 8px;
    display: flex;
    align-items: center;
    background: #121212;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
}
html[data-navigation-mode="bottom"] .app-global-header .global-logo-light { display: block; }
html[data-navigation-mode="bottom"] .app-global-header .global-logo-dark { display: none; }
html[data-navigation-mode="bottom"] .app-global-header .mobile-top-icon { color: #d3d6dc; }
html[data-navigation-mode="bottom"] .app-global-header .mobile-top-icon:hover,
html[data-navigation-mode="bottom"] .app-global-header .mobile-top-icon:focus-visible { background: rgba(255, 255, 255, .055); color: #ffffff; }
html[data-navigation-mode="bottom"] main.app-shell { padding-top: calc(78px + env(safe-area-inset-top)); }
@media (max-width: 575.98px) and (orientation: portrait) {
    .notification-row {
        grid-template-columns: 38px minmax(0, 1fr) 18px;
        gap: 12px;
        padding: 14px 14px;
    }
    .notification-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }
    .notification-title-line strong {
        white-space: normal;
    }
}

@media (max-width: 575.98px) {
    .superintendent-desktop-project-filter {
        display: none;
    }

    .calendar-holiday-dashboard-item,
    .dashboard-section-heading {
        gap: 12px;
    }

    .calendar-holiday-dashboard-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .calendar-holiday-dashboard-date,
    .calendar-holiday-dashboard-name {
        white-space: normal;
    }

    .dashboard-section-icon {
        width: 46px;
        height: 46px;
        font-size: 1.18rem;
    }
}

/* Admin notifications automatiques */
.notification-events-table-wrap {
    overflow-x: auto;
}

.notification-events-table th,
.notification-events-table td {
    vertical-align: top;
}

.notification-event-main-col {
    min-width: 280px;
}

.notification-event-module {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.notification-event-role-cell {
    min-width: 118px;
}

.notification-channel-toggle {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    margin: 0.15rem 0.35rem 0.15rem 0;
    white-space: nowrap;
}

.notification-channel-toggle span {
    color: #475569;
    font-size: 0.78rem;
}

.notification-channel-toggle input {
    accent-color: #0f766e;
}

.agenda-modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
}

.agenda-modal-content .modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.agenda-modal-subtitle {
    color: #64748b;
    font-size: .82rem;
}

.agenda-switch-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding-left: 0;
}

.agenda-switch-control .form-check-input {
    float: none;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 1.25rem;
    margin: 0;
    border-color: #94a3b8;
    background-color: #e2e8f0;
    cursor: pointer;
}

.agenda-switch-control .form-check-input:checked {
    border-color: #2563eb;
    background-color: #2563eb;
}

.agenda-switch-control .form-check-input:disabled {
    cursor: not-allowed;
}

.agenda-switch-control .form-check-label {
    margin: 0;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
}

.agenda-modal-section {
    min-width: 0;
    padding: 0;
    border: 0;
}

.agenda-project-options {
    max-height: 190px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-y: auto;
    padding: 2px;
}

.agenda-project-option {
    min-height: 52px;
    min-width: 0;
}

.agenda-project-option .create-task-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-project-option[aria-selected="true"] {
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .12);
}

.agenda-activity-selection {
    display: flex;
    gap: 8px;
}

.agenda-activity-search-results {
    max-height: 190px;
    overflow-y: auto;
    border-radius: 0 0 6px 6px;
}

.agenda-activity-search-result {
    width: 100%;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e2e8f0;
    border-top: 0;
    background: #fff;
    color: #0f172a;
    text-align: left;
}

.agenda-activity-search-result:hover,
.agenda-activity-search-result:focus-visible {
    background: #f8fafc;
}

.agenda-activity-search-result small {
    flex: 0 0 auto;
    color: #64748b;
}

.agenda-global-mobile-action {
    border: 0;
    background: transparent;
}

@media (max-width: 575.98px) {
    .agenda-project-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 168px;
    }

    .agenda-project-option {
        min-width: 0;
        padding-inline: 8px;
    }

    .agenda-project-option .create-task-option-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 8ch;
    }

    .agenda-modal-footer {
        flex-wrap: nowrap;
    }

    .agenda-modal-footer .btn {
        min-height: 42px;
    }
}


/* Mobile calendar density: metadata first, title second. */
.fc .calendar-event-content {
    min-width: 0;
}

.fc .calendar-event-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 0;
    font-size: .62rem;
    line-height: 1;
}

.fc .calendar-event-content .calendar-event-title,
.fc .calendar-event-content .calendar-event-name {
    min-width: 0;
    display: block;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: normal;
    text-overflow: clip;
    line-height: 1.15;
}

.fc .calendar-event-content .calendar-event-title {
    margin-top: 2px;
}

.fc .calendar-event-content.is-time-grid .calendar-event-meta {
    font-size: .72rem;
    line-height: 1.1;
}

.fc .calendar-event-content.is-time-grid .calendar-event-title,
.fc .calendar-event-content.is-time-grid .calendar-event-name {
    overflow: visible;
    font-size: .78rem;
}

.fc .calendar-event-content .calendar-event-type-separator {
    white-space: pre;
}

.fc .calendar-event-content .activity-type-icon,
.fc .calendar-event-content .calendar-agenda-icon,
.fc .calendar-event-content .calendar-agenda-reminder-icon {
    flex: 0 0 auto;
    width: .72rem;
    height: .72rem;
    margin: 0;
    object-fit: contain;
    font-size: .7rem;
}

.fc .calendar-event-content .calendar-event-status {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: .65rem;
    line-height: 1;
}

.fc .calendar-agenda-content.is-time-grid {
    display: flex;
    flex-direction: column;
    white-space: normal;
}

@media (max-width: 575.98px) {
    .fc .fc-daygrid-event {
        min-height: 24px;
        height: auto !important;
        margin-top: 2px !important;
        padding: 2px 3px !important;
        font-size: .58rem !important;
        line-height: 1.05 !important;
    }

    .fc .fc-daygrid-view .calendar-event-meta {
        font-size: .5rem;
        gap: 2px;
    }

    .fc .fc-daygrid-view .calendar-event-title,
    .fc .fc-daygrid-view .calendar-event-name {
        margin-top: 1px;
        font-size: .62rem;
        line-height: 1.1;
    }

    .fc .fc-daygrid-view .calendar-event-type,
    .fc .fc-daygrid-view .calendar-event-type-separator,
    .fc .fc-daygrid-view .calendar-event-status,
    .fc .fc-daygrid-view .activity-type-icon {
        display: none !important;
    }

    .fc .fc-timegrid-event {
        padding: 3px 4px !important;
    }

    .fc .fc-timegrid-view .calendar-event-meta {
        font-size: .62rem;
        gap: 3px;
    }

    .fc .fc-timegrid-view .calendar-event-title,
    .fc .fc-timegrid-view .calendar-event-name {
        font-size: .76rem;
        line-height: 1.15;
        overflow: visible !important;
    }

    .fc .fc-timegrid-view .calendar-event-type,
    .fc .fc-timegrid-view .calendar-event-type-separator,
    .fc .fc-timegrid-view .calendar-event-status,
    .fc .fc-timegrid-view .activity-type-icon {
        display: none !important;
    }
}


/* Calendar event typography: compact and lighter across all views. */
.fc .fc-event,
.fc .calendar-event-content,
.fc .calendar-event-content .calendar-event-title,
.fc .calendar-event-content .calendar-event-name {
    font-weight: 500 !important;
}

.fc .calendar-event-content .calendar-event-meta {
    font-weight: 400;
}

.fc .calendar-event-content.is-day-grid .calendar-event-title,
.fc .calendar-event-content.is-day-grid .calendar-event-name {
    font-size: .72rem;
}

.fc .calendar-event-content.is-time-grid .calendar-event-title,
.fc .calendar-event-content.is-time-grid .calendar-event-name {
    font-size: .74rem;
}

@media (max-width: 575.98px) {
    .fc .fc-daygrid-view .calendar-event-title,
    .fc .fc-daygrid-view .calendar-event-name {
        font-size: .54rem;
        font-weight: 500 !important;
    }

    .fc .fc-timeGridWeek-view .calendar-event-title,
    .fc .fc-timeGridWeek-view .calendar-event-name {
        font-size: .68rem;
        font-weight: 500 !important;
    }

    .fc .fc-timeGridDay-view .calendar-event-title,
    .fc .fc-timeGridDay-view .calendar-event-name {
        font-size: .72rem;
        font-weight: 500 !important;
    }

    .fc .fc-timegrid-view .calendar-event-meta {
        font-weight: 400;
    }
}

.thumbnail-state-pending,
.thumbnail-state-error {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: .8rem;
    background: rgba(108, 117, 125, .06);
    border-radius: .5rem;
}
.thumbnail-state-error { flex-direction: column; color: var(--bs-danger, #dc3545); }
.thumbnail-retry { border: 0; background: transparent; color: inherit; text-decoration: underline; font-size: .75rem; }


/* Photos du modal activité : grille compacte et métadonnée lisible */
.activity-photo-thumbnails {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.activity-photo-thumb-meta {
    min-width: 0;
    min-height: 34px;
    padding: 4px 6px;
}

.activity-photo-thumb-meta .photo-card-name {
    color: #64748b;
    font-weight: 600;
    line-height: 1.2;
}

@media (min-width: 576px) {
    .activity-photo-thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (min-width: 992px) {
    .activity-photo-thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Reserve fixed bars without changing the responsive layout of each page. */
html { --app-bottom-clearance: 0px; }
html[data-navigation-mode="bottom"] { --app-bottom-clearance: calc(108px + env(safe-area-inset-bottom)); }
html[data-navigation-mode="bottom"] .contacts-selection-bar,
html[data-navigation-mode="bottom"] .pwa-push-prompt { bottom: var(--app-bottom-clearance); }
html[data-navigation-mode="bottom"] .mobile-bottom-nav-menu { max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); overflow-y: auto; }
@media print {
    .mobile-top-bar, .mobile-bottom-nav { display: none !important; }
}

/* Compact pending states in the shared People section. */
#taskModalPeople .app-badge { min-height: 22px; font-size: .72rem; padding: .2rem .45rem; }
