/* =========================================
   DESIGN SYSTEM – Variables
========================================= */
:root {
  --accent: #0369a1;        /* bleu principal – contraste 4.7:1 sur blanc */
  --accent-hover: #075985;  /* bleu foncé – contraste 6.5:1 sur blanc */
  --black: #111111;
  --gray: #374151;          /* gray-700 – contraste 7:1 sur #f8fafc (WCAG AA ✓) */
  --bg: #f8fafc;            /* slate-50 */
  --border: #e2e8f0;
}

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

/* =========================================
   SCROLL SNAP – Ancrage de chaque section
========================================= */
html {
  scroll-behavior: smooth;
  /* Snap doux : la section la plus proche se recentre au repos du scroll */
  scroll-snap-type: y proximity;
  /* Compense la navbar fixe de 80px pour que l'ancre #section atterrisse bien */
  scroll-padding-top: 80px;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem; /* a bit larger */
  line-height: 1.7; /* higher line-height */
  background-color: var(--bg);
  color: var(--black);
  overflow-x: hidden;
  padding-top: 80px; /* compense la navbar fixe */
}

h1, h2, h3, h4, .hero-title, .apropos-name, .skills-title, .projets-title {
  font-family: 'Outfit', sans-serif;
}

/* =========================================
   NAVBAR – centrée, comme le croquis
========================================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

nav ul {
  display: flex;
  gap: 3rem;
  list-style: none;
}

nav a {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  position: relative;
  transition: color 0.25s;
  letter-spacing: 0.01em;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

nav a:hover,
nav a.active { color: var(--accent-hover); }
nav a:hover::after,
nav a.active::after { width: 100%; background: var(--accent-hover); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  position: absolute;
  right: 1.5rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =========================================
   HERO – 2 colonnes comme le croquis
========================================= */
#aceuil {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  align-content: center;
  gap: 2rem;
  padding: 0 5rem;
  max-width: 1300px;
  margin: 0 auto;
  scroll-snap-align: start; /* Accroche la section au début du viewport */
}

/* --- COLONNE GAUCHE --- */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* Titre principal – bleu cyan comme le croquis */
h1.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Sous-titre – noir, comme le croquis */
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 400;
  color: var(--black);
  line-height: 1.75;
}

/* --- LIENS SOCIAUX (cercles) --- */
.social-links {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  list-style: none; /* ul sémantique sans puces */
  padding: 0;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.social-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--black);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--black);
  transition: all 0.25s;
}

.social-item:hover .social-icon-wrap {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(3, 105, 161, 0.07);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(3, 105, 161, 0.2);
}

.social-text {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--black);
  text-align: center;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- COLONNE DROITE – Photo --- */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-wrapper {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.photo-circle {
  width: clamp(260px, 32vw, 430px);
  height: clamp(260px, 32vw, 430px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ef4444;   /* rouge comme le croquis */
  background: #e5e7eb;
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s;
}

.photo-circle:hover {
  box-shadow: 0 12px 50px rgba(239,68,68,0.2);
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-wrapper:hover .photo-circle img {
  transform: scale(1.04);
}


/* =========================================
   PROJETS – grille de cartes
========================================= */
#projets {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5rem;
  max-width: 1000px;
  margin: 0 auto;
  scroll-snap-align: start;
}

.projets-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--black);
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

.projets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colonnes au lieu de 4 -> 2x plus grand */
  gap: 2.5rem; /* Gap plus grand car les éléments sont plus grands */
  align-items: start;
}

/* --- Carte projet --- */
.projet-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  cursor: pointer;
}

.projet-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10; /* Un peu plus panoramique pour des grandes cartes */
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.25s, transform 0.25s;
}

.projet-card:hover .projet-img-wrap {
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.projet-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.projet-card:hover .projet-img-wrap img {
  transform: scale(1.04);
}

/* Nom du projet centré sur la carte */
.projet-name {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column; /* Permet d'empiler le titre et le texte explicatif */
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--black);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.5rem;
  transition: background 0.25s, transform 0.25s;
}

/* Indicateur explicite de clic (KISS) */
.projet-name::after {
  content: 'Cliquez pour voir les détails';
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-hover);
  background: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-top: 0.8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s, background 0.3s;
}

.projet-card:hover .projet-name {
  background: rgba(255,255,255,0.25);
}
.projet-card:hover .projet-name::after {
  transform: scale(1.05);
  background: var(--bg);
}

/* Stack techno sous la carte */
.projet-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.projet-stack span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-hover);        /* #075985 – contraste 6.5:1 sur fond clair ✓ */
  background: rgba(3, 105, 161, 0.12);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(3, 105, 161, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.projet-card:hover .projet-stack span {
  background: rgba(3, 105, 161, 0.15);
  transform: translateY(-2px);
}

/* --- Modal Projets --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 2rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
  background: var(--accent);
  transform: rotate(90deg);
}

.modal-img-wrap {
  width: 100%;
  height: 250px;
  background: #e2e8f0;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-body {
  padding: 2rem;
}

.modal-title {
  font-size: 2rem;
  color: var(--black);
  margin-bottom: 1rem;
}

.modal-desc {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-stack-extra {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* --- Carte "Voir plus" --- */
.projet-card--more .projet-img-wrap {
  background: #f8fafc;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  border-style: dashed;
}

.projet-card--more:hover .projet-img-wrap {
  border-color: var(--accent);
  background: rgba(34,211,238,0.05);
}

.projet-plus {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

.projet-voir-plus {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s;
}

.projet-card--more:hover .projet-plus,
.projet-card--more:hover .projet-voir-plus {
  color: var(--accent);
}

.projet-card--more:hover .projet-plus {
  transform: rotate(90deg) scale(1.1);
}

/* =========================================
   SKILLS – cartes par catégorie
========================================= */
#skills {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5rem;
  max-width: 1300px;
  margin: 0 auto;
  scroll-snap-align: start;
}

.skills-header {
  margin-bottom: 2.5rem;
}

.skills-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--black);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.skills-sub {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.skill-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.2rem 1.6rem; /* Agrandissement de la hauteur */
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.2rem;
  transition: box-shadow 0.25s, transform 0.25s;
}

.skill-card:hover {
  box-shadow: 0 8px 32px rgba(3, 105, 161, 0.12); /* Ombre bleutée au survol */
  transform: translateY(-3px);
  border-color: rgba(3, 105, 161, 0.3);
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.skill-icon {
  font-size: 1.5rem; /* Un peu plus grand */
  line-height: 1;
  color: var(--accent); /* Remplacer le vert par le bleu (accent) */
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.skill-icon svg, .skill-icon i {
  width: 1em;
  height: 1em;
}

.skill-card-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto; /* Pousse les tags vers le bas si la carte est plus grande */
}

.skill-tag {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.skill-card:hover .skill-tag {
  border-color: var(--accent);
  background: rgba(3, 105, 161, 0.07);
  color: var(--accent-hover);
}

/* =========================================
   À PROPOS – mockups gauche + texte droite
========================================= */
#apropos {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  align-content: center;
  gap: 4rem;
  padding: 0 5rem;
  max-width: 1300px;
  margin: 0 auto;
  scroll-snap-align: start;
}

/* --- Zone mockups (gauche) --- */
.apropos-mockups {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* Téléphone centré en haut */
.mockup-phone {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 145px;
  height: 250px;
  border-radius: 22px;
  border: 3px solid #222;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  position: relative;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 6px;
  background: #222;
  border-radius: 4px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Rangée du bas : tablette + cercle */
.mockup-bottom-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Tablette */
.mockup-tablet {
  flex-shrink: 0;
}

.tablet-frame {
  width: 240px;
  height: 175px;
  border-radius: 14px;
  border: 3px solid #222;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

.tablet-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

/* Cercle */
.mockup-circle {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  border: 3px solid #222;
  overflow: hidden;
  background: #111;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  flex-shrink: 0;
}

.mockup-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Texte (droite) --- */
.apropos-content {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.apropos-name {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.apropos-role {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-hover); /* #075985 – contraste 6.5:1 sur fond clair ✓ */
  margin-top: -0.5rem;
}

.apropos-desc {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.8;
}

.apropos-invite {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin-top: 1rem;
}

/* Flèche animée */
.apropos-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--black);
  color: var(--black);
  font-size: 1.1rem;
  text-decoration: none;
  margin-top: 0.4rem;
  transition: border-color 0.25s, color 0.25s, transform 0.25s, background 0.25s;
  animation: bounce 2s infinite;
}

.apropos-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(34,211,238,0.08);
  transform: translateY(4px);
  animation: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* =========================================
   ANIMATIONS
========================================= */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.65s ease forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.2s;  }
.d3 { animation-delay: 0.35s; }
.d4 { animation-delay: 0.5s;  }
.d5 { animation-delay: 0.15s; }

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 900px) {
  #aceuil { padding: 3rem 2.5rem; gap: 2rem; }
  #apropos { padding: 4rem 2.5rem; gap: 2.5rem; }
}

@media (max-width: 768px) {
  html { scroll-snap-type: none; } /* Désactive le snap sur mobile */
  nav { position: relative; justify-content: center; padding: 1.2rem 1.5rem; }
  .hamburger { display: flex; }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 2rem;
    gap: 1.2rem;
    z-index: 50;
  }
  nav ul.open { display: flex; }

  #aceuil {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem 3rem;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-left { order: 2; align-items: center; }
  .hero-right { order: 1; }
  .social-links { justify-content: center; }

  #apropos {
    grid-template-columns: 1fr;
    padding: 4rem 1.5rem;
    gap: 2.5rem;
    text-align: center;
  }
  .apropos-mockups { order: 1; }
  .apropos-content { order: 2; align-items: center; }
  .apropos-name { text-align: center; }

  #skills { padding: 4rem 1.5rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }

  #projets { padding: 4rem 1.5rem; }
  .projets-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  #aceuil { padding: 2rem 1.2rem 2.5rem; }
  .photo-circle { width: 220px; height: 220px; }
  .social-icon-wrap { width: 46px; height: 46px; font-size: 1.1rem; }
  .social-links { gap: 1rem; }
  h1.hero-title { font-size: 2.2rem; }

  #apropos { padding: 3rem 1.2rem; }
  .phone-frame { width: 90px; height: 160px; }
  .tablet-frame { width: 150px; height: 110px; }
  .mockup-circle { width: 80px; height: 80px; }
  .apropos-name { font-size: 1rem; }

  #skills { padding: 3rem 1.2rem; }
  .skills-grid { grid-template-columns: 1fr; }

  #projets { padding: 3rem 1.2rem; }
  .projets-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .projets-title { font-size: 2rem; }
}

/* =========================================
   FOOTER
========================================= */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: 2rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 400;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}

.footer-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--black);
}

@media (max-width: 600px) {
  footer {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.2rem 1.5rem;
    text-align: center;
  }
}
