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

:root {
  --bg-1: #1e3c72;
  --bg-2: #2a5298;
  --bg-3: #7e22ce;

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);

  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.18);
  --shadow: rgba(0, 0, 0, 0.35);

  --accent-1: #009dff;
  --accent-2: #ff00ff;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-pill: 999px;

  --maxw: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-size: 200% 200%;
  animation: gradient-animation 10s infinite alternate;
}

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

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

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

ul {
  list-style: none;
}

/* ==================== LAYOUT ==================== */

section {
  min-height: 100vh;
  width: 100%;
  padding: 8.5rem 1.2rem 5rem;
  scroll-margin-top: 120px;
}

.titre {
  text-align: center;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 2.5rem;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  border: none;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--footer {
  width: fit-content;
  margin-top: 0.75rem;
}

/* ==================== HEADER / NAV ==================== */

.header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--maxw), 92vw);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-pill);

  background: rgba(10, 12, 24, 0.62);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);

  z-index: 1000;
  transition: background 0.2s ease, padding 0.2s ease, transform 0.2s ease;
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.72);
  padding: 0.7rem 1.1rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.04);
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.navigation a {
  position: relative;
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.navigation a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.98);
}

.navigation a::after {
  content: '';
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: -0.35rem;
  height: 3px;
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
}

.navigation a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.05rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  border: none;
  color: white;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.action:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.desktop-only {
  display: inline-flex;
}

.mobile-only {
  display: none;
}

/* Mobile nav */
@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden;
  }

  .nav {
    justify-content: flex-end;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .navigation {
    position: absolute;
    top: calc(100% + 0.8rem);
    left: 0;
    right: 0;

    width: 100%;
    max-width: 92vw;
    margin: 0 auto;

    flex-direction: column;
    gap: 0.25rem;

    padding: 0.75rem;
    border-radius: var(--radius-lg);

    background: rgba(10, 12, 24, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

    display: none;
  }

  .navigation.active {
    display: flex;
  }

  .navigation a {
    width: 100%;
    text-align: center;
    padding: 0.9rem 0.8rem;
    border-radius: 18px;
  }

  .navigation a::after {
    display: none;
  }
}

/* ==================== APROPOS ==================== */

.Apropos {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-Apropos {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
  flex-wrap: wrap;
}

.Apropos img {
  width: min(320px, 70vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 40px rgba(0, 136, 255, 0.35);
  animation: float 3s ease-in-out infinite;
}

.information {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  max-width: 680px;
}

.information h3 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--muted);
}

.information h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
}

.information span {
  display: inline-block;
  font-size: 1.55rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--accent-2), var(--accent-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.information p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.bouton {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.reseau {
  display: flex;
  gap: 1.2rem;
}

.reseau a {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.reseau a:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(255, 255, 255, 0.14);
}

.reseau i {
  font-size: 1.6rem;
}

/* ==================== EXPERIENCE ==================== */

.experience-info {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.Experience img {
  width: min(340px, 80vw);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.grid-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;

  display: flex;
  flex-direction: column;
  gap: 0.65rem;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.grid-card:hover {
  transform: translateY(-6px);
  background: var(--card-strong);
  border-color: rgba(255, 255, 255, 0.26);
}

.grid-card > i {
  font-size: 1.6rem;
}

.grid-card span {
  font-size: 1.15rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grid-card h3 {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.grid-card p {
  color: var(--muted);
  line-height: 1.7;
}

/* ==================== PROJECTS ==================== */

.grilleProjet {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.carte-projet {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.carte-projet:hover {
  transform: translateY(-8px);
  background: var(--card-strong);
  border-color: rgba(255, 255, 255, 0.26);
}

.carte-projet img {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.carte-projet h3 {
  font-size: 1.45rem;
  font-weight: 600;
}

.carte-projet p {
  color: var(--muted);
  line-height: 1.65;
}

/* ==================== LANGUAGES ==================== */

.Languages .logos {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.logo-item {
  width: 130px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);

  transition: transform 0.25s ease, background 0.25s ease;
}

.logo-item:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
}

.logo-item i {
  font-size: 2.6rem;
}

.logo-item span {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

/* ==================== FOOTER ==================== */

.footer {
  background: linear-gradient(
    180deg,
    rgba(30, 60, 114, 0.55) 0%,
    rgba(42, 82, 152, 0.75) 30%,
    rgba(10, 12, 24, 0.92) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 60px 20px 20px;
  margin-top: 50px;
}

.footer-content {
  width: min(1200px, 92vw);
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.footer-mail {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: white;
  font-size: 1.15rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.footer-social a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.14);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.98);
  transform: translateX(5px);
}

.footer-bottom {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.footer-bottom p {
  margin: 10px 0;
  opacity: 0.9;
}

.footer-bottom i {
  color: #e74c3c;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ==================== UX ELEMENTS ==================== */

#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  z-index: 10000;
  transition: width 0.1s ease;
}

.scroll-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: white;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}

.preloader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.25);
  border-top: 5px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================== REVEAL ANIMATIONS ==================== */

.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal {
  transform: translateY(45px);
}

.reveal-left {
  transform: translateX(-45px);
}

.reveal-right {
  transform: translateX(45px);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translate(0, 0);
}

/* Floating animation for hero image */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-18px);
  }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .experience-info {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  section {
    padding: 7.5rem 1rem 4rem;
  }

  .logo-item {
    width: 115px;
    height: 110px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    bottom: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
}

/* ==================== PAGE INDISPONIBLE ==================== */

body.page-indisponible {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.page-indisponible .container-indisponible {
  width: min(520px, 92vw);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  padding: 28px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.page-indisponible .titre-indisponible {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

.page-indisponible .texte-indisponible {
  color: var(--muted);
  line-height: 1.7;
}

.page-indisponible .lien-retour {
  display: inline-flex;
  margin-top: 1.1rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.page-indisponible .lien-retour:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}
