/* DA alignée sur AlphaEdge Docs — https://api-docs.alphaedge-ai.com/api/installation/ */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("https://api-docs.alphaedge-ai.com/static/api_app/font/Atkinson_Hyperlegible_Next/AtkinsonHyperlegibleNext-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #01123c;
  --color-secondary: #dbe8ff;
  --color-text: #0c0c10;
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --bleu-1: var(--color-primary);
  --bleu-2: var(--color-secondary);
  --bleu-2-bordure: #d8dce2;
  --noir: var(--color-text);
  --gris: var(--color-bg);
  --blanc: var(--color-surface);
  --gris-texte: #6d6d6d;
  --gris-bordure: #e0e0e0;
  --orange-1: #b83400;
  --orange-2: #ffb99d;
  --fs-subtitle-xs: clamp(0.8125rem, 0.35rem + 0.45vw, 1.125rem);
  --fs-body-sm: 0.9375rem;
  --fs-menu: 0.65rem;
  --icon-invert: 0;
  color-scheme: light;
}

html.dark {
  --color-primary: #dbe8ff;
  --color-secondary: #1a2338;
  --color-text: #f1f1ed;
  --color-bg: #111212;
  --color-surface: #141414;
  --bleu-1: var(--color-primary);
  --bleu-2: var(--color-secondary);
  --bleu-2-bordure: #343434;
  --noir: var(--color-text);
  --gris: var(--color-bg);
  --blanc: var(--color-surface);
  --gris-texte: #a0a0a0;
  --orange-1: #ffb99d;
  --orange-2: #b83400;
  --icon-invert: 1;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  height: 100%;
}

body.docs-body {
  margin: 0;
  background: var(--gris);
  color: var(--noir);
  line-height: 1.2;
  height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: hidden;
  font-family: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.layout {
  display: flex;
  height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  max-width: 100vw;
}

/* ——— Sidebar (gabarit AlphaEdge Docs) ——— */
.sidebar {
  width: 280px;
  height: 100vh;
  background-color: var(--gris);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  transition: width 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.nav-scroll {
  overflow: hidden;
}

.logo-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bleu-2-bordure);
  text-align: center;
  min-height: 88.8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

.logo-section .logo {
  display: block;
  text-decoration: none;
  line-height: 0;
}

.logo-section .logo img {
  height: 40px;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  filter: invert(var(--icon-invert, 0));
}

.logo-tagline {
  margin: 0;
  font-size: var(--fs-menu);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gris-texte);
}

.logo-section-collapsed {
  display: none;
  padding: 0;
  border-bottom: 1px solid var(--bleu-2-bordure);
  min-height: 88.8px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-section-collapsed .logo--mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  padding: 0;
  line-height: 0;
  text-decoration: none;
  border: 0;
}

.logo-section-collapsed .logo--mark img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  border: 0;
  outline: none;
}

html.dark .logo-section-collapsed .logo--mark img {
  filter: invert(1);
}

.sidebar-nav {
  padding: 20px 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-section {
  margin-bottom: 4px;
}

.section-title {
  font-size: var(--fs-subtitle-xs);
  font-weight: 600;
  color: var(--gris-texte);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--gris-bordure);
  min-width: 0;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--noir);
  text-decoration: none;
  font-size: var(--fs-subtitle-xs);
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  position: relative;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background-color: var(--bleu-2);
  color: var(--bleu-1);
}

.nav-item.active .nav-link,
.nav-link[aria-current="page"] {
  background-color: var(--bleu-2);
  color: var(--bleu-1);
  border-left-color: var(--bleu-1);
  font-weight: 600;
}

.nav-link:active {
  transform: scale(0.98);
}

.nav-link__icon {
  flex-shrink: 0;
  width: 1.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--bleu-1);
  transition: color 0.2s ease;
}

.nav-link:hover .nav-link__icon,
.nav-item.active .nav-link__icon,
.nav-link[aria-current="page"] .nav-link__icon {
  color: var(--bleu-1);
}

.nav-list--group {
  margin-bottom: 12px;
}

.nav-group__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--noir);
  font-family: inherit;
  font-size: var(--fs-subtitle-xs);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-group__toggle:hover {
  background-color: var(--bleu-2);
  color: var(--bleu-1);
}

.nav-group--active > .nav-group__toggle,
.nav-group__toggle[aria-expanded="true"]:hover {
  color: var(--bleu-1);
}

.nav-group--active > .nav-group__toggle {
  border-left-color: var(--bleu-1);
  background-color: var(--bleu-2);
}

.nav-group__chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--gris-texte);
  transition: transform 0.2s ease;
}

.nav-group--open .nav-group__chevron {
  transform: rotate(0deg);
}

.nav-group:not(.nav-group--open) .nav-group__chevron {
  transform: rotate(-90deg);
}

.nav-sublist {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  overflow: hidden;
}

.nav-group:not(.nav-group--open) .nav-sublist {
  display: none;
}

.nav-link--sub {
  padding: 10px 20px 10px 44px;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0;
}

.nav-link--sub span {
  flex: 1;
}

.nav-item.active .nav-link--sub,
.nav-link--sub[aria-current="page"] {
  background-color: var(--bleu-2);
  color: var(--bleu-1);
  border-left-color: var(--bleu-1);
  font-weight: 600;
}

body.sidebar-collapsed .sidebar .nav-sublist,
body.sidebar-collapsed .sidebar .nav-group__label,
body.sidebar-collapsed .sidebar .nav-group__chevron {
  display: none;
}

body.sidebar-collapsed .sidebar .nav-group__toggle {
  justify-content: center;
  padding: 12px;
  border-left: none;
}

.section-heading--sub {
  font-size: clamp(1.05rem, 0.5rem + 0.8vw, 1.35rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.doc-anchor-section {
  scroll-margin-top: 100px;
}

.sidebar-actions {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--bleu-2-bordure);
}

.sidebar-ticket-btn,
.sidebar-updates-btn {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 16px 20px 8px;
  font-size: var(--fs-menu);
  color: var(--gris-texte);
  border-top: 1px solid var(--bleu-2-bordure);
  line-height: 1.5;
}

.sidebar-footer a {
  color: var(--bleu-1);
}

.content-area {
  margin-left: 280px;
  background: var(--gris);
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  max-width: calc(100vw - 280px);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--bleu-2-bordure);
  box-sizing: border-box;
}

.sidebar-toggle {
  position: fixed;
  left: 280px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 50px;
  background-color: var(--gris);
  border: 1px solid var(--bleu-2-bordure);
  border-left: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 21;
  transition: left 0.3s ease;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
  color: var(--bleu-1);
  font-size: 14px;
  border-radius: 0 6px 6px 0;
}

.sidebar-toggle:hover {
  background-color: var(--bleu-2);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:active {
  transform: translateY(-50%) scale(0.95) !important;
}

.sidebar-toggle i {
  color: var(--bleu-1);
  font-size: var(--fs-subtitle-xs);
  transition: transform 0.3s ease;
}

body.sidebar-collapsed .sidebar {
  width: 50px;
}

body.sidebar-collapsed .sidebar .nav-link span,
body.sidebar-collapsed .sidebar .section-title,
body.sidebar-collapsed .sidebar .logo-section,
body.sidebar-collapsed .sidebar .sidebar-footer,
body.sidebar-collapsed .sidebar .sidebar-actions {
  display: none;
}

body.sidebar-collapsed .sidebar .logo-section-collapsed {
  display: flex;
}

body.sidebar-collapsed .sidebar .nav-link {
  justify-content: center;
  padding: 12px;
  border-left: none;
}

body.sidebar-collapsed .sidebar .nav-link:active {
  transform: none;
}

body.sidebar-collapsed .content-area {
  margin-left: 50px;
  max-width: calc(100vw - 50px);
}

body.sidebar-collapsed .sidebar-toggle {
  left: 50px;
}

body.sidebar-collapsed .docs-topbar {
  left: 50px;
}

/* ——— Topbar (gabarit AlphaEdge Docs) ——— */
.docs-topbar {
  background: var(--gris);
  border: 1px solid var(--bleu-2-bordure);
  border-left: none;
  border-top: none;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  box-sizing: border-box;
  height: 88.8px;
  min-height: 88.8px;
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  z-index: 10;
}

body.sidebar-collapsed .docs-topbar {
  left: 50px;
}

.docs-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.topbar-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 8px 0 0;
  background: transparent;
  border: 1px solid var(--bleu-2-bordure);
  border-radius: 0;
  color: var(--bleu-1);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  font: inherit;
}

.topbar-hamburger:hover {
  background: var(--bleu-2);
}

.topbar-hamburger i {
  font-size: 1.25rem;
}

.topnav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 50vw;
  transform: translateX(-50%);
  z-index: 11;
}

.topnav-link {
  padding: 10px 14px;
  color: var(--noir);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-subtitle-xs);
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.topnav-link:hover {
  background: var(--bleu-2);
  color: var(--bleu-1);
}

.topnav-link.active {
  border-color: transparent;
  background: var(--bleu-2);
  color: var(--bleu-1);
}

@media (min-width: 1390px) and (max-width: 1690px) {
  .topnav {
    position: static;
    left: auto;
    transform: none;
    margin-right: auto;
    justify-content: flex-start;
  }
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  position: absolute;
  right: 18px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-right: 4px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--noir);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  font: inherit;
}

.theme-toggle:hover {
  background: var(--bleu-2);
}

.theme-toggle i {
  font-size: 1.1rem;
}

.theme-toggle .theme-icon-light {
  display: none !important;
  color: #facc15;
}

.theme-toggle .theme-icon-dark {
  display: inline-block !important;
  color: #818cf8;
}

html.dark .theme-toggle .theme-icon-light {
  display: inline-block !important;
  color: #facc15;
}

html.dark .theme-toggle .theme-icon-dark {
  display: none !important;
}

.ghost-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: var(--fs-subtitle-xs);
  cursor: pointer;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  color: var(--noir);
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.ghost-btn:hover {
  background: var(--bleu-2);
  color: var(--bleu-1);
}

.topbar-ticket-btn {
  min-height: 40px;
  height: 40px;
}

.docs-main {
  flex: 1;
  min-height: 0;
}

.docs-content-page {
  background: var(--gris);
  color: var(--noir);
  min-height: calc(100vh - 88.8px);
  padding: 40px 60px 60px;
  padding-top: calc(88.8px + 40px);
  margin: 0 auto;
  width: calc(80% - 0px);
  max-width: calc((100vw - 280px) * 0.8);
  box-sizing: border-box;
}

body.sidebar-collapsed .docs-content-page {
  max-width: calc((100vw - 50px) * 0.9);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-subtitle-xs);
  color: var(--gris-texte);
  margin-bottom: 32px;
  font-weight: normal;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--gris-texte);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: normal;
}

.breadcrumbs a:hover {
  color: var(--bleu-1);
  opacity: 0.8;
}

.breadcrumb-separator {
  color: var(--gris-texte);
  user-select: none;
}

.breadcrumb-current {
  color: var(--bleu-1);
  font-weight: 700;
}

.page-title {
  font-size: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  font-weight: 700;
  color: var(--bleu-1);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-lead {
  font-size: 1rem;
  color: var(--gris-texte);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 65ch;
}

.guide-disclaimer {
  margin: 0 0 32px;
  max-width: 65ch;
}

.quickstart-section {
  scroll-margin-top: 100px;
  margin-bottom: 40px;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--noir);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--bleu-2-bordure);
}

.section-content {
  line-height: 1.7;
  color: var(--noir);
  font-size: 0.95rem;
}

.section-content p {
  margin: 0 0 18px;
}

.section-content a {
  color: var(--orange-1);
  font-weight: 500;
  text-decoration: none;
}

.section-content a:hover {
  text-decoration: underline;
  color: var(--orange-2);
}

.section-content ul,
.section-content ol {
  margin: 0 0 18px;
  padding-left: 1.35rem;
}

.section-content li {
  margin: 0.4rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 16px 0 24px;
  background: var(--blanc);
  border: 1px solid var(--bleu-2-bordure);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--gris-bordure);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--bleu-2);
  color: var(--bleu-1);
  font-weight: 600;
}

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

/* Tutoriels : message utilisateur → réponse type de l’agent */
.tuto-task {
  margin: 26px 0 34px;
}
.tuto-task > h3 {
  font-size: 1.05rem;
  margin: 0 0 12px;
  color: var(--bleu-1);
}
html.dark .tuto-task > h3 {
  color: var(--bleu-1);
}

/* Encadrés type AlphaEdge Docs (.quickstart-info-card) — forme uniquement */
.doc-box {
  background: var(--blanc);
  border: 1px solid var(--bleu-2-bordure);
  border-left: 4px solid var(--bleu-1);
  padding: 16px;
  margin: 12px 0 20px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    border-left-color 0.2s ease;
}

html.dark .doc-box {
  background: var(--color-surface);
}

.doc-box__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.doc-box__header > i {
  color: var(--bleu-1);
  font-size: 1rem;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bleu-2) 65%, transparent);
  border: 1px solid var(--bleu-2-bordure);
}

.doc-box__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--noir);
  margin: 0;
  letter-spacing: 0.02em;
}

.doc-box__body {
  color: var(--noir);
  line-height: 1.7;
  margin-top: 12px;
  font-size: 0.95rem;
}

.doc-box__body p,
.doc-box__body .msg {
  margin: 0;
  font-size: 0.95rem;
}

.doc-box__body pre.msg {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
}

/* Variante orange (callouts info) — couleurs actuelles */
.doc-box--info {
  border: 1px solid var(--orange-2);
  border-left: 4px solid var(--orange-1);
}

.doc-box--info .doc-box__header > i {
  color: var(--orange-1);
  background: rgba(184, 52, 0, 0.12);
  border-color: rgba(184, 52, 0, 0.35);
}

.doc-box--info:hover {
  border-color: var(--orange-1);
  border-left-color: var(--orange-1);
}

html.dark .doc-box--info {
  border-color: var(--orange-1);
  border-left-color: var(--orange-2);
}

/* Bulles exemple utilisateur */
.chat-bubble.chat-you {
  border-left-color: var(--bleu-1);
}

/* Bulles exemple assistant */
.chat-bubble.chat-agent {
  background: rgba(1, 18, 60, 0.045);
  border-left-color: #2d6a4f;
}

.chat-bubble.chat-agent .doc-box__header > i {
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.12);
  border-color: rgba(45, 106, 79, 0.35);
}

html.dark .chat-bubble.chat-agent {
  background: rgba(219, 232, 255, 0.07);
  border-left-color: #52b788;
}

html.dark .chat-bubble.chat-agent .doc-box__header > i {
  color: #52b788;
  background: rgba(82, 183, 136, 0.15);
  border-color: rgba(82, 183, 136, 0.35);
}

/* Cartes « Ce que l’assistant peut faire » */
.capability-grid-wrap {
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.capability-grid {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.capability-grid-wrap.is-collapsed .capability-grid {
  position: relative;
}

/* 2 lignes × 4 colonnes = 8 cartes visibles */
.capability-grid-wrap.is-collapsed .capability-card:nth-child(n + 9) {
  display: none;
}

@media (max-width: 900px) {
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-grid-wrap.is-collapsed .capability-card:nth-child(n + 9) {
    display: none;
  }
}

@media (max-width: 480px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .capability-grid-wrap.is-collapsed .capability-card:nth-child(n + 9) {
    display: none;
  }
}

.capability-grid-wrap.is-collapsed .capability-grid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--gris));
}

.capability-grid-wrap.is-expanded .capability-grid::after {
  display: none;
}

.capability-grid__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 4px;
  border: none;
  background: transparent;
  color: var(--bleu-1);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, gap 0.2s ease;
}

.capability-grid__toggle:hover {
  color: var(--orange-1);
  gap: 10px;
}

.capability-grid__toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.capability-grid-wrap.is-expanded .capability-grid__toggle-icon {
  transform: rotate(180deg);
}

a.capability-card.doc-box {
  display: block;
  margin: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.capability-card.doc-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(1, 18, 60, 0.08);
  border-color: var(--bleu-1);
  border-left-color: var(--bleu-1);
}

html.dark a.capability-card.doc-box:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.capability-card__arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--gris-texte);
  font-size: 0.85rem;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

a.capability-card.doc-box:hover .capability-card__arrow {
  opacity: 1;
  color: var(--bleu-1);
  transform: translateX(3px);
}

a.capability-card.doc-box:focus-visible {
  outline: 2px solid var(--bleu-1);
  outline-offset: 3px;
}

.doc-box__body p {
  color: var(--gris-texte);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html,
  .content-area {
    scroll-behavior: auto;
  }
  .doc-box,
  .capability-card__arrow {
    transition: none;
  }
  a.capability-card.doc-box:hover {
    transform: none;
  }
  a.capability-card.doc-box:hover .capability-card__arrow {
    transform: none;
  }
}

.tuto-options {
  font-size: 0.88rem;
  color: var(--gris-texte);
  margin: 6px 0 0 2px;
  padding-left: 16px;
}
.tuto-options li {
  margin: 0.35em 0;
}

/* ——— Maquettes Discord : toujours thème sombre (indépendant du thème du guide) ——— */
.discord-mock {
  --dc-bg: #313338;
  --dc-bg-elevated: #2b2d31;
  --dc-text: #dbdee1;
  --dc-muted: #949ba4;
  --dc-mention-bg: rgba(88, 101, 242, 0.3);
  --dc-mention-fg: #c9cdfb;
  --dc-embed-border: #5865f2;
  --dc-embed-bg: #2b2d31;
  --dc-user-color: #f47fff;
  --dc-bot-color: #ffffff;
  --dc-app-badge: #5865f2;
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.375;
  background: var(--dc-bg) !important;
  color: var(--dc-text) !important;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1e1f22 !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  margin: 16px 0 8px;
  color-scheme: dark;
  isolation: isolate;
}

.discord-mock .discord-mail-confirm__ok {
  color: #57f287;
}

.discord-mock .discord-mail-confirm__more {
  color: var(--dc-muted);
}

.discord-mock .discord-embed__body,
.discord-mock .discord-embed__body p,
.discord-mock .discord-embed__footer {
  color: var(--dc-text);
}

/* Variante claire optionnelle (non utilisée par défaut dans le guide) */
.discord-mock.discord-mock--light {
  --dc-bg: #ffffff;
  --dc-bg-elevated: #ebedef;
  --dc-text: #2e3338;
  --dc-muted: #5c5e66;
  --dc-mention-bg: rgba(88, 101, 242, 0.15);
  --dc-mention-fg: #4752c4;
  --dc-embed-border: #5865f2;
  --dc-embed-bg: #f2f3f5;
  --dc-user-color: #71368a;
  --dc-bot-color: #060607;
  --dc-app-badge: #5865f2;
  border-color: #e3e5e8;
  box-shadow: 0 4px 20px rgba(1, 18, 60, 0.08);
}

.discord-mock .mock-discord-reply__preview {
  background: var(--dc-embed-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--dc-text);
}

.discord-mock.discord-mock--light .mock-discord-reply__preview {
  border-color: #e3e5e8;
}

.discord-mock .mock-discord-reply__preview .mock-discord-reply__line,
.discord-mock .mock-discord-reply__preview .mock-discord-reply__more {
  color: var(--dc-text);
}

.discord-mock .mock-discord-reply__preview .mock-discord-reply__more {
  color: var(--dc-muted);
}

.discord-mock .mock-discord-reply__ok,
.discord-mock .discord-planning-ok {
  color: #57f287;
}

.discord-mock.discord-mock--light .mock-discord-reply__ok,
.discord-mock.discord-mock--light .discord-planning-ok {
  color: #248046;
}

.discord-mock.discord-mock--light .discord-msg__author--bot {
  color: var(--dc-bot-color);
}

.discord-mock.discord-mock--light .discord-msg__badge--tag {
  background: rgba(0, 0, 0, 0.06);
  color: var(--dc-muted);
}

.discord-mock.discord-mock--light .discord-attach {
  border-color: #e3e5e8;
}

.discord-mock.discord-mock--light .discord-media img {
  border-color: #e3e5e8;
}

.discord-mock.discord-mock--light .discord-mail-confirm__ok {
  color: #248046;
}

.discord-mock__messages {
  padding: 16px 16px 8px;
  min-height: 120px;
}

.discord-mock--compact .discord-mock__messages {
  min-height: 80px;
  padding-bottom: 12px;
}

.discord-msg {
  display: flex;
  gap: 16px;
  margin-top: 1.0625rem;
  padding: 2px 0;
}

.discord-msg:first-child {
  margin-top: 0;
}

.discord-msg__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  overflow: hidden;
}

.discord-msg__avatar--user {
  background: linear-gradient(135deg, #5865f2 0%, #eb459e 100%);
}

.discord-msg__avatar--bot {
  background: #d6e8ff;
}

.discord-msg__avatar--bot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: none;
}

.discord-msg__content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.discord-msg__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.discord-msg__author {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.375;
}

.discord-msg__author--user {
  color: var(--dc-user-color);
}

.discord-msg__author--bot {
  color: var(--dc-bot-color);
}

.discord-msg__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.3;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.discord-msg__badge--app {
  background: var(--dc-app-badge);
  color: #fff;
}

.discord-msg__badge--tag {
  background: rgba(79, 84, 92, 0.48);
  color: var(--dc-muted);
  font-size: 0.65rem;
  text-transform: none;
  font-weight: 600;
}

.discord-msg__time {
  font-size: 0.75rem;
  color: var(--dc-muted);
  font-weight: 500;
}

.discord-msg__text {
  margin: 0;
  color: var(--dc-text);
  word-wrap: break-word;
}

.discord-mention {
  background: var(--dc-mention-bg);
  color: var(--dc-mention-fg);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 500;
  cursor: default;
}

.discord-embed {
  margin-top: 4px;
  max-width: 520px;
  border-left: 4px solid var(--dc-embed-border);
  background: var(--dc-embed-bg);
  border-radius: 0 4px 4px 0;
  padding: 8px 16px 10px 12px;
}

.discord-embed__body {
  margin: 0;
  color: var(--dc-text);
  font-size: 0.9375rem;
}

.discord-embed__body p {
  margin: 0 0 6px;
}

.discord-embed__body p:last-child {
  margin-bottom: 0;
}

.discord-embed--mail {
  max-width: 560px;
}

.discord-mail-confirm__ok {
  font-weight: 700;
  color: #3ba55d;
  margin-bottom: 8px !important;
}

html.dark .discord-mail-confirm__ok {
  color: #57f287;
}

.discord-mail-confirm__label {
  margin-top: 8px !important;
}

.discord-mail-confirm__more {
  color: var(--dc-muted);
  margin-top: 4px !important;
}

.discord-attach {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  max-width: 420px;
  border-radius: 8px;
  background: var(--dc-bg-elevated);
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
}

html.dark .discord-attach {
  border-color: rgba(255, 255, 255, 0.08);
}

.discord-attach__icon {
  color: #5865f2;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.discord-attach__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--dc-text);
  font-weight: 500;
}

.discord-attach__meta {
  font-size: 0.75rem;
  color: var(--dc-muted);
  flex-shrink: 0;
}

.discord-attach--docx .discord-attach__icon {
  color: #2b579a;
}

.discord-attach--inline {
  margin-top: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  max-width: none;
}

.discord-audit-step {
  margin-bottom: 10px !important;
}

.discord-audit-step + .discord-embed {
  margin-bottom: 12px;
}

.discord-audit-meta {
  margin-bottom: 8px !important;
}

.discord-audit-meta__stats {
  color: var(--dc-muted);
  font-size: 0.9em;
}

.discord-audit-cost-title {
  margin: 12px 0 6px !important;
  font-size: 0.9rem;
  color: var(--dc-muted);
}

.discord-codeblock {
  margin-top: 4px;
  max-width: 480px;
  border-radius: 8px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.discord-codeblock__pre {
  margin: 0;
  padding: 10px 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
}

.discord-media {
  margin-top: 6px;
  max-width: min(520px, 100%);
}

.discord-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.discord-media--generated {
  max-width: 400px;
}

.discord-media--generated img {
  width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
}

html.dark .discord-media img {
  border-color: rgba(255, 255, 255, 0.1);
}

.discord-embed__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--dc-muted);
}

.discord-embed__footer-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #d6e8ff url("./alphanemo-avatar-discord.png") center / cover no-repeat;
}

.discord-mock__composer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 0 16px;
  height: 44px;
  background: var(--dc-bg-elevated);
  border-radius: 8px;
  color: var(--dc-muted);
  font-size: 0.9375rem;
}

.discord-mock__composer-plus {
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--dc-muted);
  line-height: 1;
}

.discord-mock__composer-placeholder {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-mock__hint {
  margin: 12px 0 0 56px;
  font-size: 0.8125rem;
  color: var(--dc-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.discord-mock__hint--mute {
  color: #ed4245;
  opacity: 0.9;
}

.discord-mock__hint--mute i {
  font-size: 0.75rem;
}

.discord-figure {
  margin: 0 0 20px;
}

.discord-figure__caption {
  margin: 8px 2px 0;
  font-size: 0.85rem;
  color: var(--gris-texte);
  text-align: center;
}

.discord-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.discord-figure--half {
  margin: 0;
}

.discord-compare__label {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bleu-1);
}

.discord-compare__label i {
  margin-right: 6px;
  opacity: 0.85;
}

#tuto-personnalisation .tuto-task h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--noir);
}

#tuto-personnalisation code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--bleu-2);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .discord-compare {
    grid-template-columns: 1fr;
  }
}

html.dark #tuto-personnalisation code {
  background: var(--bleu-2);
  color: var(--noir);
}

.discord-screenshot-ref {
  margin: 0 0 20px;
  font-size: 0.88rem;
}

.discord-screenshot-ref summary {
  cursor: pointer;
  color: var(--gris-texte);
  font-weight: 600;
  padding: 6px 0;
}

.discord-screenshot-ref summary:hover {
  color: var(--bleu-1);
}

.discord-screenshot-ref img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--bleu-2-bordure);
}


.code-block {
  background: var(--blanc);
  border: 1px solid var(--bleu-2-bordure);
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bleu-2);
  border-bottom: 1px solid var(--bleu-2-bordure);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bleu-1);
}

.code-block pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: #1e1e1e;
}

.code-block code {
  font-family: "JetBrains Mono", ui-monospace, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #d4d4d4;
  white-space: pre;
}

.doc-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--bleu-2-bordure);
  font-size: 0.85rem;
  color: var(--gris-texte);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.4);
}

body.sidebar-open-mobile .sidebar-backdrop {
  display: block;
}

body.sidebar-collapsed .sidebar-toggle i {
  transform: rotate(180deg) !important;
}

@media (max-width: 1024px) {
  .topbar-hamburger {
    display: inline-flex;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  body.sidebar-open-mobile .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  body.sidebar-open-mobile.sidebar-collapsed .sidebar .logo-section {
    display: flex;
  }

  body.sidebar-open-mobile.sidebar-collapsed .sidebar .logo-section-collapsed {
    display: none;
  }

  body.sidebar-open-mobile.sidebar-collapsed .sidebar .nav-link span,
  body.sidebar-open-mobile.sidebar-collapsed .sidebar .section-title,
  body.sidebar-open-mobile.sidebar-collapsed .sidebar .sidebar-footer,
  body.sidebar-open-mobile.sidebar-collapsed .sidebar .sidebar-actions {
    display: revert;
  }

  body.sidebar-open-mobile.sidebar-collapsed .sidebar .sidebar-actions {
    display: block;
  }

  body.sidebar-open-mobile.sidebar-collapsed .sidebar .nav-link {
    justify-content: flex-start;
    padding: 12px 20px;
    border-left: 3px solid transparent;
  }

  .content-area {
    margin-left: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    border-left: none;
  }

  body.sidebar-collapsed .content-area {
    margin-left: 0 !important;
    max-width: 100vw !important;
  }

  .docs-topbar {
    left: 0 !important;
    flex-wrap: nowrap;
    padding: 10px 12px;
    gap: 8px;
    overflow: hidden;
  }

  body.sidebar-collapsed .docs-topbar {
    left: 0 !important;
  }

  .docs-topbar-left {
    flex-shrink: 0;
  }

  .topnav {
    position: static;
    left: auto;
    transform: none;
    flex: 1;
    min-width: 0;
    margin: 0;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .topnav-link {
    padding: 8px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .top-actions {
    position: static;
    right: auto;
    flex-shrink: 0;
    margin-left: 4px;
  }

  .topbar-ticket-btn {
    display: none !important;
  }

  .passkey-logout-btn__label {
    display: none;
  }

  .passkey-logout-btn {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    gap: 0;
  }

  .sidebar-actions {
    display: flex;
  }

  .sidebar-toggle {
    display: none;
  }

  .sidebar-backdrop {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  body.sidebar-open-mobile .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open-mobile {
    overflow: hidden;
  }

  .docs-content-page {
    width: 95%;
    max-width: 95%;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Modal ticket (contact) */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.is-open {
  display: flex;
}

/* Page tickets (même layout guide : sidebar + topbar + docs-content-page) */
.tickets-page .tickets-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.tickets-page-header .page-title {
  margin-bottom: 8px;
}

.tickets-page-lead {
  margin: 0;
  max-width: 52rem;
}

.tickets-page-header .btn-primary-ae,
.tickets-page-header .btn-ghost-ae {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 0;
}

#ticketCreateBtn {
  border-radius: 0;
}

html.dark #ticketCreateBtn,
html.dark .tickets-page-header .btn-primary-ae,
html.dark .ticket-form__actions .btn-primary-ae,
html.dark .ticket-notify__actions .btn-primary-ae {
  background: #dbe8ff;
  color: #01123c;
}

html.dark #ticketCreateBtn:hover,
html.dark .tickets-page-header .btn-primary-ae:hover,
html.dark .ticket-form__actions .btn-primary-ae:hover,
html.dark .ticket-notify__actions .btn-primary-ae:hover {
  filter: brightness(1.05);
  background: #e8f0ff;
  color: #01123c;
}

.sidebar-ticket-btn.is-active,
.topbar-ticket-btn.is-active {
  background: var(--bleu-2);
  color: var(--bleu-1);
}

.ticket-list__empty {
  margin: 16px 0 0;
  font-size: 0.95rem;
  color: var(--gris-texte);
}

.tickets-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--blanc);
}

.tickets-table th,
.tickets-table td {
  border-bottom: 1px solid var(--bleu-2-bordure);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.tickets-table th {
  background: var(--bleu-2);
  color: var(--bleu-1);
  font-weight: 600;
  white-space: nowrap;
}

.tickets-table tbody tr:hover td {
  background: rgba(1, 18, 60, 0.03);
}

.tickets-table__id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--gris-texte);
  white-space: nowrap;
}

.tickets-table__subject-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
}

.tickets-table__subject-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.tickets-unread {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  padding: 0.12rem 0.4rem 0.12rem 0.32rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #c2410c;
  letter-spacing: 0.01em;
}

.tickets-unread i {
  font-size: 0.68rem;
  opacity: 0.95;
}

.tickets-unread__count {
  font-variant-numeric: tabular-nums;
}

html.dark .tickets-unread {
  background: #ea580c;
}

.tickets-table__subject {
  font-weight: 600;
  max-width: 320px;
  word-break: break-word;
}

.tickets-table__pj {
  text-align: center;
  color: var(--gris-texte);
}

.tickets-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tickets-status--open {
  color: var(--bleu-1);
}

.tickets-status--closed {
  color: var(--gris-texte);
}

.ticket-form-view[hidden],
.ticket-list-view[hidden] {
  display: none !important;
}

html.dark .tickets-table th {
  background: rgba(255, 255, 255, 0.06);
}

html.dark .tickets-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  .tickets-page-header {
    flex-direction: column;
  }

  .tickets-page-header .btn-primary-ae,
  .tickets-page-header .btn-ghost-ae {
    width: 100%;
    justify-content: center;
  }
}

.modal-panel {
  background: var(--blanc);
  color: var(--noir);
  border-radius: 0;
  border: 1px solid var(--bleu-2-bordure);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--bleu-2-bordure);
  font-weight: 700;
  font-size: 1.05rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--gris-texte);
  line-height: 1;
}

.modal-body {
  padding: 18px 20px 20px;
}

.modal-body label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gris-texte);
  margin-bottom: 6px;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
  width: 100%;
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid var(--bleu-2-bordure);
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--blanc);
  color: var(--noir);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
  outline: none;
  border-color: var(--bleu-1);
  box-shadow: 0 0 0 3px rgba(1, 18, 60, 0.1);
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
  color: var(--gris-texte);
  opacity: 0.65;
}

.modal-body select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.modal-body textarea {
  min-height: 120px;
  resize: vertical;
}

/* Formulaire ticket */
.ticket-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ticket-form--page {
  max-width: 760px;
  margin-top: 8px;
}

.ticket-form__intro {
  margin: 0 0 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--gris-texte);
}

.ticket-form__section {
  margin: 0 0 28px;
  padding: 0 0 28px;
  border: none;
  border-bottom: 1px solid var(--bleu-2-bordure);
  border-radius: 0;
  background: transparent;
}

.ticket-form__section:last-of-type {
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

html.dark .ticket-form__section {
  background: transparent;
}

.ticket-form__section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.ticket-form__step {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 8px;
  border: 1px solid var(--bleu-1);
  background: var(--bleu-2);
  color: var(--bleu-1);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ticket-form__section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--noir);
  line-height: 1.3;
}

.ticket-form__section-desc {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--gris-texte);
}

.ticket-form__section-note {
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
  padding: 2px 8px;
  border: 1px solid var(--bleu-2-bordure);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gris-texte);
}

.ticket-form__row {
  display: grid;
  gap: 16px;
}

.ticket-form__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-form__field {
  margin-bottom: 16px;
}

.ticket-form__field:last-child {
  margin-bottom: 0;
}

.ticket-form__field--message {
  margin-bottom: 16px;
}

.ticket-form__field > label,
.ticket-form__attach-head > label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--noir);
  margin-bottom: 8px;
}

.ticket-form__attach-head {
  margin-bottom: 10px;
}

.ticket-form__attach-head > label {
  margin-bottom: 4px;
}

.ticket-form input[type="text"],
.ticket-form input[type="email"],
.ticket-form select,
.ticket-form textarea {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--bleu-2-bordure);
  border-radius: 0;
  background: var(--blanc);
  color: var(--noir);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ticket-form textarea {
  min-height: 160px;
  resize: vertical;
}

.ticket-form input::placeholder,
.ticket-form textarea::placeholder {
  color: var(--gris-texte);
  opacity: 0.7;
}

.ticket-form input:hover,
.ticket-form select:hover,
.ticket-form textarea:hover {
  border-color: #b8c0cc;
}

.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus {
  outline: none;
  border-color: var(--bleu-1);
  box-shadow: 0 0 0 3px rgba(1, 18, 60, 0.12);
}

html.dark .ticket-form input:focus,
html.dark .ticket-form select:focus,
html.dark .ticket-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(219, 232, 255, 0.15);
}

.ticket-form__control {
  position: relative;
}

.ticket-form__control select,
.ticket-form select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2301123c' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

html.dark .ticket-form__control select,
html.dark .ticket-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23dbe8ff' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
}

.ticket-form__hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gris-texte);
  line-height: 1.45;
}

.ticket-form__dropzone {
  position: relative;
  border: 1px dashed #b8c0cc;
  background: linear-gradient(180deg, rgba(1, 18, 60, 0.03), transparent 70%);
  padding: 22px 18px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

html.dark .ticket-form__dropzone {
  background: linear-gradient(180deg, rgba(219, 232, 255, 0.05), transparent 70%);
  border-color: #4a5160;
}

.ticket-form__dropzone.is-dragover {
  border-color: var(--bleu-1);
  border-style: solid;
  background: var(--bleu-2);
}

.ticket-form__file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.ticket-form__dropzone-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bleu-1);
  pointer-events: none;
}

.ticket-form__dropzone-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  color: var(--bleu-1);
  font-size: 1.15rem;
}

.ticket-form__dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ticket-form__dropzone-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--noir);
}

.ticket-form__dropzone-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gris-texte);
}

.ticket-form__file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-form__file-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  font-size: 0.88rem;
}

.ticket-form__file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ticket-form__file-size {
  font-size: 0.75rem;
  color: var(--gris-texte);
  white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.ticket-form__file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  color: var(--gris-texte);
  cursor: pointer;
  border-radius: 0;
}

.ticket-form__file-remove:hover {
  color: var(--orange-1);
  border-color: var(--orange-1);
}

.ticket-form__field--attachments {
  margin-bottom: 0;
}

.ticket-form__req {
  color: var(--orange-1);
  font-weight: 700;
}

.ticket-form__feedback {
  min-height: 1.25rem;
  font-size: 0.9rem;
  margin: 4px 0 12px;
  line-height: 1.45;
}

.ticket-form__feedback a {
  color: var(--bleu-1);
  font-weight: 600;
}

.ticket-form__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
  padding: 16px 0 0;
  border-top: 1px solid var(--bleu-2-bordure);
}

.ticket-form__actions .btn-primary-ae,
.ticket-form__actions .btn-ghost-ae {
  border-radius: 0;
  min-height: 44px;
  padding: 12px 18px;
  font-size: 0.92rem;
}

.ticket-form__actions .btn-primary-ae {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .ticket-form__row--2 {
    grid-template-columns: 1fr;
  }

  .ticket-form__section-head {
    gap: 12px;
  }

  .ticket-form__actions {
    flex-direction: column-reverse;
  }

  .ticket-form__actions .btn-primary-ae,
  .ticket-form__actions .btn-ghost-ae {
    width: 100%;
    justify-content: center;
  }

  .ticket-form__dropzone-label {
    align-items: flex-start;
  }
}

.modal-backdrop--nested {
  z-index: 110;
  background: rgba(0, 0, 0, 0.55);
}

.modal-panel--confirm {
  max-width: 480px;
}

.ticket-notify__text {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--noir);
}

.ticket-notify__hint {
  margin: 0 0 18px;
}

.ticket-notify__actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 10px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.ticket-notify__actions .btn-primary-ae,
.ticket-notify__actions .btn-ghost-ae {
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
  flex: 1 1 auto;
}

.ticket-notify__actions .btn-primary-ae:disabled,
.ticket-notify__actions .btn-ghost-ae:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 420px) {
  .ticket-notify__actions {
    flex-direction: column-reverse !important;
  }

  .ticket-notify__actions .btn-primary-ae,
  .ticket-notify__actions .btn-ghost-ae {
    width: 100%;
  }
}

/* Liste tickets : flèche gauche → détails */
.tickets-table__toggle-col {
  width: 40px;
  padding-left: 10px !important;
  padding-right: 4px !important;
  vertical-align: middle;
}

.tickets-row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--gris-texte);
  cursor: pointer;
  font-size: 0.75rem;
}

.tickets-row-toggle:hover {
  color: var(--bleu-1);
  border-color: var(--bleu-2-bordure);
  background: var(--blanc);
}

.tickets-row-toggle i {
  transition: transform 0.15s ease;
}

.tickets-row-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
  color: var(--bleu-1);
}

.tickets-table__row {
  cursor: pointer;
}

.tickets-table__row:hover > td {
  background: rgba(1, 18, 60, 0.03);
}

html.dark .tickets-table__row:hover > td {
  background: rgba(255, 255, 255, 0.04);
}

.tickets-table__detail > td {
  padding: 0 14px 16px 50px;
  background: rgba(1, 18, 60, 0.03);
  border-bottom: 1px solid var(--bleu-2-bordure);
}

html.dark .tickets-table__detail > td {
  background: rgba(255, 255, 255, 0.04);
}

.tickets-table__row.is-expanded > td {
  border-bottom-color: transparent;
}

.tickets-detail-panels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 2px;
}

.tickets-detail-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gris-texte);
  line-height: 1.4;
}

.tickets-detail-panel__title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gris-texte);
}

.tickets-detail-panel__message {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  color: var(--noir);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.tickets-detail-comments__empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gris-texte);
}

.tickets-detail-comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tickets-detail-comments__item {
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  padding: 12px 14px;
}

.tickets-detail-comments__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.tickets-detail-comments__author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bleu-1);
}

.tickets-detail-comments__date {
  font-size: 0.78rem;
  color: var(--gris-texte);
}

.tickets-detail-comments__body {
  margin: 0;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--noir);
}

html.dark .tickets-detail-comments__item {
  background: var(--color-surface);
}

.tickets-detail-attachments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tickets-detail-attachments__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
}

.tickets-detail-attachments__item--image {
  display: block;
  padding: 12px;
}

.tickets-detail-attachments__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tickets-detail-attachments__img {
  display: block;
  max-width: min(100%, 520px);
  max-height: 360px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--gris);
}

.tickets-detail-attachments__figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tickets-detail-attachments a {
  color: var(--bleu-1);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.tickets-detail-attachments a:hover {
  color: var(--orange-1);
}

.tickets-detail-attachments__size {
  flex-shrink: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--gris-texte);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-panel {
    max-height: 92vh;
    border-radius: 0;
  }
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-primary-ae {
  background: var(--bleu-1);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary-ae:hover {
  filter: brightness(1.08);
}

.btn-secondary-ae {
  background: var(--blanc);
  color: var(--bleu-1);
  border: 1px solid var(--bleu-2-bordure);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-secondary-ae:hover {
  background: var(--bleu-2);
  border-color: var(--bleu-1);
  color: var(--bleu-1);
}

.btn-ghost-ae {
  background: transparent;
  border: 1px solid var(--bleu-2-bordure);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--noir);
}

html.dark .magic-login-page .btn-primary-ae,
html.dark .magic-oauth-btn.btn-primary-ae {
  background: #dbe8ff;
  color: #01123c;
}

html.dark .magic-login-page .btn-primary-ae:hover,
html.dark .magic-oauth-btn.btn-primary-ae:hover {
  filter: none;
  background: #e8f0ff;
  color: #01123c;
}

html.dark .modal-panel {
  background: var(--blanc);
}

/* ——— Gmail / Discord UI examples (guide) ——— */
.ui-example-label {
  margin: 18px 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gris-texte);
}

.guide-screenshot {
  margin: 12px 0 20px;
  padding: 0;
  max-width: 100%;
}

.guide-screenshot img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--gris-bordure);
  box-shadow: 0 4px 20px rgba(1, 18, 60, 0.08);
}

.guide-screenshot figcaption {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--gris-texte);
  text-align: center;
}

.mock-discord-attach {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(1, 18, 60, 0.06);
  border: 1px solid var(--gris-bordure);
  font-size: 0.9rem;
}

html.dark .mock-discord-attach {
  background: rgba(219, 232, 255, 0.06);
}

.mock-discord-attach__icon {
  color: #5865f2;
  font-size: 1.1rem;
}

.mock-discord-attach__name {
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-discord-attach__meta {
  font-size: 0.8rem;
  color: var(--gris-texte);
}

.mock-ui--discord .mock-discord-reply {
  font-size: 0.95rem;
  line-height: 1.55;
}

.mock-discord-reply__ok {
  margin: 0 0 10px;
  font-weight: 700;
  color: #2d6a4f;
}

html.dark .mock-discord-reply__ok {
  color: #52b788;
}

.mock-discord-reply__line,
.mock-discord-reply__label {
  margin: 0 0 6px;
}

.mock-discord-reply__preview {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--gris-bordure);
  font-size: 0.9rem;
}

.mock-discord-reply__preview p {
  margin: 0 0 8px;
}

.mock-discord-reply__preview ul {
  margin: 0 0 8px;
  padding-left: 1.2rem;
}

.mock-discord-reply__more {
  margin: 0;
  color: var(--gris-texte);
}

.mock-discord-reply--compact .mock-discord-reply__preview {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
}

.discord-planning-list {
  margin: 8px 0 0;
  padding-left: 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--dc-text);
}

.discord-planning-list li {
  margin-bottom: 6px;
}

.discord-planning-list li:last-child {
  margin-bottom: 0;
}

.mock-ui--gmail {
  margin: 0 0 12px;
}

.mock-gmail {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--gris-bordure);
  background: var(--color-surface);
  box-shadow: 0 2px 12px rgba(1, 18, 60, 0.06);
  font-size: 0.92rem;
  line-height: 1.55;
}

.mock-gmail__subject {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--noir);
}

.mock-gmail__from {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.mock-gmail__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4c4c4, #8a8a8a);
  flex-shrink: 0;
}

.mock-gmail__to {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--gris-texte);
}

.mock-gmail__body p {
  margin: 0 0 10px;
}

.mock-gmail__body ul {
  margin: 0 0 10px;
  padding-left: 1.25rem;
}

.mock-gmail__sig {
  margin-top: 16px;
  color: var(--noir);
}

/* Passkey / WebAuthn + page login Magic Link */
.passkey-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fond, #f4f6f9);
}

body.magic-login-page {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, color-mix(in srgb, var(--bleu-2) 85%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 96% 108%, color-mix(in srgb, var(--bleu-2) 55%, transparent), transparent 50%),
    var(--gris);
}

.magic-login-topbar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 18px;
  pointer-events: none;
}

.magic-login-topbar .theme-toggle {
  pointer-events: auto;
  background: var(--blanc);
  border: 1px solid var(--bleu-2-bordure);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.magic-login-topbar .theme-toggle:hover {
  background: var(--bleu-2);
}

.passkey-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.passkey-gate--page {
  position: relative;
  inset: auto;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  padding: 72px 20px 40px;
}

.passkey-gate--page,
.passkey-gate.is-open {
  display: flex;
}

.passkey-gate__panel {
  background: var(--blanc);
  color: var(--noir);
  border-radius: 14px;
  border: 1px solid var(--bleu-2-bordure);
  max-width: 420px;
  width: 100%;
  padding: 28px 26px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
}

.passkey-gate--page .passkey-gate__panel {
  max-width: 460px;
  border-radius: 3px;
  border-left: 4px solid var(--bleu-1);
  padding: 32px 30px 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 18px 48px rgba(1, 18, 60, 0.08);
  animation: magic-login-in 0.45s ease-out both;
}

html.dark .passkey-gate--page .passkey-gate__panel {
  background: var(--color-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 18px 48px rgba(0, 0, 0, 0.35);
}

@keyframes magic-login-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.passkey-gate__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--bleu-1);
}

.passkey-gate--page .passkey-gate__brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bleu-2-bordure);
}

.passkey-gate__logo {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.passkey-gate__logo img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: invert(var(--icon-invert, 0));
}

.passkey-gate__tagline {
  margin: 0;
  font-size: var(--fs-menu);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gris-texte);
}

.passkey-gate__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bleu-2) 70%, transparent);
  border: 1px solid var(--bleu-2-bordure);
  color: var(--bleu-1);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.passkey-gate__eyebrow i {
  font-size: 0.7rem;
}

.passkey-gate__title {
  font-size: 1.35rem;
  margin: 0 0 10px;
  line-height: 1.25;
}

.passkey-gate--page .passkey-gate__title {
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 700;
  color: var(--bleu-1);
  margin-bottom: 12px;
}

.passkey-gate__lead {
  font-size: 0.92rem;
  color: var(--gris-texte);
  margin: 0 0 14px;
  line-height: 1.5;
}

.passkey-gate--page .passkey-gate__lead {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.passkey-gate__status {
  font-size: 0.88rem;
  margin: 0 0 12px;
  color: var(--noir);
}

.passkey-gate--page .passkey-gate__status {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 3px;
  border: 1px solid var(--bleu-2-bordure);
  border-left: 3px solid var(--bleu-1);
  background: color-mix(in srgb, var(--bleu-2) 45%, var(--blanc));
  font-size: 0.88rem;
  line-height: 1.45;
}

html.dark .passkey-gate--page .passkey-gate__status {
  background: color-mix(in srgb, var(--bleu-2) 55%, transparent);
}

.passkey-feedback {
  min-height: 1.25rem;
  font-size: 0.85rem;
  margin: 0 0 12px;
  color: var(--bleu-1);
}

.passkey-feedback:empty {
  display: none;
}

.passkey-feedback--error {
  color: #c0392b;
}

.passkey-gate--page .passkey-feedback:not(:empty) {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--bleu-1) 25%, var(--bleu-2-bordure));
  background: color-mix(in srgb, var(--bleu-2) 40%, transparent);
}

.passkey-gate--page .passkey-feedback--error {
  border-color: color-mix(in srgb, #c0392b 35%, var(--bleu-2-bordure));
  background: color-mix(in srgb, #c0392b 8%, var(--blanc));
}

.passkey-gate__actions {
  margin-top: 8px;
}

.passkey-gate__btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.passkey-gate__hint {
  font-size: 0.8rem;
  color: var(--gris-texte);
  margin: 10px 0 0;
  text-align: center;
  line-height: 1.45;
}

.passkey-gate__hint--left,
.passkey-gate--page .passkey-gate__hint {
  text-align: left;
}

.passkey-gate__hint code {
  font-size: 0.78rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bleu-2) 55%, transparent);
  border: 1px solid var(--bleu-2-bordure);
  color: var(--noir);
}

.passkey-logout-btn {
  font-size: 0.85rem;
}

.passkey-mobile-hint {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--noir);
}

.passkey-gate__actions--primary .passkey-gate__btn {
  font-size: 1rem;
}

.passkey-gate__actions--secondary .passkey-gate__btn {
  background: var(--blanc);
  color: var(--bleu-1);
  border: 2px solid var(--bleu-1);
}

.passkey-gate__actions--pulse {
  animation: passkey-pulse 0.9s ease-in-out 2;
}

.magic-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gris-texte);
  margin: 10px 0 4px;
}

.magic-form input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--bleu-2-bordure);
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--blanc);
  color: var(--noir);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.magic-form input[type="text"]:focus {
  outline: none;
  border-color: var(--bleu-1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bleu-2) 80%, transparent);
}

.magic-form .passkey-gate__btn {
  margin-top: 14px;
}

.magic-steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--gris-texte);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.magic-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.magic-steps__n {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bleu-1);
  background: color-mix(in srgb, var(--bleu-2) 65%, transparent);
  border: 1px solid var(--bleu-2-bordure);
}

.magic-oauth-block {
  margin: 4px 0 8px;
}

.magic-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  font-size: 0.98rem;
  border-radius: 8px;
}

.magic-oauth-btn i {
  font-size: 1.15rem;
}

.magic-alt-method {
  margin-top: 20px;
  border-top: 1px solid var(--bleu-2-bordure);
  padding-top: 12px;
}

.passkey-gate--page .magic-alt-method {
  margin-top: 22px;
  padding: 0;
  border: 1px solid var(--bleu-2-bordure);
  border-radius: 3px;
  background: color-mix(in srgb, var(--gris) 55%, var(--blanc));
  overflow: hidden;
}

html.dark .passkey-gate--page .magic-alt-method {
  background: color-mix(in srgb, var(--bleu-2) 35%, transparent);
}

.magic-alt-method summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gris-texte);
  list-style: none;
}

.magic-alt-method summary::-webkit-details-marker {
  display: none;
}

.passkey-gate--page .magic-alt-method summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--noir);
  transition: background 0.15s ease;
}

.passkey-gate--page .magic-alt-method summary:hover {
  background: color-mix(in srgb, var(--bleu-2) 40%, transparent);
}

.magic-alt-method__summary-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.magic-alt-method__summary-label i {
  color: var(--bleu-1);
  width: 1.1rem;
  text-align: center;
}

.magic-alt-method__chevron {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--gris-texte);
  transition: transform 0.2s ease;
}

.magic-alt-method[open] .magic-alt-method__chevron {
  transform: rotate(180deg);
}

.magic-alt-method__body {
  padding: 0 14px 16px;
  border-top: 1px solid var(--bleu-2-bordure);
}

.magic-alt-method__intro {
  margin-top: 10px;
}

.passkey-gate--page .magic-alt-method__intro {
  margin-top: 12px;
  margin-bottom: 4px;
}

@keyframes passkey-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
}

@media (max-width: 520px) {
  .passkey-gate--page {
    padding: 64px 14px 28px;
    align-items: flex-start;
  }

  .passkey-gate--page .passkey-gate__panel {
    padding: 24px 18px 20px;
  }

  .passkey-gate__logo img {
    height: 32px;
  }
}

/* Honeypot anti-bot (champ invisible pour les humains) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* GA4 HD table preview + Discord button mock */
.discord-msg__text--md {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.discord-msg__text--md p {
  margin: 0 0 0.45em;
}

.discord-msg__text--md p:last-child {
  margin-bottom: 0;
}

.discord-msg__actions {
  margin-top: 8px;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 2px 16px;
  border: none;
  border-radius: 3px;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: default;
}

.discord-btn:disabled {
  opacity: 1;
}

.ga4-table-preview {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
  background: #fff;
  font-size: 0.8125rem;
}

.ga4-table-preview__title {
  padding: 10px 14px;
  font-weight: 600;
  color: #1a1d21;
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
}

.ga4-table-preview__table {
  width: 100%;
  border-collapse: collapse;
}

.ga4-table-preview__table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #0b1120;
}

.ga4-table-preview__table td {
  padding: 12px 16px;
  color: #1a1d21;
  border-bottom: 1px solid #e8ecf0;
}

.ga4-table-preview__table tbody tr:nth-child(even) {
  background: #dbe8ff;
}

.ga4-table-preview__table tbody tr:nth-child(odd) {
  background: #fff;
}

.ga4-table-preview__table tbody tr:last-child td {
  border-bottom: none;
}

.ga4-table-preview--in-discord {
  max-width: 360px;
}

.discord-media--generated .ga4-table-preview--in-discord {
  border-color: rgba(0, 0, 0, 0.08);
}

html.dark .ga4-table-preview {
  border-color: rgba(255, 255, 255, 0.12);
  background: #1e1f22;
}

html.dark .ga4-table-preview__title {
  color: #dbdee1;
  background: #1e1f22;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.dark .ga4-table-preview__table td {
  color: #dbdee1;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.dark .ga4-table-preview__table tbody tr:nth-child(even) {
  background: rgba(219, 232, 255, 0.12);
}

html.dark .ga4-table-preview__table tbody tr:nth-child(odd) {
  background: #1e1f22;
}

.tuto-steps {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.tuto-steps li {
  margin-bottom: 0.35rem;
}

.tuto-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--gris-texte);
}

.drive-folder-map {
  margin: 16px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
}

.drive-folder-map__root {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--noir);
}

.drive-folder-map__muted {
  color: var(--gris-texte);
  font-weight: 500;
  font-size: 0.9em;
}

.drive-folder-map__icon {
  color: #f4b400;
  width: 1.1em;
  text-align: center;
  flex-shrink: 0;
}

.drive-folder-map__icon--out {
  color: #34a853;
}

.drive-folder-map__tree,
.drive-folder-map__tree ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.15rem;
  border-left: 1px solid var(--bleu-2-bordure);
}

.drive-folder-map__tree {
  padding-left: 0.85rem;
}

.drive-folder-map__tree > li {
  margin-bottom: 14px;
}

.drive-folder-map__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  color: var(--noir);
  line-height: 1.35;
}

.drive-folder-map__row--example {
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bleu-2) 55%, transparent);
}

.drive-folder-map__desc {
  display: block;
  margin-top: 3px;
  font-size: 0.88rem;
  color: var(--gris-texte);
  font-weight: 400;
}

.drive-folder-map__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bleu-2);
  color: var(--bleu-1);
  vertical-align: middle;
}

html.dark .drive-folder-map {
  background: var(--color-surface);
}

html.dark .drive-folder-map__row--example {
  background: rgba(219, 232, 255, 0.06);
}

#tuto-drive code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--bleu-2);
  padding: 2px 6px;
}

html.dark #tuto-drive code {
  background: var(--bleu-2);
  color: var(--noir);
}

.section-heading--small {
  font-size: 1rem;
  margin-top: 1.25rem;
}

/* —— Updates (changelog) —— */
.version-tag {
  display: inline-flex;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border: 1px solid var(--bleu-2-bordure);
  background: var(--bleu-2);
  color: var(--bleu-1);
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-updates-btn,
.sidebar-updates-btn {
  gap: 10px;
  min-height: 40px;
}

.topbar-updates-btn {
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

.topbar-updates-btn .version-tag {
  padding: 2px 7px;
  line-height: 1.2;
  font-size: 0.7rem;
}

.topbar-updates-btn__label,
.sidebar-updates-btn__label {
  font-size: var(--fs-subtitle-xs);
  font-weight: 700;
  line-height: 1;
}

.sidebar-updates-btn__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}

.sidebar-updates-btn__latest {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--gris-texte);
  max-width: 100%;
  white-space: normal;
}

.sidebar-updates-btn:hover .sidebar-updates-btn__latest {
  color: inherit;
}

.topbar-updates-btn.is-active,
.sidebar-updates-btn.is-active {
  background: var(--bleu-2);
  color: var(--bleu-1);
}

.updates-page-header {
  margin-bottom: 28px;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.updates-empty {
  margin: 8px 0 0;
  color: var(--gris-texte);
  font-size: 0.95rem;
}

.update-card {
  border: 1px solid var(--bleu-2-bordure);
  background: var(--blanc);
  padding: 22px 24px 20px;
}

.update-card--latest {
  border-color: var(--bleu-1);
  box-shadow: inset 3px 0 0 var(--bleu-1);
}

.update-card__header {
  margin-bottom: 14px;
}

.update-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.update-card__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bleu-1);
  background: var(--bleu-2);
  padding: 3px 8px;
}

.update-card__date {
  font-size: 0.82rem;
  color: var(--gris-texte);
}

.update-card__title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--noir);
  line-height: 1.25;
}

.update-card__summary {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gris-texte);
  line-height: 1.45;
}

.update-card__highlights {
  margin: 0 0 14px;
  padding: 0 0 0 1.15rem;
}

.update-card__highlights li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--noir);
}

.update-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
}

.update-card__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bleu-1);
  text-decoration: none;
}

.update-card__links a:hover {
  text-decoration: underline;
}

html.dark .update-card--latest {
  border-color: #dbe8ff;
  box-shadow: inset 3px 0 0 #dbe8ff;
}

html.dark .update-card__badge {
  color: #01123c;
  background: #dbe8ff;
}

html.dark .version-tag {
  background: #1a2338;
  color: #dbe8ff;
  border-color: #343434;
}

@media (max-width: 1024px) {
  .topbar-updates-btn {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .update-card {
    padding: 18px 16px 16px;
  }
}

/* ——— Dashboard tickets (admin) ——— */
.tickets-page-header__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tickets-page-header__actions .btn-ghost-ae,
.tickets-page-header__actions .btn-primary-ae {
  border-radius: 0;
}

.tdash-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 22px;
}

.tdash-kpi {
  background: var(--blanc);
  border: 1px solid var(--bleu-2-bordure);
  border-left: 4px solid var(--bleu-1);
  padding: 14px 16px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tdash-kpi__label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gris-texte);
}

.tdash-kpi__value {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--bleu-1);
  line-height: 1.15;
}

.tdash-kpi__hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--gris-texte);
}

.tdash-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.tdash-card {
  background: var(--blanc);
  border: 1px solid var(--bleu-2-bordure);
  border-radius: 3px;
  padding: 16px 18px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tdash-card--wide {
  grid-column: 1 / -1;
}

.tdash-card--table {
  margin-bottom: 24px;
}

.tdash-card__title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bleu-1);
}

.tdash-chart-wrap {
  position: relative;
  height: 220px;
}

.tdash-chart-wrap--square {
  height: 240px;
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .tdash-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tdash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tdash-charts {
    grid-template-columns: 1fr;
  }

  .tickets-page-header__actions {
    width: 100%;
  }

  .tickets-page-header__actions .btn-ghost-ae,
  .tickets-page-header__actions .btn-primary-ae {
    flex: 1;
    justify-content: center;
  }
}


