/* =====================================================
   Clic Converter — Feuille de style
   ===================================================== */

/* Polices locales (hors ligne) */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --primary: #6d5efc;
  --primary-2: #9b5cff;
  --primary-dark: #5646e0;
  --accent: #00d4ff;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', 'Segoe UI', sans-serif;

  /* teintes des catégories de convertisseurs */
  --tint-audio: #f43f5e;
  --tint-video: #0ea5e9;
  --tint-image: #8b5cf6;
  --tint-document: #f59e0b;
  --tint-archive: #64748b;
  --tint-presentation: #ec4899;
  --tint-font: #14b8a6;
  --tint-ebook: #22c55e;

  --bg: #f7f8fd;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --bg-card-2: #fbfbff;
  --bg-input: #f1f2f9;
  --text: #1a1d2e;
  --text-soft: #555a6b;
  --border: #e4e6f0;
  --shadow: 0 10px 40px rgba(50, 50, 120, .10);
  --shadow-sm: 0 4px 14px rgba(50, 50, 120, .08);

  /* dégradé assombri : blanc sur bouton ≥ 4,8:1 */
  --grad: linear-gradient(135deg, #5b4be8, #8a4bf0);
  --radius: 16px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  --bg: #0d0f1a;
  --bg-alt: #131628;
  --bg-card: #181c30;
  --bg-card-2: #1d2238;
  --bg-input: #21263f;
  --text: #eef0fa;
  --text-soft: #9aa0b8;
  --border: rgba(140, 150, 200, .16);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .35);
}

::selection { background: rgba(109, 94, 252, .3); }

/* Icônes SVG (sprite img/icons.svg) */
.icon {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  flex-shrink: 0;
}
.icon-lg { width: 30px; height: 30px; }
.icon-logo { width: 27px; height: 27px; border-radius: 7px; vertical-align: -0.32em; }
.nav-dropdown a .icon { width: 19px; height: 19px; }
.dz-tool-badge .icon { color: #fff; }
.trust-badge .icon { color: var(--primary); }
.files-drop-hint .icon, .auto-dl .icon { vertical-align: -0.22em; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

h1, h2, h3, .section-title, .logo-text, .price-amount, .stat-value {
  font-family: var(--font-display);
}
h1, .section-title { text-wrap: balance; }
.stat-value { font-variant-numeric: tabular-nums; }

/* Barre de défilement aux couleurs du site */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary) 45%, var(--bg-input));
  border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

kbd {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: .85em;
  font-family: inherit;
}

/* ===== Boutons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .2s, opacity .2s;
  font-family: inherit;
  color: var(--text);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(120deg, #5b4be8, #8a4bf0, #5b4be8);
  background-size: 220% 100%;
  background-position: 0% 0;
  color: #fff;
  box-shadow: 0 6px 20px rgba(109, 94, 252, .35);
  transition: transform .15s, box-shadow .15s, background-position .45s ease;
}
.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(109, 94, 252, .5);
  background-position: 100% 0;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-success { background: var(--success); color: #fff; box-shadow: 0 6px 20px rgba(34,197,94,.35); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 17px; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
  background: transparent;
  border: none;
  font-size: 19px;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  color: var(--text);
  transition: background .2s;
  line-height: 1;
}
.btn-icon:hover { background: var(--bg-input); }

/* l'attribut hidden gagne toujours (sinon display:flex des .btn le neutralise) */
[hidden] { display: none !important; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-alt) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 22px;
}
.logo-icon { font-size: 24px; }
.logo-x { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge-premium {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--grad);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
}
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: color .18s, background .18s;
}
/* liens en pilule */
.nav > a, .nav-drop-toggle {
  padding: 8px 11px;
  border-radius: 10px;
}
.nav > a:hover, .nav-drop-toggle:hover {
  color: var(--primary);
  background: var(--bg-input);
}
.nav > a.active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

/* en-tête renforcé au défilement */
.header.scrolled {
  box-shadow: 0 8px 30px rgba(20, 20, 60, .12);
  border-bottom-color: transparent;
}
[data-theme="dark"] .header.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }

/* Sous-pages (Fonctionnalités, Formats, 100% gratuit, FAQ) */
.page-main { padding: 46px 0 30px; }

/* Pages légales (mentions, confidentialité, CGU, contact) */
.legal { max-width: 800px; }
.legal .section-title { text-align: left; }
.legal h3 { margin: 30px 0 8px; font-size: 19px; }
.legal p { color: var(--text-soft); line-height: 1.75; margin: 8px 0; }
.legal p a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.legal p a.btn { color: #fff; text-decoration: none; }
.legal-updated { font-size: 13px; opacity: .8; }

/* Pages d'atterrissage SEO (conversions populaires) */
.landing { max-width: 880px; text-align: center; }
.landing-intro { color: var(--text-soft); line-height: 1.75; max-width: 660px; margin: 12px auto 26px; }
.landing-note { font-size: 13.5px; color: var(--text-soft); margin-top: 10px; }
.landing h3 { margin: 44px 0 16px; font-size: 21px; }
.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.landing-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}
.landing-step b { display: block; color: var(--text); margin-bottom: 6px; }
.landing .faq-list { text-align: left; max-width: 720px; margin: 0 auto; }
.landing-related { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.landing-related a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.landing-related a:hover { color: var(--primary); border-color: var(--primary); }
@media (max-width: 720px) { .landing-steps { grid-template-columns: 1fr; } }

/* Bloc « Conversions populaires » du pied de page */
.footer-popular { padding-top: 6px; padding-bottom: 22px; }
.footer-popular h4 { margin-bottom: 10px; }
.footer-popular-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-popular-links a {
  font-size: 13px;
  color: var(--text-soft);
  text-decoration: none;
  transition: color .15s;
}
.footer-popular-links a:hover { color: var(--primary); }

/* Menu déroulant « Convertir » */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-drop-toggle { display: inline-flex; align-items: center; gap: 5px; }
.nav-caret { font-size: 11px; display: inline-block; transition: transform .2s; }
.nav-item:hover .nav-caret { transform: rotate(180deg); }
/* bandeau pleine largeur sous l'en-tête, façon Convertio */
.nav-dropdown {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg-card-2, var(--bg-card));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(20, 20, 70, .16);
  padding: 20px max(24px, calc((100vw - 1140px) / 2)) 22px;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 6px 12px;
  z-index: 90;
  animation: menu-in .22s ease;
}
[data-theme="dark"] .nav-dropdown { box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
/* pont invisible pour garder le survol entre le lien et le bandeau */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: grid; }
/* le lien Convertir reste allumé tant que le bandeau est ouvert */
.nav-item:hover .nav-drop-toggle,
.nav-item:focus-within .nav-drop-toggle {
  color: var(--primary);
  background: var(--bg-input);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s, transform .15s;
}
.nav-dropdown a:hover {
  background: color-mix(in srgb, var(--tool-tint, var(--primary)) 10%, transparent);
  color: var(--tool-tint, var(--primary));
  transform: translateY(-2px);
}
/* icône sur pastille teintée */
.nav-dropdown a .icon {
  width: 22px;
  height: 22px;
  padding: 9px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--tool-tint, var(--primary)) 13%, transparent);
  flex-shrink: 0;
}
.nav-dropdown-sep {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--border);
  margin: 8px 0 4px;
}
/* « Tous les types de fichiers » centré sur toute la largeur */
.nav-dropdown a:last-child {
  grid-column: 1 / -1;
  justify-content: center;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }

[data-theme="dark"] .theme-icon-light { display: none; }
:root:not([data-theme="dark"]) .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* ===== Hero ===== */
.hero { position: relative; padding: 72px 0 56px; text-align: center; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: -40% -20% auto;
  height: 140%;
  pointer-events: none;
}
/* nappes « aurora » qui dérivent lentement */
.hero-bg::before, .hero-bg::after {
  content: '';
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 760px;
  max-height: 760px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.hero-bg::before {
  left: 4%;
  top: 6%;
  background: radial-gradient(circle at 30% 30%, rgba(109, 94, 252, .55), transparent 65%);
  animation: aurora-a 16s ease-in-out infinite alternate;
}
.hero-bg::after {
  right: 2%;
  top: 0;
  background: radial-gradient(circle at 60% 40%, rgba(0, 212, 255, .38), transparent 65%);
  animation: aurora-b 21s ease-in-out infinite alternate;
}
@keyframes aurora-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(9%, 14%) scale(1.15); }
}
@keyframes aurora-b {
  from { transform: translate(0, 0) scale(1.1); }
  to { transform: translate(-12%, 10%) scale(.95); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg::before, .hero-bg::after { animation: none; }
}
.hero .container { position: relative; }
.hero-title { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -1px; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle { margin: 14px auto 22px; font-size: 18px; color: var(--text-soft); max-width: 640px; }

.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.trust-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ===== Dropzone ===== */
.dropzone {
  position: relative;
  background: var(--bg-card);
  border: 2.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 28px;
  max-width: 760px;
  margin: 0 auto;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.dropzone:hover { border-color: var(--primary); }
.dropzone.dragover {
  border-color: var(--primary);
  transform: scale(1.015);
  box-shadow: 0 16px 50px rgba(109, 94, 252, .3);
  background: color-mix(in srgb, var(--bg-card) 92%, var(--primary));
}
.dropzone-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--primary);
}
.dropzone-icon .icon { width: 40px; height: 40px; }
/* anneau conique qui tourne lentement derrière l'icône */
.dropzone-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from 0deg, var(--primary), var(--accent), var(--primary-2), var(--primary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-spin 9s linear infinite;
  opacity: .85;
}
.dropzone-icon::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dropzone-icon::before { animation: none; } }

/* Badge du convertisseur sélectionné */
.dz-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  animation: slideIn .25s ease;
}
.dropzone h2 { font-size: 24px; font-weight: 700; }
.dropzone-inner > p { color: var(--text-soft); margin: 6px 0; }
.dropzone-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 14px 0 18px; }
.dropzone-hint { font-size: 13.5px; color: var(--text-soft); }

/* ===== Convertisseurs par type ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 980px;
  margin: 34px auto 0;
}
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  text-align: center;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 34px rgba(109, 94, 252, .22);
}
.tool-card.active {
  border-color: var(--primary);
  border-width: 2px;
  background: color-mix(in srgb, var(--bg-card) 90%, var(--primary));
  box-shadow: 0 12px 34px rgba(109, 94, 252, .28);
}
.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  background: color-mix(in srgb, var(--tool-tint, var(--primary)) 13%, transparent);
  color: var(--tool-tint, var(--primary));
}
.tool-icon .icon { width: 26px; height: 26px; }
.tool-name { font-weight: 700; font-size: 14.5px; }
.tool-formats { font-size: 12px; color: var(--text-soft); }

/* teinte propre à chaque convertisseur */
[data-tool="audio"] { --tool-tint: var(--tint-audio); }
[data-tool="video"] { --tool-tint: var(--tint-video); }
[data-tool="image"] { --tool-tint: var(--tint-image); }
[data-tool="document"] { --tool-tint: var(--tint-document); }
[data-tool="archive"] { --tool-tint: var(--tint-archive); }
[data-tool="presentation"] { --tool-tint: var(--tint-presentation); }
[data-tool="font"] { --tool-tint: var(--tint-font); }
[data-tool="ebook"] { --tool-tint: var(--tint-ebook); }

/* icônes teintées dans le menu déroulant */
.nav-dropdown a .icon { color: var(--tool-tint, var(--primary)); }

/* ===== Panneau de conversion (remplace l'encart de dépôt) ===== */
.files-section {
  max-width: 860px;
  margin: 0 auto;
  text-align: left;
  background: var(--bg-card);
  border: 2.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 14px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
  animation: slideIn .3s ease;
}
.files-section.dragover {
  border-color: var(--primary);
  box-shadow: 0 16px 50px rgba(109, 94, 252, .3);
}
.files-drop-hint {
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  padding: 12px 0 4px;
}
.files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.files-header h3 { font-size: 20px; }
.files-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.file-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.file-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.file-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb.thumb-icon { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.file-thumb.thumb-icon .icon { width: 26px; height: 26px; }
.file-thumb.zoomable { cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.file-thumb.zoomable:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(109, 94, 252, .35); }
.file-info { min-width: 0; }
.file-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.file-meta { font-size: 13px; color: var(--text-soft); display: flex; gap: 10px; flex-wrap: wrap; }
.file-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.file-arrow { color: var(--text-soft); font-weight: 700; }

.format-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 30px 9px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  max-width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d5efc' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.format-select:hover { border-color: var(--primary); }
.format-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, .18);
  outline: none;
}

/* Curseurs de réglage */
input[type="range"] {
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--primary);
  box-shadow: 0 2px 8px rgba(109, 94, 252, .4);
  transition: transform .12s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* Apparition douce des sections au défilement */
.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
}
.revealed {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s ease;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-pending { opacity: 1; transform: none; }
}

.file-progress {
  grid-column: 1 / -1;
  height: 7px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
  display: none;
}
.file-item.converting .file-progress { display: block; }
.file-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 99px;
  transition: width .25s ease;
  position: relative;
  overflow: hidden;
}
/* reflet qui balaie la barre pendant la conversion */
.file-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) { .file-progress-bar::after { animation: none; } }
.file-status { font-size: 13px; font-weight: 700; }
.file-status.done { color: var(--success); }
.file-status.error { color: var(--danger); }

/* ===== Statistiques ===== */
.stats {
  background: var(--grad);
  color: #fff;
  padding: 44px 0;
  margin-top: 30px;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat-value { font-size: 38px; font-weight: 800; }
.stat-label { opacity: .9; font-size: 14.5px; font-weight: 600; }

/* ===== Sections génériques ===== */
.section-title { text-align: center; font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--text-soft); margin-bottom: 40px; font-size: 17px; }

/* ===== Fonctionnalités ===== */
.features { padding: 76px 24px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-icon .icon { width: 30px; height: 30px; color: var(--primary); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.feature-icon { font-size: 34px; margin-bottom: 12px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feature-card p { color: var(--text-soft); font-size: 14.5px; }
.tag-premium {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  background: var(--grad);
  color: #fff;
  padding: 2.5px 8px;
  border-radius: 999px;
}

/* ===== Comment ça marche ===== */
.how { padding: 30px 24px 76px; }
.how-grid { display: flex; align-items: stretch; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 36px; }
.how-step {
  flex: 1;
  min-width: 220px;
  max-width: 320px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 22px;
  box-shadow: var(--shadow-sm);
}
.how-num {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-step p { color: var(--text-soft); font-size: 14.5px; }
.how-arrow { align-self: center; font-size: 26px; color: var(--primary); font-weight: 800; }

/* ===== Formats ===== */
.formats { padding: 20px 24px 76px; }
.format-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 28px 0 22px; }
.format-tab {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all .2s;
  font-family: inherit;
}
.format-tab:hover { border-color: var(--primary); }
.format-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.format-panel { display: none; text-align: center; }
.format-panel.active { display: block; animation: slideIn .25s ease; }
.chip {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  margin: 5px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

/* ===== Tarifs ===== */
.pricing { padding: 20px 24px 80px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.pricing-grid-single { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.price-card h3 { font-size: 20px; }
.price-card-featured {
  border: 2.5px solid var(--primary);
  transform: scale(1.04);
  box-shadow: 0 16px 50px rgba(109, 94, 252, .25);
}
.price-card-featured:hover { transform: scale(1.04) translateY(-6px); }
.price-ribbon {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.price { margin: 14px 0 20px; }
.price-amount { font-size: 42px; font-weight: 800; }
.price-period { color: var(--text-soft); font-weight: 600; }
.price-features { list-style: none; margin-bottom: 26px; flex: 1; }
.price-features li { padding: 7px 0; font-size: 14.5px; border-bottom: 1px dashed var(--border); }
.price-features li:last-child { border-bottom: none; }

/* ===== Témoignages ===== */
.testimonials { padding: 10px 24px 80px; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.testimonial-stars { color: var(--warning); letter-spacing: 3px; margin-bottom: 10px; }
.testimonial p { font-size: 15px; font-style: italic; }
.testimonial-author { margin-top: 14px; font-weight: 700; font-size: 13.5px; color: var(--text-soft); }

/* ===== FAQ ===== */
.faq { padding: 10px 24px 80px; max-width: 820px; }
.faq-list { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 22px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--primary);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { color: var(--text-soft); padding-bottom: 18px; font-size: 15px; }

/* ===== CTA ===== */
.cta {
  background: var(--grad);
  color: #fff;
  text-align: center;
  padding: 68px 24px;
}
.cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.cta p { opacity: .92; margin: 10px 0 26px; font-size: 17px; }

/* ===== Footer ===== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 54px 0 0;
  position: relative;
}
/* liseré dégradé en haut du pied de page */
.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  opacity: .55;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
}
.footer h4 { margin-bottom: 12px; font-size: 15px; }
.footer a:not(.logo) {
  display: block;
  color: var(--text-soft);
  text-decoration: none;
  padding: 4px 0;
  font-size: 14.5px;
  transition: color .2s;
}
.footer a:not(.logo):hover { color: var(--primary); }
.footer-tagline { color: var(--text-soft); font-size: 14px; margin-top: 10px; max-width: 260px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  color: var(--text-soft);
  font-size: 13.5px;
}

/* ===== Modales ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, .55);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  animation: modalIn .25s ease;
  border: 1px solid var(--border);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Aperçu en direct dans la modale d'options */
.opt-preview { text-align: center; margin-bottom: 20px; }
.opt-preview canvas {
  max-width: 100%;
  max-height: 250px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: grab;
  /* damier pour visualiser la transparence */
  background: repeating-conic-gradient(rgba(128, 128, 128, .16) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
}
.opt-preview canvas:active { cursor: grabbing; }
.opt-preview-hint { font-size: 12px; color: var(--text-soft); margin-top: 8px; }

/* Lightbox d'aperçu d'image */
.modal-preview { max-width: 800px; }
.preview-body { text-align: center; }
#previewImg {
  max-width: 100%;
  max-height: 65vh;
  border-radius: 12px;
  background: repeating-conic-gradient(rgba(128, 128, 128, .16) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
}

.opt-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  cursor: pointer;
  user-select: none;
}
.opt-check input { accent-color: var(--primary); width: 17px; height: 17px; flex-shrink: 0; }
.opt-note { font-size: 12px; color: var(--text-soft); margin-top: -6px; margin-bottom: 4px; }

.opt-group { margin-bottom: 20px; }
.opt-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.opt-group .opt-value { color: var(--primary); font-weight: 800; }
.opt-group input[type="range"] { width: 100%; accent-color: var(--primary); }
.opt-group input[type="number"], .opt-group input[type="color"], .opt-group select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.opt-group input[type="color"] { height: 44px; padding: 4px; cursor: pointer; }
.opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-pill {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: all .15s;
}
.opt-pill.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ===== Historique ===== */
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.history-item:last-child { border-bottom: none; }
.history-conv { font-weight: 700; }
.history-date { color: var(--text-soft); font-size: 12.5px; white-space: nowrap; }
.history-empty { text-align: center; color: var(--text-soft); padding: 26px 0; }

/* ===== Voile de dépôt plein écran ===== */
#dropOverlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: color-mix(in srgb, var(--primary) 22%, rgba(10, 10, 30, .6));
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#dropOverlay[hidden] { display: none; }
.drop-overlay-inner {
  background: var(--bg-card);
  border: 3px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 44px 64px;
  font-size: 26px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

/* ===== Pied du panneau de conversion ===== */
.files-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.files-footer .files-drop-hint { padding: 10px 0 4px; }
.auto-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  padding: 8px 0 4px;
  user-select: none;
}
.auto-dl input { accent-color: var(--primary); width: 16px; height: 16px; }

/* Statut cliquable (aperçu du résultat) */
.file-status.previewable { cursor: pointer; text-decoration: underline dotted; }
.file-status.previewable:hover { color: var(--primary); }

/* Historique : colonne droite avec bouton Refaire */
.history-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ===== Accessibilité : focus visible au clavier ===== */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Transitions de pages (application) ===== */
@view-transition { navigation: auto; }

/* ===== Pastilles de formats flottantes autour de l'encart ===== */
.dz-float {
  position: absolute;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--chip-tint, var(--primary));
  background: color-mix(in srgb, var(--chip-tint, var(--primary)) 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--chip-tint, var(--primary)) 35%, transparent);
  pointer-events: none;
  animation: dz-bob var(--bob-d, 5s) ease-in-out var(--bob-delay, 0s) infinite alternate;
}
@keyframes dz-bob {
  from { transform: translateY(-7px) rotate(-2deg); }
  to { transform: translateY(7px) rotate(2deg); }
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .dz-float { display: none; }
}

/* ===== Bordure dégradée animée au survol des cartes ===== */
@property --gb-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.tool-card, .feature-card { position: relative; }
.tool-card::before, .feature-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--gb-angle), var(--primary), var(--accent), var(--primary-2), var(--primary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.tool-card:hover::before, .feature-card:hover::before {
  opacity: 1;
  animation: gb-spin 3.5s linear infinite;
}
@keyframes gb-spin { to { --gb-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .tool-card:hover::before, .feature-card:hover::before { animation: none; }
}

/* ===== Anneau de chargement du moteur (vignette du fichier) ===== */
.file-thumb.engine-loading::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  padding: 2.5px;
  background: conic-gradient(var(--primary) 0 25%, transparent 25% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-spin 1s linear infinite;
}
.file-thumb { position: relative; }

/* ===== Pastille d'extension colorée ===== */
.ext-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  font-family: var(--font-display);
  color: var(--chip-tint, var(--primary));
  background: color-mix(in srgb, var(--chip-tint, var(--primary)) 14%, transparent);
}

/* ===== Sortie animée des lignes de fichiers ===== */
.file-item.leaving {
  opacity: 0;
  transform: translateX(24px) scale(.97);
  transition: opacity .22s ease, transform .22s ease;
}

/* ===== Palette de commandes (Ctrl+K) ===== */
.cmdk {
  background: var(--bg-card-2, var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: modalIn .2s ease;
  align-self: flex-start;
  margin-top: 12vh;
}
.cmdk input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 18px 22px;
  font-size: 17px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  border-bottom: 1px solid var(--border);
}
.cmdk ul {
  list-style: none;
  max-height: 330px;
  overflow-y: auto;
  padding: 8px;
}
.cmdk li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
}
.cmdk li .icon { color: var(--chip-tint, var(--primary)); }
.cmdk li.selected, .cmdk li:hover { background: var(--bg-input); }
.cmdk li .cmdk-kbd {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-soft);
}
.cmdk-empty { text-align: center; color: var(--text-soft); padding: 22px; font-size: 14px; }

/* ===== Sélecteur de langue ===== */
.lang-switch {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 26px 7px 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d5efc' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 13px;
}
.lang-switch:hover { border-color: var(--primary); }

/* ===== Droite-à-gauche (arabe) ===== */
[dir="rtl"] .nav-dropdown { left: 0; right: 0; }
[dir="rtl"] .file-controls { justify-content: flex-start; }
[dir="rtl"] .toast-container { right: auto; left: 22px; }
[dir="rtl"] .lang-switch {
  padding: 7px 9px 7px 26px;
  background-position: left 7px center;
}
[dir="rtl"] .format-select {
  padding: 9px 12px 9px 30px;
  background-position: left 9px center;
}

/* ===== Toasts ===== */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  max-width: 340px;
  animation: toastIn .3s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.out { animation: toastOut .3s ease forwards; }

/* toasts raffinés : icône, barre de vie, bouton d'action */
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  padding-bottom: 16px;
}
.toast > .icon { flex-shrink: 0; color: var(--primary); }
.toast.success > .icon { color: var(--success); }
.toast.error > .icon { color: var(--danger); }
.toast::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--primary);
  transform-origin: left;
  animation: toast-life var(--life, 3800ms) linear forwards;
}
.toast.success::after { background: var(--success); }
.toast.error::after { background: var(--danger); }
@keyframes toast-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-action {
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s;
}
.toast-action:hover { border-color: var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .features-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .price-card-featured { transform: none; }
  .price-card-featured:hover { transform: translateY(-6px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .how-arrow { display: none; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

/* le menu se replie en burger dès qu'il manque de place */
@media (max-width: 1080px) {
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav.open { display: flex; animation: menu-in .22s ease; }
  .nav-burger { display: inline-flex; }
  .nav > a, .nav-drop-toggle { padding: 13px 14px; border-radius: 12px; }
  /* la liste des convertisseurs est affichée directement dans le menu replié */
  .nav-dropdown {
    position: static;
    display: block;
    width: auto;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 4px 0 6px 8px;
    animation: none;
    background: transparent;
  }
  .nav-dropdown::before, .nav-dropdown::after { display: none; }
  .nav-dropdown a { padding: 11px 12px; }
  .nav-dropdown a:last-child { justify-content: flex-start; }
  .nav-caret { display: none; }
}

@media (max-width: 720px) {
  .header-actions .btn { display: none; }
  .features-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .file-item { grid-template-columns: 48px 1fr; }
  .file-controls { grid-column: 1 / -1; justify-content: flex-start; }
  /* cibles tactiles ≥ 44 px sur mobile */
  .file-item .btn-icon {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* héros compact : l'encart de dépôt remonte */
  .hero { padding: 24px 0 32px; }
  .hero-subtitle { font-size: 15px; margin: 8px auto 14px; }
  .trust-badges { margin-bottom: 20px; gap: 6px; }
  .trust-badge { font-size: 12px; padding: 5px 10px; }
  .dropzone { padding: 28px 16px; }
  .dropzone-icon { font-size: 40px; margin-bottom: 4px; }
  .dropzone h2 { font-size: 20px; }
}


/* =====================================================
   Expérience convertisseur : états de carte + mobile
   ===================================================== */

/* états visuels des cartes fichier */
.file-item.converting {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}
.file-item.done {
  border-color: color-mix(in srgb, #22c55e 45%, transparent);
  background: color-mix(in srgb, #22c55e 4%, var(--bg-card));
  animation: carte-ok .45s ease;
}
.file-item.error {
  border-color: color-mix(in srgb, #e5484d 55%, transparent);
  background: color-mix(in srgb, #e5484d 4%, var(--bg-card));
}
@keyframes carte-ok {
  0% { transform: scale(1); }
  35% { transform: scale(1.015); }
  100% { transform: none; }
}

/* la croix de suppression prévient en rouge doux */
.file-controls .btn-icon:last-child:hover {
  color: #e5484d;
  background: color-mix(in srgb, #e5484d 12%, transparent);
}

/* astuces clavier et conseils de glisser-déposer : inutiles au tactile */
@media (hover: none), (max-width: 720px) {
  .tip-desktop { display: none; }
  .files-drop-hint { display: none; }
}

/* ----- mobile : convertisseur confortable ----- */
@media (max-width: 720px) {
  /* logo sur une seule ligne */
  .logo { font-size: 18px; gap: 6px; }
  .logo-text { white-space: nowrap; }
  .header-inner { gap: 8px; }

  /* cibles tactiles de l'en-tête (44 px mini) */
  .header-actions { gap: 4px; }
  .header-actions .btn-icon, .nav-burger {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* barre d'actions des fichiers : grille pleine largeur */
  .files-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .files-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  #globalFormat { grid-column: 1 / -1; min-height: 46px; font-size: 15px; }
  #addMoreBtn, #clearAllBtn { min-height: 44px; justify-content: center; }
  #convertAllBtn, #downloadAllBtn {
    grid-column: 1 / -1;
    min-height: 50px;
    font-size: 16px;
    justify-content: center;
  }

  /* carte fichier : sélecteur pleine largeur, une rangée d'actions nette */
  .file-controls { gap: 8px; }
  .file-controls .format-select {
    flex: 1 1 calc(100% - 42px);
    min-height: 46px;
    font-size: 15px;
  }
  .file-controls .btn {
    flex: 1 1 auto;
    min-height: 46px;
    justify-content: center;
    font-size: 15px;
  }

  /* case téléchargement auto bien alignée */
  .auto-dl { align-items: center; }
}
/* mobile : la croix de suppression en coin de carte, rangée d'actions compacte */
@media (max-width: 720px) {
  .file-item { position: relative; }
  .file-controls .btn-icon:last-child {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 40px;
    min-height: 40px;
    color: var(--text-soft);
  }
  .file-controls .btn { flex: 1 1 130px; }
}
@media (max-width: 720px) {
  #globalFormat { width: 100%; }
}
/* menu replié (burger) : le déroulant s'empile sous « Convertir », sans troncature */
@media (max-width: 1080px) {
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-dropdown { position: static; box-shadow: none; }
  .nav-dropdown a {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-height: 44px;
  }
  .nav-dropdown a:last-child { justify-content: flex-start; }
}
/* =====================================================
   Bandeau de consentement cookies
   ===================================================== */
.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(20, 20, 70, .25);
  animation: menu-in .25s ease;
}
[data-theme="dark"] .consent-banner { box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.consent-banner p {
  flex: 1 1 280px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
}
.consent-banner p a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-actions .btn { min-height: 42px; }
@media (max-width: 720px) {
  .consent-banner { left: 10px; right: 10px; bottom: 10px; }
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1; justify-content: center; }
}
/* mur de consentement : fond bloquant + panneau central */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 15, 26, .55);
  backdrop-filter: blur(6px);
  animation: menu-in .25s ease;
}
.consent-modal {
  position: static;
  flex-direction: column;
  align-items: stretch;
  max-width: 480px;
  width: 100%;
  padding: 24px 22px 20px;
}
.consent-modal h3 { margin: 0 0 4px; font-size: 19px; }
.consent-modal .consent-actions { justify-content: flex-end; margin-top: 6px; }
.consent-details {
  background: var(--bg-input);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px !important;
}
@media (max-width: 720px) {
  .consent-overlay { padding: 12px; }
  .consent-modal .consent-actions .btn { flex: 1; }
}
/* le paragraphe du panneau ne doit pas s'étirer en colonne */
.consent-modal p { flex: 0 0 auto; }