/* ==========================================================================
   Modoboa website — consolidated stylesheet
   Single file, no SCSS build step. Design tokens via CSS custom properties.
   ========================================================================== */

:root {
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Ink */
  --ink: #1c2433;
  --ink-soft: #5b6577;

  /* Brand blue */
  --brand: #046bf8;          /* bright accent */
  --brand-ink: #0a58ca;      /* AA text/links on white */
  --brand-deep-1: #0b5cf0;   /* gradient start for blue surfaces */
  --brand-deep-2: #0a3aa8;   /* gradient end */

  /* Accent orange */
  --accent: #fa8528;         /* bright accent (icons, borders, hover) */
  --accent-ink: #c2410c;     /* AA orange text on white */
  --accent-cta: #d35400;     /* CTA background (white text) */
  --accent-cta-hover: #b8480a;

  /* Success green */
  --success: #1f9d57;        /* funded / success accent */
  --success-ink: #167a43;    /* AA success text on white */
  --tint-green: #e8f6ee;

  /* Surfaces */
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --tint-blue: #eef4ff;
  --tint-orange: #fff4ec;
  --border: #e4e7ee;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10);
  --shadow: 0 12px 32px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 56px rgba(16, 24, 40, .16);

  --container: 1140px;
  --gutter: 24px;
  --transition: .25s ease;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-container { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.01em;
}
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-ink); transition: color var(--transition); }
a:hover { color: var(--accent-ink); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
img[src$=".svg"] { width: 100%; }
img.feature { max-width: 100%; height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

input, textarea, select, button { font-family: inherit; font-size: 100%; }

strong, b { font-weight: 700; }

::selection { background: var(--accent); color: #fff; }

/* Accessible focus ring */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 200;
  background: #fff;
  color: var(--brand-ink);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; }

/* ---------- Typographic helpers ---------- */
.h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); font-weight: 800; margin-bottom: 1rem; }
.h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; margin-bottom: 1.25rem; }
.h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }

/* ---------- Layout: container & grid ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: calc(var(--gutter) / -2);
}
.row > [class*="col-"], .row > .c {
  width: 100%;
  padding-inline: calc(var(--gutter) / 2);
}

/* base column = full width, becomes sized at breakpoints */
[class*="col-"] { width: 100%; }

@media (min-width: 576px) {
  .col-sm-1{flex:0 0 8.3333%;max-width:8.3333%}.col-sm-2{flex:0 0 16.6667%;max-width:16.6667%}
  .col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.3333%;max-width:33.3333%}
  .col-sm-5{flex:0 0 41.6667%;max-width:41.6667%}.col-sm-6{flex:0 0 50%;max-width:50%}
  .col-sm-7{flex:0 0 58.3333%;max-width:58.3333%}.col-sm-8{flex:0 0 66.6667%;max-width:66.6667%}
  .col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.3333%;max-width:83.3333%}
  .col-sm-11{flex:0 0 91.6667%;max-width:91.6667%}.col-sm-12{flex:0 0 100%;max-width:100%}
  .offset-sm-2{margin-left:16.6667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333%}
}
@media (min-width: 768px) {
  .col-md-1{flex:0 0 8.3333%;max-width:8.3333%}.col-md-2{flex:0 0 16.6667%;max-width:16.6667%}
  .col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.3333%;max-width:33.3333%}
  .col-md-5{flex:0 0 41.6667%;max-width:41.6667%}.col-md-6{flex:0 0 50%;max-width:50%}
  .col-md-7{flex:0 0 58.3333%;max-width:58.3333%}.col-md-8{flex:0 0 66.6667%;max-width:66.6667%}
  .col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.3333%;max-width:83.3333%}
  .col-md-11{flex:0 0 91.6667%;max-width:91.6667%}.col-md-12{flex:0 0 100%;max-width:100%}
}
@media (min-width: 992px) {
  .col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.3333%;max-width:33.3333%}
  .col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-8{flex:0 0 66.6667%;max-width:66.6667%}
  .col-lg-12{flex:0 0 100%;max-width:100%}
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.centered    { margin-inline: auto; }
.float-start { float: left; }
.float-end   { float: right; }
.img-responsive, .img-fluid { max-width: 100%; height: auto; }

.clearfix::after { content: ""; display: table; clear: both; }

.d-none { display: none !important; }
.d-xs-block { display: block !important; }
@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .d-md-none { display: none !important; }
}

.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;
}

.shadow1 { box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.bt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  line-height: 1.2;
  transition: transform var(--transition), box-shadow var(--transition),
              background-color var(--transition), color var(--transition),
              border-color var(--transition);
}
.bt:hover { text-decoration: none; }
.bt-size1 { font-size: 1.0625rem; padding: 14px 30px; }
.bt-size2 { font-size: .8125rem; padding: 10px 22px; text-transform: uppercase; letter-spacing: .04em; }
.bt-size3 { font-size: .75rem; padding: 6px 14px; text-transform: uppercase; letter-spacing: .04em; }

.bt-color1 { background: var(--accent-cta); color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.bt-color1:hover { background: var(--accent-cta-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }

.bt-color-blue, .bt-color4 { background: var(--brand); color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.bt-color-blue:hover, .bt-color4:hover { background: var(--brand-ink); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }

.bt-color2 { color: var(--brand-ink); border-color: var(--brand-ink); background: transparent; }
.bt-color2:hover { background: var(--brand-ink); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }

.bt-color3 { color: var(--accent-ink); border-color: var(--accent-ink); background: transparent; }
.bt-color3:hover { background: var(--accent-ink); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }

.bt-disabled, .bt.disabled, .disabled { cursor: default; opacity: .55; pointer-events: none; }

/* ---------- Header & navigation ---------- */
header {
  position: relative;
  z-index: 5;
  padding: 18px 0;
}
header .container > .clearfix { display: flex; align-items: center; justify-content: space-between; }
header .logo { display: block; width: 200px; flex: 0 0 auto; }
header .logo svg { width: 100%; height: auto; }
header .logo svg path { fill: #fff; }

.main-nav {
  display: none;
  align-items: center;
  gap: 28px;
  margin: 0;
}
@media (min-width: 768px) {
  .main-nav { display: flex; }
}
header li { position: relative; }
header li a {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
header li a:hover { color: #fff; border-bottom-color: var(--accent); text-decoration: none; }
header li.active a { border-bottom-color: var(--accent); }
header li.sign-in a { color: var(--accent); }

/* Interior pages: solid blue bar */
header.header-int {
  background: linear-gradient(135deg, var(--brand-deep-1), var(--brand-deep-2));
}

/* Home: transparent header sits over the hero */
.template-homepage header {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}

/* Hamburger */
.display-mobile-menu {
  display: inline-block;
  border: none;
  background: none;
  width: 34px; height: 30px;
  padding: 0;
  cursor: pointer;
}
@media (min-width: 768px) {
  .display-mobile-menu { display: none; }
}
.display-mobile-menu span {
  display: block;
  width: 100%; height: 3px;
  background: #fff;
  border-radius: 2px;
}
.display-mobile-menu span + span { margin-top: 6px; }

/* ---------- Mobile menu overlay ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 100;
  padding: 80px 20px 40px;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu .close-mobile-menu {
  position: absolute;
  top: 24px; right: 24px;
  width: 34px; height: 34px;
  cursor: pointer;
  background: none; border: none;
}
.mobile-menu .close-mobile-menu::before,
.mobile-menu .close-mobile-menu::after {
  content: "";
  position: absolute;
  top: 50%; left: 4px;
  width: 26px; height: 3px;
  background: var(--ink);
  border-radius: 2px;
}
.mobile-menu .close-mobile-menu::before { transform: rotate(45deg); }
.mobile-menu .close-mobile-menu::after { transform: rotate(-45deg); }
.mobile-menu .logo { display: block; width: 200px; margin: 0 auto 30px; }
.mobile-menu .logo svg path { fill: var(--brand); }
.mobile-menu ul { text-align: center; }
.mobile-menu li { padding: 14px 0; }
.mobile-menu li a { font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.mobile-menu li a:hover { color: var(--brand-ink); }

/* ---------- Hero ---------- */
.homepage-splash {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 160px 0 110px;
  background:
    linear-gradient(135deg, rgba(11, 92, 240, .93), rgba(10, 58, 168, .96)),
    var(--brand) url(../img/bg.jpg) center top / cover no-repeat;
}
.homepage-splash .h1 { color: #fff; margin-bottom: 1.25rem; max-width: 16ch; margin-inline: auto; }
.homepage-splash p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, .92);
  max-width: 720px;
  margin: 0 auto 1.75rem;
}
.homepage-splash p a { color: #fff; text-decoration: underline; }
.homepage-splash p a:hover { color: #fff; opacity: .85; }
.homepage-splash .bt { min-width: 260px; }

/* ---------- Home content sections ---------- */
.homepage-why,
.homepage-what,
.homepage-commu,
.homepage-pro,
.homepage-security { padding: clamp(56px, 8vw, 96px) 0; }

.homepage-why { background: var(--surface); }
.homepage-why ul, .homepage-what ul { list-style: disc; padding-left: 1.4em; }
.homepage-why li, .homepage-what li { margin-bottom: .4em; }

/* "Brings together" — light orange tint instead of saturated orange */
.homepage-what {
  background: var(--tint-orange);
  border-top: 4px solid var(--accent);
}
.homepage-what .h2 { color: var(--accent-ink); text-align: center; }
.homepage-what > .container > p,
.homepage-what > .container > ul { max-width: 820px; margin-inline: auto; }

.homepage-commu { background: var(--surface); }
.homepage-commu .h1, .homepage-commu .h2 { text-align: center; }

/* Privacy / security — deep blue, white text passes AA */
.homepage-security {
  background: linear-gradient(135deg, var(--brand-deep-1), var(--brand-deep-2));
  color: #fff;
}
.homepage-security .h1, .homepage-security .h2 { color: #fff; }
.homepage-security a { color: #fff; text-decoration: underline; font-weight: 700; }
.homepage-security a:hover { color: #fff; opacity: .85; }

.homepage-pro { background: var(--surface); }
.homepage-pro .h1, .homepage-pro .h2 { text-align: center; }
.homepage-pro .pro-services { padding-top: 20px; }

/* Scroll anchors clear the header */
.homepage-why, .homepage-what, .homepage-commu,
.homepage-pro, .homepage-security { scroll-margin-top: 90px; }

/* ---------- Cards (card_section) ---------- */
.homepage-commu .row, .homepage-pro .row { margin-top: 36px; row-gap: 28px; }
.item {
  height: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.item.shadow1:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.item .v { max-width: 96px; margin: 0 auto 20px; }
.item .v .svg-wrapper, .item .svg-wrapper { width: 96px; height: 96px; margin: 0 auto; }
.item .svg-wrapper svg { width: 100%; height: 100%; }
.item h3 { margin-bottom: 18px; }
.item .a { margin-top: 8px; }

/* Pro services items (no card chrome, icon + label) */
.homepage-pro .item { border: none; background: none; padding: 12px; }
.homepage-pro .item .v { max-width: 120px; }

/* ---------- Interior page header ---------- */
.blog-header {
  background: var(--surface-alt);
  text-align: center;
  padding: 64px 0 48px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.blog-header h1, .blog-header .h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 800;
  margin-bottom: .5rem;
}
.blog-header .author { display: inline-flex; }
.blog-header img { display: inline-block; }
.blog-header .rounded { border-radius: 20%; }
.blog-header .media-date { margin-left: 12px; color: var(--ink-soft); }

.page { padding: 0 0 80px; }
.page .h1 { text-align: center; }

/* ---------- Blog listing ---------- */
.loop .infinite-more-link { display: none; }
.loop .item {
  height: auto;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 48px;
  margin-bottom: 48px;
  background: none;
}
.loop .item:last-child { border-bottom: none; }
.loop .t h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
.loop .t h2 a { color: var(--ink); text-decoration: none; }
.loop .t h2 a:hover { color: var(--brand-ink); }
.loop .item .rte { margin: 14px 0 20px; }

.author { margin-bottom: 16px; }
.author img { display: inline-block; vertical-align: middle; border-radius: 50%; margin-right: 8px; }
.author p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.media-object { display: block; margin: 0 0 18px; border-radius: var(--radius); max-width: 100%; height: auto; }

.blog-footer { padding-bottom: 20px; }
.nav-posts { border-top: 1px solid var(--border); padding-top: 40px; margin: 40px 0 120px; }

.notice { color: var(--ink-soft); }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 0 60px;
}
.pagination li a {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 700;
}
.pagination li a:hover { background: var(--tint-blue); }
.pagination li.active a { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Services (features & professional services) ---------- */
.services { padding-top: 8px; }
.services .t { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); text-align: center; margin-bottom: 56px; }
.services .t strong { display: block; font-weight: 400; color: var(--brand-ink); }
.services .item {
  height: auto;
  border: none;
  background: none;
  border-radius: 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 0 0 56px;
  margin-bottom: 56px;
  align-items: center;
}
.services .item:last-child { border-bottom: none; }
.services .item h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); color: var(--brand-ink); }
.services .item p { font-size: 1.05rem; margin-bottom: 18px; }
.services .item .v { max-width: 150px; margin: 0 auto; }

/* Framed feature screenshots */
.services .item img.feature, .services .item .feature {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

/* ---------- Rates table ---------- */
.rates { margin-bottom: 64px; }
.rates .t { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); color: var(--brand-ink); text-align: center; margin-bottom: 48px; }
.rates table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow-x: auto;
  display: block;
}
.rates th, .rates td {
  vertical-align: middle;
  border: 1px solid var(--border);
  padding: 18px 20px;
  text-align: center;
}
.rates th {
  background: var(--brand);
  color: #fff;
  width: 22%;
  font-weight: 800;
}
.rates td { color: var(--ink-soft); }
.rates td.td1 { background: var(--surface-alt); color: var(--ink); font-weight: 700; text-align: left; }
.rates th.empty, .rates td.empty { background: none; border: none; }

/* ---------- Service dialog (replaces fancybox popups) ---------- */
dialog.popin-service {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.popin-service::backdrop { background: rgba(16, 24, 40, .55); }
.popin-service .t {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-alt);
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.popin-service .t h2 { flex: 1 1 auto; font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem); color: var(--brand-ink); margin: 0; }
.popin-service .t .order { display: flex; align-items: center; gap: 14px; }
.popin-service .t .order p { font-size: 1rem; text-transform: uppercase; margin: 0; color: var(--ink-soft); }
.popin-service .c { padding: 28px; overflow-y: auto; max-height: 60vh; }
.popin-service .note {
  background: var(--tint-blue);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  margin-top: 20px;
}
.popin-service .note h3 { font-size: 1rem; text-transform: uppercase; margin-bottom: 12px; }
.popin-service .note p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.dialog-close {
  background: var(--brand);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.dialog-close:hover { background: var(--brand-ink); }

/* ---------- Sponsors / crowdfunding widgets (Sponsoring page) ---------- */
.sponsors { padding-top: 24px; row-gap: 32px; }
.sponsors:last-of-type { padding-bottom: 64px; }
.sponsor {
  height: 100%;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
}
.sponsor h3 { margin-bottom: 18px; }
.sponsor p { font-size: 1.05rem; margin-bottom: 20px; }
.sponsor .amount {
  display: inline-block;
  color: var(--brand-ink);
  background: var(--tint-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
}
.sponsor .b { background: var(--border); border-radius: var(--radius-pill); margin: 24px 0; overflow: hidden; }
.sponsor .b .v { height: 12px; background: var(--accent); border-radius: var(--radius-pill); }
.sponsor--funded { border-color: var(--success); }
.sponsor-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success-ink);
  background: var(--tint-green);
  border: 1px solid var(--success);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.sponsor-status__icon { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.sponsor-funded-goal { color: var(--ink-soft); font-weight: 600; margin-bottom: 20px; }
.lead { font-size: 1.2rem; }

/* ---------- Forms ---------- */
.std-form { max-width: 720px; margin: 0 auto 72px; }
.std-form .row { margin-bottom: 0; }
.std-form label.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}
.std-form .field { margin-bottom: 22px; }
.std-form input,
.std-form textarea {
  width: 100%;
  font-size: 1rem;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.std-form input:focus,
.std-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(4, 107, 248, .15);
}
.std-form textarea { resize: vertical; min-height: 150px; }
.std-form .action { margin-top: 28px; }
.std-form .action .bt { width: 100%; }
.std-form .errorlist { list-style: none; color: #b42318; font-size: .9rem; margin: 6px 0 0; padding: 0; }
.std-form .g-recaptcha { margin: 18px 0; }

/* ---------- Cookie consent banner ---------- */
.cnil-warning {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 120;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(16, 24, 40, .08);
  padding: 18px 0;
}
.cnil-warning.show { display: block; }
.cnil-warning .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cnil-warning p { margin: 0; flex: 1 1 300px; color: var(--ink-soft); }
.cnil-warning p a { color: var(--brand-ink); text-decoration: underline; }
.cnil-warning .bt { flex: 0 0 auto; }

/* ---------- Footer ---------- */
footer {
  background: linear-gradient(135deg, var(--brand-deep-1), var(--brand-deep-2));
  color: #fff;
  padding: 72px 0 36px;
}
footer .row { row-gap: 36px; }
footer .c { flex: 1 1 200px; }
footer h2 {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 22px;
}
footer ul li { margin-bottom: 10px; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
}
.footer-social a:hover { background: rgba(255, 255, 255, .15); text-decoration: none; }
.footer-social svg { width: 20px; height: 20px; fill: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .2);
  margin-top: 48px;
  padding-top: 24px;
  font-size: .85rem;
  color: rgba(255, 255, 255, .7);
}

/* ---------- Rich text (RTE) ---------- */
.rte > h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin: 1.6em 0 .6em; }
.rte > h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); color: var(--brand-ink); margin: 1.6em 0 .6em; }
.rte > h3 { font-size: 1.4rem; margin: 1.4em 0 .5em; }
.rte > h4 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
.rte p { font-size: 1.0625rem; line-height: 1.8; margin-bottom: 1.4em; }
.rte a { color: var(--brand-ink); text-decoration: underline; }
.rte a:hover { color: var(--accent-ink); }
.rte .intro p { font-size: 1.3rem; color: var(--ink); }
.rte > ul, .rte > ol { font-size: 1.0625rem; margin: 0 0 1.6em; padding-left: 1.4em; }
.rte > ul { list-style: disc; }
.rte > ol { list-style: decimal; }
.rte > ul li, .rte > ol li { margin-top: .5em; line-height: 1.7; }
.rte img { border-radius: var(--radius); margin: .5em 0; }
.rte figcaption { font-size: .9rem; color: var(--ink-soft); padding-top: 8px; }
.rte .embed { position: relative; padding-bottom: 56.25%; margin: 1.5em 0; }
.rte .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.rte .separator, .separator { background: var(--border); width: 140px; height: 3px; border: 0; margin: 48px auto; }
.rte.rte-centered { text-align: center; }
.rte.rte-centered > ul, .rte.rte-centered > ol { display: inline-block; text-align: left; }
.rte pre {
  background: #1d1f21;
  color: #f8f8f2;
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .95rem;
}
.rte code { font-family: var(--font-mono); }

/* ---------- Alerts ---------- */
.alert {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.alert-success { background: #e7f6ec; border-color: #b7e4c7; color: #14532d; }
.alert-info { background: var(--tint-blue); border-color: #bcd4ff; color: #0a3aa8; }
.alert-danger { background: #fde8e8; border-color: #f6c2c2; color: #8a1c1c; }

/* ---------- Tabs (crowdfunding fallback when BS absent) ---------- */
.tab-content { padding: 24px 0; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .bt:hover, .item.shadow1:hover { transform: none; }
}
