/* /pti/style.css - Styles spécifiques à l'application PTI */

.pti-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 10px 0 40px 0;
}

.pti-container.pti-container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}


.pti-header, .pti-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.pti-header-title {
    flex: 1;
    min-width: 280px;
}

.pti-header-title h1 {
    margin: 0;
}

.pti-header-subtitle {
    margin: 8px 0 0 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pti-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* En-tête de section / héro */
.pti-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pti-hero-content h1 {
    color: #ffffff !important;
    border-left: none !important;
    padding-left: 0 !important;
    margin: 0 0 8px 0;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.pti-hero-content p {
    color: #e2e8f0 !important;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 750px;
}

.pti-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pti-hero .pti-btn-outline {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.08);
}

.pti-hero .pti-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Cartes et panneaux */
.pti-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 24px;
    margin-bottom: 25px;
}

.pti-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.pti-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Barre de filtres et recherche */
.pti-filter-bar {
    display: grid;
    grid-template-columns: 2fr 1.5fr auto auto;
    gap: 15px;
    align-items: end;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
}

@media (max-width: 900px) {
    .pti-filter-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .pti-filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pti-filter-bar {
        grid-template-columns: 1fr;
    }
}

.pti-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pti-form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.pti-input, .pti-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.pti-input:focus, .pti-select:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.15);
}

/* Boutons */
.pti-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pti-btn-primary {
    background-color: #2c3e50;
    color: #ffffff;
    border-color: #2c3e50;
}
.pti-btn-primary:hover {
    background-color: #1a252f;
    color: #ffffff;
    transform: translateY(-1px);
}

.pti-btn-accent {
    background-color: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}
.pti-btn-accent:hover {
    background-color: #219653;
    color: #ffffff;
    transform: translateY(-1px);
}

.pti-btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}
.pti-btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.pti-btn-outline {
    background-color: transparent;
    color: #2c3e50;
    border-color: #cbd5e1;
}
.pti-btn-outline:hover {
    background-color: #f8fafc;
    border-color: #2c3e50;
}

.pti-btn-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}
.pti-btn-danger:hover {
    background-color: #ef4444;
    color: #ffffff;
}

.pti-btn-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}
.pti-btn-warning:hover {
    background-color: #f59e0b;
    color: #ffffff;
}

.pti-btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 6px;
}

/* Badges */
.pti-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.pti-badge-section {
    background-color: #e0f2fe;
    color: #0369a1;
}

.pti-badge-period {
    background-color: #f3e8ff;
    color: #7e22ce;
}

.pti-badge-version {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.pti-badge-status-valide {
    background-color: #dcfce7;
    color: #15803d;
}

.pti-badge-status-en_attente {
    background-color: #fef3c7;
    color: #b45309;
}

.pti-badge-status-brouillon {
    background-color: #f1f5f9;
    color: #475569;
}

.pti-badge-status-rejete {
    background-color: #fee2e2;
    color: #b91c1c;
}

.pti-badge-status-archive {
    background-color: #e2e8f0;
    color: #64748b;
}

/* Tableaux */
.pti-table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.pti-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: #ffffff;
}

.pti-table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.pti-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
    color: #334155;
    vertical-align: middle;
}

.pti-table tr:hover td {
    background-color: #f8fafc;
}

/* Groupement de style SharePoint */
.pti-group-header {
    background-color: #f8fafc !important;
    border-top: 2px solid #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.pti-group-header:hover td {
    background-color: #f1f5f9 !important;
}

.pti-group-header td {
    padding: 10px 16px !important;
    font-weight: 600;
}

.pti-group-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-family: inherit;
    font-size: 0.98rem;
    color: inherit;
    text-align: left;
}

.pti-group-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background-color: #e2e8f0;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease;
}

.pti-group-header:hover .pti-group-chevron {
    background-color: #3b82f6;
    color: #ffffff;
}

.pti-group-header.collapsed .pti-group-chevron,
.pti-group-chevron.collapsed {
    transform: rotate(-90deg);
}

.pti-group-row.collapsed {
    display: none !important;
}

.pti-group-row td:first-child {
    padding-left: 26px;
}

/* Sélecteur de moment (radio pills interactifs) */
.pti-moment-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.pti-moment-option {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    background-color: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pti-moment-option:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.pti-moment-option.active {
    border-color: #2c3e50;
    background-color: #f0f4f8;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1);
}

.pti-moment-option input[type="radio"] {
    margin-top: 3px;
}

.pti-submoment-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

/* Message Flash */
.pti-alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pti-alert-success {
    background-color: #dcfce7;
    color: #166534;
    border-left: 5px solid #22c55e;
}

.pti-alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 5px solid #ef4444;
}

.pti-alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 5px solid #f59e0b;
}

.pti-alert-info {
    background-color: #e0f2fe;
    color: #075985;
    border-left: 5px solid #0284c7;
}

/* Modal pour visualiseur PDF */
.pti-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.pti-modal.open {
    display: flex;
}

.pti-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 1050px;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pti-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.pti-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.pti-modal-body {
    flex: 1;
    background-color: #475569;
    position: relative;
}

.pti-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pti-modal-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.pti-modal-close:hover {
    color: #0f172a;
}

/* Historique des versions pliable */
.pti-history-row {
    background-color: #f8fafc;
    border-left: 3px solid #cbd5e1;
}

.pti-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #64748b;
}

.pti-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* ==========================================================================
   Zone de Glisser-Déposer (Drag & Drop)
   ========================================================================== */
.pti-dropzone-container {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    user-select: none;
}

.pti-dropzone-container:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.pti-dropzone-container.dragover {
    border-color: #2563eb;
    background-color: #eff6ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: scale(1.008);
}

.pti-dropzone-icon {
    font-size: 2.8rem;
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.pti-dropzone-container:hover .pti-dropzone-icon,
.pti-dropzone-container.dragover .pti-dropzone-icon {
    transform: translateY(-4px);
}

.pti-dropzone-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.pti-dropzone-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    max-width: 550px;
    margin: 0 auto 15px auto;
    line-height: 1.45;
}

.pti-file-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    text-align: left;
}

@media (max-width: 640px) {
    .pti-file-slots {
        grid-template-columns: 1fr;
    }
}

.pti-slot-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.pti-slot-card.filled {
    background: #f0fdf4;
    border-color: #86efac;
}

.pti-slot-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pti-slot-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pti-slot-badge-docx {
    background: #dbeafe;
    color: #1d4ed8;
}

.pti-slot-badge-pdf {
    background: #fee2e2;
    color: #b91c1c;
}

.pti-slot-details {
    min-width: 0;
}

.pti-slot-filename {
    font-weight: 600;
    font-size: 0.92rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.pti-slot-filesize {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.pti-slot-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.pti-slot-action-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Liste des fichiers choisis (Zone unique) */
.pti-file-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
.pti-file-list-item.is-docx {
    border-left-color: #2563eb;
}
.pti-file-list-item.is-pdf {
    border-left-color: #dc2626;
}
.pti-file-list-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.pti-file-delete-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.pti-file-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}
.pti-file-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
}
.pti-file-status-complete {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.pti-file-status-incomplete {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Tableau de dépôt groupé (Batch) */
.pti-batch-container {
    margin-top: 20px;
}
.pti-batch-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}
.pti-batch-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}
.pti-batch-table th {
    background: #f8fafc;
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}
.pti-batch-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.pti-batch-table tr:last-child td {
    border-bottom: none;
}
.pti-batch-table tr:hover td {
    background-color: #f8fafc;
}
.pti-couple-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.pti-couple-badge-docx {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.pti-couple-badge-pdf {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.pti-couple-badge-missing {
    background: #fef3c7;
    color: #92400e;
    border: 1px dashed #f59e0b;
}

/* Sélection des professions secondaires de la même section */
.pti-extra-prof-container {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.pti-extra-prof-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pti-extra-prof-help {
    font-size: 0.83rem;
    color: #64748b;
    margin: 4px 0 10px 0;
    line-height: 1.45;
}
.pti-extra-prof-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pti-extra-prof-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.86rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}
.pti-extra-prof-pill:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    color: #1d4ed8;
}
.pti-extra-prof-pill input[type="checkbox"] {
    accent-color: #2563eb;
    cursor: pointer;
    width: 15px;
    height: 15px;
    margin: 0;
}
.pti-extra-prof-pill.is-checked {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

/* Encadré discret des modèles de documents (Word) */
.pti-templates-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #003366;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pti-templates-box-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 280px;
}

.pti-templates-box-icon {
    font-size: 1.4rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.pti-templates-box-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 3px;
}

.pti-templates-box-desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

.pti-templates-box-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pti-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pti-template-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.pti-template-btn-subtle {
    opacity: 0.85;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.pti-template-btn-subtle:hover {
    opacity: 1;
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

.pti-template-badge-lang {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
    margin-left: 2px;
}



