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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f7f9fc;
  color: #0f172a;
  line-height: 1.6;
}

/* HEADER */

.header {
  width: 100%;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;

  position: sticky;
  top: 0;

  z-index: 1000;
}

.navbar {
  max-width: 1200px;
  position: relative;
  margin: auto;
  padding: 20px 30px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;

  font-size: 28px;
  font-weight: 800;

  color: #2563eb;

  letter-spacing: 1px;
}

.nav-links {
  list-style: none;

  display: flex;

  gap: 30px;
}

.nav-links a {
  text-decoration: none;

  color: #334155;

  font-size: 15px;
  font-weight: 600;

  transition: 0.2s;
}

.nav-links a:hover {
  color: #2563eb;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #0f172a;
}

/* HERO */

.hero {
  max-width: 1200px;

  margin: auto;

  min-height: 85vh;

  padding: 80px 30px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 60px;
}

.hero-content {
  flex: 1;
}

.hero-small-title {
  color: #2563eb;

  font-weight: 700;

  font-size: 18px;

  margin-bottom: 5px;
}

.hero h1 {
  font-size: 70px;

  line-height: 1;

  margin-bottom: 18px;

  color: #0f172a;
}

.hero h2 {
  font-size: 28px;

  color: #334155;

  margin-bottom: 20px;
}

.hero h2 span {
  color: #2563eb;
}

.hero-description {
  max-width: 600px;

  font-size: 18px;

  color: #64748b;

  margin-bottom: 22px;
}

.hero-tags {
  display: flex;

  gap: 10px;

  flex-wrap: wrap;

  margin-bottom: 30px;
}

.hero-tags span {
  background-color: #eff6ff;

  color: #2563eb;

  padding: 7px 14px;

  border-radius: 50px;

  font-size: 14px;

  font-weight: 600;
}

.hero-buttons {
  display: flex;

  gap: 15px;

  flex-wrap: wrap;
}

.btn {
  display: inline-block;

  padding: 13px 22px;

  border-radius: 8px;

  text-decoration: none;

  font-weight: 700;

  transition: 0.2s;
}

.btn-primary {
  background-color: #2563eb;

  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;

  transform: translateY(-2px);
}

.btn-secondary {
  color: #2563eb;

  border: 2px solid #2563eb;

  background-color: white;
}

.btn-secondary:hover {
  background-color: #eff6ff;
}

/* HERO VISUAL */

.hero-visual {
  flex: 1;

  display: flex;

  justify-content: center;
}

.code-card {
  width: 380px;

  padding: 35px;

  border-radius: 20px;

  background-color: #0f172a;

  color: white;

  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.code-top {
  display: flex;

  gap: 8px;

  margin-bottom: 35px;
}

.code-top span {
  width: 12px;
  height: 12px;

  border-radius: 50%;

  background-color: #64748b;
}

.code-card p {
  color: #60a5fa;

  font-family: monospace;

  margin-bottom: 10px;
}

.code-card h3 {
  font-size: 45px;

  margin-bottom: 5px;
}

.code-card h4 {
  font-size: 30px;

  color: #60a5fa;

  margin-bottom: 15px;
}

/*A propos*/

.apropos-section {
  text-align: center;
  padding: 70px 30px;
  max-width: 1200px;
  margin: auto;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 25px;
  margin-top: 35px;
}

.about-card {
  background-color: white;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/*Mon parcours*/

.parcours-section {
  text-align: center;
  padding: 70px 30px;
  max-width: 1200px;
  margin: auto;
}
.timeline {
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 30px;
  margin-bottom: 30px;
  position: relative;
}

.timeline-content {
  background-color: white;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.timeline-date {
  color: blue;
  font-size: 18px;
  font-weight: 700;
  padding-top: 20px;
  text-align: right;
}

.current-item .timeline-content {
  border: 2px solid #2563eb;
  background-color: #f8fbff;
}

.current-item::before {
  width: 18px;
  height: 18px;
  left: 126px;
}

.timeline::before {
  content: "";
  position: absolute;

  width: 3px;
  height: 100%;

  background-color: #2563eb;

  left: 134px;
  top: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;

  width: 14px;
  height: 14px;

  border-radius: 50%;

  background-color: #2563eb;

  left: 128px;
  top: 28px;
}

.status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.status-done {
  background-color: #dcfce7;
  color: #166534;
}

.status-current {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.status-next {
  background-color: #f1f5f9;
  color: #475569;
}

.status-goal {
  background-color: #ede9fe;
  color: #6d28d9;
}

.status-future {
  background-color: #ecfeff;
  color: #0e7490;
}

/*mes realisations*/

.realisations-section {
  max-width: 1200px;
  margin: auto;
  padding: 70px 30px;
  text-align: center;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.project-card {
  background-color: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s;
}
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 25px;
  text-align: left;
}

.project-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.project-content p {
  color: #64748b;
  font-size: 15px;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.project-tags span {
  background-color: #eff6ff;
  color: #2563eb;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/*mes stages*/

.stages-section {
  max-width: 1200px;
  margin: auto;
  padding: 70px 30px;
  text-align: center;
}
.stages-container {
  margin-top: 30px;
  display: grid;
  gap: 30px;
}

.stage-card {
  display: grid;
  grid-template-columns: 40% 60%;
  min-height: 320px;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.stage-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-content {
  padding: 35px;
  text-align: left;
}

.stage-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  margin-bottom: 20px;
}

.stage-tags span {
  background-color: #eff6ff;
  color: #2563eb;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.stage-link {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  background-color: transparent;
  color: #2563eb;
  text-decoration: none;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease;
}
.stage-link:focus-visible {
  color: #1d4ed8;
  background-color: #eff6ff;
  text-decoration-line: underline;
}
@media (hover: hover) and (pointer: fine) {
  .stage-link:hover {
    color: #1d4ed8;
    background-color: #eff6ff;
    text-decoration-line: underline;
  }
}

.stage-company {
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 12px;
}

/*mes competence*/
.competences-section {
  max-width: 1200px;
  margin: auto;
  padding: 70px 30px;
  text-align: center;
}

.competences-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 35px;
}

.competence-card {
  background-color: white;
  padding: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.competence-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.competence-tags span {
  background-color: #eff6ff;
  color: #2563eb;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* veille technologique */

.veille-section {
  max-width: 1200px;
  margin: auto;
  padding: 70px 30px;
  text-align: center;
}

.veille-intro {
  max-width: 700px;
  margin: 10px auto 0;
  color: #64748b;
}

.veille-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 35px;
}

.veille-card {
  background-color: white;
  padding: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.veille-category {
  display: inline-block;
  background-color: #dbeafe;
  color: #1d4ed8;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 15px;
}

.veille-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.veille-card p {
  color: #64748b;
}

.veille-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  margin-bottom: 20px;
}

.veille-tags span {
  background-color: #eff6ff;
  color: #2563eb;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.veille-link {
  display: inline-block;
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.veille-link:hover {
  background-color: #1d4ed8;
}

/* contact */

.contact-section {
  max-width: 1200px;
  margin: auto;
  padding: 70px 30px;
  text-align: center;
}

.contact-intro {
  max-width: 700px;
  margin: 10px auto 0;
  color: #64748b;
}

.contact-container {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 30px;
  margin-top: 35px;
}

.contact-info,
.contact-form {
  background-color: white;
  padding: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  text-align: left;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
}
.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}
.contact-form button {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.contact-form button:hover {
  background-color: #1d4ed8;
}

/*footer*/

.footer {
  background-color: #0f172a;
  color: white;
  padding: 30px;
  margin-top: 50px;
}

.footer-content {
  max-width: 1200px;
  margin: auto;

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

  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: #60a5fa;
}

/*modal*/
.modal {
  display: none;

  position: fixed;
  inset: 0;

  background-color: rgba(15, 23, 42, 0.65);

  z-index: 2000;

  align-items: center;
  justify-content: center;

  padding: 20px;
}
.modal.open {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 850px;

  max-height: 90vh;
  overflow-y: auto;

  background-color: white;

  padding: 35px;

  border-radius: 16px;

  position: relative;
}

.modal-close {
  position: absolute;

  top: 18px;
  right: 18px;

  background: none;
  border: none;

  font-size: 24px;
  cursor: pointer;

  color: #64748b;
}

.modal-close:hover {
  color: #0f172a;
}

/*stage 1er*/
.modal-stage-meta {
  color: #2563eb;
  font-weight: 600;
  margin-top: 5px;
  margin-bottom: 25px;
}

.modal-section {
  margin-top: 25px;
}

.modal-section h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.modal-section p,
.modal-section li {
  color: #64748b;
}

.modal-section ul {
  padding-left: 20px;
}

.modal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.modal-tags span {
  background-color: #eff6ff;
  color: #2563eb;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.modal-resources {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.modal-resources a {
  text-decoration: none;
  color: #2563eb;
  border: 1px solid #2563eb;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.modal-resources a:hover {
  background-color: #eff6ff;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.modal-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

/*images*/

.image-preview {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;

  align-items: center;
  justify-content: center;

  padding: 20px;
  background-color: rgba(15, 23, 42, 0.9);
}

.image-preview.open {
  display: flex;
}

.image-preview img {
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.image-preview-close {
  position: absolute;
  top: 20px;
  right: 24px;

  border: none;
  background: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
}
/* RESPONSIVE */

@media (max-width: 850px) {
  /*nav*/
  .nav-links {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;

    width: 100%;
    background-color: white;

    flex-direction: column;
    gap: 0;

    padding: 20px 30px;

    border-top: 1px solid #e5e7eb;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 10px 0;
  }
  .menu-toggle {
    display: block;
  }
  /* hero */
  .hero {
    flex-direction: column;

    text-align: center;

    padding-top: 60px;
  }

  .hero h1 {
    font-size: 50px;
  }

  .hero-tags {
    justify-content: center;
  }

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

  .code-card {
    width: 100%;
    max-width: 380px;
  }

  /*stage*/
  .stage-card {
    grid-template-columns: 1fr;
  }
  .stage-image {
    height: 220px;
  }
  .stage-content {
    padding: 25px;
  }

  /* ABOUT */
  .about-cards {
    grid-template-columns: 1fr;
  }

  /* PROJECTS */
  .projects-container {
    grid-template-columns: 1fr;
  }

  /* TIMELINE */
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 30px;
  }

  .timeline-date {
    text-align: left;
    padding-top: 0;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-item::before {
    left: 1px;
    top: 8px;
  }

  .timeline-content {
    padding: 20px;
  }

  /* Bigger dot for current position */
  .current-item::before {
    width: 18px;
    height: 18px;
    left: -1px;
    top: 6px;
  }

  /*mes competences*/
  .competences-container {
    grid-template-columns: 1fr;
  }

  /*veille*/

  .veille-container {
    grid-template-columns: 1fr;
  }
  .contact-container {
    grid-template-columns: 1fr;
  }

  /*footer*/

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }
}
/* PFMP stage: retain the portfolio's existing blue, white and slate palette. */
.stage-card {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.stage-content h3 {
  font-size: 28px;
  margin: 6px 0;
}
.stage-content h4 {
  margin-top: 22px;
}
.stage-missions {
  padding-left: 20px;
  margin: 10px 0 18px;
}
.stage-missions li {
  margin-bottom: 7px;
}
.stage-team {
  color: #475569;
  font-size: 14px;
  margin-bottom: 22px;
}
.stage-link {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.stage-overview {
  padding: 35px;
  background: #f8fbff;
  border-left: 1px solid #e5e7eb;
  text-align: left;
  min-width: 0;
}
.stage-project-visual {
  background: #0f172a;
  color: #60a5fa;
  padding: 26px;
  border-radius: 12px;
  margin-bottom: 25px;
}
.stage-project-visual span {
  font-family: monospace;
}
.stage-project-visual strong {
  display: block;
  color: white;
  font-size: 27px;
  margin: 14px 0 5px;
}
.stage-project-visual p {
  margin-bottom: 14px;
}
.stage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid #dbeafe;
  padding-top: 18px;
  text-align: center;
}
.stage-stats dt {
  color: #2563eb;
  font-size: 25px;
  font-weight: 700;
}
.stage-stats dd {
  color: #475569;
  font-size: 12px;
}
.stage-architecture {
  background: #eff6ff;
  border-radius: 8px;
  padding: 16px;
  color: #1d4ed8 !important;
  font-weight: 600;
}
.modal-section p + p {
  margin-top: 12px;
}
.modal-section li {
  margin-bottom: 9px;
}
.modal-content h2,
.photo-gallery-content h2 {
  padding-right: 48px;
  line-height: 1.3;
}
.photo-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.75);
}
.photo-gallery-modal.open {
  display: flex;
}
.photo-gallery-content {
  width: 100%;
  max-width: 1050px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  background: white;
  border-radius: 16px;
  padding: 35px;
  position: relative;
}
.photo-gallery-content > p {
  color: #475569;
  margin-top: 16px;
}
.modal-content {
  max-height: 90dvh;
}
.modal-content,
.photo-gallery-content {
  overscroll-behavior: contain;
}
.gallery-close,
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -10px -10px 0 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: white;
  color: #475569;
  font-size: 24px;
  cursor: pointer;
  z-index: 1;
}
.modal-resources button {
  font: inherit;
  font-weight: 600;
  color: #2563eb;
  border: 1px solid #2563eb;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.modal-resources button:hover {
  background: #eff6ff;
}
.modal-resources button:disabled {
  border-color: #cbd5e1;
  color: #64748b;
  background: #f8fafc;
  cursor: default;
}
.modal-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery-thumbnail {
  min-width: 0;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f1f5f9;
  cursor: zoom-in;
  overflow: hidden;
}
.modal-gallery img {
  display: block;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: contain;
  transition: transform 0.2s;
}
.gallery-thumbnail:hover img {
  transform: scale(1.03);
}
.image-preview {
  position: fixed;
  inset: 0;
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 70px 20px 20px;
  background: rgba(15, 23, 42, 0.94);
}
.image-preview img {
  max-width: 100%;
  max-height: calc(100dvh - 100px);
  object-fit: contain;
  border-radius: 8px;
}
.image-preview-close {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: #0f172a;
  border: 1px solid #64748b;
  border-radius: 8px;
  color: white;
  font-size: 26px;
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
body.modal-open {
  overflow: hidden;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}
@media (max-width: 850px) {
  .stage-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage-overview {
    border-left: 0;
    border-top: 1px solid #e5e7eb;
    padding: 25px;
  }
  .modal-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .modal,
  .photo-gallery-modal {
    padding: 10px;
  }
  .modal-content,
  .photo-gallery-content {
    padding: 20px;
    max-height: calc(100dvh - 20px);
  }
  .modal-content h2,
  .photo-gallery-content h2 {
    font-size: 21px;
  }
  .modal-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage-content,
  .stage-overview {
    padding: 20px;
  }
  .stage-project-visual {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .modal-gallery img {
    transition: none;
  }
}

/* PFMP: school photograph, technology tiles and contribution hierarchy. */
.stage-school {
  margin: 0 0 24px;
}
.stage-school > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 12px;
}
.stage-school figcaption {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
}
.stage-school a {
  color: #2563eb;
}
.technology-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}
.technology-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  background: white;
  border-radius: 10px;
  font-size: 13px;
  color: #334155;
}
.technology-tile img {
  flex-shrink: 0;
  object-fit: contain;
}
.contribution-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.mission-group,
.initiative-card {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  margin-top: 12px;
  background: white;
}
.mission-group summary,
.initiative-card summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 600;
  color: #1e3a8a;
}
.mission-group ul {
  padding: 0 24px 16px 36px;
}
.initiative-card p {
  padding: 0 16px 18px;
}
.personal-initiatives {
  padding: 24px;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  border-radius: 12px;
}
.personal-initiatives > .contribution-label {
  background: #2563eb;
  color: white;
}
.skills-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.skills-groups article {
  padding: 18px;
  background: #f8fafc;
  border-radius: 10px;
}
.skills-groups h4 {
  margin-bottom: 8px;
  color: #1e3a8a;
}
.endpoint-families {
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  font-family: monospace;
  overflow-wrap: anywhere;
}
.modal-section {
  overflow-wrap: anywhere;
}
summary:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .skills-groups {
    grid-template-columns: 1fr;
  }
  .technology-tile {
    padding: 9px;
    font-size: 12px;
    gap: 7px;
  }
  .personal-initiatives {
    padding: 16px;
  }
}

/* Keep the close action clear of text while scrolling long dialogs. */
.dialog-toolbar {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: -35px;
  z-index: 2;
  background: white;
  padding: 8px 0;
  margin: -20px 0 8px;
}
.dialog-toolbar .modal-close,
.dialog-toolbar .gallery-close {
  position: static;
  float: none;
  margin: 0;
}
#stages {
  scroll-margin-top: 90px;
}
@media (max-width: 520px) {
  .dialog-toolbar {
    top: -20px;
    margin-top: -10px;
  }
  .stage-content h3 {
    font-size: 24px;
    line-height: 1.35;
  }
}

/* Co’ordi: reuse the existing timeline and layered dialogs. */
.coordi-cover {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  margin: 16px 0;
}
.coordi-meta,
.coordi-role-note {
  color: #64748b;
  font-size: 0.9rem;
}
.coordi-gallery-grid figure {
  margin: 0;
  min-width: 0;
}
.coordi-gallery-grid .gallery-thumbnail {
  width: 100%;
}
.coordi-gallery-grid figcaption {
  margin-top: 8px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}
#coordi-modal h2,
#parcours .timeline-content h3 {
  overflow-wrap: anywhere;
}
#coordi-certificate-status {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #64748b;
}

/* Photo header for the Co’ordi experience. */
#coordi-modal .modal-content {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.coordi-hero {
  position: relative;
  flex: 0 0 auto;
  height: 290px;
  isolation: isolate;
  background: #172337;
}
.coordi-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
  z-index: -2;
}
.coordi-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.03) 20%,
    rgba(15, 23, 42, 0.3) 50%,
    rgba(15, 23, 42, 0.94) 100%
  );
  z-index: -1;
}
.coordi-hero-title {
  position: absolute;
  bottom: 25px;
  left: 30px;
  right: 30px;
  color: white;
}
.coordi-hero-title > p {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
#coordi-modal .coordi-hero-title h2 {
  color: white;
  padding: 0;
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}
#coordi-modal .coordi-hero-close {
  position: absolute;
  top: 16px;
  right: 16px;
  float: none;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: white;
  z-index: 2;
}
.coordi-modal-body {
  padding: 28px 35px;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
@media (max-width: 520px) {
  .coordi-hero {
    height: 250px;
  }
  .coordi-hero-title {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
  #coordi-modal .coordi-hero-title h2 {
    font-size: 21px;
  }
  .coordi-modal-body {
    padding: 22px 20px;
  }
}
@media (max-height: 600px) {
  .coordi-hero {
    height: 180px;
  }
}
/* Final portfolio refinements — preserve existing dialog and gallery styles. */
:root {
  --blue: #2563eb;
  --ink: #14243c;
  --muted: #536279;
  --line: #dce3ed;
}
body {
  color: var(--ink);
  background: #f7f9fc;
}
a {
  color: #1d4ed8;
}
button,
a {
  touch-action: manipulation;
}
button {
  font-family: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 5px;
}
section[id] {
  scroll-margin-top: 100px;
}
.navbar {
  padding: 18px 28px;
  max-width: 1240px;
}
.nav-links {
  gap: 20px;
}
.nav-links a {
  font-size: 14px;
}
.logo {
  letter-spacing: -2px;
  font-size: 30px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #536279;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero {
  min-height: 0;
  max-width: 1200px;
  padding: 72px 30px 88px;
  gap: 65px;
  align-items: center;
}
.hero-content {
  flex: 1;
  max-width: 620px;
}
.hero h1 {
  font-size: clamp(3rem, 5.5vw, 4.7rem);
  letter-spacing: -0.055em;
  line-height: 1.03;
  margin: 26px 0 24px;
  color: #14243c;
}
.accent {
  color: var(--blue);
}
.hero h2 {
  font-size: 22px;
  margin-bottom: 12px;
}
.positioning {
  font-size: 16px;
  font-weight: 600;
  color: #405471;
}
.hero-description {
  font-size: 17px;
  line-height: 1.75;
  max-width: 510px;
  margin: 20px 0 25px;
}
.availability {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #1e4f98;
  border: 1px solid #c9daf8;
  background: #eef4ff;
  padding: 8px 13px;
  border-radius: 6px;
}
.hero-buttons {
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  font-size: 14px;
  padding: 13px 18px;
  border-radius: 6px;
}
.hero-social {
  display: flex;
  gap: 24px;
  margin-top: 27px;
  font-size: 14px;
  font-weight: 600;
}
.hero-social a {
  text-decoration: none;
}
.hero-portrait {
  width: 365px;
  flex-shrink: 0;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #13243c;
  box-shadow: 20px 20px 0 #e6edf7;
}
.hero-portrait img {
  width: 100%;
  height: 455px;
  object-fit: cover;
  display: block;
}
.hero-portrait figcaption {
  padding: 18px 22px;
  color: white;
  font-size: 17px;
  font-weight: 600;
}
.hero-portrait figcaption span {
  display: block;
  color: #b7c7dc;
  font-size: 13px;
  font-weight: 400;
  margin-top: 4px;
}
.apropos-section,
.parcours-section,
.realisations-section,
.stages-section,
.competences-section,
.certifications-section,
.veille-section,
.contact-section {
  max-width: 1200px;
  margin: auto;
  padding: 68px 30px;
  text-align: left;
}
.apropos-section,
.realisations-section,
.competences-section,
.veille-section {
  border-top: 1px solid var(--line);
}
section[id] > h2 {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-align: left;
  margin-bottom: 30px;
}
.about-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
}
.about-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}
.timeline {
  max-width: none;
  margin-top: 32px;
}
.timeline-item {
  padding-bottom: 24px;
}
.timeline-content {
  padding: 23px 26px;
  border: 1px solid var(--line);
  box-shadow: none;
  background: white;
  border-radius: 8px;
}
.timeline-content h3 {
  font-size: 19px;
  margin: 8px 0;
}
.timeline-content p {
  font-size: 15px;
}
.timeline-content .identity-mark {
  float: right;
  padding: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #13243c;
  background: #f2f5fa;
  border-radius: 5px;
  max-width: 100px;
}
.meta {
  font-size: 14px !important;
  color: #536279;
}
.status {
  display: inline-block;
  font-size: 12px !important;
  letter-spacing: 0.03em;
  font-weight: 700;
  background: #edf3fb;
  color: #315b91;
  padding: 4px 9px;
  border-radius: 4px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
}
.project-tags span {
  background: #f0f4f9;
  color: #425570;
  border: 1px solid #e3e9f1;
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 4px;
}
.future-road {
  border-left: 3px solid var(--blue);
  padding: 20px 25px;
  background: #edf3fc;
  margin-top: 20px;
}
.future-road h3 {
  font-size: 23px;
  margin-bottom: 10px;
}
.future-road p {
  margin-bottom: 8px;
}
.ctf-evidence {
  margin: 20px 0 0;
}
.ctf-evidence img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ctf-evidence figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  border: 1px solid var(--line);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.project-card:hover {
  transform: none;
  box-shadow: 0 7px 22px #17325b0c;
}
.project-content {
  padding: 27px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-content h3 {
  font-size: 22px;
  letter-spacing: -0.025em;
  margin-bottom: 13px;
}
.project-content p {
  font-size: 15px;
  line-height: 1.75;
}
.project-content .eyebrow {
  font-size: 11px;
  line-height: 1.6;
}
.project-content .stage-link {
  align-self: flex-start;
  margin-top: auto;
}
.flagship {
  grid-column: span 2;
  background: #14243c;
  color: white;
}
.flagship .project-content {
  padding: 32px;
}
.flagship h3 {
  font-size: 32px;
  color: white;
}
.flagship p,
.flagship .eyebrow {
  color: #c5d4e7;
}
.flagship .stage-link {
  color: #a9cbff;
}
.flagship .stage-link:focus-visible {
  color: #d7e7ff;
  background-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .flagship .stage-link:hover {
    color: #d7e7ff;
    background-color: transparent;
  }
}
.flagship .project-tags span {
  color: #dbe8fb;
  background: #263954;
  border-color: #344b6a;
}
.stage-link {
  font-size: 14px;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.competences-container,
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.competence-card {
  padding: 25px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  box-shadow: none;
  text-align: left;
}
.competence-card h3 {
  font-size: 19px;
  margin-bottom: 12px;
}
.competence-card p {
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.75;
}
.proof {
  font-size: 14px !important;
  color: #5b6980;
  margin-top: 16px;
}
.mapping {
  margin-top: 25px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.mapping summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
}
.mapping p {
  font-size: 15px;
  margin: 16px 0;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  min-width: 150px;
}
thead {
  background: #f2f5f9;
}
.cyber-note {
  margin-top: 24px;
  background: #edf3fc;
  border-left: 3px solid var(--blue);
  padding: 27px;
}
.cyber-note h3 {
  font-size: 22px;
  margin-bottom: 10px;
}
.cyber-note p {
  margin: 10px 0;
}
.veille-question {
  max-width: none;
  padding: 27px;
  border-left: 3px solid var(--blue);
  background: #edf3fc;
  margin-bottom: 24px;
}
.veille-question h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.veille-intro {
  margin: 0 0 26px;
  text-align: left;
}
.contact-section {
  background: #14243c;
  color: white;
  border-radius: 9px;
  margin: 40px auto 55px;
  max-width: 1140px;
  padding: 44px;
}
.contact-section .eyebrow {
  color: #a6bad3;
}
.contact-section h2 {
  color: white;
  margin-bottom: 16px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: 27px;
}
.contact-links a {
  color: #c5ddff;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.footer-content {
  max-width: 1140px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: auto;
}
.footer {
  padding: 26px 30px;
  background: #f7f9fc;
  color: #536279;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.experience-footer {
  padding: 23px 0;
}
.experience-footer p {
  margin: 15px 0 4px;
}
.modal-content > p {
  margin: 15px 0;
}
.modal-content h2 {
  line-height: 1.3;
}
.modal-section p {
  line-height: 1.8;
}
.skip-link {
  position: fixed;
  left: 15px;
  top: -100px;
  z-index: 99999;
  background: white;
  padding: 14px;
}
.skip-link:focus {
  top: 15px;
}
.modal[hidden],
.photo-gallery-modal[hidden],
.image-preview[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .nav-links {
    gap: 12px;
  }
  .nav-links a {
    font-size: 13px;
  }
  .hero {
    gap: 35px;
  }
  .hero-portrait {
    width: 310px;
  }
  .hero-portrait img {
    height: 420px;
  }
  .projects-container {
    grid-template-columns: 1fr 1fr;
  }
  .contact-section {
    margin-left: 25px;
    margin-right: 25px;
  }
  .hero-buttons .btn {
    font-size: 13px;
  }
}
@media (max-width: 760px) {
  .navbar {
    padding: 14px 20px;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 18px 24px;
    box-shadow: 0 12px 18px #152a4210;
  }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    gap: 13px;
  }
  .nav-links a {
    font-size: 16px;
  }
  .hero {
    flex-direction: column;
    align-items: stretch;
    padding: 42px 22px 50px;
    gap: 38px;
  }
  .hero h1 {
    font-size: 3.35rem;
  }
  .hero h2 {
    font-size: 20px;
  }
  .hero-portrait {
    width: 100%;
    max-width: 420px;
    align-self: center;
    box-shadow: 9px 9px 0 #e6edf7;
  }
  .hero-portrait img {
    height: 390px;
    object-position: center 35%;
  }
  .hero-social {
    gap: 25px;
  }
  .hero-description {
    font-size: 16px;
  }
  .apropos-section,
  .parcours-section,
  .realisations-section,
  .stages-section,
  .competences-section,
  .certifications-section,
  .veille-section {
    padding: 45px 22px;
  }
  .about-copy,
  .projects-container,
  .competences-container,
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .flagship {
    grid-column: auto;
  }
  .about-copy {
    gap: 18px;
  }
  .timeline-content {
    padding: 20px;
  }
  .timeline-content .identity-mark {
    font-size: 15px;
  }
  .timeline-date {
    font-size: 14px;
  }
  .future-road {
    padding: 20px;
  }
  .contact-section {
    margin: 20px 16px 32px;
    padding: 30px 22px;
  }
  .contact-links {
    flex-direction: column;
    gap: 15px;
  }
  .footer-content {
    flex-direction: column;
  }
  .modal-content {
    max-width: calc(100vw - 24px);
    padding: 20px !important;
  }
  .modal-section {
    overflow-wrap: anywhere;
  }
  .modal-content h2 {
    font-size: 25px;
  }
  .project-content {
    padding: 24px;
  }
  .flagship .project-content {
    padding: 25px;
  }
  .eyebrow {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
.identity-mark img {
  display: block;
  width: 120px;
  max-width: 100%;
  height: 48px;
  object-fit: contain;
}
.timeline-content .identity-mark {
  max-width: 140px;
}
.timeline-content .coordi-brand {
  background: #14243c;
}
.stage-school img {
  object-fit: cover;
}
@media (max-width: 760px) {
  .timeline-content h3 {
    clear: both;
    padding-top: 12px;
  }
  .timeline-content .identity-mark {
    margin-bottom: 4px;
  }
  .timeline-content .status {
    margin-top: 12px;
  }
}


/* Language switch */
.language-switch {
  flex: 0 0 auto;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}
.language-switch:hover { color: #1d4ed8; }
