/* ==========================================================================
   css/compress/compress.css (Design Pro & Unique PDFNoLimit)
   ========================================================================== */

/* --- HEADER & UPLOAD (Hérité) --- */
.main-header { background: #ffffff; border-bottom: 1px solid #e2e8f0; height: 70px; display: flex; align-items: center; }
.header-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.logo-img { height: 36px; object-fit: contain; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-link { color: #334155; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav-link:hover, .nav-link.active-link { color: #4f46e5; }

.upload-view { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 70px); background: #f8fafc; padding: 2rem; text-align: center; }
.main-title { font-size: 2.5rem; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.main-subtitle { font-size: 1.1rem; color: #64748b; margin-bottom: 40px; max-width: 650px; }

.upload-zone { background: white; border: 2px dashed #cbd5e1; border-radius: 16px; padding: 60px 20px; width: 100%; max-width: 600px; transition: all 0.3s ease; cursor: pointer; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.upload-zone:hover, .upload-zone.dragover { border-color: #4f46e5; background: #eef2ff; }
.icon-pdf { font-size: 60px; color: #4f46e5; margin-bottom: 20px; }
.btn-upload { background: #4f46e5; color: white; border: none; padding: 12px 24px; border-radius: 8px; font-size: 1.1rem; font-weight: 700; cursor: pointer; margin-bottom: 15px; transition: background 0.2s; display: inline-flex; align-items: center; gap: 10px; }
.btn-upload:hover { background: #4338ca; }
.drop-text { color: #94a3b8; font-size: 0.95rem; margin: 0; }

/* --- ESPACE DE TRAVAIL --- */
.workspace-view { display: flex; flex-direction: column; height: calc(100vh - 70px); background: #f1f5f9; }
@media (min-width: 900px) { .workspace-view { flex-direction: row; } }

/* COLONNE GAUCHE (Aperçu) */
.preview-container { flex: 1; display: flex; justify-content: center; align-items: center; padding: 2rem; overflow-y: auto; }
.preview-box { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); text-align: center; max-width: 380px; width: 100%; }
.preview-header { font-size: 0.85rem; text-transform: uppercase; font-weight: 800; color: #94a3b8; margin-bottom: 15px; letter-spacing: 0.5px; }
.preview-box canvas { max-width: 100%; height: auto; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 15px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

.pdf-info { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pdf-info strong { color: #1e293b; font-size: 1rem; word-break: break-all; }
.badges-row { display: flex; gap: 10px; }
.info-badge { background: #f8fafc; border: 1px solid #e2e8f0; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; color: #64748b; display: flex; align-items: center; gap: 5px; }

/* COLONNE DROITE (Dashboard) */
.action-sidebar { width: 100%; background: white; padding: 2rem; display: flex; flex-direction: column; overflow-y: auto; }
@media (min-width: 900px) { .action-sidebar { width: 420px; border-left: 1px solid #e2e8f0; box-shadow: -4px 0 15px rgba(0,0,0,0.03); } }

.sidebar-title { font-size: 1.3rem; color: #0f172a; font-weight: 800; margin-top: 0; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; }
.sidebar-title i { color: #4f46e5; }
.group-label { font-size: 0.9rem; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 0.5px; }
.settings-group { margin-bottom: 30px; }
.mt-auto { margin-top: auto; }

/* Grille des 3 profils */
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comp-card { cursor: pointer; }
.comp-card input { display: none; }
.comp-card-inner { border: 2px solid #e2e8f0; border-radius: 12px; padding: 15px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; transition: all 0.2s; background: #ffffff; height: 100%; }
.comp-card-inner i { font-size: 24px; color: #94a3b8; transition: color 0.2s; }
.comp-title { font-weight: 700; font-size: 0.9rem; color: #334155; }
.comp-desc { font-size: 0.7rem; color: #94a3b8; line-height: 1.3; }

/* État Actif de la grille */
.comp-card:hover .comp-card-inner { border-color: #cbd5e1; background: #f8fafc; }
.comp-card input:checked + .comp-card-inner { border-color: #4f46e5; background: #eef2ff; box-shadow: 0 4px 12px rgba(79,70,229,0.15); }
.comp-card input:checked + .comp-card-inner i { color: #4f46e5; }
.comp-card input:checked + .comp-card-inner .comp-title { color: #4f46e5; }

/* Interrupteurs (Toggles) Avancés */
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text strong { font-size: 0.9rem; color: #1e293b; }
.toggle-text span { font-size: 0.75rem; color: #64748b; margin-top: 2px; }

/* The Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(20px); }

/* Bouton Final */
.btn-compress { width: 100%; padding: 1.2rem; background: #4f46e5; color: white; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; box-shadow: 0 4px 15px rgba(79,70,229,0.3); }
.btn-compress:hover { background: #4338ca; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,0.4); }
.btn-compress:active { transform: translateY(0); }

/* --- ÉCRAN DE CHARGEMENT PRO --- */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.loading-card { background: white; padding: 40px; border-radius: 16px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.spinner { border: 4px solid #e2e8f0; border-top: 4px solid #4f46e5; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-title { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin-bottom: 15px; }
.progress-bar { width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 15px; }
.progress-fill { width: 0%; height: 100%; background: #4f46e5; transition: width 0.3s ease; }
.loading-desc { color: #64748b; font-size: 0.9rem; }