/* ─── DamsAlgo – Documentation CSS ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:       #0a0e17;
  --bg2:      #0f1523;
  --card:     #141b2d;
  --border:   rgba(255,255,255,.07);
  --accent:   #4f8ef7;
  --accent2:  #3b7ae6;
  --text:     #e2e8f0;
  --muted:    #7a8599;
  --warn:     #f59e0b;
  --danger:   #ef4444;
  --info:     #60a5fa;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* ─── LAYOUT ─── */
.doc-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: 2.5rem;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--muted); }

/* ─── DOC LANG SWITCHER ─── */
.doc-lang-dropdown { position: relative; }
.doc-lang-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: .3rem .65rem;
  cursor: pointer;
  color: var(--text);
  font-size: .8rem;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color .15s;
}
.doc-lang-btn:hover { border-color: var(--accent); }
.lang-flag-img { width: 16px; height: 11px; border-radius: 2px; object-fit: cover; }
.lang-arrow { font-size: .65rem; color: var(--muted); }
.doc-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .5rem;
  overflow: hidden;
  min-width: 140px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.doc-lang-dropdown.open .doc-lang-menu { display: block; }
.doc-lang-option {
  padding: .55rem 1rem;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text);
  transition: background .12s;
}
.doc-lang-option:hover { background: rgba(255,255,255,.05); }
.doc-lang-option.active { color: var(--accent); font-weight: 600; }

/* ─── HEADER ─── */
.doc-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}
.doc-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.badge-strategies { background: rgba(99,102,241,.2); color: #818cf8; border: 1px solid rgba(99,102,241,.3); }
.badge-grid       { background: rgba(249,115,22,.2);  color: #fb923c; border: 1px solid rgba(249,115,22,.3); }
.badge-risk       { background: rgba(239,68,68,.2);   color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.badge-news       { background: rgba(234,179,8,.2);   color: #facc15; border: 1px solid rgba(234,179,8,.3); }
.badge-tools      { background: rgba(20,184,166,.2);  color: #2dd4bf; border: 1px solid rgba(20,184,166,.3); }

.doc-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}
.doc-header .subtitle {
  color: var(--muted);
  font-size: 1rem;
}

/* ─── SECTION TITLES ─── */
h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  border-radius: 99px;
}

/* ─── PARAM TABLE ─── */
.param-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.param-table thead th {
  background: var(--card);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.param-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.param-table tbody tr:hover { background: rgba(255,255,255,.03); }
.param-table tbody td {
  padding: .75rem 1rem;
  vertical-align: top;
}
.param-name {
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  color: #a5f3fc;
  white-space: nowrap;
}
.param-default {
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  color: var(--accent);
  white-space: nowrap;
}
.param-desc { color: var(--text); }

/* ─── CALLOUT BOXES ─── */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  margin: 1.25rem 0;
  font-size: .9rem;
  border: 1px solid;
}
/* Emojis d'icone masques le 16/11/2026 : la couleur de l'encadre suffit. */
.callout-icon { display: none; }
.callout.tip    { background: rgba(79,142,247,.08); border-color: rgba(79,142,247,.25); color: #a7f3d0; }
.callout.warn   { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); color: #fde68a; }
.callout.danger { background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.25);  color: #fca5a5; }
.callout.info   { background: rgba(96,165,250,.08); border-color: rgba(96,165,250,.25); color: #bfdbfe; }

/* ─── DESCRIPTION BLOCK ─── */
.desc-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.desc-block p { margin-bottom: .5rem; }
.desc-block p:last-child { margin-bottom: 0; color: var(--muted); }

/* ─── INFO GRID (timeframe / paires recommandées) ─── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  margin: 1rem 0 1.5rem;
}
.info-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .6rem;
  padding: .85rem 1rem;
}
.info-item .label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .25rem;
}
.info-item .value {
  font-weight: 600;
  color: #fff;
  font-size: .95rem;
}

/* ─── SECTION SEPARATOR ─── */
.section-sep {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: .25rem .75rem;
  border-radius: 99px;
  margin: 1.5rem 0 .75rem;
}

/* ─── SCREENSHOTS ─── */
.screenshots {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1rem 0;
}
.screenshot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  overflow: hidden;
}
.screenshot img {
  width: 100%;
  display: block;
}
.screenshot figcaption {
  padding: .65rem 1rem;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ─── FOOTER ─── */
.doc-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}
.doc-footer a { color: var(--accent); text-decoration: none; }

/* ─── FILM (tools/films/publier.py) ─── */
.film { margin: 1.2rem 0 .8rem; }
.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0e17;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.film figcaption { margin-top: .55rem; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.film-credit { display: block; }
.film-credit a { color: var(--muted); }
.film-texte {
  margin: 0 0 2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.film-texte summary { cursor: pointer; padding: .7rem 1rem; color: var(--accent); font-weight: 600; font-size: .9rem; }
.film-texte div { padding: 0 1rem .6rem; }
.film-texte p { margin: 0 0 .5rem; color: var(--text); }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .doc-header h1 { font-size: 1.5rem; }
  .param-table { font-size: .82rem; }
  .param-table thead th,
  .param-table tbody td { padding: .55rem .6rem; }
  .param-name, .param-default { white-space: normal; }
}

/* ─── Lignes du journal (21/11/2026) ─── */
.doc-wrap pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem 1rem;
  margin: .6rem 0 1.4rem;
  overflow-x: auto;
  font-size: .8rem;
  line-height: 1.6;
}
