:root {
  --black: #111;
  --dark: #222;
  --gray: #777;
  --light-gray: #f5f5f5;
  --accent: #00a3e0;

   --font-main: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--black);
  line-height: 1.6;
}

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

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

strong { font-weight: 700; }

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */
.site-header {
  text-align: center;
}

.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;

  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}


.header-logo { margin-bottom: 1rem; }

.header-logo img {
  max-height: 60px;
  margin: 0 auto;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.main-nav {
  max-width: 1100px;
  margin: 0 auto;
}

.main-nav .menu {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}

.main-nav .menu li { position: relative; }

.main-nav .menu > li:last-child {
  margin-left: auto;
}

.main-nav .menu a {
  position: relative;
  display: inline-block;
  padding: 0.9rem 0;
}

.main-nav .menu li.current-menu-item > a::after,
.main-nav .menu li.current_page_item > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;      /* 🔥 pile sur la bordure basse (1px) */
  height: 5px;
  background: #08BEF5;
}



/* Burger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0 auto 0.5rem;
  padding: 0.25rem 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition:
    transform 0.45s cubic-bezier(.68,-0.55,.27,1.55),
    opacity 0.2s ease;
}

/* Burger → croix */
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav + refined animation */
@media (max-width: 768px) {

  .menu-toggle { display: block; }

.main-nav { 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav .menu {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0 2rem;
  }

  .main-nav .menu li {
    opacity: 0;

    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .main-nav.is-open .menu li { opacity: 1; transform: translateY(0); }

  .main-nav.is-open .menu li:nth-child(1) { transition-delay: 0.05s; }
  .main-nav.is-open .menu li:nth-child(2) { transition-delay: 0.10s; }
  .main-nav.is-open .menu li:nth-child(3) { transition-delay: 0.15s; }
  .main-nav.is-open .menu li:nth-child(4) { transition-delay: 0.20s; }
  .main-nav .menu > li:last-child {
    margin-left: 0;
  }
.nav-wrapper {
    border-bottom: none;
    border-top: none;
  }

  .main-nav .menu li.current-menu-item a::after,
  .main-nav .menu li.current_page_item a::after {
    display: none;
  } 
}
body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------
   Home – Featured projects thumbnails (16/9)
--------------------------------------------------------- */

.home-featured-projects .project-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.home-featured-projects .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ---------------------------------------------------------
   Home layout
--------------------------------------------------------- */
#home section { padding: 4rem 1.5rem; }

.section-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-header h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.section-header p { color: var(--gray); font-size: 0.95rem; }

/* Featured projects */
.home-featured-projects { background: #fff; }

.projects-grid {
  display: grid;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card { /*border-bottom: 1px solid #eee; transition: transform 0.3s ease;*/ }
.project-card:hover { transform: translateY(-4px); }

.project-image { margin-bottom: 1rem; overflow: hidden; }
.project-image img { transition: transform 0.4s ease; }
.project-card:hover img { transform: scale(1.05); }

.project-title { font-size: 1rem; margin: 0.5rem 0; }
/* ---------------------------------------------------------
   Project type – left border accent
--------------------------------------------------------- */

.project-type {
  display: inline-block;
  padding-left: 0.75rem;
  /*margin-left: 0.75rem;*/
  border-left: 2px solid #08BEF5;
  font-weight: var(--fw-medium, 500);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray);
}
.home-featured-projects .project-type {
  border-left: 2px solid #08BEF5;
}


/* Presentation + contact */
.home-presentation { background: var(--light-gray); }

.presentation-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .presentation-content {
    grid-template-columns: 2fr 1fr;
    align-items: center;
  }
}

.presentation-text h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.presentation-text p { font-size: 0.95rem; color: var(--dark); }

.presentation-contact { text-align: center; }

.presentation-contact .avatar { width: 120px; margin: 0 auto 1rem; }
.presentation-contact img { border-radius: 50%; }

.contact-email, .contact-phone { font-size: 0.9rem; color: var(--gray); }

/* Personal projects */
.home-personal-projects { background: #fff; }

.personal-projects-grid {
  display: grid;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .personal-projects-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .personal-projects-grid { grid-template-columns: repeat(5, 1fr); }
}

.personal-project { text-align: center; }

.personal-project .icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.personal-project:hover .icon { transform: translateY(-6px); background: #eee; }

.personal-project h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray);
}

/* Ensure links fill cards */
.project-card a,
.personal-project a { display: block; }

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */

.site-footer {
  border-top: 1px solid #eee;
  padding: 3rem 1.5rem;
  background: #1F1F1F;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 1.5rem;
}

.footer-brand img {
  max-height: 50px;
  margin: 0 auto;
}

.footer-contact p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--gray);
}

.footer-legal {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--gray);
}

.footer-socials ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.footer-socials a svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: var(--gray);
  transition: fill 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover svg {
  fill: var(--accent);
  transform: translateY(-2px);
}


@media (max-width: 768px) {

  .site-header {
    position: relative; /* 🔥 référence pour le menu */
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    text-align: left;
  }

  .header-logo {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    padding: 0.75rem 1rem;
    margin: 0;
  }

  .nav-wrapper {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1rem;
  }

  .menu-toggle {
    margin: 0;
    align-self: flex-start;
  }

  /* 🔥 MENU MOBILE PLEINE LARGEUR */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;           /* 🔥 clé */
    right: 0;          /* 🔥 clé */
    width: 100%;
    background: #fff;
  }
}
@media (max-width: 768px) {

  .site-header {
    position: sticky;      /* 🔥 devient la référence */
    top: 0;
    z-index: 1000;
    background: #fff;
  }

  .nav-wrapper {
    position: static;      /* 🔥 casse le contexte parasite */
  }
}
@media (max-width: 768px) {

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
  }
}
