/* =====================================================
   CV MAKER PRO — MAIN STYLES
   ===================================================== */

:root {
  /* Brand Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent: #06b6d4;

  /* Neutrals */
  --bg-base: #0a0a0f;
  --bg-surface: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);

  /* Text */
  --text-primary: #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted: #606080;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Sizing */
  --header-height: 64px;
  --progress-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-med: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================
   HEADER
   ===================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-pro {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.header-nav::-webkit-scrollbar {
  height: 4px;
}

.header-nav::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.header-nav::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

/* ── Liens de navigation ── */
.nav-link {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-med);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-link.active:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* ── Sélecteur de langue ── */
.lang-selector-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 28px 6px 12px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-med);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0c0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.lang-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 6px;
}

/* ── Boutons du header ── */
.btn-header-ghost,
.btn-header-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-med);
  border: 1px solid transparent;
  flex-shrink: 0;
}

.btn-header-ghost {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-header-ghost:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.btn-header-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-header-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.progress-bar-wrapper {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  height: var(--progress-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.step-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-med);
}

.progress-step span {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-med);
}

.progress-step.active .step-bubble {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.progress-step.active span {
  color: var(--primary-light);
}

.progress-step.completed .step-bubble {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.progress-step.completed span {
  color: var(--success);
}

.progress-line {
  width: 60px;
  height: 2px;
  background: var(--border-color);
  margin: 0 4px;
  margin-bottom: 20px;
  transition: background var(--transition-med);
}

.progress-line.completed {
  background: var(--success);
}

/* =====================================================
   MAIN LAYOUT
   ===================================================== */
.app-main {
  margin-top: calc(var(--header-height) + var(--progress-height));
  min-height: calc(100vh - var(--header-height) - var(--progress-height));
  padding: 2.5rem 2rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   STEP HEADERS
   ===================================================== */
.step-header {
  margin-bottom: 2rem;
}

.step-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.step-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-next,
.btn-finish {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-med);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-next:hover:not(:disabled),
.btn-finish:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-prev {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-med);
}

.btn-prev:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.btn-add-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-med);
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

.btn-add-item:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--primary);
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-med);
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp var(--transition-slow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  display: flex;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.modal-body {
  flex: 1;
  padding: 1.5rem;
  overflow: auto;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.crop-container {
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.crop-container img {
  max-width: 100%;
  display: block;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-med);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition-med);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

/* =====================================================
   LOADING OVERLAY
   ===================================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .progress-step span {
    display: none;
  }

  .progress-line {
    width: 30px;
  }

  .app-main {
    padding: 1.5rem 1rem;
  }

  .header-inner {
    padding: 0 1rem;
  }

  .header-nav {
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .btn-header-ghost,
  .btn-header-primary {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .lang-select {
    font-size: 0.7rem;
    padding: 4px 22px 4px 8px;
    background-position: right 6px center;
  }

  .logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .header-nav {
    gap: 2px;
  }

  .nav-link {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  .btn-header-ghost,
  .btn-header-primary {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  .lang-select {
    font-size: 0.65rem;
    padding: 4px 18px 4px 6px;
  }
}

/* =====================================================
   SECTION À PROPOS & CONTACT (thème sombre)
   ===================================================== */
.page-section {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.about-container h1,
.contact-container h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-primary);
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-med);
}

.feature:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-med);
}

.contact-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.contact-icon {
  font-size: 1.8rem;
}

.contact-item a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-med);
}

.contact-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.contact-note {
  text-align: center;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}