.file-upload-wrapper {
    position: relative;
    margin: 20px 0;
}

.file-upload-btn {
    display: block;
    width: 100%;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease;
}

.file-upload-btn:active {
    transform: scale(0.98);
}

.file-upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.uploadImage {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}
.file-upload-wrapper {
    position: relative;
    margin: 20px 0;
}

.file-upload-btn {
    display: block;
    width: 100%;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease;
}

.file-upload-btn:active {
    transform: scale(0.98);
}

.file-upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.uploadImage {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}
.preview-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 15px 0;
    -webkit-overflow-scrolling: touch;
}

.preview-item {
    display: inline-block;
    width: 120px;
    height: 120px;
    margin-right: 10px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    font-weight: bold;
    line-height: 35px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.photo-counter {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    font-size: 16px;
}

.photo-counter-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    display: block;
}
.submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.upload-media {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upload-media:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .submit-bar {
        position: static;
        box-shadow: none;
    }
}

/* Section commentaire stylisée */
.comment-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.comment-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    flex: 1;
    text-align: center;
}


/* Input commentaire */
.comment-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.comment-input-wrapper input[type="text"] {
    width: 100%;
    padding: 15px 60px 15px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
}

.comment-input-wrapper input[type="text"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Color picker stylisé */
.color-picker-wrapper {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-picker-input {
    width: 40px;
    height: 40px;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-picker-input::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-picker-input:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.color-picker-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.color-picker-label {
    position: absolute;
    right: 52px;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.color-picker-wrapper:hover .color-picker-label {
    opacity: 1;
}

/* Responsive mobile - TOUT SUR UNE LIGNE */
@media (max-width: 576px) {
    .comment-section {
        padding: 15px;
    }
    
    .comment-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .comment-input-wrapper input[type="text"] {
        padding: 12px 50px 12px 12px; /* Réduit le padding */
        font-size: 14px;
        border-radius: 10px;
    }
    
    .color-picker-wrapper {
        right: 8px; /* Légèrement plus proche du bord */
    }
    
    .color-picker-input {
        width: 34px;  /* Un peu plus petit pour mobile */
        height: 34px;
        border-width: 2px;
    }
    
    .color-picker-label {
        display: none; /* Cache le label sur mobile */
    }
    
    /* Empêche le zoom sur l'input en iOS */
    .comment-input-wrapper input[type="text"] {
        font-size: 16px; /* Min 16px pour éviter le zoom iOS */
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .comment-input-wrapper input[type="text"] {
        padding: 10px 45px 10px 10px;
        font-size: 14px;
    }
    
    .color-picker-input {
        width: 30px;
        height: 30px;
    }
    
    .color-picker-wrapper {
        right: 6px;
    }
}



/* Warning vidéos trop longues */
.video-warning-box {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 12px 18px;
    margin: 15px 0;
    text-align: center;
    color: #e65100;
    font-weight: 600;
    font-size: 15px;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 152, 0, 0); }
}

.video-warning-box .max-duration {
    font-weight: bold;
    font-size: 18px;
    color: #d84315;
}

/* Badge durée sur les vidéos trop longues */
.preview-item.video-too-long {
    border: 3px solid #ff9800;
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    left: 5px;
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

/* Badge warning sur vidéo trop longue */
.video-warning-icon {
    position: absolute;
    top: 5px;
    left: 5px;  /* Changé de right à left */
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    z-index: 10;
}

/* Responsive mobile */
@media (max-width: 576px) {
    .video-warning-box {
        padding: 10px 15px;
        font-size: 10px;
    }
    
    .video-warning-box .max-duration {
        font-size: 14px;
    }
}


/* ========================================
   OPTION D'IMPRESSION
   ======================================== */

   #print_group {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#print_group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Label cliquable sur toute la surface */
.print-option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    cursor: pointer;
    padding: 20px;
    margin: 0;
    user-select: none;
    transition: background 0.2s ease;
}

.print-option-content:hover {
    background: rgba(255, 255, 255, 0.1);
}

.print-option-content:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Info (icône + label) */
.print-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.print-icon {
    font-size: 28px;
    animation: printPulse 2s ease-in-out infinite;
}

@keyframes printPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.print-label {
    font-weight: 600;
    font-size: 16px;
}

/* Compteur d'impressions */
.print-counter {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */

.toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
    pointer-events: none; /* Empêche le double-clic */
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* État checked */
.toggle-switch input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.9);
    border-color: white;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

/* Hover sur le label */
.print-option-content:hover .toggle-slider {
    background: rgba(255, 255, 255, 0.4);
}

.print-option-content:hover .toggle-switch input:checked + .toggle-slider {
    background: white;
}

/* ========================================
   ÉTAT DÉSACTIVÉ
   ======================================== */

#print_group.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.5);
}

.print-limit-reached {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    padding: 20px;
}

.print-limit-reached .print-icon {
    font-size: 24px;
    animation: none;
}

.print-limit-reached .print-counter {
    margin-left: auto;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .print-option-content,
    .print-limit-reached {
        padding: 15px;
        gap: 10px;
    }
    
    .print-label {
        font-size: 14px;
    }
    
    .print-icon {
        font-size: 24px;
    }
    
    .print-counter {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .toggle-switch {
        width: 50px;
        height: 26px;
    }
    
    .toggle-slider:before {
        height: 18px;
        width: 18px;
    }
    
    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }
}

@media (max-width: 400px) {
    .print-icon {
        display: none;
    }
    
}