/* ==========================================================================
   css/pdf-to-image/pdf-to-image.css
   ========================================================================== */

/* --- HEADER & UPLOAD --- */
.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: #d97706; /* Thème Moutarde/Orange */ }

.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; }
.title-badge { background: #fef08a; color: #854d0e; padding: 6px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 8px; }
.main-title { font-size: 2.5rem; font-weight: 800; color: #0f172a; margin-top: 0; 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: #d97706; background: #fffbeb; }
.icon-pdf { font-size: 60px; color: #d97706; margin-bottom: 20px; }
.btn-upload { background: #d97706; 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: #b45309; }
.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: #d97706; }
.group-label { font-size: 0.9rem; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.5px; }
.settings-group { margin-bottom: 30px; transition: opacity 0.3s; }
.mt-auto { margin-top: auto; }

/* Cartes des Modes (2 colonnes) */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.mode-card { cursor: pointer; }
.mode-card input { display: none; }
.mode-card-inner { border: 2px solid #e2e8f0; border-radius: 12px; padding: 20px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; transition: all 0.2s; background: #ffffff; height: 100%; }
.mode-card-inner i { font-size: 30px; color: #94a3b8; transition: color 0.2s; }
.mode-title { font-weight: 700; font-size: 0.95rem; color: #334155; }
.mode-desc { font-size: 0.75rem; color: #94a3b8; line-height: 1.3; }

.mode-card:hover .mode-card-inner { border-color: #cbd5e1; background: #f8fafc; }
.mode-card input:checked + .mode-card-inner { border-color: #d97706; background: #fffbeb; box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15); }
.mode-card input:checked + .mode-card-inner i { color: #d97706; }
.mode-card input:checked + .mode-card-inner .mode-title { color: #92400e; }

/* Sélecteurs Segmentés (iOS Style) */
.segmented-control { display: flex; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.segmented-control input { display: none; }
.segmented-control label { flex: 1; text-align: center; padding: 10px 0; font-size: 0.9rem; font-weight: 600; color: #64748b; cursor: pointer; border-radius: 8px; transition: all 0.2s; }
.segmented-control input:checked + label { background: white; color: #0f172a; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* Bouton Final */
.btn-action { width: 100%; padding: 1.2rem; background: #d97706; 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(217, 119, 6, 0.3); }
.btn-action:hover { background: #b45309; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4); }
.btn-action: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 #d97706; 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: #d97706; transition: width 0.3s ease; }
.loading-desc { color: #64748b; font-size: 0.95rem; font-weight: 600; }