:root, html {
  --background: #f0f0f0;
  --surface: #ffffff;
  --text: #222222;
  --text-muted: #555555;
  --primary: #4e6e81;
  --secondary: #89b0ae;
  --accent: #f08a5d;
    --accent-active: #89a4b0;
    --radius: 10px;
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  --font: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

:root.dark-theme, html.dark-theme {
  --primary: #4e6e81;
  --secondary: #89b0ae;
  --background: #0f1115;
  --surface: #1a1c20;
  --text: #f1f1f1;
  --text-muted: #a0a5b0;
  --accent: #f08a5d;
  --accent-active: #89a4b0;

}

#active {
  color: var(--accent-active);
  font-weight: bold;
}


body {
  background-color: var(--background) !important;
  color: var(--text) !important;
  font-family: var(--font);
  padding: 2rem;
  transition: background-color 0.4s, color 0.4s;
}

    header {
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      color: white;
      padding: 2rem;
      border-radius: var(--radius);
      text-align: center;
      box-shadow: var(--shadow);
      margin-bottom: 3rem;
    }

    header h1 {
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
    }

    header p, header a {
      color: #e0e0e0;
      margin: 0.3rem 0;
    }

    section {
      background: var(--surface);
      padding: 2rem;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      margin-bottom: 2rem;
    }

    h2 {
      text-transform: uppercase;
      font-size: 1.4rem;
      margin-bottom: 1.5rem;
      border-bottom: 2px solid var(--accent);
      padding-bottom: 0.5rem;
      letter-spacing: 1px;
    }

    h3 {
      color: var(--secondary);
      font-size: 1.1rem;
      margin-top: 1.5rem;
    }

    .experience, .formation {
      border-left: 3px solid var(--primary);
      padding-left: 1.2rem;
      margin-bottom: 2rem;
      position: relative;
    }

    .experience::before, .formation::before {
      content: '';
      position: absolute;
      left: -7px;
      top: 0.4rem;
      width: 12px;
      height: 12px;
      background-color: var(--accent);
      border-radius: 50%;
    }

    ul {
      margin: 1rem 0 0 1.5rem;
      padding: 0;
    }

    ul li {
      list-style: none;
      position: relative;
      padding-left: 1.2rem;
      margin-bottom: 0.5rem;
      color: var(--text-muted);
      font-size: 0.95rem;
    }

    ul li::before {
      content: '▹';
      position: absolute;
      left: 0;
      color: var(--accent);
      font-size: 1rem;
    }

    ul li.subpoint {
  margin-left: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
  position: relative;
}

ul li.subpoint::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media screen and (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar, .content {
    width: 100%;
  }
}

    

    #theme-toggle {
      position: fixed;
      top: 1rem;
      right: 1rem;
      background: var(--surface);
      color: var(--text);
      border: 2px solid var(--primary);
      border-radius: 50px;
      padding: 0.4rem 1rem;
      cursor: pointer;
      transition: background-color 0.3s, color 0.3s;
      z-index: 1000;
    }

    #theme-toggle:hover {
      background-color: var(--primary);
      color: #fff;
    }

.timeline {
  position: relative;
  margin-left: 2rem;
  /*padding-left: 2rem;*/
  border-left: 3px solid var(--primary);
}

.timeline-item {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 2rem;
}

/* .timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5px; 
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background-color: var(--accent);
  border: 2px solid var(--surface); 
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
} */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.repo-card {
  background-color: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;

  width: 250px;
  height: 180px;

  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.repo-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.repo-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.repo-link {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
}

.repo-link:hover {
  text-decoration: underline;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.lang-badge {
  background-color: #e0e0e0;
  color: #333;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  line-height: 1.2;
}

nav {
  display: flex;
  justify-content: flex-end; 
  gap: 1rem; 
  padding: 1rem;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  text-decoration: underline;
}

/* Style spécifique pour le lien Admin */
nav a.admin-link {
  color: var(--accent);
  font-weight: bold;
  padding: 0.3rem 0.8rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(240, 138, 93, 0.1);
  transition: all 0.3s ease;
}

nav a.admin-link:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
  transform: scale(1.05);
}

/* Style spécifique pour le lien Candidatures */
nav a.candidatures-link {
  color: var(--primary);
  font-weight: bold;
  padding: 0.3rem 0.8rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: rgba(78, 110, 129, 0.1);
  transition: all 0.3s ease;
}

nav a.candidatures-link:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
  transform: scale(1.05);
}

footer {
  background-color: var(--surface);
  color: var(--text-muted);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 2rem;
  font-size: 0.875rem;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-content span {
  display: flex;
  align-items: center;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.25rem;
}

footer a:hover {
  text-decoration: underline;
}

footer .heart {
  color: var(--accent);
  margin: 0 0.25rem;
}



    @media screen and (max-width: 768px) {
      body {
        padding: 1rem;
        font-size: 15px;
      }
      header h1 {
        font-size: 2rem;
      }
      h2 {
        font-size: 1.2rem;
      }
    }


    /* Styles spécifiques pour index.php */
.index-biography {
    background: linear-gradient(135deg, var(--surface), var(--background));
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.index-biography::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(78, 110, 129, 0.2), rgba(137, 176, 174, 0.2));
    z-index: -1;
}

.index-biography img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    float: left;
    margin-right: 20px;
    shape-outside: circle(75px at 50% 50%);
}

.index-interests, .index-contact {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.index-interests::before, .index-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(240, 138, 93, 0.1), rgba(137, 164, 176, 0.1));
    z-index: -1;
}

/* Style pour la section skills en mode dark (identique à biography) */
:root.dark-theme .index-interests,
html.dark-theme .index-interests {
    background: linear-gradient(135deg, var(--surface), var(--background));
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

:root.dark-theme .index-interests::before,
html.dark-theme .index-interests::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(78, 110, 129, 0.2), rgba(137, 176, 174, 0.2));
    z-index: -1;
}

/* Style pour la section contact en mode dark (identique à biography) */
:root.dark-theme .index-contact,
html.dark-theme .index-contact {
    background: linear-gradient(135deg, var(--surface), var(--background));
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

:root.dark-theme .index-contact::before,
html.dark-theme .index-contact::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(78, 110, 129, 0.2), rgba(137, 176, 174, 0.2));
    z-index: -1;
}

/* Style pour les liens dans les sections */
.index-contact a {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

.index-contact a:hover {
    text-decoration: underline;
}

@media print {
  nav,
  footer,
  #theme-toggle {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    margin: 0;
    padding: 0;
    box-shadow: none !important;
    font-size: 11pt;
  }

  header,
  section {
    page-break-inside: avoid !important;
    break-inside: avoid;
    box-shadow: none !important;
    margin: 0 auto 2rem auto;
    width: 100%;
    max-width: 100%;
  }

  .main-layout {
    display: block !important;
  }

  .sidebar,
  .content {
    width: 100% !important;
    display: block;
  }

  a {
    color: black !important;
    text-decoration: none;
  }

  .experience,
  .formation,
  .timeline-item {
    page-break-inside: avoid !important;
    break-inside: avoid;
  }

  @page {
    size: A4;
    margin: 2cm;
  }

  /* Empêcher le débordement horizontal */
  html, body {
    max-width: 100%;
    overflow: visible !important;
  }

  /* Supprimer les grilles inutiles pour l'impression */
  .repo-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .repo-card {
    width: 100% !important;
    margin-bottom: 1rem;
    height: auto !important;
  }
}

.index-biography .bio-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.index-biography .bio-image {
  flex: 1 1 250px; /* l'image prend minimum 250px, s'adapte */
  text-align: center;
}

.index-biography .bio-image img {
    border-radius: 0;       /* plus de rondeur */
    width: auto;            /* taille originale */
    max-width: 100%;        /* ne dépasse pas la colonne */
    height: auto;           /* conserve le ratio original */
    object-fit: contain;    /* conserve le format */
    float: none;            /* plus de flottant */
    shape-outside: none;    /* inutile */
    display: block;
    margin: 0 auto;         /* centré si nécessaire */
}

.index-biography .bio-text {
  flex: 2 1 400px; /* texte plus large */
}

@media screen and (max-width: 768px) {
  .index-biography .bio-container {
    flex-direction: column;
    text-align: center;
  }

  .index-biography .bio-text {
    flex: 1 1 100%;
  }

  .index-biography .bio-image {
    flex: 1 1 100%;
  }
}



.contact-section {
  padding: 4rem 2rem;
  background-color: var(--background);
}

.contact-container {
  display: flex;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1 1 300px;
}

.contact-info h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info p {
  margin: 0.8rem 0;
  line-height: 1.5;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form-container {
  flex: 1 1 400px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.contact-form .cta {
  background-color: var(--accent);
  color: white;
  font-weight: bold;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s;
}

.contact-form .cta:hover {
  background-color: var(--accent-active);
}

@media screen and (max-width: 768px) {
  .contact-container {
    flex-direction: column;
  }
}

/* Styles pour les alertes */
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: var(--radius);
  font-weight: 500;
  box-shadow: var(--shadow);
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Mode sombre pour les alertes */
:root.dark-theme .alert-success,
html.dark-theme .alert-success {
  background-color: #1b4332;
  border-color: #2d6a4f;
  color: #d1e7dd;
}

:root.dark-theme .alert-error,
html.dark-theme .alert-error {
  background-color: #842029;
  border-color: #b02a37;
  color: #f8d7da;
}

  body { font-family: Arial, sans-serif; padding: 20px; }
  #git_result { margin-top: 20px; }
  img#git_avatar { border-radius: 50%; width: 100px; }
