/* ===============================
   RESET & BASE
================================== */


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


html {
  scroll-padding-top: 3rem; 
}


@media (max-width: 480px) {
  html {
    scroll-padding-top: 2rem; 
  }
}


@media (min-width: 1200px) {
  html {
    scroll-padding-top: 4rem; 
  }
}


@media (min-width: 1400px) {
  html {
    scroll-padding-top: 1rem; 
  }
}

body { font-family:'Poppins',sans-serif; background:#FDFDFD; color:#1E2019; line-height:1.6; }

/* ===============================
   NAVBAR
================================== */
/* Navbar Toggler */
.navbar-custom .navbar-toggler-icon {
    filter: invert(1);
}

/* Navbar globale */
.navbar-custom {
    background: #003153;
    padding: clamp(0.3rem, 1.5vw, 0.8rem) 0; /* un peu moins de padding sur petit écran */
}

/* Logo */
.navbar-brand {
    font-size: clamp(1.3rem, 4vw, 1.8rem); /* réduit légèrement sur mobile */
    font-weight: 500;
    color: #FDFDFD !important;
}

/* Liens de navigation */
.navbar-nav .nav-link {
    font-size: clamp(0.9rem, 2vw, 1.1rem); /* plus petit sur mobile */
    color: #FDFDFD !important;
    margin: 0 0.4rem;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #FFD500 !important;
}

/* ===============================
   HERO
================================== */
.hero-section {
  padding-top: max(clamp(4rem, 10vw, 6rem), 80px); /* 80px = navbar desktop fixe */
  padding-bottom: clamp(2rem, 5vw, 4rem);
  text-align: left;
}

/* Mobile */
@media (max-width: 480px) {
  .hero-section {
    padding-top: max(clamp(4rem, 10vw, 6rem), 100px); /* navbar mobile + marge sécurité */
  }
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2rem;
  text-align: left;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.8rem);
  font-weight: 400;
  color: #587B7F;
  margin-bottom: 1.5rem;
  text-align: left;
}

.hero-subsubtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: #587B7F;
  margin-bottom: 1.5rem;
  text-align: left;
}

.profile-image { width:clamp(150px, 15vw, 250px); height:clamp(150px, 15vw, 250px); border-radius:50%; object-fit:cover; margin:0; box-shadow:4px 4px 19px rgba(0,0,0,0.25); }
.hero-buttons { display:flex; flex-wrap:wrap; gap:0.5rem; justify-content:flex-start; }

/* ===============================
   BUTTONS
================================== */
.btn-custom.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

.btn-custom {
  background:#754668; color:#fff; border:none; border-radius:21px;
  padding:clamp(0.5rem,1vw,0.8rem) clamp(1rem,2vw,1.5rem);
  font-size:clamp(0.9rem,1.5vw,1rem); font-weight:500;
  display:inline-block; transition:all 0.3s ease;
}
.btn-custom:hover { background:#5a3450; transform:translateY(-2px); color:#fff; }
.btn-secondary {
  background:#003153; color:#fff; border:none; border-radius:21px;
  padding:clamp(0.4rem,1vw,0.6rem) clamp(0.8rem,1.5vw,1.2rem);
  font-size:clamp(0.9rem,1.5vw,1rem); font-weight:500; transition:all 0.3s ease;
}


.small-card {
  width: 100%;
  max-width: 220px; /* largeur max plus petite */
  height: 180px;    /* hauteur réduite */
  font-size: 0.9rem; /* texte un peu plus petit */
}

.small-card .card-title {
  font-size: 1.1rem; /* titre plus petit */
}

.small-card .card-text {
  font-size: 0.85rem;
  line-height: 1.2;
}


/* ===============================
   TITLES & TEXT
================================== */
.section-title { font-size:clamp(1.5rem,5vw,4rem); font-weight:600; line-height:1.2; margin-bottom:2rem; color:#1E2019; text-align:left; }
.section-text { font-size:clamp(0.9rem,2vw,1rem); font-weight:500; color:#000000; text-align:left; }
.section-text-number { font-size:clamp(0.9rem,2vw,2rem); font-weight:500; color:#000000; text-align:center; }

.stat-number,
.stat-number {
  color: #587B7F; /* même couleur que .section-text */
  font-weight: 500;
}

.stat-number {
  font-size: clamp(1.5rem, 4vw, 2rem); /* ajustable selon le design */
}

.stat-text {
  font-size: clamp(0.9rem, 2vw, 1rem);
}

body.dark-mode .stat-number {
    color: #a86a99; /* bleu par défaut pour dark mode */
}

body.dark-mode .stat-text {
    color: #a86a99; /* bleu par défaut pour dark mode */
}





/* ===============================
   CARDS & FLIP
================================== */
.card-flip {
  perspective: 1000px;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
}

#skillsRadar {
  max-width: 100%;
  height: auto !important;
}
body.dark-mode #skillsRadar {
  filter: brightness(0.85) contrast(1.2);
}


/* Front et Back préparés pour une hauteur identique */
.card-flip > .card-front,
.card-flip > .card-back {
  background: #FDFDFD;
  border: 2px solid #D9D9D9;
  border-radius: 15px;
  padding: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  transition: transform 0.6s;
  min-height: 0; /* permet au JS de recalculer correctement la hauteur */
  box-sizing: border-box; /* assure que padding et border sont inclus dans la hauteur */
}

.card-front {
  position: relative;
  z-index: 2;
}

.card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

/* Effet flip */
.card-flip:hover .card-front {
  transform: rotateY(180deg);
}

.card-flip:hover .card-back {
  transform: rotateY(0deg);
}


.card-title { font-size:clamp(1rem,2.5vw,1.2rem); font-weight:600; color:#754668; margin-bottom:0.5rem; }
.card-text { font-size:clamp(0.9rem,2vw,1rem); font-weight:500; color:#587B7F; }
.about-card { background:#FDFDFD; border:2px solid #D9D9D9; border-radius:15px; padding:clamp(0.5rem,1vw,0.8rem) clamp(0.8rem,1.5vw,1rem); margin-bottom:0.5rem; min-height:50px; text-align:center; color:#587B7F; transition:transform 0.3s ease; }
.experience-card {
  background: #FDFDFD;
  border: 2px solid #D9D9D9;
  border-radius: 15px;
  padding: clamp(0.5rem, 1vw, 0.8rem) clamp(0.8rem, 1.5vw, 1rem);
  margin-bottom: 0.5rem;
  min-height: 50px;
  text-align: center;
  color: #754668;
  transition: transform 0.3s ease;
  font-weight: bold;
  height: 100%;        
  display: flex;       
  align-items: center; 
  justify-content: center; 
}
.experience-card:hover {
  transform: translateY(-5px);
}

.project-card-link { text-decoration:none; color:inherit; display:block; }
.project-image { max-width:100%; margin-bottom:1rem; border-radius:0.5rem; }

/* ===============================
   FOOTER
================================== */
.footer-custom { background:#003153; color:#fff; padding:clamp(1rem,3vw,1.5rem) 0; text-align:center; font-size:clamp(0.8rem,1.5vw,1rem); font-weight:500; margin-top:3rem; }
.footer-custom a { color:#fff; margin:0 0.8rem; font-size:clamp(1.2rem,2vw,1.5rem); transition:color 0.3s; }
.footer-custom a:hover { color:#FFD500; }
.footer-custom span { display:block; margin-top:0.5rem; font-size:clamp(0.7rem,1.2vw,0.9rem); }

/* ===============================
   DIVIDERS
================================== */
.divider { 
  width: 60%; 
  height: 2px; 
  margin: 2rem auto; 
  border: none; 
  background-color: #003153; 
}

.divider-vertical {
  width: 0.5px;
  height: 90%;
  background-color: #003153;
  transform: scaleX(0.5); 
  margin: 0 auto;
}



/* ===============================
   LOGOS
================================== */
.company-logo { height:clamp(50px,10vw,80px); object-fit:contain; display:block; margin:0.5rem auto; max-width:100%; }

/* ===============================
   SECTIONS
================================== */
section:not(#education, #projects, #skills) {
  padding: clamp(1rem, 3vw, 2rem) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Styles spécifiques pour la section Education */
#education {
  padding: 3rem 0; /* ou ce que tu veux */
  display: block; /* pour annuler le flex */
}

section:not(.hero-section) {
  scroll-margin-top: 80px; /* valeur par défaut pour desktop */
}

/* Responsive adjustments */
@media (max-width: 480px) {
  section:not(.hero-section) {
    scroll-margin-top: 60px; /* mobile */
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  section:not(.hero-section) {
    scroll-margin-top: 70px; /* tablettes */
  }
}



@media (min-width: 769px) and (max-width: 1024px) {
  section:not(.hero-section) {
    scroll-margin-top: 80px; /* petits desktops / grands tablettes */
  }
}

@media (min-width: 1025px) {
  section:not(.hero-section) {
    scroll-margin-top: 90px; /* grands écrans */
  }
}


#project-container { display:block; min-height:auto; padding-top:clamp(1rem,2vw,2rem); }

.main-offset {
  padding-top: 5rem;   
  padding-bottom: 5rem;

  @media (max-width: 480px) {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  @media (min-width: 1200px) {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}


/* ===============================
   RESPONSIVE
================================== */
@media (max-width: 480px) {

  .hero-title { font-size:2rem; }
  .hero-subtitle { font-size:1rem; }
  .hero-subsubtitle { font-size:1rem; }
  .section-title { font-size:1.2rem; }
  .profile-image { width:120px; height:120px; }
  .btn-custom { padding:0.4rem 0.8rem; font-size:0.85rem; }
  section { padding:1rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-text { font-size: 0.85rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .hero-title { font-size:2.5rem; }
  .hero-subtitle { font-size:1.2rem; }
  .hero-subsubtitle { font-size:1.2rem; }
  .section-title { font-size:1.5rem; }
  .profile-image { width:150px; height:150px; }
  .btn-custom { padding:0.5rem 1rem; font-size:0.9rem; }
  .stat-number { font-size: 1.75rem; }
  .stat-text { font-size: 0.9rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title { font-size:3rem; }
  .hero-subtitle { font-size:1.5rem; }
  .hero-subsubtitle { font-size:1.5rem; }
  .section-title { font-size:2.5rem; }
  .profile-image { width:200px; height:200px; }
  .btn-custom { padding:0.7rem 1.2rem; font-size:0.95rem; }
  .stat-number { font-size: 2rem; }
  .stat-text { font-size: 1rem; }
}

@media (min-width:1025px) {
  section { min-height:100vh; }
  .hero-buttons .btn-custom { min-width:200px; }
  .stat-number { font-size: 2rem; }
  .stat-text { font-size: 1rem; }
}


/* ===============================
   DARK MODE - GLOBAL STYLE
================================== */

body.dark-mode {
  background: #1a1a1a; /* fond sombre uniforme */
  color: #f0f0f0; /* texte principal clair */
}

/* Navbar */
body.dark-mode .navbar-custom {
  background: #111;
  border-bottom: 1px solid #333;
}

body.dark-mode .navbar-custom .nav-link {
  color: #ddd;
  transition: color 0.3s ease;
}

body.dark-mode .navbar-custom .nav-link:hover {
  color: #a86a99 !important; /* accent violet */
}

/* Section titles */
body.dark-mode .section-title {
  color: #fff;
  border: None;
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* Texte secondaire (ex: sous-titre du hero) */
body.dark-mode .hero-subtitle, body.dark-mode .hero-subsubtitle,
body.dark-mode #about p {
  color: #cfd6db; /* gris clair lisible */
}

.btn i {
  font-size: 1.5rem; /* agrandir les icônes pour plus de visibilité */
}


body.dark-mode #experience p {
  color: #cfd6db; /* gris clair lisible */
}

/* ===============================
   BUTTONS
================================== */

body.dark-mode .btn-custom {
  background-color: #8E5A82; /* violet adouci */
  color: #fff;
  border: none;
  transition: all 0.3s ease-in-out;
}

body.dark-mode .btn-custom:hover {
  background-color: #A86A99; /* accent plus vif */
  box-shadow: 0 0 12px rgba(174, 101, 155, 0.6);
  transform: translateY(-2px);
}

/* ===============================
   CARDS (About / Experience / Projects)
================================== */
body.dark-mode .card-custom,
body.dark-mode .about-card,
body.dark-mode .experience-card,
body.dark-mode .project-card {
  background: #222; /* gris foncé uniforme */
  border: 2px solid #333;
  color: #f0f0f0;
  border-radius: 12px;
  transition: all 0.3s ease-in-out;
}


body.dark-mode .card-custom:hover {
  border-color: #A86A99;
  box-shadow: 0 0 10px rgba(174, 101, 155, 0.5);
}

body.dark-mode .about-card:hover,
body.dark-mode .experience-card:hover,
body.dark-mode .project-card:hover {
  border-color: #A86A99;
  box-shadow: 0 0 10px rgba(174, 101, 155, 0.5);
  transform: translateY(-3px);
}

/* Key points spécifiquement */
body.dark-mode .card-custom .about-card {
  background: #1e1e1e;
}




/* ===============================
   LOGOS ENTREPRISES/ÉCOLES
================================== */
body.dark-mode .logo-img {
  filter: grayscale(100%) brightness(0.75);
  transition: all 0.3s ease-in-out;
}

body.dark-mode .logo-img:hover {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

/* ===============================
   DIVIDERS
================================== */
body.dark-mode .divider {
  background: linear-gradient(90deg, transparent, #A86A99, transparent);
  height: 2px;
  opacity: 0.9;
  border: none;
}

body.dark-mode .divider-vertical {
  background: linear-gradient(180deg, transparent, #A86A99, transparent);
  width: 2px;
  opacity: 0.9;
  border-radius: 2px;
}

/* ===============================
   FOOTER
================================== */
body.dark-mode .footer-custom {
  background: #111;
  color: #bbb;
  border-top: 1px solid #333;
}

body.dark-mode .footer-custom a {
  color: #fff;
  transition: color 0.3s ease;
}

body.dark-mode .footer-custom a:hover {
  color: #A86A99;
}


body.dark-mode .project-card {
  background: #222;
  border: 2px solid #333;
  color: #f5f5f5;
  border-radius: 12px;
  transition: all 0.3s ease-in-out;
}

body.dark-mode .project-card:hover {
  border-color: #A86A99;
  box-shadow: 0 0 10px rgba(174, 101, 155, 0.5);
  transform: translateY(-3px);
}

/* Titre du projet */
body.dark-mode .project-card .card-title {
  color: #c7a2c4; /* violet clair */
}

/* Texte descriptif */
body.dark-mode .project-card .card-text {
  color: #cfd6db !important; /* gris clair lisible */
}

/* Bouton */
body.dark-mode .project-card .btn {
  background-color: #8E5A82;
  color: #fff;
  border: none;
  transition: all 0.3s ease-in-out;
}

body.dark-mode .project-card .btn:hover {
  background-color: #A86A99;
  box-shadow: 0 0 10px rgba(174, 101, 155, 0.7);
  transform: translateY(-2px);
}


.logo-ubi, .logo-ubi2 {
  background: url("assets/img/logo_ubi.svg") no-repeat center/contain;
}


.logo-afop {
  background: url("assets/img/afop.png") no-repeat center/contain;
}




/* Project cards modern style */
.link-clean {
  text-decoration: none;
  color: inherit;
}

.wf-card {
  background: var(--bs-body-bg);
  border: 1px solid #3333;
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
  transition: all 0.25s ease-in-out;
}

.wf-card:hover {
  border-color: #A86A99;
  box-shadow: 0 4px 12px rgba(174, 101, 155, 0.3);
  transform: translateY(-3px);
}

.project-thumb {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: 1rem;
}

.muted {
  color: #6c757d;
  font-size: 0.9rem;
}

.tag {
  display: inline-block;
  background: #eee;
  color: #333;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  margin-right: 0.4rem;
  border-radius: 6px;
}

body.dark-mode .wf-card {
  background: #222;
  border: 1px solid #333;
  color: #f5f5f5;
}

body:not(.dark-mode) .tag {
    background: rgba(168,106,153,0.15); 
    color: var(--accent); 
    border: 1px solid var(--accent);
}

body.dark-mode .tag {
    background: linear-gradient(135deg, #a86a99, #d17fb5);
    color: #fff;
  }






.education-card {
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.3);
      padding: clamp(1rem, 2vw, 1.5rem);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
      transition: all 0.3s ease-in-out;
    }

    .education-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 12px 30px rgba(168, 106, 153, 0.4); /* violet accent hover */
      border-color: rgba(168, 106, 153, 0.6);
    }

    .education-card .card-title {
      font-size: clamp(1.2rem, 2.5vw, 1.5rem);
      font-weight: 600;
      color: #754668;
      margin-bottom: 0.5rem;
    }

    .education-card .card-text {
      font-size: clamp(0.95rem, 2vw, 1rem);
      font-weight: 500;
      color: #587B7F;
    }

    body.dark-mode .education-card {
      background: rgba(20, 20, 30, 0.85);
      border: 1px solid #444;
      color: #f0f0f0;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode .education-card:hover {
      border-color: #A86A99;
      box-shadow: 0 12px 30px rgba(168, 106, 153, 0.7);
    }

    body.dark-mode .education-card .card-title {
      color: #c7a2c4;
    }

    body.dark-mode .education-card .card-text {
      color: #cfd6db;
    }

    .education-card h5 {
      font-weight: 500;
      font-size: clamp(1rem, 2vw, 1.2rem);
      margin-bottom: 1rem;
      color: #587B7F; /* clair en light mode */
    }

    body.dark-mode .education-card h5 {
      color: #d1b3e0 !important;; /* violet clair pour dark mode, lisible */
    }



:root {
  --nav-height: 80px;
}

/* navbar fixed coherent */
.navbar-custom.fixed-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* fallback si JS Off */
body {
  padding-top: var(--nav-height);
}

/* pour que les ancres (#about, #skills...) s'arrêtent au bon endroit */
html {
  scroll-padding-top: var(--nav-height);
}
