@import url("https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&display=swap");

:root {
  --background: #ffffff;
  --foreground: #03045E;
  --accent: #D92935;
  --light-bg: #F7F7FB;
  --nav-width: 52px;
  --border-width: 2px;
  font-size: 14px;
}

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Urbanist", sans-serif;
  user-select: none;
  background-color: var(--background);
  color: var(--foreground);
  height: 100vh;
  width: 100vw;
}

#page-wrapper {
  height: 100%;
  position: relative;
  display: flex;
  overflow: hidden;
}

.nav {
  height: 100%;
  width: var(--nav-width);
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-left: var(--border-width) solid var(--foreground);
  position: absolute;
  cursor: pointer;
  will-change: transform;
  background-color: var(--background);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav:hover {
  background: rgba(247, 247, 251, 0.8);
  backdrop-filter: blur(10px);
}

.nav.nav-0 {
  border: none;
}

.nav.nav-1 {
  right: calc(var(--nav-width) * 3);
}

.nav.nav-2 {
  right: calc(var(--nav-width) * 2);
}

.nav.nav-3 {
  right: var(--nav-width);
}

.nav.nav-4 {
  right: 0;
}

.nav .title {
  position: relative;
  white-space: nowrap;
  text-transform: uppercase;
  width: 100%;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: 1px;
}

.nav .title span {
  position: relative;
  top: 100%;
  left: 0;
  display: flex;
  height: var(--nav-width);
  transform-origin: top left;
  transform: rotate(-90deg);
  align-items: center;
  justify-content: flex-end;
  transition: color 0.3s ease;
}

.nav:hover .title span {
  color: var(--accent);
}

.section {
  display: flex;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  will-change: transform;
}

.section .content {
  width: calc(100% - var(--nav-width) * 5);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 1.3rem;
  padding: 1rem;
  /* Allow vertical scrolling within each section */
  overflow-y: auto;
  overflow-x: hidden;
}

/* Project sections (1–4): align to top so long content scrolls naturally */
.section-1 .content,
.section-2 .content,
.section-3 .content,
.section-4 .content {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 2.5rem 2rem 80px;
}

/* Ensure section-0 content never hides behind the nav bar */
.section-0 .content {
  padding-bottom: 80px;
}

.section-0 .content {
  margin-left: var(--nav-width);
}

.section-1 .content {
  margin-left: calc(var(--nav-width) * 2);
}

.section-2 .content {
  margin-left: calc(var(--nav-width) * 3);
}

.section-3 .content {
  margin-left: calc(var(--nav-width) * 4);
}

.section-4 .content {
  margin-left: calc(var(--nav-width) * 5);
}

.section .content h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--foreground);
  position: relative;
}

.section .content h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section .content .home {
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section .content p {
  line-height: 1.7;
  color: #666;
  font-weight: 400;
}

.debug {
  border: 1px solid;
}

/* Hide scrollbar on body and section content */
body,
.section .content {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar,
.section .content::-webkit-scrollbar {
  display: none;
  width: 0;
}

/* ── Bottom navigation bar ─────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 9999;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1.5px solid rgba(3, 4, 94, 0.08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  user-select: none;
}

/* Back to site — left zone */
.bn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground);
  text-decoration: none;
  font-family: 'Urbanist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s ease;
  width: fit-content;
}

.bn-back:hover {
  opacity: 0.55;
}

.bn-back i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.bn-back:hover i {
  transform: translateX(-4px);
}

/* Center zone: arrows + section label */
.bn-center {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}

.bn-label {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 170px;
  justify-content: center;
}

#section-counter {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.6px;
}

.bn-sep {
  color: rgba(3, 4, 94, 0.22);
  font-size: 0.75rem;
}

#section-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

/* Arrow buttons */
.bn-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--foreground);
  background: var(--foreground);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.bn-arrow:hover:not(:disabled) {
  background: #ffffff;
  color: var(--foreground);
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.bn-arrow:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bn-arrow i {
  font-size: 11px;
  pointer-events: none;
  transition: transform 0.18s ease;
}

#btn-prev:not(:disabled):hover i { transform: translateX(-2px); }
#btn-next:not(:disabled):hover i { transform: translateX(2px); }

/* Right zone: indicator dots */
#section-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(3, 4, 94, 0.18);
  transition: all 0.3s ease;
  cursor: pointer;
}

.indicator-dot:hover {
  background: rgba(3, 4, 94, 0.42);
  transform: scale(1.2);
}

.indicator-dot.active {
  background: var(--foreground);
  width: 20px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  #bottom-nav {
    grid-template-columns: auto 1fr auto;
    padding: 0 16px;
    gap: 8px;
  }

  .bn-back span { display: none; }

  .bn-label { min-width: 0; }

  #section-name {
    font-size: 0.78rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Cacher les navs verticaux — la bottom-nav gère la navigation mobile */
  .navs {
    display: none;
  }

  /* Toutes les sections : pleine largeur, pas de margin-left */
  .section .content {
    width: 100%;
    margin-left: 0 !important;
    font-size: 1.1rem;
    padding: 1.5rem 1.2rem 90px;
  }

  /* Section-0 : alignement à gauche sur mobile */
  .section-0 .content {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.8rem 1.2rem 90px;
  }

  /* Scroll indicator inutile sur mobile */
  #scroll-hint {
    display: none;
  }

  .section .content h3 {
    font-size: 1.8rem;
  }
}

/* Animations supplémentaires */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section .content {
  animation: fadeIn 0.6s ease-out;
}

/* Effet de focus pour accessibilité */
.nav:focus-visible,
.bn-arrow:focus-visible,
.bn-back:focus-visible,
.indicator-dot:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}


/* =====================================================
   SECTION-0 — Home Portfolio (two-column design)
   ===================================================== */

.section-0 .content {
  width: calc(100% - var(--nav-width) * 5);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 2rem 88px 2rem;
  margin-left: var(--nav-width);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.section-0 .content::-webkit-scrollbar { display: none; }

/* Two-column grid */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 4rem;
  width: 100%;
  max-width: 1300px;
  align-items: start;
}

/* ── Left column ── */
.home-identity {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Status pill with animated blue gradient */
.home-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(270deg, #1a6cf6, #0ea5e9, #6366f1, #1a6cf6);
  background-size: 300% 100%;
  border: none;
  border-radius: 50px;
  padding: 0.45rem 1rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffffff;
  width: fit-content;
  animation: gradient-slide 4s ease infinite;
}

@keyframes gradient-slide {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.home-status::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  animation: blink 2s ease-in-out infinite;
}

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

.section-0 .project h2 {
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: -1.5px;
  line-height: 1;
  margin: 0;
}

.section-0 .project .role {
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 600;
  color: var(--foreground);
  opacity: 0.6;
  margin: 0;
  line-height: 1.5;
}

.home-bio {
  font-size: 15px;
  line-height: 1.8;
  color: #5a6080;
  font-weight: 400;
  border-left: 3px solid rgba(3, 4, 94, 0.15);
  padding-left: 1.2rem;
  margin: 0;
}

/* Contact links */
.home-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Email + Phone côte à côte */
.home-contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}

.home-contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 13px;
  color: #666;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-contact-item:hover { color: var(--foreground); }

/* Copy button */
.home-contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(3, 4, 94, 0.15);
  border-radius: 6px;
  color: #8a8fa8;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 11px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--foreground);
  border-color: var(--foreground);
  color: #ffffff;
}

.copy-btn--success {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.copy-toast {
  position: fixed;
  background: #03045E;
  color: #ffffff;
  font-family: "Urbanist", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 9999;
}

.copy-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.home-contact-item i {
  width: 16px;
  color: var(--foreground);
  font-size: 13px;
  flex-shrink: 0;
  opacity: 0.45;
}

/* Download buttons */
.download-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-download-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--foreground);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 50px;
  border: 2px solid var(--foreground);
  text-decoration: none;
  font-family: 'Urbanist', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-download-portfolio:hover {
  background: #ffffff;
  color: var(--foreground);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(3, 4, 94, 0.2);
}

.btn-download-cv {
  background: transparent;
  color: var(--foreground);
}

.btn-download-cv:hover {
  background: var(--foreground);
  color: #ffffff;
}

.btn-download-portfolio i { font-size: 13px; }

/* ── Right column ── */
.home-skills {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 2rem;
  overflow: hidden;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-group-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--foreground);
}

.skill-group-title i {
  color: var(--accent);
  font-size: 11px;
  width: 14px;
}

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

.skill-sep {
  width: 100%;
  height: 1px;
  background: rgba(3, 4, 94, 0.07);
}

/* ── Scroll hint (fixed, only on section-0) ── */
.scroll-indicator {
  position: fixed;
  bottom: 80px;
  left: calc(var(--nav-width) + 3.5rem);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.scroll-text {
  font-size: 0.7rem;
  color: #999;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.scroll-animation {
  display: flex;
  gap: 2px;
  align-items: center;
}

.scroll-animation i {
  font-size: 0.75rem;
  color: var(--foreground);
  animation: slideRight 1.5s ease-in-out infinite;
}

.scroll-animation i:nth-child(2) { animation-delay: 0.2s; }

.scroll-animation i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes slideRight {

  0%,
  100% {
    opacity: 0.3;
    transform: translateX(-10px);
  }

  50% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Alternative: Animation de souris qui scroll */
.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--foreground);
  border-radius: 15px;
  position: relative;
  margin-top: 1rem;
}

.scroll-mouse::before {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--foreground);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {

  0%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
  }
}

/* =====================================================
   STYLES POUR LA SECTION WOOP AMÉLIORÉE
   ===================================================== */

.project-woop {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-header {
  text-align: center;
  margin-bottom: 1rem;
}

.project-header h3 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.project-header h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent);
}

.project-subtitle {
  font-size: 1.2rem;
  color: #666;
  font-weight: 500;
  margin-top: 1.5rem;
}

.project-details {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
  width: 100%;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-block h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1rem;
}

.detail-block h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.detail-block p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
  margin: 0;
}

.detail-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-block ul li {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.75rem;
}

.detail-block ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
}

.project-image-large {
  width: 100%;
  min-height: 400px;  
  max-height: 600px;  
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.project-image-large img {
  width: 100%;
  height: 100%;
  object-fit: contain;  
  display: block;
}

/* Responsive tablet */
@media (max-width: 1024px) {
  .project-details {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-image-large {
    max-height: 400px;
  }

  .project-header h3 {
    font-size: 2.5rem;
  }
}

/* Responsive mobile */
@media (max-width: 768px) {
  .section-0 .project h2 {
    font-size: 1.8rem;
  }

  .section-0 .project .role {
    font-size: 1.1rem;
  }

  .btn-download-portfolio {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .scroll-indicator {
    margin-top: 2rem;
  }

  .scroll-text {
    font-size: 0.85rem;
  }

  .scroll-animation i {
    font-size: 1rem;
  }

  .project-woop {
    padding: 1rem;
  }

  .project-header h3 {
    font-size: 2rem;
  }

  .project-subtitle {
    font-size: 1rem;
  }

  .project-details {
    gap: 1.5rem;
  }

  .project-text {
    gap: 1.5rem;
  }

  .detail-block h4 {
    font-size: 1.1rem;
  }

  .detail-block p,
  .detail-block ul li {
    font-size: 0.95rem;
  }

  /* Hide large project images on mobile for cleaner layout */
  .project-image-large {
    display: none;
  }

  /* Reduce KPI grid to 2 columns on mobile */
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .kpi-value {
    font-size: 1.6rem;
  }

  /* Wrap tool tags on mobile */
  .tools-row {
    gap: 0.4rem;
  }

  /* Expertise tags wrapping */
  .expertise-tags {
    gap: 0.4rem;
  }

  .home-intro {
    font-size: 0.95rem;
  }
}

/* =====================================================
   HOME SECTION — expertise tags & intro
   ===================================================== */

.home-intro {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
  margin: 0.25rem 0 0.5rem;
  letter-spacing: 0.3px;
}

.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.75rem 0;
}

.tag {
  background: var(--light-bg);
  color: var(--foreground);
  border: 1px solid rgba(3, 4, 94, 0.15);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  cursor: default;
}

.tag:hover {
  background: var(--foreground);
  color: #ffffff;
  border-color: var(--foreground);
}

@media (max-width: 860px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Skills visible en bas sur mobile */
  .home-skills {
    display: flex;
    padding-right: 0;
  }

  .section-0 .content {
    width: 100%;
    margin-left: 0;
    padding: 1.5rem 1.2rem 90px;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .home-identity {
    gap: 1rem;
  }

  .download-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .btn-download-portfolio {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* =====================================================
   KPI GRID — WOOP impact numbers
   ===================================================== */

.kpi-block {
  background: var(--light-bg);
  border-radius: 12px;
  padding: 1.25rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.kpi-label {
  font-size: 0.78rem;
  color: #555;
  font-weight: 500;
  line-height: 1.4;
}

/* =====================================================
   TOOL TAGS — project tools row
   ===================================================== */

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tool-tag {
  background: transparent;
  color: var(--foreground);
  border: 1.5px solid rgba(3, 4, 94, 0.2);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tool-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Responsive tablet: KPI grid 2 cols */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

