/* ============================================
   CV.CSS - Ultra-Responsive Version
   Compatible avec le système de thèmes
   ============================================ */

/* ===========================
   CV PAGE - Wrapper
   =========================== */
.cv-page {
  min-height: 100vh;
}

/* ===========================
   CV HERO SECTION
   =========================== */
.cv-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.cv-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.cv-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);

}

.cv-hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0;
  width: 100%;
}

/* ===========================
   CV PROFILE SECTION - Responsive Grid
   =========================== */
.cv-profile-section {
  display: grid;
  grid-template-columns: 1,1;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Photo flottante */
.cv-floating-photo {
  position: relative;
  align-items: center;
  justify-content: center;
  margin: auto;
}

.cv-floating-photo-inner {
  position: relative;
  width: clamp(120px, 20vw, 180px);
  height: clamp(120px, 20vw, 180px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
}

.cv-floating-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-floating-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: clamp(30px, 5vw, 40px);
  height: clamp(30px, 5vw, 40px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-md);
  animation: pulse 2s ease-in-out infinite;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Profile Info */
.cv-profile-info {
  color: white;
  min-width: 0; /* Important pour text overflow */
  text-align: center;
  justify-content: center;
}

.cv-name {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-xs);
  color: white;
  line-height: 1.2;
}

.cv-job-title {
  font-size: clamp(1rem, 3vw, 1.75rem);
  font-weight: var(--weight-medium);
  color: var(--diego-accent);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.cv-location {
  font-size: clamp(0.875rem, 2vw, 1rem);
  opacity: 0.9;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
  align-items: center;
  justify-content: center;

}



.cv-social-link {
  width: clamp(40px, 6vw, 50px);
  height: clamp(40px, 6vw, 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast) var(--ease-smooth);
  flex-shrink: 0;
  text-align: center;
}

.cv-social-link:hover {
  transform: translateY(-4px);
}

/* Actions */
.cv-actions {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  min-width: max-content;
  justify-content: center;
}

.cv-actions .btn {
  white-space: nowrap;
  justify-content: center;

}

/* Responsive Hero - Tablet */
@media (max-width: 968px) {
  .cv-hero {
    min-height: 50vh;
  }

  .cv-profile-section {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .cv-floating-photo {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
  }

  .cv-profile-info {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
  }

  .cv-actions {
    grid-row: 2 / 3;
    grid-column: 1 / 3;
    flex-direction: row;
    justify-content: center;
    margin-top: var(--space-md);
  }
}

/* Responsive Hero - Mobile */
@media (max-width: 640px) {
  .cv-hero {
    min-height: auto;
    padding: var(--space-lg) 0;
  }

  .cv-profile-section {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: var(--space-md);
  }

  .cv-floating-photo,
  .cv-profile-info,
  .cv-actions {
    grid-column: 1 / 2;
    grid-row: auto;
  }

  .cv-social-links {
    justify-content: center;
  }

  .cv-actions {
    width: 100%;
    flex-direction: column;
  }

  .cv-actions .btn {
    width: 100%;
  }

  .cv-location {
    justify-content: center;
  }
}

/* ===========================
   CV SKILLS SECTION
   =========================== */
.cv-skills-section {
  padding: clamp(2rem, 6vw, 4rem) 0;
  background: var(--bg-white);
}

.cv-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.cv-skills-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(  --shadow-sm);
  transition: all var(--transition-base) var(--ease-smooth);
}

.cv-skills-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cv-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--ui-border);
  flex-wrap: wrap;
}

.cv-card-icon {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--diego-accent);
  flex-shrink: 0;
}

.cv-card-title {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: var(--weight-semibold);
  color: var(--ui-text);
  margin: 0;
  line-height: 1.3;
}

.cv-card-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Conseils */
.cv-conseil-item {
  padding: var(--space-sm);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--diego-accent);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  line-height: 1.6;
}

/* Langages */
.cv-languages-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cv-language-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast) var(--ease-smooth);
}

.cv-language-item:hover {
  background: var(--diego-accent);
  color: white;
  transform: translateX(4px);
}

.cv-language-emoji {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.cv-language-name {
  font-weight: var(--weight-medium);
  font-size: clamp(0.875rem, 2vw, 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv-language-level {
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  opacity: 0.8;
  white-space: nowrap;
}

/* Formations */
.cv-education-item {
  padding: clamp(0.75rem, 2vw, 1rem);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.cv-education-item:last-child {
  margin-bottom: 0;
}

.cv-education-name {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: var(--weight-semibold);
  color: var(--ui-text);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.cv-education-location {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--ui-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* ===========================
   CV EXPERTISE SECTION
   =========================== */
.cv-expertise-section {
  padding: clamp(2rem, 6vw, 4rem) 0;
  background: var(--bg-light);
}

.cv-section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding: 0 var(--space-md);
}

.cv-section-icon {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--diego-accent);
  margin-bottom: var(--space-md);
}


.cv-section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.cv-expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.cv-expertise-card {
  background: var(--bg-white);
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--radius-lg);
  box-shadow: var(  --shadow-sm);
  transition: all var(--transition-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.cv-expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--diego-accent), var(--diego-accent-soft));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base) var(--ease-smooth);
}

.cv-expertise-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.cv-expertise-card:hover::before {
  transform: scaleX(1);
}

.cv-expertise-title {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: var(--weight-semibold);
  color: var(--ui-text);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.cv-expertise-description {
  color: var(--ui-muted);
  line-height: 1.7;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.cv-expertise-description p {
  margin-bottom: var(--space-sm);
}

.cv-expertise-description ul {
  padding-left: var(--space-lg);
  margin: var(--space-sm) 0;
}

.cv-expertise-description li {
  margin-bottom: var(--space-xs);
}

/* ===========================
   CV TIMELINE SECTION
   =========================== */
.cv-timeline-section {
  padding: clamp(2rem, 6vw, 4rem) 0;
  background: var(--bg-white);
}

.cv-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Desktop Timeline */
@media (min-width: 769px) {
  .cv-timeline-item {
    position: relative;
    margin-bottom: clamp(2rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    gap: clamp(1rem, 3vw, 2rem);
  }

  /* Ligne centrale */
  .cv-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--diego-accent), var(--diego-accent-soft));
    transform: translateX(-50%);
  }

  /* Marqueur central */
  .cv-timeline-marker {
    position: relative;
    width: 50px;
    height: 50px;
    background: var(--diego-accent);
    border: 4px solid var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-base) var(--ease-smooth);
    grid-column: 2;
  }

  .cv-timeline-marker:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
  }

  .marker-number {
    color: white;
    font-weight: var(--weight-bold);
    font-size: 1.1rem;
  }

  /* Items gauche/droite */
  .cv-timeline-left .cv-timeline-content {
    grid-column: 1;
    text-align: right;
  }

  .cv-timeline-right .cv-timeline-content {
    grid-column: 3;
  }
}

/* Mobile & Tablet Timeline */
@media (max-width: 768px) {
  .cv-timeline {
    padding-left: var(--space-xl);
  }

  .cv-timeline::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--diego-accent), var(--diego-accent-soft));
  }

  .cv-timeline-item {
    position: relative;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    padding-left: clamp(1rem, 3vw, 1.5rem);
  }

  .cv-timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    background: var(--diego-accent);
    border: 4px solid var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 2;
  }

  .marker-number {
    color: white;
    font-weight: var(--weight-bold);
    font-size: clamp(0.875rem, 2vw, 1.1rem);
  }

  .cv-timeline-left,
  .cv-timeline-right {
    display: block;
  }
}

/* Timeline Card */
.cv-timeline-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(  --shadow-sm);
  transition: all var(--transition-base) var(--ease-smooth);
}

.cv-timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cv-timeline-with-image {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.5rem);
}

/* Logo entreprise */
.cv-timeline-image {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cv-logo-figure {
  margin: 0;
  display: flex;
  justify-content: center;
}

.cv-logo {
  width: clamp(80px, 15vw, 120px);
  height: clamp(80px, 15vw, 120px);
  object-fit: contain;
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  background: var(--bg-light);
}

.cv-logo-placeholder {
  width: clamp(80px, 15vw, 120px);
  height: clamp(80px, 15vw, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ui-muted);
}

/* Header compact */
.cv-timeline-header-compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cv-timeline-company {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: var(--weight-bold);
  color: var(--ui-text);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.cv-timeline-position {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--diego-accent);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.cv-timeline-period {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--ui-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* Details */
.cv-timeline-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cv-timeline-skills-compact {
  display: flex;
  align-items: start;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--diego-accent);
  flex-wrap: wrap;
}

.cv-skills-label {
  font-weight: var(--weight-semibold);
  color: var(--ui-text);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  flex-shrink: 0;
}

.cv-skills-text {
  color: var(--ui-muted);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  line-height: 1.5;
}

.cv-timeline-description-compact {
  line-height: 1.7;
  color: var(--ui-muted);
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.cv-timeline-description-compact p {
  margin-bottom: var(--space-sm);
}

.cv-timeline-description-compact ul {
  padding-left: var(--space-lg);
  margin: var(--space-sm) 0;
}

.cv-timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.cv-tag {
  padding: 0.25rem 0.75rem;
  background: var(--ui-accent);
  color: var(--ui-text);
  border-radius: var(--radius-sm);
  font-size: clamp(0.75rem, 1.8vw, 0.8rem);
  font-weight: var(--weight-medium);
  border: 1px solid var(--ui-border);
  transition: all var(--transition-fast) var(--ease-smooth);
  white-space: nowrap;
}

.cv-tag:hover {
  background: var(--diego-accent);
  color: white;
  border-color: var(--diego-accent);
}

/* Timeline Empty */
.cv-timeline-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--ui-muted);
}

.cv-timeline-empty i {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

/* Timeline End */
.cv-timeline-end {
  text-align: center;
  padding-top: clamp(2rem, 5vw, 3rem);
}

.cv-timeline-end-marker {
  width: clamp(50px, 8vw, 60px);
  height: clamp(50px, 8vw, 60px);
  margin: 0 auto var(--space-md);
  background: var(--diego-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: var(--shadow-md);
}

.cv-timeline-end-text {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: var(--weight-medium);
  color: var(--ui-muted);
}

/* ===========================
   CV PROJECTS SECTION
   =========================== */
.cv-projects-section {
  padding: clamp(2rem, 6vw, 4rem) 0;
  background: var(--bg-light);
}

.cv-projects-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.cv-project-item {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(  --shadow-sm);
  transition: all var(--transition-base) var(--ease-smooth);
}

.cv-project-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cv-project-title {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: var(--weight-semibold);
  color: var(--ui-text);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  line-height: 1.3;
}

.cv-project-title i {
  color: var(--diego-accent);
  flex-shrink: 0;
}

.cv-project-description {
  line-height: 1.7;
  color: var(--ui-muted);
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.cv-project-description p {
  margin-bottom: var(--space-sm);
}

.cv-project-description ul {
  padding-left: var(--space-lg);
  margin: var(--space-sm) 0;
}

/* ===========================
   SCROLL TO TOP BUTTON
   =========================== */
.cv-scroll-top {
  position: fixed;
  bottom: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  z-index: 999;
  width: clamp(44px, 7vw, 50px);
  height: clamp(44px, 7vw, 50px);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base) var(--ease-smooth),
              visibility var(--transition-base) var(--ease-smooth),
              transform var(--transition-fast) var(--ease-smooth);
}

.cv-scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.cv-scroll-top:hover {
  transform: translateY(-4px);
}

.cv-scroll-top i {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
  .cv-scroll-top,
  .cv-social-links,
  .cv-actions {
    display: none !important;
  }

  .cv-hero {
    min-height: auto;
    page-break-after: avoid;
  }

  .cv-timeline-card,
  .cv-project-item {
    page-break-inside: avoid;
  }

  .cv-page {
    background: white;
  }
}

/* ===========================
   RESPONSIVE UTILITIES
   =========================== */

/* Hide on mobile */
@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Hide on tablet */
@media (max-width: 968px) {
  .hide-tablet {
    display: none !important;
  }
}

/* Hide on desktop */
@media (min-width: 969px) {
  .hide-desktop {
    display: none !important;
  }
}