html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Allerta Stencil', sans-serif;
  margin: 0;
  background: #F7F9FC;
  color: #333333;
  line-height: 1.6;
}

header {
  background: #0A3D62;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
}

header a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

header a:hover {
  color: grey;
}

.hero {
  position: relative;
  background: url('assets/images/7824-Systemes-Numeriques-Infor.png') center center / cover no-repeat;
  color: white;
  text-align: center;
  padding: 120px 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.5rem;
  max-width: 800px;
}

.btn {
  display: inline-block;
  background: #0A3D62;
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s ease;
}

.btn:hover {
  background: white;
  color: #033f63;
  border: 2px solid #033f63;
  transform: scale(1.08);
}

.section {
  padding: 3rem 2rem;
  text-align: center;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.project-header img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
}

.project-header h3 {
  font-size: 1.6rem;
  color: #033f63;
  margin: 0;
  word-break: break-word;
  white-space: normal;
}

.projects {
  padding: 80px 20px;
  text-align: center;
}

.projects h2 {
  margin-bottom: 100px;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 40px auto 0;
  align-items: stretch;
}

@media (max-width: 900px) {
  .projects-container {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
  }
}

.project-box {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 15px;
  padding: 3rem 2.5rem;
  text-align: left;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 350px;
}

.project-box .btn {
  margin-top: auto;
  width: fit-content;
}

.project-box:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.project-box p {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.tags span {
  background: #e0e0e0;
  color: #0A3D62;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tags span:hover {
  background: #0A3D62;
  color: white;
  transform: scale(1.08);
}

#certifications {
  padding: 100px 20px;
  text-align: center;
}

#certifications h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: black;
}

.certif-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.certif-card {
  background: #033f63;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  width: 85%;
  max-width: 750px;
  padding: 30px 40px;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.certif-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.certif-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: white;
}

.certif-card a {
  display: inline-block;
  text-decoration: none;
  color: #033f63;
  background: #ebf2fa;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.certif-card a:hover {
  background: white;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.skills-list li {
  background: #033f63;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
}

footer {
  background: #033f63;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

#veille {
  padding: 100px 20px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

#veille h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #033f63;
}

#veille p {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 30px;
  line-height: 1.7;
}

.veille-link,
.cv-btn {
  display: inline-block;
  background: #0A3D62;
  color: white;
  padding: 0.9rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.35s ease;
}

.veille-link:hover,
.cv-btn:hover {
  background: white;
  color: #033f63;
  border: 2px solid #033f63;
  transform: scale(1.07);
}

.mail {
  color: #0A3D62;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: 0.3s ease;
}

.mail:hover {
  color: #033f63;
  border-bottom: 2px solid #033f63;
}

@media (max-width: 600px) {
  .project-box {
    padding: 2rem 1.5rem;
  }

  .project-header img {
    width: 45px;
    height: 45px;
  }

  .project-header h3 {
    font-size: 1.3rem;
  }

  .project-box p {
    font-size: 1rem;
  }

  .tags span {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
}

.modal-box {
  background: white;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  width: 80%;
  max-width: 900px;
  text-align: center;
  position: relative;
}

.modal-box img {
  width: 100%;
  height: auto;
}

.close-certif {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #333;
  padding: 6px;
}

.close-certif:hover {
  color: black;
}

.certif-logo {
  width: 60px;
  height: auto;
  display: block;
  margin: 0 auto 15px;
}

.certif-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.certif-modal-content {
  background: #fff;
  width: 85%;
  max-width: 960px;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.certif-modal-content img,
.certif-modal-content iframe {
  width: 100%;
  height: calc(90vh - 60px);
  object-fit: contain;
  display: block;
  border: none;
  background: #fff;
}

.certif-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.certif-nav button {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  opacity: 0.85;
}

.certif-nav button:hover {
  opacity: 1;
}

.certif-btn {
  display: inline-block;
  background: white;
  color: #033f63;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 2px solid #033f63;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.certif-btn:hover {
  background: #033f63;
  color: white;
}
