/* =========================================================
   Atelier Tomette Marseille — Docs Architecture Shell
   Palette strictly locked to:
   - Content: #FFFFFF
   - Sidebar: #E8EEF8
   - Ink:     #111827
   - Link:    #1D4ED8
   Fonts: 'Inter' UI, 'IBM Plex Mono' on labels only
   ========================================================= */

:root {
  --color-content: #FFFFFF;
  --color-sidebar: #E8EEF8;
  --color-ink: #111827;
  --color-link: #1D4ED8;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-content);
  color: var(--color-ink);
  font-family: var(--font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--color-content);
  color: var(--color-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Monospace label class exclusively for field headers / markers */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-link);
}

/* Top Navigation Bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-content);
  border-bottom: 1px solid #11182720;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
}

.top-bar-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-badge {
  background-color: var(--color-ink);
  color: var(--color-content);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.brand-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-ink);
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #11182780;
}

.top-bar-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.meta-address {
  color: #11182790;
}

.phone-link {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 600;
}

.phone-link:hover {
  text-decoration: underline;
}

/* Two Column Shell */
.docs-shell {
  display: flex;
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Left Sticky TOC Sidebar */
.sidebar-toc {
  width: 280px;
  flex-shrink: 0;
  background-color: var(--color-sidebar);
  border-right: 1px solid #11182715;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.desktop-toc-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.toc-header {
  margin-bottom: 1.25rem;
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #11182775;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  color: var(--color-ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toc-link .toc-step {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #11182770;
}

.toc-link:hover {
  background-color: #1118270d;
  color: var(--color-link);
}

.toc-link.active {
  background-color: var(--color-content);
  color: var(--color-link);
  font-weight: 600;
  border-left: 3px solid var(--color-link);
}

.toc-footer-info {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid #11182715;
}

.toc-note {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #11182785;
}

.mobile-toc-details {
  display: none;
}

/* Right Content Column */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 3rem 4rem 4rem 4rem;
  background-color: var(--color-content);
}

.doc-section {
  padding-bottom: 3.5rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid #11182715;
}

.badge-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background-color: #1118270a;
  border: 1px solid #11182720;
  color: var(--color-ink);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.geo-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background-color: #1D4ED815;
  border: 1px solid #1D4ED830;
  color: var(--color-link);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.section-h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  color: var(--color-ink);
}

.lead-text {
  font-size: 1.08rem;
  line-height: 1.65;
  color: #111827cc;
  max-width: 780px;
  margin-bottom: 1.75rem;
}

.info-callout {
  border-left: 4px solid var(--color-link);
  background-color: var(--color-sidebar);
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  max-width: 780px;
}

.callout-indicator {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-link);
  margin-bottom: 0.35rem;
}

.callout-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-ink);
}

.section-h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
  color: var(--color-ink);
}

.sec-index {
  color: var(--color-link);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  margin-right: 0.3rem;
}

.section-sub {
  font-size: 0.95rem;
  color: #11182785;
  margin-bottom: 2rem;
}

/* Definition Lists for Services */
.definition-block-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 820px;
}

.def-item {
  border: 1px solid #1118271a;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-content);
  transition: border-color 0.15s ease;
}

.def-item:hover {
  border-color: var(--color-link);
}

.def-term {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.def-desc {
  font-size: 0.92rem;
  color: #111827ba;
  line-height: 1.55;
}

/* Process List (Ordered Steps) */
.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 820px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  border: 1px solid #11182718;
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  background-color: #ffffff;
}

.step-badge {
  padding-top: 0.15rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}

.step-desc {
  font-size: 0.9rem;
  color: #111827b3;
  line-height: 1.5;
}

/* Table Card */
.table-card {
  border: 1px solid #1118271a;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 2rem;
  max-width: 820px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.specs-table th {
  background-color: var(--color-sidebar);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #11182718;
}

.specs-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #11182710;
  color: #111827cf;
}

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

.cell-strong {
  font-weight: 600;
  color: var(--color-ink);
}

.cell-mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-link);
}

/* Compact QA Grid */
.compact-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 820px;
}

.qa-item {
  border-left: 2px solid #11182725;
  padding-left: 1rem;
}

.qa-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}

.qa-answer {
  font-size: 0.88rem;
  color: #111827ab;
  line-height: 1.45;
}

/* Contact Form and Details */
.contact-box {
  max-width: 820px;
}

.docs-form {
  border: 1px solid #1118271a;
  padding: 1.75rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  background-color: #FFFFFF;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field.full-width {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #11182725;
  border-radius: 3px;
  color: var(--color-ink);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-link);
  box-shadow: 0 0 0 1px var(--color-link);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.submit-btn {
  background-color: var(--color-link);
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.submit-btn:hover {
  opacity: 0.92;
}

.form-status-msg {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-link);
}

/* Coordinates Card */
.workshop-coordinates {
  border: 1px solid #11182715;
  background-color: var(--color-sidebar);
  padding: 1.5rem;
  border-radius: 4px;
}

.coord-header {
  margin-bottom: 1rem;
}

.coord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.coord-link {
  color: var(--color-link);
  font-weight: 600;
  text-decoration: none;
}

.coord-link:hover {
  text-decoration: underline;
}

.social-links-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.social-anchor {
  color: var(--color-link);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.social-anchor:hover {
  text-decoration: underline;
}

.social-sep {
  color: #11182740;
  font-size: 0.8rem;
}

/* Footer */
.docs-footer {
  padding-top: 1rem;
  font-size: 0.82rem;
  color: #1118277a;
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.legal-link {
  color: var(--color-link);
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

.bullet-sep {
  color: #11182740;
}

/* Privacy Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(17, 24, 39, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-window {
  background-color: var(--color-content);
  border: 1px solid #11182725;
  border-radius: 4px;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #11182715;
  padding-bottom: 0.75rem;
}

.modal-h3 {
  font-size: 1.2rem;
  color: var(--color-ink);
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #11182780;
  cursor: pointer;
}

.modal-body {
  font-size: 0.88rem;
  color: #111827d0;
  line-height: 1.6;
}

.modal-body h4 {
  color: var(--color-ink);
  font-size: 0.95rem;
  margin: 1.15rem 0 0.35rem 0;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-footer {
  margin-top: 1.75rem;
  border-top: 1px solid #11182715;
  padding-top: 1rem;
  text-align: right;
}

.btn-close-modal {
  background-color: var(--color-sidebar);
  border: 1px solid #11182725;
  color: var(--color-ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  cursor: pointer;
}

.btn-close-modal:hover {
  background-color: #11182710;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .docs-shell {
    flex-direction: column;
  }

  .sidebar-toc {
    position: sticky;
    top: 52px;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #11182715;
    padding: 0.75rem 1.25rem;
    z-index: 40;
  }

  .desktop-toc-wrapper {
    display: none;
  }

  .mobile-toc-details {
    display: block;
  }

  .mobile-toc-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-ink);
    cursor: pointer;
    list-style: none;
  }

  .mobile-toc-summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav-list {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .mobile-nav-list .toc-link {
    background-color: var(--color-content);
    border: 1px solid #11182718;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
  }

  .docs-content {
    padding: 2rem 1.25rem 3rem 1.25rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-bar-meta .meta-address {
    display: none;
  }
  
  .section-h1 {
    font-size: 1.65rem;
  }
}
