/* Variables de couleurs — Mode sombre par défaut */
:root {
  --bg: #071013;
  --surface: #1E2328;
  --accent: #55F1F1;
  --text: #FFFFFF;
  --text-secondary: #6B7380;
  --glass-bg: rgba(30, 35, 40, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(30, 35, 40, 0.55);
  --overlay: linear-gradient(120deg, rgba(7,16,19,0.78) 0%, rgba(7,16,19,0.45) 60%, rgba(7,16,19,0.2) 100%);
}

/* Variables pour le mode clair */
[data-theme="light"] {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --accent: #55F1F1;
  --text: #071013;
  --text-secondary: #6B7380;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(0, 0, 0, 0.08);
  --card-bg: rgba(255, 255, 255, 0.7);
  --overlay: linear-gradient(120deg, rgba(245,247,250,0.6) 0%, rgba(245,247,250,0.25) 60%, rgba(245,247,250,0.05) 100%);
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Navbar verticale flottante */
.nav-vertical {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.nav-vertical a,
.nav-vertical button {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-vertical a:hover,
.nav-vertical button:hover {
  color: var(--accent);
  background: rgba(85, 241, 241, 0.12);
  transform: scale(1.1);
}

/* Section Hero — Découpage diagonal */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: #071013;
  padding: 0;
}

/* Carrousel d'images de fond */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-bg .slide.active { opacity: 1; }

/* Panneaux diagonaux sombres qui «encadrent» l'image */
.hero-panel {
  position: absolute;
  inset: 0;
  background: #071013;
  z-index: 1;
}

/* Coin haut-gauche: grande zone sombre pour le titre */
.hero-panel-tl {
  clip-path: polygon(0 0, 50% 0, 2% 100%, 0 100%);
}

/* Coin bas-droite: zone sombre plus petite, diagonale parallèle */
.hero-panel-br {
  clip-path: polygon(98% 0, 100% 0, 100% 100%, 55% 100%);
}

/* Voile sombre subtil sur la bande d'image pour ajouter de la cohérence */
.hero-tint {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 19, 0.3);
  z-index: 2;
  pointer-events: none;
}

/* Bloc texte sur le panneau gauche */
.hero-content {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 7%;
  transform: translateY(-50%);
  max-width: 38%;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  color: #FFFFFF;
}

.hero-tagline {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  max-width: 480px;
  line-height: 1.55;
}

/* Horloge en direct*/
.live-time {
  position: absolute;
  z-index: 3;
  top: 32px;
  right: 110px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  color: #55F1F1;
  padding: 8px 14px;
  background: rgba(30, 35, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Responsive sur tablette/mobile, on bascule les panneaux à l'horizontale */
@media (max-width: 900px) {
  .hero-panel-tl {
    clip-path: polygon(0 0, 100% 0, 100% 55%, 0 70%);
  }
  .hero-panel-br {
    clip-path: polygon(0 92%, 100% 88%, 100% 100%, 0 100%);
  }
  .hero-content {
    top: 8%;
    left: 7%;
    transform: none;
    max-width: 86%;
  }
  .live-time { right: 80px; top: 22px; }
}

/* Sections génériques */
.section {
  padding: 100px 120px 100px 8%;
  position: relative;
}

.section-alt {
  background: var(--surface);
}
[data-theme="light"] .section-alt {
  background: #EBEEF2;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  letter-spacing: -1px;
}

/* À propos de moi */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.about-img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: block;
}

.social-links {
  margin-top: 50px;
  display: flex;
  gap: 18px;
  justify-content: center;
}

.social-links a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 1.3rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.social-links a:hover {
  color: var(--bg);
  background: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(85, 241, 241, 0.3);
}

/* Comment je travaille */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.workflow-item {
  text-align: center;
  padding: 30px 20px;
}

.workflow-item i {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 18px;
  display: inline-block;
}

.workflow-item h3 {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

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

/* Projets à venir avec effets de survol */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  backdrop-filter: blur(10px);
  display: block;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(85, 241, 241, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-card i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 18px;
  display: inline-block;
  transition: transform 0.35s ease;
  position: relative;
  z-index: 1;
}

.project-card h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* effet carte qui se soulève + lueur + icône qui grossit */
.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(85, 241, 241, 0.18);
}

.project-card:hover::before { opacity: 1; }
.project-card:hover i { transform: scale(1.15); }

/* Footer */
.footer {
  text-align: center;
  padding: 30px 8%;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
}

/* Responsive (tablettes et mobiles) */
@media (max-width: 992px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  .hero { padding: 0 80px 0 6%; }
  .section { padding: 80px 80px 80px 6%; }
  .projects-grid { grid-template-columns: 1fr; }
  .nav-vertical {
    right: 12px;
    padding: 12px 8px;
    gap: 10px;
  }
  .nav-vertical a, .nav-vertical button { width: 38px; height: 38px; font-size: 1.05rem; }
  .live-time { right: 70px; font-size: 0.85rem; padding: 6px 10px; }
}