:root {
  --bg: #0c0f1a;
  --bg-2: #12172a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e6e9f2;
  --muted: #b3bad3;
  --accent: #cf5cff;
  --accent-2: #57d2ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top right, rgba(87, 210, 255, 0.10), transparent 25%), radial-gradient(circle at 20% 10%, rgba(207, 92, 255, 0.14), transparent 28%), linear-gradient(180deg, #0b0f1a 0%, #101526 42%, #0b0e18 100%);
  color: var(--text);
  overflow-x: hidden;
}

[data-aos] {
  opacity: 1 !important;
}

.typed {
  color: #fff;
  font-weight: 700;
}

.typed-cursor {
  font-size: 1.2em;
  color: #cf5cff;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50%,
  100% {
    opacity: 1;
  }

  25%,
  75% {
    opacity: 0;
  }
}

.section-heading {
  margin-bottom: 1.5rem;
}

#diplomes .timeline-card {
  margin-top: -100px;
  /* léger overlap stylé */
  padding: 36px;
}

/*----------------------------------------------------- */
.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;

}

.timeline-logo-box {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
}

.school-logo {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.timeline-main-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  /*background: rgba(10, 16, 40, 0.35);*/
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-header-row h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.timeline-main-box p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.timeline-link-btn {
  white-space: nowrap;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
  transition: all 0.25s ease;
}

.timeline-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .timeline-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding-left: 0 !important;
  }

  .timeline-item::before {
    display: none !important;
  }

  .timeline-card::before {
    display: none !important;
  }

  .timeline-logo-box {
    width: 100% !important;
    min-height: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 1rem !important;
    margin-bottom: 0 !important;
  }

  .timeline-main-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
  }

  .timeline-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .timeline-link-btn {
    display: inline-block !important;
    width: auto !important;
  }

  .school-logo {
    max-width: 140px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }


}


/*-----------------------------------------------------------*/

#projets {
  margin-top: 4rem;
}


/*------------Hero cta-------------------------------------------*/
.hero-visual {
  position: relative;
}

.hero-cta {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-cta .btn {
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, #cf5cff, #7b6cff);
  box-shadow: 0 10px 30px rgba(207, 92, 255, 0.35);
}

.hero-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(207, 92, 255, 0.5);
}

/*------------Hero cta-------------------------------------------*/
#modalPictoWin .carousel-item {
  height: auto;
}
.pictowin-full {
  display: block;
  max-height: 80vh;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}



/*------------pictowin------------------------------------------*/

.tools-row {
  display: flex;
  flex-wrap: wrap;
  
  align-items: left;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tool {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: #aeb7d6;
  transition: all 0.25s ease;
}

.tool img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.tool:hover {
  transform: translateY(-2px);
  border-color: rgba(207, 92, 255, 0.4);
}
/*------------tools rows------------------------------------------*/






@media (max-width: 768px) {
  .timeline-item {
    flex-direction: column;
  }

  .timeline-side {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
}

.noise::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background-image: linear-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .7) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
  z-index: 0;
}

.navbar {
  backdrop-filter: blur(14px);
  background: rgba(10, 13, 24, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text) !important;
}

.nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #fff !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: .25rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
  border-radius: 999px;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

section {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #d9def0;
  font-size: .92rem;
}

.eyebrow i {
  color: var(--accent);
}

.hero-title,
.section-title {
  font-family: 'Space Grotesk', sans-serif;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: .95;
  font-weight: 700;
  letter-spacing: -.04em;
  margin: 1rem 0;
}

.gradient-text {
  background: linear-gradient(90deg, #fff 0%, #e8c5ff 38%, #8ee7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle,
.section-description,
.project-description,
.about-text p,
.timeline-item p,
.modal-project-text {
  color: var(--muted);
  line-height: 1.85;
}

.btn-primary-custom,
.btn-outline-custom {
  border-radius: 14px;
  padding: .95rem 1.2rem;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--accent), #8b6cff);
  border: none;
  color: #fff;
  box-shadow: 0 14px 30px rgba(207, 92, 255, .28);
}

.btn-outline-custom {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
}

.btn-primary-custom:hover,
.btn-outline-custom:hover {
  transform: translateY(-2px);
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card,
.project-card,
.skill-card,
.timeline-card,
.contact-card,
.quote-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.stat-card {
  padding: 1.1rem 1rem;
}

.stat-card h3 {
  font-size: 1.75rem;
  margin-bottom: .2rem;
  font-weight: 800;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: .75;
  animation: floatOrb 8s ease-in-out infinite;
}

.orb.one {
  width: 220px;
  height: 220px;
  background: rgba(207, 92, 255, .18);
  top: 12%;
  right: 8%;
}

.orb.two {
  width: 180px;
  height: 180px;
  background: rgba(87, 210, 255, .16);
  bottom: 16%;
  left: 10%;
  animation-delay: -2s;
}

/*---------------------------PROFILE----------------------*/
.profile-shell {
  width: min(100%, 460px);
  aspect-ratio: 1/1.05;
  position: relative;
  padding: 1.2rem;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08),
      rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
  overflow: hidden;
}

.profile-placeholder {
  height: 100%;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(87, 210, 255, .24), transparent 32%),
    linear-gradient(180deg, rgba(32, 38, 67, .25), rgba(8, 11, 20, .85)),
    url("../pic/fra1.jpg") center/cover;
  position: relative;
  overflow: hidden;
}

.profile-placeholder::before,
.floating-figure::after {
  content: "";
  position: absolute;
  inset: 0;
}

.profile-placeholder::before {
  background: linear-gradient(180deg, transparent 25%, rgba(6, 8, 15, .78) 100%);
}

/*---------------------------PROFILE----------------------*/

/*-------------------------PROJET LOGO------------------------*/
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  padding: 6px;
}

.project-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/*-----------------------------------------------------------------*/
.profile-badge,
.project-overlay-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  padding: .5rem .75rem;
  border-radius: 999px;
  background: rgba(8, 11, 20, 0.411);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: .86rem;
}

.profile-copy {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
}

.section-heading {
  margin-bottom: 2.2rem;
}

.section-tag,
.modal-eyebrow {
  color: #f0c8ff;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: .6rem;
  margin-bottom: .75rem;
}

.quote-card {
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.project-card {
  padding: 1.5rem;
  height: 100%;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(207, 92, 255, .35);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45);
}

.project-preview {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}

.project-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 18, .85));

}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.project-role {
  color: #f3d3ff;
  font-weight: 600;
  font-size: .95rem;
}

.project-duration,
.chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #d7ddf6;
}

.project-duration {
  white-space: nowrap;
  color: var(--muted);
  font-size: .92rem;
  padding: .45rem .7rem;
}

.project-stack,
.skill-list,
.contact-list,
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  list-style: none;
  margin: 0;
}

.chip {
  padding: .45rem .7rem;
  font-size: .86rem;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.skill-card,
.timeline-card,
.contact-card {
  padding: 1.4rem;
  height: 100%;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.skill-list li,
.contact-list li {
  font-size: .94rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 1.3rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(87, 210, 255, .12));
}

.timeline-item {
  position: relative;
  padding-left: 2.4rem;
}

.timeline-item+.timeline-item {
  margin-top: 1.6rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: .93rem;
  top: .35rem;
  width: .8rem;
  height: .8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(207, 92, 255, .10);
}

.about-highlight {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  margin-bottom: 1rem;
  color: #e8ebfb;
  font-weight: 600;
}

.about-panel {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.floating-figure {
  width: 100%;
  min-height: 460px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: radial-gradient(circle at 50% 30%, rgba(255, 208, 100, .20),
      transparent 22%), radial-gradient(circle at 70% 20%, rgba(207, 92, 255, .18),
      transparent 20%), linear-gradient(180deg, rgba(21, 25, 44, .35), rgba(9, 12, 20, .85)),
    url('../pic/Group51.png') center/cover;
  box-shadow: var(--shadow);
  animation: levitate 7s ease-in-out infinite;
}

.floating-figure::after {
  background: linear-gradient(180deg, rgba(10, 12, 18, .15), rgba(10, 12, 18, .78));
}

.contact-list li {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  color: #dce2fb;
  padding: .75rem .9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
}

.contact-list i {
  color: var(--accent);
  font-size: 1.1rem;
}

footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
}

.floating-shape {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  pointer-events: none;
  animation: drift 10s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 14%;
  left: 4%;
}

.shape-2 {
  width: 140px;
  height: 22px;
  top: 22%;
  right: 7%;
  animation-delay: -3s;
}

.shape-3 {
  width: 58px;
  height: 58px;
  bottom: 16%;
  right: 10%;
  animation-delay: -5s;
}

.shape-4 {
  width: 24px;
  height: 110px;
  bottom: 22%;
  left: 6%;
  animation-delay: -1.6s;
}

.project-modal-content {
  background: linear-gradient(180deg, rgba(17, 22, 38, .98), rgba(9, 12, 20, .98));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 28px;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.modal-project-image {
  height: 460px;
  object-fit: cover;
}

.thumbnail-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.thumb-btn {
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  overflow: hidden;
  opacity: .7;
  transition: opacity .25s ease, transform .25s ease, border-color .25s ease;
}

.thumb-btn img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
}

.thumb-btn:hover,
.thumb-btn.active {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(207, 92, 255, .45);
}

@keyframes floatOrb {

  0%,
  100% {
    transform: translateY(0) translateX(0)
  }

  50% {
    transform: translateY(-18px) translateX(6px)
  }
}

@keyframes drift {

  0%,
  100% {
    transform: translateY(0);
    opacity: .6
  }

  50% {
    transform: translateY(-14px);
    opacity: 1
  }
}

@keyframes levitate {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-10px)
  }
}

@media (max-width: 991.98px) {
  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 420px;
    margin-top: 2rem;
  }

  .modal-project-image {
    height: 360px;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2.7rem;
  }

  .project-top {
    flex-direction: column;
  }

  .quote-card,
  .project-card,
  .skill-card,
  .timeline-card,
  .contact-card {
    border-radius: 20px;
  }

  .project-image {
    height: 210px;
  }

  .modal-project-image {
    height: 260px;
  }

  .thumb-btn img {
    height: 74px;
  }

   
}



/* Navigation au clavier et adaptation aux petits écrans. */
section[id] { scroll-margin-top: 6rem; }
.hero-title { overflow-wrap: anywhere; }
.hero-role { min-height: 2.4em; }
:focus-visible { outline: 3px solid #8ee7ff; outline-offset: 4px; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 2000; padding: .75rem 1rem; background: #fff; color: #111; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}

/* Les captures MID restent entièrement visibles dans leur colonne. */
#carouselMID .mid-full {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
}
#modalUnsaid .thumbnail-map { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Captures de projets : proportions conservées, sans découpe, à toute largeur. */
.project-modal-content .modal-project-image,
#carouselMID .mid-full {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  margin: 0 auto;
}
.project-image-link { display: block; background: #080d18; cursor: zoom-in; }
.project-modal-content .thumb-btn img { object-fit: contain; background: #080d18; }
.project-modal-content .thumbnail-map { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.project-carousel .carousel-control-prev,
.project-carousel .carousel-control-next { bottom: auto; top: 1rem; width: 44px; height: 44px; border-radius: 50%; background: #101828; opacity: .9; }
.project-carousel .carousel-control-prev { left: .5rem; }
.project-carousel .carousel-control-next { right: .5rem; }

/* Captures et miniatures centrées, sans étirement ni bandes latérales. */
.project-modal-content .modal-project-image,
#carouselMID .mid-full {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  margin-inline: auto;
}
.project-image-link { width: fit-content; max-width: 100%; margin-inline: auto; background: transparent; }
.project-modal-content .thumbnail-map {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .75rem;
}
.project-modal-content .thumb-btn { flex: 0 0 auto; max-width: 100%; background: transparent; border-radius: 10px; }
.project-modal-content .thumb-btn img { display: block; width: auto; height: 92px; max-width: 100%; object-fit: contain; background: transparent; }
@media (max-width: 767.98px) {
  .project-modal-content .thumb-btn img { height: 64px; }
}
