/* ===== 70s bold: pale green + flashy orange ===== */
:root{
  /* BACKGROUNDS */
  --bg: #ecefd0;
  --card: #fdfcf7;

  /* TEXT */
  --text: #2b241f;
  --muted: #5e5a55;

  /* ACCENTS */
  --brand: #ff5a1f;
  --accent: #2f6b3c;
  --border: rgba(43,36,31,.18);

  --shadow: 0 12px 28px rgba(43,36,31,.12);
}

/* Base */
body{
  background: var(--bg);
  color: var(--text);
  letter-spacing: .15px;
}

/* Links = orange */
a{
  color: var(--brand);
  font-weight: 650;
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Headings = orange */
h1, h2, h3{
  color: var(--brand);
  letter-spacing: -0.02em;
}

h1{
  font-weight: 900;
}

h2{
  font-weight: 850;
  margin-top: 1.8rem;
  padding-bottom: .35rem;
  border-bottom: 3px solid rgba(255,90,31,.35);
}

/* Navbar */
.navbar{
  background: rgba(248,251,245,.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand{
  color: var(--brand) !important;
  font-weight: 900;
}

.navbar-nav .nav-link{
  color: var(--text);
  font-weight: 650;
}

.navbar-nav .nav-link.active{
  color: var(--brand) !important;
}

/* Cards */
.callout{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Pills */
.pill{
  display: inline-flex;
  align-items: center;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid rgba(47,107,60,.45);
  color: var(--text);
  font-weight: 650;
  font-size: .92rem;
  margin: .15rem .35rem .15rem 0;
  line-height: 1.2;
  white-space: nowrap;
}

.pill::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
  margin-right: .4rem;
}

.pill-container{
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .6rem;
}

/* Highlight utility */
.hl{
  background: linear-gradient(180deg, transparent 60%, rgba(255,90,31,.45) 0);
  padding: 0 .18em;
  border-radius: 6px;
}

.home-hero{
  margin-top: 6rem;
}

.anchorjs-link{
  display: none !important;
}

.quarto-title-block{
  display: none !important;
}

/* Generic research text */
.research-text{
  max-width: 920px;
}

.research-text p{
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.65;
}

/* Paper entry styling */
.paper-title{
  color: var(--brand);
  font-weight: 700;
}

.paper-subtitle{
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: .2rem;
  color: var(--brand);
}

.paper-status{
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
}

.talk-title{
  color: var(--brand);
  font-style: italic;
  font-weight: 650;
}

/* ===== Research page pimping ===== */

.research-card{
  background: rgba(253,252,247,.72);
  border: 1.5px solid rgba(43,36,31,.16);
  border-radius: 28px;
  padding: 1.7rem 1.9rem;
  margin: 1.6rem 0 2rem;
  box-shadow: 0 14px 34px rgba(43,36,31,.10);
  position: relative;
  overflow: hidden;
}

.research-card::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 100%;
  background: var(--brand);
}

.research-card::after{
  content: "";
  position: absolute;
  right: -55px;
  top: -55px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,90,31,.12);
  z-index: 0;
}

.research-card > *{
  position: relative;
  z-index: 1;
}

.research-card h3{
  margin-top: 0;
  margin-bottom: .55rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.research-card p{
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.65;
}

.featured-paper{
  border: 2px solid rgba(255,90,31,.35);
  background: linear-gradient(
    135deg,
    rgba(253,252,247,.88),
    rgba(236,239,208,.75)
  );
}

.paper-meta{
  margin: .4rem 0 1.2rem;
}

.status-badge{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1.5px solid rgba(47,107,60,.45);
  background: rgba(47,107,60,.08);
  color: var(--accent);
  font-size: .9rem;
  font-weight: 750;
  letter-spacing: .01em;
}

.status-badge::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  margin-right: .45rem;
}

.coauthor-badge{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,90,31,.45);
  background: rgba(255,90,31,.08);
  color: var(--brand);
  font-size: .9rem;
  font-weight: 750;
  letter-spacing: .01em;
  margin-right: .4rem;
  margin-bottom: .35rem;
}

.coauthor-badge::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  margin-right: .45rem;
}

/* ===== Awards + Presentations boxes ===== */

.research-details{
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.2rem;
  align-items: start;
  margin-top: 1.6rem;
}

.detail-box{
  background: rgba(236,239,208,.65);
  border: 1px solid rgba(43,36,31,.14);
  border-radius: 22px;
  padding: 1rem 1.1rem;
  width: 100%;
}

.detail-box h4{
  color: var(--brand);
  margin-top: 0;
  margin-bottom: .8rem;
  font-weight: 850;
  letter-spacing: -.02em;
}

.detail-box ul{
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.detail-box li{
  margin-bottom: .75rem;
}

.detail-box li:last-child{
  margin-bottom: 0;
}

.detail-box strong{
  color: var(--accent);
  font-weight: 800;
}

/* ===== Version Quarto columns qui marchait ===== */

.research-details.columns{
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 1.6rem;
}

/* ===== FINAL FIX: espace entre Awards et Presentations sans casser l'horizontal ===== */

.research-details.columns{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  margin-top: 1.6rem !important;
  width: 100% !important;
}

/* Colonnes Quarto */
.research-details.columns > .column{
  display: flex !important;
  box-sizing: border-box !important;
}

/* Crée l'espace SANS changer la largeur totale */
.research-details.columns > .column:first-child{
  padding-right: 1rem !important;
}

.research-details.columns > .column:nth-child(2){
  padding-left: 1rem !important;
}

/* Les boxes remplissent leur colonne */
.research-details.columns .detail-box{
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Mobile seulement */
@media (max-width: 800px){
  .research-details.columns{
    flex-direction: column !important;
  }

  .research-details.columns > .column:first-child,
  .research-details.columns > .column:nth-child(2){
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ===== Awards + Presentations: horizontal boxes ===== */

.ap-row{
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100% !important;
  gap: 2rem !important;
  margin: 1.8rem 0 2.4rem !important;
}

.ap-card{
  background: rgba(253,252,247,.78);
  border: 1.5px solid rgba(43,36,31,.16);
  border-radius: 24px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 10px 26px rgba(43,36,31,.08);
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.ap-awards{
  flex: 0 0 calc(34% - 1rem) !important;
}

.ap-presentations{
  flex: 0 0 calc(66% - 1rem) !important;
}

.ap-card h4,
.ap-card h3{
  color: var(--brand);
  margin-top: 0;
  margin-bottom: .9rem;
  font-weight: 850;
  letter-spacing: -.02em;
}

.ap-card ul{
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.ap-card li{
  margin-bottom: .75rem;
  line-height: 1.45;
}

.ap-card li:last-child{
  margin-bottom: 0;
}

.ap-card strong{
  color: var(--accent);
  font-weight: 800;
}

/* Mobile */
@media (max-width: 700px){
  .ap-row{
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .ap-awards,
  .ap-presentations{
    flex: 1 1 auto !important;
    width: 100% !important;
  }
}

/* ===== HARD FIX: Awards + Presentations horizontal ===== */

.ap-wrapper{
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) !important;
  gap: 2rem !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 1.8rem 0 2.4rem !important;
}

.ap-wrapper > .ap-box{
  min-width: 0 !important;
  width: auto !important;
}

.ap-box{
  background: rgba(253,252,247,.78);
  border: 1.5px solid rgba(43,36,31,.16);
  border-radius: 24px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 10px 26px rgba(43,36,31,.08);
  box-sizing: border-box !important;
}

.ap-box h4,
.ap-box h3{
  color: var(--brand);
  margin-top: 0;
  margin-bottom: .9rem;
  font-weight: 850;
  letter-spacing: -.02em;
}

.ap-box ul{
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.ap-box li{
  margin-bottom: .75rem;
  line-height: 1.45;
}

.ap-box li:last-child{
  margin-bottom: 0;
}

.ap-box strong{
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 700px){
  .ap-wrapper{
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* ===== FINAL OVERRIDE: Awards + Presentations horizontal ===== */

.research-card .ap-row{
  display: grid !important;
  grid-template-columns: 1fr 2fr !important;
  column-gap: 2rem !important;
  row-gap: 1rem !important;
  align-items: stretch !important;
  width: 100% !important;
  margin-top: 1.8rem !important;
  margin-bottom: .4rem !important;
}

.research-card .ap-card{
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  background: rgba(236,239,208,.65);
  border: 1px solid rgba(43,36,31,.14);
  border-radius: 22px;
  padding: 1rem 1.1rem;
  box-sizing: border-box !important;
}

.research-card .ap-awards{
  grid-column: 1 !important;
}

.research-card .ap-presentations{
  grid-column: 2 !important;
}

.research-card .ap-card h4{
  color: var(--brand);
  margin-top: 0;
  margin-bottom: .8rem;
  font-weight: 850;
  letter-spacing: -.02em;
}

.research-card .ap-card ul{
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.research-card .ap-card li{
  margin-bottom: .75rem;
  line-height: 1.45;
}

.research-card .ap-card li:last-child{
  margin-bottom: 0;
}

.research-card .ap-card strong{
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 750px){
  .research-card .ap-row{
    grid-template-columns: 1fr !important;
  }

  .research-card .ap-awards,
  .research-card .ap-presentations{
    grid-column: 1 !important;
  }
}

/* ===== Awards + Presentations: horizontal banner boxes ===== */

.ap-row{
  display: flex !important;
  flex-direction: column !important;
  gap: 1.2rem !important;
  width: 100% !important;
  margin: 1.8rem 0 2.2rem !important;
}

.ap-card{
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;

  background: rgba(236,239,208,.65);
  border: 1px solid rgba(43,36,31,.14);
  border-radius: 22px;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 26px rgba(43,36,31,.08);
}

/* Titre à gauche, contenu à droite */
.ap-card{
  display: grid !important;
  grid-template-columns: 160px 1fr !important;
  column-gap: 1.4rem !important;
  align-items: start !important;
}

.ap-card h4,
.ap-card h3{
  color: var(--brand);
  margin: 0 !important;
  font-weight: 850;
  letter-spacing: -.02em;
}

.ap-card ul{
  padding-left: 1.1rem;
  margin: 0 !important;
}

/* Awards sur une ligne si possible */
.ap-awards ul{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .6rem 2rem !important;
  padding-left: 0 !important;
  list-style-position: inside !important;
}

.ap-awards li{
  margin-bottom: 0 !important;
}

/* Presentations en deux colonnes pour éviter une grande box verticale */
.ap-presentations ul{
  columns: 2;
  column-gap: 2rem;
}

.ap-presentations li{
  break-inside: avoid;
  margin-bottom: .85rem;
}

.ap-card li{
  line-height: 1.45;
}

.ap-card strong{
  color: var(--accent);
  font-weight: 800;
}

/* Mobile */
@media (max-width: 750px){
  .ap-card{
    display: block !important;
  }

  .ap-card h4,
  .ap-card h3{
    margin-bottom: .8rem !important;
  }

  .ap-awards ul{
    display: block !important;
    padding-left: 1.1rem !important;
    list-style-position: outside !important;
  }

  .ap-presentations ul{
    columns: 1;
  }
}

/* ===== FINAL: Awards au-dessus, Presentations en dessous, format paysage ===== */

.research-card .ap-row,
.ap-row{
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 1.2rem !important;
  margin: 1.8rem 0 2.2rem !important;
}

.research-card .ap-card,
.ap-card{
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;

  background: rgba(236,239,208,.65);
  border: 1px solid rgba(43,36,31,.14);
  border-radius: 22px;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 26px rgba(43,36,31,.08);
}

/* Annule les anciennes positions gauche/droite */
.research-card .ap-awards,
.research-card .ap-presentations,
.ap-awards,
.ap-presentations{
  grid-column: auto !important;
  flex: none !important;
  width: 100% !important;
}

/* Titres */
.research-card .ap-card h4,
.research-card .ap-card h3,
.ap-card h4,
.ap-card h3{
  color: var(--brand);
  margin-top: 0 !important;
  margin-bottom: .8rem !important;
  font-weight: 850;
  letter-spacing: -.02em;
}

/* Listes */
.research-card .ap-card ul,
.ap-card ul{
  margin-bottom: 0 !important;
  padding-left: 1.1rem !important;
}

/* Awards sur une ligne horizontale */
.research-card .ap-awards ul,
.ap-awards ul{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .6rem 2rem !important;
  padding-left: 0 !important;
  list-style-position: inside !important;
}

.research-card .ap-awards li,
.ap-awards li{
  margin-bottom: 0 !important;
}

/* Presentations : une liste normale, large */
.research-card .ap-presentations ul,
.ap-presentations ul{
  columns: 1 !important;
}

.research-card .ap-card li,
.ap-card li{
  margin-bottom: .75rem;
  line-height: 1.45;
}

.research-card .ap-card li:last-child,
.ap-card li:last-child{
  margin-bottom: 0;
}

.research-card .ap-card strong,
.ap-card strong{
  color: var(--accent);
  font-weight: 800;
}