:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.9);
  --surface-alt: #e9f0eb;
  --ink: #17211d;
  --muted: #5b6762;
  --line: #d7ddd7;
  --accent: #176b5b;
  --accent-strong: #0f4f45;
  --blue: #2f5f98;
  --gold: #c8872c;
  --shadow: 0 18px 50px rgba(23, 33, 29, 0.1);
  --mouse-x: 50vw;
  --mouse-y: 40vh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: linear-gradient(135deg, #eef6f2 0%, #f7f5ef 44%, #edf3f8 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  user-select: none;
}

input,
textarea {
  user-select: text;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(23, 107, 91, 0.08), transparent 36%, rgba(200, 135, 44, 0.08));
  mix-blend-mode: multiply;
}

.tech-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(247, 245, 239, 0.94);
  border-bottom: 1px solid rgba(215, 221, 215, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface-alt);
  color: var(--ink);
  outline: none;
}

.site-nav .nav-contact {
  background: var(--accent);
  color: #ffffff;
}

.site-nav .nav-contact:hover,
.site-nav .nav-contact:focus-visible {
  background: var(--accent-strong);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

main {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.scroll-panel {
  min-height: calc(100vh - 72px);
  scroll-margin-top: 72px;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

body.is-animated-scroll .scroll-panel {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(44px) scale(0.97);
  transition:
    opacity 700ms ease,
    filter 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.is-animated-scroll .scroll-panel.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

body.is-animated-scroll .scroll-panel.is-past {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(-44px) scale(0.97);
}

body.is-animated-scroll .scroll-panel.is-future {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(44px) scale(0.97);
}

body.is-animated-scroll .scroll-panel > * {
  transition:
    opacity 650ms ease,
    transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.is-animated-scroll .scroll-panel:not(.is-visible) > * {
  opacity: 0;
  transform: translateY(18px);
}

body.is-animated-scroll .scroll-panel.is-visible > *:nth-child(2) {
  transition-delay: 90ms;
}

body.is-animated-scroll .scroll-panel.is-visible > *:nth-child(3) {
  transition-delay: 160ms;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(34px, 6vw, 72px) 0 34px;
}

.intro-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-text {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--accent);
}

.profile-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.profile-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #dfe9e6;
}

.profile-details {
  padding: 22px;
}

.profile-label {
  margin: 0 0 6px;
  color: var(--gold);
  font-weight: 800;
}

.profile-details p:last-child {
  margin: 0;
  color: var(--muted);
}

.quick-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  align-self: end;
  margin-top: clamp(4px, 2vw, 18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.quick-stats article {
  padding: 22px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
}

.quick-stats strong {
  display: block;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.quick-stats span {
  color: var(--muted);
  font-weight: 700;
}

.section-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0;
}

.section-alt {
  position: relative;
  z-index: 0;
}

.section-alt::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: transparent;
}

.section-heading {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
}

.timeline-date {
  color: var(--accent);
  font-weight: 800;
}

.timeline h3,
.experience-card h3,
.project-card h3,
.skills-layout h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.timeline p,
.experience-card p,
.project-card p,
.skills-layout p {
  margin: 0;
  color: var(--muted);
}

.experience-grid,
.project-grid,
.skills-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.experience-card,
.project-card,
.skills-layout article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.experience-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.project-tag {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tech-list span {
  padding: 6px 9px;
  border-radius: 6px;
  background: #edf3f1;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.skills-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 28px;
  align-items: center;
  padding: 72px 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }

  .scroll-panel,
  .scroll-panel > * {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
  color: var(--ink);
  font-weight: 800;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.site-footer {
  position: relative;
  z-index: 2;
  padding: 28px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .intro-section,
  .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .intro-section {
    min-height: auto;
  }

  .profile-panel {
    max-width: 520px;
  }

  .project-grid,
  .skills-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    padding: 14px;
  }

  .intro-content h1 {
    font-size: clamp(2.2rem, 14vw, 3.4rem);
  }

  .quick-stats,
  .experience-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
  }

  .section-block,
  .contact-section {
    padding: 54px 0;
  }

  .intro-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

.link-footer{
  color: #176b5b;
}

.logo{
  width: 80px;
  border-radius: 20px;
}

/* Style pour le texte cliquable dans la liste */
.li-link {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.li-link:hover {
  color: var(--blue);
}

/* L'arrière-plan de la modale */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none; /* Caché par défaut */
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* La fenêtre elle-même */
.modal-content {
  background: var(--surface-glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
  animation: modalFadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* ... tes autres styles (background, border, etc.) ... */
  
  max-height: 90vh;    /* Limite la hauteur à 90% de la hauteur de l'écran */
  overflow-y: auto;    /* Ajoute une barre de défilement si le contenu dépasse */
  
  /* Optionnel : pour que la barre de défilement soit plus discrète */
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

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

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

.img_stage{
  border-radius: 10px;
}

.icon{
  width: 30px;
}