/* ========== VARIABLES & THÈME ========== */
:root {
  --primary: #ff5722;
  --secondary: #2196f3;
  --transition: all 0.3s ease;

  /* Dark mode (défaut) */
  --bg-body:     #0f0f0f;
  --bg-nav:      rgba(15, 15, 15, 0.92);
  --bg-card:     #1a1a1a;
  --bg-card-alt: #222222;
  --bg-section:  #141414;
  --text:        #e8e8e8;
  --text-muted:  #888888;
  --border:      rgba(255, 255, 255, 0.07);
  --shadow:      0 4px 30px rgba(0, 0, 0, 0.5);
  --shadow-sm:   0 2px 12px rgba(0, 0, 0, 0.35);
}

body.light-mode {
  --bg-body:     #f4f6f9;
  --bg-nav:      rgba(255, 255, 255, 0.95);
  --bg-card:     #ffffff;
  --bg-card-alt: #eef1f6;
  --bg-section:  #eaf0f8;
  --text:        #1a1a2e;
  --text-muted:  #5a6070;
  --border:      rgba(0, 0, 0, 0.08);
  --shadow:      0 4px 30px rgba(0, 0, 0, 0.1);
  --shadow-sm:   0 2px 12px rgba(0, 0, 0, 0.07);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-body);
  color: var(--text);
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  z-index: 1000;
  background-color: var(--bg-nav);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar .logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.88rem;
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 1px;
  transition: width 0.25s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  transition: var(--transition);
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background-color: rgba(255, 87, 34, 0.08);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text);
  transition: var(--transition);
}

.menu-toggle:hover { color: var(--primary); }

/* ========== HERO ========== */
.hero {
  /* Override section opacity/transform — hero est toujours visible */
  opacity: 1 !important;
  transform: none !important;
  max-width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(255,87,34,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(33,150,243,0.06) 0%, transparent 60%);
  z-index: 0;
}

.hero-content {
  text-align: center;
  max-width: 780px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-title {
  font-size: 4.2rem;
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8a50 40%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 1px;
}

.hero-arrow {
  display: inline-flex;
  margin-top: 2.5rem;
  text-decoration: none;
}

.bounce-arrow {
  font-size: 1.8rem;
  color: var(--primary);
  animation: bounce 2.2s ease-in-out infinite;
}

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

/* ========== SECTIONS (base) ========== */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: 2.3rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  display: block;
}

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

/* ========== ABOUT ========== */
.about-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3.5rem;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image i {
  font-size: 150px;
  color: var(--primary);
  opacity: 0.8;
  filter: drop-shadow(0 0 40px rgba(255, 87, 34, 0.35));
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

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

.about-content h3 {
  font-size: 1.65rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-weight: 700;
}

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

.about-cta {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  margin-top: 1rem;
  margin-right: 0.75rem;
  border: 2px solid var(--primary);
}

.about-cta:hover {
  background-color: transparent;
  color: var(--primary);
}

/* ========== SKILLS ========== */
#skills h4 {
  text-align: center;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 820px;
  margin: 0 auto 0.5rem;
  font-weight: 400;
  font-size: 0.97rem;
}

#skills > h3,
#skills h3:not(.skill-card h3) {
  text-align: center;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 820px;
  margin: 2.5rem auto 0;
  font-weight: 400;
  font-size: 0.97rem;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.skill-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.3rem 0.8rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: default;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.skill-card:hover {
  transform: translateY(-7px);
  border-color: rgba(255, 87, 34, 0.4);
  box-shadow: var(--shadow);
}

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

.skill-card i {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  display: block;
}

.skill-card img {
  width: 42px; height: 42px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.5rem;
}

.skill-card p {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  margin: 0;
}

/* ========== BTS SIO ========== */
#bts-sio > p.mb-6 {
  color: var(--text-muted);
  line-height: 1.8;
  text-align: center;
  max-width: 860px;
  margin: 0 auto 2.5rem;
  font-size: 0.97rem;
}

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

.option {
  display: flex;
}

.bg-gray-100 {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  transition: var(--transition);
}

.bg-gray-100:hover {
  border-color: rgba(255, 87, 34, 0.4);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.bg-gray-100 h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.bg-gray-100 p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.93rem;
  margin-bottom: 0;
}

.bg-gray-100 ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.bg-gray-100 ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.22rem 0 0.22rem 1.3rem;
  position: relative;
  margin-bottom: 0;
}

.bg-gray-100 ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.85rem;
}

/* ========== PROJECTS ========== */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 87, 34, 0.45);
}

.project-card img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

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

.project-info {
  padding: 1.2rem 1.4rem 1.4rem;
}

.project-info h3 {
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

/* ========== MODALS ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  width: 92%;
  max-width: 900px;
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalOpen 0.3s ease;
  max-height: 90vh;
}

@keyframes modalOpen {
  from { transform: translateY(-25px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 12px; right: 12px;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.55);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease;
  line-height: 1;
  font-weight: bold;
}

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

.modal-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  flex-shrink: 0;
}

.modal-info {
  padding: 1.8rem 2rem;
  overflow-y: auto;
}

.modal-info h2 {
  margin-bottom: 0.7rem;
  color: var(--primary);
  font-size: 1.65rem;
  font-weight: 700;
}

.modal-info p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.modal-tech {
  background-color: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.modal-tech h3 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.modal-tech ul {
  padding-left: 1.2rem;
  margin: 0;
  list-style: disc;
}

.modal-tech li {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 3px;
}

.modal-btn { display: none; }

@media (min-width: 768px) {
  .modal-content { flex-direction: row; max-height: 85vh; }
  .modal-image { width: 42%; max-height: none; height: auto; }
  .modal-info   { width: 58%; overflow-y: auto; }
}

/* ========== EXPERIENCE ========== */
.experience-container {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 2rem;
}

.experience-container::before {
  content: '';
  position: absolute;
  top: 0; left: 13px;
  height: 100%; width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 2px;
}

.experience-item {
  position: relative;
  margin-bottom: 2rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.experience-item:hover {
  border-color: rgba(255, 87, 34, 0.4);
  box-shadow: var(--shadow);
}

.experience-item::before {
  content: '';
  position: absolute;
  top: 1.6rem;
  left: -2.5rem;
  width: 16px; height: 16px;
  background-color: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-body);
  z-index: 1;
}

.experience-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-weight: 700;
}

.experience-item .period {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  background-color: rgba(255, 87, 34, 0.12);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.78rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.experience-item p {
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.94rem;
}

.experience-item p:last-child { margin-bottom: 0; }

/* ========== TECH WATCH ========== */
#tech-watch {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tech-watch-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tech-watch-overlay { display: flex; flex-direction: column; }

.tech-watch-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  background: linear-gradient(135deg, #080808 0%, #161616 100%);
  padding: 2.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tech-watch-images img {
  width: 140px; height: 140px;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.tech-watch-images img:hover {
  transform: translateY(-8px) scale(1.06);
  border-color: var(--primary);
}

.tech-watch-content { padding: 2.5rem; }

.tech-watch-content p {
  margin-bottom: 1.3rem;
  line-height: 1.85;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.tech-watch-content strong {
  color: var(--text);
  font-weight: 700;
}

.tech-watch-content ul {
  background-color: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.4rem;
  list-style: none;
}

.tech-watch-content ul li {
  margin-bottom: 0.65rem;
  padding-left: 1.3rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.tech-watch-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.85rem;
}

.tech-watch-content ul li:last-child { margin-bottom: 0; }

/* Animations fade-in pour le contenu tech-watch */
.tech-watch-content p,
.tech-watch-content ul {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
}
.tech-watch-content p:nth-child(1) { animation-delay: 0.05s; }
.tech-watch-content p:nth-child(2) { animation-delay: 0.12s; }
.tech-watch-content p:nth-child(3) { animation-delay: 0.19s; }
.tech-watch-content p:nth-child(4) { animation-delay: 0.26s; }
.tech-watch-content p:nth-child(5) { animation-delay: 0.33s; }
.tech-watch-content p:nth-child(6) { animation-delay: 0.40s; }
.tech-watch-content p:nth-child(7) { animation-delay: 0.47s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== CONTACT ========== */
.contact-container {
  text-align: center;
  margin-top: 1.5rem;
}

.contact-container > p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
}

.social-icons a {
  color: var(--text);
  font-size: 1.5rem;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.social-icons a:hover {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(255, 87, 34, 0.4);
}

/* ========== ANIMATIONS GÉNÉRALES ========== */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 87, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}
.pulse-animation { animation: pulse 2s infinite; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.82rem; }
}

@media (max-width: 768px) {
  .navbar { padding: 0.8rem 1rem; }

  .nav-links {
    position: fixed;
    top: 60px; left: 0;
    width: 100%; height: 0;
    background-color: var(--bg-nav);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 999;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    height: calc(100vh - 60px);
    padding: 2rem 0;
  }

  .menu-toggle  { display: block; }
  .hero-title   { font-size: 2.6rem; letter-spacing: 1px; }
  .hero-subtitle { font-size: 1.05rem; }
  .section-title { font-size: 1.9rem; }

  .experience-container { padding-left: 1.8rem; }
  .experience-item::before { left: -1.8rem; }

  .tech-watch-images { gap: 1.5rem; padding: 2rem 1rem; }
  .tech-watch-images img { width: 110px; height: 110px; }
  .tech-watch-content { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; letter-spacing: 0.5px; }
  .skills-container { grid-template-columns: repeat(3, 1fr); }
  .projects-container { grid-template-columns: 1fr; }
  .tech-watch-images img { width: 90px; height: 90px; }
  .about-container { gap: 2rem; }
}
</style>
