/* ===== Variables ===== */
:root {
  --bordeaux: #7a0c1e;
  --bordeaux-dark: #58060f;
  --bordeaux-light: #a8283a;
  --ink: #2a2723;
  --paper: #faf7f2;
  --paper-alt: #f0ebe2;
  --line: #e2dbcf;
  --muted: #6b6459;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(40, 20, 10, 0.08);
  --max-width: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bordeaux);
}

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

.muted { color: var(--muted); }

/* ===== Header / Nav ===== */
.site-header {
  background: var(--bordeaux);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 8px 0;
}

.nav-logo {
  height: 44px;
  width: auto;
  background: #fff;
  padding: 5px 10px;
  border-radius: 6px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  background: rgba(255,255,255,0.14);
}

.nav-item-dropdown { position: relative; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: var(--ink);
  min-width: 240px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px;
  list-style: none;
  margin: 6px 0 0;
}

.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
}

.nav-dropdown a:hover { background: var(--paper-alt); }

/* ===== Hero ===== */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(160deg, var(--bordeaux-dark), var(--bordeaux));
  background: linear-gradient(160deg, rgba(88, 6, 15, 0.92), rgba(122, 12, 30, 0.86)), url(../img/prof-ech-chhibat.jpg) center / cover no-repeat;
  padding: 72px 0 56px;
  
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 48px;
  /* background-image: url(assets/img/prof-ech-chhibat.jpg); */
}

.hero-inner { max-width: 720px; flex: 1; }

.hero-photo {
  flex: none;
  width: 220px;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.3);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.hero h1 { margin: 10px 0 6px; }

.hero .role {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin: 0 0 22px;
}

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-disciplines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hero-disciplines li a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.hero-disciplines li:last-child a { border-bottom: none; }

.hero-disciplines li a::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  flex: none;
}

.hero-disciplines li a:hover { text-decoration: underline; }

/* ===== Sections ===== */
section { padding: 56px 0; }

.section-alt { background: var(--paper-alt); }

.section-head { max-width: 680px; margin: 0 0 32px; }

/* ===== About snippet / avatar ===== */
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  align-items: center;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  background: var(--paper-alt);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(40,20,10,0.12); }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bordeaux);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.card .card-link { margin-top: auto; font-weight: 600; color: var(--bordeaux); font-size: 0.9rem; }

/* ===== Discipline pages ===== */
.page-hero {
  background: var(--bordeaux-dark);
  color: #fff;
  padding: 46px 0;
}

.page-hero .eyebrow { color: rgba(255,255,255,0.75); }
.page-hero h1 { margin: 6px 0 12px; }
.page-hero p { max-width: 720px; color: rgba(255,255,255,0.9); margin: 0; }

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin: 0 0 10px;
}

.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.doc-group { margin-bottom: 36px; }

.doc-group h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.doc-group .doc-count {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--paper-alt);
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 999px;
}

.doc-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.doc-item .doc-info { min-width: 0; }
.doc-item h4 { margin: 0 0 4px; font-size: 1rem; }
.doc-item .doc-meta { font-size: 0.82rem; color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--bordeaux);
  color: #fff;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}

.btn:hover { background: var(--bordeaux-dark); }

.empty-note {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  background: #fff;
}

/* ===== Recherche ===== */
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pub-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.pub-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.pub-item p { margin: 0; font-size: 0.94rem; }
.pub-item a { color: var(--bordeaux); font-weight: 600; text-decoration: none; }
.pub-item a:hover { text-decoration: underline; }

/* ===== Contact / footer ===== */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list li { display: flex; gap: 10px; }
.contact-list strong { min-width: 90px; color: var(--muted); font-weight: 600; }

.site-footer {
  background: var(--bordeaux-dark);
  color: rgba(255,255,255,0.85);
  padding: 28px 0;
  font-size: 0.85rem;
}

.site-footer a { color: #fff; }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

/* ===== Responsive ===== */
@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }

  .nav-logo { height: 36px; }

  .nav-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bordeaux-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 0;
    display: none;
  }

  .nav-menu.is-open { display: flex; }

  .nav-item-dropdown .nav-dropdown {
    display: none;
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,0.15);
    color: #fff;
    margin-top: 4px;
  }

  .nav-item-dropdown.is-open .nav-dropdown { display: block; }

  .nav-item-dropdown.is-open .nav-dropdown a { color: #fff; }
  .nav-item-dropdown.is-open .nav-dropdown a:hover { background: rgba(255,255,255,0.14); }

  .about-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }

  .hero .container { flex-direction: column-reverse; text-align: center; }
  .hero-photo { width: 170px; height: 200px; }

  .doc-item { flex-direction: column; align-items: flex-start; }
  .doc-item .btn { align-self: flex-start; }
}
