/* =========================================================
   MIZAN — Documentation (Style Unifié)
   Styles communs à toutes les pages de documentation
   ========================================================= */

/* ---------------------------------------------------------
   Base & Typographie
   --------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--paper);
  font-size: 14px;
}

.doc-topbar {
  font-size: 12.5px;
  opacity: 0.85;
}

.doc-footer-copy {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12.5px;
}

/* ---------------------------------------------------------
   Hero documentation
   --------------------------------------------------------- */

.documentation-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: #fff;
  padding: 72px 0 68px;
}

.documentation-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76' viewBox='0 0 76 76'%3E%3Cg stroke='%23ffc300' stroke-width='0.7' fill='none'%3E%3Crect x='22' y='22' width='32' height='32'/%3E%3Crect x='22' y='22' width='32' height='32' transform='rotate(45 38 38)'/%3E%3Ccircle cx='38' cy='38' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.documentation-hero .container {
  position: relative;
  z-index: 1;
}

.documentation-hero h1 {
  margin: 0 0 12px;
  color: #fff;
  font-family: "El Messiri", sans-serif;
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 700;
}

.documentation-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.9;
}

/* ---------------------------------------------------------
   Kicker
   --------------------------------------------------------- */

.doc-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.doc-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

[dir="rtl"] .doc-kicker::before {
  order: 2;
}

/* ---------------------------------------------------------
   Conteneur principal
   --------------------------------------------------------- */

.documentation-wrap {
  padding: 52px 0 80px;
}

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */

.doc-sidebar {
  position: sticky;
  top: 100px;
}

.doc-sidebar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(29, 56, 133, 0.04);
}

.doc-sidebar-title {
  padding: 16px 18px;
  color: var(--navy);
  font-family: "El Messiri", sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.doc-sidebar ul {
  list-style: none;
  padding: 10px;
  margin: 0;
}

.doc-sidebar a {
  display: block;
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 8px;
  color: var(--stone);
  font-size: 13px;
  text-decoration: none;
  transition: 0.2s ease;
}

.doc-sidebar a:hover {
  color: var(--navy);
  background: var(--paper);
}

.doc-sidebar a.active {
  color: var(--navy);
  background: rgba(30, 58, 138, 0.06);
  font-weight: 700;
  border-inline-start: 3px solid var(--gold);
}

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */

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

.doc-section:last-child {
  margin-bottom: 0;
}

.doc-section .sec-title {
  margin-bottom: 12px;
}

.doc-section p {
  color: var(--stone);
  font-size: 14px;
  line-height: 1.95;
}

/* ---------------------------------------------------------
   Introduction & Cards
   --------------------------------------------------------- */

.doc-intro {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(29, 56, 133, 0.035);
}

.doc-intro p:last-child {
  margin-bottom: 0;
}

.doc-module-card {
  height: 100%;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(29, 56, 133, 0.035);
  transition: 0.2s ease;
}

.doc-module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 58, 138, 0.2);
  box-shadow: 0 12px 30px rgba(29, 56, 133, 0.08);
}

.doc-module-number {
  flex: 0 0 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--navy-deep);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.doc-module-card h3 {
  color: var(--navy);
  font-family: "El Messiri", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 7px;
}

.doc-module-card p {
  margin: 0 0 12px;
}

.doc-module-card span {
  color: var(--gold-deep);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------------------------------------------------------
   Sous-titres & Listes
   --------------------------------------------------------- */

.doc-subtitle {
  color: var(--navy);
  font-family: "El Messiri", sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin: 28px 0 12px;
}

.transition-group .doc-subtitle {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
}

.doc-list {
  margin: 12px 0 20px;
  padding-inline-start: 22px;
}

.doc-list li {
  color: var(--stone);
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 5px;
}

.doc-list li::marker {
  color: var(--gold-deep);
}

/* ---------------------------------------------------------
   Required / Information Boxes
   --------------------------------------------------------- */

.required-box,
.no-required-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 18px 0 22px;
}

.required-box-header {
  padding: 13px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-line);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.required-box ul,
.no-required-box ul {
  list-style: none;
  padding: 10px 18px 12px;
  margin: 0;
}

.required-box li,
.no-required-box li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--stone);
  font-size: 14px;
}

.required-box li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--gold-deep);
  font-weight: 700;
}

/* ---------------------------------------------------------
   Statuts & Cartes
   --------------------------------------------------------- */

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.status-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.status-card h3,
.status-card-head strong {
  color: var(--navy);
  font-family: "El Messiri", sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.status-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-inline-end: 7px;
  border-radius: 50%;
  background: var(--navy);
}

.status-card:nth-child(2) .status-dot {
  background: var(--gold);
}
.status-card:nth-child(3) .status-dot {
  background: #9aa3b5;
}
.status-card:nth-child(4) .status-dot {
  background: var(--navy-deep);
}
.status-card:nth-child(5) .status-dot {
  background: #596579;
}
.status-card:nth-child(6) .status-dot {
  background: #b0b6c2;
}

/* ---------------------------------------------------------
   Transitions de Statuts
   --------------------------------------------------------- */

.transition-group {
  width: 100%;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.transition-group:last-of-type {
  border-bottom: none;
}

.transition-box {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 22px 0;
}

.transition-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 44px minmax(190px, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
}

.transition-row:last-child {
  margin-bottom: 0;
}

.transition-row .status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
}

.status-pill.active {
  border-color: var(--gold);
  background: rgba(255, 195, 0, 0.12);
}

.transition-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  color: var(--gold-deep);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

/* ---------------------------------------------------------
   Notes & Résumé
   --------------------------------------------------------- */

.doc-note {
  padding: 16px 18px;
  margin: 20px 0;
  background: rgba(255, 195, 0, 0.08);
  border-inline-start: 3px solid var(--gold);
  border-radius: 9px;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.8;
}

.doc-note strong,
.doc-note i {
  color: var(--navy);
}

.doc-summary {
  background: var(--navy-deep);
  border-radius: 14px;
  padding: 24px;
  color: #fff;
}

.doc-summary h3 {
  color: #fff;
  font-family: "El Messiri", sans-serif;
  font-size: 19px;
  margin-bottom: 12px;
}

.doc-summary ul {
  margin: 0;
  padding-inline-start: 20px;
}

.doc-summary li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 4px;
}

.doc-summary li::marker {
  color: var(--gold);
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* ---------------------------------------------------------
   Captures d'écran de l'application
   --------------------------------------------------------- */

.doc-screenshot {
  margin: 22px 0 28px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(29, 56, 133, 0.06);
}

.doc-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-screenshot figcaption {
  margin-top: 10px;
  color: var(--stone);
  font-size: 12.5px;
  text-align: center;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 991px) {
  .doc-sidebar {
    position: static;
    margin-bottom: 30px;
  }

  .doc-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }

  .doc-sidebar a {
    padding: 7px 10px;
  }
}

@media (max-width: 767px) {
  .documentation-hero {
    padding: 52px 0;
  }

  .documentation-wrap {
    padding-top: 32px;
  }

  .status-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .doc-module-card {
    padding: 20px;
  }

  .transition-row {
    grid-template-columns: minmax(120px, 1fr) 32px minmax(120px, 1fr);
    gap: 8px;
  }

  .transition-arrow {
    width: 32px;
    min-width: 32px;
  }

  .transition-row .status-pill {
    min-height: 36px;
    font-size: 12px;
  }
}
