/* ================================================================
   PORTFOLIO TEMPLATE — style.css
   ---------------------------------------------------------------
   PERSONNALISATION RAPIDE : modifie les variables dans :root
   Tout le design découle de ces variables.
================================================================ */

/* ---------------------------------------------------------------
   1. VARIABLES — MODIFIE ICI
--------------------------------------------------------------- */
:root {
  /* Couleurs principales */
  --bg:           #0a0a0f;
  --bg-alt:       #10101a;
  --bg-card:      rgba(255, 255, 255, 0.04);
  --primary:      #7c6aff;   /* Violet — accent principal */
  --primary-glow: rgba(124, 106, 255, 0.35);
  --secondary:    #ff6b8a;   /* Rose — accent secondaire */
  --accent:       #00d4ff;   /* Cyan — détails */
  --text:         #f0eff5;
  --text-muted:   #8b8a9b;
  --border:       rgba(255, 255, 255, 0.07);

  /* Typographie */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Layout */
  --pad-x: 8vw;
  --radius: 16px;
  --radius-sm: 8px;

  /* Transitions */
  --ease-page: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-page:  0.85s;
}

/* ---------------------------------------------------------------
   2. RESET & BASE
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;       /* Le scroll est géré par JS */
  height: 100vh;
  width: 100vw;
  cursor: none;           /* Cursor custom */
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: none; background: none; border: none; font-family: inherit; }
ul { list-style: none; }

/* ---------------------------------------------------------------
   3. CURSEUR CUSTOM
--------------------------------------------------------------- */
#cursor-dot,
#cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s;
}

#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

#cursor-ring {
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  transform: translate(-50%, -50%);
  opacity: 0.5;
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              opacity 0.3s, border-color 0.3s;
}

body.cursor-hover #cursor-dot {
  width: 12px;
  height: 12px;
  background: var(--secondary);
}
body.cursor-hover #cursor-ring {
  width: 52px;
  height: 52px;
  opacity: 0.3;
  border-color: var(--secondary);
}

/* ---------------------------------------------------------------
   4. FULLPAGE SYSTEM
--------------------------------------------------------------- */
#fp-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#fp-container {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.fp-section {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad-x);
}

/* ---------------------------------------------------------------
   5. NAVIGATION — DOTS LATÉRAUX
--------------------------------------------------------------- */
#fp-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fp-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.fp-nav-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

.fp-nav-dot:hover::after,
.fp-nav-dot.active::after { opacity: 1; }

.fp-nav-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.4);
}

.fp-nav-dot:hover {
  border-color: var(--text);
}

/* ---------------------------------------------------------------
   6. LOGO / TOP NAV
--------------------------------------------------------------- */
#top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-logo span { color: var(--primary); }

.nav-cta {
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.3s;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
}
.nav-cta:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------------------------------------------------------------
   7. SECTION: PRÉSENTATION (ex-hero)
--------------------------------------------------------------- */
#presentation {
  background: var(--bg);
  flex-direction: column;
  text-align: center;
  gap: 0;
}

/* Fond dégradé animé — remplace les particules */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(124,106,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(255,107,138,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 50% 10%, rgba(0,212,255,0.08) 0%, transparent 50%);
  animation: bgShift 8s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.05); }
}

/* Grille décorative en fond */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
}

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

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
}

#typed-text {
  color: var(--text);
}

#typed-cursor {
  color: var(--primary);
  animation: blink 0.9s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  padding: 0.85rem 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
  box-shadow: 0 0 30px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--primary-glow);
}

.btn-outline {
  padding: 0.85rem 2rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.3s;
}
.btn-outline:hover {
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
  z-index: 1;
}

.scroll-hint .arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

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

@keyframes bounce {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ---------------------------------------------------------------
   8. SECTION: ABOUT
--------------------------------------------------------------- */
#about {
  background: var(--bg-alt);
  gap: 5vw;
  align-items: center;
  /* Scroll interne si le contenu dépasse 100vh */
  overflow-y: auto;
  padding-top: 5rem;    /* espace sous la navbar */
  padding-bottom: 3rem;
  align-items: flex-start;
}

.about-visual {
  flex: 0 0 auto;
  position: relative;
}

.about-photo-wrap {
  width: clamp(200px, 22vw, 320px);
  height: clamp(200px, 22vw, 320px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: var(--bg-card);
}

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-alt), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  opacity: 0.3;
}

.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 8px 30px var(--primary-glow);
}

.about-text { flex: 1; max-width: 560px; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------
   9. SECTION: SKILLS
--------------------------------------------------------------- */
#skills {
  background: var(--bg);
  flex-direction: column;
  gap: 3rem;
}

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  width: 100%;
  max-width: 900px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}
.skill-card:hover::before { opacity: 1; }

.skill-icon {
  font-size: 2rem;
}

.skill-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.skill-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 100px;
  width: 0%;
  transition: width 1s var(--ease-out);
}

/* ---------------------------------------------------------------
   10. SECTION: PROJECTS
--------------------------------------------------------------- */
#projects {
  background: var(--bg-alt);
  flex-direction: column;
  gap: 2.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card:hover {
  border-color: rgba(124, 106, 255, 0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,106,255,0.1);
}

.project-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-alt), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.3;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}
.project-card:hover .project-img img { transform: scale(1.05); }

.project-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}

.tag.primary { border-color: rgba(124,106,255,0.4); color: var(--primary); }
.tag.secondary { border-color: rgba(255,107,138,0.4); color: var(--secondary); }
.tag.accent { border-color: rgba(0,212,255,0.4); color: var(--accent); }

.project-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 500;
}
.project-link:hover { color: var(--primary); }
.project-link svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------
   11. SECTION: CONTACT
--------------------------------------------------------------- */
#contact {
  background: var(--bg);
  gap: 5vw;
  align-items: center;
}

.contact-info { flex: 0 0 auto; max-width: 400px; }

.contact-info .section-title { margin-bottom: 1rem; }

.contact-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.contact-link:hover { color: var(--text); }

.contact-link-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.3s;
}
.contact-link:hover .contact-link-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Formulaire */
.contact-form-wrap { flex: 1; max-width: 480px; width: 100%; }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  position: relative;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
  resize: none;
}

.form-textarea { min-height: 120px; }

.form-input:focus,
.form-textarea:focus { border-color: var(--primary); }

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 8px 30px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--primary-glow);
}

/* Socials */
.socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s;
  color: var(--text-muted);
}
.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

/* ---------------------------------------------------------------
   12. ANIMATIONS D'ENTRÉE (triggerées par JS au changement de section)
--------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Délais en cascade */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---------------------------------------------------------------
   13. LOADER
--------------------------------------------------------------- */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s, visibility 0.5s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.loader-logo span { color: var(--primary); }

.loader-bar-wrap {
  width: 200px;
  height: 2px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 100px;
  animation: load 1.4s var(--ease-out) forwards;
}

@keyframes load {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ---------------------------------------------------------------
   14. RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --pad-x: 6vw; }

  #about    { flex-direction: column; text-align: center; }
  #contact  { flex-direction: column; }

  .about-stats { justify-content: center; }
  .contact-info { max-width: 100%; }

  .form-row { grid-template-columns: 1fr; }

  #fp-nav { display: none; }
}

@media (max-width: 600px) {
  :root { --pad-x: 5vw; }

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