/* =========================================================
   VARIABLES GLOBALES
   ========================================================= */

:root {
  --accent: #005f73;
  --accent-soft: #e0fbfc;
  --text-main: #212529;
  --bg-main: #f7f9fc;
}

/* =========================================================
   TYPO & FOND GLOBAL
   ========================================================= */

body {
  color: var(--text-main);
  font-family: 'Trebuchet MS', Arial, sans-serif;
  text-align: justify;
  padding-top: 60px;
  background-color: var(--bg-main);
  line-height: 1.6;
}

h1#title {
  color: #222222;
  letter-spacing: 0.03em;
  padding-bottom: 0.2em;
  margin-bottom: 0.8em;
}

h1 a {
  outline: none;
  box-shadow: none;
  text-decoration: none;
}

/* Titres généraux un peu plus marqués (optionnel, tu peux enlever si tu préfères) */
h1, h2, h3, h4, h5, .display-5 {
  color: #1a1a1a;
  font-weight: 700;
}



/* =========================================================
   DRAPEAUX LANGUE
   ========================================================= */

#Presentflag,
#flag {
  border-radius: 5px;
}

/* =========================================================
   CAROUSEL
   ========================================================= */

.carousel .carousel-indicators li {
  background-color: #888;
}
.carousel .carousel-indicators li.active {
  background-color: #000;
}

.carousel {
  margin-top: 20px;
  margin-bottom: 10px;
  background-color: #fff;
}
.carousel-inner {
  height: auto;
  border: 1px solid #000;
}
.carousel-caption {
  position: relative !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  color: #000 !important;
  padding-left: 7% !important;
  padding-right: 7% !important;
}

.carousel-control-next,
.carousel-control-prev {
  z-index: 999 !important;
  width: 7% !important;
}
.carousel-control-next-icon,
.carousel-control-prev-icon {
  filter: invert(1);
}

/* =========================================================
   PHOTO DE PRÉSENTATION
   ========================================================= */

.figure-img.img-fluid.rounded#Moi {
  position: relative;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* =========================================================
   PETITES CARTES D’ACCÈS (cardA)
   ========================================================= */

.card.cardA {
  border-color: #000;
  width: 9rem;
  height: 11rem;
  border-radius: 4px;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),
              0 3px 1px -2px rgba(0,0,0,0.12),
              0 1px 5px 0 rgba(0,0,0,0.2);
}

.card.cardA:hover {
  cursor: pointer;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),
              0 9px 46px 8px rgba(0,0,0,0.12),
              0 11px 15px -7px rgba(0,0,0,0.2);
}

.card-body.text-center {
  padding: 1px;
}

a.card.cardA,
a.card.cardA:hover {
  color: inherit;
  text-decoration: none;
}

.card-title {
  color: #000;
  font-size: 17px;
  font-weight: bold;
}

/* =========================================================
   BLOCS PRINCIPAUX (boîtes blanches)
   ========================================================= */

.mb-4.bg-light.rounded {
  background-color: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

@media (min-width: 800px) {
  .mb-4.bg-light.rounded {
    padding: 20px;
  }
}

/* =========================================================
   LISTES & UL GLOBAL
   ========================================================= */

ul {
  margin: 0;
  padding-bottom: 25px;
}

ul.spe2 {
  list-style-type: none;
}

li.spe {
  list-style-type: none;
}

li.spe3 {
  margin: 10px 0;
}

@media (max-width: 800px) {
  li, li.spe, li.spe2, li.spe3 {
    list-style-type: none;
  }
}

/* =========================================================
   ZONE VIDÉO (ancienne partie, utilisée si tu gardes la vidéo)
   ========================================================= */

.container#video {
  margin-left: 13%;
  margin-right: 13%;
}

@media (max-width: 570px) {
  .container#video {
    margin-left: 10%;
    margin-right: 10%;
  }
}

/* Logo travaux caché sur petit écran */
@media (max-width: 570px) {
  #logoTravaux { 
    display: none; 
  }
}

/* =========================================================
   COLONNE GAUCHE CV (plan + bouton PDF)
   ========================================================= */

@media (max-width: 1140px) {
  .col-sm-2 {
    display: none;
  }
}

/* Bouton de téléchargement CV */
.cv-download-mobile {
  display: none;
}
.cv-download-desktop {
  display: block;
}

/* Sur petit écran : cacher colonne gauche, montrer bouton mobile */
@media (max-width: 1140px) {
  ul { padding-left: 0; }

  .card-body.card-custom {
    border-left: 0;
    padding-left: 0;
  }

  .cv-download-mobile {
    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

/* =========================================================
   SECTION TRAVAUX (cartes de recherche)
   ========================================================= */

.section-travaux {
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

/* Carte de recherche horizontale */
.research-card {
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  border-radius: 12px;
}

.research-card:hover {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
}

.research-card .card-title {
    font-size: 1.35rem; /* Augmente la taille, généralement 1.25rem pour h5 */
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.research-card .card-subtitle {
  font-size: 0.9rem;
}

/* Image de la carte */
.research-card-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 !important;
}

/* Variante sombre éventuelle */
.research-card-dark {
  background-color: #111827;
  color: #ffffff;
}


.research-card .col-lg-3 {
    overflow: hidden; /* Doit être présent et essentiel */
}

/* Image de la carte */
.research-card-img {
    width: 100%;
    height: 100%; /* Important, car nous utilisons h-100 dans le HTML */
    display: block;
    border-radius: 0 !important;
    /* AJOUT : Assure que l'image remplit l'espace sans se déformer */
    object-fit: cover; 
}




.research-card .img-credit {
    /* POSITIONNEMENT */
    position: absolute; /* Permet la superposition */
    bottom: 0;        /* MODIFIÉ : Collé au BAS de la colonne */
    top: auto;        /* Assure que 'top' est ignoré */
    left: 0;          /* Collé à gauche */
    width: 100%;      /* Prend toute la largeur de la colonne */
    z-index: 10;      /* Assure qu'il est au-dessus de l'image */

    
    /* ESPACEMENT */
    margin: 0 !important;
    padding: 5px 0 !important; /* Petit padding vertical pour un peu d'air */
    line-height: normal; 
}

/* =========================================================
   BOUTONS "ABSTRACT" (publications)
   ========================================================= */

.buttonClassA {
  color: #005f73;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.buttonClassA:hover {
  text-decoration: underline;
}

.buttonClassB {
  color: #ae2012;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Nav à l’intérieur des footers */
.nav {
  padding: 0;
}

/* =========================================================
   PUBLICATIONS & PROCEEDINGS
   ========================================================= */

/* Corps et footer des cartes de publications */
.card-body.card-custom {
  background-color: #f8f9fa;
  border-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
}

.card-footer.card-custom {
  background-color: #f8f9fa;
  padding: 0;
  border-top: 0;
}

/* Dans la section Publications : on laisse le parent gérer le fond + padding plus compact */
#Publications .card-body.card-custom,
#Publications .card-footer.card-custom {
  background-color: transparent;
}

#Publications .card-body.card-custom {
  padding: 0.6rem 1rem;
}

#Publications .card-footer.card-custom {
  position: static;
  padding-top: 0;
  padding-bottom: 0;
}

#Publications .card-footer.card-custom ul {
  padding-bottom: 0;
}

/* Filtres (boutons thématiques au-dessus de la liste) */
.pub-filter {
  margin-bottom: 0.75rem;
}

.pub-filter button.btn {
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
}

.pub-filter button.btn.active {
  background-color: #6c757d;
  color: #ffffff;
}

/* Cartes de publications (pour surbrillance) */
.publication-card {
  transition: box-shadow 0.15s ease,
              transform 0.15s ease,
              opacity 0.15s ease,
              background-color 0.15s ease;
}

/* Carte mise en avant par filtre */
.publication-card.pub-highlight {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Fond surligné pour le corps + footer */
.publication-card.pub-highlight .card-body.card-custom,
.publication-card.pub-highlight .card-footer.card-custom {
  background-color: #fff9e6;
}

/* Carte atténuée par filtre */
.publication-card.pub-dim {
  opacity: 0.4;
}

/* Bouton "Abstract" dans la mise en page 2-colonnes (si tu l’utilises) */
#Publications .card-body.card-custom .btn-link {
  font-size: 0.9rem;
}

/* =========================================================
   TITRES RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {
  h1#title {
    font-size: 30px;
  }
}

/* --- Bouton rond pour le + (Vérifie que tu as bien ce bloc) --- */
.btn-toggle-abstract {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #005f73;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
    margin-top: 2px;
}

.btn-toggle-abstract:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.btn-toggle-abstract.open {
    transform: rotate(45deg); /* Ça tourne en croix */
    background-color: #005f73;
    color: white;
    border-color: #005f73;
}

/* --- Ajustement de la carte --- */
.card-custom-compact {
    padding: 10px 15px;
    background-color: white;
    /* J'ai ENLEVÉ la ligne border-bottom ici pour te laisser le choix */
}

/* Style de l'abstract déroulé */
.abstract-box {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.95em;
    color: #495057;
    border-left: 3px solid #005f73;
}



/* --- Sidebar Navigation Moderne --- */

/* Le conteneur du menu */
.sidebar-sticky-container {
    position: -webkit-sticky; /* Pour Safari */
    position: sticky;
    top: 100px; /* Le menu se "colle" à 100px du haut quand on scrolle */
    padding-left: 15px; /* Un peu d'espace */
}

/* Le bouton de téléchargement */
.btn-cv-download {
    display: block;
    width: 100%;
    border: 2px solid #005f73; /* Couleur thème */
    color: #005f73;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
    background-color: transparent;
    margin-bottom: 30px; /* Espace avant la liste */
}

.btn-cv-download:hover {
    background-color: #005f73;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 95, 115, 0.2);
}

/* La liste de navigation */
.modern-sidebar .list-group-item {
    border: none; /* Plus de bordures grises moches */
    background-color: transparent; /* Fond transparent */
    color: #6c757d; /* Gris doux pour le texte inactif */
    padding: 8px 0 8px 15px; /* Espace */
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 2px solid #e9ecef; /* Ligne grise fine à gauche par défaut */
    margin-bottom: 0;
    border-radius: 0; /* Pas d'arrondis, on veut un trait net */
    transition: all 0.2s ease;
}

/* Au survol */
.modern-sidebar .list-group-item:hover {
    color: #005f73;
    background-color: transparent;
    border-left-color: #a8dadc; /* La ligne se colore légèrement */
    padding-left: 20px; /* Petit mouvement vers la droite */
}

/* Élément Actif (détecté par Scrollspy) */
.modern-sidebar .list-group-item.active {
    color: #005f73; /* Texte couleur thème */
    background-color: transparent !important; /* Force la transparence */
    border-left: 3px solid #005f73; /* La ligne devient épaisse et colorée */
    font-weight: 700;
    padding-left: 20px; /* Reste décalé */
}


/* --- NOUVEAUX STYLES POUR LA SECTION PRÉSENTATION --- */

/* Style du nom pour correspondre à l'aspect des titres (e.g., Publications) */
.main-cv-name {
    font-size: 2.5rem; 
    font-weight: 700 !important;
    color: var(--text-main); 
    line-height: 1.2;
    padding-top: 5px;
}

/* Style du sous-titre (Post-doctorant...) */
.lead.text-muted {
    /* Taille légèrement augmentée pour équilibrer avec le nom */
    font-size: 1.15rem !important; /* Exemple : Augmenté à 1.15rem */

    font-weight: 400 !important;
    
    /* Assurer que la couleur reste le gris pour ne pas concurrencer le nom */
    color: var(--text-main) !important; 
    /* J'ai changé 'text-muted' pour 'text-main' (noir) pour un meilleur contraste, 
       mais vous pouvez laisser en gris si vous préférez ! */
    
    /* Pensez à ajuster la marge basse si nécessaire pour éviter les espaces vides */
    margin-bottom: 0.5rem !important;
}

/* Style de l'image de profil */
.profile-image-container {
    text-align: center;
    padding-right: 30px; 
}

.profile-image-container img {
    border: 3px solid #000000; /* CHANGÉ ICI : couleur noire */
    border-radius: 12px; 
    width: 150px;
    height: 150px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    margin-top: 10px;
}

/* Style des drapeaux pour qu'ils soient moins agressifs */
.flag-link img {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.flag-link img:hover {
    opacity: 1;
}

/* Amélioration de la section Contact (utiliser flexbox) */
.contact-info-block {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
    margin-top: 20px;
    padding-top: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    color: var(--text-main);
}

.contact-item a {
    color: #005f73;
    font-weight: 600;
}

/* Style des icônes SVG */
.contact-item svg {
    color: #005f73; /* Les icônes restent bleues pour le contraste et la modernité */
    margin-right: 10px;
    flex-shrink: 0; 
}


/* =========================================================
   NAVBAR / LIENS DU MENU
   ========================================================= */

/* Cible toutes les sections qui sont des cibles d'ancre */
#Travaux,
#Publications {
    padding-top: 70px !important;
    margin-top: -70px !important; 
}

#Presentation{
    padding-top: 120px !important;
    margin-top: -70px !important; 
}

/* 
#formation,
#publications,
#communication,
#exp,
#competence{
    padding-top: 70px !important;
    margin-top: -70px !important;  
} */



@media (max-width: 500px) {
  .short-nav { 
    display: none; 
  }
}

@media (min-width: 1000px) {
    /* Base du lien : on assure que la bordure est là, transparente */
    .navbar-nav .nav-link { 
        border-bottom: 3px solid transparent !important; 
    }
    
    /* Le lien actif ou survolé obtient la couleur thème */
    .navbar-nav .nav-item.active .nav-link {
        /* Utilisez la variable accent pour plus de cohérence */
        border-bottom-color: var(--accent) !important;
        color: var(--accent) !important;
    }

    /* Supprime la vieille règle pour le a.nav-link.active si elle existe encore */
    a.nav-link.active,
    a.nav-link.active:hover,
    a.nav-link.active:focus {
        border-bottom-color: var(--accent) !important;
    }
}

/* --- NAVBAR MODERNE ET SOBRE (Centrage stable et compact) --- */

/* Base de la navbar */
.navbar-dark-custom {
    background-color: white !important; 
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
    
    /* Légèrement plus de padding vertical pour plus d'espace de centrage */
    padding-top: 2px !important; 
    padding-bottom: 2px !important; 
}

/* Le Nom du chercheur (Brand) */
.navbar-brand {
    color: #212529 !important; 
    /* AUGMENTATION DE LA TAILLE DE LA POLICE pour un meilleur équilibre visuel */
    font-size: 1.6rem; /* Passé de 1.4rem à 1.6rem */
    font-weight: 700;
    margin-right: 30px; 
    transition: color 0.2s ease;
}


/* Les liens de navigation restent avec le FIX visuel */
.navbar-nav .nav-link {
    color: #495057 !important; 
    font-weight: 500;
    padding-left: 15px !important;
    padding-right: 15px !important;
    transition: all 0.2s ease;
    
    /* Paddings à 0 et margin-top pour compenser la bordure */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 19px !important; /* Conserver le décalage pour la bordure */
    
    border-bottom: 3px solid transparent; 
}

.navbar-toggler-icon {
    /* Ceci est l'URL encodée d'une icône hamburger noire */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Effet de survol ET ACTIF (Surlignage bleu) */

/* Dropdown */
.dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    color: #495057;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #005f73;
}