/*
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=Figtree:wght@400;500;600&family=Lora:wght@500;700&display=swap');


/* ════════════════════════════════════════════════════════════════════
  VARIABLES
════════════════════════════════════════════════════════════════════ */

:root {

  --bg-deep:   #0A5C6E;
  --bg:        #137C8B;
  --bg-mid:    #1D9AAB;
  --bg2:       #709CA7;
  --bg3:       #B8CBD0;
  --bg-deep-transparent: rgba(10, 92, 110, 0.65);

  --surface:   #B8CBD0;
  --surface2:  #DCE9EC;

  --border:    #C8D8DC;
  --border2:   #709CA7;

  --accent:        #E9C46A;
  --accent-dim:    #C9A040;
  --accent-faint:  rgba(233,196,106,0.10);

  --teal:          #1D9AAB;
  --teal-mid:      #137C8B;
  --teal-glow:     rgba(29,154,171,0.18);
  --teal-faint:    rgba(29,154,171,0.08);

  --text:       #2F3E46;
  --text-dim:   #146a75;
  --text-faint: #DCE9EC;
 
  --title:  #F2E6C9;
  --title-hover: #5f967f;
  --white:  #0A3C49;
  --puces: #B8CBD0;

  --opacity: 0.85;
 
  --mono:    'Space Mono', monospace;
  --display: 'Figtree', sans-serif;
  --serif:   'Lora', serif;
 
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
  --radius: 2px;
}

[data-theme="dark"] {
  --bg-deep:   #0E0C14;
  --bg:        #151220;
  --bg-mid:    #9AAAE0;
  --bg2:       #221D33;
  --bg3:       #2A2440;
  --bg-deep-transparent: rgba(14, 12, 20, 0.65);

  --surface:   #26213A;
  --surface2:  #2F2846;

  --border:    #3A3454;
  --border2:   #544C7A;

  --accent:        #F0C674;
  --accent-dim:    #C8A356;
  --accent-faint:  rgba(240,198,116,0.10);

  --teal:          #8B9FE8;
  --teal-mid:      #7A8FD8;
  --teal-glow:     rgba(90,106,154,0.18);
  --teal-faint:    rgba(90,106,154,0.08);

  --text:       #B7B6D9;
  --text-dim:   #9AAAE0;
  --text-faint: #B7B6D9;

  --title:       #F2E6C9;
  --title-hover: #C1A8F0;
  --white:       #ECEBFF;
  --puces:       #B7B6D9;

  --opacity: 0.75;
}


/* ════════════════════════════════════════════════════════════════════
  RESET
════════════════════════════════════════════════════════════════════ */

*, *::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: 18px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  text-align: justify;
}
 
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%);  }
}
 
/* ── Liens ──────────────────────────────────────────────── */
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }
a img { border: none; }
 
/* ── Titres ─────────────────────────────────────────────── */
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(--teal); padding-bottom: 1px; }


/* ════════════════════════════════════════════════════════════════════
  THEME TOGGLE BUTTON
════════════════════════════════════════════════════════════════════ */

.theme-toggle-container {
  display: inline-flex;
  align-items: center;
}

.theme-toggle {
  background: none;
  border: none;
  border-radius: 50%;
  padding: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun {
  opacity: 0;
  transform: scale(0.5);
}

.moon {
  opacity: 1;
  transform: scale(1);
}


[data-theme="dark"] .sun {
  opacity: 1;
  transform: scale(1);
}

[data-theme="dark"] .moon {
  opacity: 0;
  transform: scale(0.5);
}


/* ════════════════════════════════════════════════════════════════════
  LAYOUT WRAPPERS
════════════════════════════════════════════════════════════════════ */

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


/* ════════════════════════════════════════════════════════════════════
  TOP LINKS
════════════════════════════════════════════════════════════════════ */

#toplinks {
  background: var(--bg-deep-transparent);
  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(--puces);
  font-family: var(--mono);
  font-size: 12px;
  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(--accent);
  transition: right var(--transition);
}
#toplinks ul li a:hover { color: var(--accent); }
#toplinks ul li a:hover::after { right: 0; }


/* ════════════════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════════════ */

#header {
  position: relative;
  padding: 0;
  display: block;
  overflow: hidden;
}

#header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  z-index: 12;
  display: block;
}

#header-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(30%) saturate(0.8);
}

#header-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,60,73,0.1) 0%, rgba(10,60,73,0.50) 100%),
    linear-gradient(90deg, rgba(10,60,73,0.1) 0%, transparent 40%, transparent 60%, rgba(10,60,73,0.1) 100%);
}

#header-inner {
  position: relative;
  z-index: 1;
  min-height: 260px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 30px 28px;
  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(--title);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0 0 4px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.9);
}
#sitetitle h1 a { color: inherit; }
#sitetitle h1 a:hover { color: var(--title-hover); }
#sitetitle h3 {
  font-family: var(--mono);
  font-size: 0.75em;
  font-weight: 505;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9), 0 1px 3px rgba(0,0,0,0.9);
}

@media (max-width: 720px) {
  #header-inner {
    min-height: 180px;
    padding: 20px 16px 20px;
  }
  #sitetitle h1 { font-size: 1.9em; }
}

/* ════════════════════════════════════════════════════════════════════
  NAV
════════════════════════════════════════════════════════════════════ */

/* ── Nav ────────────────────────────────────────────────── */
#nav { padding-bottom: 0px; }
#nav ul { list-style: none; display: flex; gap: 4px; margin-bottom: 0px;}
#nav ul li a {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: block;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}
#nav ul li a:hover {
  color: var(--title);
  border-color: var(--border);
  background: var(--teal-faint);
}
 
/* ── Ancres ─────────────────────────────────────────────── */
.nav-anchor {
  display: block;
  height: 80px;
  margin-top: -80px;
  visibility: hidden;
}


/* ════════════════════════════════════════════════════════════════════
  SECTION DIVIDERS
════════════════════════════════════════════════════════════════════ */

.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(--accent);
  white-space: nowrap;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}


/* ════════════════════════════════════════════════════════════════════
  CARDS #content
════════════════════════════════════════════════════════════════════ */

#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);
}
 
.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(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
#content:hover {
  border-color: rgba(233,196,106,0.30);
  box-shadow: 0 0 32px rgba(255, 183, 0, 0.06);
}
#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(--bg-mid);
  box-shadow: 0 0 8px var(--text-dim);
  flex-shrink: 0;
}
 
#content h3 {
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg-mid);
  margin: 16px 0 8px;
}

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

/* ── Classes utilitaires ────────────────────────────────── */
.greentxt { color: var(--teal); font-weight: 600; }
.bluetxt  { color: var(--teal-mid); }


/* ════════════════════════════════════════════════════════════════════
   LISTES PUBLICATIONS
════════════════════════════════════════════════════════════════════ */

#content ul.papers li {
  list-style: none;
  padding: 7px 0 7px 16px;
  border-bottom: 1px solid var(--border2);
  font-size: 16px;
  color: var(--text);
  position: relative;
  line-height: 1.1;
  text-align: justify;
}
 
#content li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--teal-mid);
  font-size: 17px;
}
#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: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  color: var(--teal-mid);
  margin: 0 2px;
  transition: all var(--transition);
}

#content ul.papers li b {
  text-align: justify;
}

#content li a:hover {
  background: var(--teal-faint);
  border-color: var(--accent);
  color: var(--white);
}
 
/* ── Liens inline dans 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(--text-dim);
  color: var(--teal);
}
#content p a:hover, #content > a:hover {
  background: none;
  border-bottom-color: var(--accent);
  color: var(--white);
}

/* ── Listes ────────────────────────────────────────────── */
#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; }


/* ════════════════════════════════════════════════════════════════════
  ENSEIGNEMENTS
════════════════════════════════════════════════════════════════════ */

#content .courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

#content .course-card {
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 14px 16px;
  background: transparent;
}

#content .course-card h3 {
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--bg-mid);
  margin: 0 0 8px;
}

#content .course-card .course-level {
  font-size: 13.5px;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.4;
}

#content .course-card .course-years {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}


/* ════════════════════════════════════════════════════════════════════
  BLOC CONTACT
════════════════════════════════════════════════════════════════════ */

#content .contact-header {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 16px;
  padding-bottom: 0;
}

#content .contact-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 310px;
  flex-shrink: 0;
  padding-top: 8px;
}

#content .contact-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 0.5px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

#content .contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%) contrast(1.05);
  opacity: var(--opacity);
  display: block;
}

#content .identity-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  margin: 0;
  line-height: 1.3;
}

#content .identity-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

#content .id-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface2);
  border: 0.5px solid var(--border2);
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--text-dim);
}

#content .identity-role {
  font-size: 17.5px;
  text-align: center;
  margin: 0;
  word-break: break-word;
}

#content .contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--border2);
  padding-top: 16px;
  justify-content: center;
  align-items: center;
}

#content .contact-info-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
}

#content .contact-info .field-full {
  display: grid;
  grid-template-columns: 90px 1fr;
  column-gap: 8px;
  margin-bottom: 0;
}

#content .field-full {
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 8px;
  margin-bottom: 6px;
}

#content .field-full .greentxt {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

#content .field-full .field-val {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}


/* ════════════════════════════════════════════════════════════════════
  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: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--teal);
  padding: 3px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  display: block;
  margin-bottom: 8px;
}
div.spoiler input.boutonSpoiler:hover { background: var(--teal-faint); color: var(--white); border: 1px solid var(--accent);}
div.spoiler div.contenuSpoiler { display: none; }
div.spoiler div.contenuSpoiler p { font-size: 12.5px; color: var(--text); margin: 0; line-height: 1.65; }
 

/* ════════════════════════════════════════════════════════════════════
  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: 12px; letter-spacing: 0.06em; color: var(--text-faint); margin: 0; }
#footer a { color: var(--text-faint); }
#footer a:hover { color: var(--accent); }

.copyright {
  font-size: 1.75em;
  vertical-align: -0.4em;
}
 
/* ── Utilitaires ────────────────────────────────────────── */
.clearfix::after { content: ''; display: table; clear: both; }
 
/* ── Animations ─────────────────────────────────────────── */
@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(233,196,106,0.04), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}
#content:hover::after { left: 150%; }


/* ════════════════════════════════════════════════════════════════════
  RESPONSIVE
════════════════════════════════════════════════════════════════════ */

@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 16px 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; }
  .section-divider { margin: 28px 12px 0; }
  #content .contact-columns { flex-direction: column; gap: 0; }
  #content .contact-header { flex-direction: column; align-items: center; }
  #content .contact-info {
    border-left: none;
    padding-left: 0;
    width: 100%;
    border-top: 1px solid var(--border2);
    padding-top: 14px;
    margin-top: 4px;
  }
  #content .courses-grid { grid-template-columns: 1fr; }
}
