:root{
  --green-dark: #4f8f78;
  --green-mid:  #78b9a1;
  --copper: #b46a2b;
  --text: #111;
  --bg: #fff;
  --border-accent: var(--green-dark);
  --text-light: #f3f7f5;
  --sidebar-w: 240px;
  --topbar-h: 74px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: "Muli", Roboto, Georgia, "Times New Roman", serif;
  color: var(--text);
  background: var(--bg);
}



/* =========================
   Sidebar (desktop)
   ========================= */
.sidebar{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background: var(--green-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  gap: 18px;
}

.sidebar__top{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.photo{
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 999px;
  border: 4px solid rgba(255,255,255,0.25);
}

.name{
  margin: 0;
  font-size: 1.35rem;
  text-align: center;
  font-weight: 650;
}

.social{
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.social a{
  color: #fff;
  font-size: 1.3rem;
  opacity: 0.92;
  text-decoration: none;
}
.social a:hover{ opacity: 1; }

.sidebar__bottom{
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini-title{
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.address-block p{
  margin: 0;
  line-height: 1.35;
  font-size: 0.95rem;
  opacity: 0.95;
}

.logos{
  margin-top: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.logos img{
  height: 38px;
  width: auto;
  display: block;
  filter: brightness(1.05);
  opacity: 0.95;
}
.logos a:hover img{ opacity: 1; }

/* =========================
   Layout (desktop)
   ========================= */
.page{
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.topbar{
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--green-mid);
  border-bottom: 6px solid var(--border-accent);
  display: flex;
  align-items: center;
  padding: 0 22px;
  z-index: 10;
}

.nav{
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a{
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.95;
}
.nav a:hover{
  opacity: 1;
  text-decoration: underline;
}

.content{
  padding: calc(var(--topbar-h) + 24px) 42px 64px 42px;
  /*max-width: 980px;*/
}

/* =========================
   Sections & typography
   ========================= */
.section{
  padding: 26px 0;
  border-bottom: 2px dashed rgba(79, 143, 120, 0.6);
  scroll-margin-top: 40px;
}

.section h2{
  color: var(--copper);
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.section h3{
  color: var(--copper);
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 1.2rem;
}

.sidebar,
.topbar{
  color: var(--text-light);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

html{ scroll-padding-top: 40px; }

.conf-highlight{
  color: var(--green-dark);
  font-weight: 500;
}

.pkg-name{
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.r-logo{
  color: #276DC3;   /* bleu officiel R */
  font-size: 1.05em;
  vertical-align: -0.05em;
}



/* =========================
   Lists
   ========================= */
.section ul{
  list-style: disc;
}

.section ul li::marker{
  color: var(--green-dark);
  font-size: 1.1em;
}

.teaching-list > li{
  margin-bottom: 14px;
}

.teaching-list ul{
  margin-top: 6px;
}

/* =========================
   Resume
   ========================= */
.cv-item{
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 18px;
  margin-bottom: 14px;
}

.cv-date{
  font-style: italic;
  color: var(--green-dark);
  text-align: right;
  white-space: nowrap;
}

.cv-content{
  line-height: 1.4;
}

.cv-bullets{
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.cv-bullets > li{
  margin-left: 0;
}

.cv-details summary{
  cursor: pointer;
  list-style: none;
}

.cv-details summary::-webkit-details-marker{
  display: none;
}

.cv-details summary::before{
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--green-dark);
  transition: transform 0.15s ease;
}

.cv-details[open] summary::before{
  transform: rotate(90deg);
}

.cv-details[open] > *:not(summary){
  border-left: 1px dashed #d3d3d3;
  padding-left: 12px;
  margin-left: 14px;
}

.cv-details .cv-note{
  margin-top: 8px;
}


/* =========================
   Links (content only)
   ========================= */
.content a{
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 500;
}

.content a:hover{
  color: var(--green-mid);
  text-decoration: underline;
}

/* =========================
   Mobile-only elements (hidden on desktop)
   ========================= */
.mobile-header{ display: none; }
.mobile-topbar{ display: none; }
.contact-mobile{ display: none; }

.contact-block{
  margin-top: 12px;
  line-height: 1.35;
}

.contact-title{
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 4px;
}

/* =========================
   Responsive (mobile)
   ========================= */
@media (max-width: 900px){

  .sidebar{ display: none; }
  .topbar{ display: none; }
  .page{ margin-left: 0; }

  .mobile-topbar{
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--green-mid);
    border-bottom: 6px solid var(--border-accent);
    color: var(--text-light);
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    padding: 10px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-topbar__name{
    font-weight: 850;
    font-size: 2rem;
    white-space: nowrap;
  }

  .mobile-topbar__icons a{
    font-size: 4rem;
  }

  .mobile-topbar a,
  .mobile-topbar a i,
  .mobile-topbar i.fa-brands,
  .mobile-topbar i.fa-solid{
    color: var(--text-light) !important;
  }

  .content{
    padding: 18px 16px 56px 16px;
    max-width: 100%;
    margin-top: 64px;
  }

  html{ scroll-padding-top: 86px; }
  .section{ scroll-margin-top: 86px; }

  .cv-item{ grid-template-columns: 1fr; }
  .cv-date{ text-align: left; margin-bottom: 2px; }

  .contact-mobile{ display: block; }
}

/* =========================
   Decorative
   ========================= */
.corner-cat{
  position: fixed;
  bottom: 16px;
  right: 18px;
  font-size: 1.2rem;
  color: var(--green-dark);
  opacity: 0.6;
  transform: scaleX(-1);
  z-index: 20;
  pointer-events: none;
}
