/* =========================
   RESET & BASE GLOBALE
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: #020617; /* très sombre, neutre */
  color: #e5e7eb;
}

/* Pour éviter les débordements horizontaux */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

section {
  width: 100%;
  padding: 6rem 1.5rem 4rem;
  box-sizing: border-box;
  position: relative;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* =========================
   HEADER & NAVBAR
   ========================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

nav .logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: #e5e7eb;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: flex-end;
}

nav a {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cbd5f5;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

nav a:hover,
nav a.active {
  color: #38bdf8;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* =========================
   HERO
   ========================= */

section.hero {
  min-height: 100vh;
  padding: 6rem 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  color: #f9fafb;
  background:
    linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.95),
      rgba(8, 47, 73, 0.9)
    ),
    url("img/index.jpg") center/cover no-repeat;
}

section.hero .container {
  max-width: 800px;
}

section.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  margin-bottom: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

section.hero p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #e5e7eb;
}

section.hero a {
  color: #38bdf8;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

section.hero a:hover {
  color: #7dd3fc;
  border-color: #7dd3fc;
}

/* Flèche scroll down commune */
.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  fill: #e5e7eb;
  cursor: pointer;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -10px);
  }
  60% {
    transform: translate(-50%, -5px);
  }
}

/* =========================
   TITRES & SECTIONS
   ========================= */

section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
}

.dark-section h2,
.contact-section h2 {
  color: #e5e7eb;
}

.underline {
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  margin: 0.5rem auto 2.5rem;
  border-radius: 999px;
}

/* =========================
   SECTIONS SOMBRES (Soft-skills, Expériences, Loisirs)
   ========================= */

.dark-section {
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #020617 100%);
  color: #e5e7eb;
}

/* Grille générique (soft-skills, formations, etc.) */
.soft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.8rem 2rem;
}

/* Cartes génériques */
.soft-item {
  background: rgba(15, 23, 42, 0.03);
  border-radius: 0.9rem;
  padding: 1.75rem 1.5rem;
  text-align: left;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.soft-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.soft-item p {
  font-size: 0.95rem;
  color: #4b5563;
}

.dark-section .soft-item {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9);
}

.dark-section .soft-item h3 {
  color: #e5e7eb;
}

.dark-section .soft-item p {
  color: #cbd5f5;
}

.soft-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  border-color: #38bdf8;
}

/* =========================
   FORMATIONS
   ========================= */

#formations {
  background: #f9fafb;
}

#formations .soft-item {
  text-align: left;
  background: #ffffff;
}

#formations .soft-item img {
  width: 60px;
  margin: 0 0 1rem;
  filter: saturate(1.15);
}

#formations .soft-item h3 {
  margin-bottom: 0.75rem;
}

#formations .soft-item p {
  color: #4b5563;
}

/* =========================
   EXPÉRIENCES
   ========================= */

#experiences {
  background: #020617;
}

/* =========================
   PROJETS
   ========================= */

#projets {
  background: #f1f5f9;
  color: #0f172a;
}

#projets h2 {
  color: #0f172a;
}

/* Filtres (si tu en ajoutes plus tard) */
.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.projects-filters select {
  padding: 0.5rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.9rem;
  background: #ffffff;
}

/* Grille des projets */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0.9rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
  background: #020617;
  transform: translateY(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.project-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.1)
  );
  color: #f9fafb;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.2rem;
  text-align: center;
}

.project-card .overlay h3 {
  font-size: 1.1rem;
  margin: 0;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.25);
  filter: brightness(1.03);
}

.project-card:hover img {
  transform: scale(1.08);
}

/* =========================
   MODALE PROJET
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #f9fafb;
  padding: 1.8rem 1.6rem 1.6rem;
  max-width: 550px;
  width: 100%;
  border-radius: 1rem;
  position: relative;
  text-align: left;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.6);
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  font-size: 1.6rem;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #111827;
}

.modal-content h3 {
  margin-top: 0.4rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #0f172a;
}

.modal-content img {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 0 0 1rem;
}

.modal-content p {
  font-size: 0.98rem;
  color: #374151;
  margin-bottom: 1.2rem;
}

.modal-content .btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.55rem 1.4rem;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.modal-content .btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.35);
}

/* =========================
   LOISIRS
   ========================= */

#loisirs {
  background: radial-gradient(circle at top, #0b1120 0, #020617 60%, #020617 100%);
}

/* =========================
   SECTION CONTACT
   ========================= */

.contact-section {
  position: relative;
  background:
    linear-gradient(
      150deg,
      rgba(15, 23, 42, 0.95),
      rgba(8, 47, 73, 0.9)
    ),
    url("img/index.jpg") center/cover no-repeat;
  color: #fff;
  padding: 6rem 1.5rem 5rem;
}

.contact-overlay {
  background-color: rgba(15, 23, 42, 0.65);
  padding: 3.5rem 1.5rem 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.9);
}

.contact-section h2 {
  font-size: 2.1rem;
}

.contact-details,
.contact-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 4rem;
  margin-bottom: 2.5rem;
}

.detail-item {
  text-align: center;
  min-width: 140px;
}

.detail-item .icon {
  width: 42px;
  height: 42px;
  fill: #e5e7eb;
  margin-bottom: 0.6rem;
}

.detail-item p {
  font-size: 1.05rem;
  margin: 0;
}

.detail-item a {
  color: #f9fafb;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.detail-item a:hover {
  border-color: #f9fafb;
}

.contact-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.contact-footer a {
  color: #38bdf8;
  text-decoration: none;
  font-size: 1.05rem;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.contact-footer a:hover {
  color: #7dd3fc;
  border-color: #7dd3fc;
}

/* Flèche remontée */
.scroll-up {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  fill: #e5e7eb;
  cursor: pointer;
  animation: bounce 2s infinite;
}

/* =========================
   FOOTER
   ========================= */

footer {
  background-color: #020617;
  color: #9ca3af;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

footer p {
  margin: 0;
}

footer a {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

footer a:hover {
  border-color: #38bdf8;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  nav ul {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  section {
    padding: 5.5rem 1.2rem 3.5rem;
  }

  section.hero {
    padding-top: 5.5rem;
  }

  section.hero h1 {
    font-size: 2.4rem;
  }

  section.hero p {
    font-size: 1rem;
  }

  .soft-item {
    padding: 1.4rem 1.2rem;
  }

  .project-card img {
    height: 190px;
  }

  .contact-overlay {
    padding: 2.5rem 1.5rem 2.5rem;
  }

  .contact-details,
  .contact-more {
    gap: 2rem;
  }
}

@media (max-width: 520px) {
  nav .logo {
    font-size: 0.85rem;
  }

  nav ul {
    gap: 0.7rem;
  }

  nav a {
    font-size: 0.75rem;
  }

  .modal-content {
    padding: 1.4rem 1.2rem 1.3rem;
  }

  .modal-content h3 {
    font-size: 1.2rem;
  }

  .modal-content p {
    font-size: 0.93rem;
  }
}
