/* ==========================================================================
   1. CONFIGURATION GÉNÉRALE & VARIABLES (Thème Sombre Tech)
   ========================================================================== */
   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

   :root {
       --bg-dark: #0b0f19;        /* Fond bleu nuit très sombre */
       --bg-card: #151b2c;        /* Fond des cartes (Bento) */
       --text-main: #f3f4f6;      /* Texte principal (blanc cassé) */
       --text-muted: #9ca3af;     /* Texte secondaire (gris) */
       --accent: #2563eb;         /* Bleu électrique moderne */
       --accent-hover: #1d4ed8;   /* Bleu survol */
       --border-color: #242f47;   /* Bordures discrètes */
       --font-sans: 'Inter', sans-serif;
       --font-mono: 'Roboto Mono', monospace;
   }
   
   * {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
       scroll-behavior: smooth;
   }
   
   body {
       background-color: var(--bg-dark);
       color: var(--text-main);
       font-family: var(--font-sans);
       line-height: 1.6;
       display: flex;
   }
   
   /* ==========================================================================
      2. NAVIGATION LATÉRALE ÉPURÉE
      ========================================================================== */
   .main-nav {
       position: fixed;
       top: 0;
       left: 0;
       width: 260px;
       height: 100vh;
       background-color: #080b12;
       border-right: 1px solid var(--border-color);
       padding: 40px 24px;
       display: flex;
       flex-direction: column;
       align-items: center;
       z-index: 100;
   }
   
   .nav-profile {
       text-align: center;
       margin-bottom: 50px;
   }
   
   .nav-profile img {
       width: 100px;
       height: 100px;
       border-radius: 50%;
       border: 2px solid var(--accent);
       object-fit: cover;
       margin-bottom: 15px;
   }
   
   .nav-name {
       display: block;
       font-weight: 600;
       font-size: 1.1rem;
       color: var(--text-main);
   }
   
   .nav-links {
       list-style: none;
       width: 100%;
   }
   
   .nav-links li {
       margin-bottom: 15px;
   }
   
   .nav-links a {
       display: block;
       color: var(--text-muted);
       text-decoration: none;
       padding: 10px 16px;
       border-radius: 8px;
       font-weight: 500;
       transition: all 0.2s ease;
   }
   
   .nav-links a:hover {
       background-color: var(--bg-card);
       color: var(--accent);
   }
   
   /* Zone principale de contenu décalée à cause de la nav */
   .main-content {
       margin-left: 260px;
       width: calc(100% - 260px);
       padding: 0 10%;
   }
   
   /* Styles Communs Sections */
   section {
       padding: 100px 0 60px 0;
       border-bottom: 1px solid var(--border-color);
   }
   
   .section-header h2 {
       font-size: 2rem;
       font-weight: 700;
       margin-bottom: 40px;
       position: relative;
   }
   
   .section-header h2::after {
       content: '';
       position: absolute;
       bottom: -10px;
       left: 0;
       width: 50px;
       height: 4px;
       background-color: var(--accent);
       border-radius: 2px;
   }
   
   /* Boutons */
   .btn {
       display: inline-block;
       padding: 12px 28px;
       border-radius: 8px;
       font-weight: 600;
       text-decoration: none;
       transition: all 0.2s ease;
       cursor: pointer;
   }
   
   .btn-primary {
       background-color: var(--accent);
       color: #fff;
       border: none;
   }
   
   .btn-primary:hover {
       background-color: var(--accent-hover);
       transform: translateY(-2px);
   }
   
   .btn-secondary {
       background-color: transparent;
       color: var(--text-main);
       border: 1px solid var(--border-color);
       margin-left: 15px;
   }
   
   .btn-secondary:hover {
       background-color: var(--bg-card);
       border-color: var(--text-muted);
   }
   
   /* ==========================================================================
      3. SECTION HERO
      ========================================================================== */
   .hero-section {
       min-height: 90vh;
       display: flex;
       align-items: center;
   }
   
   .hero-title {
       font-size: 3.5rem;
       font-weight: 800;
       line-height: 1.2;
       margin-bottom: 10px;
       background: linear-gradient(45deg, #ffffff, #9ca3af);
       -webkit-background-clip: text;
       -webkit-text-fill-color: transparent;
   }
   
   .hero-subtitle {
       font-size: 1.5rem;
       font-family: var(--font-mono);
       color: var(--accent);
       margin-bottom: 25px;
   }
   
   .hero-tagline {
       font-size: 1.2rem;
       color: var(--text-muted);
       max-width: 650px;
       margin-bottom: 40px;
   }
   
   .hero-social {
       margin-top: 30px;
   }
   
   .hero-social img {
       width: 32px;
       height: 32px;
       margin-right: 20px;
       filter: invert(1); /* Rend les icônes noires blanches */
       opacity: 0.7;
       transition: opacity 0.2s;
   }
   
   .hero-social img:hover {
       opacity: 1;
   }
   
   /* ==========================================================================
      4. SECTION À PROPOS
      ========================================================================== */
   .about-grid {
       display: grid;
       grid-template-columns: 2fr 1fr;
       gap: 50px;
   }
   
   .about-text p {
       margin-bottom: 20px;
       color: var(--text-muted);
   }
   
   .quote {
       font-family: var(--font-mono);
       border-left: 3px solid var(--accent);
       padding-left: 20px;
       margin: 30px 0;
       color: var(--text-main);
       font-style: italic;
   }
   
   .about-meta ul {
       list-style: none;
   }
   
   .about-meta li {
       margin-bottom: 15px;
       padding-bottom: 15px;
       border-bottom: 1px solid var(--border-color);
       font-size: 0.95rem;
   }
   
   .about-meta strong {
       color: var(--accent);
   }
   
   /* ==========================================================================
      5. BENTO GRID (EXPERTISES)
      ========================================================================== */
   .bento-grid {
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       gap: 24px;
   }
   
   .bento-card {
       background-color: var(--bg-card);
       border: 1px solid var(--border-color);
       padding: 30px;
       border-radius: 16px;
       transition: transform 0.2s ease, border-color 0.2s ease;
   }
   
   .bento-card:hover {
       transform: translateY(-4px);
       border-color: var(--accent);
   }
   
   .bento-card h3 {
       font-size: 1.25rem;
       margin-bottom: 15px;
       color: var(--text-main);
       font-family: var(--font-sans);
   }
   
   .bento-card p {
       color: var(--text-muted);
       font-size: 0.95rem;
   }
   
   .bento-card.full-width {
       grid-column: span 2;
   }
   
   /* ==========================================================================
      6. TIMELINE MODERNE (PARCOURS) - VERSION CORRIGÉE AVEC NOWRAP
      ========================================================================== */
   .timeline {
       position: relative;
       max-width: 850px;
       margin: 40px 0;
   }
   
   /* La ligne verticale */
   .timeline::after {
       content: '';
       position: absolute;
       width: 2px;
       background-color: var(--border-color);
       top: 0;
       bottom: 0;
       left: 165px;               /* Décalée pour être pile après la date élargie */
   }
   
   .timeline-item {
       position: relative;
       display: flex;
       margin-bottom: 40px;
   }
   
   .timeline-item:last-child {
       margin-bottom: 0;
   }
   
   /* Bloc date à gauche (Empêche le retour à la ligne moche) */
   .timeline-date {
       width: 140px;              /* On élargit pour laisser de la place aux textes longs */
       font-family: var(--font-mono);
       color: var(--accent);
       font-weight: 500;
       padding-top: 2px;
       text-align: right;
       font-size: 0.95rem;
       line-height: 1.4;
       white-space: nowrap;       /* FORCE le texte à rester sur une seule ligne */
   }
   
   /* Bloc contenu à droite (Ajusté en fonction de la nouvelle largeur de date) */
   .timeline-content {
       margin-left: 50px;         /* Espace préservé entre la ligne et le texte de description */
       padding-left: 0;
       flex: 1;
   }
   
   /* Le point bleu sur la ligne */
   .timeline-content::before {
       content: '';
       position: absolute;
       width: 12px;
       height: 12px;
       border-radius: 50%;
       background-color: var(--accent);
       left: 160px;               /* Centré sur la nouvelle position de la ligne */
       top: 6px;
       z-index: 2;
       box-shadow: 0 0 0 4px var(--bg-dark); /* Masque la ligne sous le point */
   }
   
   .timeline-content h3 {
       font-size: 1.3rem;
       font-weight: 600;
       line-height: 1.2;
       margin-bottom: 4px;
   }
   
   .timeline-content h4 {
       font-size: 1rem;
       color: var(--text-muted);
       margin-bottom: 12px;
       font-weight: 500;
   }
   
   .timeline-content p {
       color: var(--text-muted);
       font-size: 0.95rem;
       text-align: justify;
   }
   
   /* Grille Formations */
   .education-grid {
       display: grid;
       grid-template-columns: repeat(3, 1fr);
       gap: 20px;
   }
   
   .edu-card {
       background-color: var(--bg-dark);
       border: 1px solid var(--border-color);
       padding: 24px;
       border-radius: 12px;
   }
   
   .edu-card span {
       font-family: var(--font-mono);
       color: var(--accent);
       font-size: 0.85rem;
   }
   
   .edu-card h3 {
       font-size: 1.1rem;
       margin: 10px 0;
   }
   
   .edu-card p {
       color: var(--text-muted);
       font-size: 0.9rem;
   }
   
   /* ==========================================================================
      7. FORMULAIRE DE CONTACT
      ========================================================================== */
   .contact-container {
       max-width: 700px;
   }
   
   .form-row {
       display: grid;
       grid-template-columns: 1fr 1fr;
       gap: 20px;
   }
   
   .form-group {
       margin-bottom: 20px;
   }
   
   input[type="text"],
   input[type="email"],
   textarea {
       width: 100%;
       padding: 14px 18px;
       background-color: var(--bg-card);
       border: 1px solid var(--border-color);
       border-radius: 8px;
       color: var(--text-main);
       font-family: var(--font-sans);
       font-size: 1rem;
       transition: border-color 0.2s;
   }
   
   input:focus,
   textarea:focus {
       outline: none;
       border-color: var(--accent);
   }
   
   .form-captcha {
       margin-bottom: 25px;
   }
   
   /* ==========================================================================
      8. RESPONSIVE DESIGN (Mobiles et Tablettes)
      ========================================================================== */
   @media (max-width: 992px) {
       body {
           flex-direction: column;
       }
       .main-nav {
           width: 100%;
           height: auto;
           position: relative;
           padding: 20px;
       }
       .nav-profile {
           display: none; /* Cache la photo sur mobile pour gagner de la place */
       }
       .nav-links {
           display: flex;
           justify-content: space-around;
       }
       .nav-links li {
           margin-bottom: 0;
       }
       .main-content {
           margin-left: 0;
           width: 100%;
           padding: 0 5%;
       }
       .about-grid, .bento-grid, .form-row, .education-grid {
           grid-template-columns: 1fr;
       }
       .bento-card.full-width {
           grid-column: span 1;
       }
       .timeline::after {
           left: 20px;
       }
       .timeline-item {
           flex-direction: column;
       }
       .timeline-date {
           text-align: left;
           margin-bottom: 5px;
       }
       .timeline-content {
           margin-left: 0;
           padding-left: 25px;
       }
       .timeline-content::before {
           left: -15px;
       }
       .hero-title {
           font-size: 2.5rem;
       }
   }