/* ============================================
   FRIDA — frida-ai.fr
   Feuille de style principale
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Inter:wght@400;500&display=swap');

/* ---- Variables ---- */
:root {
  --bg:           #f8f6f3;
  --surface:      #ffffff;
  --text:         #1a1918;
  --text-muted:   #7a736c;
  --accent:       #2d4b8e;
  --border:       #e2ddd8;
  --border-dark:  #c9c3bc;
  --font-serif:   'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --max-w:        700px;
  --max-w-wide:   1080px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

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

/* ---- Base ---- */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  opacity: 0.72;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}


/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 2rem;
}

.site-header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.logo-name {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.15s;
}

.site-logo:hover .logo-name {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  gap: 0;
}

.site-nav a {
  display: block;
  padding: 0.35rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  opacity: 1;
}

.site-nav a.active {
  color: var(--accent);
  font-weight: 500;
}

.nav-ext::after {
  content: ' ↗';
  font-size: 0.7em;
  opacity: 0.6;
}

/* Language switcher */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  list-style: none;
}

.lang-current {
  color: var(--text-muted);
  font-weight: 500;
}

.lang-sep {
  color: var(--border-dark);
}

.lang-other {
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.lang-other:hover {
  opacity: 1;
  color: var(--text);
}


/* ============================================
   MAIN & LAYOUT
   ============================================ */

.site-main {
  padding: 5rem 2rem 7rem;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

.wrap-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:first-of-type {
  padding-top: 0;
}

.section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}


/* ============================================
   HERO (page d'accueil)
   ============================================ */

.hero {
  padding: 0 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-mark {
  margin-bottom: 2.5rem;
}

.hero-mark svg {
  width: 44px;
  height: 44px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 460px;
}


/* ============================================
   PAGE HEADER (sous-pages)
   ============================================ */

.page-header {
  padding: 0 0 3rem;
  border-bottom: 1px solid var(--border);
}

.page-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.page-title {
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page-desc {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 440px;
}


/* ============================================
   LABELS & TITRES DE SECTION
   ============================================ */

.label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.45rem;
  margin-bottom: 1.25rem;
}

.section-title-lg {
  font-size: 1.85rem;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.08rem;
  line-height: 1.8;
}


/* ============================================
   AXES DE RECHERCHE (grille)
   ============================================ */

.axes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.axis-card {
  background: var(--bg);
  padding: 1.5rem;
}

.axis-num {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.axis-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.axis-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}


/* ============================================
   ARCHITECTURE DIAGRAM
   ============================================ */

.arch-diagram {
  margin: 2.5rem 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.arch-layer {
  border: 1px solid var(--border-dark);
  padding: 0.85rem 1.25rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.arch-layer-title {
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.arch-layer-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.arch-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 2rem;
  color: var(--border-dark);
  font-size: 1.1rem;
  line-height: 1;
}

.arch-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-dark);
}

.arch-cols .arch-layer {
  border: none;
}


/* ============================================
   TABLES
   ============================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1.5rem 0;
}

.data-table th {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border-dark);
}

.data-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}

.data-table tr:last-child td {
  border-bottom: none;
}


/* ============================================
   TAGS
   ============================================ */

.tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18em 0.55em;
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  line-height: 1.7;
}

.tag-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-muted {
  border-color: var(--border);
  color: var(--text-muted);
}


/* ============================================
   BLOC PARTICIPATION
   ============================================ */

.participate {
  border-left: 2px solid var(--accent);
  padding: 1.5rem 2rem;
  background: var(--surface);
  margin: 2.5rem 0;
}

.participate-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.participate p {
  font-size: 0.95rem;
  line-height: 1.72;
  margin-bottom: 0.85rem;
}

.profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}


/* ============================================
   BOUTONS
   ============================================ */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
  background: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--text);
  color: var(--text);
  opacity: 1;
}

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent);
  color: var(--surface);
  opacity: 1;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  align-items: center;
}


/* ============================================
   PAGE DOCUMENTS
   ============================================ */

.doc-category {
  margin-bottom: 2.75rem;
}

.doc-category-title {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.doc-list {
  list-style: none;
  padding: 0;
}

.doc-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.doc-item:last-child {
  border-bottom: none;
}

.doc-name {
  flex: 1;
  line-height: 1.4;
}

.doc-name a {
  text-decoration: none;
  color: var(--text);
}

.doc-name a:hover {
  color: var(--accent);
  opacity: 1;
}

.doc-meta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ============================================
   INVARIANTS (liste numérotée)
   ============================================ */

.invariants {
  list-style: none;
  padding: 0;
  counter-reset: inv;
  margin: 1.5rem 0;
}

.invariants li {
  counter-increment: inv;
  display: flex;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 0.95rem;
  line-height: 1.65;
}

.invariants li:last-child {
  border-bottom: none;
}

.invariants li::before {
  content: counter(inv, decimal-leading-zero);
  font-family: var(--font-sans);
  font-size: 0.64rem;
  color: var(--text-muted);
  min-width: 2.2em;
  flex-shrink: 0;
  padding-top: 0.25em;
  letter-spacing: 0.06em;
}


/* ============================================
   PROBLÈMES OUVERTS
   ============================================ */

.problems {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.problems li {
  padding: 0.85rem 0 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.95rem;
  line-height: 1.68;
}

.problems li:last-child {
  border-bottom: none;
}

.problems li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}


/* ============================================
   PHILOSOPHIE — blocs thématiques
   ============================================ */

.themes {
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.theme {
  padding: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.theme:last-child {
  border-bottom: none;
}

.theme-title {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
  letter-spacing: 0;
}

.theme p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin: 0;
}


/* ============================================
   CONTACT
   ============================================ */

.contact-email-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.contact-email-link:hover {
  opacity: 0.72;
}


/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
  background: var(--bg);
}

.site-footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.footer-links a:hover {
  color: var(--text);
  opacity: 1;
}


/* ============================================
   UTILITAIRES
   ============================================ */

.text-muted  { color: var(--text-muted); }
.font-sans   { font-family: var(--font-sans); }
.text-sm     { font-size: 0.88rem; }
.mt-s        { margin-top: 1.25rem; }
.mt-m        { margin-top: 2rem; }
.mt-l        { margin-top: 3rem; }
.mb-s        { margin-bottom: 1.25rem; }
.mb-m        { margin-bottom: 2rem; }


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 720px) {
  html { font-size: 16px; }

  .site-header { padding: 0 1.25rem; }
  .site-header-inner {
    height: auto;
    padding: 0.75rem 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .site-nav { flex-wrap: wrap; }
  .site-nav a { padding: 0.25rem 0.5rem; font-size: 0.76rem; }

  .site-main { padding: 3rem 1.25rem 5rem; }
  .site-footer { padding: 1.25rem; }

  .axes-grid { grid-template-columns: 1fr; }
  .arch-cols { grid-template-columns: 1fr; }
  .themes { border: none; }
  .theme { border: 1px solid var(--border); margin-bottom: -1px; }

  .participate { padding: 1.25rem 1.25rem 1.25rem 1.5rem; }
  .btn-row { flex-direction: column; align-items: flex-start; }

  .doc-item { flex-direction: column; gap: 0.2rem; }
  .doc-meta { white-space: normal; }
  .site-footer-inner { flex-direction: column; gap: 0.75rem; }

  .hero-mark svg { width: 36px; height: 36px; }
}
