/* ===== Reset de base ===== */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Source Sans Pro', Arial, sans-serif;
  line-height: 1.4;
  background-color: #fdfdfd;
  color: #333;
  font-size: 1.07rem;
}


.external-link { color: #00509e; text-decoration: none; font-style: normal; }
.external-link:hover { text-decoration: underline; color: #001f4d; }

/* ===== Header ===== */
header {
  background: #001f4d;
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
}
header .header-text { display: inline-block; max-width: 90%; }
header h1 { margin: 0 0 0.8rem 0; font-size: 2.4rem; line-height: 1.2; }
header h2 { margin: 0.5rem 0 0 0; font-size: 1.4rem; font-weight: normal; color: #d0d8e8; line-height: 1.5; }

/* ===== Lang switch button ===== */
.lang-switch {
  font-size: 1rem;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  padding: 0.4rem 0.7rem;
  background-color: #ffd700;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.lang-switch:hover { 
  background-color: #ffbf00; 
  transform: scale(1.05);
}

/* ===== Navigation ===== */
nav {
  display: flex;
  justify-content: center;
  background: #003366;
  border-bottom: 2px solid #001f4d;
  height: auto;
}
nav a {
  color: white;
  text-decoration: none;
  padding: 1.3rem 2.3rem;
  display: block;
  font-weight: bold;
  font-size: 1.15rem;
  border-left: 1px solid #004080;
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}
nav a:first-child { border-left: none; }
nav a:hover { background: #001f4d; color: #ffd700; }

/* ===== Main ===== */
main {
  max-width: 880px;
  margin: 2.5rem auto;
  padding: 0 1rem 1rem;   
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
main section { padding: 0.7rem 1rem 1.4rem; }

.profile-header, .teaching-university, .section-intro, .contact-home { margin-top: 0; }
.section-intro { margin-bottom: 1.5rem; }

main h2 {
  color: #003366;
  border-bottom: 2px solid #001f4d;
  padding: 0.3rem 0 0.3rem 0;
  margin: 0 0 1.9rem 0;
  font-size: 1.8rem;
}

section { display: none; visibility: hidden; opacity: 0; transition: opacity 0.3s ease; }
section.active { display: block; visibility: visible; opacity: 1; }

/* ===== Profile Header ===== */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: clamp(1rem, 5%, 4rem);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.profile-header div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: auto;
}
.profile-header img { 
  width: 180px; 
  height: 180px; 
  border-radius: 50%; 
  border: 1.5px solid #003366; 
  object-fit: cover; 
  transform: rotate(37deg); 
}
.view-cv {
  display: inline-block;
  margin: 1rem 0 1.5rem 0;
  padding: 0.5rem 0.9rem;
  background-color: #003366;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s, transform 0.2s;
}
.view-cv:hover { background-color: #001f4d; transform: scale(1.05); }

.profile-header div:last-child {
  flex: 1;
  max-width: clamp(400px, 70%, 700px);
  min-width: 280px;
  word-wrap: break-word;
  text-align: left;
}

/* ===== Contact ===== */
.contact-home {
  padding: 0.8rem 0.6rem;    
  max-width: 650px;
  margin: 0 auto;
  background-color: #e6f0fa;
  border-left: 4px solid #003366;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-badge {
  font-size: 1.4rem;
  color: #003366;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2rem;
}

.contact-blocks {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-blocks .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.contact-blocks .contact-item .icon {
  display: inline-flex;
  width: 22px;   /* réduit (au lieu de 22px) pour rapprocher du texte */
  height: 22px;
  flex-shrink: 0;
  color: #003366;
  margin-top: 0.2em;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-blocks,
.contact-blocks * {
  white-space: nowrap;
}

.contact-home {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}














/* ===== Section Enseignement ===== */
.teaching-university {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}
.teaching-university h3 {
  color: #001f4d;
  margin: 0.3rem 0 1.2rem 0;
  font-size: 1.6rem;
  border-bottom: 1px solid #003366;
}
.teaching-presentations {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.teaching-presentations td {
  padding: 0.6rem 0.8rem;
  background-color: #fcfdfe;
  font-size: 1.05rem; /* taille normale pour le contenu autre que l'année */
  font-weight: normal; /* contenu normal */
  color: #333; /* texte noir par défaut */
}

.teaching-presentations td:first-child {
  font-size: 1.15rem;
  font-weight: bold;
  color: #003366; /* années en bleu gras */
}

.teaching-presentations tr:nth-child(odd) td {
  background-color: #f0f6fc;
}


/* ===== Section Recherche ===== */



.research-subsection {
  margin-top: 3.2rem;
  padding: 0.8rem 1rem 0.6rem;
  border-left: 4px solid #003366;
  background-color: #f4f8fc;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.research-subsection h3 {
  margin: 0.1rem 0 1.4rem 0;
  color: #001f4d;
  font-size: 1.6rem;
  font-weight: 700;
  border-bottom: 1px solid #003366;
  padding-bottom: 0.3rem;
}
.research-subsection h4 {
  position: relative;
  margin: 1.5rem 0 1.1rem;
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 600;
  color: #003366;
  padding-left: 0.9em;
}
.research-subsection h4::before {
  content: "";
  position: absolute;
  left: 0em;
  top: 58%;
  transform: translateY(-50%);
  width: 0.38em;
  height: 0.38em;
  background: #003366;
  border-radius: 50%;
}
#recherche ul { margin: 0.6rem 0 1rem 0; padding-left: 1.2rem; list-style-type: disc; }
#recherche ul li { margin-bottom: 1rem; }
.research-subsection ol { margin: 0.6rem 0 1.2rem 1rem; padding: 0; list-style: none; counter-reset: publication-counter; }
.research-subsection ol li {
  counter-increment: publication-counter;
  position: relative;
  margin-bottom: 0.4rem;
  padding-left: 0.5rem;
}
.research-subsection ol li::before {
  content: counter(publication-counter) ". ";
  position: absolute;
  left: -1rem;
  color: #003366;
  font-weight: bold;
}

/* ===== Présentations Recherche ===== */
.research-presentations {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0 0.9rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.research-presentations td { 
  line-height: 1.5; 
  padding: 0.4rem 0.8rem; 
  border-bottom: 1px solid #d0e1f2; 
  white-space: nowrap;
}
.research-presentations tr:last-child td { 
  border-bottom: none;
 }
.research-presentations tr:nth-child(odd) { 
  background-color: #fcfdfe; 
}

.teaching-presentations td,
.research-presentations td {
  white-space: nowrap;
}


/* ===== Footer ===== */
footer {
  margin:0;
  border: none;
  background: #001f4d;
  color: white;
  padding: 3rem 1.5rem;
  font-size: 1rem;
}
.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
}
.footer-logos {
  display: flex;
  gap: 2rem;
}
.footer-logos img {
  height: 100px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}
.footer-logos img:hover { transform: scale(1.05); }
.footer-line p {
  margin: 0;
  line-height: 1.4;
}


/* ===== Responsive complet ===== */

/* Tablettes (601px à 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  header { padding: 2.5rem 1.2rem; }
  header h1 { font-size: 2.2rem; }
  header h2 { font-size: 1.35rem; }
  .lang-switch { font-size: 0.95rem; top: 0.9rem; right: 1.2rem; padding: 0.35rem 0.65rem; color: #001f4d; }
  .profile-header { gap: 1.5rem; font-size: 1.4rem; }
  .profile-header div:last-child { margin-top: 0.5rem; }
  .profile-header img { width: 160px; height: 160px; }
  .view-cv { font-size: 1.02rem; padding: 0.55rem 1rem; }
  .contact-home { max-width: 95%; padding: 0.75rem 0.5rem; }
  .contact-blocks { flex-direction: row; gap: 2rem; flex-wrap: wrap; }
}

/* Mobiles (≤600px) */
@media (max-width: 600px) {

/* ===== Sections plein écran sur mobile ===== */
main {
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none; /* facultatif : supprime l’ombre du conteneur principal */
  padding: 0;
  padding-bottom: 3rem;
}

main section {
  padding: 1rem; /* petit espace intérieur pour aérer le texte */
  border-radius: 0;
}

  header { padding: 2rem 1rem; }
  header h1 { font-size: 2rem; }
  header h2 { font-size: 1.2rem; }
  .lang-switch { top: 0.8rem; right: 1rem; font-size: 0.8rem; padding: 0.2rem 0.5rem; color: #001f4d; }
  .profile-header { flex-direction: column; align-items: center; gap: 1rem; margin-top: 1.8rem; }
  .profile-header div:last-child { text-align: left; max-width: 100%; margin-top: 0; }
  .profile-header img { width: 160px; height: 160px; }
  .view-cv { font-size: 1rem; padding: 0.5rem 1rem; margin-bottom: 0.8rem; }
  .contact-home { padding: 0.8rem 0.5rem; max-width: 90%; }
  .contact-blocks { flex-direction: column; align-items: center; gap: 0; }
  .contact-blocks .contact-item { align-items: center; gap: 0.5rem; align-items: flex-start; }  
  .contact-blocks .contact-item .icon { margin-top: 0.2em; }
  nav a { padding: 1rem 1.5rem; font-size: 1rem; }

/* ===== Responsive tables ===== */


/* ===== Tableau Enseignement (mobile) ===== */
.teaching-university {
  overflow-x: auto;                      /* active le scroll horizontal */
  -webkit-overflow-scrolling: touch;     /* scroll fluide sur iOS */
  padding: 0.5rem;                       /* espace autour du tableau */
  background: transparent;               /* fond neutre */
}

.teaching-presentations {
  min-width: 600px;                      /* évite l’écrasement des colonnes */
  border-collapse: collapse;
  border-radius: 8px;                    /* coins comme la version recherche */
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);/* ombre plus visible sur mobile */
  overflow: hidden;
  background-color: white;               /* fond uni pour que l’ombre ressorte */
}

.teaching-presentations td {
  padding: 0.6rem 0.8rem;
  background-color: #fcfdfe;
  font-size: 1.05rem;
  color: #333;
}

.teaching-presentations td:first-child {
  font-weight: bold;
  color: #003366;
}

.teaching-presentations tr:nth-child(odd) td {
  background-color: #f0f6fc;
}




.research-subsection {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.8rem 1rem 0.6rem; /* mêmes valeurs qu’avant */
  }

  .research-subsection table {
    min-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: 1rem; /* centre le tableau dans la zone de scroll */
    border-collapse: collapse;
  }

#recherche ul {
    margin-left: 0;
    padding-left: 1rem; /* petit retrait pour ne pas coller totalement au bord */
  }


  /* Footer responsive */
  @media (max-width: 600px) {
  /* Footer responsive */
  .footer-line {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .footer-logos {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;     /* reste sur une ligne */
    gap: 1rem;
  }

  .footer-logos img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    padding: 8px;              /* un peu d’air autour du logo */
    display: block;
  }
}
