/* modern.css - Modern & Contemporary Portfolio Design */

:root {
  --primary-color: #2563eb;
  --secondary-color: #0891b2;
  --accent-color: #f59e0b;
  --dark-bg: #0f172a;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: auto;
  max-width: calc(100% - 40px);
  transition: var(--transition);
}

.navbar-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-hide-btn {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: none;
  border-radius: 0 0 20px 20px;
  padding: 4px 18px 6px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  color: #6366f1;
  display: flex;
  align-items: center;
  transition: var(--transition);
  opacity: 0.7;
}

.nav-hide-btn:hover {
  opacity: 1;
  color: #6366f1;
}

.navbar.nav-hidden {
  top: -70px;
}

.navbar.nav-hidden .nav-hide-btn {
  opacity: 1;
  bottom: -32px;
  padding: 6px 20px 8px;
}

.navbar.nav-hidden .nav-hide-btn svg {
  transform: rotate(180deg);
}

.nav-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 12px 25px;
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-right: 15px;
  border-right: 2px solid var(--border-color);
  margin-right: 5px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  position: relative;
  display: flex;
  gap: 5px;
  align-items: center;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: 25px;
  transition: color 0.3s ease;
  z-index: 1;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-indicator {
  position: absolute;
  bottom: -4px;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 20px 50px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  top: 10%;
  right: 10%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
}

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

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container {
  position: relative;
  width: 500px;
  height: 500px;
  animation: float 6s ease-in-out infinite, heroImageEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-style: preserve-3d;
  perspective: 800px;
}

.image-container:hover .profile-image {
  transform: scale(1.03) rotateY(-4deg) rotateX(2deg);
  box-shadow: 0 30px 60px rgba(99, 102, 241, 0.35);
}

.image-container:hover .image-glow {
  opacity: 0.6;
  filter: blur(28px);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 3px solid white;
  position: relative;
  z-index: 3;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.image-glow {
  position: absolute;
  width: 110%;
  height: 110%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 24px;
  top: -5%;
  left: -5%;
  z-index: 0;
  opacity: 0.35;
  filter: blur(25px);
  animation: glowPulse 4s ease-in-out infinite;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Anneau rotatif autour de la photo */
.image-ring {
  position: absolute;
  inset: -6px;
  border-radius: 30px;
  z-index: 1;
  animation: spinRing 18s linear infinite;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--primary-color) 20%,
    transparent 40%,
    var(--secondary-color) 60%,
    transparent 80%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 3px;
  opacity: 0.8;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.04); }
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes heroImageEntrance {
  from { opacity: 0; transform: scale(0.85) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 20px;
}

.section-light {
  background: var(--light-bg);
}

.section-dark {
  background: var(--dark-bg);
  color: white;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.7);
}

.section-dark h3 {
  color: white;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 60px;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.about-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.about-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1);
  border-color: var(--primary-color);
}

.about-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
  margin-bottom: 50px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  padding-right: 52%;
  text-align: right;
}

.timeline-item:nth-child(even) {
  padding-left: 52%;
}

.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  border: 4px solid var(--dark-bg);
  z-index: 10;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: white;
}

.timeline-school {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline-item--future .timeline-marker {
  background: var(--accent-color);
  border-color: var(--dark-bg);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.timeline-item--future .timeline-content {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.alternance-tag {
  font-weight: 600;
  color: var(--accent-color);
  margin-top: -18px;
}

.alternance-tag--timeline {
  margin-top: 12px;
}

.timeline-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-color), #f97316);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.experience-card {
  background: white;
  padding: 35px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.experience-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
  border-color: var(--primary-color);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.experience-header h3 {
  color: var(--primary-color);
  margin: 0;
}

.experience-date {
  background: var(--primary-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.experience-card h4 {
  font-size: 1.2rem;
  margin: 15px 0 5px 0;
}

.company-desc {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 15px;
}

.company-info {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.company-info p {
  margin: 8px 0;
  font-size: 0.9rem;
}

.placeholder {
  font-style: italic;
  color: var(--text-secondary);
  padding: 30px;
  text-align: center;
  background: var(--light-bg);
  border-radius: 8px;
}

/* ===== SKILLS SECTION ===== */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.skill-category {
  animation: fadeInUp 0.6s ease-out;
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: white;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 25px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.skill-card:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-8px);
}

.skill-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  object-fit: contain;
}

.skill-icon-emoji {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.skill-card h4 {
  font-size: 1rem;
  color: white;
  margin-bottom: 15px;
}

.skill-stars {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 8px;
}

.star {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
}

.star.filled {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* Soft Skills */
.soft-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.soft-skill {
  flex: 0 1 auto;
}

.skill-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.skill-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Languages */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.language-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: var(--transition);
}

.language-card:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-8px);
}

.language-card h4 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.language-card p {
  color: var(--primary-color);
  font-weight: 600;
}

.flag-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 3px;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(99, 102, 241, 0.15);
}

.project-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

/* Animation zoom-out au chargement */
@keyframes zoomOut {
  0% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.project-image img.zoom-out-load {
  animation: zoomOut 1.5s ease-out forwards;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.project-year {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.project-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-perso {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}
.badge-groupe {
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: #fff;
}
.badge-stage {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.project-link.site {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.project-link.site:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.project-link.github {
  background: #24292e;
  color: white;
}

.project-link.github:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ===== TP ACCORDION ===== */
.tp-accordion {
  margin-top: 40px;
}

.tp-accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  padding: 20px 28px;
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-primary);
  transition: var(--transition);
  user-select: none;
}

.tp-accordion-header:hover {
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.tp-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--primary-color);
}

.tp-accordion.open .tp-chevron {
  transform: rotate(180deg);
}

.tp-count {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
}

.tp-grid-wrapper {
  overflow: hidden;
  height: 0;
  transition: height 0.4s ease;
}

.tp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding-top: 24px;
}

.tp-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--primary-color);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}

.tp-accordion.open .tp-card {
  opacity: 1;
  transform: translateY(0);
}

.tp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.12);
}

.tp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tp-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.tp-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-color);
  background: rgba(236, 72, 153, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.tp-card h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tp-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tp-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.tp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.tp-link-github {
  background: #24292e;
  color: #fff;
}

.tp-link-github:hover {
  background: #1a1e22;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.tp-link-doc {
  background: var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
}

.tp-link-doc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.35);
}

.tp-link-site {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
}

.tp-link-site:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.35);
}

/* ===== VEILLE SECTION ===== */
.veille-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.veille-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
}

.veille-card {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.veille-card-full {
  max-width: 900px;
}

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

.veille-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}

.veille-card h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: white;
}

.veille-card p {
  margin-bottom: 15px;
  line-height: 1.8;
  font-size: 1.05rem;
}

.veille-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ===== RSS MODAL ===== */
.rss-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rss-modal-overlay.open {
  display: flex;
  animation: rssOverlayIn 0.25s ease forwards;
}

@keyframes rssOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.rss-modal {
  background: var(--card-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: rssModalIn 0.25s ease forwards;
}

@keyframes rssModalIn {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

.rss-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.rss-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rss-modal-header h3 svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

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

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

.rss-modal-body {
  overflow-y: auto;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rss-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 0;
  color: var(--text-secondary);
}

.rss-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: rss-spin 0.8s linear infinite;
}

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

.rss-article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.rss-article:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
  transform: translateY(-2px);
}

.rss-article-content {
  flex: 1;
  min-width: 0;
}

.rss-article-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.rss-article-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rss-article-date {
  font-size: 0.78rem;
  color: var(--primary-color);
  font-weight: 500;
}

.rss-arrow {
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition);
}

.rss-article:hover .rss-arrow {
  color: var(--primary-color);
  transform: translate(2px, -2px);
}

.rss-error {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  padding: 100px 20px;
  background: var(--light-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  text-decoration: none;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1);
}

.contact-card svg {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contact-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.contact-card p {
  color: var(--text-secondary);
}

.email-card {
  cursor: default;
  padding-left: 20px;
  padding-right: 20px;
}

.email-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.email-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.email-copy-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.email-copy-btn .email-text {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.email-copy-btn .copy-icon,
.email-copy-btn .check-icon {
  flex-shrink: 0;
  display: block;
  color: inherit;
}

.email-copy-btn.copied {
  border-color: var(--success-color);
  color: var(--success-color);
  background: rgba(16, 185, 129, 0.05);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--dark-bg);
  color: white;
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .nav-link {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .logo {
    font-size: 1.3rem;
    padding-right: 12px;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 10px;
    width: calc(100% - 20px);
  }

  .nav-hide-btn {
    display: none;
  }

  .hamburger {
    display: flex;
    background: white;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    gap: 0;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.open {
    left: 10px;
    width: calc(100% - 20px);
  }
  
  .logo {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    width: 100%;
    text-align: center;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    width: 100%;
  }
  
  .nav-link:last-of-type {
    border-bottom: none;
  }

  .nav-indicator {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 100px 20px 60px;
  }

  .hero::before {
    width: 200px;
    height: 200px;
  }

  /* Timeline sur tablette/mobile */
  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 60px !important;
    padding-right: 15px !important;
    text-align: left !important;
  }

  .timeline-marker {
    left: 10px;
  }

  .timeline-content {
    width: 100%;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .image-container {
    width: 260px;
    height: 260px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 60px !important;
    padding-right: 10px !important;
    text-align: left !important;
  }

  .timeline-marker {
    left: 5px;
  }

  .timeline-content {
    padding: 20px;
    width: 100%;
  }

  .timeline-content h3 {
    font-size: 1rem;
  }

  .section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .tp-grid {
    grid-template-columns: 1fr;
  }

  .tp-accordion-header {
    padding: 16px 20px;
    font-size: 1.1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 40px 15px;
  }

  /* PDF Modal mobile */
  .pdf-modal {
    width: 95%;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .pdf-modal-title {
    font-size: 1rem;
  }

  .pdf-modal-list {
    flex-direction: column;
  }

  .pdf-modal-list a {
    font-size: 0.95rem;
    padding: 14px 16px;
  }

  /* Gallery Modal mobile */
  .gallery-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .gallery-modal {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    max-height: 92vh;
  }

  .gallery-modal-header {
    padding: 16px 18px;
  }

  .gallery-modal-title {
    font-size: 1rem;
  }

  .gallery-modal-body {
    padding: 12px 8px;
    min-height: 200px;
  }

  .gallery-img-wrapper img {
    max-height: 50vh;
  }

  .gallery-nav {
    font-size: 2rem;
    padding: 6px 8px;
  }

  .gallery-thumbs {
    padding: 10px 12px 16px;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .gallery-thumb {
    width: 50px;
    height: 35px;
    flex-shrink: 0;
  }
}

/* ===== PDF MODAL ===== */
.project-link.pdf {
  background: var(--border-color);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.project-link.pdf:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.pdf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pdf-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.pdf-modal {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 28px;
  min-width: 320px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s ease;
}

.pdf-modal-overlay.open .pdf-modal {
  transform: translateY(0) scale(1);
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pdf-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pdf-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

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

.pdf-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdf-modal-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

.pdf-modal-list a:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary-color);
}

/* ===== GALLERY MODAL CVVEN ===== */
.gallery-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-modal-overlay.open {
  display: flex;
  animation: rssOverlayIn 0.25s ease forwards;
}

.gallery-modal {
  background: var(--card-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: rssModalIn 0.25s ease forwards;
}

.gallery-modal-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  gap: 12px;
}

.gallery-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gallery-modal-counter {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.gallery-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.5rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
  line-height: 1;
}

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

.gallery-modal-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 300px;
}

.gallery-img-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-img-wrapper img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 8px;
  object-fit: contain;
}

.gallery-nav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.5rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.gallery-nav:hover {
  color: var(--text-primary);
  background: var(--border-color);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 24px 20px;
  overflow-x: auto;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 60px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
  border: 2px solid transparent;
}

.gallery-thumb:hover {
  opacity: 0.8;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary-color);
}
