/* =========================================================
   Plateforme personnelle — M. Ould-Elhassen Aoueileyine
   Palette : encre / bleu marine / rouge carmin / papier
   ========================================================= */
:root {
  --ink: #0d1b2e;
  --navy: #12305a;
  --navy-2: #1d4680;
  --accent: #c0262d;
  --accent-2: #a11f26;
  --accent-soft: #fbe9ea;
  --gold: #b8914a;
  --paper: #f7f5f0;
  --paper-2: #efebe2;
  --card: #ffffff;
  --line: #e4ded1;
  --text: #1b2738;
  --muted: #5d6878;
  --ok: #1f7a4d;
  --ok-soft: #e3f3ea;
  --warn: #9a6a00;
  --warn-soft: #fdf3dc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(13, 27, 46, .05), 0 8px 24px -12px rgba(13, 27, 46, .18);
  --shadow-lg: 0 24px 60px -24px rgba(13, 27, 46, .35);
  --f-head: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}
[dir="rtl"] {
  --f-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Noto Kufi Arabic", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-size: 16.5px; line-height: 1.85; }
img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.45; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 10px; top: 10px; z-index: 99; background: #fff; padding: 6px 10px; }
.ico { flex: none; vertical-align: -0.2em; }
[dir="rtl"] .ico-arrow { transform: scaleX(-1); }
.back .ico-arrow { transform: scaleX(-1); }
[dir="rtl"] .back .ico-arrow { transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .78em 1.35em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1 var(--f-body); cursor: pointer; transition: .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--ink); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-danger { background: #fff; color: var(--accent-2); border-color: #efc4c6; }
.btn-danger:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: .58em 1em; font-size: .87rem; }
.btn-xs { padding: .4em .7em; font-size: .78rem; }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, .88); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(228, 222, 209, .8);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 74px; }
@media (min-width: 1321px) and (max-width: 1440px) { .brand-text small { display: none; } .brand-text strong { font-size: .95rem; } }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--ink); color: #fff; font: 700 .82rem/1 var(--f-body); letter-spacing: .08em;
  position: relative; overflow: hidden;
}
.brand-mark::after { content: ""; position: absolute; inset-inline-end: 0; bottom: 0; width: 14px; height: 14px; background: var(--accent); border-start-start-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--f-head); font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: .74rem; letter-spacing: .02em; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.main-nav > a { padding: 8px 9px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: .9rem; position: relative; white-space: nowrap; }
.main-nav > a:hover { color: var(--ink); background: rgba(13, 27, 46, .05); }
.main-nav > a.active { color: var(--ink); }
.main-nav > a.active::after { content: ""; position: absolute; inset-inline: 9px; bottom: 2px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: 10px; }
.lang-switch { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.lang-switch a.on { background: var(--ink); color: #fff; }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.user-pop {
  position: absolute; inset-inline-end: 0; top: 48px; min-width: 240px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
}
.user-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin: 0 0 6px; display: flex; flex-direction: column; }
.user-pop .who small { color: var(--muted); font-size: .8rem; }
.user-pop a, .user-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .92rem; cursor: pointer; text-align: start; }
.user-pop a:hover, .user-pop button:hover { background: var(--paper); color: var(--ink); }

.verify-banner { background: var(--warn-soft); border-bottom: 1px solid #f0dfb0; color: #6b4b00; font-size: .9rem; }
.verify-banner .wrap { display: flex; gap: 10px; align-items: center; padding: 9px 0; flex-wrap: wrap; }
.verify-banner form { margin-inline-start: auto; }

/* ---------- Messages flash ---------- */
.flash-stack { margin-top: 16px; display: grid; gap: 8px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--navy); box-shadow: var(--shadow); }
.flash button { background: none; border: 0; cursor: pointer; color: var(--muted); }
.flash-success { border-inline-start-color: var(--ok); }
.flash-error { border-inline-start-color: var(--accent); }
.flash-warning { border-inline-start-color: var(--gold); }

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
}
[dir="rtl"] .hero-grid-bg { mask-image: radial-gradient(ellipse 70% 70% at 30% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 40%, #000 20%, transparent 75%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.hero-name { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 600; margin-bottom: 18px; line-height: 1.08; }
[dir="rtl"] .hero-name { line-height: 1.4; }
.hero-role { font-size: 1.15rem; color: var(--navy); font-weight: 500; margin-bottom: 14px; }
.hero-tag { font-size: 1.05rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-portrait { position: relative; margin: 0; justify-self: center; width: min(380px, 100%); aspect-ratio: 1; }
.hero-portrait img {
  position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: cover; border-radius: 50%;
  box-shadow: 0 30px 60px -20px rgba(13, 27, 46, .45); border: 6px solid #fff;
}
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 60s linear infinite; }
.orbit circle { fill: none; stroke: var(--navy); stroke-opacity: .25; stroke-width: 1.2; }
.orbit .node { fill: var(--accent); stroke: none; }
.orbit .n2 { fill: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit { animation: none; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 56px 0 0; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.stats > div { padding: 24px 26px; border-inline-start: 1px solid rgba(255, 255, 255, .08); }
.stats > div:first-child { border-inline-start: 0; }
.stats dt { font: 600 2.3rem/1 var(--f-head); color: #fff; }
[dir="rtl"] .stats dt { font-family: "Fraunces", serif; }
.stats dd { margin: 8px 0 0; color: #b7c3d4; font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0 72px; }
.section-tint { background: var(--paper-2); }
.section-head { margin-bottom: 32px; }
.section-head.split { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0; }
.kicker { font: 600 .8rem/1 var(--f-body); color: var(--accent); letter-spacing: .18em; margin: 0 0 10px; text-transform: uppercase; }
.kicker.center { text-align: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); }

.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.research-card { background: var(--card); padding: 28px; transition: background .2s; }
.research-card:hover { background: #fffdf8; }
.research-card h3 { font-size: 1.12rem; margin: 16px 0 8px; }
.research-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.r-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.research-card:nth-child(even) .r-ico { background: #e7eef8; color: var(--navy-2); }

/* ---------- Cartes ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { display: block; aspect-ratio: 16 / 8; overflow: hidden; background: var(--ink); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-art { position: relative; display: grid; place-items: center; width: 100%; height: 100%; color: #fff; overflow: hidden; }
.card-art .ico { width: 46px; height: 46px; position: relative; z-index: 1; opacity: .95; }
.card-art i {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .22) 1px, transparent 0);
  background-size: 16px 16px;
}
.card-art::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 0 0 30px rgba(255, 255, 255, .04), 0 0 0 60px rgba(255, 255, 255, .03); }
.art-course { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.art-project { background: linear-gradient(135deg, var(--ink) 0%, #26415f 100%); }
.art-workshop { background: linear-gradient(135deg, var(--accent-2) 0%, #d4473d 100%); }
.art-news { background: linear-gradient(135deg, #3c2f1c 0%, var(--gold) 100%); }
.card-body { padding: 22px 22px 18px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-title { font-size: 1.18rem; margin-bottom: 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }
.card-text { color: var(--muted); font-size: .93rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .88rem; }
.card-foot .more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; margin-inline-start: auto; }
.files-count { display: inline-flex; gap: 5px; align-items: center; color: var(--navy); font-weight: 500; }
.is-featured { border-color: #d9cfbd; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); color: var(--text); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-accent { background: var(--accent-soft); color: var(--accent-2); }
.pill-journal { background: #e7eef8; color: var(--navy-2); }
.pill-conference { background: #f1ece2; color: #6f5524; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; color: var(--text); }
.chip-link:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Actualités ---------- */
.news-list { border-top: 1px solid var(--line); }
.news-row { display: grid; grid-template-columns: 170px 1fr 40px; gap: 24px; align-items: start; padding: 26px 8px; border-bottom: 1px solid var(--line); color: var(--text); transition: background .2s, padding .2s; }
.news-row:hover { background: #fff; color: var(--text); padding-inline: 18px; }
.news-row time { font-size: .85rem; font-weight: 600; color: var(--accent); padding-top: 4px; }
.news-row h3 { font-size: 1.25rem; margin-bottom: 6px; }
.news-row p { color: var(--muted); margin: 0; font-size: .95rem; }
.news-row .go { color: var(--navy); align-self: center; opacity: .5; transition: .2s; }
.news-row:hover .go { opacity: 1; transform: translateX(4px); }
[dir="rtl"] .news-row:hover .go { transform: translateX(-4px); }

/* ---------- Bloc inscription ---------- */
.join-panel {
  display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 36px; align-items: center;
  background: var(--ink); color: #d5deea; border-radius: 20px; padding: 44px 48px; position: relative; overflow: hidden;
}
.join-panel::before { content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(192, 38, 45, .25); }
.join-panel h2 { color: #fff; font-size: 1.7rem; }
.join-panel p { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.steps li { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 500; }
.steps span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); font-size: .85rem; }
.join-panel .btn { position: relative; }

.partners { padding: 52px 0 64px; }
.partner-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }
.partner-list li { font: 600 1.06rem/1.4 "Fraunces", serif; color: #8b93a0; }

/* ---------- En-tête de page ---------- */
.page-head { padding: 64px 0 40px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-head .lead { font-size: 1.12rem; color: var(--muted); max-width: 720px; }
.page-head-inner.with-portrait { display: grid; grid-template-columns: 132px 1fr; gap: 32px; align-items: center; }
.mini-portrait { width: 132px; height: 132px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: var(--shadow); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; margin-bottom: 18px; color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .92rem; }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.page-head-course { background: linear-gradient(180deg, #e8edf5, var(--paper)); }
.page-head-workshop { background: linear-gradient(180deg, #f6e8e6, var(--paper)); }

.search-input { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--muted); max-width: 420px; }
.search-input input { border: 0; outline: 0; background: none; padding: 10px 0; font: inherit; width: 100%; color: var(--text); }
.search-input.big { margin-top: 22px; }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--navy); border-radius: var(--radius-sm); margin-bottom: 26px; }
.notice .btn { margin-inline-start: auto; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Détail ---------- */
.detail-layout { padding: 44px 0 72px; }
.detail-cover { width: 100%; border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow); }
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin: .3em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.2em 0; padding: .6em 1.2em; border-inline-start: 3px solid var(--accent); background: #fff; }
.prose code { background: var(--paper-2); padding: .1em .4em; border-radius: 4px; font-size: .9em; }
.prose img { border-radius: var(--radius-sm); margin: 1em 0; }

.downloads { margin-top: 44px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.downloads h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.locked { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--paper); border: 1px dashed #cfc6b4; margin-bottom: 18px; flex-wrap: wrap; color: var(--navy); }
.locked p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.locked > div:first-of-type { flex: 1; min-width: 200px; }
.locked-actions { display: flex; gap: 8px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.file-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.file-list.is-locked li { opacity: .78; }
.file-ext { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .04em; flex: none; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-info small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-badge { color: var(--muted); }

/* ---------- Parcours ---------- */
.about-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 48px 0 80px; }
.toc { position: sticky; top: 98px; align-self: start; }
.toc ul { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--line); }
.toc a { display: block; padding: 7px 16px; color: var(--muted); font-size: .9rem; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.toc a:hover, .toc a.on { color: var(--ink); border-inline-start-color: var(--accent); }
.block { margin-bottom: 56px; scroll-margin-top: 96px; }
.block > h2 { display: flex; align-items: center; gap: 10px; font-size: 1.65rem; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.block > h2 .ico { color: var(--accent); }
.block > h2 small { font-size: .95rem; color: var(--muted); font-family: var(--f-body); font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 139px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 28px; padding: 12px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 134px; top: 21px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.tl-date { font-size: .84rem; font-weight: 600; color: var(--navy); padding-top: 3px; }
.timeline h3 { font-size: 1.08rem; margin-bottom: 4px; }
.timeline p { margin: 0; color: var(--muted); font-size: .93rem; }
.timeline .detail { color: var(--text); font-style: italic; margin-top: 4px; }
[dir="rtl"] .timeline .detail { font-style: normal; }
.xp-list { display: grid; gap: 16px; }
.xp { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.xp header { margin-bottom: 10px; }
.xp h3 { font-size: 1.12rem; margin: 6px 0 2px; }
.xp .org { color: var(--accent-2); font-weight: 600; font-size: .92rem; margin: 0; }
.xp ul { margin: 0; padding-inline-start: 1.1em; color: var(--muted); font-size: .94rem; }
.xp li { margin: 4px 0; }
.sup-grid, .collab-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sup, .collab { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.sup h3, .collab h3 { font-size: 1.05rem; margin-bottom: 6px; }
.sup p, .collab p { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.collab p { margin: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .ico { color: var(--ok); margin-top: 5px; }
.check-list.light li { color: #dfe6f0; }
.check-list.light .ico { color: #fff; }
.pub-tools { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 500 .85rem var(--f-body); color: var(--muted); }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pub-list { list-style: none; padding: 0; margin: 0; counter-reset: pub; text-align: left; }
.pub-list li { display: grid; grid-template-columns: 58px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: "Inter", sans-serif; }
.pub-list li[hidden] { display: none; }
.pub-year { font: 600 .95rem "Fraunces", serif; color: var(--accent); padding-top: 2px; }
.pub-list p { margin: 0; font-size: .91rem; }
.pub-tags { display: flex; gap: 8px; align-items: center; margin-top: 6px !important; flex-wrap: wrap; }
.pub-tags a { font-size: .8rem; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--ink); }
.form label small { font-weight: 400; color: var(--muted); }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea {
  width: 100%; padding: 11px 14px; border: 1px solid #d8d1c3; border-radius: var(--radius-sm); background: #fff;
  font: 400 .97rem var(--f-body); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(29, 70, 128, .12); }
.form textarea { resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); }
.form .check input { margin-top: 4px; accent-color: var(--navy); width: 16px; height: 16px; flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-line { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.fine { font-size: .8rem; color: var(--muted); margin: 0; }
.hp { position: absolute; inset-inline-start: -9999px; height: 0; overflow: hidden; }
.card-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card-form h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.stack { display: grid; gap: 20px; align-content: start; }
.danger summary { cursor: pointer; color: var(--accent-2); font-weight: 600; }
.danger .form { margin-top: 14px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.mini-list small { color: var(--muted); }

/* ---------- Auth ---------- */
.auth-wrap { padding: 56px 0 80px; }
.auth-grid { display: grid; grid-template-columns: .9fr 1.1fr; max-width: 980px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-aside { background: var(--ink); color: #c9d3e0; padding: 44px 40px; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; inset-inline-start: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(192, 38, 45, .3); }
.auth-aside img { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .85); margin-bottom: 24px; }
.auth-aside h2 { color: #fff; font-size: 1.5rem; margin-bottom: 22px; }
.auth-card { padding: 44px 44px 36px; }
.auth-card h1 { font-size: 1.9rem; }
.switch { margin: 22px 0 0; text-align: center; font-size: .92rem; color: var(--muted); }
.switch a { font-weight: 600; }
.big-ico { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }

.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.contact-side h2 { font-size: 1.4rem; }
.contact-side h3 { font-size: 1.05rem; margin-top: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .ico { color: var(--accent); margin-top: 3px; }

.error-page { padding: 120px 0; }
.err-code { font: 700 6rem/1 "Fraunces", serif; color: var(--accent); margin-bottom: 10px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #9fb0c5; padding: 64px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; padding-bottom: 48px; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-mark { background: #fff; color: var(--ink); }
.brand-light .brand-text small { color: #8597ad; max-width: 300px; }
.footer-tag { margin-top: 18px; font-size: .92rem; max-width: 380px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.footer-links a, .site-footer a { color: #c4d0de; }
.footer-links a:hover { color: #fff; }
.muted-light { font-size: .88rem; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); }
.footer-social a:hover { background: #fff; color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; font-size: .82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 14px 20px 22px; box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s; max-height: calc(100vh - 74px); overflow: auto;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav > a { padding: 12px 10px; font-size: 1rem; }
  .main-nav > a.active::after { display: none; }
  .main-nav > a.active { background: #fff; }
  .nav-tools { margin: 12px 0 0; flex-wrap: wrap; }
  .user-pop { inset-inline-start: 0; inset-inline-end: auto; }
  .join-panel { grid-template-columns: 1fr; padding: 36px 30px; }
}
@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-portrait { order: -1; width: 240px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-inline-start: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .08); }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .auth-grid, .account-grid, .contact-grid { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .sup-grid, .collab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .brand-text small { display: none; }
  .research-grid { grid-template-columns: 1fr; }
  .news-row { grid-template-columns: 1fr; gap: 6px; }
  .news-row .go { display: none; }
  .timeline::before, .timeline li::before { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .row2 { grid-template-columns: 1fr; }
  .page-head-inner.with-portrait { grid-template-columns: 1fr; }
  .mini-portrait { width: 96px; height: 96px; }
  .auth-card, .card-form { padding: 24px 20px; }
  .downloads { padding: 20px 16px; }
  .file-list li { flex-wrap: wrap; }
  .stats dt { font-size: 1.9rem; }
  .section { padding: 52px 0; }
}

/* ---------- Formations payantes ---------- */
.card-price { display: flex; align-items: center; gap: 6px; color: var(--accent-2); margin: 0 0 4px; font-size: .95rem; }
.art-training { background: linear-gradient(135deg, #0d1b2e 0%, var(--accent-2) 130%); }
.page-head-training { background: linear-gradient(180deg, #f3ece0, var(--paper)); }
.detail-layout.with-aside { max-width: var(--wrap); display: grid; grid-template-columns: 1fr 360px; gap: 44px; align-items: start; }
.detail-main { min-width: 0; }
.enroll-box { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; scroll-margin-top: 96px; }
.enroll-label { margin: 0; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
[dir="rtl"] .enroll-label { letter-spacing: 0; }
.enroll-price { margin: 0; font: 600 1.9rem/1.2 var(--f-head); color: var(--ink); }
.enroll-line { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .92rem; }
.enroll-included { background: var(--paper); border-radius: 12px; padding: 14px 16px; font-size: .9rem; }
.enroll-included ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.enroll-included .ico { color: var(--ok); }
.enroll-box .btn-block + .btn-block { margin-top: -2px; }
.enr-status { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); border-inline-start: 4px solid var(--muted); }
.enr-status span { font-size: .78rem; color: var(--muted); }
.st-pending { background: var(--warn-soft); border-color: var(--gold); }
.st-proof_sent { background: #e7eef8; border-color: var(--navy-2); }
.st-paid { background: var(--ok-soft); border-color: var(--ok); }
.st-rejected { background: var(--accent-soft); border-color: var(--accent); }
.pay-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pay-box summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.pay-box[open] summary { margin-bottom: 10px; }
.pay-box .form { gap: 10px; }
.pay-instr { font-size: .9rem; background: var(--paper); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.pay-instr p:last-child { margin: 0; }
.pay-ref { font-size: .88rem; }
.pay-ref code { background: var(--accent-soft); color: var(--accent-2); padding: 2px 7px; border-radius: 5px; font-weight: 700; }
.private-area { margin-top: 40px; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.private-area h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.private-area.is-open { border-color: #bfe0cd; background: linear-gradient(180deg, var(--ok-soft), #fff 120px); }
.private-area .locked { margin: 0; }
.row-li { flex-direction: row !important; justify-content: space-between; align-items: center; gap: 10px; }
.row-li > span { display: flex; flex-direction: column; }
@media (max-width: 980px) {
  .detail-layout.with-aside { grid-template-columns: 1fr; }
  .enroll-box { position: static; order: -1; }
}
