/* ========= CONFIGURATION ET VARIABLES ========= */
:root {
  --radius: 18px;
  --maxw: 1120px;
  
  /* Thème Sombre Profond */
  --bg: #070915;
  --surface: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);
  
  /* COULEURS SIGNATURE SISR */
  --brand-purple: #8b5cf6; 
  --brand-cyan: #22d3ee;
  
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.5);
}

/* ========= RESET ET STRUCTURE DE BASE ========= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg) !important;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh; /* Empêche la page d'être écrasée */
}

.container {
  width: min(var(--maxw), calc(100% - 40px));
  margin-inline: auto;
  position: relative;
  z-index: 10; /* Force le contenu devant les particules */
}

/* ========= NAVIGATION ET BOUTON PREMIUM ========= */
.site-nav {
  background: rgba(7, 9, 21, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100 !important;
}

/* Bouton "Se connecter" avec bordure violette */
.btn.dark {
  background: transparent !important;
  border: 1px solid var(--brand-purple) !important;
  color: var(--brand-purple) !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  transition: all 0.3s ease !important;
}

.btn.dark:hover {
  background: var(--brand-purple) !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4) !important;
}

/* ========= DATES VIOLETTES SIGNATURE ========= */
.dates {
  display: block;
  color: var(--brand-purple) !important; /* Force le violet signature sur les dates */
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 15px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* ========= CARTES ET PROJETS ========= */
.project, .experience-item, .card {
  background: var(--surface) !important;
  border: 1px solid var(--stroke) !important;
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 40px !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--brand-purple) !important;
}

/* ========= GALERIE D'IMAGES ========= */
.gallery-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 40px 0 !important;
}

.gallery-img {
    width: 48% !important;
    max-width: 500px !important;
    height: 350px !important;
    object-fit: cover !important;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
}

/* ========= PARTICULES ET FOND ========= */
#particles-js {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important; /* Correction bug offsetWidth */
  height: 100vh !important;
  z-index: -1 !important;
  pointer-events: none;
  background: var(--bg);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: 
    radial-gradient(1200px 700px at 10% 10%, rgba(124,58,237,.15), transparent 55%),
    radial-gradient(1000px 650px at 90% 25%, rgba(34,211,238,.12), transparent 55%);
}

/* ========= TYPOGRAPHIE ET BOUTONS ========= */
h1, h2, h3 { color: #fff; text-transform: uppercase; }
strong { color: var(--brand-cyan) !important; }

.btn-download, .btn.primary {
  background: var(--brand-purple) !important;
  color: white !important;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

/* ==========================================================
   CORRECTIONS MOBILE (Smartphones)
   ========================================================== */
@media screen and (max-width: 768px) {
    /* 1. Répare le bouton "Se connecter" */
    .nav-actions .btn.dark {
        padding: 6px 12px !important; /* Bouton plus fin */
        font-size: 0.8rem !important; /* Texte un peu plus petit */
        white-space: nowrap !important; /* EMPÊCHE le texte de se couper en deux lignes ! */
    }

    /* 2. Rapproche les boutons d'action (Lune, Se connecter, Menu) */
    .nav-actions {
        gap: 8px !important; 
    }

    /* 3. Réduit légèrement la taille de ton profil pour faire de la place */
    .profile img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .profile .brand {
        font-size: 0.9rem !important;
    }
}

/* Optionnel : Pour les très petits écrans (ex: iPhone SE), on cache ton nom pour laisser de la place aux boutons */
@media screen and (max-width: 400px) {
    .profile .brand {
        display: none !important;
    }
}

/* ==========================================================
   CORRECTION MOBILE : CV & COMPÉTENCES (V2)
   ========================================================== */
@media screen and (max-width: 768px) {
    /* 1. On remet la liste en mode normal pour que la flèche reste avec le titre */
    .cv-container li, 
    .cv-container .skill-item {
        display: block !important; 
        margin-bottom: 20px !important;
        line-height: 1.6 !important;
    }

    /* 2. L'astuce magique : on force un vrai saut de ligne juste après le titre (qui est souvent en <strong> ou <b>) */
    .cv-container li strong::after,
    .cv-container li b::after,
    .cv-container li span.title::after {
        content: "\A" !important;
        white-space: pre !important;
    }
}

/* Style du bouton */
.btn-contact {
    display: inline-block;
    padding: 12px 28px;
    background-color: #8b5cf6; /* Ton violet fétiche */
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px; /* Bords très arrondis pour le côté moderne */
    font-weight: bold;
    transition: all 0.3s ease; /* Animation fluide */
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Effet au survol (Hover) */
.btn-contact:hover {
    background-color: transparent;
    border-color: #8b5cf6;
    color: #8b5cf6 !important;
    transform: translateY(-3px); /* Le bouton s'élève légèrement */
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* --- CORRECTION LISIBILITÉ BTS (TEXTE EN BLANC) --- */

/* Force le blanc sur les titres et textes des fiches projets/stages */
.project h3, 
.project h4, 
.project h5,
.project p, 
.project li, 
.project strong,
.intro p,
.description li {
    color: #ffffff !important;
}

/* On garde les dates en violet pour le style et le contraste */
.dates, 
.project .dates {
    color: #8b5cf6 !important;
    font-weight: 700 !important;
}

/* Style propre pour les listes (puces flèches) */
.description {
    list-style: none !important;
    padding-left: 0 !important;
}

.description li {
    position: relative;
    padding-left: 25px !important;
    margin-bottom: 10px !important;
}

.description li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: #8b5cf6;
    font-weight: bold;
}

/* Assure que le fond des cartes reste bien sombre pour faire ressortir le blanc */
.project {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
}

/* --- RÉGLAGE ÉQUILIBRÉ DE LISIBILITÉ (TAILLE MOYENNE) --- */

/* Cible le corps de texte des fiches projets, stages et certifications */
.project p, 
.project li, 
.project span, 
.project strong,
.intro p {
    font-size: 1.05rem !important; /* Taille légèrement augmentée, très propre */
    line-height: 1.6 !important;   /* Espacement aéré entre les lignes */
    color: #ffffff !important;     /* Blanc pur pour la prof */
}

/* Cible les titres des fiches pour qu'ils ressortent mieux */
.project h3, 
.project h4 {
    font-size: 1.4rem !important;  /* Titre bien lisible mais pas envahissant */
    margin-bottom: 12px !important;
    color: #ffffff !important;
}

/* Cible les dates pour une séparation nette */
.dates, 
.project .dates {
    font-size: 0.9rem !important;
    color: #8b5cf6 !important;    /* On garde le violet pour le style */
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Ajustement de la puce flèche */
.description li::before {
    font-size: 1.1rem !important;
    color: #8b5cf6 !important;
    margin-right: 10px !important;
}

/* --- STYLE DES MOTS IMPORTANTS (BLEU CYAN) --- */

/* Applique le bleu cyan à tous les mots en gras pour les faire ressortir */
strong, 
.project strong, 
.description strong {
    color: #00d2ff !important; /* Bleu cyan identique à tes titres de sections */
    font-weight: 700 !important;
}

/* --- RÉGLAGE ÉQUILIBRÉ DE LISIBILITÉ (TAILLE MOYENNE) --- */

/* Texte principal en blanc pur */
.project p, 
.project li, 
.project span, 
.intro p {
    font-size: 1.05rem !important; 
    line-height: 1.6 !important;   
    color: #ffffff !important;     
}

/* Titres des fiches en blanc */
.project h3, 
.project h4 {
    font-size: 1.4rem !important;  
    margin-bottom: 12px !important;
    color: #ffffff !important;
}

/* Dates en violet pour le contraste */
.dates, 
.project .dates {
    font-size: 0.9rem !important;
    color: #8b5cf6 !important;    
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* ========= THÈME CLAIR ========= */
[data-theme="light"] {
  --bg: #f0f4f8;
  --surface: rgba(0, 0, 0, 0.05);
  --stroke: rgba(0, 0, 0, 0.12);
  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.55);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

[data-theme="light"] .site-nav {
  background: rgba(240, 244, 248, 0.9) !important;
}

[data-theme="light"] .project {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .project h3,
[data-theme="light"] .project h4,
[data-theme="light"] .project p,
[data-theme="light"] .project li {
  color: #1a1a2e !important;
}

[data-theme="light"] #particles-js {
  background: var(--bg) !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5 {
  color: #1a1a2e !important;
}

[data-theme="light"] .project h3,
[data-theme="light"] .project h4,
[data-theme="light"] .project p,
[data-theme="light"] .project li,
[data-theme="light"] .project span,
[data-theme="light"] .intro p,
[data-theme="light"] .description li,
[data-theme="light"] p {
  color: #1a1a2e !important;
}

[data-theme="light"] strong,
[data-theme="light"] .project strong,
[data-theme="light"] .description strong {
  color: #0369a1 !important; /* Bleu foncé lisible en mode clair */
}

[data-theme="light"] .bg-overlay {
  opacity: 0.3;
}

[data-theme="light"] footer {
  background: #e2e8f0 !important;
  border-top: 1px solid rgba(0,0,0,0.1) !important;
}

[data-theme="light"] footer h2,
[data-theme="light"] footer h3,
[data-theme="light"] footer p,
[data-theme="light"] footer a,
[data-theme="light"] footer .Logo a,
[data-theme="light"] .colonne a,
[data-theme="light"] .colonne h3,
[data-theme="light"] .footer-bottom p {
  color: #1a1a2e !important;
}

[data-theme="light"] .footer-inner .colonne a,
[data-theme="light"] .footer-inner .colonne h3,
[data-theme="light"] .footer-inner .colonne .Logo a {
  color: #1a1a2e !important;
  opacity: 1 !important;
}

[data-theme="light"] .footer-inner .colonne a,
[data-theme="light"] .footer-inner .colonne .Logo a {
  color: #7c3aed !important; /* Violet plus foncé, lisible sur fond clair */
  opacity: 1 !important;
}

[data-theme="light"] .footer-inner .colonne h3 {
  color: #1a1a2e !important; /* Titres sombres pour le contraste */
  opacity: 1 !important;
}

.Logo i {
  font-size: 1.2rem;
  color: #8b5cf6;
}

[data-theme="light"] .Logo i {
  color: #7c3aed;
}

.Logo i {
  width: 20px;
  text-align: center;
}