/* The partners' public pages (outils/partenaires.py): one column, the wiki's
   colours. Colours are tokens, redefined for dark mode. */
:root {
  --violet: #533589;
  --violet-pale: #f7f3fd;
  --violet-ligne: #e0d9ed;
  --texte: #17141b;
  --texte-2: #514664;
  --fond: #f5f4f6;
  --ligne: #e6e6e8;
  --blanc: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --violet: #b9a3e3;
    --violet-pale: #2a2235;
    --violet-ligne: #3d3350;
    --texte: #f1eef5;
    --texte-2: #bdb3cc;
    --fond: #141118;
    --ligne: #2e2836;
    --blanc: #1c1822;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
a { color: var(--violet); }
h1, h2, h3 { font-family: Rubik, Inter, sans-serif; line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 12px; }
h2 { font-size: 1.4rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 24px 0 4px; }

/* the website's menu (tchatnsign.com): logo, drop-downs, links, FR/EN, login, demo */
.haut {
  --orange: #fb953d;
  position: relative; display: flex; align-items: center; gap: 24px;
  max-width: 1200px; margin: 0 auto 16px; padding: 12px 16px;
  border-bottom: 1px solid var(--ligne);
}
.logo img { height: 36px; display: block; }
.logo .sombre { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .clair { display: none; }
  :root:not([data-theme="light"]) .logo .sombre { display: block; }
}
.menu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.menu nav ul, .deroulant ul { list-style: none; margin: 0; padding: 0; }
.menu nav > ul { display: flex; align-items: center; gap: 4px; }
.menu a, .deroulant summary { color: var(--texte); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.menu nav > ul > li > a, .deroulant summary { display: block; padding: 8px 10px; border-radius: 8px; }
.menu a:hover, .deroulant summary:hover { color: var(--orange); }
.deroulant { position: relative; }
.deroulant summary { cursor: pointer; list-style: none; }
.deroulant summary::-webkit-details-marker { display: none; }
.deroulant summary::after { content: "▾"; margin-left: 6px; font-size: 0.8em; }
.deroulant[open] summary::after { content: "▴"; }
.deroulant ul {
  position: absolute; top: 100%; left: 0; z-index: 10; min-width: 230px;
  background: var(--blanc); border: 1px solid var(--ligne); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(23, 20, 27, 0.12); padding: 6px;
}
.deroulant ul a { display: block; padding: 8px 12px; border-radius: 8px; font-weight: 400; }
.deroulant ul a:hover { background: var(--violet-pale); }
.actions { display: flex; align-items: center; gap: 12px; }
.actions .deroulant ul { left: auto; right: 0; min-width: 180px; }
.langues { margin: 0; display: flex; gap: 6px; font-size: 0.9rem; color: var(--texte-2); }
.langues [aria-current] { color: var(--texte); font-weight: 600; }
.demo {
  background: var(--orange); color: #17141b !important; border-radius: 999px;
  padding: 8px 16px; white-space: nowrap;
}
.demo:hover { filter: brightness(1.05); color: #17141b; }
.burger { display: none; }

/* phone and narrow screens: the menu stacks; with the script it folds behind ☰.
   The French menu needs about 1060px on one line: below 1100px it folds. */
@media (max-width: 1100px) {
  .haut { flex-wrap: wrap; justify-content: space-between; }
  .menu { flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .menu nav > ul { flex-direction: column; align-items: stretch; }
  .deroulant ul { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: none; }
  .actions { flex-wrap: wrap; padding: 8px 10px 4px; }
  .haut.avec-script .burger {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--violet-ligne); border-radius: 10px; background: none; cursor: pointer;
  }
  .burger span, .burger span::before, .burger span::after {
    display: block; width: 20px; height: 2px; background: var(--texte); position: relative; content: "";
  }
  .burger span::before { position: absolute; top: -6px; }
  .burger span::after { position: absolute; top: 6px; }
  .haut.avec-script .menu { display: none; }
  .haut.avec-script.ouvert .menu { display: flex; }
}

/* The column is as wide as the menu, so that videos and captures grow with the
   screen; the text keeps a readable line (72 characters at most). */
main { max-width: 1200px; margin: 0 auto; padding: 8px 16px 32px; }
main > h1, .intro, section > :is(h2, h3, p, ul, ol) { max-width: 72ch; }
.intro { color: var(--texte-2); font-size: 1.1rem; margin: 0 0 24px; }
section {
  background: var(--blanc); border: 1px solid var(--ligne); border-radius: 12px;
  padding: 24px; margin: 0 0 24px;
}
/* The video takes the column's width but never more than the window's height
   allows: it is always seen whole, on a laptop as on a phone held sideways. */
video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  max-width: max(280px, calc((100vh - 96px) * 16 / 9));
  max-width: max(280px, calc((100svh - 96px) * 16 / 9));
  background: #000; border-radius: 8px; margin: 16px auto;
}
.etapes { padding-left: 1.4em; margin: 0; }
.etapes li { margin: 4px 0; }
.fichiers { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.fichiers li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  background: var(--violet-pale); border: 1px solid var(--violet-ligne); border-radius: 8px; padding: 12px 16px;
}
.fichiers a { font-weight: 600; }
.fichiers span { color: var(--texte-2); font-size: 0.9rem; }
.aatl { color: var(--texte-2); border-left: 3px solid var(--violet); padding-left: 12px; margin: 20px 0 0; }

.bas { max-width: 1200px; margin: 0 auto; padding: 0 16px 32px; color: var(--texte-2); font-size: 0.9rem; }
.bas p { margin: 4px 0; }

/* A capture opens in large (partenaire.js): it fits the screen, and a click
   on it shows it at its real size, to scroll through. Without the script, the
   link opens the image alone. */
a.agrandir { display: block; cursor: zoom-in; border-radius: 8px; }
dialog.loupe {
  width: 100vw; height: 100vh; height: 100svh; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0; overflow: auto;
  background: rgba(16, 13, 20, 0.97); color: #fff;
}
dialog.loupe[open] { display: flex; }
dialog.loupe::backdrop { background: rgba(16, 13, 20, 0.6); }
/* margin: auto centres the image and, once larger than the screen, starts it
   at the top left, so that every part of it can be scrolled to */
dialog.loupe img {
  margin: auto; display: block; border-radius: 6px; background: #fff;
  max-width: 100%; max-height: 100%; width: auto; height: auto;
}
dialog.loupe.zoomable img { cursor: zoom-in; }
dialog.loupe img.reel { max-width: none; max-height: none; cursor: zoom-out; }
dialog.loupe .fermer {
  position: fixed; top: 12px; right: 12px; z-index: 1;
  width: 44px; height: 44px; border-radius: 22px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: #17141b; font-size: 26px; line-height: 1;
}
dialog.loupe .fermer:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html:has(dialog.loupe[open]) { overflow: hidden; }

/* phone: less padding around the cards, so the captures get the width */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  section { padding: 16px 12px; }
  dialog.loupe { padding: 8px; }
}
