/* styleEH.css — modernized
 * Originally a Plone-derived sheet (Alexander Limi, 2002), adapted by EH.
 * Rewritten with custom properties, fluid type, flexbox/grid layout,
 * responsive media queries, accessible focus states and dark mode.
 */

/* --------------------------------------------------------------- */
/* Design tokens                                                   */
/* --------------------------------------------------------------- */
:root {
  /* Palette — modern indigo accent on warm-neutral surfaces (AA contrast) */
  --color-text: #1a1a1a;
  --color-heading: #1e293b;
  --color-accent: #4f46e5;
  --color-accent-soft: #c7d2fe;
  --color-surface: #ffffff;
  --color-surface-2: #f8fafc;
  --color-surface-3: #f1f5f9;
  --color-hover-bg: #eef2ff;
  --color-border: #cbd5e1;
  --color-link: #4f46e5;
  --color-link-hover: #4338ca;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Verdana,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --line-height: 1.7;

  /* Fluid type scale */
  --fs-h1: clamp(1.75rem, 1rem + 3vw, 2.5rem);
  --fs-h2: clamp(1.4rem, 1rem + 1.5vw, 1.75rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.8vw, 1.35rem);
  --fs-h4: clamp(1rem, 1rem + 0.4vw, 1.125rem);

  /* Spacing & sizing */
  --space: 1rem;
  --content-max: 80rem;
  --radius: 0.375rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e6e6e6;
    --color-heading: #c7d2fe;
    --color-accent: #a5b4fc;
    --color-accent-soft: #3730a3;
    --color-surface: #1e1e24;
    --color-surface-2: #2a2a32;
    --color-surface-3: #34343d;
    --color-hover-bg: #2c2c3a;
    --color-border: #3f3f46;
    --color-link: #a5b4fc;
    --color-link-hover: #c7d2fe;
  }
}

/* --------------------------------------------------------------- */
/* Reset / base                                                    */
/* --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-surface);
}

img {
  max-width: 100%;
  height: auto;
  border: none;
  vertical-align: middle;
}

p {
  margin: 0 0 1rem 0;
  text-align: justify;
}

address {
  font-style: normal;
}

hr {
  clear: both;
  height: 1px;
  border: none;
  background-color: var(--color-accent-soft);
}

/* --------------------------------------------------------------- */
/* Headings                                                        */
/* --------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: var(--fw-semibold);
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.9rem;
}

/* --------------------------------------------------------------- */
/* Links                                                           */
/* --------------------------------------------------------------- */
a {
  color: var(--color-link);
  text-decoration: none;
  background-color: transparent;
}

a:hover {
  text-decoration: underline;
  color: var(--color-link-hover);
  background-color: var(--color-hover-bg);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Inline icons */
.icon-arrow {
  vertical-align: middle;
  color: var(--color-accent);
}

/* Call-to-action links (downloads, key links) */
a.cta {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background-color: var(--color-accent);
  color: #ffffff;
  border-radius: var(--radius);
  font-weight: var(--fw-medium);
  text-decoration: none;
  border: 1px solid var(--color-accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}

a.cta:hover {
  background-color: var(--color-link-hover);
  color: #ffffff;
  text-decoration: none;
}

a.cta:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- */
/* Lists                                                            */
/* --------------------------------------------------------------- */
ul,
ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
  line-height: var(--line-height);
}

li {
  text-align: justify;
  margin-bottom: 0.4rem;
}

ul.telech {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

ul.telech li {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
  padding: 0 0.4rem;
}

/* --------------------------------------------------------------- */
/* Layout                                                           */
/* --------------------------------------------------------------- */
.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.5rem var(--space);
}

.content {
  flex: 1 1 32rem;
  min-width: 0;
}

.content section {
  margin-bottom: 1.5rem;
}

@media (max-width: 48rem) {
  .layout {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------- */
/* Header                                                          */
/* --------------------------------------------------------------- */
.site-header {
  background-color: var(--color-surface-3);
  border-bottom: 1px solid var(--color-accent-soft);
  padding: var(--space);
}

.pagetitle {
  max-width: var(--content-max);
  margin: 0 auto;
  color: var(--color-heading);
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  text-align: center;
}

/* --------------------------------------------------------------- */
/* Navigation (table of contents)                                  */
/* --------------------------------------------------------------- */
.toc {
  flex: 0 0 16rem;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  align-self: flex-start;
  position: sticky;
  top: var(--space);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.toc-group {
  margin: 0.6rem 0 0.15rem 0;
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  color: var(--color-heading);
}

.toc a {
  display: block;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--color-link);
}

.toc a:hover {
  background: var(--color-hover-bg);
  text-decoration: underline;
}

.toc .selected {
  background-color: var(--color-hover-bg);
  border-left: 3px solid var(--color-accent);
  font-weight: var(--fw-bold);
  color: var(--color-accent);
  padding-left: 0.3rem;
}

/* Menu local (sommaire en haut de page, ex. cours.html) */
.page-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin: 0 0 var(--space) 0;
  padding: 0.5rem 0.9rem;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.page-menu a {
  color: var(--color-link);
  text-decoration: none;
}

.page-menu a:hover {
  text-decoration: underline;
  background: var(--color-hover-bg);
  border-radius: 0.25rem;
  padding: 0.1rem 0.3rem;
}

/* --------------------------------------------------------------- */
/* Section titles                                                  */
/* --------------------------------------------------------------- */
.title {
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius);
  color: var(--color-heading);
  text-align: center;
  padding: 0.6rem 1.25rem;
  margin: 2.5rem 0 1.5rem 0;
  scroll-margin-top: 2rem;
}

.title h2 {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  font-style: italic;
}

.subsubtitle {
  background-color: var(--color-surface-2);
  border-left: 3px solid var(--color-accent);
  color: var(--color-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  font-style: italic;
  padding: 0.3rem 0.75rem;
  margin: 2rem 0 0.75rem 0;
  scroll-margin-top: 2rem;
}

/* --------------------------------------------------------------- */
/* Hero                                                            */
/* --------------------------------------------------------------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  margin-bottom: 1.5rem;
}

.hero-text {
  flex: 1 1 16rem;
}

.hero-photo {
  flex: 0 0 auto;
  max-width: 20rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cv-photo {
  max-width: 27rem;
}

.moi {
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
}

/* --------------------------------------------------------------- */
/* Contact cards                                                   */
/* --------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space);
  margin-bottom: 1rem;
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.card-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .adress {
  margin-bottom: 0.75rem;
}

.adress {
  text-align: left;
  font-size: 1rem;
}

/* --------------------------------------------------------------- */
/* Footer                                                          */
/* --------------------------------------------------------------- */
.site-footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.5rem var(--space) 2rem;
  border-top: 1px solid var(--color-accent-soft);
}

.logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: var(--space);
  padding: 0;
  margin: 0 0 1rem 0;
}

.logos li {
  text-align: center;
}

.logos img {
  max-height: 6rem;
  width: auto;
}

.findoc {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-align: center;
  margin: 0;
}

/* --------------------------------------------------------------- */
/* Data tables (CV, publications)                                  */
/* --------------------------------------------------------------- */
.cv-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
}

.cv-table th,
.cv-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-accent-soft);
}

.cv-table thead th {
  color: var(--color-heading);
  background-color: var(--color-surface-2);
  font-size: 1rem;
  white-space: nowrap;
}

.cv-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

@media (max-width: 36rem) {
  .cv-table td:first-child {
    white-space: normal;
  }
}

/* Personnel definition list (cv.html) */
dl.personnel {
  margin: 0;
}

dl.personnel dt {
  margin-top: 0.75rem;
}

dl.personnel dd {
  margin: 0 0 0.4rem 0;
}

dl.personnel address {
  font-style: normal;
}

/* --------------------------------------------------------------- */
/* Misc elements                                                   */
/* --------------------------------------------------------------- */
blockquote {
  margin: 0 0 1rem 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-accent-soft);
  font-style: italic;
  text-align: justify;
}

pre {
  padding: 1rem;
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius);
  background-color: var(--color-surface-3);
  color: var(--color-text);
  font-family: var(--font-mono);
  overflow-x: auto;
}

sub {
  font-size: 0.75em;
  font-style: italic;
}

/* Détail secondaire dans un item de liste (ex. cv.html) */
.li-sub {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Libellé souligné au-dessus d'une liste (ex. cv.html) */
.list-label {
  text-decoration: underline;
  font-weight: var(--fw-semibold);
  margin: 0.6rem 0 0.2rem 0;
}

textarea {
  width: 88%;
  padding: 0.3rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius);
  font-family: var(--font-sans);
}

input {
  padding: 0.3rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius);
  font: inherit;
}

/* --------------------------------------------------------------- */
/* Course list (kept for other pages using these classes)          */
/* --------------------------------------------------------------- */
.listecours table {
  border: 1px solid var(--color-accent-soft);
  border-collapse: collapse;
  padding: 0.3rem;
  width: 100%;
  max-width: 60rem;
}

.listecours td {
  font-size: 0.95rem;
  text-align: left;
  padding: 0.2rem 0.4rem;
  vertical-align: top;
}

.listecours td.rubrique {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  padding: 0.2rem 0.4rem;
  color: var(--color-accent-soft);
  text-decoration: underline;
}

.listecours th {
  font-size: 1rem;
  text-align: left;
  color: var(--color-heading);
  border: 1px solid var(--color-accent-soft);
  background-color: transparent;
  line-height: 1.2em;
  white-space: nowrap;
  padding: 0.2rem 0.4rem;
  font-family: var(--font-sans);
}

.currentNavItem {
  color: var(--color-text);
  font-weight: bold;
}

.subitem {
  margin: 0.4rem 0 0 0;
  padding-top: 0.6rem;
  color: var(--color-heading);
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2em;
}

/* --------------------------------------------------------------- */
/* publication list                                               */
/* --------------------------------------------------------------- */

/* Texte des publications */
#pubs li {
  font-size: 0.94rem;
}


/* Les liens (titre, DOI, PDF) héritent de la taille du li */
#pubs li a {
  color: var(--color-link);
  text-decoration: none;
}



/* --------------------------------------------------------------- */
/* Marmote subsite (Marmote/home.php)                              */
/* --------------------------------------------------------------- */
.pagetitle-logo {
  display: block;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  height: auto;
}

.notice {
  border-left: 4px solid #c00;
  background-color: var(--color-hover-bg);
}

.content-main {
  flex: 1 1 24rem;
}

.marmote-fig {
  margin: 0;
  text-align: center;
}

.marmote-fig img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marmote-fig img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.marmote-fig figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-accent);
}

