:root {
  --color-accent: #6ea8fe;
  --color-accent-dark: #4a86e8;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-text-secondary: #c5d1de;
  --color-beige-light: #e8dcc4;
  --color-beige-dark: #b9976a;
  --color-beige: #e8dcc4;
  --color-navy: #1e3358;
  --color-navy-alt: #1c2e42;
  --color-gray: #4a4a4a;
  --color-gray-dark: #2a2a2a;
}
/* ---- Base ---- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}


body {
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #0A1929 0%, #1E4D8C 25%, #1A3A5C 50%, #1E4D8C 75%, #0A1929 100%);
  background-size: 400% 400%;
  animation: gradient-shift 2s ease infinite;
  color: #e0e6ed;
  transition: color 0.4s ease;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
}

main {
  width: 100%;
}

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 15px 25px;
  background-color: rgba(13, 26, 51, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid #060d16;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  object-fit: cover;
}

.site-name {
  color: var(--color-accent);
  font-size: clamp(18px, 4vw, 22px);
  font-weight: bold;
}

/* Le bouton hamburger est caché par défaut (desktop) */
.menu-toggle {
  background: none;
  border: none;
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 10;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: 0.3s;
}

/* Animation en croix quand le menu est ouvert */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Nav en version desktop : étalée sur toute la largeur */
/* Nav en version desktop : étalée sur toute la largeur */
nav {
  display: flex;
  justify-content: space-between;
  flex: 1;
}
nav a {
  position: relative;
  color: #e0e6ed;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

nav a::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav a:hover {
  background-color: var(--color-navy-alt);
}

nav a:hover::before {
  transform: scaleX(1);
}

nav a:hover {
  background-color: var(--color-navy-alt);
}

#overview {
  padding-left: 25px;
  padding-right: 25px;
}

.overview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ---- Version mobile : hamburger + menu déroulant ---- */
@media (max-width: 768px) {
  .site-header {
    padding-right: 12px;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
    z-index: 200;
  }

  nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #0d1a33;
    padding: 30px 25px 40px;
    margin-left: 0;
    z-index: 100;
    opacity: 0;
    transform: translateY(-15px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  nav.nav-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  nav.nav-open {
    left: 0;
  }

  nav.nav-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }


  nav a {
    color: #e0e6ed;
    text-decoration: none;
    padding: 14px 0;
    font-size: 18px;
  }
  #hero {
    align-items: flex-start;
    padding: 40px 20px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    align-items: center;
  }

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

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

  .overview-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---- Contact section ---- */
#contact {
  padding: 40px 20px;
  text-align: center;
}

#contact h1 {
  font-size: clamp(34px, 6.5vw, 48px);
  color: var(--color-white);
  margin-bottom: 20px;
}

.divider {
  width: 80px;
  height: 3px;
  background-color: var(--color-accent);
  border: none;
  margin: 0 auto 30px;
  border-radius: 2px;
}

#contact h2 {
  color: var(--color-accent);
  font-size: 28px;
  margin-bottom: 15px;
}

#contact p {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ---- Cards ---- */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 950px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background-color: var(--color-navy);
  border-radius: 15px;
  padding: 22px;
  text-align: left;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.contact-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.contact-card .icon svg {
  width: 26px;
  height: 26px;
}

.contact-card a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Mobile : une seule colonne, cartes empilées */
@media (max-width: 768px) {
  .contact-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

/* ---- Responsive mobile ---- */
@media (max-width: 480px) {
  #contact h2 {
    font-size: 22px;
  }
  #contact p {
    font-size: 16px;
  }
  .contact-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  .contact-card {
    padding: 16px;
    gap: 12px;
  }
}
/* ---- Footer ---- */

.site-footer {
  padding: 20px 25px;
  background-color: #0d1a33;
  border-top: 2px solid #060d16;
  margin-top: 40px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-content p {
  color: var(--color-white);
  font-size: 12px;
  margin: 0;
}

.footer-icons {
  display: flex;
  gap: 22px;
}

.footer-icons a {
  color: var(--color-text-secondary);
  width: 26px;
  height: 26px;
  transition: color 0.2s;
}

.footer-icons a:hover {
  color: var(--color-accent);
}

.footer-icons svg {
  width: 100%;
  height: 100%;
}

/* Mobile : empiler texte et icônes */
@media (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
/* ---- Hero ---- */
#hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 30px 0;
  min-height: 85vh;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center top;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

@media (max-width: 768px) {
  body::before {
    background-image: url('images/Accueil.mobile.bleu.jpg');
  }

  body.light-mode::before {
    background-image: url('images/Accueil.mobile.beige.jpg');
  }
}

@media (min-width: 769px) {
  body::before {
    background-image: url('images/Accueil.pc.bleu.jpg');
  }

  body.light-mode::before {
    background-image: url('images/Accueil.pc.beige.jpg');
  }
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(110, 168, 254, 0.15) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

#hero .hero-inner {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  margin: 0 auto;
}

.hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero-text h1 {
  font-size: clamp(30px, 6vw, 42px);
  color: var(--color-white);
  margin-bottom: 10px;
}

.hero-text h2 {
  font-size: 20px;
  color: var(--color-accent);
  font-weight: normal;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 30px;
}

.hero-image {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-white);
  border: 1px solid rgba(110, 168, 254, 0.25);
  border-radius: 20px;
  padding: 25px 35px;
  margin: 0 auto;
  width: 370px;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(110, 168, 254, 0.3);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hero-image:hover {
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.55), 0 0 30px rgba(110, 168, 254, 0.45);
  transform: translateY(-3px);
}

.hero-image img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  margin-bottom: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
}
/* ---- Stats ---- */
.hero-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  color: var(--color-accent);
}

.stat-label {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ---- Boutons ---- */
.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #0d1b2a;
}

.btn-primary:hover {
  background-color: #8fbaff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(110, 168, 254, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-navy-alt);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(110, 168, 254, 0.25);
}
/* ---- Domaines d'intérêt ---- */
#skills {
  text-align: center;
}

#skills h3 {
  color: var(--color-accent);
  font-size: 22px;
  margin-bottom: 20px;
}

.skills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.skill-tag {
  justify-content: center;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  padding: 6px 8px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  min-height: 44px;
}

.dot {
  display: none;
}
/* ---- Séparateur ---- */
main hr {
  border: none;
  border-top: 1px solid var(--color-navy-alt);
  max-width: 1100px;
  margin: 0 auto;
}



.section-title {
  text-align: center;
  color: var(--color-white);
  font-size: 32px;
  margin-bottom: 10px;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--color-accent);
  margin: 15px auto 40px;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(110, 168, 254, 0.6);
}



.overview-card {
  position: relative;
  overflow: hidden;
  background-color: rgba(26, 58, 92, 0.6);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), 0 4px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

body.light-mode .overview-card::before {
  background: var(--color-white);
}

.overview-card:hover::before {
  transform: scaleX(1);
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45), 0 6px 12px rgba(0, 0, 0, 0.3);
}


.overview-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.overview-icon svg {
  width: 42px;
  height: 42px;
}

.overview-card h3 {
  color: var(--color-white);
  font-size: 20px;
  margin-bottom: 12px;
}

.overview-card p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.overview-card a {
  display: inline-block;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  background-color: transparent;
  border: 1.5px solid var(--color-accent);
  padding: 10px 24px;
  border-radius: 30px;
  margin-top: 5px;
  transition: background-color 0.2s;
}

.overview-card a:hover {
  background-color: rgba(110, 168, 254, 0.15);
}

.overview-card a:focus {
  outline: none;
}
/* ---- Anneau pulsant autour de la photo ---- */
/* ---- Anneau pulsant + halo lumineux tournant autour de la photo ---- */
.hero-image::before {
  content: '';
  position: absolute;
  top: 25px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  animation: pulse-ring 2.5s infinite;
  z-index: 1;
}

.hero-image::after {
  content: '';
  position: absolute;
  top: 15px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--color-accent), #a78bfa, var(--color-accent)00, var(--color-accent));
  animation: rotate-ring 6s linear infinite;
  z-index: 0;
  filter: blur(2px);
  opacity: 0.5;
}

.hero-image img {
  animation: float-photo 4s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

@keyframes rotate-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes float-photo {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
/* ---- Éducation ---- */
#education,
#certifications {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 25px;
}

#education h1 {
  font-size: clamp(32px, 6vw, 48px);
  color: var(--color-white);
  text-align: center;
  margin-bottom: 20px;
}

.education-placeholder {
  background-color: var(--color-navy);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  margin-top: 30px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.education-placeholder p {
  color: var(--color-text-secondary);
  font-size: 16px;
  margin: 0;
}

.education-timeline {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 20px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.timeline-marker {
  position: relative;
  width: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -14px;
  bottom: -14px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-accent-dark));
}

.timeline-item:first-child .timeline-marker::before {
  top: 50%;
}

.timeline-item:last-child .timeline-marker::before {
  bottom: 50%;
}

.timeline-dot {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  box-shadow: 0 0 0 4px var(--color-navy), 0 0 18px 3px rgba(110, 168, 254, 0.55);
  z-index: 1;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  opacity: 0;
  animation: timeline-pulse 2.5s ease-out infinite;
}

@keyframes timeline-pulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.education-card {
  position: relative;
  flex: 1;
  background-color: var(--color-navy);
  border-radius: 15px;
  padding: 18px 22px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.education-card:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.education-card::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 22px;
  width: 14px;
  height: 14px;
  background: var(--color-navy);
  transform: rotate(45deg);
  border-radius: 3px;
}

.education-card h3 {
  color: var(--color-white);
  font-size: 20px;
  margin-bottom: 8px;
}

.education-card .education-place {
  color: var(--color-accent);
  font-size: 15px;
  margin-bottom: 5px;
}

.education-card .education-date {
  color: var(--color-text-secondary);
  font-size: 14px;
  font-style: italic;
  margin: 0;
}



.certifications-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

@media (max-width: 600px) {
  .certifications-grid {
    grid-template-columns: 1fr;
  }
}

.certification-card {
  position: relative;
  overflow: hidden;
  background-color: var(--color-navy);
  border-radius: 15px;
  padding: 22px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.certification-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
body.light-mode .certification-card::before {
  background: linear-gradient(135deg, var(--color-beige-dark), var(--color-gray));
}

.certification-card:hover::before {
  transform: scaleX(1);
}

.certification-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

.certification-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.certification-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.certification-icon {
  font-size: 20px;
}

.certification-info h3 {
  color: var(--color-white);
  font-size: 17px;
  margin: 0 0 4px;
}

.certification-issuer {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

.certification-date {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-style: italic;
  margin: 0 0 4px;
}

.certification-id {
  color: var(--color-text-secondary);
  font-size: 12px;
  margin: 0 0 12px;
  word-break: break-all;
}

.verify-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.2s ease;
}

.verify-link i {
  font-size: 12px;
}

.verify-link:hover {
  transform: translateX(4px);
  text-decoration: underline;
}
/* ---- À propos ---- */
#about {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 25px;
}

#about h1 {
  font-size: clamp(32px, 6vw, 48px);
  color: var(--color-white);
  text-align: center;
  margin-bottom: 20px;
}

.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 30px;
}

.about-content {
  flex: 2;
}

.about-content p {
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-content h2 {
  color: var(--color-accent);
  font-size: 22px;
  margin-bottom: 12px;
}

.about-sidebar {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-sidebar-card {
  display: flex;
  gap: 15px;
  background-color: var(--color-navy);
  border-radius: 15px;
  padding: 30px;
  min-height: auto;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.about-sidebar-icon {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.about-sidebar-icon svg {
  width: 100%;
  height: 100%;
}

.about-sidebar-card h3 {
  color: var(--color-accent);
  font-size: 16px;
  font-weight: bold;
  margin: -8px 0 6px;
  line-height: 1.3;
}

.about-sidebar-card p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.about-sidebar-place {
  font-style: italic;
}

.about-sidebar-focus {
  margin-bottom: 0 !important;
}

/* Mobile : empiler texte et carte */
@media (max-width: 768px) {
  .about-layout {
    flex-direction: column;
  }
}
/* ---- Projets ---- */
#project {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 25px;
}

#project h1 {
  font-size: clamp(32px, 6vw, 48px);
  color: var(--color-white);
  text-align: center;
  margin-bottom: 20px;
}
/* ---- Expérience ---- */
#experience {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 25px;
}

#experience h1 {
  font-size: clamp(32px, 6vw, 48px);
  color: var(--color-white);
  text-align: center;
  margin-bottom: 20px;
}
/* ---- Bouton thème clair/sombre ---- */
.nav-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  margin-left: 40px;
}

.nav-wrapper nav {
  margin-left: 0;
  flex: none;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--color-navy-alt);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-accent);
  flex-shrink: 0;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.icon-sun {
  display: none;
}

body.light-mode .icon-moon {
  display: none;
}

body.light-mode .icon-sun {
  display: block;
}
/* ==== Thème clair (dégradés gris clair / beige, accent noir) ==== */
body.light-mode {
  background: linear-gradient(180deg, #f7f7f5 0%, var(--color-beige) 25%, #f0e6d2 50%, var(--color-beige) 75%, #f7f7f5 100%);
  background-size: 400% 400%;
  color: #111111;
}

body.light-mode .site-header {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--color-black);
}

body.light-mode .site-footer {
  background: var(--color-black);
  border-color: var(--color-black);
}

body.light-mode .site-header nav a,
body.light-mode .site-footer .footer-content p {
  color: var(--color-beige);
}

body.light-mode .site-header .site-name {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--color-beige);
}

body.light-mode nav a {
  color: var(--color-black);
  font-weight: 600;
}

body.light-mode nav a:hover {
  background: linear-gradient(135deg, #efe2c8, #e3d3ab);
}

body.light-mode .avatar {
  border-color: #111111;
}

body.light-mode .menu-toggle span {
  background-color: var(--color-beige);
}

body.light-mode .theme-toggle {
  border-color: var(--color-beige);
  color: var(--color-beige);
}

body.light-mode .hero-text h1 {
  color: var(--color-white);
}

body.light-mode .hero-text h2 {
  color: var(--color-beige);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

body.light-mode .hero-text p {
  color: var(--color-text-secondary);
}

body.light-mode .stat-number {
  color: var(--color-beige);
}

body.light-mode .stat-label {
  color: var(--color-beige);
}

body.light-mode .hero-image {
  background: linear-gradient(135deg, var(--color-white) 0%, #f2ede0 100%);
  border-color: #ddcda6;
}

body.light-mode .hero-image img {
  border-color: var(--color-black);
}

body.light-mode .hero-image::before {
  border-color: var(--color-black);
}

body.light-mode .skill-tag {
  background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
  color: var(--color-white);
}

body.light-mode .dot {
  background-color: var(--color-white);
}

body.light-mode #skills h3 {
  color: var(--color-black);
}

body.light-mode .btn-primary {
  background: transparent;
  color: var(--color-beige);
  border: 2px solid var(--color-beige);
}

body.light-mode .btn-primary:hover {
  background: rgba(232, 220, 196, 0.15);
}

body.light-mode .btn-secondary {
  background: var(--color-beige);
  color: var(--color-black);
  border-color: var(--color-beige);
}

body.light-mode .btn-secondary:hover {
  background: linear-gradient(135deg, #efe2c8, #e3d3ab);
  border-color: #efe2c8;
}

body.light-mode main hr {
  border-top-color: #ddcda6;
}

body.light-mode .section-title {
  color: var(--color-white);
}

body.light-mode .section-title::after {
  background: var(--color-white);
}

body.light-mode .contact-card,
body.light-mode .education-card,
body.light-mode .about-sidebar-card {
  background: linear-gradient(135deg, #ece0c6 0%, #dfd0a8 100%);
}

body.light-mode .overview-card {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.35);
}

body.light-mode .timeline-marker::before {
  background: linear-gradient(180deg, var(--color-beige-light), var(--color-beige-dark));
}

body.light-mode .timeline-dot {
  background: linear-gradient(135deg, var(--color-black), #4a4a4a);
  box-shadow: 0 0 0 4px #ece0c6, 0 0 18px 3px rgba(0, 0, 0, 0.35);
}

body.light-mode .timeline-dot::after {
  border-color: var(--color-black);
}

body.light-mode .education-card::before {
  background: #ece0c6;
}

body.light-mode .overview-icon {
  background: transparent;
  color: var(--color-white);
}
body.light-mode .contact-card .icon {
  color: var(--color-black);
}

body.light-mode .education-card h3,
body.light-mode .about-sidebar-icon {
  color: var(--color-black);
}

body.light-mode .overview-card h3 {
  color: var(--color-white);
}

body.light-mode .contact-card a,
body.light-mode .about-sidebar-card p,
body.light-mode .education-card .education-date,
body.light-mode .education-placeholder p {
  color: var(--color-gray-dark);
}

body.light-mode .about-content p {
  color: var(--color-beige-light);
}

body.light-mode .overview-card p {
  color: var(--color-white);
}

body.light-mode .education-placeholder {
  background: linear-gradient(135deg, #ece0c6 0%, #dfd0a8 100%);
}

body.light-mode .overview-card a {
  color: var(--color-white);
  background: transparent;
  border-color: var(--color-white);
}

body.light-mode .overview-card a:hover {
  background: rgba(255, 255, 255, 0.15);
}

body.light-mode .overview-card a:focus {
  outline: none;
}
body.light-mode .overview-card:focus {
  border-color: var(--color-white);
}

body.light-mode .footer-content p {
  color: var(--color-black);
}

body.light-mode .footer-icons a {
  color: var(--color-beige);
}

body.light-mode .footer-icons a:hover {
  color: var(--color-black);
}

body.light-mode .education-card .education-place,
body.light-mode .about-sidebar-card h3 {
  color: var(--color-black);
}

body.light-mode #contact h2 {
  color: var(--color-white);
}

body.light-mode #about h1,
body.light-mode #contact h1,
body.light-mode #education h1,
body.light-mode #project h1,
body.light-mode #experience h1 {
  color: var(--color-white);
}

body.light-mode .about-content h2 {
  color: var(--color-beige-dark);
}

body.light-mode #contact p {
  color: var(--color-beige-light);
}

body.light-mode .divider {
  background: var(--color-beige-light);
}

body.light-mode .certification-card {
  background-color: #ece0c6;
}

body.light-mode .certification-icon {
  background: linear-gradient(135deg, #e3d5b0, #d6c294);
  color: var(--color-black);
}

body.light-mode .certification-info h3 {
  color: var(--color-black);
}

body.light-mode .certification-issuer,
body.light-mode .certification-date,
body.light-mode .certification-id,
body.light-mode .verify-link {
  color: var(--color-black);
}

/* Mobile : bouton reste visible à côté du hamburger */
@media (max-width: 768px) {
  .nav-wrapper {
    flex: none;
    margin-left: 0;
    gap: 15px;
  }

  .nav-wrapper nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }
}
.theme-toggle-mobile {
  display: none;
}

@media (max-width: 768px) {
  .nav-wrapper > .theme-toggle {
    display: none;
  }

  .theme-toggle-mobile {
    display: flex;
    margin-top: 15px;
  }
}
@media (max-width: 480px) {
  .hero-image {
    padding: 25px 20px;
  }

  .skill-tag {
    white-space: normal;
    padding: 6px 10px;
    font-size: 11px;
    text-align: center;
  }

  .skills-list {
    gap: 8px;
  }
}
@media (max-width: 768px) {
  body.light-mode nav {
    background: linear-gradient(180deg, #f8f1e0 0%, #efe2c8 100%);
  }
}
/* ---- Effet machine à écrire pour le nom (Accueil) ---- */
.typewriter {
  display: inline-block;
  white-space: nowrap;
  border-right: 3px solid var(--color-accent);
  clip-path: inset(0 100% 0 0);
  animation: typing 2s steps(20, end) forwards, blink-cursor 0.75s step-end 4, hide-cursor 0.1s forwards 5s;
  animation-delay: 0s, 2s, 0s;
}

@keyframes typing {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0% 0 0); }
}

@keyframes blink-cursor {
  50% { border-color: transparent; }
}

@keyframes hide-cursor {
  to { border-color: transparent; }
}
/* ---- Apparition en fondu du contenu ---- */
main > section,
main > *,
.overview-card,
.contact-card,
.education-card,
.about-sidebar-card {
  animation: fade-slide-down 0.7s ease forwards;
  opacity: 0;
}

main > section:nth-child(1) { animation-delay: 0.1s; }
main > section:nth-child(2) { animation-delay: 0.25s; }

.overview-card:nth-child(1) { animation-delay: 0.2s; }
.overview-card:nth-child(2) { animation-delay: 0.35s; }
.overview-card:nth-child(3) { animation-delay: 0.5s; }
.overview-card:nth-child(4) { animation-delay: 0.65s; }

.contact-card:nth-child(1) { animation-delay: 0.2s; }
.contact-card:nth-child(2) { animation-delay: 0.35s; }
.contact-card:nth-child(3) { animation-delay: 0.5s; }

@keyframes fade-slide-down {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ---- Lien actif dans le menu ---- */
nav a.active {
  color: var(--color-accent);
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -4px;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* Mode clair : le lien actif suit l'accent noir du reste du site */
body.light-mode nav a.active {
  color: var(--color-beige);
}

body.light-mode nav a.active::after {
  background-color: var(--color-beige);
}

/* Menu mobile : soulignement centré sous le texte */
@media (max-width: 768px) {
  nav a.active::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 30px;
  }
}
/* ---- Gouttes de pluie réalistes sur vitre ---- */
.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.raindrop {
  position: absolute;
  top: -10%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%,
    rgba(255, 255, 255, 0.9),
    rgba(190, 215, 255, 0.5) 35%,
    rgba(120, 150, 200, 0.2) 65%,
    transparent 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
  animation: raindrop-fall linear infinite;
}

.raindrop::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  width: 2px;
  height: 60px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(190, 215, 255, 0.35));
  border-radius: 2px;
}

body.light-mode .raindrop {
  background: radial-gradient(circle at 30% 25%,
    rgba(232, 220, 196, 0.9),
    rgba(232, 220, 196, 0.5) 35%,
    rgba(232, 220, 196, 0.2) 65%,
    transparent 100%);
}

body.light-mode .raindrop::before {
  background: linear-gradient(to bottom, transparent, rgba(232, 220, 196, 0.35));
}

@keyframes raindrop-fall {
  to {
    transform: translateY(120vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .raindrop {
    animation: none;
    display: none;
  }
}
/* ---- Cartes de projet dépliables ---- */
.project-card {
  background-color: var(--color-navy);
  border-radius: 15px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.project-header h3 {
  color: var(--color-white);
  font-size: 20px;
  margin: 0;
}

.project-date {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.project-diagram {
  width: 100%;
  min-height: 160px;
  background-color: #14264a;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7f96b8;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.project-description {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.project-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.project-github svg {
  width: 18px;
  height: 18px;
}

.project-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.project-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.project-toggle.open svg {
  transform: rotate(180deg);
}

.project-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid #2a4270;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease, padding-top 0.4s ease;
}

.project-details.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 20px;
  padding-top: 20px;
}

.project-details h4 {
  color: var(--color-accent);
  font-size: 15px;
  margin: 0 0 10px;
}

.project-details ul {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 18px;
  padding-left: 20px;
}

.project-details p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  background-color: #14264a;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

body.light-mode .project-card {
  background: linear-gradient(135deg, #ece0c6 0%, #dfd0a8 100%);
}

body.light-mode .project-header h3,
body.light-mode .project-details h4 {
  color: var(--color-black);
}

body.light-mode .project-diagram {
  background-color: #f0e6d2;
  color: #6a5a3a;
}

body.light-mode .project-description,
body.light-mode .project-details ul,
body.light-mode .project-details p {
  color: var(--color-gray-dark);
}

body.light-mode .project-github,
body.light-mode .project-tech span {
  color: var(--color-black);
}

body.light-mode .project-tech span {
  background-color: #e3d5b0;
}
/* Mode clair : badge date et bouton "Voir les détails" en noir/beige (au lieu du bleu) */
body.light-mode .project-date {
  background: var(--color-black);
  color: var(--color-beige);
}

body.light-mode .project-toggle {
  background: var(--color-black);
  color: var(--color-beige);
}

/* Correction mode clair : menu mobile (fond beige clair) doit avoir un texte noir */
@media (max-width: 768px) {
  body.light-mode .site-header nav a {
    color: var(--color-black);
  }

  body.light-mode .site-header nav a.active {
    color: var(--color-black);
  }

  body.light-mode .site-header nav a.active::after {
    background-color: var(--color-black);
  }
}
