﻿@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    src: url('../font/Atkinson_Hyperlegible_Next/AtkinsonHyperlegibleNext-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bleu-1: #01113B;
    --bleu-2: #D9E7FF;
    --orange-1: #B83400;
    --orange-2: #FFB99D;
    --vert-1: #233807;
    --vert-2: #e7ffde;
    --noir: #202020;
    --gris: #F6F6F6;

    
    --fs-h1: clamp(3rem, 0.65rem + 4vw, 7rem);
    --fs-h2: clamp(2.75rem, 0.6rem + 3.5vw, 6.5rem);
    --fs-h3: clamp(2.5rem, 0.55rem + 2.5vw, 5.5rem);
    --fs-h4: clamp(2.25rem, 0.6rem + 2.0vw, 5rem);

    
    --fs-subtitle-lg: clamp(1.5rem, 0.6rem + 0.83vw, 2rem);
    --fs-subtitle-md: clamp(1.375rem, 0.55rem + 0.73vw, 1.875rem);
    --fs-subtitle-sm: clamp(1.25rem, 0.5rem + 0.63vw, 1.75rem);
    --fs-subtitle-xs: clamp(0.9rem, 0.4rem + 0.5vw, 1.25rem);

    
    --fs-body: clamp(1.5rem, 0.78rem + 0.89vw, 1.75rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--bleu-1) var(--gris);
}

body {
    background-color: var(--gris);
    color: var(--noir);
    line-height: 1.2;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    overflow-x: auto;
    width: 100%;
    max-width: 100vw;
    font-family: 'Atkinson Hyperlegible Next';
}


.sidebar {
    width: 280px;
    min-height: 100vh;
    background-color: var(--gris);
    border-right: 1px solid var(--bleu-2);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 50px;
}

/* Masquer les textes quand la sidebar est pliée, garder uniquement les logos et icônes */
.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .resources-title,
.sidebar.collapsed .user-title,
.sidebar.collapsed .user-details,
.sidebar.collapsed .promo-box,
.sidebar.collapsed .promo-box * {
    display: none;
}

/* Centrer l'icône admin quand la sidebar est pliée */
.sidebar.collapsed .user-title-container {
    justify-content: center;
    margin-bottom: 16px;
}

.sidebar.collapsed .admin-icon {
    margin-right: 0;
}

/* Garder l'avatar carré et centré quand la sidebar est pliée */
.sidebar.collapsed .user-info {
    justify-content: center;
    padding: 0 0 16px 0;
}

.sidebar.collapsed .user-avatar {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;
    max-width: 35px;
    max-height: 35px;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .logo-section {
    padding: 24px 0;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.sidebar.collapsed .logo-section .logo {
    padding: 0 12px;
    width: 50px;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    position: relative;
}

.sidebar.collapsed .logo-section .logo img {
    height: 40px;
    width: auto;
    max-width: none;
    clip-path: polygon(0 0, 30px 0, 30px 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, 30px 0, 30px 100%, 0 100%);
}

.sidebar-toggle {
    position: fixed !important;
    left: 280px;
    top: 50%;
    transform: translateY(-50%) !important;
    width: 30px;
    height: 50px;
    background-color: var(--gris);
    border: 1px solid var(--bleu-2);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001 !important;
    transition: left 0.3s ease;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
    background-color: var(--bleu-2);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.sidebar-toggle:focus {
    /* outline: 2px solid var(--bleu-1); */
    outline-offset: 2px;
}

.sidebar-toggle i {
    color: var(--bleu-1);
    font-size: 14px;
    transition: transform 0.3s ease;
}

body.sidebar-collapsed .sidebar-toggle {
    left: 50px !important;
    transform: translateY(-50%) !important;
}

body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg) !important;
}

.sidebar-toggle:active {
    transform: translateY(-50%) scale(0.95) !important;
}

body.sidebar-collapsed .sidebar-toggle:active {
    transform: translateY(-50%) scale(0.95) !important;
}


.logo-section {
    padding: 24px 20px;
    border-bottom: 1px solid var(--bleu-2);
    text-align: center;
}

.logo-section .logo img {
    height: 40px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--noir);
    letter-spacing: -0.5px;
    margin: 0;
}


.sidebar-nav {
    padding: 20px 0;
    flex: 1;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 20px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--noir);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
}

.nav-item.active .nav-link {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
    border-left: 3px solid var(--bleu-1);
}

.nav-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.nav-link:active {
    transform: scale(0.98);
}

.nav-link:focus {
    outline: 2px solid var(--bleu-1);
    outline-offset: 2px;
}


.user-section {
    padding: 20px 0 0 0;
    border-top: 1px solid var(--bleu-2);
    background: white;
    margin-top: auto;
    margin-bottom: -20px;
}

.user-title-container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.user-title {
    font-size: 12px;
    font-weight: 600;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 20px;
}

.admin-icon {
    color: var(--bleu-1);
    font-size: 12px;
    padding: 2px;
    transition: all 0.2s ease;
    opacity: 0.7;
    margin-right: 20px;
}

.admin-icon:hover {
    color: var(--bleu-1);
    background-color: var(--bleu-2);
    opacity: 1;
    transform: rotate(90deg);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 16px 20px;
    border-bottom: 1px solid var(--bleu-2);
    margin-bottom: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--bleu-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-details h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--noir);
}

.user-details p {
    margin: 0;
    font-size: 12px;
    color: #3a3a3a;
}

.user-section .nav-link {
    color: var(--orange-1);
    font-weight: 600;
}

.user-section .nav-link:hover {
    background-color: var(--orange-2);
    color: var(--orange-1);
}


.resources-section {
    padding: 20px 0;
    border-top: 1px solid var(--bleu-2);
}

.resources-title {
    font-size: 12px;
    font-weight: 600;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 20px;
}

.resources-section::before {
    font-size: 12px;
    font-weight: 600;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 20px;
}


.promo-box {
    margin: 20px;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#promo-heading {
    font-size: 16px;
    font-weight: 600;
    color: var(--bleu-1);
    margin-bottom: 8px;
    line-height: 1.4;
}

.promo-description {
    font-size: 13px;
    color: #3a3a3a;
    margin-bottom: 16px;
    line-height: 1.4;
}

.promo-button {
    width: 100%;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 1px solid var(--bleu-2);
    color: var(--noir);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.promo-button:hover {
    background-color: var(--bleu-2);
    border-color: var(--bleu-1);
    color: var(--bleu-1);
}

.promo-button:active {
    transform: scale(0.98);
}

.promo-button:focus {
    outline: 2px solid var(--bleu-1);
    outline-offset: 2px;
}

.promo-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.promo-button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background-color: var(--gris);
    min-height: 100vh;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
    min-width: 0;
    transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;
}

body.sidebar-collapsed .main-content {
    margin-left: 50px;
    width: calc(100% - 50px);
    max-width: calc(100% - 50px);
}

.pipeline-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.header-right .pipeline-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(30%);
}

.floating-pipeline-steps {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    z-index: 1000 !important;
    background: white !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: 1px solid var(--bleu-2) !important;
    backdrop-filter: blur(10px) !important;
    max-width: 90vw !important;
    overflow-x: auto !important;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
    opacity: 0 !important;
}

.floating-pipeline-steps.show {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 2px solid rgba(0, 0, 0, 0.08);
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    min-width: 85px;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    user-select: none;
}

.pipeline-step:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.pipeline-step.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.pipeline-step i {
    font-size: 16px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.pipeline-step.active i {
    opacity: 1;
}

.pipeline-step span {
    font-size: 14px;
    font-weight: 600;
}

.floating-pipeline-steps .pipeline-step {
    padding: 12px 16px !important;
}

.header-right .pipeline-step {
    padding: 12px 16px;
}


.pipeline-step[onclick*="analyse"]:hover {
    border-color: var(--vert-1);
    background: linear-gradient(135deg, var(--vert-2) 0%, rgba(231, 255, 222, 0.8) 100%);
    box-shadow: 0 6px 20px rgba(35, 56, 7, 0.25);
    color: var(--vert-1);
}

.pipeline-step[onclick*="extraction"]:hover {
    border-color: #DC2626;
    background: linear-gradient(135deg, #FEE2E2 0%, rgba(254, 226, 226, 0.8) 100%);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
    color: #DC2626;
}

.pipeline-step[onclick*="questionner"]:hover {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 6px 20px rgba(1, 17, 59, 0.25);
    color: var(--bleu-1);
}

.pipeline-step[onclick*="generer"]:hover {
    border-color: #202020;
    background: linear-gradient(135deg, #F2F2F2 0%, rgba(242, 242, 242, 0.9) 100%);
    box-shadow: 0 6px 20px rgba(32, 32, 32, 0.25);
    color: #202020;
}

.pipeline-step[onclick*="analyse"].active {
    background: linear-gradient(135deg, var(--vert-1) 0%, #1a2e05 100%);
    border-color: var(--vert-1);
    box-shadow: 0 4px 16px rgba(35, 56, 7, 0.3);
}

.pipeline-step[onclick*="extraction"].active {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.pipeline-step[onclick*="questionner"].active {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #000a2a 100%);
    border-color: var(--bleu-1);
    box-shadow: 0 4px 16px rgba(1, 17, 59, 0.3);
}

.pipeline-step[onclick*="generer"].active {
    background: linear-gradient(135deg, #202020 0%, #000000 100%);
    border-color: #202020;
    color: white;
    box-shadow: 0 4px 16px rgba(32, 32, 32, 0.3);
}

.pipeline-step[onclick*="analyse"].active:hover {
    background: linear-gradient(135deg, var(--vert-1) 0%, #1a2e05 100%);
    border-color: var(--vert-1);
    color: white;
    box-shadow: 0 6px 20px rgba(35, 56, 7, 0.4);
}

.pipeline-step[onclick*="extraction"].active:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
    color: white;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.pipeline-step[onclick*="questionner"].active:hover {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #000a2a 100%);
    border-color: var(--bleu-1);
    color: white;
    box-shadow: 0 6px 20px rgba(1, 17, 59, 0.4);
}

.pipeline-step[onclick*="generer"].active:hover {
    background: linear-gradient(135deg, #202020 0%, #000000 100%);
    border-color: #202020;
    color: white;
    box-shadow: 0 6px 20px rgba(32, 32, 32, 0.4);
}

.pipeline-arrow {
    font-size: 24px;
    color: var(--gray-3);
    font-weight: 600;
    margin: 0 4px;
    pointer-events: none;
    user-select: none;
    flex-shrink: 0;
}

.content-wrapper {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    min-width: 0;
}

.content-wrapper header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--noir);
}

.content-wrapper p {
    font-size: 1.1rem;
    color: #3a3a3a;
    line-height: 1.6;
}


.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pipeline-type-display {
    display: flex;
    align-items: center;
}

.pipeline-type-badge {
    background: var(--orange-1);
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pipeline-type-badge i {
    font-size: 12px;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #3a3a3a;
    border: 1px solid var(--bleu-2);
    padding: 8px 10px;
}

.back-link:hover {
    color: var(--bleu-1);
    border-color: var(--bleu-1);
}

.create-pipeline-btn {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Atkinson Hyperlegible Next';
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.create-pipeline-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.create-pipeline-btn:hover::before {
    left: 100%;
}

.create-pipeline-btn:hover {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.3);
}


.section-title {
    font-size: 1.8rem;
    font-weight: 650;
    color: var(--noir);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--bleu-1) 0%, var(--bleu-2) 100%);
    opacity: 0.35;
}

.section-title--emphasis {
    font-weight: 750;
    letter-spacing: -0.015em;
}

.section-title--emphasis::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--bleu-1);
    box-shadow: 0 0 0 4px var(--bleu-2);
}

.section-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--bleu-1);
    text-transform: uppercase;
}

.features-section .section-title,
.templates-section .section-title {
    margin-bottom: 2rem;
}


.features-section {
    margin-bottom: 4rem;
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.feature-card {
    flex: 1;
    min-width: 350px;
    max-width: 350px;
    background: white;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--bleu-2);
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bleu-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--bleu-1);
    font-size: 20px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.9rem;
    color: #3a3a3a;
    line-height: 1.5;
}


.templates-section {
    margin-bottom: 4rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 350px));
    gap: 2rem;
    justify-content: left;
}

.template-card {
    flex: 1;
    min-width: 350px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--bleu-2);
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.template-card:link,
.template-card:visited,
.template-card:hover,
.template-card:active {
    text-decoration: none;
    color: inherit;
}

.template-card *,
.template-card *:hover {
    text-decoration: none;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.template-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0.75rem;
    background: #F8FAFC;
    border-bottom: 1px solid var(--bleu-2);
    flex-shrink: 0;
}

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

.template-header-bottom {
    display: flex;
    align-items: center;
    width: 100%;
}

.template-type-badge {
    background: var(--orange-1);
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.template-type-badge i {
    font-size: 10px;
}

.template-badge {
    background: var(--bleu-1);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.template-badge.multi {
    background: var(--bleu-1);
}

.template-files {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.pipeline-actions-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.user-pipeline-card:hover .pipeline-actions-container {
    opacity: 1;
}

.pipeline-edit-icon,
.pipeline-delete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--bleu-1);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 100;
    transition: all 0.2s ease;
    font-size: 14px;
    pointer-events: auto;
}

.pipeline-edit-icon:hover {
    background-color: var(--bleu-2);
    color: var(--orange-1);
    transform: rotate(90deg);
}

.pipeline-delete-icon {
    color: var(--orange-1);
}

.pipeline-delete-icon:hover {
    background-color: var(--orange-2);
    color: #DC2626;
    transform: scale(1.1);
}

.pipeline-edit-icon:focus,
.pipeline-delete-icon:focus {
    outline: 2px solid var(--bleu-1);
    outline-offset: 2px;
}

.pipeline-edit-icon i,
.pipeline-delete-icon i {
    font-size: 14px;
}

.template-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

/* Conteneur des aperçus de documents */
.template-preview-container {
    margin: 0;
    margin-top: -0.25rem;
    position: relative;
}

.template-preview-empty {
    width: 100%;
    height: 150px;
    background: #f8f9fa;
}

/* Carrousel de previews */
.template-preview-carousel {
    position: relative;
    width: 100%;
    height: 150px;
}

/* Preview unique simplifiée */
.template-preview-single {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: white;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.template-preview-single.active {
    opacity: 1;
}

/* Image de preview */
.template-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback quand l'image n'est pas disponible */
.template-preview-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #6b7280;
}

.template-preview-fallback i {
    font-size: 2.5rem;
    opacity: 0.5;
}

.template-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 0;
}


.templates-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}


.files-section {
    background: var(--gris);
    border: 1px solid var(--bleu-2);
    padding: 16px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    box-sizing: border-box;
    min-width: 0;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    min-width: 0;
    width: 100%;
}

.files-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--noir);
}

.files-content {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--bleu-2) var(--gris);
    -webkit-overflow-scrolling: touch;
}

.files-content::-webkit-scrollbar {
    height: 8px;
}

.files-content::-webkit-scrollbar-track {
    background: var(--gris);
}

.files-content::-webkit-scrollbar-thumb {
    background: var(--bleu-2);
}

.files-content::-webkit-scrollbar-thumb:hover {
    background: var(--bleu-1);
}


.file-item {
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    height: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.file-structured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.file-structured-badge i {
    font-size: 20px;
    color: var(--bleu-1) !important;
}

.file-structured-badge.file-not-structured {
    background: none;
    opacity: 1;
}

.file-structured-badge.file-not-structured i {
    font-size: 16px;
    color: var(--bleu-1) !important;
}

.file-processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}

.processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    text-align: center;
}

.processing-spinner {
    font-size: 32px;
    color: white;
    animation: spin 1s linear infinite;
}

.processing-spinner i {
    display: block;
}

.processing-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.file-item:hover {
    background-color: var(--gris);
    border-color: var(--bleu-1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.file-item.active {
    background-color: var(--bleu-2);
    border-color: var(--bleu-1);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.3);
}

/* Mode sélection */
.file-item.selection-mode {
    cursor: pointer;
}

.file-item.selection-mode.selected {
    border-color: var(--bleu-1);
    background-color: var(--bleu-2);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.4);
    opacity: 1;
}

.file-item.selection-mode:not(.selected) {
    opacity: 0.7;
}

.file-selection-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 25;
    background: transparent;
    width: auto;
    height: auto;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-item.selected .file-selection-checkbox {
    background: transparent;
}

.file-selection-checkbox i {
    font-size: 18px;
    color: var(--bleu-1);
    transition: all 0.2s ease;
}

.file-item.selected .file-selection-checkbox i {
    color: var(--bleu-1);
}

.file-item.selection-mode:hover .file-selection-checkbox {
    transform: scale(1.1);
}

.file-item.selection-mode:hover .file-selection-checkbox i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Masquer le badge de suppression individuelle en mode sélection */
.file-item.selection-mode .file-delete-badge {
    display: none !important;
}

.files-content .file-item:hover {
    background: var(--gris) !important;
    border-color: var(--bleu-1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    transform: translateY(-2px) !important;
}

.files-content .file-item.active {
    background: var(--bleu-2) !important;
    border-color: var(--bleu-1) !important;
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.3) !important;
}

.file-preview {
    position: relative;
    width: 120px;
    height: 80px;
    background: white;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-thumbnail {
    width: 100%;
    height: 100%;
    background: #FF6B6B;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.pdf-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.pdf-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--noir);
    font-size: 12px;
    gap: 8px;
}

.pdf-fallback i {
    font-size: 24px;
    color: var(--orange-1);
}

.file-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.2;
}

.file-overlay .file-name {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-pages {
    display: block;
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
}

/* Icône de suppression de fichier */
.file-delete-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: all 0.2s;
}

/* Afficher l'icône uniquement au survol du fichier */
.file-item:hover .file-delete-badge {
    opacity: 1;
}

.file-delete-badge:hover {
    transform: scale(1.2);
}

.file-delete-badge i {
    font-size: 20px;
    color: #dc3545;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.file-delete-badge:hover i {
    color: #c82333;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    font-family: 'Atkinson Hyperlegible Next';
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.download-btn {
    background: linear-gradient(135deg, var(--noir) 0%, #333 100%);
    color: white;
    padding: 10px;
    width: 36px;
    height: 36px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(32, 32, 32, 0.2);
}

.download-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.3);
}

.download-btn.disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

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

.download-btn.disabled::before {
    display: none;
}

.add-btn {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    padding: 10px 16px;
    height: 36px;
    box-shadow: 0 2px 8px rgba(1, 17, 59, 0.2);
}

.add-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.3);
}

.add-btn.disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

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

.add-btn.disabled::before {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Atkinson Hyperlegible Next';
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary,
.btn {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.btn.primary:hover,
.btn:hover {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.3);
}

.btn.secondary {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
    border: 1px solid var(--bleu-2);
    box-shadow: 0 2px 8px rgba(1, 17, 59, 0.1);
}

.btn.secondary:hover {
    background-color: var(--bleu-1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 17, 59, 0.2);
}

.btn.danger {
    background-color: var(--orange-1);
    color: white;
    box-shadow: 0 4px 15px rgba(184, 52, 0, 0.2);
}

.btn.danger:hover {
    background-color: #9b2c00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 52, 0, 0.3);
}

.btn.success {
    background: linear-gradient(135deg, var(--vert-1) 0%, #1a4d00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(35, 56, 7, 0.2);
}

.btn.success:hover {
    background: linear-gradient(135deg, #1a4d00 0%, var(--vert-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 56, 7, 0.3);
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

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

.btn:disabled::before {
    display: none;
}

.btn-primary {
    background: var(--bleu-1);
}

.rag-unavailable {
    padding: 2rem;
    text-align: center;
}

.error-message {
    color: var(--orange-1);
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}


.collapsible {
    cursor: pointer;
    user-select: none;
}

.collapsible:hover {
    background-color: var(--bleu-2);
}

.toggle-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(0deg);
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.auth-page {
    margin: 0;
    padding: 0;
    font-family: 'Atkinson Hyperlegible Next';
    background-color: var(--gris);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.auth-container.register {
    max-width: 500px;
}

.auth-card {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    text-align: center;
    transition: all 0.2s ease;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.auth-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-logo p {
    color: #3a3a3a;
    margin: 0;
    font-size: 0.9rem;
}

.auth-form {
    text-align: left;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    margin-bottom: 0;
    flex: 1;
}

.form-row .form-group input {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--bleu-1);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bleu-1);
}

.form-group .errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.form-group .errorlist li {
    color: var(--orange-1);
    font-size: 0.8rem;
    font-weight: 500;
}

.auth-login-btn,
.auth-register-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Atkinson Hyperlegible Next';
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.auth-login-btn::before,
.auth-register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-login-btn:hover::before,
.auth-register-btn:hover::before {
    left: 100%;
}

.auth-login-btn:hover,
.auth-register-btn:hover {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.3);
}

.auth-links {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bleu-1);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    justify-content: center;
}

.auth-link:hover {
    color: var(--orange-1);
}

.auth-link.secondary {
    color: #3a3a3a;
}

.auth-link.secondary:hover {
    color: var(--bleu-1);
}

.auth-page .messages {
    margin-bottom: 1.5rem;
}

.auth-page .messages .alert {
    padding: 12px 16px;
    font-weight: 500;
}

.auth-page .messages .alert-success {
    background-color: var(--vert-2);
    color: var(--vert-1);
    border: 1px solid var(--vert-1);
}

.auth-page .messages .alert-error {
    background-color: #ffeaea;
    color: var(--orange-1);
    border: 1px solid var(--orange-1);
}


.info-message {
    background-color: var(--bleu-1);
    color: var(--bleu-3);
    padding: 1rem;
    border-left: 4px solid var(--bleu-2);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.info-message i {
    color: var(--bleu-2);
    font-size: 1.1rem;
}

.files-content .info-message {
    background-color: var(--orange-1);
    color: var(--orange-3);
    border-left-color: var(--orange-2);
    margin: 0;
}

.files-content .info-message i {
    color: var(--orange-2);
}


.pipeline-workflow {
    background: var(--white);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pipeline-container h3 {
    color: var(--gray-3);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}


.default-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e1;
    color: #64748b;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

.default-upload-placeholder i {
    font-size: clamp(16px, 4vw, 24px);
    margin-bottom: clamp(4px, 1vw, 8px);
    color: var(--orange-1);
}

.default-upload-placeholder p {
    font-size: clamp(10px, 2.5vw, 14px);
    font-weight: 600;
    margin: 0 0 clamp(2px, 0.5vw, 4px) 0;
    color: #475569;
    line-height: 1.1;
}

.default-upload-placeholder span {
    font-size: clamp(8px, 2vw, 12px);
    color: #64748b;
    line-height: 1.2;
    max-width: 90%;
    word-wrap: break-word;
}

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.uploaded-file-info .file-details {
    flex: 1;
}

.uploaded-file-info .file-name {
    font-weight: bold;
    margin: 0 0 5px 0;
    color: var(--noir);
    font-size: 0.9em;
}

.file-size, .file-date {
    font-size: 0.75em;
    color: var(--noir);
    margin: 2px 0;
}

.uploaded-file-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    margin: 8px 0 !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-height: 60px !important;
}

.uploaded-file-item:hover {
    background: var(--gris) !important;
    border-color: var(--bleu-1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    transform: translateY(-2px) !important;
}

.uploaded-file-item.active {
    background: var(--bleu-2) !important;
    border-color: var(--bleu-1) !important;
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.3) !important;
}

.file-icon {
    margin-right: 12px !important;
    color: var(--orange-1) !important;
    font-size: 24px !important;
}

.file-info {
    flex: 1 !important;
}

.uploaded-file-item .file-name {
    font-weight: bold !important;
    color: var(--noir) !important;
    margin-bottom: 4px !important;
}

.uploaded-file-item .file-details {
    display: flex !important;
    gap: 12px !important;
    font-size: 12px !important;
    color: var(--noir) !important;
}

.uploaded-file-item .file-preview {
    width: 60px !important;
    height: 80px !important;
    margin-right: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.pdf-thumbnail {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    pointer-events: none !important;
}

.file-background {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: var(--gris);
    flex: 1;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.file-background::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.file-background::-webkit-scrollbar-track {
    display: none !important;
}

.file-background::-webkit-scrollbar-thumb {
    display: none !important;
}

.file-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.file-foreground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    pointer-events: none;
}

.file-name-overlay {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gris);
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    background: var(--bleu-1);
}

.file-name-overlay i {
    color: var(--orange-1);
}

.admin-login-container {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gris);
    padding: 20px;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.admin-login-card {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    margin: auto;
}

.admin-logo {
    margin-bottom: 2rem;
}

.admin-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bleu-1);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.admin-logo p {
    color: #3a3a3a;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.admin-form-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    
    gap: 30px;
    align-items: start;
}

.admin-form-card {
    background: white;
    border: 1px solid var(--bleu-2);
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.admin-form-container.pipeline-layout {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.admin-form-container.pipeline-layout .admin-form-card:first-child {
    grid-column: 1;
}

.admin-form-container.pipeline-layout .admin-form-card:last-child {
    grid-column: 2;
}

.admin-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bleu-2);
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--bleu-1);
    font-size: 16px;
    font-family: 'Atkinson Hyperlegible Next';
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-form-input,
.admin-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.admin-form-input:focus,
.admin-form-select:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.admin-form-help {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--bleu-2);
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Atkinson Hyperlegible Next';
    position: relative;
    overflow: hidden;
}

.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.admin-btn:hover::before {
    left: 100%;
}

.admin-btn.primary {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.admin-btn.primary:hover {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.3);
}

.admin-btn.secondary {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
    border: 1px solid var(--bleu-2);
}

.admin-btn.secondary:hover {
    background-color: var(--bleu-1);
    color: white;
}

.admin-btn.danger {
    background-color: var(--orange-1);
    color: white;
}

.admin-btn.danger:hover {
    background-color: #9b2c00;
    transform: translateY(-1px);
}


.admin-header-actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
    height: 100%;
}

.admin-header-actions .admin-btn,
.admin-header-actions .admin-back-link {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.admin-header-actions .admin-btn {
    padding: 12px 20px;
}

.admin-header-actions .admin-back-link {
    padding: 12px 16px;
}


.admin-delete-warning {
    display: flex;
    gap: 16px;
    padding: 20px;
    background-color: #fff5f5;
    border: 2px solid #fed7d7;
    margin-bottom: 20px;
}

.admin-warning-icon {
    color: var(--orange-1);
    font-size: 24px;
    margin-top: 4px;
}

.admin-warning-content h4 {
    color: var(--orange-1);
    margin-bottom: 8px;
}

.admin-user-to-delete {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border: 1px solid #fed7d7;
}

.admin-user-avatar-small {
    width: 40px;
    height: 40px;
    background-color: var(--bleu-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.admin-user-info-small h5 {
    margin: 0;
    font-size: 16px;
}

.admin-user-info-small p {
    margin: 2px 0;
    font-size: 14px;
    color: #666;
}

.admin-warning-text {
    margin: 12px 0 8px 0;
    font-weight: 600;
}

.admin-warning-list {
    margin: 8px 0;
    padding-left: 20px;
}

.admin-warning-list li {
    margin: 4px 0;
    color: #666;
}


.admin-pipeline-to-delete {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border: 1px solid #fed7d7;
}

.admin-pipeline-icon-small {
    width: 40px;
    height: 40px;
    background-color: var(--bleu-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.admin-pipeline-info-small h5 {
    margin: 0;
    font-size: 16px;
}

.admin-pipeline-info-small p {
    margin: 2px 0;
    font-size: 14px;
    color: #666;
}

.admin-pipeline-details-small {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.admin-pipeline-detail-small {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.admin-pipeline-detail-small i {
    width: 12px;
    text-align: center;
}


.admin-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    resize: vertical;
    min-height: 80px;
}

.admin-form-textarea:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.admin-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    transition: background-color 0.2s ease;
}

.admin-checkbox-item:hover {
    background-color: var(--bleu-2);
}

.admin-checkbox-item input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.admin-checkbox-label {
    font-weight: 500;
    color: var(--bleu-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-checkbox-label i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.admin-form-file {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
    position: relative;
    font-family: 'Atkinson Hyperlegible Next';
}

.admin-form-file:hover {
    border-color: var(--bleu-1);
    background: var(--bleu-2);
    transform: translateY(-1px);
}

.admin-form-file::file-selector-button {
    background: var(--orange-1);
    color: white;
    border: none;
    padding: 8px 16px;
    margin-right: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Atkinson Hyperlegible Next';
}

.admin-form-file::file-selector-button:hover {
    background: #a02d00;
    transform: scale(1.05);
}

.admin-files-section {
    margin-top: 20px;
}

.admin-files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bleu-2);
    border: 1px solid var(--bleu-2);
    transition: all 0.2s ease;
}

.admin-file-icon {
    width: 40px;
    height: 40px;
    background-color: var(--orange-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.admin-file-info {
    flex: 1;
}

.admin-file-info h5 {
    margin: 0;
    font-size: 16px;
    color: var(--bleu-1);
}

.admin-file-info p {
    margin: 2px 0 0 0;
    font-size: 14px;
    color: #666;
}

.admin-file-actions {
    display: flex;
    gap: 8px;
}

.admin-empty-files {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.admin-empty-files i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--bleu-2);
}

.admin-empty-files small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.admin-upload-form {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed var(--bleu-2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-upload-form:hover {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateY(-2px);
}


.admin-upload-form.drag-over {
    border-color: var(--orange-1);
    background: linear-gradient(135deg, var(--orange-2) 0%, #fff5f0 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(184, 52, 0, 0.2);
}

.admin-upload-form.file-selected {
    border-color: var(--vert-1);
    background: linear-gradient(135deg, var(--vert-2) 0%, #f0fff4 100%);
}


.pipeline-form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pipeline-form-section .admin-form-group {
    margin-bottom: 16px;
}

.pipeline-form-section .admin-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}


.admin-search-container {
    background: white;
    border: 1px solid var(--bleu-2);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-search-form {
    width: 100%;
}

.admin-search-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-search-input-group {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.admin-search-input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bleu-1);
    font-size: 14px;
}

.admin-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.admin-filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-filter-select {
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    min-width: 150px;
}

.admin-filter-select:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.admin-search-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.admin-search-actions .admin-btn {
    height: 44px;
    padding: 12px 16px;
    font-size: 14px;
}


.admin-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 20px;
    font-weight: 500;
    border-left: 4px solid;
    position: relative;
    transition: all 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.admin-message-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.admin-message-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.admin-message-success {
    background-color: var(--vert-2);
    color: var(--vert-1);
    border-left-color: var(--vert-1);
}

.admin-message-error {
    background-color: #ffe6e6;
    color: var(--orange-1);
    border-left-color: var(--orange-1);
}

.admin-message-info {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
    border-left-color: var(--bleu-1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.admin-login-btn {
    width: 100%;
    background-color: var(--bleu-1);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-login-btn:hover {
    background-color: var(--orange-1);
    transform: translateY(-1px);
}

.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bleu-1);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
}

.admin-back-link:hover {
    color: var(--orange-1);
}

.messages {
    margin-bottom: 1.5rem;
}

.messages .alert {
    padding: 12px 16px;
    font-weight: 500;
}

.messages .alert-success {
    background-color: var(--vert-2);
    color: var(--vert-1);
    border: 1px solid var(--vert-1);
}

.messages .alert-error {
    background-color: #ffeaea;
    color: var(--orange-1);
    border: 1px solid var(--orange-1);
}


.admin-layout {
    display: flex;
    min-height: 100vh;
}


.admin-sidebar {
    width: 280px;
    min-height: 100vh;
    background-color: var(--gris);
    border-right: 1px solid var(--bleu-2);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.admin-logo-section {
    padding: 24px 20px;
    border-bottom: 1px solid var(--bleu-2);
    background: var(--gris);
    color: var(--noir);
    text-align: center;
}

.admin-logo-img {
    height: 40px;
    width: auto;
}

.admin-nav {
    padding: 20px 0;
    flex: 1;
}

.admin-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-item {
    margin: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--noir);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.admin-nav-link:hover {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
}

.admin-nav-item.active .admin-nav-link {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
    border-left: 3px solid var(--bleu-1);
}

.admin-nav-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}


.admin-back-to-site {
    padding: 20px;
    border-top: 1px solid var(--bleu-2);
    background: white;
}

.admin-back-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--bleu-2), #e6f2ff);
    color: var(--bleu-1);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--bleu-2);
    box-shadow: 0 2px 8px rgba(1, 17, 59, 0.1);
    position: relative;
    overflow: hidden;
}

.admin-back-btn:hover {
    background: var(--bleu-1);
    color: white;
    border-color: var(--bleu-1);
    transform: translateY(-2px);
}

.admin-back-btn:active {
    transform: translateY(-1px);
}

.admin-back-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.admin-back-btn:hover i {
    transform: scale(1.1);
}

.admin-user-section {
    padding: 20px;
    border-top: 1px solid var(--bleu-2);
    background: white;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--bleu-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.admin-user-details h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--noir);
}

.admin-user-details p {
    margin: 0;
    font-size: 12px;
    color: #3a3a3a;
}

.admin-logout-btn {
    width: 100%;
    background: var(--orange-1);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.admin-logout-btn:hover {
    background: #a02d00;
    transform: translateY(-1px);
}

.admin-main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background-color: var(--gris);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .admin-main-content {
    margin-left: 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    min-height: 60px;
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--noir);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header h1::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--bleu-1) 0%, var(--bleu-2) 100%);
    opacity: 0.35;
}


.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.admin-stat-card {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: all 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bleu-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu-1);
    font-size: 20px;
}

.admin-stat-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--noir);
    margin: 0;
}

.admin-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bleu-1);
    margin: 0;
}

.admin-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.admin-content-card {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-content-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bleu-2);
    background: #F8FAFC;
}

.admin-content-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--noir);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-content-body {
    padding: 1.5rem;
}

.admin-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bleu-2);
}

.admin-list-item:last-child {
    border-bottom: none;
}

.admin-list-icon {
    width: 32px;
    height: 32px;
    background-color: var(--bleu-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu-1);
    font-size: 14px;
}

.admin-list-content h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--noir);
}

.admin-list-content p {
    margin: 0;
    font-size: 12px;
    color: #3a3a3a;
}

.admin-empty-state {
    text-align: center;
    padding: 2rem;
    color: #3a3a3a;
}

.admin-empty-state i {
    font-size: 2rem;
    color: var(--bleu-2);
    margin-bottom: 1rem;
}


.admin-users-grid {
    display: grid;
    gap: 1.5rem;
}

.admin-user-card {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.admin-user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-user-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1.5rem;
    border-bottom: 1px solid var(--bleu-2);
    background: #F8FAFC;
}

.admin-user-avatar-large {
    width: 60px;
    height: 60px;
    background-color: var(--bleu-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.admin-user-info-large h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--noir);
}

.admin-user-info-large p {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: #3a3a3a;
}

.admin-user-role {
    display: inline-block;
    background: var(--bleu-1);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-user-body {
    padding: 1.5rem;
}

.admin-user-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-user-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-user-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #3a3a3a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-user-detail-value {
    font-size: 14px;
    color: var(--noir);
    font-weight: 500;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.admin-action-btn {
    padding: 8px 12px;
    border: 1px solid var(--bleu-2);
    background: white;
    color: var(--noir);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-action-btn:hover {
    background: var(--bleu-2);
    color: var(--bleu-1);
}

.admin-action-btn.danger {
    border-color: var(--orange-1);
    color: var(--orange-1);
}

.admin-action-btn.danger:hover {
    background: var(--orange-1);
    color: white;
}


.admin-pipelines-grid {
    display: grid;
    gap: 1.5rem;
}

.admin-pipeline-card {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.admin-pipeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--bleu-2);
    background: #F8FAFC;
}

.admin-pipeline-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-pipeline-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bleu-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu-1);
    font-size: 20px;
}

.admin-pipeline-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--noir);
}

.admin-pipeline-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: #3a3a3a;
}

.admin-pipeline-badges {
    display: flex;
    gap: 8px;
}

.admin-pipeline-badge {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-pipeline-badge.example {
    background: var(--bleu-1);
    color: white;
}

.admin-pipeline-badge.files {
    background: var(--vert-2);
    color: var(--vert-1);
}

.admin-pipeline-body {
    padding: 1.5rem;
}

.admin-pipeline-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-pipeline-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-pipeline-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #3a3a3a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-pipeline-detail-value {
    font-size: 14px;
    color: var(--noir);
    font-weight: 500;
}

.admin-pipeline-functionality {
    margin-bottom: 1rem;
}

.admin-pipeline-functionality h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--noir);
    margin: 0 0 8px 0;
}

.admin-functionality-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-functionality-tag {
    background: var(--bleu-2);
    color: var(--bleu-1);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
}

.admin-pipeline-actions {
    display: flex;
    gap: 8px;
}


.admin-main {
    margin-left: 280px;
    min-height: 100vh;
    background-color: var(--gris);
}

.admin-content {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-section {
    background: white;
    border: 1px solid var(--bleu-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.admin-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.btn-primary {
    background-color: var(--bleu-1);
    color: white;
    border-color: var(--bleu-1);
}

.btn-primary:hover {
    background-color: var(--orange-1);
    border-color: var(--orange-1);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--bleu-1);
    border-color: var(--bleu-2);
}

.btn-secondary:hover {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
}

.btn-success {
    background-color: var(--vert-1);
    color: white;
    border-color: var(--vert-1);
}

.btn-success:hover {
    background-color: #1a2d05;
    border-color: #1a2d05;
}

.pipeline-form {
    padding: 2rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: var(--noir);
    margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.checkbox-label .checkmark {
    display: none;
}

.functionality-options {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gris);
    border: 1px solid var(--bleu-2);
}

.functionality-options small {
    display: block;
    color: #3a3a3a;
    font-size: 12px;
    margin-top: 0.5rem;
    font-style: italic;
}

.files-list {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gris);
    border: 1px solid var(--bleu-2);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--bleu-2);
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s ease;
}

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

.file-item:last-child {
    margin-bottom: 0;
}

.file-item i {
    color: var(--orange-1);
    width: 20px;
    font-size: 16px;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-info .file-name {
    color: var(--noir);
    font-weight: 600;
    font-size: 14px;
}

.file-info .file-details {
    color: #6b7280;
    font-size: 12px;
}

.btn-remove-file {
    background: var(--orange-1);
    color: white;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: #a02d00;
    transform: scale(1.05);
}

.no-files {
    color: #3a3a3a;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.add-file-form {
    margin-top: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed var(--bleu-2);
    transition: all 0.3s ease;
}

.add-file-form:hover {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.add-file-form h4 {
    margin: 0 0 1.5rem 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--bleu-1);
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    justify-content: center;
}

.upload-area {
    margin-bottom: 1.5rem;
}

.upload-zone {
    border: 2px dashed var(--bleu-2);
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--bleu-1);
    background: var(--bleu-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.upload-zone.drag-over {
    border-color: var(--orange-1);
    background: var(--orange-2);
    transform: scale(1.02);
}

.upload-zone.file-selected {
    border-color: var(--vert-1);
    background: var(--vert-2);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--bleu-1);
    margin-bottom: 1rem;
    display: block;
}

.upload-zone p {
    font-size: 16px;
    color: var(--noir);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.upload-link {
    color: var(--bleu-1);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.upload-zone small {
    color: #6b7280;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-row input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-row input:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bleu-2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.user-pipelines-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.user-pipelines-section .section-title {
    color: var(--bleu-1);
    margin-bottom: 2rem;
}

.user-pipeline-card {
    border-left: 4px solid var(--bleu-1);
    position: relative;
    transition: all 0.3s ease;
}

.user-pipeline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.2);
    border-left-color: var(--orange-1);
}

.user-pipeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(1, 17, 59, 0.02) 0%, rgba(217, 231, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.user-pipeline-card:hover::before {
    opacity: 1;
}

.template-badge.user-pipeline {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    font-weight: 600;
    position: relative;
}

.template-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 8px 0;
    font-style: italic;
}

.functionality-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.functionality-item.disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1;
    pointer-events: none;
}

.functionality-item.disabled .functionality-card {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-color: #d0d0d0;
    position: relative;
    z-index: 0;
}

.functionality-item.disabled .functionality-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #d0d0d0;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.functionality-item.disabled .functionality-card::before {
    display: none;
}

.functionality-item.disabled .functionality-icon {
    opacity: 0.4;
    background: #e0e0e0;
    color: #999;
}

.functionality-item.disabled .functionality-icon i {
    color: #999;
    opacity: 0.5;
}

.functionality-item.disabled .functionality-content {
    opacity: 0.7;
}

.functionality-item.disabled .functionality-content h4 {
    color: #999;
    font-weight: 500;
}

.functionality-item.disabled .functionality-content p {
    color: #aaa;
}

.functionality-item.disabled input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0;
    pointer-events: none;
}

.functionality-item.disabled input[type="checkbox"]:checked + .functionality-card::after {
    display: none;
}

.functionality-item.disabled input[type="checkbox"]:checked + .functionality-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-color: #d0d0d0;
}

.functionality-item.disabled input[type="checkbox"]:checked + .functionality-card .functionality-icon {
    background: #e0e0e0;
    color: #999;
}

.coming-soon {
    font-size: 11px;
    color: #999;
    font-weight: normal;
    font-style: italic;
    margin-left: 4px;
}

.template-meta {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.template-date {
    font-size: 11px;
    color: #888;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-user-pipelines-message {
    display: flex;
    align-items: center;
    min-height: 300px;
    padding: 2rem;
}

.empty-state {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border: 2px dashed var(--bleu-2);
    transition: all 0.3s ease;
}

.empty-state:hover {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, rgba(1, 17, 59, 0.02) 0%, rgba(217, 231, 255, 0.05) 100%);
}

.empty-icon {
    font-size: 3rem;
    color: var(--bleu-2);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.empty-state h3 {
    color: var(--bleu-1);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-size: 14px;
}

.empty-state .btn {
    margin-top: 1rem;
}

.floating-create-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1;
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Atkinson Hyperlegible Next';
    box-shadow: 0 8px 30px rgba(1, 17, 59, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
}

.floating-create-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.floating-create-btn:hover::before {
    left: 100%;
}

.floating-create-btn:hover {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(1, 17, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.floating-create-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(1, 17, 59, 0.3);
}

.floating-create-btn:focus {
    outline: none;
    box-shadow: 0 8px 30px rgba(1, 17, 59, 0.3), 0 0 0 3px rgba(1, 17, 59, 0.3);
}

.floating-create-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
    margin-right: 4px;
}

.floating-create-btn:hover i {
    transform: rotate(90deg) scale(1.1);
}

.btn-text {
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.floating-create-btn.pulse {
    animation: pulse-glow 2s infinite;
    border-color: rgba(255, 255, 255, 0.4);
}



.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: visible;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--bleu-2);
    
    color: var(--bleu-1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title i {
    font-size: 1.3rem;
    opacity: 0.9;
}

.modal-close {
    background: var(--bleu-2);
    border: 2px solid var(--bleu-2);
    color: var(--bleu-1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.modal-close:hover {
    background: var(--bleu-1);
    color: white;
    border-color: var(--bleu-1);
    transform: scale(1.1);
}

.modal-form {
    padding: 32px;
    overflow: visible;
}

.modal-form .form-group {
    margin-bottom: 24px;
    position: relative;
    overflow: visible;
}

.modal-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--noir);
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-form .form-group label .required {
    color: #DC2626;
    margin-left: 2px;
}

.modal-form .form-group label i {
    color: var(--bleu-1);
    font-size: 14px;
}

.modal-form .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    background: white;
    color: var(--noir);
    font-size: 14px;
    font-family: 'Atkinson Hyperlegible Next';
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2301113B' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

.modal-form .form-select:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.modal-form .form-select:hover {
    border-color: var(--bleu-1);
}

.modal-form .form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.modal-form input[type="text"],
.modal-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    font-size: 14px;
    font-family: 'Atkinson Hyperlegible Next';
    transition: all 0.2s ease;
    background: white;
}

.modal-form input[type="text"]:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.modal-form textarea {
    resize: vertical;
    min-height: 80px;
}

.functionality-label {
    font-size: 16px !important;
    margin-bottom: 16px !important;
}

.functionality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
    align-items: stretch;
}

.pipeline-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    position: relative;
    overflow-x: visible;
}

.type-item {
    position: relative;
    display: flex;
    height: 100%;
    min-width: 0;
    flex: 1;
}

.type-item label {
    width: 100%;
    height: 100%;
    min-width: 0;
}

.type-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-item .functionality-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    flex-shrink: 0;
}

.type-item .functionality-content {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.type-item .functionality-content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--noir);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.type-item .functionality-content p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.type-item .functionality-card {
    gap: 12px;
    padding: 16px 12px;
    align-items: flex-start;
    position: relative;
}

.type-tooltip {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translate(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10002;
    pointer-events: none;
    width: 260px;
    max-width: calc(100vw - 40px);
}

.type-item:hover .type-tooltip {
    opacity: 1;
    visibility: visible;
    /* Le transform est géré dynamiquement par JavaScript */
}

.tooltip-content {
    background: white;
    border: 2px solid var(--bleu-1);
    box-shadow: 0 8px 30px rgba(1, 17, 59, 0.25);
    padding: 20px;
    position: relative;
    animation: tooltipFadeIn 0.3s ease-out;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: var(--arrow-position, 50%);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--bleu-1);
    margin-bottom: -1px;
    transition: left 0.3s ease;
}

.tooltip-content h5 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--bleu-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tooltip-content h5::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--bleu-1);
    display: inline-block;
}

.tooltip-content > p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--noir);
    line-height: 1.6;
}

.tooltip-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tooltip-content ul li {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    position: relative;
    padding-left: 24px;
}

.tooltip-content ul li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--bleu-1);
    font-weight: bold;
    font-size: 14px;
}

.tooltip-content ul li:last-child {
    margin-bottom: 0;
}

.type-item input[type="radio"]:checked + .functionality-card {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.type-item input[type="radio"]:checked + .functionality-card::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bleu-1);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.type-item input[type="radio"]:checked + .functionality-card .functionality-icon {
    background: var(--bleu-1);
}

.type-item input[type="radio"]:checked + .functionality-card .functionality-icon i {
    color: var(--bleu-2);
}

.functionality-item {
    position: relative;
    display: flex;
    height: 100%;
}

.functionality-item label {
    width: 100%;
    height: 100%;
}

.functionality-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.functionality-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid var(--bleu-2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    height: 100%;
    box-sizing: border-box;
}

.functionality-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(1, 17, 59, 0.1), transparent);
    transition: left 0.5s ease;
}

.functionality-card:hover::before {
    left: 100%;
}

.functionality-card:hover {
    border-color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.15);
}

.functionality-item input[type="checkbox"]:checked + .functionality-card {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.functionality-item input[type="checkbox"]:checked + .functionality-card::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bleu-1);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.functionality-icon {
    width: 48px;
    height: 48px;
    background: var(--bleu-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu-1);
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.functionality-item input[type="checkbox"]:checked + .functionality-card .functionality-icon i{
    
    color: var(--bleu-2);
}

.functionality-item input[type="checkbox"]:checked + .functionality-card .functionality-icon {
    background: var(--bleu-1);
}

.functionality-item input[type="checkbox"]:checked + .modal-form .form-group {
    color: var(--bleu-2);
}

.functionality-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.functionality-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--noir);
    line-height: 1.2;
}

.functionality-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--bleu-2);
}

.modal-actions .btn {
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
    position: relative;
    overflow: hidden;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001a4d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.modal-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.modal-actions .btn-primary:hover::before {
    left: 100%;
}

.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #001a4d 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.3);
}

.modal-actions .btn-secondary {
    background: white;
    color: var(--bleu-1);
    border: 2px solid var(--bleu-2);
    box-shadow: 0 2px 8px rgba(1, 17, 59, 0.1);
}

.modal-actions .btn-secondary:hover {
    background: var(--bleu-2);
    color: var(--bleu-1);
    border-color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.2);
}

/* Style pour le bouton de création de pipeline désactivé */
#createPipelineSubmit:disabled {
    background: #6c757d !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

#createPipelineSubmit:disabled::before {
    display: none !important;
}

#createPipelineSubmit:disabled:hover {
    background: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

.admin-functionality-selector {
    margin-top: 16px;
}

.admin-functionality-selector .functionality-label {
    margin-bottom: 16px;
}

.admin-functionality-selector .functionality-grid {
    margin-top: 0;
}


.admin-form-group .functionality-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
}

.admin-form-group .functionality-card {
    padding: 18px;
    min-height: 100px;
    height: 100%;
}

.admin-form-group .functionality-item {
    display: flex;
    height: 100%;
}

.pipeline-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gris) 0%, var(--bleu-2) 100%);
}

.pipeline-loading-overlay.show {
    display: flex;
    opacity: 1;
}

.pipeline-loading-container {
    text-align: center;
    max-width: 600px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pipeline-loading-logo {
    width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 30px 0;
}

.pipeline-loading-logo .logo-svg {
    width: 100%;
    height: 100%;
}


.pipeline-loading-logo .logo-svg path {
    animation: pathDraw 2s ease-in-out infinite;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.pipeline-loading-logo .logo-svg g {
    animation: groupFloat 3s ease-in-out infinite;
}

.pipeline-loading-logo .logo-svg circle {
    animation: circlePulse 1.5s ease-in-out infinite;
}

.pipeline-loading-logo .logo-svg rect {
    animation: rectScale 2.5s ease-in-out infinite;
}

.pipeline-loading-content {
    margin-top: 20px;
    text-align: center;
    color: var(--noir);
    font-family: 'Atkinson Hyperlegible Next';
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pipeline-loading-title {
    font-size: var(--fs-subtitle-lg);
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--noir);
    text-align: center;
}

.pipeline-loading-title i {
    color: var(--vert-1);
    margin-right: 10px;
    animation: bounce 1s ease-in-out infinite;
}

.pipeline-loading-message {
    font-size: var(--fs-body);
    color: var(--noir);
    line-height: 1.6;
    margin: 0 0 30px 0;
    text-align: center;
}


.pipeline-loading-progress {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
}

.pipeline-progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--bleu-1);
    overflow: hidden;
    margin-bottom: 10px;
}

.pipeline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bleu-1), var(--bleu-2));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(1, 17, 59, 0.3);
}

.pipeline-progress-text {
    font-size: var(--fs-subtitle-xs);
    color: var(--noir);
    font-weight: 500;
    text-align: center;
}


.pipeline-loading-spinner {
    margin-bottom: 20px;
}

.pipeline-loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bleu-1);
    border-top: 4px solid var(--bleu-2);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}


.pipeline-loading-progress {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
}

.pipeline-progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--bleu-1);
    overflow: hidden;
    margin-bottom: 10px;
}

.pipeline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bleu-1), var(--bleu-2));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(1, 17, 59, 0.3);
}

.pipeline-progress-text {
    font-size: var(--fs-subtitle-xs);
    color: var(--noir);
    font-weight: 500;
}

.admin-checkbox-item {
    position: relative;
    display: block;
}

.admin-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-checkbox-item .admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid var(--bleu-2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.admin-checkbox-item input[type="checkbox"]:checked + .admin-checkbox-label {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.admin-checkbox-item input[type="checkbox"]:checked + .admin-checkbox-label::after {
    content: "\f058";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    background: var(--bleu-1);
}

.admin-checkbox-item .admin-checkbox-label:hover {
    border-color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.15);
}


.checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--bleu-2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 8px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-label .checkmark {
    display: none;
}


.checkbox-label:has(input[type="checkbox"]:checked)::after {
    content: "\f058";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    background: var(--bleu-1);
}

.checkbox-label input[type="checkbox"]:checked ~ * + *::after {
    content: "\f058";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    background: var(--bleu-1);
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.checkbox-label:hover {
    border-color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.15);
}

label.admin-form-label:has(input[type="checkbox"][id*="confirm"]),
label:has(input[type="checkbox"][id*="confirm"]) {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid var(--bleu-2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

label.admin-form-label input[type="checkbox"][id*="confirm"],
label input[type="checkbox"][id*="confirm"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

label.admin-form-label:has(input[type="checkbox"][id*="confirm"]:checked)::after,
label:has(input[type="checkbox"][id*="confirm"]:checked)::after {
    content: "\f058";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    background: var(--bleu-1);
}

label.admin-form-label:has(input[type="checkbox"][id*="confirm"]:checked),
label:has(input[type="checkbox"][id*="confirm"]:checked) {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

label.admin-form-label:has(input[type="checkbox"][id*="confirm"]):hover,
label:has(input[type="checkbox"][id*="confirm"]):hover {
    border-color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.15);
}

body.loading-active {
    overflow: hidden;
    height: 100vh;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    max-width: 600px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.logo-svg {
    width: 100%;
    height: 100%;
}


.logo-svg path {
    animation: pathDraw 2s ease-in-out infinite;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.logo-svg g {
    animation: groupFloat 3s ease-in-out infinite;
}

.logo-svg circle {
    animation: circlePulse 1.5s ease-in-out infinite;
}

.logo-svg rect {
    animation: rectScale 2.5s ease-in-out infinite;
}

.loading-overlay.initial-loading {
    background: linear-gradient(135deg, var(--gris) 0%, var(--bleu-2) 100%);
}

.initial-loading-text {
    margin-top: 30px;
    text-align: center;
    color: var(--noir);
    font-family: 'Atkinson Hyperlegible Next';
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.initial-loading-text h2 {
    font-size: var(--fs-subtitle-lg);
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--noir);
    text-align: center;
}

.initial-loading-text p {
    font-size: var(--fs-body);
    color: var(--noir);
    line-height: 1.6;
    margin: 0 0 30px 0;
    text-align: center;
}

.loading-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bleu-1);
    border-top: 4px solid var(--bleu-2);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-overlay.auth-loading {
    background: linear-gradient(135deg, var(--gris) 0%, var(--bleu-2) 100%);
}

.auth-loading-text {
    margin-top: 20px;
    text-align: center;
    color: var(--noir);
    font-family: 'Atkinson Hyperlegible Next';
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.auth-loading-text h2 {
    font-size: var(--fs-subtitle-lg);
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--noir);
    text-align: center;
}

.auth-loading-text h2 i {
    color: var(--vert-1);
    margin-right: 10px;
    animation: bounce 1s ease-in-out infinite;
}

.auth-loading-text p {
    font-size: var(--fs-body);
    margin-bottom: 30px;
    color: var(--noir);
    line-height: 1.6;
    margin: 0 0 30px 0;
    text-align: center;
}

.loading-progress {
    max-width: 300px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--bleu-1);
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bleu-1), var(--bleu-2));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(1, 17, 59, 0.3);
}

.progress-text {
    font-size: var(--fs-subtitle-xs);
    color: var(--noir);
    font-weight: 500;
}

html {
    scroll-behavior: smooth;
}

.upload-area {
    border: 2px dashed #dee2e6;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.upload-info {
    color: #6c757d;
    margin-top: 10px;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gris) 0%, var(--bleu-2) 100%);
}

/* Checkbox personnalisée */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #adb5bd;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label i {
    color: #6c757d;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.checkbox-label:has(input[type="checkbox"]:checked) i {
    color: #007bff;
}

/* Fallback pour navigateurs sans :has() */
.checkbox-label.checked i {
    color: #007bff;
}

/* Boutons d'action */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* État désactivé */
.btn:disabled,
.tool-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== ÉTATS DE CHARGEMENT ===== */
.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pathDraw {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    50% {
        stroke-dashoffset: 500;
        opacity: 0.7;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes groupFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes circlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes rectScale {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(90deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    75% {
        transform: scale(1.1) rotate(270deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 8px 30px rgba(1, 17, 59, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(1, 17, 59, 0.6), 0 0 30px rgba(1, 17, 59, 0.4);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 8px 30px rgba(1, 17, 59, 0.3);
        transform: scale(1);
    }
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== TEMPLATES COLUMNS - Styles centralisés ===== */

/* Section principale templates-columns */
.templates-columns {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    height: 90vh;
    min-height: 600px;
    overflow: hidden;
    box-sizing: border-box;
}

/* ===== PDF VIEWER - Design moderne avec palette de couleurs ===== */

/* Visualiseur PDF (colonne gauche) */
.templates-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    /*border: 2px solid var(--bleu-2);*/
    overflow: hidden;
    min-width: 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-shadow: inset 0 2px 8px rgba(1, 17, 59, 0.05);
    box-sizing: border-box;
}

/* Forcer la largeur du viewer */
.templates-viewer,
.templates-viewer * {
    box-sizing: border-box;
}

/* Placeholder pour l'absence de documents */
.no-documents-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    text-align: center;
    padding: 3rem;
    box-sizing: border-box;
}

.no-documents-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.no-documents-placeholder p {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* Pages PDF - Styles consolidés pour template_standard.html */
#pages .page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    align-self: stretch !important;
    border: none !important;
    border-bottom: 2px solid var(--bleu-2) !important;
    border-top: 2px solid var(--bleu-2) !important;
    box-shadow: none !important;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    transition: box-shadow 0.3s ease;
    object-fit: fill !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Contrôles du visualiseur */
.viewer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(to bottom, var(--gris) 0%, rgba(246, 246, 246, 0.95) 100%);
    border-bottom: 2px solid var(--bleu-2);
    min-height: 56px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Conteneur des pages PDF */
#pages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: linear-gradient(to bottom, var(--gris) 0%, rgba(246, 246, 246, 0.8) 100%);
    min-height: 0;
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* Scrollbar personnalisée pour le conteneur pages */
#pages::-webkit-scrollbar {
    width: 10px;
}

#pages::-webkit-scrollbar-track {
    background: var(--gris);
    border-left: 2px solid var(--bleu-2);
}

#pages::-webkit-scrollbar-thumb {
    background: var(--bleu-2);
    border: 2px solid var(--gris);
}

#pages::-webkit-scrollbar-thumb:hover {
    background: var(--bleu-1);
}

/* État réinitialisé du conteneur pages */
#pages.resetted {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    margin: 0;
    padding: 0;
    transform: none;
    overflow: hidden;
    background: white;
}

/* États et variantes des pages */
#pages.scaled {
    transform: none !important;
}

#pages .page:hover {
    box-shadow: inset 0 0 0 2px var(--bleu-2);
}

#pages .page:first-child {
    border-top: none;
}

#pages .page:last-child {
    border-bottom: none;
}

/* Styles pour pdf_viewer.html - Forcer toute la largeur */
.pdf-viewer-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#pdf-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pdf-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.pdf-page canvas {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Conteneur PDF pour iframe */
.pdf-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--gris);
    border: 2px solid var(--bleu-2);
    box-shadow: inset 0 2px 8px rgba(1, 17, 59, 0.05);
}

/* Iframe du visualiseur PDF */
.pdf-viewer,
.pdf-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* État de chargement pour les pages */
#pages .page[data-loaded-scale=""] {
    opacity: 0.7;
    background: var(--gris);
}

#pages .page[data-loaded-scale=""]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--bleu-2);
    border-top-color: var(--bleu-1);
    animation: spin 0.8s linear infinite;
}

/* Indicateur de page */
#pages .page::after {
    content: attr(data-page);
    position: absolute;
    top: -8px;
    right: 12px;
    padding: 4px 10px;
    background: var(--bleu-1);
    color: white;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#pages .page:hover::after {
    opacity: 1;
}

/* Section résultats (colonne droite) */
.templates-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--bleu-2);
    overflow: hidden;
    min-width: 0;
    height: 100%;
    position: relative;
}

/* Classe text-scroll pour le scroll du texte */
.text-scroll {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Conteneurs principaux */
#main-results-container,
#main-controls-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* États visibilité */
.tab-container-hidden {
    display: none !important;
}

.tab-container-visible {
    display: flex !important;
}

/* Conteneur de contrôles pour questionner */
#controls-content.questionner-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== MODE GENERER - Interface de génération de PDF ===== */

/* Conteneur principal pour le mode generer */
#controls-content.generer-full-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    overflow: hidden;
}

/* Container principal séquentiel */
.generer-container {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

/* Étapes (affichées l'une après l'autre) */
.generer-step {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== ÉTAPE 1 : Configuration ===== */
.generer-config-step {
    display: flex;
    flex-direction: column;
    background: white;
    overflow-y: auto;
    height: 100%;
    min-height: 0;
}

.config-header {
    padding: 20px 24px 6px 24px;
}

.config-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--bleu-1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-header i {
    font-size: 20px;
}

 .config-content {
     flex: 1;
     overflow-y: auto;
     padding: 24px;
     display: flex;
     flex-direction: column;
     gap: 2px;
 }
 
 /* Conteneur pour Type de rapport + Nom du nouveau type */
 .template-fields-container {
     display: flex;
     flex-direction: column;
     gap: 10px;
 }
 
 .template-labels-row {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 16px;
 }
 
 .template-labels-row label {
     font-size: 14px;
     font-weight: 600;
     color: var(--bleu-1);
     display: flex;
     align-items: center;
     gap: 8px;
 }
 
 .template-inputs-row {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 16px;
 }
 
 .template-inputs-row .form-select,
 .template-inputs-row .form-input {
     width: 100%;
 }
 
 /* Groupes de formulaire */
 .form-group {
     display: flex;
     flex-direction: column;
     gap: 10px;
 }
 
 /* Padding-top pour la section Documents sources */
 .docs-sources-group {
     padding-top: 20px;
 }
 
 /* Badge "Bientôt disponible" */
 .coming-soon-badge {
     display: inline-flex;
     align-items: center;
     gap: 4px;
     padding: 4px 10px;
     background: var(--orange-2);
     color: var(--orange-1);
     font-size: 11px;
     font-weight: 600;
     margin-left: 8px;
     text-transform: uppercase;
     letter-spacing: 0.5px;
 }
 
 /* Section guideline désactivée */
 .guideline-section-disabled {
     position: relative;
 }
 
 .guideline-section-disabled label {
     color: var(--noir);
     opacity: 0.6;
 }

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--bleu-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-info {
    font-weight: 400;
    color: var(--noir);
    opacity: 0.6;
    font-size: 13px;
}

.form-select,
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bleu-2);
    font-family: 'Atkinson Hyperlegible Next';
    font-size: 14px;
    color: var(--noir);
    background: white;
    transition: all 0.2s ease;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

 /* Sélecteur de documents - Custom select avec checkboxes */
 .documents-selector {
     position: relative;
 }
 
 .custom-select-wrapper {
     position: relative;
     width: 100%;
 }
 
 .custom-select-trigger {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 12px 14px;
     background: white;
     border: 1px solid var(--bleu-2);
     cursor: pointer;
     font-family: 'Atkinson Hyperlegible Next';
     font-size: 14px;
     color: var(--noir);
     transition: all 0.2s ease;
 }
 
 .custom-select-trigger:hover {
     border-color: var(--bleu-1);
     background: var(--bleu-2);
 }
 
 .custom-select-trigger i {
     color: var(--bleu-1);
     transition: transform 0.2s ease;
 }
 
 .custom-select-dropdown.show + .custom-select-trigger i,
 .custom-select-trigger:has(+ .custom-select-dropdown.show) i {
     transform: rotate(180deg);
 }
 
 .custom-select-dropdown {
     position: absolute;
     top: 100%;
     left: 0;
     right: 0;
     background: white;
     border: 1px solid var(--bleu-1);
     border-top: none;
     max-height: 0;
     overflow: hidden;
     z-index: 1000;
     transition: max-height 0.3s ease;
     box-shadow: 0 4px 12px rgba(1, 17, 59, 0.15);
 }
 
 .custom-select-dropdown.show {
     max-height: 300px;
     overflow-y: auto;
     border-top: 1px solid var(--bleu-1);
 }
 
 .custom-select-option {
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 10px 14px;
     cursor: pointer;
     transition: all 0.2s ease;
     border-bottom: 1px solid var(--bleu-2);
 }
 
 .custom-select-option:last-child {
     border-bottom: none;
 }
 
 .custom-select-option:hover {
     background: var(--bleu-2);
 }
 
 .custom-select-option input[type="checkbox"] {
     width: 18px;
     height: 18px;
     cursor: pointer;
     accent-color: var(--bleu-1);
     flex-shrink: 0;
 }
 
 .custom-select-option i {
     color: var(--orange-1);
     font-size: 16px;
     flex-shrink: 0;
 }
 
 .custom-select-option .doc-name {
     flex: 1;
     font-size: 13px;
     color: var(--noir);
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }
 
 /* Styles pour les templates avec édition */
 .template-option {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 8px;
 }
 
 .template-name-container {
     flex: 1;
     min-width: 0;
 }
 
 .template-name-text {
     font-size: 13px;
     color: var(--noir);
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
     flex: 1;
     min-width: 0;
     display: block;
     line-height: 1.5;
     outline: none;
     /* Transition fluide */
     transition: all 0.2s ease;
 }
 
 /* Mode édition : la box devient éditable */
 .template-option.editing-mode {
     background: var(--bleu-2);
 }
 
 /* Quand le texte est éditable, il devient visiblement modifiable */
 .template-name-text[contenteditable="true"] {
     background: white;
     border: 1px solid var(--bleu-1);
     padding: 2px 6px;

     box-shadow: 0 0 0 2px rgba(1, 17, 59, 0.1);
     white-space: nowrap;
     min-width: 150px;
     cursor: text;
 }
 
 .template-name-text[contenteditable="true"]:focus {
     outline: none;
     border-color: var(--bleu-1);
     box-shadow: 0 0 0 2px rgba(1, 17, 59, 0.15);
 }
 
 /* Empêcher les retours à la ligne dans le texte éditable */
 .template-name-text[contenteditable="true"] br {
     display: none;
 }
 
 .template-name-text[contenteditable="true"] * {
     display: inline;
 }
 
 .template-actions {
     display: flex;
     gap: 4px;
     flex-shrink: 0;
 }
 
 .btn-edit-template,
 .btn-save-template,
 .btn-cancel-template {
     width: 24px;
     height: 24px;
     padding: 0;
     background: none;
     border: none;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.2s ease;

 }
 
 .btn-edit-template {
     color: var(--bleu-1);
 }
 
 .btn-edit-template:hover {
     background: var(--bleu-2);
     color: var(--bleu-1);
 }
 
 .btn-save-template {
     color: var(--vert-1);
 }
 
 .btn-save-template:hover {
     background: var(--vert-2);
     color: var(--vert-1);
 }
 
 .btn-cancel-template {
     color: var(--orange-1);
 }
 
 .btn-cancel-template:hover {
     background: var(--orange-2);
     color: var(--orange-1);
 }
 
 .btn-edit-template i,
 .btn-save-template i,
 .btn-cancel-template i,
 .btn-delete-template i {
     font-size: 12px;
 }
 
 .btn-delete-template {
     color: var(--orange-1);
 }
 
 .btn-delete-template:hover {
     background: var(--orange-2);
     color: var(--orange-1);
 }
 
 /* Bouton "Tout sélectionner" dans le dropdown */
 .select-all-option {
     background: var(--bleu-2);
     font-weight: 600;
     border-bottom: 2px solid var(--bleu-1);
 }
 
 .select-all-option:hover {
     background: var(--bleu-1);
     color: white;
 }
 
 .select-all-option .btn-select-all-docs {
     width: 100%;
     display: flex;
     align-items: center;
     gap: 8px;
     background: none;
     border: none;
     padding: 0;
     font-family: 'Atkinson Hyperlegible Next';
     font-size: 13px;
     font-weight: 600;
     color: inherit;
     cursor: pointer;
     text-align: left;
 }
 
 .select-all-option .btn-select-all-docs i {
     color: inherit;
 }
 
 /* Séparateur dans le dropdown */
 .custom-select-separator {
     height: 1px;
     background: var(--bleu-2);
     margin: 4px 0;
 }

/* Zone d'upload du guideline */
.file-upload-zone {
    position: relative;
}

.upload-placeholder {
    border: 2px dashed var(--bleu-2);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gris);
}

.upload-placeholder:hover {
    border-color: var(--bleu-1);
    background: var(--bleu-2);
}

.upload-placeholder i {
    font-size: 32px;
    color: var(--bleu-1);
    margin-bottom: 12px;
}

.upload-placeholder p {
    font-size: 14px;
    font-weight: 600;
    color: var(--bleu-1);
    margin-bottom: 4px;
}

.upload-placeholder small {
    font-size: 12px;
    color: var(--noir);
    opacity: 0.6;
}

.uploaded-guideline {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bleu-2);
    border: 1px solid var(--bleu-1);
}

.guideline-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.guideline-info i {
    font-size: 20px;
    color: var(--orange-1);
}

.guideline-info span {
    font-size: 14px;
    color: var(--noir);
    font-weight: 500;
}

.btn-remove-guideline {
    background: white;
    border: 1px solid var(--bleu-2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-guideline:hover {
    background: var(--orange-1);
    border-color: var(--orange-1);
    color: white;
}

/* Bouton de génération */
.generation-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
}

.btn-generate {
    padding: 14px 28px;
    background: var(--bleu-1);
    color: white;
    border: none;
    font-family: 'Atkinson Hyperlegible Next';
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-generate:hover {
    background: var(--orange-1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-generate i {
    font-size: 16px;
}

/* ===== ÉTAPE 2 : Génération en cours ===== */
.generer-generating-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 40px;
    text-align: center;
}

/* ===== ÉTAPE 3 : Résultat ===== */
.generer-result-step {
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    height: 100%;
    gap: 0 !important;
    padding: 0;
    margin: 0;
}

.generating-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.pdf-icon-animated {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-icon-animated i {
    font-size: 64px;
    color: var(--orange-1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.magic-sparkles {
    position: absolute;
    top: 0;
    right: 0;
    animation: sparkle 1.5s ease-in-out infinite;
}

.magic-sparkles i {
    font-size: 24px;
    color: var(--bleu-1);
}

@keyframes sparkle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.5;
    }
}

.generating-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bleu-2);
    border-top-color: var(--bleu-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.preview-generating h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--bleu-1);
}

.preview-generating p {
    font-size: 14px;
    color: var(--noir);
    opacity: 0.7;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--bleu-1);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bleu-1), var(--bleu-2));
    transition: width 0.5s ease;
    width: 0;
    box-shadow: 0 0 10px rgba(1, 17, 59, 0.3);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bleu-2);
    background: var(--gris);
    flex-shrink: 0;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--vert-2);
    color: var(--vert-1);
    font-size: 12px;
    font-weight: 600;
}

.result-badge i {
    font-size: 14px;
}

.result-filename {
    font-size: 14px;
    font-weight: 500;
    color: var(--noir);
}

/* Conteneur pour le nom de fichier éditable */
.filename-editable-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Input éditable pour le nom du fichier */
.result-filename-editable {
    font-size: 14px;
    font-weight: 500;
    color: var(--noir);
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    font-family: 'Atkinson Hyperlegible Next';
    min-width: 200px;
    max-width: 400px;
    transition: all 0.2s ease;
}

.result-filename-editable:disabled {
    border-color: transparent;
    background: transparent;
    cursor: default;
}

.result-filename-editable:not(:disabled) {
    border-color: var(--bleu-1);
    background: white;
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.1);
}

.result-filename-editable:focus {
    outline: none;
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 3px rgba(1, 17, 59, 0.15);
}

/* Boutons d'édition du nom */
.btn-edit-filename,
.btn-save-filename,
.btn-cancel-edit-filename {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 12px;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--bleu-2);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--bleu-1);
}

.btn-icon:hover {
    background: var(--bleu-1);
    border-color: var(--bleu-1);
    color: white;
    transform: translateY(-2px);
}

.result-viewer-direct {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    background: white;
    padding: 0 !important;
    margin: 0 !important;
    display: block;
    position: relative;
}

.generated-pdf-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    margin: 0;
    display: block;
}

/* Zone de chat d'amélioration */
.improvement-chat {
    border-top: 1px solid var(--bleu-2);
    background: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    max-height: 200px;
}

.chat-message {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.chat-message .message-content {
    max-width: 80%;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
}

.user-message .message-content {
    background: var(--bleu-1);
    color: white;
}

.assistant-message .message-content {
    background: var(--gris);
    color: var(--noir);
}

.assistant-message.loading .message-content {
    background: var(--bleu-2);
    color: var(--bleu-1);
}

.assistant-message.error .message-content {
    background: var(--orange-2);
    color: var(--orange-1);
}

.chat-input-form {
    padding: 16px;
    border-top: 1px solid var(--bleu-2);
}

.chat-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-group textarea {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--bleu-2);
    font-family: 'Atkinson Hyperlegible Next';
    font-size: 13px;
    resize: none;
    max-height: 80px;
    background: var(--gris);
}

.chat-input-group textarea:focus {
    outline: none;
    border-color: var(--bleu-1);
    background: white;
}

.btn-send-chat {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bleu-1);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send-chat:hover {
    background: var(--bleu-2);
    color: var(--bleu-1);
    transform: translateY(-2px);
}

/* ===== CHATBOT RAG - Design moderne avec palette de couleurs ===== */

/* Section de réponse pour questionner */
.response-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--gris);
}

/* Conteneur de réponse */
.response-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Zone de contenu des messages */
.response-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: white;
}

/* État vide - message d'accueil */
.response-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    color: var(--noir);
    opacity: 0.6;
}

.empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bleu-2);
    margin-bottom: 20px;
}

.empty-icon i {
    font-size: 32px;
    color: var(--bleu-1);
}

.response-empty h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--bleu-1);
    margin-bottom: 8px;
}

.response-empty p {
    font-size: 15px;
    color: var(--noir);
    opacity: 0.7;
}

/* Messages du chatbot */
.message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

.message.user-message {
    justify-content: flex-end;
}

.message.bot-message {
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
}

/* Bulles de messages */
.message-bubble {
    max-width: 75%;
    padding: 14px 18px;
    background: var(--bleu-2);
    border: 2px solid var(--bleu-1);
    position: relative;
    word-wrap: break-word;
}

.user-bubble {
    background: var(--bleu-1) !important;
    color: white !important;
    border: 2px solid var(--bleu-1) !important;
}

.bot-bubble {
    background: white;
    color: var(--noir);
    border: 2px solid var(--bleu-2);
}

.error-bubble {
    background: var(--orange-2);
    color: var(--orange-1);
    border: 2px solid var(--orange-1);
}

/* Contenu des messages */
.message-content {
    font-size: 13px;
    line-height: 1.5;
}

.message-content p {
    margin: 0;
}

/* Texte blanc pour les messages utilisateur */
.user-bubble .message-content,
.user-bubble .message-content p {
    color: white !important;
}

/* Contenu d'erreur */
.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-content i {
    font-size: 18px;
}

/* Section d'entrée de question */
.question-input-section {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 20px 20px 12px 20px;
}

.question-form-modern {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.question-input-group {
    width: 100%;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #d1d5db;
    padding: 0;
    transition: all 0.2s ease;
    top: 6px;
}

.input-wrapper:focus-within {
    border-color: var(--bleu-1);
    box-shadow: 0 0 0 1px var(--bleu-1);
}

/* Textarea de question */
#question {
    width: 100%;
    min-height: 60px;
    max-height: 150px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
    line-height: 1.5;
    background: transparent;
    border: none;
    color: var(--noir);
    resize: vertical;
    transition: none;
}

#question:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

#question::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Actions d'input */
.input-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
}

.btn-clear,
.btn-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
}

.btn-clear {
    background: transparent;
    color: #6b7280;
    border: 1px solid transparent;
}

.btn-clear:hover {
    background: #f3f4f6;
    color: var(--noir);
}

.btn-send {
    background: var(--bleu-1);
    color: white;
}

.btn-send:hover {
    background: #001f5c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.3);
}

.btn-send:active {
    transform: translateY(0);
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-send i,
.btn-clear i {
    font-size: 16px;
}

/* Bouton send inline dans le textarea */
.btn-send-inline {
    position: absolute;
    bottom: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bleu-1);
    color: white;
    border: 2px solid var(--bleu-1);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
}

.btn-send-inline:hover {
    background: #001f5c;
    border-color: #001f5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.3);
}

.btn-send-inline:active {
    transform: translateY(0);
}

.btn-send-inline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-send-inline i {
    font-size: 14px;
}

/* Bouton de réinitialisation de conversation */
.btn-reset-conversation {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset-conversation:hover {
    background: #f8f9fa;
    border-color: var(--bleu-1);
    color: var(--bleu-1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(1, 17, 59, 0.1);
}

.btn-reset-conversation:active {
    transform: translateY(0);
}

.btn-reset-conversation i {
    font-size: 14px;
}

/* Info RAG */
.rag-info {
    padding: 12px 16px;
    background: var(--vert-2);
    border-top: 2px solid var(--vert-1);
}

.rag-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--vert-1);
    font-size: 14px;
    font-weight: 500;
}

.rag-status i {
    font-size: 18px;
}

/* Sources de réponse */
.sources-wrapper {
    margin-top: 8px;
    padding-left: 0;
    width: 100%;
    max-width: 75%;
}

.response-sources {
    display: none;
    margin-top: 8px;
}

.response-sources.expanded {
    display: block;
}

.sources-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gris);
    border: 2px solid var(--bleu-2);
    color: var(--bleu-1);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
}

.sources-toggle-btn:hover {
    background: var(--bleu-2);
    border-color: var(--bleu-1);
}

.sources-toggle-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.sources-toggle-btn.expanded i {
    transform: rotate(180deg);
}

.sources-content {
    margin-top: 8px;
    padding: 10px;
    background: var(--gris);
    border: 2px solid var(--bleu-2);
    font-size: 11px;
}

.sources-content h6 {
    font-size: 12px;
    font-weight: 600;
    color: var(--bleu-1);
    margin-bottom: 6px;
}

.sources-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sources-content li {
    padding: 6px 10px;
    margin-bottom: 4px;
    background: white;
    border: 2px solid var(--bleu-2);
    font-size: 11px;
    color: var(--noir);
    line-height: 1.4;
}

.sources-content li:last-child {
    margin-bottom: 0;
}

.similarity-score {
    color: var(--vert-1);
    font-weight: 600;
    margin-left: 6px;
    font-size: 10px;
}

/* Scrollbar personnalisée pour les messages */
.response-content::-webkit-scrollbar {
    width: 8px;
}

.response-content::-webkit-scrollbar-track {
    background: var(--gris);
}

.response-content::-webkit-scrollbar-thumb {
    background: var(--bleu-2);
    border: 2px solid var(--gris);
}

.response-content::-webkit-scrollbar-thumb:hover {
    background: var(--bleu-1);
}

/* Conteneurs de tabs indépendants */
.tab-container-independent {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header des tabs indépendants */
.tab-header-independent {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to bottom, var(--gris) 0%, rgba(246, 246, 246, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Boutons des tabs indépendants - Style amélioré */
.tab-btn-independent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--noir);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn-independent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(217, 231, 255, 0.4), transparent);
    transition: left 0.5s;
}

.tab-btn-independent:hover::before {
    left: 100%;
}

.tab-btn-independent:hover {
    background-color: var(--bleu-2);
    color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.15);
}

.tab-btn-independent.active {
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001f5c 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(1, 17, 59, 0.3);
    font-weight: 600;
}

.tab-btn-independent.active:hover {
    background: linear-gradient(135deg, #001f5c 0%, var(--bleu-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 17, 59, 0.4);
}

.tab-btn-independent i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.tab-btn-independent:hover i {
    transform: scale(1.1);
}

.tab-btn-independent.active i {
    transform: scale(1.15);
}

/* Contenu des tabs indépendants */
.tab-content-independent {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Placeholder de contenu */
#content-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}

.content-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--noir);
    opacity: 0.6;
}

.empty-state i {
    font-size: 48px;
    color: var(--bleu-1);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: var(--fs-h4);
    margin-bottom: 8px;
    color: var(--noir);
}

.empty-state p {
    font-size: var(--fs-body);
    color: var(--noir);
    opacity: 0.7;
}

/* Masquer les boutons de contrôles si nécessaire */
#controls-tab-btn.hidden,
#controls-tab-btn-2.hidden,
#history-tab-btn.hidden,
#history-tab-btn-2.hidden,
#history-tab-btn-3.hidden {
    display: none !important;
}

#controls-tab-btn.visible,
#controls-tab-btn-2.visible,
#history-tab-btn.visible,
#history-tab-btn-2.visible,
#history-tab-btn-3.visible {
    display: flex !important;
}

/* ===== COMPOSANT RÉSULTATS - Overlay et Actions ===== */

/* Conteneur du composant résultats */
.results-component {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Pré-formatage du JSON avec scroll */
.results-pre {
    margin: 0;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    overflow-y: auto;
    background: white;
    color: #2d2d2d;
    height: 100%;
}

/* Overlay pour les boutons d'actions */
.results-actions-sticky {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.results-actions-sticky:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Boutons d'actions stylisés */
.results-actions-sticky .tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: rgba(1, 17, 59, 0.08);
    color: var(--bleu-1);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.results-actions-sticky .tool-btn:hover {
    background: rgba(1, 17, 59, 0.15);
    color: var(--bleu-1);
    transform: scale(1.1);
}

.results-actions-sticky .tool-btn:active {
    transform: scale(0.95);
}

.results-actions-sticky .tool-btn i {
    font-size: 14px;
}

/* Bouton JSON spécial */
.results-actions-sticky .tool-btn:first-child {
    padding: 0 12px;
    width: auto;
    min-width: 60px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--bleu-1) 0%, #001f5c 100%);
    color: white;
}

.results-actions-sticky .tool-btn:first-child:hover {
    background: linear-gradient(135deg, #001f5c 0%, var(--bleu-1) 100%);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.5);
}

/* ===== COLORATION SYNTAXIQUE JSON - Sur fond blanc ===== */

/* Clés JSON */
.results-pre .json-key {
    color: #0451a5;
    font-weight: 600;
}

/* Valeurs string */
.results-pre .json-string {
    color: #0b5394;
}

/* Nombres */
.results-pre .json-number {
    color: #098658;
    font-weight: 500;
}

/* Booléens */
.results-pre .json-boolean {
    color: #0550ae;
    font-weight: 600;
}

/* Null */
.results-pre .json-null {
    color: #8c4e00;
    font-style: italic;
}

/* Brackets et crochets */
.results-pre .json-bracket {
    color: #2d2d2d;
    font-weight: 700;
}

/* Virgules */
.results-pre .json-comma {
    color: #2d2d2d;
}

/* Amélioration générale du contenu JSON */
.results-pre {
    tab-size: 2;
    -moz-tab-size: 2;
}

/* Sélection dans le JSON */
.results-pre ::selection {
    background: rgba(217, 231, 255, 0.8);
    color: var(--bleu-1);
}

/* ===== ANIMATION DE CHARGEMENT JSON ===== */

/* Animation de typing simple */
.json-typing-animation {
    display: block;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #2d2d2d;
    white-space: pre;
}

.json-typing-animation::after {
    content: '▊';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* État de chargement pour le conteneur JSON */
.results-pre.json-loading {
    background: transparent;
    padding: 20px;
}

/* Conteneur principal */
.pdf-viewer-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Conteneur PDF */
#pdf-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Pages PDF */
.pdf-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* Forcer les canvas PDF à prendre toute la largeur */
.pdf-page canvas {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
}

/* Placeholder de chargement pour les pages PDF */
.pdf-page-placeholder {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gris);
    border: 2px dashed rgba(1, 17, 59, 0.2);
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Contenu de chargement des pages */
.page-loading {
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--bleu-1);
    font-size: 16px;
    font-weight: 500;
    padding: 20px;
    box-sizing: border-box !important;
}

.page-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--bleu-2);
    border-top: 3px solid var(--bleu-1);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Erreur de page PDF */
.page-error {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--orange-1);
    font-size: 16px;
    font-weight: 500;
    background: rgba(184, 52, 0, 0.1);
    border: 2px solid var(--orange-1);
    box-sizing: border-box !important;
    padding: 20px;
}

.page-error i {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Chargement général du PDF */
.pdf-loading {
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--bleu-1);
    font-size: 18px;
    font-weight: 500;
    padding: 20px;
    box-sizing: border-box !important;
}

.pdf-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bleu-2);
    border-top: 4px solid var(--bleu-1);
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Erreur générale du PDF */
.pdf-error {
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--orange-1);
    font-size: 18px;
    text-align: center;
    font-weight: 500;
    padding: 20px;
    box-sizing: border-box !important;
}

.pdf-error i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--orange-1);
}

/* ===== OVERLAY DU NOMBRE DE PAGES ===== */
.page-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bleu-1);
    color: white;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.page-info:hover {
    background: var(--bleu-2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.page-info::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

#page-info-total {
    font-weight: 700;
    color: white;
}

/* ===== BOUTON DE TOGGLE DES BBOX ===== */
.bbox-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bbox-toggle-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--bleu-2);
    color: var(--bleu-1);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.bbox-toggle-btn:hover {
    background: white;
    border-color: var(--bleu-1);
    box-shadow: 0 4px 12px rgba(1, 17, 59, 0.15);
    transform: translateY(-2px);
}

.bbox-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.bbox-toggle-btn.is-active {
    background: var(--bleu-1);
    color: white;
    border-color: var(--bleu-1);
}

.bbox-toggle-btn.is-active:hover {
    background: var(--bleu-2);
    border-color: var(--bleu-2);
}

.bbox-toggle-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.bbox-toggle-btn:hover i {
    transform: scale(1.1);
}

.bbox-toggle-btn.is-active i {
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ==================================
   Animations de traitement RAG
   ================================== */

.file-processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 17, 59, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.file-processing-overlay .processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.processing-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
}

.processing-step .step-icon {
    font-size: 32px;
    color: var(--orange-1);
}

.processing-step .step-icon i {
    animation: spin 1.5s linear infinite;
}

.processing-step.processing-done .step-icon {
    color: var(--vert-1);
}

.processing-step.processing-done .step-icon i {
    animation: checkPulse 1s ease-in-out;
}

.processing-step .step-text {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: white;
}

.processing-step .step-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.processing-step .step-dots .dot {
    width: 8px;
    height: 8px;
    background: var(--orange-1);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.processing-step .step-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.processing-step .step-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes checkPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Extraction Section Styles */
.extraction-config-container {
    padding: 40px 60px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.extraction-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 48px;
}

.extraction-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.extraction-section-header i {
    font-size: 20px;
    color: var(--bleu-1, #0066cc);
}

.extraction-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--noir, #1a1a1a);
    flex: 1;
}

.extraction-section-subtitle {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.default-data-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.data-type-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 2px solid var(--bleu-2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    min-height: 45px;
}

.data-type-checkbox:hover {
    border-color: var(--bleu-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 17, 59, 0.15);
}

.data-type-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
}

.data-type-checkbox:has(input[type="checkbox"]:checked) {
    border-color: var(--bleu-1);
    background: linear-gradient(135deg, var(--bleu-2) 0%, rgba(217, 231, 255, 0.8) 100%);
    box-shadow: 0 4px 15px rgba(1, 17, 59, 0.2);
}

.data-type-checkbox:has(input[type="checkbox"]:checked)::after {
    content: "\f058";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 6px;
    right: 6px;
    color: white;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    background: var(--bleu-1);
}

.data-type-checkbox .checkmark {
    display: none;
}

.data-type-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.data-type-content i {
    font-size: 14px;
    color: var(--noir);
    transition: all 0.3s ease;
}

.data-type-checkbox:has(input[type="checkbox"]:checked) .data-type-content i {
    color: var(--bleu-1);
}

.data-type-content span {
    font-size: 12px;
    font-weight: 500;
    color: var(--noir);
    transition: all 0.3s ease;
}

.data-type-checkbox:has(input[type="checkbox"]:checked) .data-type-content span {
    color: var(--bleu-1);
}

.custom-data-input-container {
    margin-top: 16px;
}

.custom-data-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.custom-data-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.custom-data-input:focus {
    outline: none;
    border-color: var(--bleu-1, #0066cc);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.add-custom-data-btn {
    padding: 12px 24px;
    background-color: var(--bleu-1);
    color: white;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: 'Atkinson Hyperlegible Next';
}

.add-custom-data-btn:hover {
    background-color: var(--orange-1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.add-custom-data-btn:active {
    transform: translateY(0);
}

.custom-data-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.custom-data-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 12px;
}

.custom-data-char-count {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    transition: color 0.2s ease;
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
}

.custom-data-char-count.char-count-low {
    color: #22c55e; /* Vert */
}

.custom-data-char-count.char-count-medium {
    color: #f59e0b; /* Orange */
}

.custom-data-char-count.char-count-high {
    color: #f97316; /* Orange foncé */
}

.custom-data-char-count.char-count-max {
    color: #ef4444; /* Rouge */
    font-weight: 700;
}

.custom-data-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 50px;
    max-height: 200px;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
    background: var(--gris);
    border: 1px solid var(--bleu-2);
    scrollbar-width: thin;
    scrollbar-color: var(--bleu-1) var(--bleu-2);
}

.custom-data-tags::-webkit-scrollbar {
    width: 6px;
}

.custom-data-tags::-webkit-scrollbar-track {
    background: var(--bleu-2);
    border-radius: 4px;
}

.custom-data-tags::-webkit-scrollbar-thumb {
    background: var(--bleu-1);
    border-radius: 4px;
}

.custom-data-tags::-webkit-scrollbar-thumb:hover {
    background: var(--orange-1);
}

.custom-data-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: white;
    border: 1px solid var(--bleu-2);
    font-size: 13px;
    color: var(--noir);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.custom-data-tag:hover {
    border-color: var(--bleu-1);
    background: var(--bleu-2);
    transform: scale(1.02);
}

.custom-data-tag .tag-remove {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--bleu-1);
    color: white;
    font-size: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 2px;
}

.custom-data-tag .tag-remove:hover {
    background: var(--orange-1);
    transform: scale(1.1);
}

.extraction-actions {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.extraction-actions .btn-primary,
#start-extraction {
    background-color: var(--bleu-1);
    color: white;
    border: none;
}

.extraction-actions .btn-primary:hover,
#start-extraction:hover {
    background-color: var(--orange-1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#extraction-documents-selector {
    margin-top: 16px;
}

#extraction-docs-select-trigger {
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
}

#extraction-docs-select-trigger * {
    pointer-events: none;
}

@media (max-width: 768px) {
    .extraction-config-container {
        padding: 16px;
    }
    
    .default-data-types-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .custom-data-input-wrapper {
        flex-direction: column;
    }
    
    .add-custom-data-btn {
        width: 100%;
        justify-content: center;
    }
}