/* Shared CAPIT Design System & Forum Console / Landing Styles */
:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182c3a;
  background: #ffffff;
  --accent: #116b72;
  --accent-hover: #0b565d;
  --accent-soft: #e7f3f2;
  --border: #dce5e8;
  --surface: #f5f7fa;
  --muted: #526774;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #182c3a; line-height: 1.55; }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #6bb4c5;
  outline-offset: 2px;
}

/* Official CAPIT Header with Horizontal Service Pills + Member Icon left of Flag Menu */
.console-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1168px) / 2));
  background: #f5f7fa;
  border-bottom: 1px solid #e5ebef;
  position: relative;
  z-index: 30;
  flex-wrap: wrap;
}
#capitHome {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
#capitHome img {
  display: block;
  width: 94px;
  height: auto;
}

/* Service Pills (Chat, Chatbot, Forum, Médias, Cartes — without Accueil) */
.capit-service-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px;
  background: #eaf0f4;
  border-radius: 999px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.capit-service-pills::-webkit-scrollbar { display: none; }
.capit-service-pills a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #304c5c;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.capit-service-pills a:hover {
  background: #dce7ed;
  color: #182c3a;
}
.capit-service-pills a[aria-current="page"],
.capit-service-pills a[aria-current="true"] {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(17, 107, 114, 0.22);
}

/* Forum Sub-navigation */
.forum-navigation {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.forum-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: #304c5c;
  text-decoration: none;
  white-space: nowrap;
}
.forum-navigation a:hover { background: #eef3f7; }
.forum-navigation a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

/* Member area immediately to the LEFT of the language selector at top right */
.capit-account {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}
.capit-account-login,
.capit-account-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 0;
  cursor: pointer;
  list-style: none;
  background: #e9eff3 url('member-icon.svg') center / 22px 22px no-repeat;
}
.capit-account-menu > summary::-webkit-details-marker { display: none; }
.capit-account-login:hover,
.capit-account-menu > summary:hover { background-color: #dce8ec; }
.capit-account-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 264px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  background: #fff;
  border: 1px solid #e0e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(24, 44, 58, 0.14);
  z-index: 50;
}
#account {
  margin: 0 0 6px;
  padding: 8px 12px 12px;
  border-bottom: 1px solid #e5ebef;
  font-size: 14px;
  font-weight: 650;
  color: #182c3a;
  overflow-wrap: anywhere;
}
.capit-account-menu > div > a,
.capit-account-menu .member-logout {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  color: #304c5c;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.capit-account-menu > div > a:hover,
.capit-account-menu .member-logout:hover { background: #eef4f6; }
.capit-account-menu .member-logout { color: #704144; margin-top: 4px; border-top: 1px solid #edf2f5; }

/* Flag Language Selector (immediately after .capit-account) */
.language-menu {
  position: relative;
  margin-left: 0;
  font-size: 14px;
  flex: 0 0 auto;
}
.language-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #e9eff3;
  cursor: pointer;
  list-style: none;
  color: #304c5c;
  font-weight: 600;
}
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary span:first-child { font-size: 21px; line-height: 1; }
.language-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  display: grid;
  width: 196px;
  padding: 6px;
  margin: 0;
  background: #fff;
  border: 1px solid #dce5e8;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(25, 57, 76, 0.16);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  gap: 2px;
}
.language-menu nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  text-decoration: none;
  color: #304c5c;
  border-radius: 7px;
  font-weight: 500;
}
.language-menu nav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.language-menu nav a:hover { background: #eef3f7; }
.language-menu nav a span { font-size: 20px; }

/* Main Container & Typography */
main {
  max-width: 1168px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}
h1 { font-size: clamp(28px, 3.8vw, 46px); line-height: 1.1; letter-spacing: -0.04em; margin: 0 0 18px; font-weight: 740; }
h2 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.25; letter-spacing: -0.025em; margin: 0 0 14px; }
h3 { font-size: 1.1rem; margin: 18px 0 10px; }
.home-kicker, .eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

/* Buttons & Inputs */
button, a.primary, a.secondary-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #bdced4;
  border-radius: 10px;
  background: #fff;
  color: #182c3a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, a.secondary-btn:hover { background: #eff5f7; }
button:disabled { opacity: 0.58; cursor: not-allowed; }
.primary {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}
.primary:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

/* Commercial Landing Page */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
  gap: 48px;
  align-items: center;
  padding: 12px 0 40px;
}
.home-intro {
  font-size: 18px;
  line-height: 1.68;
  color: var(--muted);
  max-width: 680px;
  margin: 0;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}
.home-free {
  background: #e6f2f1;
  border: 1px solid #cee3e1;
  border-radius: 20px;
  padding: 28px;
}
.home-five {
  display: block;
  font-size: 80px;
  font-weight: 760;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.06em;
}
.home-free h2 { font-size: 21px; margin: 16px 0 10px; }
.home-free p { font-size: 14px; color: #3d5863; line-height: 1.65; margin: 0 0 14px; }
.home-free > a { font-size: 14px; font-weight: 650; text-underline-offset: 4px; }

.home-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 16px 0 48px;
}
.home-features li {
  padding: 24px;
  background: #fff;
  border: 1px solid #e0e7ec;
  border-radius: 16px;
}
.feature-number {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 750;
}
.home-features h3 { margin: 10px 0 8px; font-size: 18px; }
.home-features p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.home-demo-section, .home-pricing-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid #e3ebef;
}
.demo-host-frame {
  margin-top: 22px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(24, 44, 58, 0.08);
}
.pricing-grid, .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.card, .panel-box {
  background: #fff;
  padding: 24px;
  border: 1px solid #dce5e8;
  border-radius: 16px;
}
.card.featured {
  border: 2px solid var(--accent);
  background: #f8fcfb;
}
.card strong.price-tag {
  display: block;
  font-size: 28px;
  color: var(--accent);
  margin: 8px 0 12px;
  letter-spacing: -0.03em;
}
.home-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  max-width: 1168px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid #dfe7ec;
  font-size: 13px;
  color: var(--muted);
}

/* Webmaster Console Layout */
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.badge-plan {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}
.alert-banner {
  padding: 16px 20px;
  border-radius: 12px;
  background: #fff8eb;
  border: 1px solid #f2cf8d;
  color: #6e470b;
  margin: 16px 0;
  font-size: 14px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.editor-nav {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.editor-nav button {
  justify-content: flex-start;
  text-align: left;
  font-weight: 550;
  border-color: transparent;
  background: #f5f8fa;
}
.editor-nav button[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 650;
}
.panel-section {
  background: #fff;
  padding: 26px;
  border: 1px solid #dce5e8;
  border-radius: 16px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 16px 0;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 550;
  color: #243b47;
}
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #bdced4;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: #182c3a;
  background: #fff;
}
input[type="color"] { height: 44px; padding: 4px; }
input[type="checkbox"] { width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #eef3f6;
  border: 1px solid #d8e3e8;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.channel-row, .sonnet-msg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e0e8ec;
  border-radius: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.sonnet-msg { flex-direction: column; align-items: stretch; background: #f9fbfc; }
.sonnet-gauge {
  height: 10px;
  background: #e4ecef;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 14px;
}
.sonnet-gauge > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}
.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
}
#notice:not(:empty) {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 20px;
  background: #182c3a;
  color: #fff;
  border-radius: 10px;
  z-index: 80;
  max-width: 92vw;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 980px) {
  .console-header { height: auto; padding: 12px 16px; gap: 10px; }
  .capit-service-pills { order: 4; flex: 1 1 100%; }
  .forum-navigation { order: 5; flex: 1 1 100%; border-top: 1px solid #e5ebef; padding-top: 8px; overflow-x: auto; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .editor-nav button { flex: 1 1 140px; }
}
@media (max-width: 720px) {
  #capitHome img { width: 76px; }
  .language-menu .language-code { display: none; }
  .home-hero { grid-template-columns: 1fr; gap: 28px; }
  .home-features { grid-template-columns: 1fr; }
  main { padding: 24px 16px 80px; }
  .panel-section, .card { padding: 18px; }
}
