/* ═══════════════════════════════════════════════════
   PDF TOOLS — Style
   Palette originale : Bleu #007bff · Fond #f4f6f9 · Blanc
   Typo : system-ui (garde l'original) amélioré
═══════════════════════════════════════════════════ */

:root {
  --blue:       #007bff;
  --blue-dark:  #0056d2;
  --blue-light: #eaf4ff;
  --text:       #222;
  --text-mid:   #555;
  --text-muted: #888;
  --surface:    #ffffff;
  --bg:         #f4f6f9;
  --border:     #e8e8e8;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 6px 24px rgba(0,0,0,.09);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --transition: .22s ease;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
    width: 90%;
    max-width: 780px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
  width: 65px; 
  height: auto;
  display: flex;
}

.logo img { 
    width: 100%; 
    height: auto; 
    object-fit: contain; 
}


.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-links a {
  margin-left: 0;
  text-decoration: none;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--blue);
  background: var(--blue-light);
}

/* ── Container ─────────────────────────────────── */
.container {
  width: 90%;
  max-width: 820px;
  margin: 44px auto 72px;
  text-align: center;
}

/* ── Titres de page ────────────────────────────── */
.title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -.3px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Drop zones ────────────────────────────────── */
#drop-zone,
#drop-zone-edit,
#drop-zone-ptw,
#drop-zone-compress {
  border: 2px dashed var(--border);
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  transition: var(--transition);
  cursor: pointer;
}

#drop-zone:hover,      #drop-zone.hover,
#drop-zone-edit:hover, #drop-zone-edit.hover,
#drop-zone-ptw:hover,  #drop-zone-ptw.hover,
#drop-zone-compress:hover, #drop-zone-compress.hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

#drop-zone p,
#drop-zone-edit p,
#drop-zone-ptw p,
#drop-zone-compress p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 4px;
}


/* ── Boutons ────────────────────────────────────── */
.upload-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.upload-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.merge-btn {
  display: block;
  margin: 26px auto 0;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,123,255,.28);
  width: fit-content;
  min-width: 180px;
  letter-spacing: .1px;
}

.merge-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 22px rgba(0,123,255,.38);
}

.merge-btn:active { transform: scale(1); }

.or {
  color: var(--text-muted);
  font-size: 13px;
  margin: 8px 0 4px;
}

/* ── File list (merge) ─────────────────────────── */
#upload-form { text-align: center; }
#file-list { width: 100%; max-width: 580px; margin: 20px auto 0; }

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  margin: 10px 0;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.file-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.drag-handle { cursor: grab; font-size: 17px; color: var(--text-muted); }

.preview {
  width: 56px;
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.file-info { flex: 1; text-align: left; min-width: 0; }

.file-info span:first-child {
  font-weight: 500;
  font-size: 14px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pages { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.remove {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  flex-shrink: 0;
}

.remove:hover { background: #e60000; }

/* ── File badge ────────────────────────────────── */
.file-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
}

/* ── Niveau de compression ─────────────────────── */
.level-option {
  flex: 1;
  min-width: 140px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 13px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.level-option:hover { border-color: var(--blue); }
.level-option.selected { border-color: var(--blue); background: var(--blue-light); }
.level-option strong { font-size: 14px; font-weight: 600; color: var(--text); }
.level-option span   { font-size: 12px; color: var(--text-muted); }
.level-option small  { font-size: 12px; color: var(--blue); font-weight: 600; }

/* ── Result card ───────────────────────────────── */
.result-card {
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
  font-size: 15px;
  color: var(--text-mid);
}

.result-card p { margin-bottom: 6px; }

.gain {
  color: #16a34a;
  font-weight: 700;
  font-size: 22px;
  display: block;
  margin-top: 8px;
}

/* ── Onglets (edit PDF) ────────────────────────── */
.tab-bar {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); background: var(--bg); }

.tab-btn.active {
  background: var(--blue);
  color: white;
  box-shadow: 0 2px 8px rgba(0,123,255,.22);
}

.tab-panel { display: none; text-align: center; margin-top: 8px; margin-bottom: 20px; }
.tab-panel.active { display: block; }

/* ── Inputs ────────────────────────────────────── */
input[type="text"],
input[type="number"] {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,123,255,.10);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,123,255,.35);
}

input[type="color"] {
  padding: 3px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  height: 42px;
  width: 100%;
  background: var(--surface);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 5px;
}

/* ── Ads ───────────────────────────────────────── */
.adsbygoogle {
  display: block;
  margin: 32px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 90px;
}

/* ── SEO text ──────────────────────────────────── */
.seo-text {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: left;
  line-height: 1.75;
  color: #444;
}

.seo-text h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-top: 32px; margin-bottom: 10px; }
.seo-text h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-top: 20px; margin-bottom: 8px; }
.seo-text p  { margin-bottom: 14px; }
.seo-text ul { padding-left: 20px; margin-bottom: 18px; }
.seo-text li { margin-bottom: 7px; }

/* ── Loader ────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.92);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  z-index: 2000;
}

.loader p { font-size: 15px; color: var(--text-mid); font-weight: 500; }
.hidden { display: none !important; }

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #ddd;
  border-top: 4px solid var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

/* ── Home ──────────────────────────────────────── */
.home-hero {
  text-align: center;
  padding: 60px 0 48px;
}

.home-hero .eyebrow {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.home-hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.home-hero h1 span { color: var(--blue); }

.home-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 36px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}


.tool-card h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.tool-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.tool-card .arrow {
  margin-top: auto;
  font-size: 17px;
  color: var(--blue);
  transition: var(--transition);
}

.tool-card:hover .arrow { transform: translateX(4px); }

/* Section "Pourquoi nous" */
.why-section { margin-top: 72px; text-align: center; }

.why-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.why-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 18px;
}

.why-item .why-icon { font-size: 26px; margin-bottom: 10px; display: block; }
.why-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.why-item p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Footer ────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  text-align: center;
  margin-top: 72px;
}

.site-footer p { font-size: 13px; color: var(--text-muted); }

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 8px;
  transition: var(--transition);
}

.site-footer a:hover { color: var(--blue); }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
  .container { width: 94%; margin-top: 28px; }
  .nav-links a { padding: 6px 9px; font-size: 13px; }
  .title { font-size: 26px; }
  .home-hero h1 { font-size: 28px; }
  .tab-bar { width: 100%; }
  .tab-btn { font-size: 13px; padding: 7px 11px; }

  #drop-zone,
  #drop-zone-edit,
  #drop-zone-ptw,
  #drop-zone-compress { width: 100%; padding: 36px 18px; }

  #file-list { width: 100%; }
}



/* ── Sélecteur de langue ── */
.lang-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
}
.lang-btn {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1.5px solid #ddd;
    color: #555;
    transition: 0.2s;
}
.lang-btn:hover { border-color: #007bff; color: #007bff; }
.lang-btn.active { border-color: #007bff; background: #eaf4ff; color: #007bff; }