@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("./pages/dossier-reference.css");
@import url("./pages/dashboard.css");
/* Dossiers still reuses dashboard-summary-* styles; keep this order until KPI cards are consolidated. */
@import url("./pages/dossiers.css");
@import url("./pages/files.css");
@import url("./pages/search.css");
@import url("./pages/projects.css");
@import url("./pages/resources.css");
@import url("./pages/activities.css");
@import url("./pages/checklists.css");
@import url("./pages/activity-types-admin.css");
@import url("./pages/planning-queue.css");

        .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,
        .app-navbar .user-name {
            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;
            }

            .navbar-actions {
                width: 100%;
                display: grid !important;
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }

            .navbar-actions .btn,
            .navbar-actions span {
                width: 100%;
                text-align: 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: 16px;
}

.project-filter-card .app-section-header {
    align-items: flex-start;
}

.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;
}


/* 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;
}

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

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

.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-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;
}




@media (max-width: 575.98px) {
    .calendar-card {
        padding: 1rem !important;
    }

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

    .fc-toolbar {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .fc-toolbar-title {
        font-size: 1.55rem !important;
        text-align: center;
    }

    .fc-button {
        padding: 7px 11px !important;
        font-size: .9rem !important;
    }

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

.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;
}

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





.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-summary {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}


.activity-modal-main {
    flex: 1;
}

.activity-modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

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

.activity-modal-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.15;
}

.activity-modal-status {
    margin-top: 8px;
    width: fit-content;
}

.activity-modal-project {
    color: #475569;
    font-weight: 600;
    margin-bottom: 0;
}

.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-modal-summary > .project-color-dot {
    width: 6px;
    height: 72px;
    min-height: 72px;
    border-radius: 999px;
    flex: 0 0 6px;
    margin: 0;
}

/* Modal activité - respiration et hiérarchie */
.activity-modal-summary {
    margin-bottom: 30px;
}

.activity-modal-project {
    margin-top: 8px;
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.activity-modal-date {
    margin-top: 8px;
}

.activity-date-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 700;
    color: #334155;
    line-height: 1.35;
}

.activity-date-arrow {
    color: #64748b;
    font-weight: 900;
}

.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-top: 8px;
    margin-bottom: 8px;
}

#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;
}



#taskModalActions {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 24px;
}

@media (max-width: 991px) {

    .navbar-toggler {
        border: 1px solid rgba(255,255,255,.20) !important;
        border-radius: 10px !important;
        padding: .25rem .55rem !important;
        font-size: .9rem !important;
    }

    .navbar-toggler i {
        font-size: 1.4rem !important;
    }

    .navbar-collapse {
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .app-navbar .nav-section {
        padding: 14px 0;
    }

    .app-navbar .nav-link {
        min-height: 44px;
        padding: .68rem .8rem .68rem 1rem;
    }

    .navbar-actions {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        margin-top: 16px;
    }

    .navbar-actions .btn {
        width: 100%;
    }

    .user-name {
        opacity: .9;
        text-transform: none;
    }
}


/* 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;
}

.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;
}

/* En-tête activité */
.activity-modal-main {
    padding-top: 12px;
}

.activity-modal-summary > .project-color-dot {
    height: auto;
    min-height: 0;
    align-self: stretch;
}

.activity-modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.activity-modal-title-row #taskModalRenameButton {
    flex: 0 0 auto;
    margin-left: auto;
    margin-top: 2px;
}

.activity-modal-project {
    margin-top: 6px;
    margin-bottom: 0;
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
}

.activity-modal-summary .activity-modal-status {
    margin-top: 8px;
    margin-bottom: 28px;
}

/* Alignement commun des cartes sous l'en-tête */
.activity-modal-quick-row,
#taskModalDescription,
.activity-modal-resources-section,

/* Cartes Date / Caméra */
.activity-modal-quick-row {
    display: grid;
    grid-template-columns: 1fr 92px;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 32px;
}

.activity-modal-quick-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-height: 72px;
    padding: 10px 12px;
}

.activity-modal-date-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.activity-modal-date-card .activity-modal-date,
.activity-modal-date-card .activity-inline-action {
    margin-top: 0;
}

.activity-modal-date-card .activity-inline-action {
    flex-shrink: 0;
}

.activity-modal-photo-card {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.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;
}

/* Description */
#taskModalDescription {
    margin-top: 0;
    margin-bottom: 28px;
}

/* Sections accordéon Ressources / Photos */
.activity-modal-section,

.activity-modal-resources-section,

.activity-resources-toggle,
.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-resources-arrow,
.activity-dossiers-arrow,
.activity-photos-arrow {
    display: inline-block;
    width: 16px;
}

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

.activity-modal-resources-section #taskModalResourcesList > div,
.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;
}

/* Actions */
#taskModalActions {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 24px;
}





/* NAVIGATION RESPONSIVE
   < 992px : navbar Bootstrap mobile.
   >= 992px : sidebar fixe. */

@media (max-width: 991.98px) {
    html,
    body {
        overflow-x: hidden;
    }

    .app-navbar {
        position: relative;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    main.app-shell {
        margin-left: 0;
        width: auto;
        max-width: 100%;
    }
}

@media (min-width: 992px) {
    .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;
    }

    .app-navbar .container {
        width: 100%;
        max-width: none;
        min-height: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .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;
    }

    .app-navbar .navbar-brand i {
        font-size: 2rem !important;
        line-height: 1;
    }

    .app-navbar .navbar-toggler {
        display: none;
    }

    .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;
    }

    .app-navbar .navbar-collapse.collapse,
    .app-navbar .navbar-collapse.collapsing {
        display: flex !important;
        height: auto !important;
        overflow: visible !important;
    }

    .app-navbar .navbar-collapse.collapsing {
        transition: none !important;
    }

    .app-menu-scroll {
        overflow-y: auto;
        min-height: 0;
        flex: 1 1 auto;
    }

    .app-navbar .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .app-navbar .nav-section-content {
        margin-left: 0;
    }

    .navbar-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: auto;
        width: 100%;
        background: linear-gradient(180deg, rgba(15, 30, 48, .96), rgba(9, 18, 30, .96));
        border: 1px solid rgba(59, 130, 246, .38);
        border-radius: 8px;
        padding: 14px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    }

    .navbar-actions .user-name {
        display: flex;
        align-items: center;
        gap: 9px;
        color: #f8fafc;
        opacity: 1;
        font-size: .98rem;
        font-weight: 800;
        line-height: 1.15;
        white-space: normal;
        text-transform: none;
    }

    .navbar-actions .user-name i {
        font-size: 1.32rem;
    }

    .navbar-actions .btn {
        width: 100%;
        min-height: 42px;
        border-color: #3b82f6;
        border-radius: 8px;
        color: #60a5fa;
        font-size: .9rem;
        font-weight: 800;
        line-height: 1.15;
    }

    .navbar-actions .btn:hover {
        background: rgba(59, 130, 246, .14);
        color: #ffffff;
    }

    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: clamp(34px, 5.5vw, 52px);
    height: clamp(34px, 5.5vw, 52px);
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.activity-type-icon-modal {
    width: clamp(52px, 9vw, 72px);
    height: clamp(52px, 9vw, 72px);
    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;
    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 {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 10px;
}


.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 {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    color: #334155;
}

.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 {
    min-height: 72px;
    cursor: text;
}

/* RESTAURATION - sections accordéon du modal activité */
#taskModalDescription,
#taskModalResources,
#activityDossiersSection,
#activityPhotosSection,
#activityNotesSection {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 28px;
    width: 100%;
}

#activityPhotosList {
    margin-bottom: 0;
}


/* Ajustement ciblé : accordéon Photos fermé */
#activityPhotosSection .activity-photos-toggle[aria-expanded="false"] {
    margin-bottom: 0;
    line-height: 1.15;
}

#activityPhotosSection #activityPhotosList {
    margin-bottom: 0;
}


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

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

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

.activity-description-body.d-none,
.activity-resources-list.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;
    margin-right: 8px;
}

.activity-modal-type-icon .activity-type-icon-modal {
    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;
}

.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: 10px;
}

.create-task-summary-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 12px;
    min-height: 56px;
}

.create-task-summary-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 4px;
}

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

.create-task-type-icon {
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .create-task-option-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

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

.create-task-resources-toggle {
    width: 100%;
    border: 1px solid #dbe3ec;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    text-align: left;
}

.create-task-resources-toggle[aria-expanded="true"] {
    background: #eef2f7;
    border-color: #cfd8e3;
}

.create-task-resources-count {
    color: #64748b;
    font-weight: 700;
    font-size: .9rem;
}

#createTaskResourcesCollapse {
    padding-top: 2px;
}

#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-project-card,
.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,
.app-navbar .user-name {
    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;
}

.navbar-actions {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.navbar-actions .user-name {
    color: #0f172a;
}

.navbar-actions .user-name i {
    color: #64748b;
}

.navbar-actions .btn {
    border-color: #cbd5e1;
    color: #334155;
}

.navbar-actions .btn:hover {
    background: #f8fafc;
    color: #0f172a;
}

@media (max-width: 991.98px) {
    .app-navbar {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .app-navbar .navbar-brand {
        padding: .9rem 0 .7rem;
    }

    .app-navbar .navbar-toggler {
        color: #0f172a !important;
    }

    .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);
    }

    .navbar-actions {
        margin-top: 1rem;
    }
}

@media (min-width: 992px) {
    .app-navbar {
        width: 304px;
        padding: 24px 18px 18px;
    }

    .app-navbar .navbar-brand {
        justify-content: flex-start;
        margin: 10px 0 26px;
        padding: 0 10px;
        /* text-align: center; */
    }

    .navbar-actions {
        border-radius: 16px;
        padding: 14px;
    }

    main.app-shell {
        margin-left: 332px;
        width: calc(100% - 332px);
        padding-left: 36px;
        padding-right: 36px;
        padding-top: 32px;
    }
}

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

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

.project-filter-card .filter-pill {
    min-height: 42px;
    border-radius: 999px;
    padding-inline: 14px;
}

/* 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%);
}

/* Documents convergence override kept here because it belongs to the late global convergence layer. */
.files-page .files-project-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

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