/* rules : https://getbem.com/naming/ */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

.fira-sans-thin {
  font-family: "Fira Sans", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.fira-sans-regular {
  font-family: "Fira Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.fira-sans-medium {
  font-family: "Fira Sans", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.fira-sans-semibold {
  font-family: "Fira Sans", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.fira-sans-bold {
  font-family: "Fira Sans", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.fira-sans-extrabold {
  font-family: "Fira Sans", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.fira-sans-black {
  font-family: "Fira Sans", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.fira-sans-regular-italic {
  font-family: "Fira Sans", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.fira-sans-medium-italic {
  font-family: "Fira Sans", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.fira-sans-semibold-italic {
  font-family: "Fira Sans", sans-serif;
  font-weight: 600;
  font-style: italic;
}

.fira-sans-bold-italic {
  font-family: "Fira Sans", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.fira-sans-extrabold-italic {
  font-family: "Fira Sans", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.fira-sans-black-italic {
  font-family: "Fira Sans", sans-serif;
  font-weight: 900;
  font-style: italic;
}

       /* ==========================================================================
   PROJECT DASHBOARD STYLES - BEM Nomenclature
   ========================================================================== */

        /* Dashboard Header
           ========================================================================== */
        .dashboard {
            /*background: #f9fafb;
            min-height: 100vh;*/
        }

        .dashboard__header {
            background: white;
            border-bottom: 1px solid #e5e7eb;
            padding: 2rem 0;
            margin-bottom: 2rem;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
        }

        .dashboard__title {
            margin: 0 0 1.5rem 0;
            font-size: 1.875rem;
            font-weight: 700;
            color: #111827;
            letter-spacing: -0.025em;
        }

        /* Filters
           ========================================================================== */
        .filters {
            display: flex;
            gap: 1rem;
            align-items: center;
            flex-wrap: wrap;
            justify-content: space-between;
        }

        .filters__left {
            display: flex;
            gap: 1rem;
            align-items: center;
            flex-wrap: wrap;
            flex: 1;
        }

        .filters__right {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .filters__group {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .filters__label {
            font-size: 0.875rem;
            font-weight: 500;
            color: #6b7280;
            margin-right: 0.5rem;
        }

        .filters__search {
            position: relative;
            min-width: 280px;
        }

        .filters__search-icon {
            position: absolute;
            left: 0.875rem;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 0.875rem;
            pointer-events: none;
        }

        .filters__search-input {
            width: 100%;
            padding: 0.625rem 1rem 0.625rem 2.5rem;
            border: 1px solid #d1d5db;
            background: white;
            border-radius: 8px;
            font-size: 0.875rem;
            color: #374151;
            transition: all 0.15s ease;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

        .filters__search-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .filters__search-input::placeholder {
            color: #9ca3af;
        }

        .filters__select {
            padding: 0.625rem 2.5rem 0.625rem 1rem;
            border: 1px solid #d1d5db;
            background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
            background-size: 12px;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            color: #374151;
            cursor: pointer;
            transition: all 0.15s ease;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            min-width: 180px;
        }

        .filters__select:hover {
            background-color: #f9fafb;
            border-color: #9ca3af;
        }

        .filters__select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .filters__toggle {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.625rem 1rem;
            border: 1px solid #d1d5db;
            background: white;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            color: #374151;
            cursor: pointer;
            transition: all 0.15s ease;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            user-select: none;
        }

        .filters__toggle:hover {
            background: #f9fafb;
            border-color: #9ca3af;
        }

        .filters__toggle-switch {
            position: relative;
            width: 36px;
            height: 20px;
            background: #d1d5db;
            border-radius: 10px;
            transition: background-color 0.2s ease;
        }

        .filters__toggle-slider {
            position: absolute;
            top: 2px;
            left: 2px;
            width: 16px;
            height: 16px;
            background: white;
            border-radius: 50%;
            transition: transform 0.2s ease;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        .filters__toggle-input {
            display: none;
        }

        .filters__toggle-input:checked + .filters__toggle-switch {
            background: #3b82f6;
        }

        .filters__toggle-input:checked + .filters__toggle-switch .filters__toggle-slider {
            transform: translateX(16px);
        }

        .filters__button {
            padding: 0.625rem 1.25rem;
            border: 1px solid #d1d5db;
            background: white;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            color: #374151;
            cursor: pointer;
            transition: all 0.15s ease;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

        .filters__button:hover {
            background: #f9fafb;
            border-color: #9ca3af;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
        }

        .filters__button--active {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
        }

        .filters__button--active:hover {
            background: #2563eb;
            border-color: #2563eb;
        }

        .filters__button--primary {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
        }

        .filters__button--primary:hover {
            background: #2563eb;
            border-color: #2563eb;
        }

        /* Projects Table
           ========================================================================== */
        .projects-table {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
        }

        .projects-table__table {
            width: 100%;
            margin: 0;
            border-collapse: collapse;
        }

        .projects-table__header {
            background: #f9fafb;
            border-bottom: 2px solid #e5e7eb;
        }

        .projects-table__header-cell {
            padding: 0.875rem 1rem;
            text-align: left;
            font-size: 0.75rem;
            font-weight: 600;
            color: #6b7280;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .projects-table__row {
            border-bottom: 1px solid #f3f4f6;
            transition: background-color 0.15s ease;
        }

        .projects-table__row:last-child {
            border-bottom: none;
        }

        .projects-table__row:hover {
            background: #f9fafb;
        }

        .projects-table__cell {
            padding: 1.25rem 1rem;
            vertical-align: middle;
            font-size: 0.875rem;
        }

        /* Project Item
           ========================================================================== */
        .project__title {
            font-weight: 600;
            font-size: 0.9375rem;
            color: #111827;
            margin-bottom: 0.25rem;
        }

        .project__title-link {
            color: #111827;
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .project__title-link:hover {
            color: #3b82f6;
        }

        .project__subtitle {
            color: #6b7280;
            font-size: 0.8125rem;
            line-height: 1.4;
        }

        /* Status Indicators
           ========================================================================== */
        .status-group {
            display: flex;
            gap: 0.875rem;
            flex-wrap: wrap;
        }

        .status {
            display: flex;
            flex-direction: column;
            gap: 0.375rem;
            min-width: 100px;
        }

        .status__badge {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.375rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            line-height: 1.2;
            transition: all 0.15s ease;
            white-space: nowrap;
            position: relative;
        }

        .status__badge-icon {
            font-size: 0.875rem;
        }

        /* Status Badge Variants - PENDING (Not started) */
        .status__badge--pending {
            background: #f3f4f6;
            color: #9ca3af;
            border: 1.5px dashed #d1d5db;
        }

        /* Status Badge Variants - ONGOING (In progress) */
        .status__badge--ongoing {
            color: #1e40af;
            border: 1.5px solid #3b82f6;
        }

        .status__badge--ongoing .status__badge-icon {
            /*animation: spin 2s linear infinite;*/
        }

        @keyframes spin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }

        /* Status Badge Variants - FINISHED (Completed) */
        .status__badge--finished {
            color: #065f46;
            border: 1.5px solid #10b981;
        }

        /* Status Badge Variants - DISCARDED (Cancelled) */
        .status__badge--discarded {
            background: #fef2f2;
            color: #991b1b;
            border: 1.5px solid #fecaca;
            text-decoration: line-through;
            opacity: 0.7;
        }

        /* Status Date */
        .status__date {
            font-size: 0.6875rem;
            color: #9ca3af;
            font-weight: 500;
            padding-left: 0.25rem;
        }

        .status__date--soon {
            color: #f59e0b;
            font-weight: 600;
        }

        .status__date--overdue {
            color: #dc2626;
            font-weight: 600;
        }

        /* Actions
           ========================================================================== */
        .actions {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .action {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.25rem 0.75rem;
            border-radius: 6px;
            font-size: 0.8125rem;
            font-weight: 600;
            border: 1.5px solid;
            background: white;
            cursor: pointer;
            transition: all 0.15s ease;
            text-align: left;
            width: 100%;
            position: relative;
        }

        .action:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
        }

        .action__icon {
            font-size: 0.875rem;
            flex-shrink: 0;
        }

        .action__content {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
        }

        .action__label {
            font-weight: 600;
            white-space: nowrap;
        }

        .action__date {
            font-size: 0.6875rem;
            font-weight: 500;
            opacity: 0.85;
            white-space: nowrap;
        }

        /* Action Variants - PENDING (Action needed) */
        .action--pending {
            border-color: #9ca3af;
            color: #374151;
        }

        .action--pending:hover {
            border-color: #6b7280;
        }

        /* Action Variants - URGENT (Action needed soon!) */
        .action--urgent {
            border-color: #f59e0b;
            color: #92400e;
        }

        .action--urgent:hover {
            border-color: #d97706;
            animation: none;
        }


        /* Action Variants - OVERDUE (Action overdue!) */
        .action--overdue {
            border-color: #ef4444;
            color: #991b1b;
        }

        .action--overdue:hover {
            border-color: #dc2626;
        }

        .action--disabled {
            background: #f9fafb;
            border-color: #e5e7eb;
            color: #d1d5db;
            opacity: 0.7;
            cursor: not-allowed;
            pointer-events: none;
        }

        .action--disabled:hover {
            transform: none;
            box-shadow: none;
        }


        @keyframes shake {
            0%, 100% {
                transform: translateX(0);
            }
            25% {
                transform: translateX(-2px);
            }
            75% {
                transform: translateX(2px);
            }
        }

        @keyframes ping-fast {
            75%, 100% {
                transform: scale(2);
                opacity: 0;
            }
        }

        /* Action Variants - FINISHED (Completed) */
        .action--finished {
            background: #f0fdf4;
            border-color: #86efac;
            color: #166534;
            opacity: 0.7;
            cursor: default;
        }

        .action--finished:hover {
            transform: none;
            box-shadow: none;
        }

        .action--finished .action__label {
            text-decoration: line-through;
        }

        /* Action Variants - DISCARDED (Cancelled) */
        .action--discarded {
            background: #f9fafb;
            border-color: #e5e7eb;
            color: #9ca3af;
            opacity: 0.6;
            cursor: default;
        }

        .action--discarded:hover {
            transform: none;
            box-shadow: none;
        }

        .action--discarded .action__label {
            text-decoration: line-through;
        }

        .actions__empty {
            font-size: 0.8125rem;
            color: #9ca3af;
            font-style: italic;
        }

        /* Actions History Section */
        .actions__section {
            margin-bottom: 0.75rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .actions__section:last-child {
            margin-bottom: 0;
        }

        .actions__section-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }

        .actions__section-title {
            font-size: 0.6875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #9ca3af;
        }

        .actions__toggle {
            background: none;
            border: none;
            padding: 0.25rem;
            cursor: pointer;
            color: #6b7280;
            transition: color 0.15s ease;
            font-size: 0.75rem;
            line-height: 1;
        }

        .actions__toggle:hover {
            color: #3b82f6;
        }

        .actions__section--collapsed {
            display: none;
        }

        .actions__completed-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        /* Utilities
           ========================================================================== */
        .u-min-width-240 {
            min-width: 240px;
        }

        /* Responsive
           ========================================================================== */
        @media (max-width: 768px) {
            .dashboard__header {
                padding: 1.5rem 0;
            }

            .dashboard__title {
                font-size: 1.5rem;
                margin-bottom: 1rem;
            }

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

            .filters__left {
                width: 100%;
                flex-direction: column;
                align-items: stretch;
            }

            .filters__right {
                width: 100%;
                justify-content: stretch;
            }

            .filters__search {
                min-width: auto;
                width: 100%;
            }

            .filters__select {
                min-width: auto;
                width: 100%;
            }

            .filters__button {
                width: 100%;
            }

            .projects-table {
                border-radius: 8px;
            }

            .projects-table__cell {
                padding: 1rem 0.75rem;
            }

            .status-group {
                flex-direction: column;
                gap: 0.5rem;
            }

            .status {
                min-width: auto;
            }

            .filters__group {
                width: 100%;
            }
        }

        .projects-table {
            width: 100%;
            table-layout: fixed; /* garantit le respect des largeurs de colonnes */
        }

        .col-project {
            width: 250px; /* fixez à la valeur souhaitée ou utilisez un clamp(...) */
        }

        .filters__select--disabled {
            background-color: #f3f4f6;
            color: #9ca3af;
            cursor: not-allowed;
            opacity: 0.6;
            pointer-events: none;
        }

        .filters__select--disabled:hover {
            background-color: #f3f4f6;
            border-color: #d1d5db;
        }


        /* Criticité (Étoiles)
           ========================================================================== */
        .project__criticality {
            display: inline-flex;
            align-items: center;
            gap: 0.125rem;
            margin-left: 0.5rem;
        }

        .criticality-star {
            font-size: 0.75rem;
            line-height: 1;
        }

        .criticality-star--high {
            color: #dc2626;
        }

        .criticality-star--medium {
            color: #f59e0b;
        }

        .criticality-star--low {
            color: #10b981;
        }

        .criticality-star--empty {
            color: #e5e7eb;
        }

        /* Logo Marque
           ========================================================================== */
        .project__logo-wrapper {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
        }

        .project__logo {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            border: 1px solid #e5e7eb;
            overflow: hidden;
            flex-shrink: 0;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            align-self: center;
        }

        .project__logo-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .project__logo-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            font-size: 0.75rem;
            font-weight: 600;
            color: #9ca3af;
            text-transform: uppercase;
        }

        .project__info {
            flex: 1;
            min-width: 0;
        }

        /* Badge Type de Projet
           ========================================================================== */
        .project__type-badge {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.6rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            margin-top: 0.375rem;
            border: 1.5px solid;
            line-height: 1.2;
        }



        /* Badge Rôle (dans les actions)
           ========================================================================== */
        .action__role {
            display: inline-flex;
            align-items: center;
            padding: 0.1rem 0.3rem;
            border-radius: 3px;
            font-size: 0.5rem;
            font-weight: 600;
            letter-spacing: 0.015em;
            margin-left: auto;
            flex-shrink: 0;
            border: 1px solid;
        }

        /* Ajustement de la structure des actions pour accueillir le rôle */
        .action__content--with-role {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
            justify-content: space-between;
        }

        .action__main-info {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1;
            min-width: 0;
        }

        /* Responsive - Mobile
           ========================================================================== */
        @media (max-width: 768px) {
            .project__logo {
                width: 32px;
                height: 32px;
            }

            .project__logo-wrapper {
                gap: 0.5rem;
            }

            .project__criticality {
                margin-left: 0.25rem;
            }

            .criticality-star {
                font-size: 0.6875rem;
            }

            .project__type-badge {
                font-size: 0.825rem;
                padding: 0.1875rem 0.5rem;
            }

            .action__role {
                font-size: 0.5625rem;
                padding: 0.125rem 0.25rem;
            }
        }
