:root,
html[data-theme="light"] {
  --text: #1f2342;
  --muted: #5f658a;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --line: rgba(89, 108, 198, 0.24);
  --brand: #4b42ff;
  --brand-2: #f52dc1;
  --link: #2b42e4;
  --header-text: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.16);
  --tag-bg: rgba(76, 79, 255, 0.09);
  --tag-border: rgba(76, 79, 255, 0.3);
  --shadow: 0 18px 42px rgba(52, 66, 165, 0.2);
  --ad-bg-1: #ecf2ff;
  --ad-bg-2: #f7e6ff;
  --ad-border: rgba(93, 111, 224, 0.45);
  --code-bg: #151a2e;
  --code-text: #dce8ff;
  --cover-tall-bg: linear-gradient(160deg, #f1f4ff 0%, #ebdcff 100%);
  --media-caption-solid: #c2caee;
}


html[data-theme="dark"] {
  --text: #ebecff;
  --muted: #c4bdf4;
  --surface: rgba(19, 10, 48, 0.88);
  --surface-strong: #140a35;
  --line: rgba(186, 120, 255, 0.35);
  --brand: #8c46ff;
  --brand-2: #ff2ad4;
  --link: #d7b6ff;
  --header-text: #fef6ff;
  --nav-bg: rgba(255, 255, 255, 0.08);
  --tag-bg: rgba(255, 42, 212, 0.12);
  --tag-border: rgba(255, 108, 223, 0.38);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  --ad-bg-1: #271150;
  --ad-bg-2: #43107a;
  --ad-border: rgba(255, 92, 226, 0.45);
  --code-bg: #0b0718;
  --code-text: #f2e7ff;
  --cover-tall-bg: linear-gradient(160deg, #261a47 0%, #3a2468 100%);
  --media-caption-solid: #8f5bd6;
}


* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(53, 157, 255, 0.45), transparent 60%),
    radial-gradient(1000px 700px at 80% 20%, rgba(255, 51, 197, 0.45), transparent 62%),
    radial-gradient(1200px 800px at 60% 80%, rgba(203, 143, 255, 0.4), transparent 64%),
    linear-gradient(130deg, #4ca5ff 0%, #e9b6d4 45%, #ff43bf 72%, #3f9dff 100%);
  background-attachment: fixed;
  position: relative;
  transition: color 0.18s linear;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(160, 55, 255, 0.52), transparent 62%),
    radial-gradient(1000px 620px at 85% 35%, rgba(255, 10, 221, 0.48), transparent 62%),
    radial-gradient(950px 650px at 45% 90%, rgba(118, 0, 255, 0.5), transparent 62%),
    linear-gradient(140deg, #2d0068 0%, #8f00ff 45%, #ff06cf 75%, #3a0087 100%);
  opacity: 0;
  transition: opacity 0.28s ease-in-out;
}

html[data-theme="dark"] body::before {
  opacity: 1;
}

a { color: var(--link); text-decoration: none; transition: color 0.2s ease-out; }
a:hover { text-decoration: underline; }


.auth-strip {
  min-height: 42px;
  background: #080808;
  color: #ffffff;
  z-index: 1200;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  justify-content: flex-start;
}

.auth-strip-identity {
  color: #ffffff;
  font-size: 0.95rem;
}

.auth-strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.auth-strip-link,
.auth-strip-link:visited {
  color: #f8fbff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.84rem;
  font-weight: 800;
  background: linear-gradient(130deg, rgba(83, 67, 255, 0.52), rgba(236, 55, 193, 0.62));
  box-shadow: 0 3px 10px rgba(147, 66, 227, 0.26);
  text-decoration: none;
}

.auth-strip-link:hover,
.auth-strip-link:focus-visible {
  color: #ffffff !important;
  background: linear-gradient(130deg, rgba(94, 78, 255, 0.7), rgba(243, 73, 203, 0.78));
  border-color: rgba(255, 255, 255, 0.44);
  text-decoration: none;
}


.site-header {
  background: linear-gradient(130deg, rgba(62, 72, 255, 0.92), rgba(255, 59, 199, 0.9));
  color: var(--header-text);
  padding: 16px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 24px rgba(30, 17, 95, 0.24);
}

html[data-theme="dark"] .site-header {
  background: linear-gradient(130deg, rgba(64, 12, 131, 0.94), rgba(195, 9, 176, 0.92));
  border-bottom-color: rgba(255, 179, 245, 0.28);
}

.site-header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  color: var(--header-text);
  font-size: 1.25rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-stack {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.02;
}

.brand-title {
  font-size: 2.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.32em;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-header-utility {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(820px, 100%);
}

.guest-header-topline,
.guest-header-bottomline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}

.guest-header-topline {
  flex-wrap: nowrap;
}

.guest-search {
  display: flex;
  align-items: center;
  min-width: min(420px, 100%);
  max-width: 560px;
  width: 100%;
  flex: 1;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.guest-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--header-text);
  padding: 10px 14px;
}

.guest-search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.guest-search button {
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.18);
  color: var(--header-text);
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
}

.guest-social-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guest-social-nav a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--header-text);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.guest-social-nav svg {
  width: 18px;
  height: 18px;
  display: block;
}

.main-nav { display: flex; gap: 10px; }
.main-nav a {
  color: var(--header-text);
  background: var(--nav-bg);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.guest-account-nav a {
  background: rgba(18, 15, 51, 0.22);
  font-weight: 800;
}

.site-header__guest-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.guest-category-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.guest-category-nav a {
  color: var(--header-text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.guest-category-nav a.is-active {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
}

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

.theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--header-text);
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}


.layout {
  width: min(1500px, calc(100% - 34px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}

/* Keep the main column centered even if ad blocks are hidden by browser extensions. */
.layout > .content {
  grid-column: 2;
}

.layout > .ad-side:first-of-type {
  grid-column: 1;
}

.layout > .ad-side:last-of-type {
  grid-column: 3;
}

.ad-side { position: sticky; top: 18px; }
.ad-card {
  background: linear-gradient(160deg, var(--ad-bg-1), var(--ad-bg-2));
  border: 1px dashed var(--ad-border);
  border-radius: 14px;
  padding: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.ad-card-live {
  min-height: 0;
  padding: 8px;
}

.ad-card-live .adsbygoogle {
  width: 100%;
  height: 250px;
}

.content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.legal-content {
  width: min(980px, calc(100% - 34px));
  margin: 24px auto;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(245, 240, 255, 0.92));
  padding: 30px;
}

.legal-content h1,
.legal-content p:first-of-type {
  max-width: 75ch;
}

.legal-content h1 {
  margin-top: 0;
  font-size: 2.1rem;
}

.legal-content h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 1.3rem;
  border-left: 4px solid rgba(86, 93, 255, 0.45);
  padding-left: 10px;
}

.legal-content p,
.legal-content li {
  line-height: 1.55;
  color: var(--muted);
}

.legal-content strong {
  color: var(--text);
}

.legal-content ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.legal-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="dark"] .legal-panel {
  background: rgba(21, 12, 52, 0.52);
}

.legal-panel h2 {
  margin-top: 0;
}

.legal-panel p:last-child,
.legal-panel ul:last-child {
  margin-bottom: 0;
}

.contact-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.contact-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(56, 56, 130, 0.08);
}

.contact-card h2 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.08rem;
  border: 0;
  padding: 0;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

.contact-card:hover,
.contact-card:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(56, 56, 130, 0.14);
}

html[data-theme="dark"] .contact-card {
  background: rgba(22, 12, 54, 0.58);
}

.site-legal-footer {
  width: min(1500px, calc(100% - 34px));
  margin: 28px auto;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(52, 76, 255, 0.24), rgba(236, 54, 190, 0.2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow);
}

.site-legal-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-legal-footer__brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-legal-footer__brand strong {
  display: block;
  color: var(--header-text);
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}

.site-legal-footer__brand p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.86);
}

.site-legal-footer__links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-legal-footer__links a {
  font-weight: 700;
  color: var(--header-text);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
}

.table-wrap {
  overflow-x: auto;
}

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

.table th,
.table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

.table th {
  background: var(--surface-strong);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-card, .list-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-strong);
}

.hero-card img, .cover, .preview {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.cover-smart,
.cover-preview {
  aspect-ratio: 4 / 3;
  object-position: center;
}

.cover-preview {
  object-fit: cover;
}

.cover-smart.is-wide {
  object-fit: cover;
}

.cover-smart.is-tall {
  object-fit: contain;
  background: var(--cover-tall-bg);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.cover-hint {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.cover-preview {
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.cover-open-btn {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
}

.cover-caption-hint {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.cover-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.82);
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 28px;
}

.cover-lightbox[hidden] {
  display: none !important;
}

.cover-lightbox-image {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.cover-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.list-cards { display: grid; gap: 12px; margin-top: 12px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.table th, .table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 9px 8px;
}

.btn {
  display: inline-block;
  background: linear-gradient(130deg, var(--brand), var(--brand-2));
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.btn.secondary {
  background: linear-gradient(130deg, rgba(81, 63, 255, 0.95), rgba(214, 63, 255, 0.95));
}

.btn.btn-danger {
  background: linear-gradient(130deg, #d12d5d, #9c1f55);
}

.btn.btn-xs {
  padding: 6px 9px;
  font-size: 0.82rem;
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 12px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

label { font-weight: 600; display: block; margin-bottom: 6px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; }
.category-pills { margin-bottom: 12px; }

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.editor-rich-toolbar {
  --editor-tool-height: 42px;
  margin-bottom: 10px;
  display: grid;
  gap: 7px;
}

.editor-rich-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  position: relative;
}

.editor-rich-toolbar button,
.editor-rich-toolbar select {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 8px;
  height: var(--editor-tool-height);
  padding: 0 10px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}

.editor-rich-toolbar button:hover,
.editor-rich-toolbar button:focus-visible {
  border-color: rgba(92, 86, 255, 0.55);
}

.editor-rich-toolbar button.is-active {
  border-color: rgba(91, 73, 255, 0.85);
  background: linear-gradient(130deg, rgba(90, 73, 255, 0.22), rgba(230, 70, 201, 0.22));
  box-shadow: 0 0 0 2px rgba(91, 73, 255, 0.2) inset;
}

.editor-rich-toolbar select {
  min-width: 112px;
  max-width: 132px;
}

.editor-rich-canvas {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-strong);
  color: var(--text);
  line-height: 1.6;
  outline: none;
  white-space: pre-wrap;
}

.editor-rich-canvas:focus-visible {
  border-color: rgba(83, 90, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(83, 90, 255, 0.15);
}

.editor-rich-canvas:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.editor-rich-canvas h1,
.editor-rich-canvas h2,
.editor-rich-canvas h3 {
  margin: 12px 0 8px;
}

.editor-rich-canvas p {
  margin: 8px 0;
}

.editor-rich-canvas ul,
.editor-rich-canvas ol {
  margin: 8px 0;
  padding-left: 24px;
}

.editor-rich-canvas ol,
.rich-text-render ol {
  list-style-position: inside;
  padding-left: 0;
}

.editor-rich-canvas li.rich-style-h1,
.rich-text-render li.rich-style-h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
}

.editor-rich-canvas li.rich-style-h2,
.rich-text-render li.rich-style-h2 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.3;
}

.editor-rich-canvas li.rich-style-h3,
.rich-text-render li.rich-style-h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}

.editor-rich-canvas li.rich-style-h1::marker,
.editor-rich-canvas li.rich-style-h2::marker,
.editor-rich-canvas li.rich-style-h3::marker,
.rich-text-render li.rich-style-h1::marker,
.rich-text-render li.rich-style-h2::marker,
.rich-text-render li.rich-style-h3::marker {
  font-size: 1em;
  font-weight: inherit;
}

.editor-rich-canvas a {
  color: var(--link);
  text-decoration: underline;
}

.editor-rich-canvas hr,
.rich-text-render hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.editor-rich-toolbar [data-rich-style] {
  min-width: 120px;
}

.editor-rich-toolbar [data-rich-action="link"] {
  position: relative;
}

.editor-icon-btn {
  width: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.editor-link-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface-strong);
  box-shadow: 0 14px 24px rgba(18, 20, 55, 0.18);
  z-index: 15;
}

.editor-ol-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, 88vw);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface-strong);
  box-shadow: 0 14px 24px rgba(18, 20, 55, 0.18);
  z-index: 16;
  display: grid;
  gap: 6px;
}

.editor-ol-popover[hidden] {
  display: none !important;
}

.editor-ol-popover button {
  width: 100%;
  text-align: left;
}

.editor-link-popover[hidden] {
  display: none !important;
}

.editor-link-popover label {
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.editor-link-popover input {
  margin-bottom: 8px;
  border-radius: 8px;
}

.editor-link-popover-actions {
  display: flex;
  gap: 7px;
}

.editor-link-newtab-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.editor-link-newtab-row input {
  width: auto;
  margin: 0;
}

.editor-color-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: 0 !important;
  background: transparent !important;
  padding: 0 2px !important;
}

.editor-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  height: var(--editor-tool-height);
  padding: 0 8px;
  overflow: hidden;
  max-width: 150px;
  transition: max-width 0.24s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.editor-color-picker.is-expanded {
  max-width: 420px;
  border-color: rgba(92, 86, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(91, 73, 255, 0.12) inset;
}

.editor-color-current {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(17, 23, 70, 0.2);
  display: inline-block;
}

.editor-color-popover {
  display: inline-grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-width 0.24s ease, opacity 0.18s ease;
}

.editor-color-picker.is-expanded .editor-color-popover {
  max-width: 280px;
  opacity: 1;
  pointer-events: auto;
}

.editor-color-swatch {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 999px !important;
  padding: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 0 1px rgba(17, 23, 70, 0.16);
}

.editor-color-swatch:hover,
.editor-color-swatch:focus-visible {
  transform: translateY(-1px);
}

.editor-color-swatch.is-active {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 0 0 2px rgba(90, 73, 255, 0.44), 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.editor-color-swatch.swatch-black,
.editor-color-current.swatch-black { background: #111111; }
.editor-color-swatch.swatch-blue,
.editor-color-current.swatch-blue { background: #2a55d9; }
.editor-color-swatch.swatch-purple,
.editor-color-current.swatch-purple { background: #7a38c4; }
.editor-color-swatch.swatch-pink,
.editor-color-current.swatch-pink { background: #d12d95; }
.editor-color-swatch.swatch-red,
.editor-color-current.swatch-red { background: #c83845; }
.editor-color-swatch.swatch-orange,
.editor-color-current.swatch-orange { background: #cd6a15; }
.editor-color-swatch.swatch-green,
.editor-color-current.swatch-green { background: #278a4a; }
.editor-color-swatch.swatch-teal,
.editor-color-current.swatch-teal { background: #0b8d86; }

.builder-fields {
  position: relative;
}

.editor-link-manager {
  position: absolute;
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface-strong);
  display: grid;
  gap: 6px;
  box-shadow: 0 12px 24px rgba(17, 22, 58, 0.2);
  z-index: 20;
}

.editor-link-manager[hidden] {
  display: none !important;
}

.editor-link-manager a,
.editor-link-manager button,
.editor-link-manager select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.editor-link-manager a {
  text-align: center;
}

@media (max-width: 740px) {
  .editor-link-popover {
    width: min(260px, calc(100vw - 84px));
  }
}

.add-block-full {
  width: 100%;
  margin: 4px 0 14px;
}

.editor-submit-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-delete-form {
  display: inline-block;
  margin-left: 8px;
}

.builder-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface-strong);
}

.builder-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.builder-actions {
  display: inline-flex;
  gap: 8px;
}

.builder-actions button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.builder-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tiny-preview {
  margin-top: 8px;
  max-width: 100%;
}

.block-image-preview-thumb {
  display: block;
  width: auto;
  max-width: min(220px, 100%);
  max-height: 220px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.editor-media-preview {
  margin-top: 8px;
}

.editor-media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.editor-media-preview-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  user-select: none;
}

.editor-media-preview-item img {
  display: block;
  width: 100%;
  height: 94px;
  object-fit: cover;
}

.editor-media-preview-item.is-new {
  border-style: dashed;
}

.editor-media-preview-item.is-dragging {
  opacity: 0.55;
}

.editor-media-preview-item.is-drop-target {
  outline: 2px dashed var(--line);
  outline-offset: -2px;
}

.editor-media-preview-item.is-caption-editing {
  box-shadow: 0 0 0 2px rgba(110, 156, 255, 0.7) inset;
}

.editor-media-item-top-actions {
  position: absolute;
  top: 6px;
  right: 6px;
}

.editor-media-caption-btn {
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #251747;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="dark"] .editor-media-caption-btn {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(18, 10, 40, 0.82);
  color: #efe6ff;
}

.editor-media-preview-meta {
  margin: 0;
  padding: 6px 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.editor-media-preview-caption {
  margin: 0;
  padding: 0 8px 6px;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.25;
}

.editor-media-remove-btn {
  display: block;
  width: calc(100% - 12px);
  margin: 0 6px 6px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.editor-media-preview-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.editor-upload-notice {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.editor-upload-notice.is-error {
  color: #d63b64;
}

.editor-upload-notice.is-ok {
  color: #1f8f53;
}

.editor-caption-drawer {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
}

.editor-caption-drawer-left {
  min-width: 0;
}

.editor-caption-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.editor-caption-drawer-nav {
  display: inline-flex;
  gap: 8px;
}

.editor-caption-drawer-nav button,
.editor-caption-link-row button {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

.editor-caption-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.editor-caption-link-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.editor-caption-preview-rich {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 8px 10px;
  min-height: 44px;
  line-height: 1.35;
}

.editor-caption-preview-rich a {
  color: var(--link);
  text-decoration: underline;
}

.editor-caption-drawer-right {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  padding: 8px;
  gap: 8px;
}

.editor-caption-preview-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  word-break: break-word;
}

.editor-caption-preview-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
}

.editor-caption-preview-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .editor-caption-drawer {
    grid-template-columns: 1fr;
  }

  .editor-caption-drawer-right {
    order: -1;
  }

  .editor-caption-preview-image {
    max-height: 280px;
  }
}

@media (max-width: 640px) {
  .editor-caption-drawer-head,
  .editor-caption-link-row {
    grid-template-columns: 1fr;
  }

  .editor-caption-drawer-head {
    display: grid;
  }

  .editor-caption-drawer-nav {
    flex-wrap: wrap;
  }
}

.block { margin-bottom: 18px; }

.block-text .rich-text-render {
  line-height: 1.6;
}

.rich-text-render h1,
.rich-text-render h2,
.rich-text-render h3 {
  margin: 16px 0 10px;
  line-height: 1.25;
}

.rich-text-render h1 {
  font-size: 2rem;
}

.rich-text-render h2 {
  font-size: 1.55rem;
}

.rich-text-render h3 {
  font-size: 1.2rem;
}

.rich-text-render p {
  margin: 10px 0;
}

.rich-text-render ul,
.rich-text-render ol {
  margin: 10px 0;
  padding-left: 24px;
}

.rich-text-render li {
  margin: 4px 0;
}

.rich-text-render a {
  color: var(--link);
  text-decoration: underline;
  font-weight: 700;
}

.rich-spoiler {
  display: inline-block;
  border-radius: 7px;
  padding: 2px 7px;
  background: rgba(20, 16, 45, 0.88);
  color: transparent;
  cursor: pointer;
  transition: color 0.16s ease-out;
}

.rich-spoiler:hover,
.rich-spoiler:focus-visible {
  color: #ffffff;
}

.rich-color-black { color: #000000; }
.rich-color-blue { color: #2a55d9; }
.rich-color-purple { color: #7a38c4; }
.rich-color-pink { color: #d12d95; }
.rich-color-red { color: #c83845; }
.rich-color-orange { color: #cd6a15; }
.rich-color-green { color: #278a4a; }
.rich-color-teal { color: #0b8d86; }

html[data-theme="dark"] .rich-color-black {
  color: #d9d9d9;
}

.block-media-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-strong);
}

.block-image .block-media-frame > img,
.block-image .block-media-image {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 12px !important;
}

.block-image .block-media-image.has-caption {
  border-radius: 12px !important;
}

.block-image .block-caption {
  margin-top: 0;
  border-radius: 0 0 12px 12px;
}

.block-caption {
  margin: 0;
  padding: 10px 12px;
  background: var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}

.block-media-frame.has-caption {
  border-color: var(--media-caption-solid);
  background: var(--media-caption-solid) !important;
}

.block-media-frame.has-caption .block-caption {
  background: transparent;
  border-radius: 0 0 12px 12px;
}

.block-gallery .gallery-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}

.block-gallery img {
  height: 180px;
  border-radius: 8px;
}

.zoomable-image {
  cursor: zoom-in;
}

.block-puzzle {
  display: block;
  width: 100%;
}

.block-puzzle .block-media-frame {
  width: 100%;
}

.block-puzzle .block-media-frame.has-caption .puzzle-track {
  border-radius: 12px;
  overflow: hidden;
}

/*
  Credit puzzle layout:
  Composant adapte depuis le CodePen de @Zonecss
  Lien source: https://codepen.io/Zonecss/pen/oJXZYW
*/
.puzzle-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(180px, 14vw, 260px);
  grid-auto-flow: dense;
  gap: 0;
  padding: 0;
}

.puzzle-item {
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-column: span 2;
  grid-row: span 1;
}

.puzzle-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.puzzle-track.puzzle-count-1 .puzzle-item {
  grid-column: span 6;
}

.puzzle-track.puzzle-count-2 .puzzle-item {
  grid-column: span 3;
}

.puzzle-track.puzzle-count-3 .puzzle-item.i1,
.puzzle-track.puzzle-count-3 .puzzle-item.i2 {
  grid-column: span 3;
}

.puzzle-track.puzzle-count-3 .puzzle-item.i3 {
  grid-column: span 6;
}

.puzzle-track.puzzle-count-4 .puzzle-item {
  grid-column: span 3;
}

.puzzle-track.puzzle-count-5 .puzzle-item.i1,
.puzzle-track.puzzle-count-5 .puzzle-item.i2,
.puzzle-track.puzzle-count-5 .puzzle-item.i3 {
  grid-column: span 2;
}

.puzzle-track.puzzle-count-5 .puzzle-item.i4,
.puzzle-track.puzzle-count-5 .puzzle-item.i5 {
  grid-column: span 3;
}

.puzzle-track.puzzle-count-6 .puzzle-item {
  grid-column: span 2;
}

.puzzle-track.puzzle-count-7 .puzzle-item.i1,
.puzzle-track.puzzle-count-7 .puzzle-item.i2,
.puzzle-track.puzzle-count-7 .puzzle-item.i3 {
  grid-column: span 2;
}

.puzzle-track.puzzle-count-7 .puzzle-item.i4,
.puzzle-track.puzzle-count-7 .puzzle-item.i5,
.puzzle-track.puzzle-count-7 .puzzle-item.i6,
.puzzle-track.puzzle-count-7 .puzzle-item.i7 {
  grid-column: span 3;
}

.puzzle-track.puzzle-count-8 .puzzle-item.i1,
.puzzle-track.puzzle-count-8 .puzzle-item.i2,
.puzzle-track.puzzle-count-8 .puzzle-item.i3,
.puzzle-track.puzzle-count-8 .puzzle-item.i4,
.puzzle-track.puzzle-count-8 .puzzle-item.i5,
.puzzle-track.puzzle-count-8 .puzzle-item.i6 {
  grid-column: span 2;
}

.puzzle-track.puzzle-count-8 .puzzle-item.i7,
.puzzle-track.puzzle-count-8 .puzzle-item.i8 {
  grid-column: span 3;
}

.block-code {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.block-code-content {
  overflow: hidden;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-strong);
  padding: 8px 10px;
}

.code-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.code-download-btn {
  display: inline-block;
  max-width: 280px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.code-download-btn {
  cursor: pointer;
  font: inherit;
}

.block-code pre {
  margin: 0;
  padding: 12px;
  background: var(--code-bg);
  color: var(--code-text);
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.block-code pre[class*="language-"] {
  margin: 0;
  border-radius: 0;
  background: var(--code-bg);
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.block-code pre[class*="language-"] code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-render {
  padding: 14px 14px 10px;
  max-height: 420px;
  overflow: auto;
  background: #05070d;
  color: #e2f1ff;
}

.markdown-render h1,
.markdown-render h2,
.markdown-render h3 {
  margin: 0 0 10px;
  line-height: 1.25;
}

.markdown-render p {
  margin: 0 0 10px;
}

.markdown-render ul {
  margin: 0 0 10px 18px;
  padding: 0;
}

.markdown-render li {
  margin: 0 0 4px;
}

.markdown-render code {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.92em;
}

.block-code.has-caption {
  border-color: var(--media-caption-solid);
  background: var(--media-caption-solid);
  overflow: visible;
}

.block-code.has-caption .block-code-content {
  border-radius: 12px;
}

.block-code.has-caption .block-caption {
  background: transparent;
  border-radius: 0 0 12px 12px;
}

.block-html {
  display: block;
  width: 100%;
}

.block-ad .article-inline-ad {
  width: 100%;
}

.block-ad .adsbygoogle {
  width: 100%;
  height: 250px;
}

.block-html .block-media-frame {
  width: 100%;
}

.embed-html {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.embed-html iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  border: 0;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  height: auto !important;
  margin: 0 auto;
}

.embed-caption {
  margin: 0;
  width: 100%;
  text-align: left;
}

.pdf-viewer-wrap {
  background: var(--surface-strong);
}

.pdf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.pdf-viewer {
  display: block;
  width: 100%;
  height: min(70vh, 780px);
  border: 0;
}

.pdf-empty {
  margin: 0;
  padding: 18px 12px;
  color: var(--muted);
}

.terminal-wrap {
  background: #0a0d14;
}

.terminal-title {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #d3e3ff;
  font-weight: 700;
}

.terminal-output {
  margin: 0;
  padding: 12px;
  max-height: 460px;
  overflow: auto;
  background: #05070d;
  color: #e2f1ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.88);
  z-index: 1700;
  display: grid;
  place-items: center;
  padding: 28px;
}

.media-lightbox[hidden] {
  display: none !important;
}

.media-lightbox-stage {
  width: min(1320px, 92vw);
  height: 86vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
}

.media-lightbox-image {
  place-self: center;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.media-lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  margin-top: 10px;
  width: 100%;
  border-radius: 0 0 12px 12px;
  background: rgba(9, 8, 18, 0.92);
}

.media-lightbox-caption {
  margin: 0;
  text-align: left;
  color: #e9eaff;
  font-size: 0.98rem;
  line-height: 1.35;
  min-height: 1.35em;
  flex: 1;
}

.media-lightbox-caption a {
  color: #8dc2ff;
  text-decoration: underline;
}

.media-lightbox-pagination {
  margin: 0;
  color: #f5f3ff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.media-lightbox-btn {
  position: fixed;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
}

.media-lightbox-close {
  top: 18px;
  right: 18px;
}

.media-lightbox-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.media-lightbox-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.tags span {
  display: inline-block;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
  border-radius: 999px;
  padding: 4px 10px;
  margin-right: 6px;
  font-size: 0.85rem;
}

.article-meta,
.excerpt { color: var(--muted); }

.article-shell {
  position: relative;
}

.article-edit-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(130deg, rgba(75, 68, 255, 0.95), rgba(237, 50, 198, 0.95));
  box-shadow: 0 8px 20px rgba(71, 51, 160, 0.3);
  z-index: 2;
}

.article-edit-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.article-edit-btn:hover,
.article-edit-btn:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(71, 51, 160, 0.36);
}

.listing-context {
  margin-top: -4px;
  margin-bottom: 14px;
}

.listing-context a {
  color: var(--brand);
  font-weight: 700;
}

.error { color: #ff365e; font-weight: 700; }
.success { color: #1f8f53; font-weight: 700; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 0 120px;
}

.login-card {
  width: min(440px, calc(100vw - 44px));
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.login-logo {
  width: 78px;
  height: 78px;
  display: block;
  margin: 0 auto 8px;
}

.login-card h1 {
  text-align: center;
  margin-top: 6px;
  margin-bottom: 8px;
}

.login-intro {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
}

.login-logo--dark { display: none; }
html[data-theme="dark"] .login-logo--light { display: none; }
html[data-theme="dark"] .login-logo--dark { display: block; }

.login-form {
  display: grid;
  gap: 8px;
}

.login-sub-actions {
  margin-top: -2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-link-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  padding: 4px 2px;
}

.login-link-action:hover,
.login-link-action:focus-visible {
  text-decoration: underline;
}

.login-link-action--anchor {
  text-decoration: none;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.guest-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(97, 76, 255, 0.22);
  background: linear-gradient(130deg, rgba(81, 63, 255, 0.16), rgba(214, 63, 255, 0.16));
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(92, 75, 170, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.guest-link-btn:hover,
.guest-link-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(97, 76, 255, 0.34);
  background: linear-gradient(130deg, rgba(81, 63, 255, 0.22), rgba(214, 63, 255, 0.22));
  box-shadow: 0 10px 24px rgba(92, 75, 170, 0.12);
}

.guest-link-btn:focus-visible {
  outline: 2px solid rgba(103, 79, 255, 0.24);
  outline-offset: 3px;
}

.login-submit-btn {
  margin-left: auto;
  min-height: 44px;
  padding-inline: 18px;
}

.login-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(90, 108, 204, 0.35);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}

.login-google-btn:hover,
.login-google-btn:focus-visible {
  border-color: rgba(90, 108, 204, 0.55);
}

.login-google-btn__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(130deg, #4285f4, #ea4335 40%, #fbbc05 70%, #34a853);
}

.login-register-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
}

.login-register-panel h2 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.login-feedback-slot {
  min-height: 30px;
  margin-top: 2px;
}

.login-feedback-slot .success,
.login-feedback-slot .error {
  margin: 0;
}

.auth-action-card {
  width: min(520px, calc(100vw - 28px));
}

.auth-action-links .btn,
.auth-action-links .guest-link-btn {
  min-width: 170px;
}

@media (max-width: 640px) {
  .auth-strip {
    padding-inline: 14px;
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .auth-strip-actions {
    margin-left: 0;
  }

  .site-header {
    padding-inline: 16px;
  }

  .site-header__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .guest-header-utility {
    width: 100%;
  }

  .guest-header-utility,
  .guest-header-topline,
  .guest-header-bottomline {
    align-items: stretch;
  }

  .guest-header-topline {
    flex-wrap: wrap;
  }

  .guest-search {
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .guest-social-nav {
    order: 3;
  }

  .guest-account-nav {
    margin-left: auto;
  }

  .site-legal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-legal-footer__links a {
    text-align: center;
  }

  .login-card {
    width: min(440px, calc(100vw - 28px));
  }

  .login-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .login-submit-btn {
    width: 100%;
  }
}

.ad-example {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 260px;
}

.editor-inline-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.ad-label {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
}

.ad-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.ad-text {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

.ad-cta {
  margin-top: auto;
  display: inline-block;
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--tag-border);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
  font-weight: 700;
}

html[data-theme="dark"] .ad-cta {
  background: rgba(255, 255, 255, 0.08);
}

/*
  Credit theme switch:
  Composant adapte depuis le CodePen de @jamiewilsonict (Jamie Wilson)
  Lien source: https://codepen.io/jamiewilsonict/pen/LYKGjdb
*/
.theme-switcher-grid {
  --switch-day-bg: #31b6ff;
  --switch-night-bg: #2d194f;
  --switch-sun: #ffd24a;
  --switch-moon: #fff6d8;
  --switch-cloud: #ffffff;
  --switch-star: #ffffff;
  position: relative;
  width: 98px;
  height: 40px;
  border-radius: 999px;
  background: var(--switch-day-bg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: background-color 0.26s ease-in-out, border-color 0.26s ease-in-out;
}

.theme-switcher-grid.night-theme {
  background: var(--switch-night-bg);
  border-color: rgba(255, 188, 247, 0.55);
}

.theme-switcher-grid .sun {
  position: absolute;
  width: 28px;
  height: 28px;
  left: 6px;
  top: 6px;
  border-radius: 50%;
  background-color: var(--switch-sun);
  transition: left 0.26s ease-in-out, background-color 0.26s ease-in-out;
}

.theme-switcher-grid.night-theme .sun {
  left: 64px;
  background-color: var(--switch-moon);
}

.theme-switcher-grid .moon-overlay {
  position: absolute;
  border-radius: 50%;
  width: 0;
  height: 0;
  left: 76px;
  top: 10px;
  background: transparent;
  transition: width 0.26s ease-in-out, height 0.26s ease-in-out, background-color 0.26s ease-in-out;
}

.theme-switcher-grid.night-theme .moon-overlay {
  width: 16px;
  height: 16px;
  background-color: var(--switch-night-bg);
}

.theme-switcher-grid .cloud-ball {
  position: absolute;
  background-color: var(--switch-cloud);
  border-radius: 50%;
  transition: all 0.26s ease-in-out;
}

.theme-switcher-grid .cloud-ball-left {
  width: 10px;
  height: 10px;
  top: 17px;
  left: 23px;
}

.theme-switcher-grid .cloud-ball-middle {
  width: 11px;
  height: 11px;
  top: 15px;
  left: 31px;
}

.theme-switcher-grid .cloud-ball-right {
  width: 10px;
  height: 10px;
  top: 17px;
  left: 40px;
}

.theme-switcher-grid .cloud-ball-top {
  width: 9px;
  height: 9px;
  top: 13px;
  left: 31px;
}

.theme-switcher-grid.night-theme .cloud-ball-left {
  width: 3px;
  height: 3px;
  top: 29px;
  left: 15px;
}

.theme-switcher-grid.night-theme .cloud-ball-middle {
  width: 3px;
  height: 3px;
  top: 8px;
  left: 29px;
}

.theme-switcher-grid.night-theme .cloud-ball-right {
  width: 3px;
  height: 3px;
  top: 20px;
  left: 48px;
}

.theme-switcher-grid.night-theme .cloud-ball-top {
  width: 3px;
  height: 3px;
  top: 7px;
  left: 63px;
}

.theme-switcher-grid .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: var(--switch-star);
  opacity: 0;
  transition: opacity 0.26s ease-in-out;
}

.theme-switcher-grid .star-1 { top: 10px; left: 58px; }
.theme-switcher-grid .star-2 { top: 26px; left: 67px; }
.theme-switcher-grid .star-3 { top: 14px; left: 76px; }
.theme-switcher-grid .star-4 { top: 21px; left: 86px; }

.theme-switcher-grid.night-theme .star { opacity: 1; }

.login-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5;
}

/* retire l'ancien style texte du bouton */
.theme-toggle {
  display: none;
}
