/*
Original design: Inland (v1.2 - Sep 12, 2012) - A free xhtml/css website template by Andreas Viklund.
For more information, see http://andreasviklund.com/templates/inland/
Includes:
jQuery v1.7.1 from http://jquery.org/
Nivo Slider v2.7.1 by Gilbert Pellegrom - http://nivo.dev7studios.com/
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');


:root {
  --bg:         #08111d;
  --bg2:        #0c1726;
  --bg3:        #102033;
  --surface:    #14263b;
  --surface2:   #1a324a;
  --border:     rgba(93,164,255,0.18);
  --border2:    rgba(93,164,255,0.08);
  --green:      #2f6bff;
  --green-mid:  #4a87ff;
  --green-light:#8fb7ff;
  --green-glow: rgba(74,135,255,0.16);
  --green-faint:rgba(74,135,255,0.06);
  --text:       #d4e0f2;
  --text-dim:   #8ba3c7;
  --text-faint: #4f678b;
  --white:      #f4f8ff;
  --mono: 'Space Mono', monospace;
  --display: 'Syne', sans-serif;
  --serif: 'DM Serif Display', serif;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(54, 9, 216, 0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(43, 33, 177, 0.25), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(50, 36, 175, 0.15), transparent 60%);
  filter: blur(40px);
  animation: bgShift 20s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes bgShift {
  0%   { opacity: 1; transform: scale(1) translate(0,0); }
  33%  { opacity: 0.85; transform: scale(1.05) translate(1%,1.5%); }
  66%  { opacity: 1; transform: scale(0.97) translate(-1%,0.5%); }
  100% { opacity: 0.9; transform: scale(1.03) translate(0.5%,-1%); }
}


a { color: var(--green-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }
a img { border: none; }

h1,h2,h3,h4 { font-family: var(--display); font-weight: 700; color: var(--white); line-height: 1.2; }
h1 { font-size: 2.4em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.15em; font-weight: 600; }

p, ul { margin-bottom: 12px; }
i, em { font-style: italic; }
b, strong { font-weight: 700; color: var(--white); }
u { text-decoration: none; border-bottom: 1px solid var(--green-mid); padding-bottom: 1px; }

#wrapper960 {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 0 40px;
}

/* Wrapper étroit pour les cards Home (index) */
.narrow-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

#toplinks {
  background: rgba(11,15,12,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

#toplinks ul { list-style: none; text-align: right; margin: 0; }
#toplinks ul li { display: inline-block; margin: 10px 0 8px 18px; }
#toplinks ul li a {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}
#toplinks ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 100%;
  height: 1px;
  background: var(--green-light);
  transition: right var(--transition);
}
#toplinks ul li a:hover { color: var(--green-light); }
#toplinks ul li a:hover::after { right: 0; }

#header {
  position: relative;
  padding: 36px 30px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

#sitetitle { flex: 1; min-width: 260px; }
#sitetitle h1 {
  font-family: var(--serif);
  font-size: 2.8em;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0 0 4px;
}
#sitetitle h1 a { color: inherit; }
#sitetitle h1 a:hover { color: var(--green-light); }
#sitetitle h3 {
  font-family: var(--mono);
  font-size: 0.75em;
  font-weight: 400;
  color: var(--green-mid);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#nav { padding-bottom: 6px; }
#nav ul { list-style: none; display: flex; gap: 4px; }
#nav ul li a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: block;
}
#nav ul li a:hover {
  color: var(--white);
  border-color: var(--border);
  background: var(--green-faint);
}

/* Ancres de nav internes */
.nav-anchor {
  display: block;
  height: 80px;
  margin-top: -80px;
  visibility: hidden;
}

/* Bannière */
.slider-wrapper {
  max-width: 950px;
  width: 100%;
  margin: 15px auto 0;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.banner-img {
  position: relative;
  height: 260px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-img img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: grayscale(30%) saturate(0.8);
}
.banner-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, var(--bg) 100%),
    linear-gradient(90deg, var(--bg) 0%, transparent 8%, transparent 92%, var(--bg) 100%);
  z-index: 7;
  pointer-events: none;
}

/* Séparateurs de section */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 30px 0;
}
.section-divider span {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-mid);
  white-space: nowrap;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--green-mid), transparent);
  opacity: 0.6;
}

/* Cards */
#content {
  margin: 16px 30px 0;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* Cards étroites (section Home) */
.narrow-wrapper #content {
  margin: 16px auto 0;
  max-width: 1140px;
}

#content::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--green-mid), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
#content:hover { border-color: rgba(74,140,74,0.35); box-shadow: 0 0 32px rgba(45,125,58,0.08); }
#content:hover::before { opacity: 1; }

#content h2 {
  font-family: var(--display);
  font-size: 1.05em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 10px;
}
#content h2::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-mid);
  box-shadow: 0 0 8px var(--green-mid);
  flex-shrink: 0;
}

#content h3 {
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin: 16px 0 8px;
}

.greentxt { color: var(--green-light); font-weight: 600; }
.bluetxt { color: #7ab4d4; }

/* Listes de publications */
#content ul.papers li {
  list-style: none;
  padding: 7px 0 7px 16px;
  border-bottom: 1px solid var(--border2);
  font-size: 12.5px;
  color: var(--text);
  position: relative;
  line-height: 1.1;
}
#content li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-size: 14px;
}
#content li:last-child { border-bottom: none; }
#content li b { color: var(--white); }

/* Pills de liens */
#content li a {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--green-light);
  margin: 0 2px;
  transition: all var(--transition);
}
#content li a:hover {
  background: var(--green-faint);
  border-color: var(--green-mid);
  color: var(--white);
}

/* Liens inline dans les paragraphes */
#content p a, #content > a {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--green-mid);
  color: var(--green-light);
}
#content p a:hover, #content > a:hover {
  background: none;
  border-bottom-color: var(--white);
  color: var(--white);
}

/* Paragraphes intro */
#content > b {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
}

/* Sidebar / main */
#sidebar { float: left; width: 34%; }
#main    { float: right; width: 63%; }
.inner { margin: 8px 20px; }
.left .inner { margin-left: 0; }
.right .inner { margin-right: 0; }
.left  { float: left; }
.right { float: right; }

#sidebar img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  filter: grayscale(20%) contrast(1.05);
  border: 1px solid var(--border);
  display: block;
}

#main h2 {
  font-size: 1.05em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
#main p {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text);
  margin: 0;
}
#main p span.greentxt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-block;
  min-width: 170px;
  color: var(--text-dim);
}

/* Spoilers */
div.spoiler {
  padding: 12px 10px 10px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  margin-top: 6px;
  position: relative;
  background: var(--bg3);
}
div.spoiler input.boutonSpoiler {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--green-light);
  padding: 3px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  display: block;
  margin-bottom: 8px;
}
div.spoiler input.boutonSpoiler:hover { background: var(--green-faint); color: var(--white); }
div.spoiler div.contenuSpoiler { display: none; }
div.spoiler div.contenuSpoiler p { font-size: 12.5px; color: var(--text); margin: 0; line-height: 1.65; }

/* Listes enseignement */
#content ul[style] { list-style: none !important; padding: 0; }
#content ul[style] li { border-bottom: 1px solid var(--border2); }
#content ul[style] li h3 { border: none; margin: 14px 0 4px; font-size: 0.82em; }
#content ul[style] li::before { content: ''; }
#content ul[style] > li:first-child { border-bottom: none; }

/* Footer */
#footer {
  margin: 32px 30px 0;
  padding: 20px 30px;
  border-top: 1px solid var(--border2);
  text-align: center;
}
#footer p { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--text-faint); margin: 0; }
#footer a { color: var(--text-faint); }
#footer a:hover { color: var(--text-dim); }

.clearfix::after { content: ''; display: table; clear: both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
#content { animation: fadeUp 0.45s ease both; }
#content:nth-child(2)  { animation-delay: 0.05s; }
#content:nth-child(3)  { animation-delay: 0.10s; }
#content:nth-child(4)  { animation-delay: 0.15s; }
#content:nth-child(5)  { animation-delay: 0.20s; }
#content:nth-child(6)  { animation-delay: 0.25s; }
#content:nth-child(7)  { animation-delay: 0.30s; }
#content:nth-child(8)  { animation-delay: 0.35s; }

#content::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(61,180,75,0.04), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}
#content:hover::after { left: 150%; }

@media (max-width: 720px) {
  #content ul.papers li {line-height: 1.6;}
  #wrapper960 { padding: 0; }
  #header { padding: 20px 16px 0; }
  #content { line-height: 2; margin: 14px 12px 0; padding: 8px 0 8px 16px; }
  #content li {line-height: 1.45; padding: 10px 0 10px 16px;}
  .narrow-wrapper #content { margin: 14px 12px 0; }
  #footer { margin: 20px 12px 0; padding: 16px; }
  #sitetitle h1 { font-size: 1.9em; }
  #nav ul { flex-wrap: wrap; gap: 6px; }
  #sidebar, #main { float: none; width: 100%; }
  .section-divider { margin: 28px 12px 0; }
}
