/*
 * Thème du SOUND4 Helpdesk, posé sur la feuille de react-notion-x (notion.css, MIT).
 * Les dimensions reproduisent l'apparence de l'ancien site (mesures faites sur les pages
 * publiées) ; les règles marquées « CSS SOUND4 » reprennent le CSS personnalisé que
 * SOUND4 avait saisi dans bullet.so.
 */
:root {
  --notion-font: 'Poppins', sans-serif;
  --notion-header-height: 45px;
  --navbar-bg-color: #fff;
  --navbar-fg-color: rgb(55, 53, 47);
}
.dark-mode {
  --bg-color: #191919;
  --fg-color: #d2d2d2;
  --fg-color-0: #d2d2d2;
  --fg-color-1: #d2d2d2;
  --fg-color-2: #d2d2d2;
  --fg-color-3: #a5a5a5;
  --fg-color-4: #d2d2d2;
  --fg-color-icon: #d2d2d2;
  --bg-color-0: rgb(71, 76, 80); /* survol des fichiers, comme l'ancien site */
  --bg-color-2: rgba(135, 131, 120, 0.15);
  --notion-gray_background_co: rgb(57, 59, 60);
  --fg-color-6: rgba(210, 210, 210, 0.8); /* icônes de page grisées */
  --navbar-bg-color: #191919;
  --navbar-fg-color: #d2d2d2;
}

html { font-size: 14px; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-color);
  color: var(--fg-color);
  font-family: var(--notion-font);
  font-size: 14px;
}
.notion-app { background: var(--bg-color); }

/* Barre du haut */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  height: var(--notion-header-height); padding: 0 24px 0 38px;
  background: var(--navbar-bg-color); color: var(--navbar-fg-color);
}
.navbar-brand { color: inherit; text-decoration: none; font-size: 16px; white-space: nowrap; }
.navbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.navbar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: inherit; cursor: pointer;
}
.navbar-btn:hover { background: var(--bg-color-0); }
.navbar-btn svg { width: 1.6rem; height: 1.6rem; }
.icon-sun { display: none; }
.dark-mode .icon-sun { display: block; }
.dark-mode .icon-moon { display: none; }

/* Mise en page : page de 1300 px, marges de 96 px, texte justifié */
.notion-page-cover-wrapper, .notion-page-cover-wrapper img, .notion-page-cover {
  height: 22vh !important; min-height: 22vh !important; max-height: 22vh !important;
}
.notion-page.notion-full-page {
  --notion-max-width: 1300px;
  width: min(1300px, 100%);
  padding: 10px calc(min(96px, 6vw)) 120px;
  letter-spacing: 0;
}
.notion-page.notion-full-page.notion-full-width { --notion-max-width: 100%; width: 100%; }
.notion-page.notion-page-has-image-icon { padding-top: 96px; }
.notion-page.notion-full-page { font-size: 14px; line-height: 1.5; }
.notion-page.notion-page-no-cover:not(.notion-small-text) { padding-top: 0; }
/* icône de page posée à gauche, sous la couverture */
.notion-page-icon-hero.notion-page-icon-image { left: calc(6.5% - 8.06px); margin-left: 0; }
.notion-page-icon-hero.notion-page-icon-span { left: calc(6.5% - 5.07px); margin-left: 0; }
.notion-page-title-text { border-color: transparent; }

/* fil d'Ariane : icône + titre de 15 px, séparateur « / » */
.notion-breadcrumbs-container { width: 100%; min-height: 45px; }
.notion-breadcrumbs { box-sizing: border-box; height: 45px; padding-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; line-height: 1.2; }
.breadcrumb-link { display: inline-flex; align-items: center; }
.notion-breadcrumb { display: inline-flex; align-items: center; column-gap: 8.4px; margin: 1px 0; padding: 4px 6px; border-radius: 3px; color: var(--fg-color); text-decoration: none; }
a.notion-breadcrumb:hover { background: var(--bg-color-0); }
.notion-breadcrumb-title { font-size: 15px; }
.notion-breadcrumb .icon { width: 16.8px; height: 16.8px; object-fit: contain; }
.notion-breadcrumbs .spacer { padding: 0 2px; color: var(--fg-color-2); }
/* CSS SOUND4 : titre de page en gras */
.notion-title { margin-bottom: 0; font-weight: 700; font-size: 36.4px; line-height: 1.2; }
.notion b, .notion-h { font-weight: 600; }
/* titres en bloc en ligne (inline-block) et non « inline » comme dans react-notion-x 7 :
   sinon leurs marges verticales sont ignorées */
.notion-h, details.notion-toggle .notion-h { display: inline-block; max-width: 100%; }
.notion-hr { height: 1px; border: 0; background-color: #e5e5e5; margin: 0 0 6px; padding: 0; }
.dark-mode .notion-hr { background-color: #373737; }
.notion-text { line-height: 21px; padding-top: 0; padding-bottom: 0; margin: 0; text-align: justify; }
/* toggles, encadrés et titres de section */
.notion-toggle { line-height: 21px; letter-spacing: 0; padding: 1.73712px 1.2012px; }
.notion-toggle > summary { cursor: pointer; }
/* titres repliables : espace au-dessus, comme un titre normal */
.toggle-h1 { margin-top: 2em; }
.toggle-h2 { margin-top: 1.4em; }
.toggle-h3 { margin-top: 1em; }
.notion-toggle > div { padding-left: 1.1em; }
/* Toggle ouvert : trait fin à gauche, sous la flèche. Positionné en absolu, il ne prend pas
   de place : la mise en page reste identique ouvert ou fermé. */
details.notion-toggle[open] > div { position: relative; }

/* Titres de numéro de version (changelogs) : plus petits, séries repliées serrées */
.notion-h1.notion-h-version { font-size: 17px; }
.notion-h2.notion-h-version { font-size: 16px; }
.notion-h3.notion-h-version { font-size: 15px; }
details.toggle-version { margin-top: 0; }
/* une ligne de série a la hauteur d'un toggle ordinaire (~25 px au lieu de 43) */
details.toggle-version > summary > .notion-h { margin: 0; padding: 1px 0; line-height: 22px; }
details.toggle-version > summary > .notion-h > span { line-height: 22px; }
details.notion-toggle[open] > div::before {
  /* le contenu est décalé de 1.1em (notion.css) : on revient sous le milieu de la flèche */
  content: ""; position: absolute; left: calc(.3em - 1.1em); top: 2px; bottom: 2px; width: 1px; background: var(--fg-color-0);
}
/* même couleur que le bord des encadrés (notion.css), dans chaque thème */
.dark-mode details.notion-toggle[open] > div::before { background: var(--bg-color-2); }
.notion-callout { padding: 9.24px 6.93px; }
.notion-callout-text > .notion-callout-title + .notion-h { margin-top: -3px; }
.notion-h1 { font-size: 22.134px; }
.notion-h2 { font-size: 19.096px; }
.notion-h3 { font-size: 17.36px; }
/* CSS SOUND4 */
.notion-h.notion-h1 { line-height: 32px; }
.notion-h.notion-h2 { line-height: 28px; margin-top: 21px; padding-top: 3px; }
.notion-h.notion-gray_background { width: 100%; }
.dark-mode .notion-h.notion-h2.notion-gray_background { background-color: #252525; }
.notion-red { line-height: 16px; }
.notion-column > .notion-text ~ .notion-text { margin-top: 5px; }
.notion-column > .notion-text { margin-bottom: -3px; }
.notion-page-link { height: fit-content; margin-left: 3px; }
/* liens soulignés (et non bordés comme dans react-notion-x) */
.notion-link { border-bottom: 0; text-decoration: underline; display: inline-block; width: fit-content; }
.notion-link:hover { opacity: 1; }
.dark-mode .notion-page-link:hover { background-color: #252525; }
.notion-file-size, .notion-file-title { white-space: unset; }
img.notion-page-icon, svg.notion-page-icon { max-width: unset; max-height: unset; }
/* icônes dans les liens de pages et les encadrés : 22 px au plus */
.notion-page-icon-inline { width: 22px; height: 22px; max-width: 22px; max-height: 22px; }
.notion-page-icon-inline img.notion-page-icon { width: 100%; height: 100%; object-fit: contain; }
.notion-callout > .notion-page-icon-inline { width: 24px; height: 22px; max-width: 24px; max-height: 22px; }
/* Blocs de code : présentation Prism (MIT, licenses/prismjs.txt) + couleurs du CSS SOUND4 */
.notion .notion-code { font-size: inherit; }
pre.notion-code {
  position: relative; margin: .5em 0; padding: 1em; border-radius: 5px; overflow: auto; background: #f5f2f0; line-height: 1.5;
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; /* même police que le code : même hauteur de ligne */
}
pre.notion-code code {
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-size: 1em; line-height: 1.5;
  white-space: pre; word-break: normal; tab-size: 4; color: #000; background: none; padding: 0;
}
.dark-mode pre.notion-code { background-color: #272b33; }
.dark-mode pre.notion-code code { color: #aab1bf; }
.notion-code-copy { position: absolute; top: .4em; right: .4em; z-index: 9; }
.notion-code-copy-button {
  display: inline-block; padding: .5em; border: none; border-radius: 6px; cursor: pointer;
  font-size: 1.25em; line-height: 1em; background-color: #f5f2f0; color: #24292f;
}
.dark-mode .notion-code-copy-button { background-color: #272b33; color: #aab1bf; }
.notion-code-copy-button svg { display: block; }
.notion-code-copy-button.copied { color: #3fb950; }

@media (max-width: 768px) {
  .notion-page.notion-full-page { padding-left: 12px; padding-right: 12px; }
  .navbar { padding-left: 16px; padding-right: 8px; }
}

/* Recherche (fenêtre superposée, comme sur bullet) */
.search-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(0, 0, 0, .45); padding: 12vh 16px 0;
}
.search-overlay.open { display: block; }
/* bord des panneaux de recherche : plus sombre que leurs traits de séparation internes */
:root { --search-border: rgba(0, 0, 0, .16); }
.dark-mode { --search-border: #2e3133; }
.search-panel {
  max-width: 640px; margin: 0 auto; overflow: hidden; border: 1px solid var(--search-border); box-sizing: border-box;
  background: var(--bg-color); color: var(--fg-color);
  border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.search-input {
  width: 100%; box-sizing: border-box; padding: 14px 16px; border: 0;
  border-bottom: 1px solid var(--bg-color-0); outline: none;
  background: transparent; color: inherit; font: inherit; font-size: 16px;
}
/* Croix d'effacement du champ : celle du navigateur (bleue) remplacée par l'icône
   Heroicons x-mark (MIT), dans la couleur du texte, qui suit le thème */
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; cursor: pointer;
  background: currentColor; opacity: .5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18 18 6M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18 18 6M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.search-input::-webkit-search-cancel-button:hover { opacity: .9; }
.search-filters {
  display: flex; gap: 16px; padding: 8px 16px; font-size: 13px;
  border-bottom: 1px solid var(--bg-color-0);
}
.search-filters label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.search-filters input { margin: 0; accent-color: #D44C47; cursor: pointer; }
.search-count { opacity: .55; }
/* thème sombre : texte d'invite « Search... » en blanc */
.dark-mode .page-search-input::placeholder, .dark-mode .search-input::placeholder { color: #fff; opacity: 1; }
.search-results { max-height: 60vh; overflow: auto; overscroll-behavior: contain; }
/* un trait ne sépare que deux zones : pas de doublon avec le bord du panneau en bas */
.search-panel .search-filters { border-bottom: 0; }
.search-results:not(:empty) { border-top: 1px solid var(--bg-color-0); }
.search-results > :last-child { border-bottom: 0; }
/* recherche ouverte : la page en dessous ne défile plus */
html.search-lock, html.search-lock body { overflow: hidden; }
/* place de la barre de défilement réservée : rien ne se décale quand la recherche fige la page */
html { scrollbar-gutter: stable; }
.search-results a {
  display: block; padding: 10px 16px; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--bg-color-0);
}
.search-results a:hover, .search-results a.active { background: var(--bg-color-0); }
.search-results small { display: block; opacity: .65; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .none { padding: 12px 16px; opacity: .65; }

/* Icônes d'un titre, toujours à droite : ancre puis partage. À gauche (react-notion-x),
   l'ancre couvrirait l'emoji d'un encadré ou la flèche d'un titre repliable. */
.notion-h > span { display: inline-flex; align-items: center; }
.notion-h-title { order: 1; }
.notion-h .notion-hash-link { order: 2; float: none; margin: 0 0 0 8px; padding: 0; display: inline-flex; }
.notion-h .notion-h-share { order: 3; margin-left: 4px; }

/* Bouton de partage à droite d'un titre : copie l'adresse du titre (search.js) */
.notion-h-share {
  position: relative; display: inline-flex; vertical-align: middle; margin-left: 8px; padding: 2px;
  border: 0; border-radius: 4px; background: none; color: var(--fg-color-icon); cursor: pointer; opacity: 0;
}
.notion-h-share svg { width: 16px; height: 16px; }
.notion-h:hover .notion-h-share, .notion-h-share:focus-visible, .notion-h-share.copied { opacity: 1; }
.notion-h-share:hover { background: var(--bg-color-0); }
@media (hover: none) { .notion-h-share { opacity: .6; } }
.notion-h-share.copied::after {
  content: "Copied"; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 6px;
  padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  background: var(--fg-color); color: var(--bg-color);
}
.search-results .title { display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.search-results .title::before { flex: none; width: 1em; text-align: center; opacity: .55; }
.search-results .kind-s .title::before { content: "#"; }
.search-results .kind-f .title::before { content: "\2193"; color: #D44C47; opacity: 1; font-weight: 600; }
.search-results .size { margin-left: auto; padding-left: 8px; flex: none; font-size: 12px; opacity: .6; }
.search-results small.where { opacity: .5; }
.search-results mark { background: rgba(255, 200, 0, .35); color: inherit; border-radius: 2px; }
/* Barre de recherche de la page : même panneau que la fenêtre de recherche (champ, puis
   filtre), à l'endroit où celle-ci s'ouvre ; translucide sur la bannière, opaque au focus. */
.notion-page-cover-wrapper { position: relative; }
.page-search {
  width: min(640px, calc(100% - 32px)); box-sizing: border-box; overflow: hidden; border-radius: 8px;
  background: rgba(25, 25, 25, .55); border: 1px solid var(--search-border);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: background-color .15s;
}
.page-search:focus-within { background: var(--bg-color); }
.page-search.on-cover {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 2;
  top: calc(12vh - var(--navbar-height, 45px));
}
.page-search.no-cover { margin: 16px auto 0; box-shadow: none; border-color: var(--bg-color-0); }
.page-search-input {
  display: block; width: 100%; box-sizing: border-box; padding: 14px 16px; border: 0; outline: none;
  border-bottom: 1px solid var(--bg-color-0); background: transparent;
  font: inherit; font-size: 16px; color: var(--fg-color);
}
html:not(.dark-mode) .page-search { background: rgba(255, 255, 255, .6); }
html:not(.dark-mode) .page-search:focus-within { background: var(--bg-color); }
html:not(.dark-mode) .page-search.no-cover { border-color: var(--bg-color-0); }
.page-search .search-filters { border-bottom: 0; }
/* panneau translucide (sans focus) : texte plus discret ; net dès qu'on clique dedans */
.page-search:not(:focus-within) .page-search-input::placeholder { opacity: .55; }
.page-search:not(:focus-within) .search-filters label { opacity: .75; }
.search-inline { max-width: 520px; margin: 4px 0 12px; }
.search-inline .search-input {
  border: 1px solid var(--bg-color-0); border-radius: 6px; padding: 8px 12px; font-size: 14px; cursor: pointer;
}

.site-footer { padding: 24px; text-align: center; font-size: 13px; opacity: .7; }
