/* -------------------------------------------------------------------------- */
/* UPLOAD PAGE STYLES                                                         */
/* -------------------------------------------------------------------------- */

/* 🎯 TICKET 3 : Styles pour les conseils d'upload - Version Élégante */
.upload-tips {
    margin-bottom: var(--spacing-md);
    background: #f8fafc;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tips-text {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-weight: 500;
}

.tip-icon {
    color: var(--primary-color);
    font-size: 1.1em;
    flex-shrink: 0;
}

.tip-good {
    color: var(--secondary-color);
    font-weight: 600;
    background: rgba(46, 204, 113, 0.1);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 15px;
    border: 1px solid rgba(46, 204, 113, 0.2);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.tip-bad {
    color: var(--danger-color);
    font-weight: 600;
    background: rgba(231, 76, 60, 0.1);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 15px;
    border: 1px solid rgba(231, 76, 60, 0.2);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* 🎯 TICKET 2 : Styles pour les contrôles de luminosité améliorés */
.brightness-controls {
    background-color: rgba(0, 0, 0, 0.8);
    padding: var(--spacing-lg);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 500px;
    margin: 0 auto var(--spacing-lg);
}

.brightness-header {
    text-align: center;
    color: white;
}

.brightness-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.brightness-subtitle {
    font-size: var(--font-size-sm);
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brightness-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    max-width: 500px;
}

.brightness-icon {
    color: #ffd700;
    font-size: 16px;
    flex-shrink: 0;
}

.brightness-slider {
    flex: 1;
    height: 6px;
    background: linear-gradient(to right, #333 0%, #fff 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.brightness-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
    border: 2px solid #fff;
    transition: all 0.2s ease;
}

.brightness-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.7);
}

.brightness-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
    border: 2px solid #fff;
    transition: all 0.2s ease;
}

.brightness-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.7);
}

.brightness-value {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.brightness-reset {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 6px 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.brightness-reset i {
    font-size: 12px;
}

/* 🎯 TICKET 1 : Styles pour le sélecteur de versions amélioré */
.version-help-text {
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--primary-light);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    margin-bottom: var(--spacing-sm);
}

.version-help-text i {
    color: var(--primary-color);
    font-size: 1.1em;
}

/* 🎯 TICKET 1 : Bouton d'amélioration renforcé - Version Classe */
.improve-btn-enhanced {
    background-color: rgba(52, 152, 219, 0.9) !important;
    border: 2px solid var(--primary-color) !important;
    position: relative;
    overflow: hidden;
    animation: improveButtonPulse 3s infinite;
}

@keyframes improveButtonPulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
    }
}

.improve-btn-enhanced:hover:not(:disabled) {
    background-color: var(--primary-color) !important;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.8);
    animation: none;
}

.improve-btn-enhanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.improve-btn-enhanced:hover::before {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Animation d'apparition pour les contrôles */
.fullscreen-modal.active .brightness-controls {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .upload-tips {
        padding: var(--spacing-sm);
    }

    .tips-text {
        font-size: var(--font-size-xs);
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .tip-good,
    .tip-bad {
        padding: var(--spacing-xs);
        font-size: var(--font-size-xs);
    }

    .brightness-controls {
        padding: 12px 18px;
        margin-bottom: 15px;
        max-width: 100%;
    }

    .brightness-header {
        margin-bottom: var(--spacing-sm);
    }

    .brightness-title {
        font-size: var(--font-size-base);
    }

    .brightness-subtitle {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs);
    }

    .brightness-container {
        width: 100%;
        max-width: 300px;
        gap: 10px;
    }

    .brightness-icon {
        font-size: 14px;
    }

    .brightness-slider {
        height: 5px;
    }

    .brightness-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .brightness-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }

    .brightness-value {
        font-size: 11px;
        min-width: 35px;
        padding: 3px 6px;
    }

    .brightness-reset {
        width: 25px;
        height: 25px;
        padding: 4px;
    }

    .brightness-reset i {
        font-size: 10px;
    }

    .version-help-text {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
        text-align: center;
    }
}

/* Très petit mobile */
@media (max-width: 480px) {
    .brightness-controls {
        padding: 10px 15px;
        margin-bottom: 10px;
        border-radius: 15px;
    }

    .brightness-container {
        width: 100%;
        max-width: 280px;
        gap: 8px;
    }

    .tips-text {
        gap: var(--spacing-xs);
    }

    .version-help-text {
        margin-bottom: var(--spacing-xs);
        padding: var(--spacing-xs);
    }
}

/* 🎯 NOUVEAU : Styles pour les boutons de téléchargement PNG */
.action-btn.download-btn {
    background: #059669;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
}

.action-btn.download-btn:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.action-btn.download-btn:active {
    transform: translateY(0);
}

/* 🎯 NOUVEAU : Bouton PDF Professionnel */
.action-btn.pdf-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
}

.action-btn.pdf-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.action-btn.pdf-btn:active {
    transform: translateY(0);
}

/* Amélioration des boutons d'actions existants */
.action-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-btn.fullscreen-btn {
    background: #3b82f6;
}

.action-btn.fullscreen-btn:hover {
    background: #2563eb;
}

.action-btn.improve-btn {
    background: rgba(52, 152, 219, 0.9);
}

.action-btn.improve-btn:hover:not(:disabled) {
    background: rgba(52, 152, 219, 1);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background: rgba(248, 250, 252, 0.9);
    margin-top: 8px;
    border-radius: 0 0 8px 8px;
}

/* Vignette d'instructions pour régénération */
.instructions-vignette {
    transition: all 0.3s ease;
}

.instructions-vignette:hover {
    background-color: #f1f5f9 !important;
}

.instructions-textarea {
    transition: all 0.2s ease;
}

.instructions-textarea:focus {
    outline: none;
    border-color: #1e40af !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.instructions-textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

.instructions-textarea:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* 🎯 NOUVEAU : Styles pour la modal PDF */
.pdf-modal .modal-content {
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.pdf-modal-body {
    padding: 0;
}

.pdf-images-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-image-container {
    text-align: center;
}

.pdf-image-container h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
}

.pdf-preview-img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.pdf-config-section {
    padding: 1.5rem;
}

.pdf-config-section h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pdf-modal .form-group {
    display: flex;
    flex-direction: column;
}

.pdf-modal .form-group.full-width {
    grid-column: 1 / -1;
}

.pdf-modal .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.pdf-modal .form-input,
.pdf-modal .form-textarea {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.6rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.pdf-modal .form-input:focus,
.pdf-modal .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.pdf-modal-footer {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Responsive pour modal PDF */
@media (max-width: 768px) {
    .pdf-modal .modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .pdf-images-preview {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 1rem;
    }

    .pdf-config-grid {
        grid-template-columns: 1fr;
    }

    .pdf-modal-footer {
        flex-direction: column;
    }

    .pdf-config-section {
        padding: 1rem;
    }
}
