* {
  box-sizing: border-box;
  max-width: 100%;
}

html, body {
    min-width: 0; 
    padding: 0; 
    margin: 0;
}

body {
  background-color: #070063;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden; /* Important for responsiveness */
  transition: background-color 0.5s ease;
  min-height: 100vh;
}

/* --- DARK MODE GLOBAL STYLES --- */
body.dark-mode {
  background-color: #000000;
}

body.dark-mode .content {
    background: #46404f;
    color: #ffffff;
}

/* Invert layer colors for dark mode */
body.dark-mode .layer1 { background: #05004e; }
body.dark-mode .layer2 { background: #1a0080; }
body.dark-mode .layer3 { background: #2f00b3; }

/* Contour global */
.layer {
  padding: clamp(8px, 2vw, 18px);
  border-radius: 30px;
}

.layer1 { background: #0A0096; }
.layer2 { background: #531FFF; }
.layer3 { background: #6932FF; }

.content {
  background: #EFE9FF;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  position: relative;
  padding: 20px;
  transition: background-color 0.5s ease;
}

/* --- NAVIGATION (Matches Audiovisuel) --- */
nav {
    padding: 15px;
    background-color: #d3c3fe;
    border-radius: 50px;
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    gap: 8%;
    max-width: 800px; 
    margin: auto;
    transition: background-color 0.5s ease;
}

body.dark-mode nav {
    background-color: #8155fc; /* Darker purple for dark mode */
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  padding-left: 17px;
}

.nav-links a {
  text-decoration: none;
  color: #000;
}
.nav-links a:hover {
  text-decoration: underline;
}

body.dark-mode .nav-links a {
    color: #fff9da;
}

/* Burger Menu */
.burger {
  display: none; 
  font-size: 30px;
  cursor: pointer;
  z-index: 5;
  order: 3; 
}

.info{
    color: #cf4dff;
}


/* Mobile Nav Logic */
@media screen and (max-width: 979px) {
    .burger {
      display: block; 
      position: absolute; 
      right: 35px; 
      top: 35px;
      z-index: 10;
    }

    #dark-mode-toggle {
        position: absolute;
        left: 35px; 
        top: 25px;
        z-index: 10;
    }

    nav {
      background-color: transparent; 
      max-width: none;
      margin: 0;
      padding: 0; 
      justify-content: flex-start;
      gap: 0;
    }
    
    body.dark-mode nav {
        background-color: transparent;
    }

    .nav-links {
      display: none;
      position: absolute;
      z-index: 1000;
      top: 80px;
      right: 35px;
      background: white;
      padding: 20px 30px;
      border-radius: 25px;
      flex-direction: column;
      gap: 15px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      border: 3px solid #0003;
    }
    
    .nav-links a {
        font-family: 'Poppins', sans-serif;
        font-size: 1rem;
        color: #000;
        text-decoration: none;
        padding: 8px 0;
    }
    body.dark-mode .nav-links {
        background: #6f3cfd;
    }

    .nav-links.active {
      display: flex;
    } 

    h1 {
        margin-top: 50px;
    }
    
}

/* --- TYPOGRAPHY --- */
h1 {
  margin-left: 40px; 
  font-family: Kaushan Script;
  font-size: clamp(2.5rem, 5vw, 3rem);
}

h2 {
  font-family: Kaushan Script;
  font-size: clamp(1.5rem, 4vw, 2rem);
  display: flex;
}

.titre_parcours{
    margin-left: 60px;

}
/* --- INTRODUCTION SECTION --- */
.section-intro {
    position: relative; /* For Fireflies */
}

.texte-intro {
  margin-left: 40px;
  max-width: 800px;
  position: relative;
  z-index: 2; /* Text above fireflies */
}

.portrait-intro {
  display: flex;            
  align-items: flex-start;  
  gap: 70px; 
}

.portrait-intro .img img {
  width: clamp(150px, 30vw, 300px);
  border-radius: 25px;
}

/* Read More / Text Expansion */
.texte-complet {
  max-height: none;
  overflow: visible;
  display: block;
  transition: max-height .4s ease;
}

.btn-lire-plus {
  margin: 20px auto 10px auto !important;
  background: rgb(105, 50, 255);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: none;
}

/* --- RESPONSIVE INTRO --- */
@media (max-width: 1400px) {
  .portrait-intro {
    flex-direction: column;
    align-items: center;   
    text-align: center;
    gap: 40px;
  }
  .img {
    order: 1; /* La photo passe au-dessus */
    margin-right: 0;
    width: 100%;
    text-align: center;
  }

  .texte-intro {
    order: 2; /* Le texte passe en dessous */
    margin-left: 0;
    padding: 0 20px;
    text-align: left; /* Garde le texte aligné à gauche pour la lecture */
    max-width: 900px; /* Empêche le texte de devenir trop large sur grand écran */
    margin-right: auto;
    margin-left: auto;
  }
  .btn-lire-plus {
    display: block; 
  }
  .texte-complet {
    max-height: 4.5rem; 
    overflow: hidden;
  }
  .texte-complet.open {
    max-height: 1500px;
  }
  
}

@media (max-width: 640px) {
  h1 { 
    margin-left: 0; 
    text-align: center;
  }
  .portrait-intro {
    flex-direction: column;
    align-items: center;   
    text-align: center; 
  }
  .img {
    order: 1;
    width: 100%;
    text-align: center;    
  }
  .img img {
    margin: 0 auto;        
    display: block;        
  }
  .texte-intro {
    order: 2;              
    text-align: left;      
    width: 100%;
    margin-left: 0; 
    padding: 0 10px;
  }
}

.img {
  margin-right: 20px;
  position: relative;
  z-index: 2;
}
/* Changer pour passer au dessus à 1400px */
.portrait {
  position: relative;
  /* On garde la taille max, mais on s'assure qu'elle ne devienne pas minuscule */
  width: clamp(250px, 50vw, 350px); 
  border-radius: 25px;
  border: 4px solid rgb(105, 50, 255);
  filter: drop-shadow(10px 10px 12px rgba(105, 50, 255, 1));
  transform: scaleX(-1);
}

/* --- PARCOURS (Timeline) --- */
.parcours-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
    max-width: 900px;
    margin: 40px auto 60px; 
    padding: 0 40px; 
}

.parcours-card {
    background-color: #e7defe; 
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 4px solid rgb(105, 50, 255);
}

/* Dark Mode Parcours Card */
body.dark-mode .parcours-card {
    background-color: #5d5c71;
    border-color: #531FFF;
}
body.dark-mode .parcours-card .parcours-description p {
    color: #ffffff;
}
body.dark-mode .parcours-title {
    border-bottom-color: #531FFF;
}

.parcours-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(105, 50, 255, 0.2); 
}

.parcours-year {
    font-size: 1.5em;
    font-weight: bold;
    color: #531FFF; 
    margin-bottom: 5px;
}

.parcours-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 2px solid #EFE9FF; 
    padding-bottom: 10px;
}

.parcours-description p {
    font-size: 0.95em;
    color: #444;
}

@media (max-width: 768px) {
    .parcours-container {
        grid-template-columns: 1fr; 
        padding: 0 20px;
    }
}

/* --- COMPETENCES & LOGICIELS --- */
.separator-block {
    display: flex; 
    justify-content: space-around; 
    align-items: flex-start;
    padding: 20px;
    max-width: 1200px; 
    margin: 0 auto; 
}

.competences-block,
.logiciels-block {
    flex: 1 1 45%; 
    min-width: 300px; 
    margin: 0 10px; 
}

.titre-competences, 
.titre-logiciels {
    margin: 0 0 20px 0;
    font-size: 2em;
    width: auto; 
    font-family: 'Kaushan Script';
    text-align: left; 
}

.competences {
    flex: 1 1 40%; 
    min-width: 300px; 
    margin-right: 20px;
}

.bouton1 {
  padding: 10px;
  background-color:#9c32ff ;
  color: white;
  margin: 10px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
}

.bouton2 {
  padding: 10px;
  background-color:#cf4dff ;
  color: white;
  border: none;
  margin: 10px;
  border-radius: 250px;
  text-decoration: none;
}
.bouton3 {
  padding: 10px;
  background-color:#a100ac ;
  color: white;
  border: none;
  margin: 10px;
  border-radius: 250px;
  text-decoration: none;
}

/* Dark Mode Buttons */
body.dark-mode .bouton1 { background-color: #531FFF; }
body.dark-mode .bouton1:hover { background-color: #6932FF; }

/* Logiciels */
.logiciels {
    flex-wrap: wrap; 
    gap: 15px; 
    justify-content: flex-start; 
}

.logiciel-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .separator-block {
        flex-direction: column; 
        align-items: center; 
    }
    .competences-block,
    .logiciels-block {
        margin: 20px 0;
        width: 90%; 
        max-width: 500px; 
        text-align: center; 
        padding: 0 10px; 
    }
    .competences h3, 
    .logiciels-block h3 { 
        text-align: center;
    }
    .titre-competences, 
    .titre-logiciels {
        text-align: center; 
        justify-content: center;
    }
    .logiciels {
        justify-content: center; 
    }
    .logiciels h3 {
        width: 100%;
    }
    .competences {
        text-align: center; 
    }
    .logiciels, 
    .crea, 
    .dev {
        display: flex; 
        flex-wrap: wrap;
        justify-content: center; 
        gap: 15px; 
        margin-left: 0; 
        margin-right: 0; 
    }
}

/* --- FOOTER --- */
.footer-structured {
    background-color: #6932FF;
    color: #EFE9FF;
    font-family: Arial, sans-serif;
    transition: background-color 0.5s ease;
}

body.dark-mode .footer-structured {
    background-color: #2f00b3;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    max-width: 1000px;
    margin: 0 auto 20px;
    flex-wrap: wrap; 
    border-bottom: 1px solid rgba(239, 233, 255, 0.2); 
}

.footer-section {
    width: 45%; 
    min-width: 250px; 
    /* margin-bottom: 10px; */
}

.footer-section h4 {
    color: #fff9da;
    font-size: 1.2rem;
    margin-bottom: 5px;
    border-bottom: 2px solid #531FFF; 
    padding-bottom: 5px;
    display: inline-block;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: #EFE9FF;
    text-decoration: none;
    line-height: 1.8;
    display: block;
    font-size: 0.95rem;
}
.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
}

.back-to-top {
  color: white;
}

.footer-structured .footer-section a i {
    margin-right: 8px; 
    font-size: 1.1em; 
    color: #fff9da; 
}

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-section {
        width: 100%;
        text-align: center;
    }
    .footer-section h4 {
        margin-left: auto;
        margin-right: auto;
    }
}



/* --- STYLISATION OPQUAST --- */
.bande {
    background-color: #e3daff;
    border-radius: 25px;
    padding: 20px;
    margin: 40px auto;
    max-width: 900px; /* Empêche le texte de trop s'étaler */
    border: 3px solid #531FFF;
    transition: transform 0.3s ease;
}

body.dark-mode .bande {
    background-color: #5d5c71;
    color: #ffffff;
}

.bande h2 {
    color: #000000;
    margin-bottom: 20px;
    justify-content: center;
}

.dark-mode .bande h2 {
    color: #ffffff;
    
}

.bande p {
    line-height: 1.8;
    /* text-align: justify;  */
}

/* --- STYLISATION RECOMMANDATIONS --- */
.temoignage {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

.temoignage-grid {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.temoignage_card {
    /* background: white; */
    padding: 20px;
    border-radius: 20px;
    flex: 1 1 400px;
    max-width: 800px;
    border: 3px solid #cf4dff;
    box-shadow: 8px 8px 0px #cf4dff;
    position: relative;
    transition: all 0.3s ease;
}


body.dark-mode .temoignage_card {
    background: #5d5c71;
    box-shadow: 8px 8px 0px #531FFF;
    border-color: #531FFF;
}

.quote-icon {
    color: #531FFF;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.temoignage_card h3 {
    font-family: 'Poppins', sans-serif;
    color: #000000;
    margin-bottom: 10px;
}

.dark-mode .temoignage_card h3 {
    color: #ffffff;
}

.mention{
  color: #666666;
  text-decoration: wavy;
}
.dark-mode .mention{
  color: #d6d6d6;
  text-decoration: wavy;
}

.temoignage_card p {
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
}

/* --- SECTION MON CV --- */
.cv-section {
    max-width: 900px;
    margin: 60px auto;
    text-align: center;
}

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

.cv-preview {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto; /* Centre le CV si le parent est plus large */
    overflow: hidden;
    border: 1px solid #000000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    /* Ajout d'un aspect-ratio pour aider le navigateur (optionnel) */
    aspect-ratio: 1 / 1.414; /* Ratio standard d'une feuille A4 */
}

.cv-image {
    width: 100%;
    height: auto; /* Force le respect des proportions de l'image */
    display: block;
    background: #ccc;
    /* Supprimez ou commentez min-height si elle déforme l'image */
    /* min-height: 500px; */ 
}

.cv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(105, 50, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cv-preview:hover .cv-overlay {
    opacity: 1;
}

.cv-overlay .bouton2 {
    text-decoration: none;
    font-weight: bold;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cv-preview:hover .cv-overlay .bouton2 {
    transform: translateY(0);
}

/* --- RESPONSIVE AJUSTEMENTS --- */
@media (max-width: 768px) {
    .bande {
        padding: 20px;
        margin: 20px;
    }
    
    .temoignage_card {
        flex: 1 1 100%;
        box-shadow: 5px 5px 0px #cf4dff;
    }

    .cv-preview {
        max-width: 300px;
    }
}