@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~HEADER~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

header {
    background-color: #333;
    color: white;
    padding: 2em;
    text-align: center;
}

header h1 {
    font-weight: bold;
}

header p {
    margin-top: 25px;
    margin-bottom: 25px;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~BODY~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
body {
    background-color: #f4f4f4;
    overflow-x: hidden;
}

body a {
    color: white;
    text-decoration: none;
}

nav {
    background-color: #444;
    height: 3.5em;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav a:hover {
    color: #666666;
}

ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
    font-size: 18px;
}

li {
    margin: 0 15px;
}

h2#BVN {
    color: black;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 2.5rem;
}

.accueil {
    text-align: left;
}

h2#s1 {
    font-family: Arial, Helvetica, sans-serif;
    margin-left: 10px;
    margin-bottom: 15px;
}

main {
    background-color: white;
    padding: 2em;
    max-width: 1375px;
    margin: auto;
}

#accueil, #formations, #experiences, #certifications, #competences, #projet {
    padding-bottom: 30px;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ACCUEIL~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
.about-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.container {
    max-width: 85%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-content {
    flex: 1.5;
    min-width: 300px;
    text-align: justify;
}

.about-content h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
}

.about-content p {
    line-height: 1.6;
    color: #666;
}

.interests {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

#accueil h4 {
    color: white;
}

#accueil h2, #accueil h3 {
    text-align: center;
}

.cv-container {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.btn-cv {
    display: inline-block;
    padding: 12px 25px;
    background-color: #333;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-cv:hover {
    background-color: transparent;
    color: #333 !important;
    border-color: #333;
    transform: translateY(-3px);
}

#accueil ul {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~FORMATIONS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
:root {
  --primary-color: #666666;
}

.timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 150px;
  left: 0;
  right: 0;
  height: 4px;
  background: #ccc;
  z-index: 1;
}

.timeline-item {
  width: 30%;
  position: relative;
  z-index: 2;
  text-align: center;
}

.diploma-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.diploma-card:hover {
  transform: translateY(-10px);
}

.diploma-photo {
  height: 150px;
  background: #eee;
}

.diploma-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.diploma-info {
  padding: 15px;
  border-top: 3px solid var(--primary-color);
}

.diploma-info h3 {
  margin: 0;
  font-size: 1.1em;
  color: #333;
}

.school {
  font-style: italic;
  color: #666;
  margin: 5px 0;
}

.year {
  font-weight: bold;
  color: var(--primary-color);
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~EXPERIENCES (CORRIGÉES)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 40px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Désactivation définitive de l'ancienne ligne globale problématique */
.timeline-middle-line {
    display: none !important;
}

/* Chaque bloc génère son morceau de ligne noire */
.timeline-row {
    display: flex;
    width: 100%;
    position: relative;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 40px; /* Espace entre les cartes */
}

/* IMPORTANT : On supprime le padding du dernier bloc pour enlever le trou blanc du bas */
.timeline-row:last-child {
    padding-bottom: 0;
}

/* Génération de la ligne noire centrale dynamique */
.timeline-row::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #333;
    transform: translateX(-50%);
    z-index: 1;
}

/* Le premier bloc commence la ligne noire pile au niveau de son premier point */
.timeline-row:first-child::after {
    top: 30px;
}

/* IMPORTANT : Le dernier bloc arrête sa ligne noire pile au milieu du dernier point */
.timeline-row:last-child::after {
    bottom: auto;
    height: 30px; 
}

/* Les points noirs sur la ligne centrale */
.timeline-row::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 30px;
    width: 16px;
    height: 16px;
    background: #333;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

/* Style et comportements des cartes d'expérience */
.experience-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    width: 42%; 
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.experience-card:hover { 
    border-color: #333; 
    background: #f9f9f9; 
    transform: scale(1.05);
    z-index: 10;
}

.experience-card h3 {
    margin: 5px 0;
    font-family: 'Poppins', sans-serif;
}

.hint {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Placement alterné Gauche / Droite */
.gauche {
    justify-content: flex-start;
}
.gauche .experience-card {
    margin-right: auto;
    transform-origin: left center;
}

.droite {
    justify-content: flex-end;
}
.droite .experience-card {
    margin-left: auto;
    transform-origin: right center;
}

/* Fenêtres Modales d'Expérience (Popups) */
.modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    animation: zoomIn 0.3s ease-out;
}

#modal-text ul {
    display: block !important;
    text-align: left;
    padding-left: 25px;
}
#modal-text li {
    display: list-item !important;
    margin-top: 15px;
}

.close-btn {
    position: absolute;
    right: 20px; 
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Reponsive Mobile Timeline */
@media (max-width: 768px) {
    .timeline-row { justify-content: flex-start !important; padding-left: 50px; }
    .experience-card { width: 90%; }
    .timeline-row::before, .timeline-row::after { left: 20px; }
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~CERTIFICATIONS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#certifications {
    padding: 40px 20px;
    text-align: center;
}

.certif-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
}

.certif-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    text-align: center;
    background-color: #f4f4f4;
    border: 2px solid #EEEEEE;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.certif-item img {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.certif-item img:hover {
    transform: scale(1.1) translateY(-5px);
    border-color: #E0E0E0;
}

.certif-item p {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #2C3E50;
    font-weight: 500;
    margin-top: 10px;
    width: 100%;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~COMPETENCES~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
.skills-section {
    padding: 50px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    margin-bottom: 40px;
    font-size: 2rem;
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px;
    width: 100%;
}

.skill-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    text-align: left;
}

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

.skill-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.skill-header span {
    font-size: 1.5rem;
}

.skill-card h3 {
    margin: 0;
    color: #333;
}

.skill-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    width: 100%;
}

.skill-card li {
    padding: 10px 0;
    color: #555;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.skill-card li:last-child {
    border-bottom: none;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PROJETS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1000px;
  margin: auto;
}

.carousel {
  display: flex;
  gap: 20px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding: 20px 0;
}

.card {
  min-width: 300px;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.card:hover {
  transform: scale(1.05);
}

.card-overlay {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 100%;
  padding: 15px;
  border-radius: 0 0 15px 15px;
}

.nav-btn {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  position: absolute;
  z-index: 10;
}
.left { left: -50px; }
.right { right: -50px; }

.popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  text-align: center;
  position: relative;
  color: #333;
}

#popupDesc {
  text-align: justify;
  margin: 15px 0;
  line-height: 1.5;
}

.btn-voir-plus {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background-color: #333;
  color: white !important;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-voir-plus:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~FOOTER~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #333;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.footer-back-to-top, .footer-contact {
    flex: 1; 
    display: flex;
    align-items: center;
}

.footer-back-to-top {
    justify-content: flex-start;
}

.footer-contact {
    justify-content: flex-end;
    gap: 15px;
}

.footer-copyright {
    flex: 2;
    text-align: center;
    font-weight: 500;
}

.footer-container i {
    font-size: 1.4rem;
    color: white;
    transition: all 0.3s ease;
}

.footer-container a:hover i {
    transform: translateY(-3px);
}

.fa-linkedin:hover { color: #0077b5 !important; }
.fa-envelope:hover { color: #666666 !important; }
.fa-arrow-up:hover { color: #666666 !important; }