.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.logo-link:hover .logo {
    transform: translateY(-8px);
}

.logo-link h1 {
    transition: var(--transition);
}

.logo-link:hover h1 {
    color: var(--primary-color) !important;
}nav ul li a.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
}

nav ul li a.btn:hover {
    background-color: #2d9a6c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}/* static/css/main.css */
:root {
    --primary-color: #38af7c;
    --secondary-color: #194548;
    --accent-color: #f8f9fa;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #fff;
    --border-radius: 6px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    margin: 0;
    padding: 0;
}

header {
    background-color: white;
    color: var(--secondary-color);
    padding: 1rem;
    box-shadow: var(--box-shadow);
    border-bottom: 3px solid var(--primary-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 95px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    max-height: 60px;
    margin-right: 15px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: var(--border-radius);
}

nav ul li a:hover {
    background-color: rgba(25, 69, 72, 0.1);
    color: var(--primary-color);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.welcome {
    text-align: center;
    padding: 3rem 1rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.welcome h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.welcome p {
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #666;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 2rem;
}

.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.25);
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.btn:hover {
    background-color: #2d9a6c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #12332f;
}

.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    background-color: white;
    color: var(--secondary-color);
    border-top: 3px solid var(--primary-color);
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    nav ul {
        justify-content: center;
    }
}

/* Styles pour les éléments de profil dans la navigation */
.user-profile-nav {
    display: flex;
    align-items: center;
}

.profile-link {
    display: flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--border-radius);
    background-color: rgba(56, 175, 124, 0.1);
    transition: var(--transition);
}

.profile-link:hover {
    background-color: rgba(56, 175, 124, 0.2);
    transform: translateY(-2px);
}

.nav-profile-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.nav-profile-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-right: 8px;
}

/* Bouton secondaire pour la déconnexion */
.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #12322f;
}

/* Alertes pour les messages flash */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.alert-success {
    background-color: rgba(56, 175, 124, 0.1);
    border-left: 4px solid var(--primary-color);
    color: #2a8560;
}

.alert-danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #e2f0fd;
    border-left: 4px solid #0d6efd;
    color: #084298;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* Responsive pour la navigation avec profil */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .user-profile-nav {
        width: 100%;
        justify-content: center;
    }
    
    .profile-link {
        width: 100%;
        justify-content: center;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 25px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.edit-controls {
    margin-bottom: 20px;
}

.edit-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.edit-toolbar .btn {
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2f7d59;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-warning {
    background: #fd7e14;
    color: white;
}

.btn-warning:hover {
    background: #e8690b;
}

.edit-stats {
    display: flex;
    gap: 20px;
    font-size: 0.85em;
    color: #666;
    align-items: center;
}

#modification-status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e8f5e8;
    color: #2e7d32;
}

#modification-status.modified {
    background: #fff3e0;
    color: #f57c00;
}

.edit-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.transcript-textarea {
    width: 100%;
    height: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.transcript-textarea:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
}

.edit-help {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85em;
}

.edit-help p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--secondary-color);
}

.edit-help ul {
    margin: 0;
    padding-left: 20px;
}

.edit-help li {
    margin: 4px 0;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .edit-toolbar {
        flex-direction: column;
    }
    
    .edit-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
    
    .edit-stats {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .transcript-textarea {
        min-height: 300px;
        font-size: 16px; /* Évite le zoom sur mobile */
    }
}

/* Styles supplémentaires à ajouter dans transcription.html pour le bouton d'édition */

/* Amélioration du bouton d'édition */
#edit-transcript-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#edit-transcript-btn:hover {
    background: linear-gradient(135deg, #218838, #1fa085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

#edit-transcript-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.2);
}

/* Animation de pulsation pour attirer l'attention */
@keyframes editPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

#edit-transcript-btn.pulse {
    animation: editPulse 2s infinite;
}

/* Styles pour les éléments d'identification automatique dans l'éditeur */
.auto-identified-segment {
    background: rgba(56, 175, 124, 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 0 6px 6px 0;
}

.confidence-score {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.confidence-high {
    background: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.confidence-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #f57c00;
}

.confidence-low {
    background: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

/* Amélioration de l'affichage des résultats pour l'édition */
#result {
    position: relative;
}

#result:hover #edit-transcript-btn {
    animation: editPulse 2s infinite;
}

/* Styles pour les notifications de sauvegarde */
.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.save-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.save-notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Amélioration de l'accessibilité */
.modal-container:focus-within {
    outline: 3px solid rgba(56, 175, 124, 0.5);
    outline-offset: 2px;
}

/* Styles pour l'état de chargement */
.edit-loading {
    position: relative;
    overflow: hidden;
}

.edit-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: editLoading 2s infinite;
}

@keyframes editLoading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive pour tablettes */
@media (max-width: 1024px) {
    .modal-container {
        width: 90%;
        height: 85vh;
    }
    
    .download-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .download-btn {
        font-size: 0.9em;
        padding: 10px 12px;
    }
}

/* Amélioration pour les petits écrans */
@media (max-width: 480px) {
    .modal-header h3 {
        font-size: 1.1em;
    }
    
    .edit-stats {
        font-size: 0.8em;
    }
    
    .edit-help {
        font-size: 0.8em;
    }
    
    .edit-help ul {
        padding-left: 15px;
    }
    
    .download-options {
        grid-template-columns: 1fr;
    }
}

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --surface: #ffffff;
    --surface-elevated: #f8fafc;
    --surface-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ==== HEADER ==== */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ==== MAIN CARD ==== */
.main-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==== UPLOAD SECTION ==== */
.upload-section {
    padding: 3rem;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated) 100%);
    border-bottom: 1px solid var(--border);
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon {
    transform: scale(1.1);
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* File Selected State */
.file-selected {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: var(--success);
    color: white;
}

.file-selected .upload-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* ==== SETTINGS SECTION ==== */
.settings-section {
    padding: 2rem 3rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.setting-card {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.setting-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.setting-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px;
    color: white;
    font-size: 0.75rem;
}

.setting-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-description {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* ==== ACTION SECTION ==== */
.action-section {
    padding: 2rem 3rem 3rem;
    background: var(--surface-elevated);
    border-top: 1px solid var(--border);
    text-align: center;
}

.upload-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: var(--radius);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.upload-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.upload-button::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;
}

.upload-button:hover::before {
    left: 100%;
}

/* ==== PROGRESS SECTION ==== */
.progress-section {
    padding: 3rem;
    text-align: center;
    display: none;
}

.progress-section.active {
    display: block;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.progress-status {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.progress-bar-container {
    background: var(--surface-elevated);
    border-radius: 9999px;
    height: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* ==== RESULTS SECTION ==== */
.results-section {
    display: none;
    padding: 0;
}

.results-section.active {
    display: block;
}

.results-header {
    padding: 2rem 3rem;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    text-align: center;
}

.results-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.results-subtitle {
    opacity: 0.9;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 3rem;
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==== ACTIONS BAR ==== */
.actions-bar {
    padding: 2rem 3rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-button:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.action-button.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==== SPEAKER PROFILES ==== */
.speaker-profiles {
    padding: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.profile-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--surface-elevated) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border);
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-content {
    padding: 1.5rem;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.profile-status.named {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.profile-status.auto {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.profile-status.unnamed {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.naming-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.naming-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.naming-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.naming-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.naming-button:hover {
    background: var(--primary-dark);
}

.audio-samples {
    margin-top: 1.5rem;
}

.samples-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sample-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.sample-info {
    flex: 1;
}

.sample-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.sample-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.sample-audio {
    width: 200px;
    height: 32px;
}

.sample-add {
    background: var(--success);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sample-add:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* ==== TRANSCRIPT ==== */
.transcript-section {
    padding: 3rem;
    border-top: 1px solid var(--border);
}

.transcript-content {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    line-height: 1.8;
    color: var(--text-primary);
}

.speaker-segment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.speaker-name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confidence-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

.confidence-high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.confidence-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.confidence-low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .upload-section,
    .settings-section,
    .action-section,
    .speaker-profiles,
    .transcript-section {
        padding: 2rem 1.5rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .actions-bar {
        flex-direction: column;
        padding: 1.5rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }
}

/* ==== ANIMATIONS ==== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-card {
    animation: fadeInUp 0.6s ease-out;
}

.profile-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.profile-card:nth-child(1) { animation-delay: 0.1s; }
.profile-card:nth-child(2) { animation-delay: 0.2s; }
.profile-card:nth-child(3) { animation-delay: 0.3s; }
.profile-card:nth-child(4) { animation-delay: 0.4s; }

/* Variables CSS pour le design moderne */
:root {
--primary: #667eea;
--primary-dark: #5a6fd8;
--secondary: #764ba2;
--accent: #f093fb;
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
--surface: #ffffff;
--surface-elevated: #f8fafc;
--surface-hover: #f1f5f9;
--text-primary: #1e293b;
--text-secondary: #64748b;
--text-muted: #94a3b8;
--border: #e2e8f0;
--border-hover: #cbd5e1;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
--radius: 0.75rem;
--radius-sm: 0.5rem;
--radius-lg: 1rem;
}

/* Reset et base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
line-height: 1.6;
color: var(--text-primary);
}

/* Container principal */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem 1rem;
}

/* Cards principales */
.card, .main-card {
background: var(--surface);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
overflow: hidden;
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.2);
animation: fadeInUp 0.6s ease-out;
}

/* Sections */
.upload-section {
padding: 3rem;
background: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated) 100%);
border-bottom: 1px solid var(--border);
}

.settings-section {
padding: 2rem 3rem;
}

.action-section {
padding: 2rem 3rem 3rem;
background: var(--surface-elevated);
border-top: 1px solid var(--border);
text-align: center;
}

/* Titres */
.section-title {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.75rem;
}

.upload-title {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--text-primary);
}

.upload-subtitle {
color: var(--text-secondary);
margin-bottom: 2rem;
}

/* Zone d'upload modernisée */
.custom-file-wrapper {
position: relative;
width: 100%;
}

.custom-file-label {
border: 2px dashed var(--border);
border-radius: var(--radius);
padding: 3rem 2rem;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
background: var(--surface);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
min-height: 200px;
justify-content: center;
}

.custom-file-label:hover {
border-color: var(--primary);
background: var(--surface-hover);
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}

.custom-file-icon {
width: 64px;
height: 64px;
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: white;
transition: all 0.3s ease;
}

.custom-file-label:hover .custom-file-icon {
transform: scale(1.1);
}

#audio_file_name {
font-size: 1.125rem;
font-weight: 500;
color: var(--text-primary);
}

/* Formulaires modernisés */
.form-group {
margin-bottom: 2rem;
}

.form-group label {
font-weight: 500;
color: var(--text-primary);
margin-bottom: 0.75rem;
display: flex;
align-items: center;
gap: 0.5rem;
}

.form-control {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text-primary);
font-size: 0.875rem;
transition: all 0.3s ease;
}

.form-control:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Boutons modernisés */
.btn {
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
color: white;
border: none;
padding: 1rem 3rem;
border-radius: var(--radius);
font-size: 1.125rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: var(--shadow-md);
position: relative;
overflow: hidden;
}

.btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}

.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}

.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-secondary {
background: var(--surface);
color: var(--text-primary);
border: 1px solid var(--border);
}

.btn-secondary:hover {
background: var(--surface-hover);
border-color: var(--primary);
}

/* Barre de progression */
.progress-bar {
background: var(--surface-elevated);
border-radius: 9999px;
height: 12px;
margin: 15px 0;
overflow: hidden;
position: relative;
}

.progress {
height: 100%;
background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
border-radius: 9999px;
width: 0%;
transition: width 0.3s ease;
position: relative;
}

.progress::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}

/* Statistiques de résultats */
.transcription-details {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
padding: 2rem;
background: var(--surface-elevated);
border-bottom: 1px solid var(--border);
margin-bottom: 0;
}

.transcription-details > div {
text-align: center;
padding: 1.5rem;
background: var(--surface);
border-radius: var(--radius);
border: 1px solid var(--border);
transition: all 0.3s ease;
}

.transcription-details > div:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}

.transcription-details strong {
display: block;
font-size: 2rem;
font-weight: 700;
color: var(--primary);
margin-bottom: 0.25rem;
}

/* Actions de téléchargement */
.download-options {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
padding: 2rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
}

.download-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text-primary);
text-decoration: none;
font-weight: 500;
transition: all 0.3s ease;
cursor: pointer;
}

.download-btn:hover {
border-color: var(--primary);
background: var(--surface-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}

.download-btn.primary {
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
color: white;
border-color: transparent;
}

.download-btn.primary:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}

/* Profils des intervenants */
.speaker-profiles-container {
padding: 3rem;
}

.speaker-profiles-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
margin-top: 2rem;
}

.speaker-profile-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
transition: all 0.3s ease;
animation: fadeInUp 0.6s ease-out;
animation-fill-mode: both;
}

.speaker-profile-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-xl);
border-color: var(--border-hover);
}

.speaker-profile-card:nth-child(1) { animation-delay: 0.1s; }
.speaker-profile-card:nth-child(2) { animation-delay: 0.2s; }
.speaker-profile-card:nth-child(3) { animation-delay: 0.3s; }
.speaker-profile-card:nth-child(4) { animation-delay: 0.4s; }

.speaker-profile-header {
padding: 1.5rem;
background: linear-gradient(135deg, var(--surface-elevated) 0%, var(--surface) 100%);
}

.speaker-name {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
}

.speaker-icon {
width: 48px;
height: 48px;
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
font-size: 1.25rem;
}

.speaker-stats {
display: flex;
gap: 1.5rem;
justify-content: center;
}

.speaker-stat {
text-align: center;
background: rgba(102, 126, 234, 0.1);
padding: 0.5rem 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.85rem;
color: var(--text-secondary);
font-weight: 500;
}

/* Status badges */
.speaker-named-badge {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.1));
color: var(--success);
padding: 0.75rem 1.5rem;
border-radius: var(--radius);
font-size: 0.9rem;
font-weight: 600;
margin: 1rem auto;
max-width: 280px;
border: 2px solid rgba(16, 185, 129, 0.25);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
transition: all 0.3s ease;
}

.speaker-named-badge:hover {
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
}

/* Formulaire de nommage */
.speaker-naming-section {
margin: 1rem;
padding: 1rem;
background: var(--surface-elevated);
border-radius: var(--radius);
border: 1px dashed var(--border);
}

.speaker-naming-form {
display: flex;
gap: 0.75rem;
margin-top: 1rem;
}

.speaker-name-input {
flex: 1;
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.875rem;
transition: all 0.3s ease;
}

.speaker-name-input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-name-speaker {
padding: 0.75rem 1.5rem;
background: var(--primary);
color: white;
border: none;
border-radius: var(--radius-sm);
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
}

.btn-name-speaker:hover {
background: var(--primary-dark);
}

/* Échantillons audio */
.speaker-audio-samples {
padding: 1.5rem;
}

.samples-title {
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.5rem;
}

.audio-sample {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.75rem;
background: var(--surface-elevated);
border-radius: var(--radius-sm);
margin-bottom: 0.75rem;
border: 1px solid var(--border);
transition: all 0.3s ease;
}

.audio-sample:hover {
background: var(--surface-hover);
box-shadow: var(--shadow-sm);
}

.audio-sample-info {
flex: 1;
min-width: 0;
overflow: hidden;
}

.sample-timestamp {
font-size: 0.75rem;
color: var(--text-muted);
background: rgba(102, 126, 234, 0.1);
padding: 0.25rem 0.5rem;
border-radius: 9999px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0;
}

.sample-text {
font-size: 0.8rem;
color: var(--text-secondary);
font-style: italic;
}

.audio-sample audio {
width: 200px;
height: 32px;
}

.btn-add-to-profile {
background: var(--success);
color: white;
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}

.btn-add-to-profile:hover {
transform: scale(1.1);
box-shadow: var(--shadow-md);
}

/* Transcription */
#result {
background: var(--surface-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 2rem;
max-height: 500px;
overflow-y: auto;
font-family: 'JetBrains Mono', 'Fira Code', monospace;
line-height: 1.8;
color: var(--text-primary);
margin: 2rem 3rem;
}

.speaker-text {
font-weight: 700;
color: var(--primary);
margin-bottom: 0.5rem;
display: block;
padding: 0.5rem 0;
}

/* Status et informations */
.status-info {
background: rgba(102, 126, 234, 0.1);
border-left: 5px solid var(--primary);
border-radius: var(--radius);
padding: 1.5rem;
margin: 2rem 3rem;
color: var(--text-primary);
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* Messages de progrès */
#progress-container {
padding: 3rem;
text-align: center;
}

#progress-container h3 {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-primary);
}

#status-message {
color: var(--text-secondary);
margin-bottom: 2rem;
font-size: 1.125rem;
}

#progress-text {
font-size: 2rem;
font-weight: 700;
color: var(--primary);
margin-top: 1rem;
}

/* Animations */
@keyframes fadeInUp {
from {
    opacity: 0;
    transform: translateY(20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

/* États cachés */
.hidden {
display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
.container {
    padding: 1rem;
}

.upload-section,
.settings-section,
.action-section,
.speaker-profiles-container {
    padding: 2rem 1.5rem;
}

.speaker-profiles-list {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.download-options {
    flex-direction: column;
    padding: 1.5rem;
}

.custom-file-label {
    padding: 2rem 1rem;
}

.transcription-details {
    grid-template-columns: 1fr;
    gap: 1rem;
}

#result {
    margin: 1rem;
    padding: 1rem;
}

.status-info {
    margin: 1rem;
    padding: 1rem;
}
}

/* ===== CSS ADDITIONNEL POUR LA PAGE DE TRANSCRIPTION ===== */

/* Amélioration du file input personnalisé */
.custom-file-input {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.custom-file-label {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
border: 2px dashed var(--border);
border-radius: var(--radius);
padding: 3rem 2rem;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
background: var(--surface);
position: relative;
overflow: hidden;
min-height: 200px;
}

/* CSS pour l'identification automatique */
.auto-identification-summary {
background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
border: 1px solid rgba(102, 126, 234, 0.15);
border-radius: var(--radius);
padding: 2rem;
margin: 2rem 0;
}

.identification-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}

.identification-stat {
text-align: center;
padding: 1rem;
background: var(--surface);
border-radius: var(--radius-sm);
border: 1px solid var(--border);
transition: all 0.3s ease;
}

.identification-stat:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}

.identification-stat-value {
font-size: 1.75rem;
font-weight: 700;
color: var(--primary);
display: block;
margin-bottom: 0.5rem;
}

.identification-stat-label {
font-size: 0.85rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
}

.speakers-found-list {
margin: 1.5rem 0;
}

.speaker-found-badge {
display: inline-block;
background: rgba(102, 126, 234, 0.1);
color: var(--primary);
padding: 0.5rem 1rem;
border-radius: var(--radius-sm);
margin: 0.25rem;
font-size: 0.9em;
font-weight: 500;
border: 1px solid rgba(102, 126, 234, 0.2);
}

.duplicate-speaker {
background: rgba(245, 158, 11, 0.15);
color: var(--warning);
border-color: rgba(245, 158, 11, 0.3);
}

.duplicate-warning {
background: rgba(245, 158, 11, 0.1);
border: 1px solid rgba(245, 158, 11, 0.3);
border-radius: var(--radius);
padding: 1rem;
margin: 1rem 0;
color: #856404;
}

.duplicate-warning .icon {
font-size: 1.2em;
margin-right: 0.5rem;
}

/* CSS pour les segments identifiés automatiquement */
.auto-identified-segment {
background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.02));
border: 1px solid rgba(102, 126, 234, 0.15);
border-left: 4px solid var(--primary);
border-radius: var(--radius-sm);
margin: 1rem 0;
padding: 1rem;
transition: all 0.3s ease;
}

.auto-identified-segment:hover {
box-shadow: var(--shadow-md);
border-color: var(--primary);
}

.identification-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 0.5rem;
}

.identification-controls {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}

.confidence-indicator {
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.8em;
font-weight: 500;
white-space: nowrap;
}

.confidence-high {
background: rgba(16, 185, 129, 0.15);
color: var(--success);
border: 1px solid rgba(16, 185, 129, 0.3);
}

.confidence-medium {
background: rgba(245, 158, 11, 0.15);
color: var(--warning);
border: 1px solid rgba(245, 158, 11, 0.3);
}

.confidence-low {
background: rgba(239, 68, 68, 0.15);
color: var(--error);
border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-manage-identification {
background: var(--surface-elevated);
border: 1px solid var(--border);
color: var(--text-primary);
padding: 0.5rem 1rem;
border-radius: var(--radius-sm);
font-size: 0.85em;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
}

.btn-manage-identification:hover {
background: var(--surface-hover);
border-color: var(--primary);
transform: translateY(-1px);
}

.btn-manage-identification.active {
background: var(--primary);
color: white;
border-color: var(--primary);
}

.btn-manage-identification.confirmed {
background: var(--success);
color: white;
border-color: var(--success);
}

.btn-manage-identification.modified {
background: var(--warning);
color: white;
border-color: var(--warning);
}

.btn-manage-identification.rejected {
background: var(--error);
color: white;
border-color: var(--error);
}

/* Panneau de gestion des identifications */
.identification-management-panel {
margin-top: 1rem;
padding: 1.5rem;
background: var(--surface-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
box-shadow: var(--shadow-sm);
}

.management-title {
margin-bottom: 1rem;
}

.management-title strong {
color: var(--text-primary);
font-size: 1.1em;
}

.management-title small {
display: block;
color: var(--text-secondary);
margin-top: 0.25rem;
font-size: 0.9em;
}

.identification-actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin-bottom: 1rem;
}

.btn-confirm-identification,
.btn-reassign,
.btn-create-new,
.btn-reject {
padding: 0.6rem 1.2rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.9em;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
background: var(--surface);
color: var(--text-primary);
}

.btn-confirm-identification {
background: linear-gradient(135deg, var(--success), #059669);
color: white;
border-color: var(--success);
}

.btn-confirm-identification:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}

.btn-reassign {
background: linear-gradient(135deg, var(--primary), var(--primary-dark));
color: white;
border-color: var(--primary);
}

.btn-reassign:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}

.btn-create-new {
background: linear-gradient(135deg, var(--warning), #d97706);
color: white;
border-color: var(--warning);
}

.btn-create-new:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}

.btn-reject {
background: linear-gradient(135deg, var(--error), #dc2626);
color: white;
border-color: var(--error);
}

.btn-reject:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}

/* Formulaires dans les panneaux de gestion */
.reassignment-form,
.new-profile-form {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 1.5rem;
margin-top: 1rem;
}

.reassignment-form label,
.new-profile-form label {
display: block;
font-weight: 500;
color: var(--text-primary);
margin-bottom: 0.5rem;
}

.reassignment-select,
.new-profile-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text-primary);
font-size: 0.9em;
transition: all 0.3s ease;
margin-bottom: 1rem;
}

.reassignment-select:focus,
.new-profile-input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
}

.btn-confirm,
.btn-cancel {
padding: 0.6rem 1.2rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.9em;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}

.btn-confirm {
background: var(--primary);
color: white;
border-color: var(--primary);
}

.btn-confirm:hover {
background: var(--primary-dark);
transform: translateY(-1px);
}

.btn-cancel {
background: var(--surface);
color: var(--text-secondary);
}

.btn-cancel:hover {
background: var(--surface-hover);
color: var(--text-primary);
}

/* États visuels des segments modifiés */
.identification-confirmed {
background: rgba(16, 185, 129, 0.05);
border-left-color: var(--success);
}

.identification-modified {
background: rgba(245, 158, 11, 0.05);
border-left-color: var(--warning);
}

.identification-rejected {
background: rgba(239, 68, 68, 0.05);
border-left-color: var(--error);
}

/* CSS pour les segments problématiques */
.problematic-identification {
background: rgba(245, 158, 11, 0.1);
border: 1px solid rgba(245, 158, 11, 0.3);
border-left: 4px solid var(--warning);
border-radius: var(--radius-sm);
margin: 1rem 0;
padding: 1rem;
}

.identification-problem-badge {
background: var(--warning);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.7em;
font-weight: 600;
margin-left: 0.5rem;
}

/* CSS pour les empreintes vocales */
.embedding-status {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
border-radius: var(--radius-sm);
margin: 1rem 0;
font-size: 0.9em;
transition: all 0.3s ease;
}

.embedding-status.available {
background: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.2);
color: var(--success);
}

.embedding-status.unavailable {
background: rgba(156, 163, 175, 0.1);
border: 1px solid rgba(156, 163, 175, 0.2);
color: var(--text-muted);
}

.embedding-status.generating {
background: rgba(102, 126, 234, 0.1);
border: 1px solid rgba(102, 126, 234, 0.2);
color: var(--primary);
}

.embedding-actions {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
}

.btn-embedding {
padding: 0.4rem 0.8rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.8em;
cursor: pointer;
transition: all 0.3s ease;
background: var(--surface);
color: var(--text-primary);
}

.btn-embedding.regenerate {
background: var(--primary);
color: white;
border-color: var(--primary);
}

.btn-embedding.info {
background: var(--surface-elevated);
color: var(--text-secondary);
}

.btn-embedding:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}

.embedding-message {
padding: 0.5rem 1rem;
border-radius: var(--radius-sm);
margin-top: 0.5rem;
font-size: 0.8em;
}

.embedding-message.success {
background: rgba(16, 185, 129, 0.1);
color: var(--success);
border: 1px solid rgba(16, 185, 129, 0.2);
}

.embedding-message.error {
background: rgba(239, 68, 68, 0.1);
color: var(--error);
border: 1px solid rgba(239, 68, 68, 0.2);
}

/* CSS pour la validation de noms */
.name-validation-message {
padding: 0.5rem 0.75rem;
border-radius: var(--radius-sm);
margin-top: 0.5rem;
font-size: 0.85em;
transition: all 0.3s ease;
}

.name-validation-message.success {
background: rgba(16, 185, 129, 0.1);
color: var(--success);
border: 1px solid rgba(16, 185, 129, 0.2);
}

.name-validation-message.error {
background: rgba(239, 68, 68, 0.1);
color: var(--error);
border: 1px solid rgba(239, 68, 68, 0.2);
}

/* CSS pour les échantillons audio */
.audio-sample {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
background: var(--surface-elevated);
border-radius: var(--radius-sm);
margin-bottom: 0.75rem;
border: 1px solid var(--border);
transition: all 0.3s ease;
}

.audio-sample:hover {
background: var(--surface-hover);
box-shadow: var(--shadow-sm);
transform: translateY(-1px);
}

.audio-sample-info {
flex: 1;
min-width: 0;
}

.audio-sample-controls {
display: flex;
align-items: center;
gap: 1rem;
flex-shrink: 0;
}

.sample-add-status {
margin-top: 0.5rem;
font-size: 0.8em;
padding: 0.25rem 0.5rem;
border-radius: 4px;
}

.sample-add-status.success {
background: rgba(16, 185, 129, 0.1);
color: var(--success);
}

.sample-add-status.error {
background: rgba(239, 68, 68, 0.1);
color: var(--error);
}

/* Améliorations du bouton d'ajout d'extrait */
.btn-add-to-profile {
background: var(--success);
color: white;
border: none;
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
font-size: 1rem;
}

.btn-add-to-profile:hover {
transform: scale(1.1);
box-shadow: var(--shadow-md);
}

.btn-add-to-profile.adding {
background: var(--warning);
animation: pulse 1.5s infinite;
}

.btn-add-to-profile.added {
background: var(--success);
transform: scale(1);
}

@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}

/* CSS pour les messages temporaires */
#temp-message {
position: fixed;
top: 20px;
right: 20px;
padding: 12px 20px;
border-radius: var(--radius);
font-size: 0.9em;
font-weight: 500;
z-index: 1000;
box-shadow: var(--shadow-lg);
transition: all 0.3s ease;
max-width: 350px;
}

/* CSS pour les états de chargement */
.loading-samples {
text-align: center;
padding: 2rem;
color: var(--text-secondary);
font-style: italic;
}

.no-samples {
text-align: center;
padding: 1.5rem;
color: var(--text-muted);
background: var(--surface-elevated);
border: 1px dashed var(--border);
border-radius: var(--radius-sm);
font-style: italic;
}

/* CSS pour la synthèse */
.synthesis-container {
margin-top: 2rem;
}

.synthesis-text {
background: var(--surface-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 2rem;
line-height: 1.7;
color: var(--text-primary);
}

.synthesis-text h3 {
color: var(--primary);
margin: 1.5rem 0 0.75rem 0;
font-size: 1.25rem;
font-weight: 600;
}

.synthesis-text p {
margin-bottom: 1rem;
text-align: justify;
}

.synthesis-text ul {
margin: 1rem 0;
padding-left: 2rem;
}

.synthesis-text li {
margin-bottom: 0.5rem;
}

.synthesis-text blockquote {
margin: 1.5rem 0;
padding: 1rem 1.5rem;
border-left: 4px solid var(--primary);
background: rgba(102, 126, 234, 0.05);
font-style: italic;
color: var(--text-secondary);
}

/* CSS pour les chevauchements */
.overlap-container {
margin-top: 2rem;
}

.overlap-title {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.75rem;
}

.overlap-list {
display: flex;
flex-direction: column;
gap: 1rem;
}

.overlap-item {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
transition: all 0.3s ease;
}

.overlap-item:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2px);
}

.overlap-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
flex-wrap: wrap;
gap: 0.5rem;
}

.overlap-time {
background: rgba(102, 126, 234, 0.1);
color: var(--primary);
padding: 0.5rem 1rem;
border-radius: var(--radius-sm);
font-weight: 500;
font-size: 0.9em;
}

.overlap-speakers {
color: var(--text-secondary);
font-weight: 500;
}

.overlap-audio {
width: 100%;
margin: 1rem 0;
}

.overlap-texts {
margin-top: 1rem;
}

.overlap-text {
margin-bottom: 0.75rem;
padding: 0.75rem;
background: var(--surface-elevated);
border-radius: var(--radius-sm);
border-left: 3px solid var(--primary);
}

.overlap-text-speaker {
font-weight: 600;
color: var(--primary);
display: block;
margin-bottom: 0.25rem;
}

/* Améliorations responsives spécifiques */
@media (max-width: 768px) {
.identification-header {
    flex-direction: column;
    align-items: flex-start;
}

.identification-controls {
    width: 100%;
    justify-content: space-between;
}

.identification-actions {
    grid-template-columns: 1fr;
}

.btn-confirm-identification,
.btn-reassign,
.btn-create-new,
.btn-reject {
    width: 100%;
    text-align: center;
}

.audio-sample {
    flex-direction: column;
    align-items: stretch;
}

.audio-sample-controls {
    justify-content: space-between;
}

.overlap-header {
    flex-direction: column;
    align-items: flex-start;
}

#temp-message {
    right: 10px;
    left: 10px;
    max-width: none;
}
}

/* Améliorations pour l'accessibilité */
.btn-manage-identification:focus,
.btn-confirm-identification:focus,
.btn-reassign:focus,
.btn-create-new:focus,
.btn-reject:focus,
.btn-confirm:focus,
.btn-cancel:focus {
outline: 2px solid var(--primary);
outline-offset: 2px;
}

.reassignment-select:focus,
.new-profile-input:focus {
outline: 2px solid var(--primary);
outline-offset: 2px;
}

/* Animation pour les nouveaux éléments */
.auto-identified-segment,
.identification-management-panel {
animation: slideInFromTop 0.4s ease-out;
}

@keyframes slideInFromTop {
from {
    opacity: 0;
    transform: translateY(-10px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

/* CSS pour les boutons d'action rapide */
.btn-quick-action {
padding: 0.3rem 0.6rem;
border: 1px solid var(--border);
border-radius: 4px;
font-size: 0.7em;
cursor: pointer;
transition: all 0.3s ease;
background: var(--surface);
color: var(--text-primary);
white-space: nowrap;
}

.btn-quick-reject {
background: var(--error);
color: white;
border-color: var(--error);
}

.btn-quick-fix {
background: var(--warning);
color: white;
border-color: var(--warning);
}

.btn-quick-action:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}

/* Amélioration du style des segments de speakers */
.segment-marker {
background: rgba(102, 126, 234, 0.05);
border: 1px solid rgba(102, 126, 234, 0.15);
border-radius: var(--radius-sm);
padding: 0.5rem 1rem;
margin: 1rem 0 0.5rem 0;
font-weight: 600;
color: var(--primary);
font-size: 0.9em;
}

.unknown-speaker .speaker-text {
color: var(--text-muted);
font-style: italic;
}

/* CSS pour améliorer la lisibilité des statistiques */
.transcription-details {
background: linear-gradient(135deg, var(--surface-elevated), var(--surface));
}

.transcription-details > div {
position: relative;
overflow: hidden;
}

.transcription-details > div::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* CSS pour la barre de progression améliorée */
.progress-bar-container {
position: relative;
background: var(--surface-elevated);
border: 1px solid var(--border);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-percentage {
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.speaker-samples-title {
margin-left: 25%;
}

/* CSS UNIQUEMENT pour les éléments spécifiques à la transcription */
/* Ce fichier ne redéfinit AUCUN style de base (body, header, nav, btn, form-control, etc.) */

/* Variables supplémentaires pour compatibilité */
:root {
--primary: var(--primary-color);
--secondary: var(--secondary-color);
--success: var(--primary-color);
--warning: #f59e0b;
--error: #ef4444;
--surface: #ffffff;
--surface-elevated: var(--light-color);
--surface-hover: #f0fdf9;
--text-muted: #6b7c7a;
--border-hover: #a3d9cc;
--radius-sm: 4px;
--radius-lg: 8px;
--shadow-lg: 0 10px 15px -3px rgba(25, 69, 72, 0.1);
--shadow-xl: 0 20px 25px -5px rgba(25, 69, 72, 0.1);
--gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #2d9a6c 100%);
--gradient-surface: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
--gradient-hero: linear-gradient(135deg, var(--secondary-color) 0%, #2d6168 100%);
}

/* Override UNIQUEMENT du background pour cette page */
body {
background: var(--gradient-hero) !important;
}

/* Container spécifique transcription */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem 1rem;
}

/* Header spécifique page transcription (pas le menu) */
.header {
text-align: center;
margin-bottom: 3rem;
color: white;
}

.header h1 {
font-size: 3rem;
font-weight: 700;
margin-bottom: 1rem;
background: linear-gradient(135deg, #ffffff 0%, #a3d9cc 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

.header p {
font-size: 1.25rem;
opacity: 0.9;
max-width: 600px;
margin: 0 auto;
}

/* Cards spécifiques transcription */
.main-card {
background: var(--surface);
border-radius: var(--radius-lg);
box-shadow: var(--box-shadow);
overflow: hidden;
border: 1px solid #d1e7dd;
animation: fadeInUp 0.6s ease-out;
}

/* Sections transcription */
.upload-section {
padding: 3rem;
background: var(--gradient-surface);
border-bottom: 1px solid #d1e7dd;
}

.settings-section {
padding: 2rem 3rem;
}

.action-section {
padding: 2rem 3rem 3rem;
background: var(--light-color);
border-top: 1px solid #d1e7dd;
text-align: center;
}

/* Upload zone */
.custom-file-wrapper {
position: relative;
width: 100%;
}

.custom-file-label {
border: 2px dashed #d1e7dd;
border-radius: var(--border-radius);
padding: 3rem 2rem;
text-align: center;
transition: var(--transition);
cursor: pointer;
background: var(--surface);
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
min-height: 200px;
justify-content: center;
}

.custom-file-label:hover {
border-color: var(--primary-color);
background: var(--surface-hover);
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}

.custom-file-icon {
width: 64px;
height: 64px;
background: var(--gradient-primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: white;
transition: var(--transition);
}

.custom-file-label:hover .custom-file-icon {
transform: scale(1.1);
}

.custom-file-input {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

#audio_file_name {
font-size: 1.125rem;
font-weight: 500;
color: var(--text-color);
}

/* Titres avec ligne de soulignement */
.upload-title {
position: relative;
padding-bottom: 0.5rem;
}

.upload-title::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 50px;
height: 3px;
background-color: var(--primary-color);
}

/* Progress bars */
.progress-bar {
background: var(--light-color);
border-radius: 9999px;
height: 12px;
margin: 15px 0;
overflow: hidden;
border: 1px solid #d1e7dd;
}

.progress {
height: 100%;
background: linear-gradient(90deg, var(--primary-color) 0%, #56c596 100%);
border-radius: 9999px;
width: 0%;
transition: width 0.3s ease;
position: relative;
}

.progress::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}

/* Statistiques résultats */
.transcription-details {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
padding: 2rem;
background: var(--light-color);
border-bottom: 1px solid #d1e7dd;
}

.transcription-details > div {
text-align: center;
padding: 1.5rem;
background: var(--surface);
border-radius: var(--border-radius);
border: 1px solid #d1e7dd;
transition: var(--transition);
position: relative;
}

.transcription-details > div::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: var(--gradient-primary);
}

.transcription-details > div:hover {
transform: translateY(-2px);
box-shadow: var(--box-shadow);
}

.transcription-details strong {
display: block;
font-size: 2rem;
font-weight: 700;
color: var(--primary-color);
margin-bottom: 0.25rem;
}

/* Download options */
.download-options {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
padding: 2rem;
background: var(--surface);
border-bottom: 1px solid #d1e7dd;
}

.download-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border: 1px solid #d1e7dd;
border-radius: var(--border-radius);
background: var(--surface);
color: var(--text-color);
text-decoration: none;
font-weight: 500;
transition: var(--transition);
cursor: pointer;
}

.download-btn:hover {
border-color: var(--primary-color);
background: var(--surface-hover);
transform: translateY(-1px);
}

.download-btn.primary {
background: var(--gradient-primary);
color: white;
border-color: transparent;
}

/* Profils intervenants */
.speaker-profiles-container {
padding: 3rem;
}

.speaker-profiles-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
margin-top: 2rem;
}

.speaker-profile-card {
background: var(--surface);
border: 1px solid #d1e7dd;
border-radius: var(--border-radius);
overflow: hidden;
transition: var(--transition);
animation: fadeInUp 0.6s ease-out;
animation-fill-mode: both;
}

.speaker-profile-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-xl);
border-color: var(--border-hover);
}

.speaker-profile-header {
padding: 1.5rem;
background: var(--gradient-surface);
}

.speaker-name {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-color);
}

.speaker-icon {
width: 48px;
height: 48px;
background: var(--gradient-primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700;
font-size: 1.25rem;
}

.speaker-stats {
display: flex;
gap: 1.5rem;
justify-content: center;
}

.speaker-stat {
text-align: center;
background: rgba(56, 175, 124, 0.1);
padding: 0.5rem 0.5rem;
border-radius: var(--border-radius);
font-size: 0.85rem;
color: var(--secondary-color);
font-weight: 500;
border: 1px solid rgba(56, 175, 124, 0.2);
}

/* Status badges */
.speaker-named-badge {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
background: linear-gradient(135deg, rgba(56, 175, 124, 0.15), rgba(56, 175, 124, 0.1));
color: var(--primary-color);
padding: 0.75rem 1.5rem;
border-radius: var(--border-radius);
font-size: 0.9rem;
font-weight: 600;
margin: 1rem auto;
max-width: 280px;
border: 2px solid rgba(56, 175, 124, 0.25);
box-shadow: 0 4px 12px rgba(56, 175, 124, 0.1);
transition: var(--transition);
}

/* Formulaires nommage */
.speaker-naming-section {
margin: 1rem;
padding: 1rem;
background: var(--light-color);
border-radius: var(--border-radius);
border: 1px dashed #d1e7dd;
}

.speaker-naming-form {
display: flex;
gap: 0.75rem;
margin-top: 1rem;
}

.speaker-name-input {
flex: 1;
padding: 0.75rem;
border: 1px solid #d1e7dd;
border-radius: var(--border-radius);
font-size: 0.875rem;
transition: var(--transition);
}

.speaker-name-input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.25);
}

.btn-name-speaker {
padding: 0.75rem 1.5rem;
background: var(--primary-color);
color: white;
border: none;
border-radius: var(--border-radius);
font-weight: 500;
cursor: pointer;
transition: var(--transition);
white-space: nowrap;
}

.btn-name-speaker:hover {
background: #2d9a6c;
}

/* Échantillons audio */
.speaker-audio-samples {
padding: 1.5rem;
}

.samples-title {
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-color);
display: flex;
align-items: center;
gap: 0.5rem;
}

.audio-sample {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.75rem;
background: var(--light-color);
border-radius: var(--border-radius);
margin-bottom: 0.75rem;
border: 1px solid #d1e7dd;
transition: var(--transition);
}

.audio-sample:hover {
background: var(--surface-hover);
}

.audio-sample-info {
flex: 1;
min-width: 0;
overflow: hidden;
}

.sample-timestamp {
font-size: 0.75rem;
color: var(--text-muted);
background: rgba(56, 175, 124, 0.1);
padding: 0.25rem 0.5rem;
border-radius: 9999px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.sample-text {
font-size: 0.8rem;
color: var(--secondary-color);
font-style: italic;
}

.btn-add-to-profile {
background: var(--primary-color);
color: white;
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: var(--transition);
}

.btn-add-to-profile:hover {
transform: scale(1.1);
box-shadow: var(--box-shadow);
}

/* Transcription */
#result {
background: var(--light-color);
border: 1px solid #d1e7dd;
border-radius: var(--border-radius);
padding: 2rem;
max-height: 500px;
overflow-y: auto;
font-family: 'JetBrains Mono', 'Fira Code', monospace;
line-height: 1.8;
color: var(--text-color);
margin: 2rem 3rem;
}

.speaker-text {
font-weight: 700;
color: var(--primary-color);
margin-bottom: 0.5rem;
display: block;
padding: 0.5rem 0;
}

/* Status info */
.status-info {
background: rgba(56, 175, 124, 0.1);
border-left: 5px solid var(--primary-color);
border-radius: var(--border-radius);
padding: 1.5rem;
margin: 2rem 3rem;
color: var(--text-color);
box-shadow: 0 2px 8px rgba(56, 175, 124, 0.1);
}

/* Progress messages */
#progress-container {
padding: 3rem;
text-align: center;
}

#progress-container h3 {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-color);
}

#status-message {
color: var(--secondary-color);
margin-bottom: 2rem;
font-size: 1.125rem;
}

#progress-text {
font-size: 2rem;
font-weight: 700;
color: var(--primary-color);
margin-top: 1rem;
}

/* Auto identification */
.auto-identification-summary {
background: linear-gradient(135deg, rgba(56, 175, 124, 0.05), rgba(25, 69, 72, 0.05));
border: 1px solid rgba(56, 175, 124, 0.15);
border-radius: var(--border-radius);
padding: 2rem;
margin: 2rem 0;
}

.identification-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}

.identification-stat {
text-align: center;
padding: 1rem;
background: var(--surface);
border-radius: var(--border-radius);
border: 1px solid #d1e7dd;
transition: var(--transition);
}

.identification-stat:hover {
transform: translateY(-2px);
box-shadow: var(--box-shadow);
}

.identification-stat-value {
font-size: 1.75rem;
font-weight: 700;
color: var(--primary-color);
display: block;
margin-bottom: 0.5rem;
}

.identification-stat-label {
font-size: 0.85rem;
color: var(--secondary-color);
text-transform: uppercase;
letter-spacing: 0.05em;
}

/* Confidence badges */
.confidence-high {
background: rgba(56, 175, 124, 0.15);
color: var(--primary-color);
border: 1px solid rgba(56, 175, 124, 0.3);
}

.confidence-medium {
background: rgba(245, 158, 11, 0.15);
color: #f59e0b;
border: 1px solid rgba(245, 158, 11, 0.3);
}

.confidence-low {
background: rgba(239, 68, 68, 0.15);
color: #ef4444;
border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Management buttons */
.btn-manage-identification {
background: var(--light-color);
border: 1px solid #d1e7dd;
color: var(--text-color);
padding: 0.5rem 1rem;
border-radius: var(--border-radius);
font-size: 0.85em;
cursor: pointer;
transition: var(--transition);
white-space: nowrap;
}

.btn-manage-identification:hover {
background: var(--surface-hover);
border-color: var(--primary-color);
transform: translateY(-1px);
}

.btn-manage-identification.confirmed {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

/* Special buttons */
.btn-confirm-identification {
background: var(--gradient-primary);
color: white;
border-color: var(--primary-color);
padding: 0.6rem 1.2rem;
border-radius: var(--border-radius);
font-size: 0.9em;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}

.btn-reassign {
background: linear-gradient(135deg, var(--primary-color), #2d9a6c);
color: white;
border-color: var(--primary-color);
padding: 0.6rem 1.2rem;
border-radius: var(--border-radius);
font-size: 0.9em;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}

.btn-create-new {
background: linear-gradient(135deg, #f59e0b, #d97706);
color: white;
border-color: #f59e0b;
padding: 0.6rem 1.2rem;
border-radius: var(--border-radius);
font-size: 0.9em;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}

.btn-reject {
background: linear-gradient(135deg, #ef4444, #dc2626);
color: white;
border-color: #ef4444;
padding: 0.6rem 1.2rem;
border-radius: var(--border-radius);
font-size: 0.9em;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}

/* États cachés */
.hidden {
display: none !important;
}

/* Animations */
@keyframes fadeInUp {
from {
    opacity: 0;
    transform: translateY(20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

/* Responsive */
@media (max-width: 768px) {
.container {
    padding: 1rem;
}

.header h1 {
    font-size: 2rem;
}

.upload-section,
.settings-section,
.action-section,
.speaker-profiles-container {
    padding: 2rem 1.5rem;
}

.speaker-profiles-list {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.download-options {
    flex-direction: column;
    padding: 1.5rem;
}

.custom-file-label {
    padding: 2rem 1rem;
}

.transcription-details {
    grid-template-columns: 1fr;
    gap: 1rem;
}

#result {
    margin: 1rem;
    padding: 1rem;
}

.status-info {
    margin: 1rem;
    padding: 1rem;
}
}

.modal-container {
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 1000px;
    position: relative;
}

.edit-area {
    margin: 20px 0;
    position: relative;
}

.transcript-textarea {
    width: 100%;
    min-height: 400px;
    max-height: 500px;
    padding: 20px; /* Augmenté pour plus d'espace */
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    
    /* CORRECTION PRINCIPALE: Espace en bas */
    padding-bottom: 30px; /* Espace supplémentaire en bas */
    
    /* Amélioration de la lisibilité */
    background-color: #fafafa;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.transcript-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #38af7c);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
}

/* Assurer que le contenu ne déborde pas */
.modal-body {
    max-height: calc(90vh - 120px); /* Réserver de l'espace pour header/footer */
    overflow-y: auto;
    padding-bottom: 20px; /* Espace supplémentaire en bas du modal body */
}

/* Amélioration de l'espacement général de la modal */
.modal-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1001;
}

.edit-controls {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    position: sticky;
    top: 70px; /* Après le header */
    background: white;
    z-index: 1000;
}

.edit-help {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9em;
    color: #666;
    
    /* CORRECTION: Espace en bas de la modal */
    margin-bottom: 30px; /* Espace supplémentaire en bas */
}

/* Scrollbar personnalisée pour meilleure UX */
.transcript-textarea::-webkit-scrollbar {
    width: 8px;
}

.transcript-textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.transcript-textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.transcript-textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Amélioration de l'affichage des statistiques */
.edit-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9em;
    color: #666;
    padding: 10px 0;
}

.edit-stats > span {
    padding: 4px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    white-space: nowrap;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        padding: 15px;
        max-height: 95vh;
    }
    
    .transcript-textarea {
        min-height: 300px;
        max-height: 400px;
        padding: 15px;
        padding-bottom: 25px; /* Maintenir l'espace en bas sur mobile */
        font-size: 13px;
    }
    
    .edit-help {
        margin-bottom: 25px; /* Espace réduit mais suffisant sur mobile */
    }
    
    .edit-stats {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Dans le fichier CSS principal ou dans le bloc <style> de base.html */
/* Styles pour masquer complètement les éléments d'interface lors de l'extraction */

/* Classe utilitaire pour masquer des éléments lors de l'extraction de texte */
.extraction-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Masquer complètement tous les éléments de gestion d'interface */
.identification-management-panel,
.identification-management,
.identification-actions,
.identification-controls,
.reassignment-form,
.new-profile-form,
.confidence-indicator,
.btn-manage-identification,
.btn-confirm-identification,
.btn-reassign,
.btn-create-new,
.btn-reject,
.btn-confirm,
.btn-cancel,
.btn-quick-action,
.btn-quick-reject,
.btn-quick-fix,
.management-title,
.form-actions,
.name-validation-message,
.duplicate-warning,
.identification-problem-badge {
    /* Ces éléments ne doivent JAMAIS apparaître dans l'extraction de texte */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Amélioration de l'overlay de la modal pour éviter tout conflit */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

/* Assurer que le textarea a bien l'espacement nécessaire */
.transcript-textarea {
    /* Espacement interne généreux */
    padding: 20px !important;
    padding-bottom: 40px !important; /* Espace extra en bas */
    
    /* Box model pour éviter les débordements */
    box-sizing: border-box;
    
    /* Hauteur minimale confortable */
    min-height: 450px;
    
    /* Espacement des lignes pour la lisibilité */
    line-height: 1.7;
    
    /* Police lisible */
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    
    /* Bordure et focus */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    
    /* Couleur de fond légèrement différente pour le confort */
    background-color: #fafbfc;
    
    /* Transition douce */
    transition: all 0.2s ease;
}

.transcript-textarea:focus {
    border-color: var(--primary-color, #38af7c);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
    outline: none;
}

/* Styles pour le modal body avec espacement correct */
.modal-body {
    padding: 0 20px 30px 20px; /* Padding en bas de 30px */
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Scrollbar personnalisée pour le modal body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Animation d'ouverture de la modal */
.modal-overlay {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-container {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive design pour la modal */
@media (max-width: 768px) {
    .modal-container {
        width: 95vw;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 0 15px 25px 15px;
    }
    
    .transcript-textarea {
        min-height: 350px;
        padding: 15px !important;
        padding-bottom: 30px !important;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 98vw;
        margin: 5px;
    }
    
    .transcript-textarea {
        min-height: 300px;
        padding: 12px !important;
        padding-bottom: 25px !important;
    }
}

/* Dans le fichier CSS principal ou dans le bloc <style> de base.html */
/* Correction du titre de la modal d'édition invisible */

.modal-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #eee;
    background: white;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    /* CORRECTION PRINCIPALE: Couleur du titre visible */
    color: #333 !important;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-shadow: none;
    
    /* Assurer la visibilité */
    background: none;
    opacity: 1;
    z-index: 1002;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-close-btn:active {
    background-color: #e0e0e0;
}

/* Assurer la visibilité sur tous les thèmes */
.modal-container h3,
.modal-container .modal-header h3 {
    color: #2c3e50 !important;
    text-decoration: none;
}

/* Mode sombre si applicable */
@media (prefers-color-scheme: dark) {
    .modal-header h3 {
        color: #2c3e50 !important; /* Garder sombre même en mode sombre pour la lisibilité */
    }
    
    .modal-header {
        background: white; /* Fond blanc pour contraste */
        border-bottom-color: #ddd;
    }
}

/* Dans le fichier CSS principal ou dans le bloc <style> de base.html */
/* Correction de la barre d'outils qui masque le texte */

.edit-controls {
    /* CORRECTION PRINCIPALE: Supprimer le position sticky qui masque le contenu */
    position: static; /* Au lieu de sticky */
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    background: white;
    z-index: auto; /* Réduire le z-index */
    
    /* Légère ombre pour délimiter visuellement */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.edit-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

.edit-toolbar .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edit-toolbar .btn-primary {
    background-color: var(--primary-color, #38af7c);
    color: white;
}

.edit-toolbar .btn-primary:hover {
    background-color: #2d8f63;
    transform: translateY(-1px);
}

.edit-toolbar .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.edit-toolbar .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.edit-toolbar .btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.edit-toolbar .btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
}

.edit-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.85em;
    color: #666;
    flex-wrap: wrap;
}

.edit-stats > span {
    padding: 4px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid #e9ecef;
}

#modification-status {
    font-weight: 600;
}

#modification-status.modified {
    color: #dc3545;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Amélioration de l'espacement pour éviter le chevauchement */
.edit-area {
    margin: 20px 0;
    position: relative;
    /* Espacement supplémentaire si les contrôles sont hauts */
    margin-top: 25px;
}

/* Modal body avec scroll fluide */
.modal-body {
    padding: 0 20px 30px 20px;
    max-height: calc(90vh - 120px); /* Ajusté pour tenir compte du header */
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
    .edit-toolbar {
        gap: 8px;
    }
    
    .edit-toolbar .btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .edit-stats {
        gap: 10px;
        font-size: 0.8em;
    }
    
    .edit-stats > span {
        padding: 3px 8px;
    }
}

.speaker-text.identified-speaker {
    background: linear-gradient(135deg, #38af7c, #2d8f5f);
    color: white !important;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
    box-shadow: 0 2px 8px rgba(56, 175, 124, 0.3);
    border-left: 4px solid #2d8f5f;
    display: inline-block;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.speaker-text.identified-speaker:hover {
    box-shadow: 0 4px 12px rgba(56, 175, 124, 0.4);
    transform: translateY(-1px);
}

/* Style pour les intervenants non identifiés */
.speaker-text.unknown-speaker {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white !important;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    border-left: 4px solid #495057;
    display: inline-block;
    margin: 4px 0;
}

/* Style standard pour les intervenants avec lettres seulement */
.speaker-text:not(.identified-speaker):not(.unknown-speaker) {
    background: linear-gradient(135deg, #194549, #38af7c);
    color: white !important;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    border-left: 4px solid #194549;
    display: inline-block;
    margin: 4px 0;
}

/* Amélioration de l'éditeur de transcription */
.transcript-textarea {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    color: #333;
    resize: vertical;
    min-height: 400px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.transcript-textarea:focus {
    outline: none;
    border-color: #38af7c;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
}

/* Indicateur visuel pour les noms d'intervenants dans l'éditeur */
.edit-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.edit-stats span {
    font-size: 0.9em;
    color: #666;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.modification-status.modified {
    color: #dc3545;
    font-weight: 600;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.modification-status:not(.modified) {
    color: #28a745;
    font-weight: 600;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* ===== STYLES POUR LA PROPAGATION D'IDENTIFICATION ===== */

/* Styles pour les identifications propagées */
.propagated-identification {
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
    border-left: 3px solid #28a745;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    animation: propagationHighlight 2s ease-out;
}

.propagated-identification.confidence-high {
    border-left-color: #28a745;
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.propagated-identification.confidence-medium {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(255, 193, 7, 0.05) 100%);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.propagated-identification.confidence-low {
    border-left-color: #fd7e14;
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(253, 126, 20, 0.05) 100%);
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.3);
}

.propagation-indicator {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 6px;
    color: #28a745;
    background: rgba(40, 167, 70, 0.822);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* Animation pour les nouveaux éléments propagés */
@keyframes propagationHighlight {
    0% {
        background: rgba(40, 167, 69, 0.3);
        transform: scale(1.02);
    }
    100% {
        background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
        transform: scale(1);
    }
}

/* ===== STYLES POUR LES INTERVENANTS INCONNUS AMÉLIORÉS ===== */

.unknown-speaker-segment {
    margin: 8px 0;
    padding: 12px;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.03) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.unknown-speaker-segment:hover {
    border-color: rgba(220, 53, 69, 0.4);
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.12) 0%, rgba(220, 53, 69, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.unknown-speaker-header {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.unknown-speaker-icon {
    font-size: 1.2em;
    opacity: 0.8;
    color: #dc3545;
}

.unknown-speaker-text {
    flex: 1;
    font-weight: 500;
    color: #721c24;
}

.unknown-speaker-actions {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.unknown-speaker-segment:hover .unknown-speaker-actions {
    opacity: 1;
}

/* Styles pour les segments potentiels (intervenants sans nom) */
.potential-speaker-segment {
    margin: 4px 0;
    padding: 8px;
    background: rgba(255, 193, 7, 0.05);
    border-left: 2px solid #ffc107;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.potential-speaker-segment:hover {
    background: rgba(255, 193, 7, 0.1);
    border-left-width: 3px;
    transform: translateX(2px);
}

.potential-speaker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.potential-speaker-actions {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.potential-speaker-segment:hover .potential-speaker-actions {
    opacity: 1;
}

/* ===== BOUTONS D'ACTION RAPIDE ===== */

.btn-quick-identify, .btn-mini-identify {
    padding: 6px 12px;
    font-size: 0.8em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-quick-identify {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-quick-identify:hover {
    background: linear-gradient(135deg, #c82333, #a71d2a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.btn-mini-identify {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.btn-mini-identify:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.btn-quick-identify:active, .btn-mini-identify:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== MODAL D'IDENTIFICATION RAPIDE ===== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: overlayFadeIn 0.3s ease-out;
}

.quick-identify-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: quickModalFadeIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes quickModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.quick-identify-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.quick-identify-header h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.3em;
}

.quick-identify-header p {
    margin: 10px 0 0 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.identification-options {
    margin-bottom: 20px;
}

.identification-options label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1em;
}

.identification-options > div {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: stretch;
}

#quick-name-input, #quick-profile-select {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s ease;
}

#quick-name-input:focus, #quick-profile-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.2);
}

#quick-name-input[style*="border-color: rgb(220, 53, 69)"] {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

#quick-name-input[style*="border-color: rgb(40, 167, 69)"] {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

#quick-create-btn, #quick-assign-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#quick-create-btn {
    background: linear-gradient(135deg, var(--primary-color), #2a9555);
    color: white;
    box-shadow: 0 2px 4px rgba(56, 175, 124, 0.3);
}

#quick-create-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2a9555, #228751);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(56, 175, 124, 0.4);
}

#quick-assign-btn {
    width: 100%;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
    margin-top: 10px;
}

#quick-assign-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

#quick-create-btn:disabled, #quick-assign-btn:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

.quick-identify-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.quick-identify-footer button {
    padding: 10px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-identify-footer button:hover {
    background: #545b62;
    transform: translateY(-1px);
}

#quick-identify-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    display: none;
    text-align: center;
    font-weight: bold;
    border: 1px solid;
    animation: statusFadeIn 0.3s ease-out;
}

@keyframes statusFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== NOTIFICATIONS DE PROPAGATION ===== */

.propagation-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20692e);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 3000;
    animation: notificationSlideIn 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    border-left: 4px solid #1e7e34;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.propagation-notification.fade-out {
    animation: notificationFadeOut 0.5s ease-out forwards;
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.propagation-notification[style*="background: rgb(255, 193, 7)"] {
    border-left-color: #e0a800;
}

.propagation-notification[style*="background: rgb(220, 53, 69)"] {
    border-left-color: #c82333;
}

/* ===== STATISTIQUES DE PROPAGATION ===== */

.propagation-stats {
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-size: 0.9em;
    color: #155724;
    position: relative;
    animation: statsSlideIn 0.5s ease-out;
}

@keyframes statsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.propagation-stats strong {
    color: #0d4710;
}

.propagation-stats button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #155724;
    font-size: 1.2em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.propagation-stats button:hover {
    opacity: 1;
}

/* ===== AMÉLIORATION DES SEGMENTS NON IDENTIFIÉS ===== */

.speaker-text.unknown-speaker {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border-left: 3px solid #dc3545;
    padding: 6px 8px;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.speaker-text.unknown-speaker:hover {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.08) 100%);
    border-left-width: 4px;
}

.speaker-text.unknown-speaker::after {
    content: "❓ Non identifié";
    font-size: 0.7em;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    opacity: 0.9;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.3);
}

/* ===== INDICATEURS DE CONFIANCE AMÉLIORÉS ===== */

.confidence-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    margin-left: 8px;
}

.confidence-indicator.confidence-high {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.confidence-indicator.confidence-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.confidence-indicator.confidence-low {
    background: rgba(253, 126, 20, 0.2);
    color: #8b4513;
    border: 1px solid rgba(253, 126, 20, 0.4);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .unknown-speaker-header,
    .potential-speaker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .unknown-speaker-actions,
    .potential-speaker-actions {
        align-self: flex-end;
        opacity: 1; /* Toujours visible sur mobile */
    }
    
    .quick-identify-container {
        margin: 20px;
        padding: 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .identification-options > div {
        flex-direction: column;
        gap: 10px;
    }
    
    #quick-name-input {
        margin-bottom: 0;
    }
    
    .propagation-notification {
        left: 20px;
        right: 20px;
        max-width: none;
        animation: notificationSlideDown 0.5s ease-out;
    }
    
    @keyframes notificationSlideDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .propagation-notification.fade-out {
        animation: notificationSlideUp 0.5s ease-out forwards;
    }
    
    @keyframes notificationSlideUp {
        to {
            opacity: 0;
            transform: translateY(-100%);
        }
    }
    
    .btn-quick-identify, .btn-mini-identify {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .propagation-stats {
        padding: 12px;
        font-size: 0.85em;
    }
    
    .propagation-indicator {
        font-size: 0.7em;
        padding: 1px 3px;
    }
}

@media (max-width: 480px) {
    .quick-identify-container {
        margin: 10px;
        padding: 15px;
        width: calc(100% - 20px);
    }
    
    .quick-identify-header h3 {
        font-size: 1.1em;
    }
    
    .quick-identify-header p {
        font-size: 0.8em;
    }
    
    #quick-name-input, #quick-profile-select {
        padding: 10px;
        font-size: 0.9em;
    }
    
    #quick-create-btn, #quick-assign-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

/* ===== THÈME SOMBRE (SI ACTIVÉ) ===== */

@media (prefers-color-scheme: dark) {
    .quick-identify-container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .quick-identify-header {
        border-bottom-color: #4a5568;
    }
    
    .quick-identify-header h3 {
        color: #e2e8f0;
    }
    
    .quick-identify-footer {
        border-top-color: #4a5568;
    }
    
    #quick-name-input, #quick-profile-select {
        background: #4a5568;
        border-color: #6b7280;
        color: #e2e8f0;
    }
    
    #quick-name-input:focus, #quick-profile-select:focus {
        border-color: var(--primary-color);
        background: #374151;
    }
    
    .propagation-stats {
        background: linear-gradient(90deg, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 70, 0.822) 100%);
        border-color: rgba(40, 167, 69, 0.4);
        color: #a7f3d0;
    }
    
    .propagation-stats strong {
        color: #d1fae5;
    }
    
    .unknown-speaker-segment {
        background: linear-gradient(90deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.08) 100%);
        border-color: rgba(220, 53, 69, 0.3);
    }
    
    .unknown-speaker-text {
        color: #fca5a5;
    }
    
    .potential-speaker-segment {
        background: rgba(255, 193, 7, 0.1);
        border-left-color: #fbbf24;
    }
}

/* ===== ANIMATIONS ET TRANSITIONS AVANCÉES ===== */

.propagated-identification {
    transition: all 0.3s ease;
}

.propagated-identification:hover {
    transform: translateX(2px);
    box-shadow: 2px 2px 8px rgba(40, 167, 69, 0.2);
}

.unknown-speaker-segment, .potential-speaker-segment {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-quick-identify, .btn-mini-identify {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-quick-identify:hover, .btn-mini-identify:hover {
    transition-duration: 0.1s;
}

/* ===== ACCESSIBILITÉ ===== */

.btn-quick-identify:focus, .btn-mini-identify:focus,
#quick-create-btn:focus, #quick-assign-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.quick-identify-container {
    outline: none;
}

.modal-overlay:focus {
    outline: none;
}

/* Amélioration du contraste pour l'accessibilité */
.propagation-indicator {
    font-weight: 600;
}

.confidence-indicator {
    font-weight: 600;
}

/* ===== PRINT STYLES ===== */

@media print {
    .btn-quick-identify, .btn-mini-identify,
    .unknown-speaker-actions, .potential-speaker-actions,
    .propagation-notification, .modal-overlay {
        display: none !important;
    }
    
    .propagated-identification {
        background: none !important;
        border-left: 2px solid #000 !important;
        box-shadow: none !important;
    }
    
    .propagation-indicator {
        color: #000 !important;
        background: none !important;
    }
}

.propagated-identification {
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
    border-left: 3px solid #28a745;
    padding: 4px 8px;
    margin: 10px 0 !important;
    border-radius: 4px;
    display: block !important;
}

.propagated-identification::after {
    content: "\A";
    white-space: pre;
}

/* Base commune pour tous les segments d'intervenants */
.auto-identified-segment,
.speaker-segment-harmonized {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.02));
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-left: 4px solid var(--primary, #38af7c);
    border-radius: 8px;
    margin: 1rem 0;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Effet de hover uniforme */
.auto-identified-segment:hover,
.speaker-segment-harmonized:hover {
    box-shadow: 0 8px 25px rgba(56, 175, 124, 0.15);
    border-color: var(--primary, #38af7c);
    transform: translateY(-1px);
}

/* En-tête d'identification harmonisée */
.identification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Styles uniformes pour tous les speaker-text dans les segments harmonisés */
.auto-identified-segment .speaker-text,
.speaker-segment-harmonized .speaker-text {
    font-weight: 600;
    color: var(--text-primary, #2d3748);
    font-size: 1.1em;
    margin: 0;
    padding: 0.25rem 0;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Effet spécial pour les noms d'intervenants */
.auto-identified-segment .speaker-text::before,
.speaker-segment-harmonized .speaker-text::before {
    content: "👤";
    font-size: 1.2em;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.auto-identified-segment:hover .speaker-text::before,
.speaker-segment-harmonized:hover .speaker-text::before {
    opacity: 1;
    transform: scale(1.1);
}

/* Contrôles d'identification uniformes */
.identification-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Indicateurs de confiance harmonisés */
.confidence-indicator {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.confidence-high {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    color: var(--success, #10b981);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.confidence-medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
    color: var(--warning, #f59e0b);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.confidence-low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    color: var(--error, #ef4444);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

/* Effet hover sur les indicateurs de confiance */
.confidence-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Boutons de gestion harmonisés - DESIGN UNIFORME */
.btn-manage-identification {
    background: linear-gradient(135deg, var(--surface-elevated, #f8f9fa), var(--surface, #ffffff));
    border: 2px solid var(--border, #dee2e6);
    color: var(--text-primary, #2d3748);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Effet de brillance au hover */
.btn-manage-identification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-manage-identification:hover::before {
    left: 100%;
}

.btn-manage-identification:hover {
    background: linear-gradient(135deg, var(--primary, #38af7c), #2d8a5f);
    border-color: var(--primary, #38af7c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 175, 124, 0.3);
}

.btn-manage-identification:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(56, 175, 124, 0.2);
}

/* États spéciaux des boutons */
.btn-manage-identification.active {
    background: linear-gradient(135deg, var(--primary, #38af7c), #2d8a5f);
    color: white;
    border-color: var(--primary, #38af7c);
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.2);
}

.btn-manage-identification.confirmed {
    background: linear-gradient(135deg, var(--success, #10b981), #059669);
    color: white;
    border-color: var(--success, #10b981);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.btn-manage-identification.modified {
    background: linear-gradient(135deg, var(--warning, #f59e0b), #d97706);
    color: white;
    border-color: var(--warning, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.btn-manage-identification.rejected {
    background: linear-gradient(135deg, var(--error, #ef4444), #dc2626);
    color: white;
    border-color: var(--error, #ef4444);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Panneau de gestion harmonisé */
.identification-management-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--surface, #ffffff), var(--surface-elevated, #f8f9fa));
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 12px;
    border-top: 4px solid var(--primary, #38af7c);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Effet de fond animé pour le panneau */
.identification-management-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #38af7c), #4ade80, var(--primary, #38af7c));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Titre du panneau de gestion */
.management-title {
    margin-bottom: 1.5rem;
    text-align: center;
}

.management-title strong {
    color: var(--primary, #38af7c);
    font-size: 1.2em;
    display: block;
    margin-bottom: 0.5rem;
}

.management-title small {
    color: var(--text-secondary, #64748b);
    font-style: italic;
    font-size: 0.9em;
}

/* Actions d'identification harmonisées */
.identification-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.identification-actions button {
    padding: 0.8rem 1rem;
    border: 2px solid;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Boutons d'action spécifiques */
.btn-confirm-identification {
    background: linear-gradient(135deg, var(--success, #10b981), #059669);
    color: white;
    border-color: var(--success, #10b981);
}

.btn-confirm-identification:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-reassign {
    background: linear-gradient(135deg, var(--info, #0ea5e9), #0284c7);
    color: white;
    border-color: var(--info, #0ea5e9);
}

.btn-reassign:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

.btn-create-new {
    background: linear-gradient(135deg, var(--warning, #f59e0b), #d97706);
    color: white;
    border-color: var(--warning, #f59e0b);
}

.btn-create-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.btn-reject {
    background: linear-gradient(135deg, var(--error, #ef4444), #dc2626);
    color: white;
    border-color: var(--error, #ef4444);
}

.btn-reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* Formulaires dans le panneau */
.reassignment-form,
.new-profile-form {
    background: rgba(56, 175, 124, 0.05);
    border: 1px solid rgba(56, 175, 124, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.reassignment-form label,
.new-profile-form label {
    display: block;
    font-weight: 600;
    color: var(--text-primary, #2d3748);
    margin-bottom: 0.5rem;
}

.reassignment-select,
.new-profile-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.reassignment-select:focus,
.new-profile-input:focus {
    outline: none;
    border-color: var(--primary, #38af7c);
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.form-actions button {
    flex: 1;
    min-width: 120px;
    padding: 0.8rem 1rem;
    border: 2px solid;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm {
    background: var(--primary, #38af7c);
    color: white;
    border-color: var(--primary, #38af7c);
}

.btn-confirm:hover {
    background: #2d8a5f;
    transform: translateY(-1px);
}

.btn-cancel {
    background: var(--surface, #ffffff);
    color: var(--text-secondary, #64748b);
    border-color: var(--border, #e2e8f0);
}

.btn-cancel:hover {
    background: var(--surface-elevated, #f8f9fa);
    border-color: var(--text-secondary, #64748b);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .identification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .identification-controls {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .confidence-indicator {
        order: 1;
        flex: 1;
    }
    
    .btn-manage-identification {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .identification-actions {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auto-identified-segment,
    .speaker-segment-harmonized {
        margin: 0.5rem 0;
        padding: 0.8rem;
    }
    
    .identification-management-panel {
        padding: 1rem;
    }
    
    .auto-identified-segment .speaker-text,
    .speaker-segment-harmonized .speaker-text {
        font-size: 1em;
    }
    
    .btn-manage-identification {
        padding: 0.8rem 1rem;
        font-size: 0.8em;
    }
}

/* ANIMATIONS AVANCÉES */
.auto-identified-segment,
.speaker-segment-harmonized {
    animation: harmonizedSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes harmonizedSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation pour les panneaux de gestion */
.identification-management-panel {
    animation: panelSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* Effet de pulsation pour les éléments actifs */
.btn-manage-identification.active {
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(56, 175, 124, 0.1);
    }
}

/* THÈME SOMBRE SUPPORT */
@media (prefers-color-scheme: dark) {
    .auto-identified-segment,
    .speaker-segment-harmonized {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
        border-color: rgba(102, 126, 234, 0.3);
        color: #e2e8f0;
    }
    
    .identification-management-panel {
        background: linear-gradient(135deg, #1a202c, #2d3748);
        border-color: #4a5568;
    }
    
    .btn-manage-identification {
        background: linear-gradient(135deg, #2d3748, #4a5568);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .reassignment-form,
    .new-profile-form {
        background: rgba(56, 175, 124, 0.1);
        border-color: rgba(56, 175, 124, 0.3);
    }
}

/* ACCESSIBILITÉ */
.btn-manage-identification:focus,
.identification-actions button:focus,
.form-actions button:focus {
    outline: 3px solid var(--primary, #38af7c);
    outline-offset: 2px;
}

.reassignment-select:focus,
.new-profile-input:focus {
    outline: 3px solid var(--primary, #38af7c);
    outline-offset: 2px;
}

/* Indicateur de focus visible */
@media (prefers-reduced-motion: no-preference) {
    *:focus {
        transition: outline 0.2s ease;
    }
}

/* Mode contraste élevé */
@media (prefers-contrast: high) {
    .auto-identified-segment,
    .speaker-segment-harmonized {
        border-width: 3px;
        border-color: #000;
    }
    
    .btn-manage-identification {
        border-width: 3px;
    }
    
    .confidence-indicator {
        border-width: 2px;
        font-weight: 700;
    }
}

/* PRINT STYLES */
@media print {
    .identification-controls,
    .identification-management-panel,
    .btn-manage-identification {
        display: none !important;
    }
    
    .auto-identified-segment,
    .speaker-segment-harmonized {
        background: none !important;
        border: 2px solid #000 !important;
        box-shadow: none !important;
    }
    
    .auto-identified-segment .speaker-text,
    .speaker-segment-harmonized .speaker-text {
        font-weight: bold !important;
        color: #000 !important;
    }
}

.speaker-text {
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
    border-left: 3px solid #28a745;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    font-weight: 500;
    color: #155724;
    display: inline-block;
    min-width: 200px;
}

/* Styles pour les identifications propagées avec confiance élevée */
.speaker-text.propagated-identification.confidence-high {
    border-left-color: #28a745;
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

/* Styles pour les identifications propagées avec confiance moyenne */
.speaker-text.propagated-identification.confidence-medium {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(255, 193, 7, 0.05) 100%);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

/* Styles pour les identifications propagées avec confiance faible */
.speaker-text.propagated-identification.confidence-low {
    border-left-color: #fd7e14;
    background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(253, 126, 20, 0.05) 100%);
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.3);
}

/* Indicateur de propagation */
.propagation-indicator {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 6px;
    color: #28a745;
}

/* Styles pour les intervenants identifiés (nommés) */
.speaker-text.identified-speaker {
    background: linear-gradient(90deg, rgba(25, 69, 72, 0.1) 0%, rgba(25, 69, 72, 0.05) 100%);
    border-left-color: #38af7c;
    color: #0d4710;
    font-weight: 600;
}

/* Styles pour les intervenants inconnus */
.speaker-text.unknown-speaker {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border-left-color: #dc3545;
    color: #721c24;
}

.speaker-text.unknown-speaker::after {
    content: "❓ Non identifié";
    font-size: 0.7em;
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    opacity: 0.8;
}

/* Animation pour les nouveaux éléments propagés */
.propagated-identification {
    animation: propagationHighlight 2s ease-out;
}

@keyframes propagationHighlight {
    0% {
        background: rgba(40, 167, 69, 0.3);
        transform: scale(1.02);
    }
    100% {
        background: linear-gradient(90deg, rgba(40, 167, 70, 0.822) 0%, rgba(40, 167, 69, 0.05) 100%);
        transform: scale(1);
    }
}

/* Styles pour les segments d'intervention */
.speaker-intervention {
    margin: 8px 0;
    padding: 6px 0;
    border-bottom: 1px solid rgba(25, 69, 72, 0.1);
}

.speaker-intervention.propagated {
    border-bottom-color: rgba(40, 167, 69, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .speaker-text {
        min-width: unset;
        width: 100%;
        margin: 4px 0;
    }
}

/* Styles pour l'édition */
.transcript-textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.transcript-textarea:focus {
    outline: none;
    border-color: #38af7c;
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
}

/* Styles pour tous les segments d'intervenants */
.speaker-segment {
    margin: 8px 0;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid;
    background: linear-gradient(90deg, rgba(56, 175, 124, 0.08) 0%, rgba(56, 175, 124, 0.03) 100%);
    border-color: rgba(56, 175, 124, 0.2);
    transition: all 0.3s ease;
}

.speaker-segment:hover {
    border-color: rgba(56, 175, 124, 0.4);
    background: linear-gradient(90deg, rgba(56, 175, 124, 0.12) 0%, rgba(56, 175, 124, 0.05) 100%);
}

/* Variantes selon le type d'intervenant */
.speaker-segment.unknown-speaker {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.03) 100%);
    border-color: rgba(220, 53, 69, 0.2);
}

.speaker-segment.identified-speaker {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.08) 0%, rgba(40, 167, 69, 0.03) 100%);
    border-color: rgba(40, 167, 69, 0.2);
}

.speaker-segment.confirmed {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.05) 100%);
    border-color: rgba(40, 167, 69, 0.4);
}

/* En-tête du segment */
.speaker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.speaker-icon {
    font-size: 1.2em;
    min-width: 24px;
    text-align: center;
}

.speaker-text {
    flex: 1;
    font-weight: 500;
    color: var(--secondary-color);
}

.speaker-actions {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.speaker-segment:hover .speaker-actions {
    opacity: 1;
}

/* Boutons d'action */
.btn-speaker-action {
    padding: 6px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-speaker-action:hover {
    transform: translateY(-1px);
}

.btn-name {
    background: #17a2b8;
    color: white;
}

.btn-name:hover {
    background: #138496;
}

.btn-manage {
    background: #6f42c1;
    color: white;
}

.btn-manage:hover {
    background: #5a32a3;
}

.btn-manage.active {
    background: #343a40;
}

/* Panneau de gestion */
.speaker-management {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.management-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.management-title {
    text-align: center;
}

.management-title strong {
    display: block;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.management-title small {
    color: #6c757d;
    font-size: 0.8em;
}

.management-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-action {
    padding: 6px 12px;
    font-size: 0.8em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-confirm { background: #28a745; color: white; }
.btn-reassign { background: #ffc107; color: #212529; }
.btn-rename { background: #17a2b8; color: white; }
.btn-reject { background: #dc3545; color: white; }
.btn-merge { background: #6f42c1; color: white; }
.btn-split { background: #fd7e14; color: white; }
.btn-remove { background: #6c757d; color: white; }

.btn-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .speaker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .speaker-actions {
        align-self: flex-end;
        opacity: 1;
    }
    
    .management-actions {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
    }
}

.credits-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: inherit;
}

.balance-card {
    background: var(--gradient-primary, linear-gradient(135deg, #38af7c 0%, #2d9a6c 100%));
    color: white;
    border-radius: var(--radius-lg, 12px);
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(25, 69, 72, 0.1));
}

.balance-amount {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.balance-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.package-card {
    background: var(--surface, #ffffff);
    border: 2px solid var(--border, #d1e7dd);
    border-radius: var(--radius-lg, 12px);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    border-color: var(--primary-color, #38af7c);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(56, 175, 124, 0.1));
}

.package-card.recommended {
    border-color: var(--primary-color, #38af7c);
    transform: scale(1.05);
}

.package-card.recommended::before {
    content: "RECOMMANDÉ";
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--primary-color, #38af7c);
    color: white;
    padding: 0.5rem 3rem;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.package-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color, #2d3748);
    margin-bottom: 1rem;
}

.package-credits {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color, #38af7c);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.package-hours {
    color: var(--text-muted, #6b7c7a);
    margin-bottom: 1.5rem;
}

.package-price {
    margin-bottom: 1rem;
}

.price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color, #2d3748);
}

.price-details {
    font-size: 0.9rem;
    color: var(--text-muted, #6b7c7a);
    margin-top: 0.5rem;
}

.package-savings {
    background: rgba(56, 175, 124, 0.1);
    color: var(--primary-color, #38af7c);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.buy-btn {
    width: 100%;
    background: var(--gradient-primary, linear-gradient(135deg, #38af7c, #2d9a6c));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius, 8px);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(56, 175, 124, 0.2));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #d1e7dd);
    border-radius: var(--border-radius, 8px);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #38af7c);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted, #6b7c7a);
    font-size: 0.9rem;
}

.transactions-section {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #d1e7dd);
    border-radius: var(--radius-lg, 12px);
    padding: 2rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border, #d1e7dd);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color, #2d3748);
}

.transaction-date {
    font-size: 0.9rem;
    color: var(--text-muted, #6b7c7a);
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.transaction-amount.positive {
    color: var(--primary-color, #38af7c);
}

.transaction-amount.negative {
    color: var(--secondary-color, #19454c);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-color, #2d3748);
}

.minimum-notice {
    background: var(--light-color, rgba(56, 175, 124, 0.1));
    border: 1px solid rgba(56, 175, 124, 0.2);
    color: var(--secondary-color, #19454c);
    padding: 1rem;
    border-radius: var(--border-radius, 8px);
    margin-bottom: 2rem;
    text-align: center;
}

.credit-info {
    background: var(--light-color, #f0fdf9);
    border-radius: var(--border-radius, 8px);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border, #d1e7dd);
}

.credit-info h3 {
    color: var(--primary-color, #38af7c);
    margin-bottom: 1rem;
}

.credit-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.credit-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border, #d1e7dd);
    color: var(--text-color, #2d3748);
}

.credit-info li:last-child {
    border-bottom: none;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius, 8px);
    text-align: center;
}

@media (max-width: 768px) {
    .credits-dashboard {
        padding: 1rem;
    }
    
    .balance-card {
        padding: 2rem;
    }
    
    .balance-amount {
        font-size: 2.5rem;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .package-card.recommended {
        transform: none;
    }
}

/* ===== STYLES POUR LE FORMULAIRE AMÉLIORÉ ===== */

/* S'assurer que le formulaire a un z-index élevé et un fond opaque */
.transcription-form-section {
    /* Utiliser la même largeur que le container principal */
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: white !important;
    border-radius: var(--border-radius, 6px);
    box-shadow: var(--box-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
    /* S'intégrer avec le design existant */
    border: 1px solid #e2e8f0;
    /* Assurer la visibilité par-dessus tout overlay */
    position: relative;
    z-index: 10;
    opacity: 1 !important;
}

/* En-tête du formulaire */
.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h2 {
    color: var(--secondary-color, #194548);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Étapes du formulaire */
.form-step {
    margin-bottom: 2.5rem;
    background: white !important;
    border-radius: var(--border-radius, 6px);
    padding: 2rem;
    box-shadow: var(--box-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
    border: 2px solid transparent;
    transition: var(--transition, all 0.3s ease);
    position: relative;
    z-index: 5;
}

.form-step[data-step="1"] {
    border-color: var(--primary-color, #38af7c);
}

.form-step[data-step="2"] {
    border-color: var(--primary-color, #38af7c);
}

/* En-têtes des étapes */
.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color, #38af7c);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-info h3 {
    color: var(--secondary-color, #194548);
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.step-info p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* Zone de téléchargement de fichier */
.file-upload-area {
    position: relative;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: block;
    padding: 3rem 2rem;
    border: 3px dashed #d1e7dd;
    border-radius: var(--border-radius, 6px);
    text-align: center;
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    background: var(--light-color, #f8f9fa);
}

.file-upload-label:hover {
    border-color: var(--primary-color, #38af7c);
    background: #f0fdf4;
    transform: translateY(-2px);
}

.file-upload-label.drag-over {
    border-color: var(--primary-color, #38af7c);
    background: #f0fdf4;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-main-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color, #194548);
}

.upload-sub-text {
    font-size: 0.9rem;
    color: #666;
}

/* Carte d'information du fichier */
.file-info-card {
    margin-top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid var(--primary-color, #38af7c);
    border-radius: var(--border-radius, 6px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.file-success-icon {
    font-size: 1.25rem;
}

.file-status-text {
    font-weight: 600;
    color: #059669;
    flex: 1;
}

.file-remove-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color, #333);
}

.file-details {
    margin-left: 2rem;
}

.file-name {
    font-weight: 600;
    color: #065f46;
    margin-bottom: 0.25rem;
}

.file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #047857;
}

/* Configuration */
.config-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-card {
    background: var(--light-color, #f8f9fa);
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius, 6px);
    padding: 1.5rem;
    transition: var(--transition, all 0.3s ease);
}

.config-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.config-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.config-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: #e0f2fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-title h4 {
    margin: 0 0 0.25rem 0;
    color: var(--secondary-color, #194548);
    font-size: 1.1rem;
    font-weight: 600;
}

.config-title p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Options radio personnalisées */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color, #38af7c);
    background: #f0fdf4;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color, #38af7c);
    background: var(--primary-color, #38af7c);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-content strong {
    color: var(--secondary-color, #194548);
}

.radio-content span {
    color: #666;
    font-size: 0.9rem;
}

/* Select pour le nombre d'intervenants */
.speakers-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius, 6px);
    background: white;
    color: var(--secondary-color, #194548);
    font-size: 1rem;
    transition: var(--transition, all 0.3s ease);
}

.speakers-select:focus {
    outline: none;
    border-color: var(--primary-color, #38af7c);
    box-shadow: 0 0 0 3px rgba(56, 175, 124, 0.1);
}

/* Section d'informations */
.info-section {
    margin-top: 1.5rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.info-basic {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.info-diarization {
    background: #fef3c7;
    border: 1px solid #fbbf24;
}

.info-overlap {
    background: #ecfdf5;
    border: 1px solid #34d399;
}

.info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-content {
    color: var(--text-color, #333);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Actions du formulaire */
.form-actions {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: white !important;
    border-radius: var(--border-radius, 6px);
    box-shadow: var(--box-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 5;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--primary-color, #38af7c);
    color: white;
    border: none;
    border-radius: var(--border-radius, 6px);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    box-shadow: var(--box-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.btn-submit:hover {
    background-color: #2d9a6c;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(56, 175, 124, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1.25rem;
}

/* Section de progression */
.progress-section {
    margin-top: 2rem;
    padding: 2rem;
    background: white !important;
    border-radius: var(--border-radius, 6px);
    box-shadow: var(--box-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
    text-align: center;
    position: relative;
    z-index: 5;
}

.progress-header h3 {
    color: var(--secondary-color, #194548);
    margin: 0 0 0.5rem 0;
}

.progress-status {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: var(--border-radius, 6px);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color, #38af7c);
    border-radius: var(--border-radius, 6px);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-percentage {
    font-weight: 600;
    color: var(--secondary-color, #194548);
    min-width: 50px;
}

.progress-tips {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    color: #0369a1;
}

/* Responsive */
@media (max-width: 768px) {
    .transcription-form-section {
        padding: 1rem;
        margin: 1rem;
    }
    
    .form-header h2 {
        font-size: 2rem;
    }
    
    .form-step {
        padding: 1.5rem;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .file-upload-label {
        padding: 2rem 1rem;
    }
    
    .radio-group {
        gap: 0.5rem;
    }
    
    .radio-option {
        padding: 0.75rem;
    }
    
    .file-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .progress-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-submit {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* Animation pour l'apparition des étapes */
.form-step {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.form-step[data-step="2"] {
    animation-delay: 0.1s;
}

.form-actions {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* États de validation */
.form-step.error {
    border-color: #ef4444;
    background: #fef2f2 !important;
}

.form-step.success {
    border-color: #10b981;
    background: #f0fdf4 !important;
}

/* Réinitialiser tout overlay ou backdrop qui pourrait interférer */
.transcription-form-section::before,
.transcription-form-section::after {
    display: none !important;
}

/* S'assurer qu'aucun élément parent n'a d'overlay */
body .transcription-form-section {
    backdrop-filter: none !important;
    filter: none !important;
}

/* Protection contre les overlays modaux */
.transcription-form-section:not(.modal-overlay) {
    background: white !important;
    opacity: 1 !important;
}

/* Styles pour les boutons de téléchargement - CORRECTION ALIGNEMENT */
.download-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color, #f8f9fa);
    border-radius: var(--border-radius, 6px);
    border: 1px solid #e2e8f0;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius, 6px);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    white-space: nowrap;
    min-width: 180px;
    justify-content: center;
}

.download-btn.btn-primary {
    background: var(--primary-color, #38af7c);
    color: white;
}

.download-btn.btn-primary:hover {
    background: #2d9a6c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(56, 175, 124, 0.3);
}

.download-btn.btn-secondary {
    background: var(--secondary-color, #194548);
    color: white;
}

.download-btn.btn-secondary:hover {
    background: #12332f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 69, 72, 0.3);
}

.download-icon {
    font-size: 1.1rem;
}

/* Responsive pour les boutons */
@media (max-width: 768px) {
    .download-options {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .download-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Styles pour les messages d'erreur */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '⚠️';
    font-size: 1rem;
}