/* Project ATLAS - Site #11: Compresseur d'Image (French) */
:root {
  --bg-primary: #0a0f1d;
  --bg-surface: #111827;
  --bg-card: #1f293d;
  --border-subtle: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-cyan-hover: #0891b2;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent-cyan);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover {
  color: var(--accent-cyan);
}

/* Tool Section */
.tool-section {
  padding: 3rem 0;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Dropzone Area */
.dropzone {
  border: 2px dashed #475569;
  border-radius: 1.25rem;
  padding: 3rem 2rem;
  text-align: center;
  background: #090e1a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.04);
}

.dropzone-icon {
  width: 4rem;
  height: 4rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

/* Compression Controls */
.compression-controls {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .compression-controls {
    grid-template-columns: 1fr;
  }
}

.control-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.slider-input {
  width: 100%;
  accent-color: var(--accent-cyan);
  height: 6px;
  background: #090e1a;
  border-radius: 4px;
}

.format-select {
  background: #090e1a;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
}

/* Preview / Results Grid */
.results-container {
  margin-top: 2rem;
  display: none;
}

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

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

.preview-box {
  background: #090e1a;
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.preview-img-wrap {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.stats-badge {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
}

.saved-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-block;
  margin-top: 0.5rem;
}

/* Actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-download {
  background: var(--accent-cyan);
  color: #032030;
  width: 100%;
}

.btn-download:hover {
  background: #22d3ee;
}

/* Editorial Section */
.content-section {
  padding: 4rem 0;
}

.editorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
}

.editorial-card h2 {
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.editorial-card h3 {
  font-size: 1.3rem;
  color: var(--accent-cyan);
  margin: 1.75rem 0 0.75rem;
}

.editorial-card p, .editorial-card li {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.editorial-card ul, .editorial-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.feature-box h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 0;
  margin-top: auto;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}
