/* GENERAL */

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

:root {
  --primary: #2b6cb0;
  --primary-dark: #1a365d;
  --primary-light: #ebf2fa;
  --accent-green: #38a169;
  --text: #333333;
  --text-muted: #718096;
  --border: #a3a3a3;
  --bg-card: rgb(250, 250, 250);
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
}

html {
  scroll-behavior: smooth;
  font-size: 15px; /* base réduite : tous les rem (polices, cadres, marges) rétrécissent proportionnellement */
}

p {
  color: rgb(85, 85, 85);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 11vh;
}

/* Barre de navigation fixée en haut pendant tout le défilement */
#desktop-nav,
#hamburger-nav {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 12px rgba(26, 54, 93, 0.08);
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.1rem;
}

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

a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--primary);
}

.logo {
  font-size: 1.5rem;
  color: var(--primary-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo:hover {
  cursor: default;
}

.compass-rose {
  vertical-align: middle;
}

.compass-rose-footer {
  vertical-align: middle;
  margin-right: 0.3rem;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: black;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

/* SECTIONS */

section {
  padding-top: 4vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
  padding-bottom: 4rem;
}

.section-container {
  display: flex;
}

/* HERO SECTION with map background */

#profile {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
  overflow: hidden;
}

#hero-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 5rem;
  width: 100%;
  align-items: center;
}

.section__pic-container {
  display: flex;
  height: 290px;
  width: 230px;
  margin: auto 0;
}

.section__pic-container img {
  border-radius: 1.5rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 20px rgba(43, 108, 176, 0.2);
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
}

.section__text__p2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.section__text__p3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* Localisation lisible + coordonnées en signature SIG */
.location {
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.location i {
  color: var(--primary);
  margin-right: 0.35rem;
}

.coordinates {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: var(--primary);
  letter-spacing: 2px;
  margin-top: 0.15rem;
  margin-bottom: 1.5rem;
  font-weight: 400;
  opacity: 0.6;
}

.title {
  font-size: 2.4rem;
  text-align: center;
  color: var(--primary-dark);
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1.5rem;
}

#socials-container a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

#socials-container a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

.icon-large {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 10rem;
  border-radius: 2rem;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
}

.btn-color-1,
.btn-color-2 {
  border: var(--primary) 0.1rem solid;
}

.btn-color-1 {
  background: var(--primary);
  color: white;
}

.btn-color-1:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-color-2 {
  background: none;
  color: var(--text);
}

.btn-color-2:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn:disabled,
.btn:disabled:hover {
  background: none;
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.arrow:hover {
  color: var(--primary);
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: 0.1rem solid var(--border);
  text-align: center;
}

.section-container {
  gap: 4rem;
}

.text-container {
  padding: 0 2rem;
}

.text-container p {
  line-height: 1.8;
  text-align: justify;
}

/* COMPÉTENCES SECTION */

#competences {
  position: relative;
}

.experience-sub-title {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.experience-sub-title i {
  margin-right: 0.5rem;
  color: var(--primary);
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

/* CARTOGRAPHIC SCALE BARS */

.skills-list {
  text-align: left;
  padding: 0 0.5rem;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-info span:last-child {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.scale-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #cbd5e0;
  position: relative;
}

.scale-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--primary-dark) 0px,
    var(--primary-dark) 10%,
    var(--primary) 10%,
    var(--primary) 20%,
    var(--primary-dark) 20%,
    var(--primary-dark) 30%,
    var(--primary) 30%,
    var(--primary) 40%,
    var(--primary-dark) 40%,
    var(--primary-dark) 50%,
    var(--primary) 50%,
    var(--primary) 60%,
    var(--primary-dark) 60%,
    var(--primary-dark) 70%,
    var(--primary) 70%,
    var(--primary) 80%,
    var(--primary-dark) 80%,
    var(--primary-dark) 90%,
    var(--primary) 90%,
    var(--primary) 100%
  );
  transition: width 0.8s ease;
}

/* MAP LEGEND (for projects) */

.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.15);
}

/* PROJECTS SECTION */

#projects {
  position: relative;
  height: auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.color-container {
  border-color: var(--border);
  background: var(--bg-card);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.color-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(43, 108, 176, 0.15);
}

/* Project category indicators — carte entière teintée à la couleur de sa catégorie */
.project-pro {
  background: var(--primary-light);
  border-color: var(--primary);
}

.project-academic {
  background: #e6f4ec;
  border-color: var(--accent-green);
}

.project-img {
  border-radius: 1.5rem;
  width: 100%;
  height: 175px;
  object-fit: cover;
}

.project-title {
  margin: 0.75rem 0 0.5rem;
  color: var(--primary-dark);
  font-size: 1.2rem;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.project-tech {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.project-btn {
  color: var(--text);
  border-color: var(--border);
  padding: 0.5rem 1rem;
  width: auto;
  font-size: 0.85rem;
}

.project-btn i {
  margin-right: 0.3rem;
}

/* PARCOURS MAP + PANEL */

#parcours {
  position: relative;
  height: auto;
}

.parcours-container {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  height: 550px;
}

.parcours-panel {
  width: 340px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Scrollbar personnalisée */
.parcours-panel::-webkit-scrollbar {
  width: 4px;
}

.parcours-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.parcours-panel::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

/* Timeline verticale */
.parcours-item {
  position: relative;
  display: block;
  padding: 0 0 1.4rem 2.75rem;
  cursor: pointer;
}

/* Ligne verticale reliant les étapes */
.parcours-item::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #cbd5e0;
}
/* La ligne démarre au 1er point et s'arrête au dernier */
.parcours-item:first-child::before { top: 0.55rem; }
.parcours-item:last-child::before { bottom: auto; height: 0.55rem; }

/* Pastille sur la ligne */
.parcours-marker {
  position: absolute;
  left: 0.2rem;
  top: 0.15rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.62rem;
  box-shadow: 0 0 0 3px var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 1;
}
.parcours-work .parcours-marker { background: var(--primary); }
.parcours-edu .parcours-marker { background: var(--accent-green); }

/* Contenu de l'étape */
.parcours-content {
  padding: 0.45rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.parcours-item:hover .parcours-content,
.parcours-item.active .parcours-content {
  background: var(--primary-light);
  border-color: var(--primary);
}
.parcours-item.active .parcours-marker {
  transform: scale(1.15);
}
.parcours-work.active .parcours-marker { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--primary); }
.parcours-edu.active .parcours-marker { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--accent-green); }

.parcours-content .parcours-date,
.parcours-content .parcours-title-text,
.parcours-content .parcours-place {
  display: block;
}

.parcours-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.parcours-title-text {
  font-size: 0.85rem;
  color: var(--primary-dark);
  line-height: 1.3;
  margin: 0.1rem 0;
}

.parcours-place {
  font-size: 0.75rem;
  color: var(--primary);
}

#parcours-map {
  flex: 1;
  min-height: 500px;
  border-radius: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Custom Leaflet markers */
.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.work-marker {
  background: var(--primary);
  border: 2px solid var(--primary-dark);
}

.edu-marker {
  background: var(--accent-green);
  border: 2px solid #276749;
}

/* Custom popups */
.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}

.custom-popup .leaflet-popup-content {
  margin: 0;
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-radius: 2rem;
  border: 0.1rem solid var(--border);
  background: var(--bg-card);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.availability {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* FOOTER SECTION */

footer {
  padding: 2rem 1rem;
  background: var(--primary-dark);
  color: var(--white);
}

footer nav {
  height: auto;
}

footer .nav-links a {
  color: rgba(255, 255, 255, 0.8);
}

footer .nav-links a:hover {
  color: white;
  text-decoration-color: white;
}

.footer-text {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: 1rem;
}
