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

/* =========================
   VARIABLES
========================= */
:root {
  --bg: #f5f8ff;
  --bg-soft: #edf3ff;
  --white: #ffffff;

  --navy: #163b8c;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #dbeafe;

  --text: #0f172a;
  --text-soft: #475569;
  --border: #dbe4f0;

  --shadow-sm: 0 8px 20px rgba(37, 99, 235, 0.08);
  --shadow-md: 0 16px 36px rgba(21, 58, 138, 0.12);
  --shadow-lg: 0 24px 55px rgba(21, 58, 138, 0.16);

  --container: 1200px;
}

/* =========================
   BASE
========================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(135deg, var(--bg) 0%, #ffffff 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* =========================
   NAVBAR
========================= */
.navbar {
  width: 100%;
  padding: 12px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(22, 59, 140, 0.08);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 74px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-frame {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.brand-role {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--blue);
  margin-top: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.96rem;
  transition: 0.25s ease;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--blue);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy), var(--blue));
  transition: 0.25s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* =========================
   HOME HERO (page d'accueil)
========================= */
.hero {
  position: relative;
  padding: 70px 6% 90px;
  overflow: hidden;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 50px;
}

/* Formes décoratives en arrière-plan */
.hero-background-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.shape-one {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35), transparent 70%);
  top: -120px;
  right: -80px;
}

.shape-two {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(22, 59, 140, 0.28), transparent 70%);
  bottom: -150px;
  left: -110px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Le badge "Disponible en alternance" est déjà stylé plus bas,
   on lui donne juste sa marge dans le hero */
.hero .hero-badge {
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--navy);
  line-height: 1.12;
  margin-bottom: 18px;
}

.hero h1 span {
  display: block;
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  font-weight: 600;
  color: var(--blue);
  margin-top: 10px;
}

.hero-description {
  max-width: 560px;
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 1.02rem;
  margin-bottom: 22px;
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-info span {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

/* Boutons */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-3px);
}

/* Image du hero */
.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image-frame {
  width: 100%;
  max-width: 420px;
  border-radius: 30px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.14), rgba(22, 59, 140, 0.18));
  box-shadow: var(--shadow-lg);
}

.hero-image-frame img {
  width: 100%;
  border-radius: 22px;
  object-fit: cover;
}

/* =========================
   PAGE HERO (Projets / Contact)
========================= */
.page-hero {
  padding: 58px 6% 24px;
}

.page-hero-container {
  max-width: var(--container);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  color: var(--navy);
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 1rem;
}

/* =========================
   PROJECTS
========================= */
.projects-section {
  padding: 24px 6% 70px;
}

.projects-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.project-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.vertical-project {
  display: grid;
  gap: 22px;
}

.project-header h2 {
  color: var(--navy);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.project-header p {
  color: var(--text-soft);
  line-height: 1.75;
}

.project-tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.project-text-block h3 {
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 10px;
  margin-top: 18px;
}

.project-text-block h3:first-child {
  margin-top: 0;
}

.project-text-block ul {
  padding-left: 18px;
}

.project-text-block li {
  margin-bottom: 10px;
  color: var(--text-soft);
  line-height: 1.7;
}

/* SLIDER */
.project-slider {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.slider-main {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(22, 59, 140, 0.08);
  background: var(--white);
}

.slider-image {
  width: 100%;
  height: 520px;
  object-fit: contain;
  background: #eef3ff;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.slider-main:hover .slider-image {
  transform: scale(1.01);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(22, 59, 140, 0.78);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 2;
}

.slider-btn.prev {
  left: 12px;
}

.slider-btn.next {
  right: 12px;
}

.slider-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: 0.25s ease;
}

.thumb.active {
  border-color: var(--blue);
  transform: scale(1.03);
}

.video-link-wrapper {
  margin-top: 10px;
}

.video-link {
  display: inline-block;
  text-decoration: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 3000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 85vh;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* =========================
   CONTACT
========================= */
.contact-section {
  padding: 24px 6% 70px;
}

.contact-container-form {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
}

.contact-info-panel,
.contact-form-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.contact-photo-frame {
  width: 140px;
  height: 140px;
  border-radius: 24px;
  padding: 8px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.14), rgba(22, 59, 140, 0.18));
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}

.contact-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.contact-info-panel h2,
.contact-form-card h2 {
  color: var(--navy);
  margin-bottom: 8px;
}

.contact-role {
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 14px;
}

.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.contact-badges span {
  background: var(--blue-light);
  color: var(--navy);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-links-list a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid var(--border);
}

.contact-form-card p {
  color: var(--text-soft);
  margin-bottom: 18px;
  line-height: 1.7;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  outline: none;
  background: #fbfdff;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.submit-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.96rem;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .hero-text {
    align-items: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-info,
  .buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image-frame {
    max-width: 320px;
  }
}

@media (max-width: 900px) {
  .contact-container-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 5%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: auto;
  }

  .nav-menu {
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero {
    padding: 48px 5% 64px;
  }

  .page-hero,
  .projects-section,
  .contact-section {
    padding-left: 5%;
    padding-right: 5%;
  }

  .project-card,
  .contact-info-panel,
  .contact-form-card {
    padding: 22px;
  }

  .slider-image {
    height: 340px;
  }

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

  .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 10px 4%;
  }

  .nav-logo-frame {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 0.86rem;
  }

  .brand-role {
    font-size: 0.62rem;
  }

  .hero-info {
    flex-direction: column;
    align-items: center;
  }

  .hero-info span {
    width: 100%;
    text-align: center;
  }

  .buttons {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .slider-image {
    height: 260px;
  }

  .thumb {
    width: 58px;
    height: 58px;
  }

  .project-card,
  .contact-info-panel,
  .contact-form-card {
    padding: 18px;
  }
}
