.cv-container {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 80px auto 0 auto;
  min-height: calc(100vh - 80px);
}

.cv-header {
  text-align: center;
  margin-bottom: 5rem;
  background: #ffffff;
  padding: 4rem 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  position: relative;
}

.cv-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #242222, #242222);
  border-radius: 16px 16px 0 0;
}

.cv-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.cv-header-text {
  flex: 1;
  text-align: left;
}

.cv-header-profile {
  flex-shrink: 0;
}

.cv-header-profile img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #242222;
  box-shadow: 0 8px 25px rgba(36, 34, 34, 0.3);
  transition: all 0.3s ease;
}

.cv-header-profile img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(36, 34, 34, 0.4);
}

.cv-header h1 {
  font-size: 2.5rem;
  color: #242222;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.cv-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: #64748b;
  margin: 0 0 1rem 0;
}

.cv-description {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cv-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.download-btn,
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-btn {
  background: #242222;
  color: white;
}

.download-btn:hover {
  background: #1a1818;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(36, 34, 34, 0.4);
}

.view-btn {
  background: transparent;
  color: #242222;
  border: 2px solid #242222;
}

.view-btn:hover {
  background: #242222;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(36, 34, 34, 0.3);
}

/* Layout principal en desktop */
.cv-main-layout {
  display: grid;
  grid-template-columns: 800px 350px;
  gap: 2rem;
  align-items: start;
  justify-content: center;
}

.cv-preview-container {
  background: #ffffff;
  margin-left: 20px;
  margin-right: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  height: calc(100vh - 200px);
  min-height: 700px;
  position: relative;
}

.cv-preview {
  width: 100%;
  height: 100%;
  position: relative;
}

.pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #242222;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.pdf-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
}

.error-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error-content i {
  font-size: 3rem;
  color: #ef4444;
  margin-bottom: 1rem;
}

.error-content h3 {
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.error-content p {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.cv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 100px;
  margin-right: 20px;
}

.info-card,
.navigation-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.info-card:hover,
.navigation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.info-card h3,
.navigation-card h3 {
  color: #242222;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 0.9rem;
}

.info-card li:last-child {
  border-bottom: none;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-button {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  color: #475569;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-button:hover {
  background: #242222;
  color: white;
  transform: translateX(4px);
}

.nav-button i {
  font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 1400px) {
  .cv-main-layout {
    grid-template-columns: 700px 320px;
    gap: 1.5rem;
  }
}

@media (max-width: 1200px) {
  .cv-main-layout {
    grid-template-columns: 600px 300px;
    gap: 1.5rem;
  }

  .cv-preview-container {
    height: calc(100vh - 220px);
    min-height: 600px;
  }
}

@media (max-width: 1000px) {
  .cv-main-layout {
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .cv-main-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cv-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-right: 0;
  }

  .cv-preview-container {
    height: 70vh;
    min-height: 500px;
  }
}

@media (max-width: 1024px) {
  .cv-container {
    padding: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  .cv-container {
    padding: 2rem 1rem;
  }

  .cv-header {
    padding: 2rem 1rem;
  }

  .cv-header-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .cv-header-text {
    text-align: center;
  }

  .cv-header-profile img {
    width: 120px;
    height: 120px;
  }

  .cv-header h1 {
    font-size: 2rem;
  }

  .cv-actions {
    flex-direction: column;
    align-items: center;
  }

  .download-btn,
  .view-btn {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }

  .cv-preview-container {
    height: 60vh;
    min-height: 400px;
  }

  .cv-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cv-container {
    padding: 1rem;
  }

  .cv-header h1 {
    font-size: 1.75rem;
  }

  .cv-subtitle {
    font-size: 1.1rem;
  }

  .cv-description {
    font-size: 1rem;
  }

  .cv-header-profile img {
    width: 100px;
    height: 100px;
  }

  .info-card,
  .navigation-card {
    padding: 1.5rem;
  }
}

/* ==========================================
   FORCER LE PDF EN MODE CLAIR
   ========================================== */

/* Forcer le PDF à rester en mode clair même en dark mode */
.cv-preview embed,
.cv-preview iframe,
.cv-preview object {
  background: #ffffff !important;
  color-scheme: light !important;
  filter: none !important;
}

/* Éviter que le navigateur force le dark mode sur le PDF */
[data-theme="dark"] .cv-preview embed,
[data-theme="dark"] .cv-preview iframe,
[data-theme="dark"] .cv-preview object {
  background: #ffffff !important;
  color-scheme: light !important;
  filter: none !important;
  /* Annuler tous les effets dark mode pour le PDF */
  -webkit-filter: none !important;
  -moz-filter: none !important;
  -ms-filter: none !important;
}

/* Forcer le conteneur du PDF en mode clair */
.cv-preview {
  background: #ffffff !important;
  color-scheme: light !important;
}

[data-theme="dark"] .cv-preview {
  background: #ffffff !important;
  color-scheme: light !important;
  /* Créer une zone de lumière autour du PDF */
  box-shadow: 0 0 0 8px #ffffff, 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Styles spécifiques mobile pour éviter le dark mode forcé */
@media (max-width: 768px) {
  .cv-preview,
  .cv-preview embed,
  .cv-preview iframe,
  .cv-preview object {
    background: #ffffff !important;
    color-scheme: light !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  /* Éviter l'inversion automatique sur iOS/Android */
  .cv-preview embed,
  .cv-preview iframe,
  .cv-preview object {
    -webkit-appearance: none !important;
    appearance: none !important;
  }
}

/* Dark mode */
[data-theme="dark"] .cv-header,
[data-theme="dark"] .cv-preview-container,
[data-theme="dark"] .info-card,
[data-theme="dark"] .navigation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px var(--shadow-light);
}
[data-theme="dark"] .cv-header h1,
[data-theme="dark"] .info-card h3,
[data-theme="dark"] .navigation-card h3 {
  color: var(--text-primary);
}
[data-theme="dark"] .cv-header p,
[data-theme="dark"] .info-card p,
[data-theme="dark"] .info-card li,
[data-theme="dark"] .navigation-card li {
  color: var(--text-secondary);
}
[data-theme="dark"] .cv-header::before {
  background: linear-gradient(90deg, #ffffff, #ffffff);
}

/* Dark mode pour la photo de profil CV */
[data-theme="dark"] .cv-header-profile img {
  border: 6px solid #ffffff;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .cv-header-profile img:hover {
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .download-btn,
[data-theme="dark"] .view-btn,
[data-theme="dark"] .nav-button {
  background: var(--accent-color);
  color: #fff;
  border: none;
}
[data-theme="dark"] .download-btn:hover,
[data-theme="dark"] .view-btn:hover,
[data-theme="dark"] .nav-button:hover {
  background: var(--button-hover);
  color: #fff;
}
[data-theme="dark"] .cv-preview {
  background: var(--bg-card);
}
[data-theme="dark"] .pdf-loading,
[data-theme="dark"] .pdf-error,
[data-theme="dark"] .error-content {
  background: var(--bg-card);
  color: var(--text-primary);
}
[data-theme="dark"] .error-content h3 {
  color: var(--text-primary);
}
[data-theme="dark"] .error-content p {
  color: var(--text-secondary);
}
[data-theme="dark"] .loading-spinner {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
}
