*{
    margin: 0;
    padding: 0;
}

.header{
    min-height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(4, 9, 30, 0.7), rgba(4, 9, 30, 0.7)), url(../img/wallpaper_5_OPSYNET.JPG);
    background-position: center;
    background-size: cover;
    position: relative;
    background-attachment: fixed;
}

a img{
    width: 25%;
}

nav{
    display: flex;
    padding: 2% 6%;
    justify-content: space-between;
    align-items: center;
}

nav img{
    width: 200px;
}

.nav-links{
    flex: 1;
    text-align: right;
}

.menu nav {
    display: flex;
    padding: 2% 6%;
    padding-bottom: 1px;
    padding-top: 10px;
    justify-content: space-between;
    align-items: center;
    background-color: #E6E6FA;
}

.nav-links2 {
    flex: 1;
    text-align: right;
}

/************MENU2************/

.nav-links2 ul li {
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links2 ul li a {
    color: black;
    text-decoration: none;
    font-size: 20px;
}

.nav-links2 ul li::after {
    content: '';
    width: 0%;
    height: 2px;
    background: #333399;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links2 ul li:hover::after {
    width: 100%;
}

.menu nav .fa{
    display: none;
}

/************MENU************/

.nav-links ul li{
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a{
    color: white;
    text-decoration: none;
    font-size: 20px;
}

.nav-links ul li::after{
    content: '';
    width: 0%;
    height: 2px;
    background: #333399;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links ul li:hover::after{
    width: 100%;
}

.text-box{
    width: 90%;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.text-box h1{
    font-size: 62px;
}

.text-box h1 img {
    height: 250px;
    width: 450px;
}

.text-box p{
    margin: 10px 0 40px;
    font-size: 30px;
    color: white;
}

.citazione h5 {
    margin: 40px 0 20px;
    font-size: 35px;
    color: white;
    text-align: right;
    padding-right: 30px;
    font-family: Brush Script MT, Brush Script Std, cursive;
}

.hero-btn{
    display: inline-block;
    text-decoration: none;
    color: white;
    border: 1px solid white;
    padding: 8px 35px;
    font-size: 20px;
    background: transparent;
    position: relative;
    cursor: pointer;
}

.hero-btn:hover{
    border: 1px solid #333399;
    background: #333399;
    transition: 1s;
}

nav .fa{
    display: none;
}

/***************A PROPOS**************/

#me {
    padding-top: 50px;
    padding-bottom: 50px;
    color: black;
}

h4 {
    text-align: center;
    color: black !important;
    padding-bottom: 10px;
}

.container h4{
    text-align: center;
    color: white !important;
    padding-bottom: 10px;
}

#me h4{
    text-align: center;
    color: black !important;
    padding-bottom: 10px;
}

h4::after {
    content: '';
    background: #ADD8E6;
    display: block;
    height: 3px;
    width: 170px;
    margin: 20px auto 5px;
}

.profile-pic {
    margin-top: 25px;
}

.profile-pic h2 {
    font-size: 22px;
    font-weight: bold;
    margin-top: 15px;
    color: black !important;
}

.profile-pic h3 {
    font-size: 15px;
    font-weight: bold;
    margin-top: 15px;
    color: black !important;
}

#me .fa {
    height: 60px;
    width: 60px;
    font-size: 40px;
    color: black !important;
    background: white;
    padding: 10px;
    border-radius: 50%;
}

.img-box ul {
    padding: 0px 0;
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.img-box ul li {
    padding: 5px;
    display: inline-block;
}

.about-me {
    margin: auto;
    text-align: left;
    padding-top: 10px;
}

p{
    color: black;
    font-size: 20px;
    font-weight: 300;
    line-height: 22px;
    padding: 2px;
}

/* ************ FORMATIONS (A PROPOS) ************ */

#formations {
  padding: 60px 0;
  background: white;
}

#formations h4 {
  text-align: center;
  color: black !important;
  font-weight: 700;
  margin-bottom: 30px;
}

#formations h4::after {
  content: '';
  background: #4caf50;
  display: block;
  height: 3px;
  width: 160px;
  margin: 15px auto 0;
  border-radius: 999px;
}

/* Onglets */

.formations-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.formations-tab {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  border: 1px solid #2b5d34;
  background: #ffffff;
  color: #2b5d34;
  cursor: pointer;
  transition: all 0.25s ease;
}

.formations-tab:hover {
  background: #e1f1e6;
}

.formations-tab.active {
  background: #2b5d34;
  color: #ffffff;
}

/* Panels */

.formations-panel {
  display: none;
  max-width: 950px;
  margin: 0 auto;
  background: #e6f2ea;
  border-radius: 16px;
  padding: 25px 30px;
  box-shadow: 0 8px 20px rgba(0, 128, 0, 0.15);
}

.formations-panel.active {
  display: block;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #206520;
  margin-bottom: 18px;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 6px;
}

/* Items */

.formation-item {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid #d4e5d8;
}

.formation-item:last-child {
  border-bottom: none;
}

.year-badge {
  min-width: 120px;
  font-weight: 700;
  color: #2b5d34;
  font-size: 14px;
}

.formation-content h5 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #184f23;
}

.formation-content p {
  margin: 2px 0;
  font-size: 14px;
  line-height: 1.4;
  color: #304236;
}

.formation-content ul {
  margin: 4px 0 0 18px;
  padding: 0;
  font-size: 14px;
  color: #304236;
}

/* Responsive Formations */

@media only screen and (max-width: 768px) {

  .formations-panel {
    padding: 18px 15px;
    border-radius: 12px;
  }

  .formation-item {
    flex-direction: column;
  }

  .year-badge {
    font-size: 13px;
    min-width: auto;
  }

  .formation-content h5 {
    font-size: 15px;
  }

  .formation-content p,
  .formation-content ul {
    font-size: 13px;
  }
}


/* ************ VIDEOS ************ */

.video-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 20px;
}

.video-card {
    position: relative;
    width: 300px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 100, 0, 0.15);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: scale(1.03);
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

.play-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 100, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(5px);
}

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

.popup-video video {
    width: 80%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.close-popup {
    position: absolute;
    top: 20px;
    right: 30px;
    cursor: pointer;
}

/* ************FOOTER************ */
footer {
    background-color: white;
    padding: 20px 0 10px 0;
    text-align: left;
    padding-left: 10px;
    padding-top: 30px;
    padding-bottom: 20px;
}

/* ************Media************ */
@media screen and (max-width: 700px){
    .header {
        width: 100%;
    }
    .text-box h1{
        font-size: 30px;
    }
    .nav-links ul li{
        display: block;
    }
    .nav-links{
        position: absolute;
        background: #ADD8E6;
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 2;
        transition: 1s;
    }
    nav .fa{
        display: block;
        color: white;
        margin: 30px;
        font-size: 22px;
        cursor: pointer;
    }
    .nav-links ul{
        padding: 30px;
    }
    .nav-links2 ul li{
        display: block;
    }
    .nav-links2 {
        position: absolute;
        background: #E6E6FA;
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 2;
        transition: 1s;
    }
    .menu nav .fa{
        display: block;
        color:  black;
        margin: 30px;
        font-size: 22px;
        cursor: pointer;
    }
    .nav-links2 ul{
        padding: 30px;
    }

    .citazione h5 {
        display: none;
    }
    .text-box h1 img {
        height: 200px;
        width: 350px;
    }
    
    .timeline {
        width: 100%;
        padding: 30px 5px 30px 10px;
    }
    
    .timeline ul li .content h3 {
        color: #34ace0;
        font-size: 15px;
    }
}

/* -------- MODE TÉLÉPHONE SPÉCIAL A PROPOS -------- */
@media only screen and (max-width: 480px) {

  /* --- Section A PROPOS (#me) --- */
  #me {
    padding: 20px 12px;
  }

  #me .row {
    flex-direction: column;
  }

  .profile-pic {
    margin-top: 10px;
    text-align: center;
  }

  .profile-pic img {
    width: 70%;
    height: auto;
  }

  .profile-pic h2 {
    font-size: 18px;
  }

  .profile-pic h3 {
    font-size: 14px;
  }

  #me p {
    font-size: 16px;
    line-height: 1.4;
  }

  .about-me {
    margin-top: 20px;
    text-align: left;
  }

  /* --- Titre "Formations" --- */
  #formations {
    padding: 30px 10px;
  }

  #formations h4 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  #formations h4::after {
    width: 90px;
    margin-top: 8px;
  }

  /* --- Bloc slider formations --- */
  .slider-container {
    margin: 15px auto;
    padding: 18px 12px;
    border-radius: 10px;
  }

  .slide {
    padding: 10px 0;
  }

  .slide h2 {
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom-width: 2px;
  }

  .timeline ul {
    max-height: 320px;
  }

  .timeline li {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
  }

  .timeline li span {
    min-width: auto;
    font-size: 13px;
  }

  .timeline .contenu h3 {
    font-size: 15px;
  }

  .timeline .contenu p {
    font-size: 13px;
    line-height: 1.3;
  }

  /* Boutons précédent / suivant du slider */
  button.prevBis,
  button.nextBis {
    font-size: 20px;
    padding: 6px 10px;
    top: auto;
    bottom: 5px;
  }

  button.prevBis {
    left: 8px;
  }

  button.nextBis {
    right: 8px;
  }

  /* --- Vidéos de présentation --- */
  .video-section {
    padding: 15px 10px;
    gap: 15px;
    border-radius: 12px;
  }

  .video-card {
    width: 100%;
    max-width: 340px;
    height: 190px;
  }

  .play-btn {
    font-size: 13px;
    padding: 7px 14px;
  }

  .popup-video video {
    width: 92%;
    max-width: 92%;
  }

  /* Footer plus compact */
  footer {
    padding: 15px 10px;
    font-size: 13px;
    text-align: center;
  }
}
