/**
 * Assistant Unreal Engine 5.6 Pro - Styles CSS
 * ============================================
 */

/* Reset et variables globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066cc;
    --secondary: #004499;
    --accent: #ff6b35;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e1e8ed;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 30px rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    --bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --text: #ffffff;
    --text-light: #cccccc;
    --border: #404040;
}

/* Corps principal */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: all 0.3s ease;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête réduit avec support d'image personnalisée - Version corrigée */
.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 1.5rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Image de fond personnalisée pour la bannière */
.header.with-custom-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.7), rgba(0, 68, 153, 0.7));
    z-index: 1;
}

.header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s infinite linear;
    z-index: 1;
}

@keyframes float {
    0% { transform: translate(-100px, -100px) rotate(0deg); }
    100% { transform: translate(100px, 100px) rotate(360deg); }
}

.header-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.header h1 {
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    position: relative;
    z-index: 2;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Bouton de changement d'image de bannière */
.header-image-control {
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header:hover .header-image-control {
    opacity: 1;
}

/* Navigation */
.navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: var(--card-bg);
    border: 2px solid var(--border);
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-btn:hover, 
.nav-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Layout principal */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    min-height: 80vh;
}

/* Sidebar */
.sidebar {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.module-list {
    list-style: none;
}

.module-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-item:hover {
    background: var(--bg);
}

.module-item.active {
    background: var(--primary);
    color: white;
}

/* Zone de contenu */
.content-area {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.module-title {
    font-size: 2.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Grille des paramètres */
.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.param-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.param-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.param-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.param-value {
    background: var(--card-bg);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    color: var(--primary);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.param-preview {
    color: var(--text-light);
    font-size: 0.9rem;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

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

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: var(--text);
    transform: translateY(-2px);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Drag and Drop pour modules - Version fonctionnelle */
.module-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    position: relative;
    border: 2px solid transparent;
}

.module-item:hover {
    background: var(--bg);
    transform: translateY(-1px);
    border-color: var(--border);
}

.module-item.active {
    background: var(--primary);
    color: white;
}

.module-item.dragging {
    opacity: 0.7;
    transform: rotate(3deg) scale(1.08);
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-color: var(--primary);
    background: var(--card-bg);
    animation: shake 0.5s ease-in-out infinite alternate;
}

@keyframes shake {
    0% { transform: rotate(2deg) scale(1.08); }
    100% { transform: rotate(4deg) scale(1.08); }
}

.module-item.drag-over {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    transform: scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.5);
}

.module-list {
    list-style: none;
    min-height: 300px;
    position: relative;
    padding: 15px;
    border: 3px dashed transparent;
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* Zone de drop active */
.module-list.drag-active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 68, 153, 0.05));
}

/* Indicateur de drag très visible */
.module-item::after {
    content: '⋮⋮';
    position: absolute;
    right: 10px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.8rem;
    line-height: 0.5;
    pointer-events: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.module-item:hover::after {
    opacity: 1;
    color: var(--primary);
}

.module-item.dragging::after {
    opacity: 1;
    color: var(--accent);
    animation: pulse 0.8s infinite;
}

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

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

/* Éditeur de texte */
.editor-container {
    margin: 2rem 0;
}

.quill-editor {
    min-height: 300px;
    border-radius: 10px;
}

/* Galerie d'images */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Zone d'upload */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(0,102,204,0.05);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(0,102,204,0.1);
}

/* Grille de statistiques supprimée */

/* Drag and Drop pour modules */
.module-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.module-item.drag-over {
    background: var(--primary);
    color: white;
    transform: scale(1.02);
}

.module-list {
    list-style: none;
    min-height: 200px;
}

/* Modal pour galerie d'images - Taille raisonnable */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.image-modal-content {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    background: white;
    padding: 10px;
}

/* Taille maximale raisonnable pour les images */
.image-modal img {
    max-width: min(1200px, 90vw);
    max-height: min(800px, 90vh);
/*	max-width: min(800px, 80vw);
    max-height: min(600px, 80vh);*/
	
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.image-nav.prev {
    left: -80px;
}

.image-nav.next {
    right: -80px;
}

.image-close {
    position: absolute;
    top: -50px;
    right: -20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.image-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Images cliquables */
.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.image-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
}

.image-item:hover::after {
    opacity: 1;
}

/* Bouton export pour modules */
.module-export-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: auto;
}

.module-export-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.module-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    position: relative;
}

.module-item::after {
    content: '⋮⋮';
    position: absolute;
    right: 10px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
    line-height: 0.8;
}

.module-item:hover::after {
    opacity: 1;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border);
}

/* Chargement */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    color: white;
    font-weight: 600;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--success);
}

.notification-error {
    background: var(--danger);
}

.notification-warning {
    background: var(--warning);
}

.notification-info {
    background: var(--primary);
}

/* Media queries pour responsivité */
@media (max-width: 1200px) {
    .params-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        position: static;
    }
    
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        justify-content: center;
    }
    
    .module-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .param-card {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
}

/* ============================================================================
   AJOUTS CSS POUR IMAGES PERSONNALISÉES
   À ajouter à la fin de votre fichier assets/css/styles.css existant
   ============================================================================ */

/* Container d'accueil avec image de fond */
.welcome-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: welcomeFadeIn 0.6s ease-out;
}

.welcome-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 68, 153, 0.2));
    z-index: 1;
    pointer-events: none;
}

.welcome-container > div {
    position: relative;
    z-index: 2;
}

/* Animation pour les boutons de contrôle d'image */
.image-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
}

.image-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Amélioration de la bannière avec image personnalisée */
.header.with-custom-bg {
    position: relative;
    background-attachment: fixed;
}

.header.with-custom-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.6), rgba(0, 68, 153, 0.8));
    z-index: 1;
}

.header.with-custom-bg .header-content,
.header.with-custom-bg .header-image-control {
    position: relative;
    z-index: 2;
}

/* Animation fluide pour les changements d'état */
.content-area {
    transition: all 0.5s ease;
}

/* État par défaut amélioré */
.empty-state {
    background: linear-gradient(135deg, var(--bg), var(--card-bg));
    border: 2px dashed var(--border);
    transition: all 0.3s ease;
    animation: welcomeFadeIn 0.6s ease-out;
}

.empty-state:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Styles pour les boutons flottants de gestion d'image */
.floating-image-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.floating-image-controls:hover {
    opacity: 1;
}

.floating-image-controls .btn {
    font-size: 0.8rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.floating-image-controls .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Amélioration des contrastes pour la lisibilité */
.welcome-container h1,
.welcome-container p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Effet glassmorphism pour les conteneurs sur image */
.welcome-container > div {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Animation pour les icônes */
.welcome-container .fas.fa-film {
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation d'apparition pour l'accueil */
@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de survol pour l'image d'accueil */
.welcome-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive pour les images d'accueil */
@media (max-width: 768px) {
    .welcome-container {
        min-height: 400px !important;
    }
    
    .welcome-container > div {
        padding: 1.5rem !important;
        margin: 0 10px !important;
    }
    
    .welcome-container h1 {
        font-size: 2rem !important;
    }
    
    .welcome-container p {
        font-size: 1rem !important;
    }
    
    .welcome-container .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .floating-image-controls {
        top: 10px;
        right: 10px;
        gap: 0.3rem;
    }
    
    .floating-image-controls .btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .welcome-container {
        min-height: 350px !important;
    }
    
    .welcome-container > div {
        padding: 1rem !important;
    }
    
    .welcome-container h1 {
        font-size: 1.8rem !important;
    }
    
    .welcome-container .fas.fa-film {
        font-size: 3rem !important;
    }
    
    .image-control-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

/* Animation de pulsation pour les boutons d'ajout d'image */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

.empty-state button:hover {
    animation: pulse 1s infinite;
}

/* Amélioration de l'indicateur de survol pour les boutons d'image */
.welcome-container [onmouseover]:hover,
.empty-state [onmouseover]:hover {
    transform: scale(1.02);
}

/* Style pour les modales d'upload d'image personnalisée */
#customImageModal .modal-content {
    max-width: 600px;
}

#customImageModal .upload-area {
    min-height: 200px;
    border: 3px dashed var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

#customImageModal .upload-area:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 68, 153, 0.05));
    transform: scale(1.02);
}

/* Transition fluide pour les changements d'images */
.header {
    transition: background-image 0.5s ease;
}

.content-area {
    transition: all 0.3s ease;
}

/* Amélioration de l'affordance visuelle */
.welcome-container .btn,
.empty-state .btn {
    position: relative;
    overflow: hidden;
}

.welcome-container .btn::before,
.empty-state .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;
}

.welcome-container .btn:hover::before,
.empty-state .btn:hover::before {
    left: 100%;
}

/* =====================================================
   STYLES CSS POUR LES VIDÉOS INTÉGRÉES
   À ajouter à votre fichier assets/css/styles.css existant
   ===================================================== */

/* Container pour les vidéos dans l'éditeur */
.ql-editor .video-container {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    background: var(--card-bg);
    border: 2px solid var(--border);
}

.ql-editor .video-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

/* Vidéos locales */
.ql-editor .video-container video {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    background: #000;
    display: block;
}

/* Vidéos intégrées (YouTube, Vimeo...) */
.ql-editor .video-container iframe {
    border-radius: 10px;
    border: none;
}

/* Responsive pour les iframes */
.ql-editor .video-container[style*="padding-bottom"] {
    position: relative;
    max-width: 100%;
    margin: 1.5rem auto;
}

.ql-editor .video-container[style*="padding-bottom"] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
}

/* Légendes des vidéos */
.ql-editor .video-container div[style*="font-size: 0.8rem"] {
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem !important;
    margin-top: 0.8rem;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Bouton vidéo dans la toolbar Quill */
.ql-toolbar .ql-video {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMiA3VjE3QzIyIDE4LjEgMjEuMSAxOSAyMCAxOUg0QzIuOSAxOSAyIDE4LjEgMiAxN1Y3QzIgNS45IDIuOSA1IDQgNUgyMEMyMS4xIDUgMjIgNS45IDIyIDdaTTIwIDdINFYxN0gyMFY3WiIgZmlsbD0iIzQ0NCIvPgo8cGF0aCBkPSJNMTAgOUwxNSAxMkwxMCAxNVY5WiIgZmlsbD0iIzQ0NCIvPgo8L3N2Zz4K');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}

/* Mode sombre */
[data-theme="dark"] .ql-toolbar .ql-video {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMiA3VjE3QzIyIDE4LjEgMjEuMSAxOSAyMCAxOUg0QzIuOSAxOSAyIDE4LjEgMiAxN1Y3QzIgNS45IDIuOSA1IDQgNUgyMEMyMS4xIDUgMjIgNS45IDIyIDdaTTIwIDdINFYxN0gyMFY3WiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNMTAgOUwxNSAxMkwxMCAxNVY5WiIgZmlsbD0iI2ZmZiIvPgo8L3N2Zz4K');
}

/* Animation pour les boutons vidéo */
.ql-toolbar .ql-video:hover {
    background-color: var(--primary);
    border-radius: 4px;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Styles pour le menu de sélection vidéo */
.video-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-menu-content {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    color: var(--text);
    min-width: 350px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.video-menu-button {
    width: 100%;
    padding: 18px;
    margin-bottom: 12px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.video-menu-button:hover::before {
    left: 100%;
}

.video-menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Upload d'une vidéo locale - Styles pour la progression */
.video-upload-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-hover);
    z-index: 3000;
    min-width: 300px;
    color: var(--text);
}

.video-upload-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.video-upload-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive pour les vidéos */
@media (max-width: 768px) {
    .ql-editor .video-container {
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .ql-editor .video-container video {
        border-radius: 6px;
    }
    
    .ql-editor .video-container iframe {
        border-radius: 6px;
    }
    
    .video-menu-content {
        margin: 20px;
        padding: 1.5rem;
        min-width: auto;
        width: calc(100% - 40px);
    }
    
    .video-menu-button {
        padding: 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .ql-editor .video-container {
        margin: 0.8rem 0;
    }
    
    .ql-editor .video-container div[style*="font-size: 0.8rem"] {
        padding: 6px 10px;
        font-size: 0.7rem !important;
    }
    
    .video-upload-progress {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        padding: 1rem;
    }
}

/* Mode sombre spécifique pour les vidéos */
[data-theme="dark"] .ql-editor .video-container {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] .ql-editor .video-container:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 35px rgba(0,102,204,0.2);
}

/* Styles pour les iframes responsives perfectionnés */
.ql-editor .video-container.youtube-embed,
.ql-editor .video-container.vimeo-embed,
.ql-editor .video-container.dailymotion-embed {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 1.5rem auto;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.ql-editor .video-container.youtube-embed iframe,
.ql-editor .video-container.vimeo-embed iframe,
.ql-editor .video-container.dailymotion-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
}

/* Indicateur de type de vidéo */
.ql-editor .video-container::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 20px;
    background: rgba(0,0,0,0.8);
    border-radius: 4px;
    z-index: 2;
}

.ql-editor .video-container.youtube-embed::before {
    background: #ff0000;
    content: 'YT';
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ql-editor .video-container.vimeo-embed::before {
    background: #1ab7ea;
    content: 'VM';
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ql-editor .video-container.dailymotion-embed::before {
    background: #0066cc;
    content: 'DM';
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Effet de chargement pour les vidéos */
.ql-editor .video-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Amélioration de l'affordance visuelle */
.ql-editor .video-container {
    cursor: pointer;
}

.ql-editor .video-container:hover {
    cursor: default;
}

.ql-editor .video-container video:hover,
.ql-editor .video-container iframe:hover {
    cursor: pointer;
}

/* 
AJOUTER CES STYLES À LA FIN DE VOTRE FICHIER assets/css/styles.css
Styles pour la galerie de vidéos séparée
*/

/* =====================================================
   STYLES POUR LA GALERIE DE VIDÉOS SÉPARÉE
   ===================================================== */

/* Container de la galerie de vidéos */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    min-height: 100px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg);
    transition: all 0.3s ease;
}

/* État vide de la galerie */
.video-gallery:empty::before {
    content: '🎬 Aucune vidéo ajoutée\A Cliquez sur "Ajouter vidéo" pour commencer';
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 2rem;
    white-space: pre-line;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Galerie avec vidéos */
.video-gallery.has-videos {
    border-style: solid;
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Items de vidéo dans la galerie */
.video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
    border: 2px solid var(--border);
    min-height: 160px;
}

.video-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* Icône de lecture au survol */
.video-item::after {
    content: '▶️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
    z-index: 5;
}

.video-item:hover::after {
    opacity: 1;
}

/* Miniatures vidéo pour fichiers locaux */
.video-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    pointer-events: none;
}

/* Placeholder pour vidéos en ligne */
.video-item .video-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* Infos de la vidéo */
.video-item .video-info {
    padding: 8px;
    font-size: 0.8rem;
}

.video-item .video-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-item .video-meta {
    color: var(--text-light);
    font-size: 0.7rem;
}

/* Bouton de suppression sur les vidéos */
.video-item .video-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .video-remove {
    opacity: 1;
}

.video-item .video-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Modal de prévisualisation vidéo */
.video-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 40px;
}

.video-preview-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.video-preview-content video,
.video-preview-content iframe {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
}

.video-preview-content .video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.video-preview-content .video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-preview-info {
    padding: 1rem;
    text-align: center;
    background: var(--bg);
}

.video-preview-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.video-preview-info p {
    color: var(--text-light);
    margin: 0;
}

.video-preview-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.video-preview-close:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Badges de type de vidéo */
.video-item .video-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
}

.video-type-badge.local {
    background: var(--success);
}

.video-type-badge.youtube {
    background: #ff0000;
}

.video-type-badge.vimeo {
    background: #1ab7ea;
}

.video-type-badge.dailymotion {
    background: #0066cc;
}

/* Animation d'ajout de vidéo */
@keyframes videoAdded {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.video-item.newly-added {
    animation: videoAdded 0.5s ease-out;
}

/* Effet de survol pour la galerie */
.video-gallery:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Amélioration de l'affordance visuelle */
.video-item {
    position: relative;
    overflow: hidden;
}

.video-item::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;
    z-index: 2;
}

.video-item:hover::before {
    left: 100%;
}

/* Badge de durée pour les vidéos locales */
.video-item .video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
}

/* Responsive pour les vidéos */
@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .video-item {
        min-height: 140px;
    }
    
    .video-item video,
    .video-item .video-placeholder {
        height: 100px;
    }
    
    .video-preview-modal {
        padding: 20px;
    }
    
    .video-preview-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .video-item {
        min-height: 120px;
    }
    
    .video-item video,
    .video-item .video-placeholder {
        height: 80px;
    }
    
    .video-item .video-info {
        padding: 6px;
        font-size: 0.7rem;
    }
    
    .video-item .video-title {
        font-size: 0.7rem;
    }
    
    .video-item .video-meta {
        font-size: 0.6rem;
    }
}

/* Mode sombre spécifique pour les vidéos */
[data-theme="dark"] .video-gallery {
    background: #1a1a1a;
    border-color: #404040;
}

[data-theme="dark"] .video-item {
    background: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .video-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0,102,204,0.3);
}

[data-theme="dark"] .video-preview-content {
    background: #2d2d2d;
}

[data-theme="dark"] .video-preview-info {
    background: #1a1a1a;
}

/* Amélioration des indicateurs de médias dans les cartes de paramètres */
.param-media-indicators {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.param-media-indicators > div {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 2px 6px;
    background: var(--bg);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.param-media-preview {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.param-media-preview > div {
    margin-bottom: 0.5rem;
}

.param-media-preview > div:last-child {
    margin-bottom: 0;
}

.param-media-preview .media-type-header {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-media-preview .media-thumbnails {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.param-media-preview .media-thumbnail {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.param-media-preview .media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.param-media-preview .media-thumbnail.video-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.param-media-preview .media-more {
    width: 40px;
    height: 30px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Indicateurs de chargement pour les vidéos */
.video-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

.video-item .video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 1.5rem;
    z-index: 5;
}
/* 
AJOUTER CES STYLES À LA FIN DE VOTRE FICHIER assets/css/styles.css
Styles pour la galerie de vidéos séparée
*/

/* =====================================================
   STYLES POUR LA GALERIE DE VIDÉOS SÉPARÉE
   ===================================================== */

/* Container de la galerie de vidéos */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    min-height: 100px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg);
    transition: all 0.3s ease;
}

/* État vide de la galerie */
.video-gallery:empty::before {
    content: '🎬 Aucune vidéo ajoutée\A Cliquez sur "Ajouter vidéo" pour commencer';
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 2rem;
    white-space: pre-line;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Galerie avec vidéos */
.video-gallery.has-videos {
    border-style: solid;
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Items de vidéo dans la galerie */
.video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
    border: 2px solid var(--border);
    min-height: 160px;
}

.video-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* Icône de lecture au survol */
.video-item::after {
    content: '▶️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
    z-index: 5;
}

.video-item:hover::after {
    opacity: 1;
}

/* Miniatures vidéo pour fichiers locaux */
.video-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    pointer-events: none;
}

/* Placeholder pour vidéos en ligne */
.video-item .video-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* Infos de la vidéo */
.video-item .video-info {
    padding: 8px;
    font-size: 0.8rem;
}

.video-item .video-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-item .video-meta {
    color: var(--text-light);
    font-size: 0.7rem;
}

/* Bouton de suppression sur les vidéos */
.video-item .video-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .video-remove {
    opacity: 1;
}

.video-item .video-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Modal de prévisualisation vidéo - VERSION AMÉLIORÉE PLEIN ÉCRAN */
.video-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.video-preview-content {
    position: relative;
    width: 95vw;
    max-width: 1200px;
    height: auto;
    max-height: 90vh;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* Vidéos locales en plein écran */
.video-preview-content video {
    width: 100% !important;
    height: auto !important;
    min-height: 400px;
    max-height: 80vh;
    display: block;
    background: #000;
}

/* Vidéos intégrées (YouTube, Vimeo...) en plein écran */
.video-preview-content .video-embed-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    min-height: 400px;
}

.video-preview-content .video-embed-container iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Overlay d'informations */
.video-preview-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
}

.video-preview-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.video-preview-info p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
}

/* Bouton de fermeture amélioré */
.video-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.6);
}

/* Animation d'apparition pour la modal vidéo */
@keyframes videoModalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-preview-modal {
    animation: videoModalAppear 0.3s ease-out;
}

/* Responsive pour la prévisualisation vidéo */
@media (max-width: 768px) {
    .video-preview-modal {
        padding: 10px;
    }
    
    .video-preview-content {
        width: 98vw;
        max-height: 95vh;
    }
    
    .video-preview-content video {
        min-height: 250px;
        max-height: 70vh;
    }
    
    .video-preview-content .video-embed-container {
        min-height: 250px;
    }
    
    .video-preview-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .video-preview-info {
        padding: 15px;
    }
    
    .video-preview-info h3 {
        font-size: 1rem;
    }
    
    .video-preview-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .video-preview-content video {
        min-height: 200px;
        max-height: 60vh;
    }
    
    .video-preview-content .video-embed-container {
        min-height: 200px;
    }
    
    .video-preview-info {
        padding: 10px;
    }
    
    .video-preview-info h3 {
        font-size: 0.9rem;
    }
    
    .video-preview-info p {
        font-size: 0.7rem;
    }
}

/* Mode paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .video-preview-content {
        max-height: 95vh;
    }
    
    .video-preview-content video {
        min-height: 150px;
        max-height: 85vh;
    }
    
    .video-preview-content .video-embed-container {
        min-height: 150px;
    }
    
    .video-preview-info {
        padding: 8px 15px;
    }
}

/* Amélioration des contrôles vidéo */
.video-preview-content video::-webkit-media-controls-panel {
    background-color: rgba(0,0,0,0.8);
}

.video-preview-content video::-webkit-media-controls-play-button,
.video-preview-content video::-webkit-media-controls-volume-slider,
.video-preview-content video::-webkit-media-controls-timeline {
    filter: brightness(1.2);
}

/* Indicateur de chargement pour les vidéos */
.video-preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    z-index: 10;
}

.video-preview-loading::before {
    content: '⏳';
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Badges de type de vidéo */
.video-item .video-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
}

.video-type-badge.local {
    background: var(--success);
}

.video-type-badge.youtube {
    background: #ff0000;
}

.video-type-badge.vimeo {
    background: #1ab7ea;
}

.video-type-badge.dailymotion {
    background: #0066cc;
}

/* Animation d'ajout de vidéo */
@keyframes videoAdded {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.video-item.newly-added {
    animation: videoAdded 0.5s ease-out;
}

/* Effet de survol pour la galerie */
.video-gallery:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Amélioration de l'affordance visuelle */
.video-item {
    position: relative;
    overflow: hidden;
}

.video-item::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;
    z-index: 2;
}

.video-item:hover::before {
    left: 100%;
}

/* Badge de durée pour les vidéos locales */
.video-item .video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
}

/* Responsive pour les vidéos */
@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .video-item {
        min-height: 140px;
    }
    
    .video-item video,
    .video-item .video-placeholder {
        height: 100px;
    }
    
    .video-preview-modal {
        padding: 20px;
    }
    
    .video-preview-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .video-item {
        min-height: 120px;
    }
    
    .video-item video,
    .video-item .video-placeholder {
        height: 80px;
    }
    
    .video-item .video-info {
        padding: 6px;
        font-size: 0.7rem;
    }
    
    .video-item .video-title {
        font-size: 0.7rem;
    }
    
    .video-item .video-meta {
        font-size: 0.6rem;
    }
}

/* Mode sombre spécifique pour les vidéos */
[data-theme="dark"] .video-gallery {
    background: #1a1a1a;
    border-color: #404040;
}

[data-theme="dark"] .video-item {
    background: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .video-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0,102,204,0.3);
}

[data-theme="dark"] .video-preview-content {
    background: #2d2d2d;
}

[data-theme="dark"] .video-preview-info {
    background: #1a1a1a;
}

/* Amélioration des indicateurs de médias dans les cartes de paramètres */
.param-media-indicators {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.param-media-indicators > div {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 2px 6px;
    background: var(--bg);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.param-media-preview {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.param-media-preview > div {
    margin-bottom: 0.5rem;
}

.param-media-preview > div:last-child {
    margin-bottom: 0;
}

.param-media-preview .media-type-header {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-media-preview .media-thumbnails {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.param-media-preview .media-thumbnail {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.param-media-preview .media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.param-media-preview .media-thumbnail.video-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.param-media-preview .media-more {
    width: 40px;
    height: 30px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Indicateurs de chargement pour les vidéos */
.video-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

.video-item .video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 1.5rem;
    z-index: 5;
}

/* 
AJOUTER CES STYLES À LA FIN DE VOTRE FICHIER assets/css/styles.css
Styles pour la galerie de vidéos séparée
*/

/* =====================================================
   STYLES POUR LA GALERIE DE VIDÉOS SÉPARÉE
   ===================================================== */

/* Container de la galerie de vidéos */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    min-height: 100px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg);
    transition: all 0.3s ease;
}

/* État vide de la galerie */
.video-gallery:empty::before {
    content: '🎬 Aucune vidéo ajoutée\A Cliquez sur "Ajouter vidéo" pour commencer';
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 2rem;
    white-space: pre-line;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Galerie avec vidéos */
.video-gallery.has-videos {
    border-style: solid;
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Items de vidéo dans la galerie */
.video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
    border: 2px solid var(--border);
    min-height: 160px;
}

.video-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* Icône de lecture au survol */
.video-item::after {
    content: '▶️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
    z-index: 5;
}

.video-item:hover::after {
    opacity: 1;
}

/* Miniatures vidéo pour fichiers locaux */
.video-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    pointer-events: none;
}

/* Placeholder pour vidéos en ligne */
.video-item .video-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* Infos de la vidéo */
.video-item .video-info {
    padding: 8px;
    font-size: 0.8rem;
}

.video-item .video-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-item .video-meta {
    color: var(--text-light);
    font-size: 0.7rem;
}

/* Bouton de suppression sur les vidéos */
.video-item .video-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .video-remove {
    opacity: 1;
}

.video-item .video-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Modal de prévisualisation vidéo - VERSION AMÉLIORÉE PLEIN ÉCRAN */
.video-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.video-preview-content {
    position: relative;
    width: 95vw;
    max-width: 1200px;
    height: auto;
    max-height: 90vh;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* Vidéos locales en plein écran */
.video-preview-content video {
    width: 100% !important;
    height: auto !important;
    min-height: 400px;
    max-height: 80vh;
    display: block;
    background: #000;
}

/* Vidéos intégrées (YouTube, Vimeo...) en plein écran */
.video-preview-content .video-embed-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    min-height: 400px;
}

.video-preview-content .video-embed-container iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Overlay d'informations */
.video-preview-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
}

.video-preview-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.video-preview-info p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
}

/* Bouton de fermeture amélioré */
.video-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.6);
}

/* Animation d'apparition pour la modal vidéo */
@keyframes videoModalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-preview-modal {
    animation: videoModalAppear 0.3s ease-out;
}

/* Responsive pour la prévisualisation vidéo */
@media (max-width: 768px) {
    .video-preview-modal {
        padding: 10px;
    }
    
    .video-preview-content {
        width: 98vw;
        max-height: 95vh;
    }
    
    .video-preview-content video {
        min-height: 250px;
        max-height: 70vh;
    }
    
    .video-preview-content .video-embed-container {
        min-height: 250px;
    }
    
    .video-preview-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .video-preview-info {
        padding: 15px;
    }
    
    .video-preview-info h3 {
        font-size: 1rem;
    }
    
    .video-preview-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .video-preview-content video {
        min-height: 200px;
        max-height: 60vh;
    }
    
    .video-preview-content .video-embed-container {
        min-height: 200px;
    }
    
    .video-preview-info {
        padding: 10px;
    }
    
    .video-preview-info h3 {
        font-size: 0.9rem;
    }
    
    .video-preview-info p {
        font-size: 0.7rem;
    }
}

/* Mode paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .video-preview-content {
        max-height: 95vh;
    }
    
    .video-preview-content video {
        min-height: 150px;
        max-height: 85vh;
    }
    
    .video-preview-content .video-embed-container {
        min-height: 150px;
    }
    
    .video-preview-info {
        padding: 8px 15px;
    }
}

/* Amélioration des contrôles vidéo */
.video-preview-content video::-webkit-media-controls-panel {
    background-color: rgba(0,0,0,0.8);
}

.video-preview-content video::-webkit-media-controls-play-button,
.video-preview-content video::-webkit-media-controls-volume-slider,
.video-preview-content video::-webkit-media-controls-timeline {
    filter: brightness(1.2);
}

/* Indicateur de chargement pour les vidéos */
.video-preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    z-index: 10;
}

.video-preview-loading::before {
    content: '⏳';
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Badges de type de vidéo */
.video-item .video-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
}

.video-type-badge.local {
    background: var(--success);
}

.video-type-badge.youtube {
    background: #ff0000;
}

.video-type-badge.vimeo {
    background: #1ab7ea;
}

.video-type-badge.dailymotion {
    background: #0066cc;
}

/* Animation d'ajout de vidéo */
@keyframes videoAdded {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.video-item.newly-added {
    animation: videoAdded 0.5s ease-out;
}

/* Effet de survol pour la galerie */
.video-gallery:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(0, 68, 153, 0.02));
}

/* Amélioration de l'affordance visuelle */
.video-item {
    position: relative;
    overflow: hidden;
}

.video-item::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;
    z-index: 2;
}

.video-item:hover::before {
    left: 100%;
}

/* Badge de durée pour les vidéos locales */
.video-item .video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
}

/* Responsive pour les vidéos */
@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .video-item {
        min-height: 140px;
    }
    
    .video-item video,
    .video-item .video-placeholder {
        height: 100px;
    }
    
    .video-preview-modal {
        padding: 20px;
    }
    
    .video-preview-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .video-item {
        min-height: 120px;
    }
    
    .video-item video,
    .video-item .video-placeholder {
        height: 80px;
    }
    
    .video-item .video-info {
        padding: 6px;
        font-size: 0.7rem;
    }
    
    .video-item .video-title {
        font-size: 0.7rem;
    }
    
    .video-item .video-meta {
        font-size: 0.6rem;
    }
}

/* Mode sombre spécifique pour les vidéos */
[data-theme="dark"] .video-gallery {
    background: #1a1a1a;
    border-color: #404040;
}

[data-theme="dark"] .video-item {
    background: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .video-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0,102,204,0.3);
}

[data-theme="dark"] .video-preview-content {
    background: #2d2d2d;
}

[data-theme="dark"] .video-preview-info {
    background: #1a1a1a;
}

/* Amélioration de l'éditeur Quill pour plus de hauteur */
#paramNotesEditor {
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: border-color 0.3s ease;
}

#paramNotesEditor:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Amélioration de la toolbar Quill */
#paramNotesEditor .ql-toolbar {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    border-radius: 8px 8px 0 0;
}

/* Zone d'édition avec scrollbar personnalisée */
#paramNotesEditor .ql-editor {
    min-height: 300px;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 15px;
}

/* Scrollbar personnalisée pour l'éditeur */
#paramNotesEditor .ql-editor::-webkit-scrollbar {
    width: 8px;
}

#paramNotesEditor .ql-editor::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 4px;
}

#paramNotesEditor .ql-editor::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#paramNotesEditor .ql-editor::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Mode sombre pour l'éditeur */
[data-theme="dark"] #paramNotesEditor {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] #paramNotesEditor .ql-toolbar {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] #paramNotesEditor .ql-editor {
    background: var(--card-bg);
    color: var(--text);
}

/* Responsive pour l'éditeur agrandi */
@media (max-width: 768px) {
    #paramNotesEditor {
        height: 250px !important;
    }
    
    #paramNotesEditor .ql-editor {
        min-height: 200px;
        padding: 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #paramNotesEditor {
        height: 200px !important;
    }
    
    #paramNotesEditor .ql-editor {
        min-height: 150px;
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* Amélioration de la modal pour accueillir l'éditeur plus grand */
.modal-content {
    max-height: 95vh;
    overflow-y: auto;
}

/* Scrollbar pour la modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
.param-media-indicators {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.param-media-indicators > div {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 2px 6px;
    background: var(--bg);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.param-media-preview {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.param-media-preview > div {
    margin-bottom: 0.5rem;
}

.param-media-preview > div:last-child {
    margin-bottom: 0;
}

.param-media-preview .media-type-header {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-media-preview .media-thumbnails {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.param-media-preview .media-thumbnail {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.param-media-preview .media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.param-media-preview .media-thumbnail.video-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.param-media-preview .media-more {
    width: 40px;
    height: 30px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Indicateurs de chargement pour les vidéos */
.video-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

.video-item .video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 1.5rem;
    z-index: 5;
}