:root {
      color-scheme: light;
      --bg: #f6f7fb;
      --bg-soft: rgba(255, 255, 255, 0.68);
      --surface: rgba(255, 255, 255, 0.74);
      --surface-strong: rgba(255, 255, 255, 0.92);
      --text: #111827;
      --muted: #667085;
      --border: rgba(17, 24, 39, 0.10);
      --accent: #2563eb;
      --accent-2: #7c3aed;
      --glow-1: rgba(37, 99, 235, 0.15);
      --glow-2: rgba(124, 58, 237, 0.13);
      --shadow: 0 24px 80px rgba(15, 23, 42, 0.10);
      --header-bg: rgba(246, 247, 251, 0.70);

      --hardware-overlay-edge:
        rgba(246, 247, 251, 0.95);

      --hardware-overlay-center:
        rgba(246, 247, 251, 0.80);
    }

    html[data-theme="dark"] {
      color-scheme: dark;
      --bg: #070b14;
      --bg-soft: rgba(15, 23, 42, 0.62);
      --surface: rgba(17, 24, 39, 0.68);
      --surface-strong: rgba(17, 24, 39, 0.90);
      --text: #f8fafc;
      --muted: #a7b0c0;
      --border: rgba(255, 255, 255, 0.09);
      --accent: #60a5fa;
      --accent-2: #a78bfa;
      --glow-1: rgba(37, 99, 235, 0.22);
      --glow-2: rgba(124, 58, 237, 0.20);
      --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
      --header-bg: rgba(7, 11, 20, 0.72);

      --hardware-overlay-edge:
        rgba(7, 11, 20, 0.91);

      --hardware-overlay-center:
        rgba(7, 11, 20, 0.70);
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      min-height: 100vh;
      overflow-x: hidden;
      font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
      background:
        linear-gradient(
          90deg,
          var(--hardware-overlay-edge) 0%,
          var(--hardware-overlay-center) 48%,
          var(--hardware-overlay-edge) 100%
        ),
        radial-gradient(
          circle at 15% 20%,
          var(--glow-1),
          transparent 30%
        ),
        radial-gradient(
          circle at 85% 75%,
          var(--glow-2),
          transparent 35%
        ),
        url("../img/hardware/server-closeup-kvistholt.webp")
          center 42% / cover
          no-repeat fixed,
        var(--bg);
      color: var(--text);
      transition: background-color .45s ease, color .45s ease;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      opacity: .25;
      background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
      background-size: 42px 42px;
      mask-image: linear-gradient(to bottom, black, transparent 85%);
      z-index: -3;
    }

    .container {
      width: min(1180px, calc(100% - 40px));
      margin-inline: auto;
    }

    header {
      position: sticky;
      top: 0;
      z-index: 20;
      border-bottom: 1px solid var(--border);
      background: var(--header-bg);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }

    nav {
      min-height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      color: var(--text);
      font-weight: 800;
      letter-spacing: -.02em;
    }

    
    .brand-mark {
      width: 44px;
      height: 44px;
      flex: 0 0 44px;

      display: block;

      object-fit: contain;

      border: 0;
      border-radius: 10px;

      background: transparent;

      filter:
        drop-shadow(
          0 3px 8px
          rgba(0, 120, 255, .18)
        );
    }

    .brand-name {
      font-weight: 800;
      letter-spacing: -.02em;
    }


    .nav-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .status {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      padding: 8px 12px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--surface);
      color: var(--muted);
      font-size: .88rem;
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #22c55e;
      box-shadow: 0 0 0 5px rgba(34, 197, 94, .10);
    }

    .theme-button {
      appearance: none;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      border-radius: 12px;
      min-width: 44px;
      height: 44px;
      padding: 0 13px;
      cursor: pointer;
      font: inherit;
      transition: transform .2s ease, background .2s ease;
    }

    .theme-button:hover {
      transform: translateY(-2px);
      background: var(--surface-strong);
    }

    main {
      min-height: calc(100vh - 73px);
      display: grid;
      align-items: center;
      padding: 72px 0 70px;
    }

    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr);
      align-items: center;
      gap: 60px;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      width: max-content;
      max-width: 100%;
      margin-bottom: 22px;
      padding: 9px 13px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--surface);
      color: var(--muted);
      font-size: .92rem;
    }

    .eyebrow strong {
      color: var(--accent);
      font-weight: 700;
    }

    h1 {
      max-width: 850px;
      margin: 0;
      font-size: clamp(3rem, 8vw, 7.1rem);
      line-height: .92;
      letter-spacing: -.07em;
      text-wrap: balance;
    }

    .gradient-text {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .lead {
      max-width: 690px;
      margin: 28px 0 0;
      color: var(--muted);
      font-size: clamp(1.05rem, 1.8vw, 1.25rem);
      line-height: 1.75;
    }

    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-top: 34px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 50px;
      padding: 0 20px;
      border-radius: 14px;
      border: 1px solid var(--border);
      text-decoration: none;
      font-weight: 700;
      transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
    }

    .btn:hover {
      transform: translateY(-2px);
    }

    .btn-primary {
      color: white;
      border-color: transparent;
      background: linear-gradient(135deg, #2563eb, #7c3aed);
      box-shadow: 0 15px 40px rgba(37, 99, 235, .20);
    }

    .btn-secondary {
      color: var(--text);
      background: var(--surface);
    }

    .panel {
      position: relative;
      overflow: hidden;
      min-height: 380px;
      padding: 28px;
      border: 1px solid var(--border);
      border-radius: 28px;
      background: var(--surface);
      box-shadow: var(--shadow);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }

    .panel::after {
      content: "";
      position: absolute;
      width: 210px;
      height: 210px;
      right: -65px;
      top: -55px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--glow-1), var(--glow-2));
      filter: blur(15px);
    }

    .terminal-dots {
      display: flex;
      gap: 8px;
      margin-bottom: 28px;
    }

    .terminal-dots span {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      background: var(--border);
    }

    .terminal {
      position: relative;
      z-index: 1;
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: .95rem;
      line-height: 1.8;
    }

    .terminal .prompt {
      color: var(--accent);
    }

    .terminal .muted {
      color: var(--muted);
    }

    .terminal .ok {
      color: #22c55e;
    }

    .stats {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-top: 28px;
    }

    .stat {
      padding: 15px;
      border: 1px solid var(--border);
      border-radius: 16px;
      background: rgba(255,255,255,.035);
    }

    .stat strong {
      display: block;
      margin-bottom: 4px;
      font-size: 1.1rem;
    }

    .stat span {
      color: var(--muted);
      font-size: .84rem;
    }

    footer {
      padding: 20px 0 34px;
      color: var(--muted);
      font-size: .9rem;
    }

    .footer-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 20px;
      border-top: 1px solid var(--border);
      padding-top: 22px;
    }

    @media (max-width: 900px) {
      .hero {
        grid-template-columns: 1fr;
        gap: 38px;
      }

      .panel {
        min-height: auto;
      }
    }

    @media (max-width: 620px) {
      .container {
        width: min(100% - 26px, 1180px);
      }

      .status {
        display: none;
      }

      main {
        padding-top: 48px;
      }

      h1 {
        font-size: clamp(3rem, 18vw, 5rem);
      }

      .actions,
      .btn {
        width: 100%;
      }

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

      .footer-row {
        flex-direction: column;
        align-items: flex-start;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
      }
    }

    /* =========================
       Linux identity / live clock
       ========================= */

    .linux-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 24px;
    }

    .linux-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 11px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--surface);
      color: var(--muted);
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: .78rem;
      backdrop-filter: blur(12px);
    }

    .linux-chip::before {
      content: "$";
      color: #22c55e;
      font-weight: 800;
    }

    .clock-card {
      position: relative;
      z-index: 2;
      margin-bottom: 22px;
      padding: 18px 18px 16px;
      border: 1px solid var(--border);
      border-radius: 18px;
      background:
        linear-gradient(135deg, rgba(34,197,94,.05), transparent 52%),
        rgba(255,255,255,.025);
      overflow: hidden;
    }

    .clock-card::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: #22c55e;
      opacity: .8;
    }

    .clock-label {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      color: var(--muted);
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: .76rem;
      text-transform: uppercase;
      letter-spacing: .08em;
    }

    .clock-label::before {
      content: "●";
      color: #22c55e;
      font-size: .65rem;
      filter: drop-shadow(0 0 7px rgba(34,197,94,.7));
    }

    .clock-time {
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: clamp(2rem, 4vw, 3.3rem);
      font-weight: 800;
      line-height: 1;
      letter-spacing: -.055em;
      font-variant-numeric: tabular-nums;
    }

    .clock-date {
      margin-top: 8px;
      color: var(--muted);
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: .86rem;
    }

    .terminal-titlebar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 24px;
    }

    .terminal-dots {
      margin-bottom: 0;
    }

    .terminal-title {
      color: var(--muted);
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: .76rem;
      white-space: nowrap;
    }

    .terminal-line {
      min-height: 1.8em;
    }

    .cursor {
      display: inline-block;
      width: .65em;
      height: 1.05em;
      margin-left: 3px;
      vertical-align: -.14em;
      background: #22c55e;
      animation: blink 1s steps(1) infinite;
    }

    @keyframes blink {
      50% { opacity: 0; }
    }

    .system-row {
      display: grid;
      grid-template-columns: 92px 1fr;
      gap: 10px;
      color: var(--muted);
    }

    .system-row b {
      color: var(--text);
      font-weight: 600;
    }

    .linux-wordmark {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      margin-top: 22px;
      color: var(--muted);
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-size: .84rem;
    }

    .linux-wordmark strong {
      color: var(--text);
    }

    .kernel-pulse {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #22c55e;
      box-shadow: 0 0 0 4px rgba(34,197,94,.10);
    }

    @media (max-width: 620px) {
      .terminal-title {
        display: none;
      }

      .clock-time {
        font-size: 2.35rem;
      }
    }


/* =========================
   Contact PHP
   ========================= */

.contact-section {
  padding: 20px 0 90px;
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 38px;
  align-items: start;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

.contact-copy h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.contact-copy > p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.contact-copy code {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.contact-terminal {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .82rem;
  line-height: 1.8;
}

.contact-form-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: var(--bg-soft);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow-1);
  background: var(--surface-strong);
}

.contact-submit {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
}

.form-alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  line-height: 1.5;
}

.form-alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.form-alert-success {
  background: rgba(34, 197, 94, .09);
  border-color: rgba(34, 197, 94, .25);
}

.form-alert-error {
  background: rgba(239, 68, 68, .08);
  border-color: rgba(239, 68, 68, .23);
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 900px) {
  .contact-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 20px;
  }
}




/* =========================
   Confirmation d'envoi — console compacte
   ========================= */

.send-console {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-left: 2px solid #22c55e;
  border-radius: 8px;
  background: rgba(5, 9, 15, .82);
  color: #c9d1d9;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .76rem;
  line-height: 1.55;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}

.send-console > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.send-console .prompt {
  color: #60a5fa;
}

.console-ok {
  color: #4ade80;
  font-weight: 700;
}

.console-done {
  color: #a78bfa;
  font-weight: 700;
}

.console-ready {
  margin-top: 4px;
  color: #7d8794;
}

.send-console .cursor {
  width: .55em;
  height: .9em;
  margin-left: 2px;
}

@media (max-width: 620px) {
  .send-console {
    padding: 10px 12px;
    font-size: .71rem;
  }
}


.contact-submit:disabled,
.contact-submit.is-sending {
  cursor: wait;
  opacity: .72;
  transform: none;
}







/* =========================
   Landing hauteur écran + contact modal centrée
   ========================= */

@media (min-width: 901px) and (min-height: 720px) {
  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  header {
    flex: 0 0 auto;
  }

  main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    padding: 28px 0 22px;
  }

  .hero {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
  }

  .lead {
    margin-top: 18px;
  }

  .actions {
    margin-top: 22px;
  }

  .linux-strip {
    margin-top: 16px;
  }

  .linux-wordmark {
    margin-top: 12px;
  }

  footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0 0 14px;
  }

  .footer-row {
    padding-top: 12px;
  }
}

/* Overlay discret : ne participe pas à la hauteur du document. */
#contact.contact-section {
  position: fixed;
  inset: 73px 0 0;
  z-index: 60;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(3, 7, 14, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
  transition: opacity .18s ease, visibility .18s ease;
}

#contact.contact-section.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-modal {
  position: relative;
  width: min(1080px, calc(100vw - 44px));
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 8%, var(--glow-2), transparent 30%),
    radial-gradient(circle at 8% 90%, var(--glow-1), transparent 34%),
    var(--bg);
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  scrollbar-width: thin;
}

#contact .contact-shell {
  width: 100%;
  margin: 0;
  padding-top: 0;
  border-top: 0;
  gap: 34px;
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: 400 1.5rem/1 system-ui, sans-serif;
}

.contact-close:hover {
  background: var(--surface-strong);
}

body.contact-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  #contact.contact-section {
    inset: 73px 0 0;
    padding: 14px;
    place-items: start center;
    overflow-y: auto;
  }

  .contact-modal {
    width: min(680px, calc(100vw - 28px));
    max-height: none;
    margin: 14px 0 24px;
    padding: 22px;
    overflow: visible;
  }

  #contact .contact-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .contact-modal {
    width: calc(100vw - 20px);
    padding: 18px;
    border-radius: 20px;
  }

  .contact-close {
    top: 10px;
    right: 10px;
  }
}


/* =========================
   YunoHost / system status
   ========================= */

.status-wrap {
  position: relative;
}

.status-trigger {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.status-trigger:hover {
  background: var(--surface-strong);
}

.status-dot.is-up {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.10);
}

.status-dot.is-degraded {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245,158,11,.10);
}

.status-dot.is-down {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239,68,68,.10);
}


.status-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 100;
  width: min(560px, calc(100vw - 30px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: 0 22px 65px rgba(0,0,0,.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.status-popover[hidden] {
  display: none;
}

.status-popover-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .72rem;
}

.status-popover-head strong {
  color: var(--text);
}

.status-popover-head span {
  color: var(--muted);
}

.status-service-list {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.status-service {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 31px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .74rem;
}

.status-service-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}

.status-service[data-state="up"] .status-service-dot {
  background: #22c55e;
}

.status-service[data-state="degraded"] .status-service-dot {
  background: #f59e0b;
}

.status-service[data-state="down"] .status-service-dot {
  background: #ef4444;
}

.status-service-state {
  font-weight: 700;
}

.status-service[data-state="up"] .status-service-state {
  color: #4ade80;
}

.status-service[data-state="degraded"] .status-service-state {
  color: #fbbf24;
}

.status-service[data-state="down"] .status-service-state {
  color: #f87171;
}

.status-loading {
  padding: 12px 2px 4px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .73rem;
}

@media (max-width: 620px) {
  .status-wrap {
    position: static;
  }

  .status-wrap > .status-trigger {
    display: none;
  }

  .status-popover {
    position: fixed;
    top: 82px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
  }
}


/* =========================
   Layout alignment refinements
   ========================= */

@media (min-width: 901px) {
  main > .hero {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
  }
}

.status-trigger {
  min-width: 156px;
  justify-content: center;
}

.status-popover-head {
  align-items: center;
}

.status-popover-head .status-refresh-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.status-popover-head .status-refresh-label::before {
  content: "↻";
  color: var(--accent);
}

@media (max-width: 1100px) and (min-width: 901px) {
  main > .hero {
    width: min(100% - 32px, 1180px);
    gap: 36px;
  }
}


/* =========================
   Hero live service status
   ========================= */

.hero-status-btn {
  gap: 9px;
  cursor: pointer;
  border: 0;
  font: inherit;
}

.hero-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #64748b;
}

.hero-status-dot.is-up {
  background: #86efac;
  box-shadow: 0 0 0 5px rgba(134,239,172,.12);
}

.hero-status-dot.is-degraded {
  background: #fbbf24;
  box-shadow: 0 0 0 5px rgba(251,191,36,.12);
}

.hero-status-dot.is-down {
  background: #f87171;
  box-shadow: 0 0 0 5px rgba(248,113,113,.12);
}






/* =========================
   Cloud sensor details
   ========================= */

.cloud-status-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.cloud-status-row {
  min-height: 34px;
}

.cloud-status-row > span:nth-child(2) {
  color: var(--text);
  font-weight: 700;
}

.cloud-status-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 5px 0 4px 20px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}

.cloud-status-details > div {
  min-width: 0;
}

.cloud-status-details span {
  display: block;
  color: var(--muted);
  font-size: .64rem;
  line-height: 1.25;
}

.cloud-status-details strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .70rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .cloud-status-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================
   Labeled sensor meter
   ========================= */

.service-sensor-meter-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
}

.service-sensor-meter {
  appearance: none;
  display: block;
  width: min(470px, 76%);
  padding: 8px 0;
  margin-inline: auto;
  transform: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform .18s ease;
}

.service-sensor-meter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 8px;
}

.service-sensor-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  background: transparent;
}

.service-sensor-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: 100%;
}

.service-sensor-label {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .70rem;
  font-weight: 650;
  line-height: 1;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-sensor-line {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #64748b;
  opacity: .97;
  box-shadow: 0 0 7px rgba(100, 116, 139, .10);
  transition:
    background-color .22s ease,
    box-shadow .22s ease,
    opacity .22s ease,
    transform .18s ease;
}

.service-sensor-line[data-state="up"] {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, .23);
}

.service-sensor-line[data-state="degraded"] {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, .25);
}

.service-sensor-line[data-state="down"] {
  background: #ef4444;
  box-shadow: 0 0 9px rgba(239, 68, 68, .30);
}


.service-sensor-meter:hover .service-sensor-line {
  transform: scaleX(1.008);
}

.service-sensor-meter:hover .service-sensor-label {
  color: var(--text);
}

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

@media (max-width: 620px) {
  .service-sensor-meter {
    width: min(360px, 92%);
    margin-inline: auto;
    transform: none;
  }

  .service-sensor-track {
    gap: 11px;
  }

  .service-sensor-row {
    gap: 5px;
  }

  .service-sensor-label {
    font-size: .66rem;
  }

  .service-sensor-line {
    height: 4px;
  }
}


/* =========================
   Status — détails réels
   ========================= */

.status-service {
  min-height: 42px;
}

.status-service-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.status-service-name {
  color: var(--text);
  line-height: 1.2;
}

.status-service-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: .61rem;
  font-weight: 400;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .status-service-copy small {
    white-space: normal;
  }
}

/* ===== STATUS PANEL V2 START ===== */

/*
 * Panneau de supervision :
 * - largeur confortable sur desktop
 * - détail technique lisible
 * - état clairement séparé du libellé
 */

.status-popover {
  width: min(480px, calc(100vw - 30px));
  padding: 16px;
}

.status-popover-head {
  padding-bottom: 12px;
}

.status-popover-head strong {
  font-size: .76rem;
  letter-spacing: .02em;
}

.status-service-list {
  gap: 5px;
  margin-top: 10px;
}

.status-service {
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 11px;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 9px;
}

.status-service:hover {
  background: color-mix(
    in srgb,
    var(--surface-strong) 82%,
    var(--text) 3%
  );
}

.status-service-dot {
  align-self: center;
}

.status-service-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.status-service-name {
  color: var(--text);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.2;
}

.status-service-copy small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-service-state {
  align-self: center;
  min-width: 70px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-align: center;
  font-size: .61rem;
  line-height: 1.2;
  letter-spacing: .025em;
}

.status-service[data-state="up"] .status-service-state {
  border-color: rgba(34, 197, 94, .22);
  background: rgba(34, 197, 94, .07);
}

.status-service[data-state="degraded"] .status-service-state {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .07);
}

.status-service[data-state="down"] .status-service-state {
  border-color: rgba(239, 68, 68, .24);
  background: rgba(239, 68, 68, .07);
}


/* Cloud */

.cloud-status-block {
  margin-top: 10px;
  padding-top: 10px;
}

.cloud-status-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 7px 0 3px 20px;
  padding: 10px;
}

.cloud-status-details > div {
  min-width: 0;
}

.cloud-status-details span {
  font-size: .61rem;
}

.cloud-status-details strong {
  margin-top: 3px;
  font-size: .69rem;
}


/* Mobile */

@media (max-width: 620px) {
  .status-popover {
    left: 10px;
    right: 10px;
    width: auto;
    padding: 14px;
  }

  .status-service {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 9px;
    padding-inline: 4px;
  }

  .status-service-state {
    min-width: 62px;
    padding-inline: 5px;
    font-size: .57rem;
  }

  .cloud-status-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 17px;
  }
}

@media (max-width: 390px) {
  .status-service {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .status-service-state {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    margin-top: 1px;
  }

  .cloud-status-details {
    grid-template-columns: 1fr;
  }
}

/* ===== STATUS PANEL V2 END ===== */

/* ===== SERVICE SENSOR METER V2 START ===== */

/*
 * Télémétrie services
 * placée sous :
 * kernel: libre • stable • sous contrôle
 */

.service-sensor-meter-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
}

.service-sensor-meter {
  display: grid;
  width: min(560px, 88%);
  gap: 7px;
  padding: 10px 14px 12px;
  margin-inline: auto;

  border: 1px solid color-mix(
    in srgb,
    var(--border) 72%,
    transparent
  );

  border-radius: 14px;

  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface-strong) 74%, transparent),
      color-mix(in srgb, var(--surface-strong) 42%, transparent)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 10px 28px rgba(0,0,0,.07);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.service-sensor-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 16px;
}

.service-sensor-label {
  min-width: 0;

  color: var(--muted);

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: .64rem;
  font-weight: 550;
  line-height: 1;
  letter-spacing: .025em;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-sensor-line {
  position: relative;
  display: block;
  width: 100%;
  height: 4px;

  overflow: hidden;
  border-radius: 999px;

  background:
    color-mix(in srgb, var(--muted) 15%, transparent);

  transition:
    background .25s ease,
    box-shadow .25s ease,
    opacity .25s ease;
}


/* UP — vert émeraude */

.service-sensor-line[data-state="up"] {
  background:
    linear-gradient(
      90deg,
      #34d399 0%,
      #22c55e 55%,
      #16a34a 100%
    );

  box-shadow:
    0 0 7px rgba(34,197,94,.30),
    0 0 16px rgba(34,197,94,.09);
}


/* DEGRADED — ambre */

.service-sensor-line[data-state="degraded"] {
  background:
    linear-gradient(
      90deg,
      #fcd34d 0%,
      #f59e0b 58%,
      #d97706 100%
    );

  box-shadow:
    0 0 7px rgba(245,158,11,.30),
    0 0 16px rgba(245,158,11,.09);
}


/* DOWN — rouge corail */

.service-sensor-line[data-state="down"] {
  background:
    linear-gradient(
      90deg,
      #fb7185 0%,
      #ef4444 58%,
      #dc2626 100%
    );

  box-shadow:
    0 0 7px rgba(239,68,68,.30),
    0 0 16px rgba(239,68,68,.09);
}


/*
 * Petit point lumineux en bout de ligne.
 */

.service-sensor-line[data-state]::after {
  content: "";
  position: absolute;

  top: 50%;
  right: 1px;

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: rgba(255,255,255,.72);

  transform: translateY(-50%);

  box-shadow:
    0 0 4px rgba(255,255,255,.55);
}


/* Interaction légère */

.service-sensor-row:hover .service-sensor-label {
  color: var(--text);
}

.service-sensor-row:hover .service-sensor-line {
  filter: brightness(1.08);
}


/* Mobile */

@media (max-width: 620px) {
  .service-sensor-meter {
    width: min(100% - 28px, 520px);
    padding: 10px 11px;
    gap: 6px;
  }

  .service-sensor-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .service-sensor-label {
    font-size: .60rem;
  }

  .service-sensor-line {
    height: 4px;
  }
}

/* ===== SERVICE SENSOR METER V2 END ===== */


/* ============================================================
   Contact — information confidentialité
   ============================================================ */

.form-privacy-note {
  margin: 11px 0 0;

  color: var(--muted);

  font-size: .68rem;
  line-height: 1.5;
}

.form-privacy-note a {
  color: var(--accent);
  text-decoration: none;
}

.form-privacy-note a:hover {
  text-decoration: underline;
}

.form-privacy-note a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =========================
 *  Public domains uptime
 *  ========================= */

.domains-status-block {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.domains-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;

  font-family:
  "SFMono-Regular",
  Consolas,
  "Liberation Mono",
  monospace;

  font-size: .68rem;
}

.domains-status-head strong {
  color: var(--text);
}

.domains-status-head span {
  color: var(--muted);
}

.domains-status-list {
  display: grid;
  gap: 3px;
}

.domain-status-row {
  display: grid;

  grid-template-columns:
  8px
  minmax(130px, 1fr)
  minmax(92px, auto)
  minmax(86px, auto);

  align-items: center;
  gap: 9px;

  min-height: 42px;
  padding: 5px 4px;

  border-radius: 8px;

  font-family:
  "SFMono-Regular",
  Consolas,
  "Liberation Mono",
  monospace;
}

.domain-status-row:hover {
  background: rgba(255,255,255,.025);
}

.domain-status-copy,
.domain-status-availability,
.domain-status-network {
  min-width: 0;
}

.domain-status-copy strong,
.domain-status-availability strong,
.domain-status-network strong {
  display: block;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--text);

  font-size: .69rem;
  font-weight: 650;
}

.domain-status-copy small,
.domain-status-availability small,
.domain-status-network small {
  display: block;

  margin-top: 2px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--muted);

  font-size: .58rem;
}

.domain-status-availability,
.domain-status-network {
  text-align: right;
}

.domain-status-row[data-state="up"]
.status-service-dot {
  background: #22c55e;
}

.domain-status-row[data-state="degraded"]
.status-service-dot {
  background: #f59e0b;
}

.domain-status-row[data-state="down"]
.status-service-dot {
  background: #ef4444;
}

.domain-status-row[data-state="up"]
.domain-status-availability strong {
  color: #4ade80;
}

.domain-status-row[data-state="degraded"]
.domain-status-availability strong {
  color: #fbbf24;
}

.domain-status-row[data-state="down"]
.domain-status-availability strong {
  color: #f87171;
}

@media (max-width: 620px) {
  .domain-status-row {
    grid-template-columns:
    8px
    minmax(105px, 1fr)
    72px;
  }

  .domain-status-network {
    display: none;
  }
}

/* ============================================================
 *  Softcloud 2.0 — hardware background integration
 *  ============================================================ */

.panel {
  background:
  color-mix(
    in srgb,
    var(--surface) 90%,
            transparent
  );
}

.service-sensor-meter {
  background:
  color-mix(
    in srgb,
    var(--surface-strong) 84%,
            transparent
  );
}

header {
  background:
  color-mix(
    in srgb,
    var(--header-bg) 94%,
            transparent
  );
}

@media (max-width: 900px) {
  body {
    background-attachment:
    scroll,
    scroll,
    scroll,
    scroll,
    scroll;
  }
}

/* ============================================================
 * System update reports modal
 * ============================================================ */

.system-update-modal {
  position: fixed;
  inset: 0;
  z-index: 150;

  display: grid;
  place-items: center;

  padding: 22px;

  background: rgba(3, 7, 14, .72);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
  opacity .18s ease,
  visibility .18s ease;
}

.system-update-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.system-update-dialog {
  position: relative;

  display: flex;
  flex-direction: column;

  width: min(1120px, calc(100vw - 44px));
  height: min(820px, calc(100dvh - 100px));

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 26px;

  background:
  radial-gradient(
    circle at 92% 8%,
    var(--glow-2),
                  transparent 30%
  ),
  radial-gradient(
    circle at 8% 90%,
    var(--glow-1),
                  transparent 34%
  ),
  var(--bg);

  box-shadow:
  0 30px 90px rgba(0, 0, 0, .45);
}

.system-update-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;

  width: 36px;
  height: 36px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;

  font:
  400 1.5rem/1
  system-ui,
  sans-serif;
}

.system-update-close:hover {
  background: var(--surface-strong);
}

.system-update-head {
  padding: 24px 64px 12px 24px;
}

.system-update-head .eyebrow {
  margin-bottom: 12px;
}

.system-update-head h2 {
  margin: 0;

  font-size:
  clamp(1.8rem, 4vw, 2.8rem);

  letter-spacing: -.045em;
}

.system-update-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.system-update-tabs {
  display: flex;
  gap: 8px;

  padding: 0 24px 16px;
}

.system-update-tab {
  padding: 8px 14px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: var(--surface);
  color: var(--muted);

  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
}

.system-update-tab:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.system-update-tab.is-active {
  border-color:
  color-mix(
    in srgb,
    var(--accent) 60%,
            var(--border)
  );

  background:
  color-mix(
    in srgb,
    var(--accent) 12%,
            var(--surface)
  );

  color: var(--accent);
}

.system-update-report-wrap {
  position: relative;

  flex: 1;
  min-height: 0;

  margin: 0 24px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: #fff;
}

.system-update-frame {
  display: block;

  width: 100%;
  height: 100%;

  border: 0;
  background: #fff;
}

.system-update-loading {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  padding: 30px;

  background: var(--surface-strong);
  color: var(--muted);

  font-family:
  "SFMono-Regular",
  Consolas,
  "Liberation Mono",
  monospace;

  font-size: .8rem;
}

.system-update-loading[hidden],
.system-update-frame[hidden] {
  display: none;
}

.system-update-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 14px 24px 18px;

  color: var(--muted);

  font-family:
  "SFMono-Regular",
  Consolas,
  "Liberation Mono",
  monospace;

  font-size: .69rem;
}

.system-update-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-update-footer a {
  flex: 0 0 auto;

  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.system-update-footer a:hover {
  text-decoration: underline;
}

body.system-update-open {
  overflow: hidden;
}

#system-update-trigger {
cursor: pointer;
font: inherit;
}


@media (max-width: 700px) {
  .system-update-modal {
    padding: 0;
  }

  .system-update-dialog {
    width: 100%;
    height: 100dvh;

    border: 0;
    border-radius: 0;
  }

  .system-update-head {
    padding:
    18px 54px
    10px 16px;
  }

  .system-update-tabs {
    padding:
    0 16px 12px;
  }

  .system-update-report-wrap {
    margin: 0 12px;
    border-radius: 12px;
  }

  .system-update-footer {
    padding:
    12px 16px 14px;

    flex-direction: column;
    align-items: flex-start;

    gap: 6px;
  }
}


/* ============================================================
 * System update reports — secure/mobile V3
 * ============================================================ */

.system-update-content[hidden],
.system-update-auth[hidden] {
  display: none !important;
}

.system-update-dialog {
  width: min(1180px, calc(100vw - 40px));
  height: min(860px, calc(100dvh - 78px));
}

.system-update-auth {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 10px 24px 28px;
}

.system-update-login {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px 16px;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 10%, var(--glow-2), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.system-update-auth-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 1.7rem;
}

.system-update-login strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.system-update-login p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.system-update-login label,
.system-update-auth-error,
.system-update-login-submit {
  grid-column: 1 / -1;
}

.system-update-login label {
  display: grid;
  gap: 7px;
}

.system-update-login label > span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

.system-update-login input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}

.system-update-login input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow-1);
}

.system-update-auth-error {
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 10px;
  background: rgba(239, 68, 68, .08);
  color: #f87171;
  font-size: .76rem;
}

.system-update-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.system-update-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px 14px;
}

.system-update-toolbar .system-update-tabs {
  padding: 0;
}

.system-update-logout {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
}

.system-update-logout:hover {
  background: var(--surface);
  color: var(--text);
}

.system-update-report-wrap {
  min-height: 300px;
  background: #fff;
}

.system-update-frame {
  min-width: 0;
}

@media (max-width: 700px) {
  .system-update-modal {
    padding: 0;
    place-items: stretch;
  }

  .system-update-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .system-update-head {
    flex: 0 0 auto;
    padding: 14px 52px 10px 14px;
    border-bottom: 1px solid var(--border);
  }

  .system-update-head .eyebrow {
    margin-bottom: 7px;
    padding: 6px 9px;
    font-size: .7rem;
  }

  .system-update-head h2 {
    font-size: 1.4rem;
    line-height: 1.1;
  }

  .system-update-head p {
    margin-top: 5px;
    font-size: .72rem;
    line-height: 1.4;
  }

  .system-update-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .system-update-auth {
    align-items: start;
    padding: 16px 12px;
    overflow-y: auto;
  }

  .system-update-login {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px 12px;
    padding: 16px;
    border-radius: 16px;
  }

  .system-update-auth-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.3rem;
  }

  .system-update-toolbar {
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
  }

  .system-update-tabs {
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .system-update-tabs::-webkit-scrollbar {
    display: none;
  }

  .system-update-tab {
    flex: 0 0 auto;
    padding: 8px 12px;
  }

  .system-update-logout {
    padding: 8px 9px;
    font-size: 0;
  }

  .system-update-logout::before {
    content: "↪";
    font-size: 1rem;
  }

  .system-update-report-wrap {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    border-width: 0;
    border-radius: 0;
  }

  .system-update-frame {
    width: 100%;
    height: 100%;
  }

  .system-update-loading {
    padding: 22px 16px;
    text-align: center;
  }

  .system-update-footer {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    padding: 9px 12px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface-strong);
    font-size: .61rem;
  }

  .system-update-footer span {
    min-width: 0;
  }

  .system-update-footer a {
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  .system-update-head .eyebrow {
    display: none;
  }

  .system-update-head h2 {
    padding-top: 3px;
  }

  .system-update-login {
    grid-template-columns: 1fr;
  }

  .system-update-auth-icon {
    display: none;
  }

  .system-update-login > div:nth-child(2) {
    grid-column: 1;
  }

  .system-update-footer span {
    display: none;
  }

  .system-update-footer {
    justify-content: flex-end;
  }
}

/* ============================================================
 * Softcloud Community / Telegram bridge
 * ============================================================ */

.community-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;

  display: none;
  place-items: center;

  padding: 20px;

  background: rgba(8, 12, 20, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.community-modal.is-open {
  display: grid;
}

.community-dialog {
  position: relative;

  width: min(760px, calc(100vw - 40px));
  height: min(650px, calc(100dvh - 40px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 22px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(248, 250, 252, 0.98)
    );

  color: #172033;

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.10);
}

/* ------------------------------------------------------------
 * Header
 * ------------------------------------------------------------ */

.community-head {
  flex: 0 0 auto;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;

  padding: 24px 72px 20px 26px;

  border-bottom: 1px solid rgba(15, 23, 42, 0.08);

  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.045),
      transparent 48%
    );
}

.community-head > div:first-child {
  min-width: 0;
}

.community-head .eyebrow {
  margin-bottom: 13px;
}

.community-head h2 {
  margin: 0 0 6px;

  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.community-head p {
  max-width: 590px;
  margin: 0;

  color: rgba(23, 32, 51, 0.68);

  font-size: 0.94rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------
 * État
 * ------------------------------------------------------------ */

.community-state {
  position: absolute;
  top: 22px;
  right: 66px;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  padding: 5px 10px;

  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 999px;

  background: rgba(16, 185, 129, 0.08);

  color: #08795b;

  font-size: 0.72rem;
  font-weight: 700;
}

.community-state::before {
  content: "";

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #10b981;

  box-shadow:
    0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* ------------------------------------------------------------
 * Fermeture
 * ------------------------------------------------------------ */

.community-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 3;

  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;

  padding: 0;

  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;

  background: rgba(15, 23, 42, 0.045);
  color: #172033;

  font-size: 22px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.16s ease,
    transform 0.16s ease;
}

.community-close:hover {
  background: rgba(15, 23, 42, 0.09);
  transform: scale(1.04);
}

/* ------------------------------------------------------------
 * Zone de conversation
 * ------------------------------------------------------------ */

.community-messages {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;

  padding: 22px 24px 26px;

  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(37, 99, 235, 0.035),
      transparent 35%
    ),
    rgba(248, 250, 252, 0.72);

  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.community-empty {
  display: grid;
  place-items: center;

  min-height: 100%;

  color: rgba(23, 32, 51, 0.46);

  font-size: 0.9rem;
  text-align: center;
}

/* ------------------------------------------------------------
 * Messages
 * ------------------------------------------------------------ */

.community-message {
  width: fit-content;
  max-width: min(76%, 560px);

  margin: 0 0 14px;

  padding: 11px 14px 12px;

  border-radius: 17px;

  background: #ffffff;

  border: 1px solid rgba(15, 23, 42, 0.08);

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.04);
}

.community-message[data-source="telegram"] {
  margin-right: auto;

  border-bottom-left-radius: 5px;
}

.community-message[data-source="site"] {
  margin-left: auto;

  border-color: rgba(37, 99, 235, 0.12);

  border-bottom-right-radius: 5px;

  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.105),
      rgba(59, 130, 246, 0.055)
    );
}

.community-message-head {
  display: flex;
  align-items: center;
  gap: 7px;

  margin-bottom: 5px;

  min-width: 0;
}

.community-message-head strong {
  overflow: hidden;

  color: #172033;

  font-size: 0.79rem;
  font-weight: 750;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-message-source {
  flex: 0 0 auto;

  padding: 2px 6px;

  border-radius: 999px;

  background: rgba(15, 23, 42, 0.055);

  color: rgba(23, 32, 51, 0.55);

  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
}

.community-message[data-source="site"]
.community-message-source {
  background: rgba(37, 99, 235, 0.10);
  color: #2563eb;
}

.community-message-head time {
  flex: 0 0 auto;

  margin-left: auto;

  color: rgba(23, 32, 51, 0.42);

  font-size: 0.68rem;
}

.community-message-text {
  color: #1f2937;

  font-size: 0.94rem;
  line-height: 1.45;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------
 * Composer
 * ------------------------------------------------------------ */

.community-form {
  position: relative;

  flex: 0 0 auto;

  display: grid;
  grid-template-columns:
    minmax(125px, 150px)
    minmax(0, 1fr)
    auto;

  gap: 10px;
  align-items: end;

  padding: 14px 18px 12px;

  border-top: 1px solid rgba(15, 23, 42, 0.08);

  background: rgba(255, 255, 255, 0.96);
}

.community-field {
  display: grid;
  gap: 5px;
}

.community-field > span {
  padding-left: 3px;

  color: rgba(23, 32, 51, 0.56);

  font-size: 0.68rem;
  font-weight: 750;

  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.community-field input,
.community-field textarea {
  width: 100%;
  box-sizing: border-box;

  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 12px;

  background: #f8fafc;
  color: #172033;

  font: inherit;
  font-size: 0.9rem;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.community-field input {
  height: 44px;

  padding: 0 12px;
}

.community-field textarea {
  min-height: 44px;
  max-height: 110px;

  padding: 11px 12px;

  resize: vertical;
}

.community-field input::placeholder,
.community-field textarea::placeholder {
  color: rgba(23, 32, 51, 0.38);
}

.community-field input:focus,
.community-field textarea:focus {
  outline: none;

  border-color: rgba(37, 99, 235, 0.48);

  background: #ffffff;

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.09);
}

.community-send {
  height: 44px;

  padding-inline: 18px;

  border-color: #2563eb;

  background: #2563eb;
  color: #ffffff;
}

.community-send:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.community-send:disabled {
  opacity: 0.55;
  cursor: wait;
}

.community-feedback {
  grid-column: 1 / -1;

  min-height: 16px;

  padding-left: 3px;

  color: rgba(23, 32, 51, 0.58);

  font-size: 0.72rem;
}

/* Honeypot */

.community-honeypot {
  position: absolute !important;
  left: -10000px !important;

  width: 1px !important;
  height: 1px !important;

  overflow: hidden !important;
}

/* Blocage du scroll arrière-plan */

body.community-open {
  overflow: hidden;
}

/* ------------------------------------------------------------
 * Dark mode
 * ------------------------------------------------------------ */

:root[data-theme="dark"] .community-modal {
  background: rgba(0, 0, 0, 0.68);
}

:root[data-theme="dark"] .community-dialog {
  border-color: rgba(255, 255, 255, 0.08);

  background:
    linear-gradient(
      180deg,
      rgba(14, 20, 31, 0.99),
      rgba(10, 15, 24, 0.99)
    );

  color: #e5e7eb;

  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.58);
}

:root[data-theme="dark"] .community-head {
  border-bottom-color: rgba(255, 255, 255, 0.07);

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.08),
      transparent 50%
    );
}

:root[data-theme="dark"] .community-head p {
  color: rgba(229, 231, 235, 0.63);
}

:root[data-theme="dark"] .community-close {
  border-color: rgba(255, 255, 255, 0.07);

  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

:root[data-theme="dark"] .community-close:hover {
  background: rgba(255, 255, 255, 0.11);
}

:root[data-theme="dark"] .community-messages {
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(59, 130, 246, 0.08),
      transparent 38%
    ),
    rgba(8, 13, 22, 0.75);
}

:root[data-theme="dark"] .community-empty {
  color: rgba(229, 231, 235, 0.42);
}

:root[data-theme="dark"] .community-message {
  border-color: rgba(255, 255, 255, 0.07);

  background: rgba(255, 255, 255, 0.055);

  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"]
.community-message[data-source="site"] {
  border-color: rgba(59, 130, 246, 0.20);

  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.27),
      rgba(59, 130, 246, 0.13)
    );
}

:root[data-theme="dark"]
.community-message-head strong {
  color: #f1f5f9;
}

:root[data-theme="dark"]
.community-message-source {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(229, 231, 235, 0.56);
}

:root[data-theme="dark"]
.community-message[data-source="site"]
.community-message-source {
  background: rgba(96, 165, 250, 0.13);
  color: #93c5fd;
}

:root[data-theme="dark"]
.community-message-head time {
  color: rgba(229, 231, 235, 0.38);
}

:root[data-theme="dark"]
.community-message-text {
  color: #e5e7eb;
}

:root[data-theme="dark"] .community-form {
  border-top-color: rgba(255, 255, 255, 0.07);

  background: rgba(12, 18, 28, 0.98);
}

:root[data-theme="dark"]
.community-field > span {
  color: rgba(229, 231, 235, 0.48);
}

:root[data-theme="dark"]
.community-field input,
:root[data-theme="dark"]
.community-field textarea {
  border-color: rgba(255, 255, 255, 0.09);

  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

:root[data-theme="dark"]
.community-field input:focus,
:root[data-theme="dark"]
.community-field textarea:focus {
  border-color: rgba(96, 165, 250, 0.48);

  background: rgba(255, 255, 255, 0.07);

  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.12);
}

:root[data-theme="dark"]
.community-field input::placeholder,
:root[data-theme="dark"]
.community-field textarea::placeholder {
  color: rgba(229, 231, 235, 0.30);
}

:root[data-theme="dark"]
.community-feedback {
  color: rgba(229, 231, 235, 0.48);
}

/* ------------------------------------------------------------
 * Mobile
 * ------------------------------------------------------------ */

@media (max-width: 720px) {
  .community-modal {
    padding: 8px;
  }

  .community-dialog {
    width: 100%;
    height: calc(100dvh - 16px);

    border-radius: 17px;
  }

  .community-head {
    padding:
      20px
      56px
      16px
      18px;
  }

  .community-head p {
    font-size: 0.86rem;
  }

  .community-state {
    display: none;
  }

  .community-close {
    top: 12px;
    right: 12px;
  }

  .community-messages {
    padding: 16px 12px 20px;
  }

  .community-message {
    max-width: 88%;
  }

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

    gap: 8px;

    padding: 12px;
  }

  .community-field > span {
    display: none;
  }

  .community-field input,
  .community-field textarea {
    font-size: 16px;
  }

  .community-field input {
    height: 42px;
  }

  .community-field textarea {
    min-height: 48px;
  }

  .community-send {
    width: 100%;
  }

  .community-feedback {
    min-height: 0;
  }
}


/* ============================================================
 * Softcloud Community UX v2
 * ============================================================ */

/*
 * État réel de connexion
 */

.community-state[data-state="connecting"] {
  border-color: rgba(100, 116, 139, 0.18);
  background: rgba(100, 116, 139, 0.08);
  color: #64748b;
}

.community-state[data-state="connecting"]::before {
  background: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.13);

  animation:
    community-pulse 1.2s ease-in-out infinite;
}

.community-state[data-state="online"] {
  border-color: rgba(16, 185, 129, 0.16);
  background: rgba(16, 185, 129, 0.08);
  color: #08795b;
}

.community-state[data-state="online"]::before {
  background: #10b981;

  box-shadow:
    0 0 0 3px rgba(16, 185, 129, 0.12);
}

.community-state[data-state="offline"] {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.community-state[data-state="offline"]::before {
  background: #ef4444;

  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.12);
}

@keyframes community-pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}


/*
 * Une ligne = avatar + bulle.
 *
 * On neutralise ici l'ancien style directement porté
 * par .community-message.
 */

.community-message {
  display: flex;
  align-items: flex-end;
  gap: 9px;

  width: 100%;
  max-width: none;

  margin: 0 0 14px;
  padding: 0;

  border: 0;

  background: transparent;

  box-shadow: none;
}

.community-message[data-source="telegram"] {
  margin-right: 0;

  border: 0;

  background: transparent;
}

.community-message[data-source="site"] {
  flex-direction: row-reverse;

  margin-left: 0;

  border: 0;

  background: transparent;
}


/*
 * Avatar
 */

.community-message-avatar {
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;

  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.11),
      rgba(14, 165, 233, 0.07)
    );

  color: #36506f;

  font-size: 0.67rem;
  font-weight: 800;

  letter-spacing: 0.02em;

  user-select: none;
}

.community-message[data-source="site"]
.community-message-avatar {
  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.18),
      rgba(59, 130, 246, 0.10)
    );

  color: #1d4ed8;
}


/*
 * Bulle
 */

.community-message-bubble {
  width: fit-content;
  max-width: min(76%, 550px);

  padding: 11px 14px 12px;

  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 17px;

  background: #ffffff;

  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.04);
}

.community-message[data-source="telegram"]
.community-message-bubble {
  border-bottom-left-radius: 5px;
}

.community-message[data-source="site"]
.community-message-bubble {
  border-color: rgba(37, 99, 235, 0.13);

  border-bottom-right-radius: 5px;

  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.11),
      rgba(59, 130, 246, 0.055)
    );
}


/*
 * Métadonnées du composer
 */

.community-field-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  min-height: 16px;

  padding: 0 3px;

  color: rgba(23, 32, 51, 0.44);

  font-size: 0.66rem;
  line-height: 1.2;
}

.community-shortcut {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-counter {
  flex: 0 0 auto;

  font-variant-numeric:
    tabular-nums;

  transition:
    color 0.15s ease;
}

.community-counter[data-state="warning"] {
  color: #b45309;
  font-weight: 700;
}

.community-counter[data-state="limit"] {
  color: #dc2626;
  font-weight: 800;
}


/*
 * Feedback d'envoi
 */

.community-feedback[data-kind="success"] {
  color: #08795b;
}

.community-feedback[data-kind="error"] {
  color: #b91c1c;
  font-weight: 650;
}


/*
 * Dark mode
 */

:root[data-theme="dark"]
.community-message-avatar {
  border-color: rgba(255, 255, 255, 0.08);

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.20),
      rgba(14, 165, 233, 0.10)
    );

  color: #bfdbfe;
}

:root[data-theme="dark"]
.community-message[data-source="site"]
.community-message-avatar {
  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.36),
      rgba(59, 130, 246, 0.18)
    );

  color: #dbeafe;
}

:root[data-theme="dark"]
.community-message-bubble {
  border-color: rgba(255, 255, 255, 0.07);

  background: rgba(255, 255, 255, 0.055);

  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"]
.community-message[data-source="site"]
.community-message-bubble {
  border-color: rgba(59, 130, 246, 0.20);

  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.27),
      rgba(59, 130, 246, 0.13)
    );
}

:root[data-theme="dark"]
.community-field-meta {
  color: rgba(229, 231, 235, 0.38);
}

:root[data-theme="dark"]
.community-counter[data-state="warning"] {
  color: #fbbf24;
}

:root[data-theme="dark"]
.community-counter[data-state="limit"] {
  color: #f87171;
}

:root[data-theme="dark"]
.community-feedback[data-kind="success"] {
  color: #6ee7b7;
}

:root[data-theme="dark"]
.community-feedback[data-kind="error"] {
  color: #fca5a5;
}


/*
 * Mobile
 */

@media (max-width: 720px) {
  .community-message {
    gap: 7px;
  }

  .community-message-avatar {
    width: 28px;
    height: 28px;

    font-size: 0.60rem;
  }

  .community-message-bubble {
    max-width: calc(88% - 36px);
  }

  .community-shortcut {
    display: none;
  }

  .community-field-meta {
    justify-content: flex-end;
  }
}

/* ============================================================
 * Softcloud Community — notifications fermées
 * ============================================================ */

.community-trigger {
  position: relative;
  gap: 9px;
  overflow: visible;
}

.community-unread-badge {
  display: inline-grid;
  place-items: center;

  min-width: 20px;
  height: 20px;
  padding: 0 6px;

  border: 2px solid var(--bg);
  border-radius: 999px;

  background: #ef4444;
  color: #ffffff;

  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;

  box-shadow:
    0 4px 12px rgba(239, 68, 68, 0.30);
}

.community-unread-badge[hidden] {
  display: none !important;
}

.community-trigger.has-unread {
  border-color:
    color-mix(
      in srgb,
      #ef4444 34%,
      var(--border)
    );

  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.07);
}

.community-trigger.has-unread::after {
  content: "";

  position: absolute;
  top: -4px;
  right: -4px;

  width: 9px;
  height: 9px;

  border: 2px solid var(--bg);
  border-radius: 50%;

  background: #ef4444;

  animation:
    community-notification-pulse 1.8s ease-in-out infinite;
}

@keyframes community-notification-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(239, 68, 68, 0.30);
  }

  50% {
    box-shadow:
      0 0 0 7px rgba(239, 68, 68, 0);
  }
}

.community-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2300;

  display: flex;
  align-items: center;
  gap: 11px;

  width: min(390px, calc(100vw - 32px));
  padding: 12px 14px;

  border: 1px solid var(--border);
  border-radius: 15px;

  background:
    color-mix(
      in srgb,
      var(--surface-strong) 96%,
      transparent
    );

  color: var(--text);

  box-shadow:
    0 18px 54px rgba(15, 23, 42, 0.20);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  cursor: pointer;
  font: inherit;
  text-align: left;

  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;

  transition:
    opacity 0.20s ease,
    transform 0.20s ease;
}

.community-toast[hidden] {
  display: none !important;
}

.community-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.community-toast-dot {
  flex: 0 0 auto;

  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: #ef4444;

  box-shadow:
    0 0 0 5px rgba(239, 68, 68, 0.10);
}

.community-toast-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.community-toast-copy strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.community-toast-copy > span {
  overflow: hidden;

  color: var(--muted);

  font-size: 0.74rem;
  line-height: 1.35;

  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-theme="dark"]
.community-unread-badge,
:root[data-theme="dark"]
.community-trigger.has-unread::after {
  border-color: #070b14;
}

:root[data-theme="dark"]
.community-toast {
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.48);
}

@media (max-width: 620px) {
  .community-unread-badge {
    min-width: 19px;
    height: 19px;
    padding-inline: 5px;
  }

  .community-toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));

    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-trigger.has-unread::after {
    animation: none;
  }
}

/* ============================================================
 * Softcloud Community — replies / system / Telegram link
 * ============================================================ */

.community-telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  width: fit-content;
  margin-top: 12px;

  color: #2563eb;

  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
}

.community-telegram-link:hover {
  text-decoration: underline;
}

.community-telegram-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
  border-radius: 5px;
}

.community-telegram-link[hidden] {
  display: none !important;
}

.community-message-reply-button {
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  width: 24px;
  height: 24px;
  margin-left: 1px;
  padding: 0;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: rgba(23, 32, 51, 0.42);

  cursor: pointer;

  font: 700 0.84rem/1 system-ui, sans-serif;

  opacity: 0;

  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.community-message:hover
.community-message-reply-button,
.community-message-reply-button:focus-visible {
  opacity: 1;
}

.community-message-reply-button:hover,
.community-message-reply-button:focus-visible {
  outline: none;
  background: rgba(37, 99, 235, 0.09);
  color: #2563eb;
}

.community-message-reply {
  position: relative;

  display: grid;
  gap: 2px;

  margin: 3px 0 8px;
  padding: 7px 9px 7px 12px;

  overflow: hidden;

  border-radius: 9px;

  background: rgba(15, 23, 42, 0.045);
  color: rgba(23, 32, 51, 0.68);

  cursor: default;
}

.community-message-reply::before {
  content: "";

  position: absolute;
  inset: 0 auto 0 0;

  width: 3px;

  background: #2563eb;
}

.community-message-reply[role="button"] {
  cursor: pointer;
}

.community-message-reply[role="button"]:hover {
  background: rgba(37, 99, 235, 0.07);
}

.community-message-reply[role="button"]:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

.community-message-reply strong {
  overflow: hidden;

  color: #2563eb;

  font-size: 0.68rem;
  font-weight: 800;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-message-reply span {
  overflow: hidden;

  font-size: 0.72rem;
  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-message.is-highlighted
.community-message-bubble {
  animation: community-message-highlight 1.5s ease;
}

@keyframes community-message-highlight {
  0%, 100% {
    box-shadow:
      0 2px 8px rgba(15, 23, 42, 0.04);
  }

  30% {
    box-shadow:
      0 0 0 4px rgba(37, 99, 235, 0.14),
      0 5px 20px rgba(37, 99, 235, 0.12);
  }
}

.community-system-message {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;

  width: min(92%, 620px);
  margin: 10px auto 16px;
  padding: 6px 10px;

  color: rgba(23, 32, 51, 0.48);

  font-size: 0.70rem;
  line-height: 1.35;
  text-align: center;
}

.community-system-message::before {
  content: "";

  flex: 1 1 auto;
  height: 1px;

  background: rgba(15, 23, 42, 0.08);
}

.community-system-message::after {
  content: "";

  flex: 1 1 auto;
  height: 1px;

  background: rgba(15, 23, 42, 0.08);
}

.community-system-message > span {
  flex: 0 1 auto;
}

.community-system-message time {
  flex: 0 0 auto;
  color: rgba(23, 32, 51, 0.35);
  font-size: 0.64rem;
}

.community-reply-compose {
  grid-column: 1 / -1;

  position: relative;

  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;

  min-width: 0;
  padding: 8px 8px 8px 0;

  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 11px;

  background: rgba(37, 99, 235, 0.055);
}

.community-reply-compose[hidden] {
  display: none !important;
}

.community-reply-compose-bar {
  align-self: stretch;

  border-radius: 999px;

  background: #2563eb;
}

.community-reply-compose-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.community-reply-compose-copy strong {
  overflow: hidden;

  color: #2563eb;

  font-size: 0.69rem;
  font-weight: 800;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-reply-compose-copy > span {
  overflow: hidden;

  color: rgba(23, 32, 51, 0.58);

  font-size: 0.71rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-reply-cancel {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;
  padding: 0;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: rgba(23, 32, 51, 0.52);

  cursor: pointer;

  font: 500 1.1rem/1 system-ui, sans-serif;
}

.community-reply-cancel:hover,
.community-reply-cancel:focus-visible {
  outline: none;
  background: rgba(15, 23, 42, 0.06);
  color: #172033;
}

.community-toast[data-kind="system"]
.community-toast-dot {
  background: #2563eb;

  box-shadow:
    0 0 0 5px rgba(37, 99, 235, 0.10);
}

:root[data-theme="dark"]
.community-telegram-link {
  color: #93c5fd;
}

:root[data-theme="dark"]
.community-message-reply-button {
  color: rgba(229, 231, 235, 0.42);
}

:root[data-theme="dark"]
.community-message-reply-button:hover,
:root[data-theme="dark"]
.community-message-reply-button:focus-visible {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

:root[data-theme="dark"]
.community-message-reply {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(229, 231, 235, 0.62);
}

:root[data-theme="dark"]
.community-message-reply[role="button"]:hover {
  background: rgba(96, 165, 250, 0.10);
}

:root[data-theme="dark"]
.community-message-reply strong {
  color: #93c5fd;
}

:root[data-theme="dark"]
.community-system-message {
  color: rgba(229, 231, 235, 0.42);
}

:root[data-theme="dark"]
.community-system-message::before,
:root[data-theme="dark"]
.community-system-message::after {
  background: rgba(255, 255, 255, 0.07);
}

:root[data-theme="dark"]
.community-system-message time {
  color: rgba(229, 231, 235, 0.30);
}

:root[data-theme="dark"]
.community-reply-compose {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(59, 130, 246, 0.10);
}

:root[data-theme="dark"]
.community-reply-compose-bar {
  background: #60a5fa;
}

:root[data-theme="dark"]
.community-reply-compose-copy strong {
  color: #93c5fd;
}

:root[data-theme="dark"]
.community-reply-compose-copy > span {
  color: rgba(229, 231, 235, 0.52);
}

:root[data-theme="dark"]
.community-reply-cancel {
  color: rgba(229, 231, 235, 0.50);
}

:root[data-theme="dark"]
.community-reply-cancel:hover,
:root[data-theme="dark"]
.community-reply-cancel:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}

@media (hover: none) {
  .community-message-reply-button {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .community-telegram-link {
    margin-top: 9px;
    font-size: 0.71rem;
  }

  .community-message-reply-button {
    opacity: 1;
  }

  .community-system-message {
    width: 96%;
    gap: 6px;
    font-size: 0.66rem;
  }

  .community-system-message time {
    display: none;
  }

  .community-reply-compose {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-message.is-highlighted
  .community-message-bubble {
    animation: none;
    outline: 3px solid rgba(37, 99, 235, 0.16);
  }
}

/* ============================================================
 * Softcloud Community — pièces jointes
 * ============================================================ */

.community-attachment-compose {
  grid-column: 2 / 3;

  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;

  min-width: 0;
}

.community-attachment-button {
  position: relative;
  appearance: none;
  font-family: inherit;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 34px;
  padding: 6px 10px;

  border: 1px solid rgba(15, 23, 42, 0.11);
  border-radius: 10px;

  background: rgba(248, 250, 252, 0.94);
  color: rgba(23, 32, 51, 0.68);

  cursor: pointer;

  font-size: 0.72rem;
  font-weight: 750;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.community-attachment-button:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.06);
  color: #1d4ed8;
}

.community-attachment-button:focus-within {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.community-attachment-input {
  position: fixed !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.community-attachment-selected {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;
  max-width: min(100%, 390px);
  min-height: 34px;
  padding: 5px 6px 5px 9px;

  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 10px;

  background: rgba(37, 99, 235, 0.055);
}

.community-attachment-selected[hidden] {
  display: none !important;
}

.community-attachment-selected-icon {
  flex: 0 0 auto;
  font-size: 0.9rem;
}

.community-attachment-selected-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.community-attachment-selected-copy strong,
.community-attachment-selected-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-attachment-selected-copy strong {
  color: #1e3a5f;
  font-size: 0.70rem;
  font-weight: 750;
}

.community-attachment-selected-copy small {
  color: rgba(23, 32, 51, 0.48);
  font-size: 0.63rem;
}

.community-attachment-remove {
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  width: 26px;
  height: 26px;
  padding: 0;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: rgba(23, 32, 51, 0.48);

  cursor: pointer;
  font: 500 1.05rem/1 system-ui, sans-serif;
}

.community-attachment-remove:hover,
.community-attachment-remove:focus-visible {
  outline: none;
  background: rgba(15, 23, 42, 0.06);
  color: #172033;
}

.community-attachment-help {
  flex: 1 1 150px;

  color: rgba(23, 32, 51, 0.40);
  font-size: 0.64rem;
  line-height: 1.3;
}

.community-message-attachment {
  overflow: hidden;

  margin-top: 8px;

  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;

  background: rgba(248, 250, 252, 0.72);
  color: inherit;

  text-decoration: none;
}

.community-message-attachment:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.50);
  outline-offset: 2px;
}

.community-message-attachment-image {
  display: grid;

  width: min(100%, 340px);
}

.community-message-attachment-image img {
  display: block;

  width: 100%;
  max-height: 310px;

  object-fit: contain;

  background: rgba(15, 23, 42, 0.035);
}

.community-message-attachment-image:hover img {
  opacity: 0.96;
}

.community-message-attachment-video {
  display: grid;
  width: min(100%, 340px);
}

.community-message-attachment-video video {
  display: block;
  width: 100%;
  max-height: 310px;
  background: #000;
}

.community-message-attachment-video-link {
  color: inherit;
  text-decoration: none;
}

.community-message-album {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;

  overflow: hidden;
  width: min(100%, 340px);
  margin-top: 8px;

  border-radius: 13px;
  background: rgba(15, 23, 42, 0.035);
}

.community-message-album-item {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background: rgba(15, 23, 42, 0.055);
}

.community-message-album.is-three
.community-message-album-item:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

.community-message-album.is-many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-message-album-item img,
.community-message-album-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-message-album-item video {
  background: #000;
}

.community-message-album-item.is-image:hover img {
  opacity: 0.96;
}

:root[data-theme="dark"]
.community-message-album {
  background: rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"]
.community-message-album-item {
  background: rgba(0, 0, 0, 0.24);
}

.community-message-attachment-file {
  display: flex;
  align-items: center;
  gap: 10px;

  width: min(100%, 360px);
  padding: 9px 11px;
}

.community-message-attachment-file:hover {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.055);
}

.community-message-attachment-icon {
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;

  border-radius: 9px;

  background: rgba(37, 99, 235, 0.09);

  font-size: 0.95rem;
}

.community-message-attachment-meta {
  display: grid;
  min-width: 0;
  gap: 2px;

  padding: 7px 9px;
}

.community-message-attachment-file
.community-message-attachment-meta {
  padding: 0;
}

.community-message-attachment-meta strong,
.community-message-attachment-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-message-attachment-meta strong {
  color: #1f2937;
  font-size: 0.72rem;
  font-weight: 750;
}

.community-message-attachment-meta small {
  color: rgba(23, 32, 51, 0.44);
  font-size: 0.64rem;
}

:root[data-theme="dark"]
.community-attachment-button {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(229, 231, 235, 0.62);
}

:root[data-theme="dark"]
.community-attachment-button:hover {
  border-color: rgba(96, 165, 250, 0.30);
  background: rgba(96, 165, 250, 0.10);
  color: #bfdbfe;
}

:root[data-theme="dark"]
.community-attachment-selected {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(59, 130, 246, 0.10);
}

:root[data-theme="dark"]
.community-attachment-selected-copy strong {
  color: #dbeafe;
}

:root[data-theme="dark"]
.community-attachment-selected-copy small,
:root[data-theme="dark"]
.community-attachment-help {
  color: rgba(229, 231, 235, 0.42);
}

:root[data-theme="dark"]
.community-attachment-remove {
  color: rgba(229, 231, 235, 0.48);
}

:root[data-theme="dark"]
.community-attachment-remove:hover,
:root[data-theme="dark"]
.community-attachment-remove:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}

:root[data-theme="dark"]
.community-message-attachment {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

:root[data-theme="dark"]
.community-message-attachment-image img {
  background: rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"]
.community-message-attachment-file:hover {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.09);
}

:root[data-theme="dark"]
.community-message-attachment-icon {
  background: rgba(96, 165, 250, 0.12);
}

:root[data-theme="dark"]
.community-message-attachment-meta strong {
  color: #e5e7eb;
}

:root[data-theme="dark"]
.community-message-attachment-meta small {
  color: rgba(229, 231, 235, 0.42);
}

@media (max-width: 720px) {
  .community-attachment-compose {
    grid-column: 1 / -1;
    order: 1;
  }

  .community-send {
    order: 2;
  }

  .community-feedback {
    order: 3;
  }

  .community-attachment-selected {
    max-width: 100%;
  }

  .community-message-attachment-image,
  .community-message-attachment-video {
  display: grid;
  width: min(100%, 340px);
}

.community-message-attachment-video video {
  display: block;
  width: 100%;
  max-height: 310px;
  background: #000;
}

.community-message-attachment-video-link {
  color: inherit;
  text-decoration: none;
}

.community-message-album {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;

  overflow: hidden;
  width: min(100%, 340px);
  margin-top: 8px;

  border-radius: 13px;
  background: rgba(15, 23, 42, 0.035);
}

.community-message-album-item {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background: rgba(15, 23, 42, 0.055);
}

.community-message-album.is-three
.community-message-album-item:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

.community-message-album.is-many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-message-album-item img,
.community-message-album-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-message-album-item video {
  background: #000;
}

.community-message-album-item.is-image:hover img {
  opacity: 0.96;
}

:root[data-theme="dark"]
.community-message-album {
  background: rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"]
.community-message-album-item {
  background: rgba(0, 0, 0, 0.24);
}

.community-message-attachment-file {
    width: 100%;
  }

  .community-message-attachment-image img {
    max-height: 260px;
  }

  .community-message-attachment-video video {
    max-height: 260px;
  }
}

/* =========================
 * Community — suppression synchronisée
 * ========================= */
.community-message-delete-button {
  appearance: none;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin-left: 2px;
  border: 1px solid color-mix(in srgb, #ef4444 26%, var(--border));
  border-radius: 9px;
  background: color-mix(in srgb, #ef4444 7%, transparent);
  color: #dc2626;
  font: inherit;
  font-size: 1.08rem;
  line-height: 1;
  cursor: pointer;
  opacity: .62;
  transition:
    opacity .16s ease,
    transform .16s ease,
    background .16s ease,
    border-color .16s ease;
}

.community-message:hover
.community-message-delete-button,
.community-message-delete-button:focus-visible {
  opacity: 1;
}

.community-message-delete-button:hover,
.community-message-delete-button:focus-visible {
  transform: translateY(-1px);
  background: color-mix(in srgb, #ef4444 13%, transparent);
  border-color: color-mix(in srgb, #ef4444 45%, var(--border));
  outline: none;
}

.community-message-delete-button[aria-busy="true"],
.community-message-delete-button:disabled {
  cursor: wait;
  opacity: .38;
  transform: none;
}

:root[data-theme="dark"]
.community-message-delete-button {
  color: #fca5a5;
  background: color-mix(in srgb, #ef4444 10%, transparent);
}

@media (max-width: 640px) {
  .community-message-delete-button {
    opacity: .88;
  }
}

/* Softcloud Community UX v3 — mobile + Telegram */

.community-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-title-row h2 {
  margin: 0;
  line-height: 1.15;
}

.community-telegram-link {
  flex: 0 0 32px;

  display: inline-grid;
  place-items: center;

  width: 32px;
  height: 32px;

  /* Neutralise le margin-top: 12px défini plus haut. */
  margin: 0;
  padding: 0;

  border: 1px solid rgba(34, 158, 217, .20);
  border-radius: 50%;

  background: rgba(34, 158, 217, .09);
  color: #229ed9;

  line-height: 1;
  text-decoration: none;

  transition:
    transform .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.community-telegram-link svg {
  display: block;
  width: 16px;
  height: 16px;
}

.community-telegram-link:hover,
.community-telegram-link:focus-visible {
  transform: translateY(-1px);

  background: rgba(34, 158, 217, .16);

  box-shadow:
    0 5px 16px rgba(34, 158, 217, .16);
}

.community-telegram-link:focus-visible {
  outline: 2px solid #229ed9;
  outline-offset: 2px;
}

.community-messages {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overscroll-behavior: contain;
}


/* Mobile */

@media (max-width: 720px) {

  .community-modal {
    padding: 0;
  }

  .community-dialog {
    width: 100%;
    max-width: none;

    height: 100dvh;
    max-height: 100dvh;

    border: 0;
    border-radius: 0;
  }

  .community-head {
    padding:
      max(10px, env(safe-area-inset-top))
      50px
      9px
      12px;
  }

  .community-head .eyebrow {
    margin-bottom: 6px;
    padding: 4px 8px;

    font-size: .70rem;
  }

  .community-head h2 {
    margin: 0;
    font-size: 1.08rem;
  }

  /*
   * Sur mobile le texte explicatif prend beaucoup trop
   * de hauteur par rapport à la zone de conversation.
   */
  .community-head p {
    display: none;
  }

  .community-title-row {
    gap: 8px;
  }

  .community-telegram-link {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .community-telegram-link svg {
    width: 15px;
    height: 15px;
  }

  .community-close {
    top: max(7px, env(safe-area-inset-top));
    right: 8px;
  }

  /*
   * C'est désormais cette zone qui absorbe toute
   * la hauteur disponible.
   */
  .community-messages {
    flex: 1 1 auto;
    min-height: 0;

    padding: 9px 10px 12px;

    overflow-y: auto;
  }

  .community-message {
    max-width: 100%;
    margin-bottom: 9px;
  }

  .community-message-bubble {
    max-width: calc(100% - 40px);
  }

  /*
   * Composeur compact :
   *
   * ligne 1 : message
   * ligne 2 : pseudo + Envoyer
   */
  .community-form {
    flex: 0 0 auto;

    grid-template-columns:
      minmax(0, 1fr)
      auto;

    gap: 6px;

    padding:
      8px
      10px
      max(8px, env(safe-area-inset-bottom));

    box-shadow:
      0 -8px 22px rgba(15, 23, 42, .06);
  }

  .community-field-message {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .community-form
  .community-field:not(.community-field-message) {
    grid-column: 1;
    grid-row: 2;
  }

  .community-send {
    grid-column: 2;
    grid-row: 2;

    width: auto;
    min-width: 88px;
    height: 42px;

    padding-inline: 13px;
  }

  .community-field textarea {
    min-height: 44px;
    max-height: 86px;

    resize: none;
  }

  .community-field input {
    height: 42px;
  }

  .community-field-meta {
    min-height: 0;
  }

  .community-shortcut {
    display: none;
  }

  .community-feedback {
    grid-column: 1 / -1;

    min-height: 0;
    margin: 0;
  }
}


/* Dark mode */

:root[data-theme="dark"]
.community-telegram-link {
  border-color: rgba(56, 189, 248, .20);

  background: rgba(14, 165, 233, .10);
  color: #38bdf8;
}


/* ============================================================
 * Softcloud Community — lien texte Telegram
 * Ne pas confondre avec l'icône ronde du titre
 * ============================================================ */

#community-telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  width: max-content;
  max-width: 100%;
  height: auto;

  margin-top: 12px;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;
  color: #229ed9;

  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.3;

  text-decoration: none;
  white-space: nowrap;

  box-shadow: none;
  transform: none;
}

#community-telegram-link:hover,
#community-telegram-link:focus-visible {
  width: max-content;

  background: transparent;
  box-shadow: none;
  transform: none;

  text-decoration: underline;
}

#community-telegram-link:focus-visible {
  outline: 2px solid #229ed9;
  outline-offset: 4px;
  border-radius: 4px;
}

:root[data-theme="dark"] #community-telegram-link {
  background: transparent;
  color: #38bdf8;
}

@media (max-width: 720px) {
  #community-telegram-link {
    width: max-content;
    height: auto;

    margin-top: 9px;

    font-size: 0.71rem;
  }
}



/* Community — connexion Telegram QR */
.community-telegram-auth {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 8px;
}

.community-telegram-auth-button {
  appearance: none;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.07);
  color: #1d4ed8;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.community-telegram-auth-button:hover,
.community-telegram-auth-button:focus-visible {
  outline: none;
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(37, 99, 235, 0.12);
}

.community-telegram-auth-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.community-telegram-auth-help {
  color: rgba(23, 32, 51, 0.46);
  font-size: 0.66rem;
  line-height: 1.35;
}

.community-telegram-qr-overlay[hidden] {
  display: none;
}

.community-telegram-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

.community-telegram-qr-card {
  position: relative;
  width: min(100%, 390px);
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  color: #172033;
  text-align: center;
}

.community-telegram-qr-card h3 {
  margin: 0 34px 8px;
  font-size: 1.05rem;
}

.community-telegram-qr-card p {
  margin: 0;
  color: rgba(23, 32, 51, 0.62);
  font-size: 0.76rem;
  line-height: 1.5;
}

.community-telegram-qr-close {
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(23, 32, 51, 0.55);
  font: 600 1.2rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.community-telegram-qr-close:hover,
.community-telegram-qr-close:focus-visible {
  outline: none;
  background: rgba(15, 23, 42, 0.07);
  color: #172033;
}

.community-telegram-qr-image {
  display: block;
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 18px auto 12px;
  border-radius: 14px;
  background: #ffffff;
}

.community-telegram-qr-image:not([src]) {
  visibility: hidden;
}

.community-telegram-qr-status {
  min-height: 1.5em;
  font-weight: 650;
}

:root[data-theme="dark"]
.community-telegram-auth-button {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.10);
  color: #bfdbfe;
}

:root[data-theme="dark"]
.community-telegram-auth-help {
  color: rgba(229, 231, 235, 0.46);
}

:root[data-theme="dark"]
.community-telegram-qr-card {
  border-color: rgba(255, 255, 255, 0.09);
  background: #111827;
  color: #f8fafc;
}

:root[data-theme="dark"]
.community-telegram-qr-card p {
  color: rgba(229, 231, 235, 0.64);
}

:root[data-theme="dark"]
.community-telegram-qr-close {
  color: rgba(229, 231, 235, 0.58);
}

:root[data-theme="dark"]
.community-telegram-qr-close:hover,
:root[data-theme="dark"]
.community-telegram-qr-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

@media (max-width: 560px) {
  .community-telegram-auth {
    align-items: stretch;
    flex-direction: column;
  }

  .community-telegram-auth-button {
    width: 100%;
  }

  .community-telegram-qr-overlay {
    padding: 12px;
  }

  .community-telegram-qr-card {
    padding: 20px 16px;
  }
}



/* Community — connexion Telegram téléphone + code */
.community-telegram-qr-card {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

.community-telegram-qr-image[hidden] {
  display: none;
}

.community-telegram-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: rgba(23, 32, 51, 0.44);
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.community-telegram-auth-divider::before,
.community-telegram-auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
}

.community-telegram-auth-divider[hidden] {
  display: none;
}

.community-telegram-phone,
.community-telegram-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 10px 0;
}

.community-telegram-phone[hidden],
.community-telegram-code[hidden] {
  display: none;
}

.community-telegram-phone input,
.community-telegram-code input {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: #f8fafc;
  color: #172033;
  font: inherit;
}

.community-telegram-phone button,
.community-telegram-code button {
  appearance: none;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #2563eb;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.community-telegram-phone button:disabled,
.community-telegram-code button:disabled {
  opacity: 0.58;
  cursor: wait;
}

:root[data-theme="dark"]
.community-telegram-auth-divider {
  color: rgba(229, 231, 235, 0.44);
}

:root[data-theme="dark"]
.community-telegram-auth-divider::before,
:root[data-theme="dark"]
.community-telegram-auth-divider::after {
  background: rgba(255, 255, 255, 0.10);
}

:root[data-theme="dark"]
.community-telegram-phone input,
:root[data-theme="dark"]
.community-telegram-code input {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  color: #f8fafc;
}

@media (max-width: 560px) {
  .community-telegram-phone,
  .community-telegram-code {
    grid-template-columns: 1fr;
  }

  .community-telegram-phone button,
  .community-telegram-code button {
    width: 100%;
  }
}


/* Community — connexion Telegram QR Point 2 */
.community-telegram-auth-button.is-connected {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.09);
  color: #15803d;
  cursor: default;
}

.community-telegram-auth-logout {
  appearance: none;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.055);
  color: #b91c1c;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}

.community-telegram-auth-logout:hover,
.community-telegram-auth-logout:focus-visible {
  outline: none;
  border-color: rgba(239, 68, 68, 0.30);
  background: rgba(239, 68, 68, 0.10);
}

.community-telegram-2fa {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 16px 0 10px;
}

.community-telegram-2fa[hidden] {
  display: none;
}

.community-telegram-2fa input {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: #f8fafc;
  color: #172033;
  font: inherit;
}

.community-telegram-2fa button {
  appearance: none;
  padding: 0 13px;
  border: 1px solid #2563eb;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

:root[data-theme="dark"] .community-telegram-auth-button.is-connected {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.10);
  color: #86efac;
}

:root[data-theme="dark"] .community-telegram-auth-logout {
  border-color: rgba(248, 113, 113, 0.20);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

:root[data-theme="dark"] .community-telegram-2fa input {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  color: #f8fafc;
}

@media (max-width: 560px) {
  .community-telegram-auth-logout {
    width: 100%;
  }

  .community-telegram-2fa {
    grid-template-columns: 1fr;
  }

  .community-telegram-2fa button {
    min-height: 40px;
  }
}


/* Community — Point 3 Telegram owner/avatar */
.community-telegram-auth-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.08);
}

.community-telegram-auth-avatar[hidden] {
  display: none;
}

.community-message-avatar {
  overflow: hidden;
}

.community-message-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-message-edit-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.58;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.community-message-edit-button:hover,
.community-message-edit-button:focus-visible {
  opacity: 1;
  outline: none;
}

/* Community — connexion Telegram mobile */
.community-telegram-mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.75rem;
  text-align: center;
  text-decoration: none;
}

.community-telegram-mobile-link[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .community-telegram-mobile-link {
    min-height: 44px;
  }
}


/* ==========================================================================
   SOFTCLOUD SHOWCASE UI V1
   Harmonisation visuelle destinée au portfolio et aux écrans mobiles.
   ========================================================================== */

/* ---------- Base / rythme ---------- */

main,
.hero,
.panel,
.status-popover,
.community-dialog {
  min-width: 0;
}

.hero > *,
.panel > *,
.community-dialog > * {
  min-width: 0;
}

.hero {
  gap: clamp(34px, 5vw, 60px);
}

.lead {
  max-width: 720px;
}

.actions {
  align-items: center;
}

.btn {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.btn-primary {
  box-shadow:
    0 14px 34px rgba(37, 99, 235, .20),
    0 2px 8px rgba(15, 23, 42, .08);
}

.btn-secondary {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- Supervision / header ---------- */

.status {
  min-height: 40px;
  padding-inline: 13px;
  font-weight: 650;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 8px 24px rgba(15,23,42,.05);
}

.status-dot {
  box-shadow:
    0 0 0 5px rgba(34,197,94,.10),
    0 0 16px rgba(34,197,94,.35);
}

.status-popover {
  border-radius: 18px;
  box-shadow:
    0 24px 70px rgba(15,23,42,.16),
    0 2px 10px rgba(15,23,42,.06);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.status-service {
  border-radius: 10px;
  transition:
    background .16s ease,
    transform .16s ease;
}

.status-service:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  transform: translateX(2px);
}

/* ---------- Hero : capteur d'état ---------- */

.service-sensor-meter-wrap {
  margin-top: 18px;
}

.service-sensor-meter {
  border-radius: 14px;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.service-sensor-meter:hover,
.service-sensor-meter:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: 0 12px 34px rgba(15,23,42,.08);
}

.service-sensor-track {
  overflow: visible;
}

.service-sensor-line {
  transition:
    transform .16s ease,
    filter .16s ease;
}

.service-sensor-line:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* ---------- Panneau système ---------- */

.panel {
  border-color: color-mix(in srgb, var(--accent) 12%, var(--border));
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--surface-strong) 84%, transparent),
      color-mix(in srgb, var(--surface) 92%, transparent)
    );
  box-shadow:
    0 30px 90px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.clock-card {
  border-color: color-mix(in srgb, #22c55e 16%, var(--border));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.clock-time {
  text-shadow: 0 8px 28px rgba(15,23,42,.08);
}

.terminal {
  overflow-wrap: anywhere;
}

.system-row {
  grid-template-columns: 96px minmax(0, 1fr);
}

.system-row b {
  overflow-wrap: anywhere;
}

.stat {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 10%, var(--border));
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.018)
    );
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--accent-2)
  );
  opacity: .65;
}

/* ---------- Community : modal ---------- */

.community-dialog {
  width: min(980px, calc(100vw - 36px));
  max-width: 980px;
  border-radius: 26px;
  overflow: hidden;
  border-color: color-mix(in srgb, #2563eb 15%, var(--border));
  box-shadow:
    0 36px 110px rgba(15,23,42,.24),
    0 2px 16px rgba(15,23,42,.08);
}

.community-head {
  position: relative;
  gap: 18px;
  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(37,99,235,.10),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      rgba(37,99,235,.045),
      transparent 58%
    );
}

.community-title-row {
  gap: 12px;
}

.community-head h2 {
  letter-spacing: -.035em;
}

.community-head p {
  max-width: 720px;
}

/* Telegram : lien compact, pas d'icône géante */
.community-telegram-link,
#community-telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 999px;
  background: rgba(37,99,235,.07);
  color: #2563eb;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none;
}

.community-telegram-link svg,
#community-telegram-link svg,
.community-telegram-link img,
#community-telegram-link img {
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  flex: 0 0 17px !important;
  object-fit: contain;
}

.community-telegram-link:hover,
.community-telegram-link:focus-visible,
#community-telegram-link:hover,
#community-telegram-link:focus-visible {
  border-color: rgba(37,99,235,.34);
  background: rgba(37,99,235,.11);
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* ---------- Community : messages ---------- */

.community-messages {
  scrollbar-width: thin;
  scrollbar-color:
    color-mix(in srgb, #2563eb 26%, transparent)
    transparent;
}

.community-message {
  border-radius: 15px;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.community-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15,23,42,.055);
}

.community-message-text {
  overflow-wrap: anywhere;
}

.community-message-attachment-file {
  max-width: 100%;
}

.community-message-attachment-meta {
  min-width: 0;
}

/* ---------- Community : composer ---------- */

.community-form {
  grid-template-columns:
    minmax(120px, 145px)
    minmax(0, 1fr)
    auto;
  gap: 10px;
}

.community-field {
  min-width: 0;
}

.community-field input,
.community-field textarea {
  min-width: 0;
}

.community-send {
  min-width: 112px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(37,99,235,.16);
}

.community-attachment-button {
  border-radius: 11px;
}

/* ---------- Dark mode ---------- */

:root[data-theme="dark"] .panel {
  background:
    linear-gradient(
      145deg,
      rgba(17,24,39,.84),
      rgba(10,15,24,.82)
    );
}

:root[data-theme="dark"] .status,
:root[data-theme="dark"] .status-popover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 20px 60px rgba(0,0,0,.30);
}

:root[data-theme="dark"] .community-telegram-link,
:root[data-theme="dark"] #community-telegram-link {
  border-color: rgba(96,165,250,.22);
  background: rgba(59,130,246,.10);
  color: #bfdbfe;
}

/* ---------- Mobile / Galaxy S21 ---------- */

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  main {
    padding-top: 38px;
    padding-bottom: 46px;
  }

  .hero {
    gap: 28px;
  }

  h1 {
    font-size: clamp(2.75rem, 16vw, 4.5rem);
    line-height: .94;
  }

  .lead {
    margin-top: 22px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .actions {
    margin-top: 26px;
    gap: 10px;
  }

  .linux-strip {
    margin-top: 18px;
    gap: 8px;
  }

  .linux-chip {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .clock-card {
    padding: 16px;
    border-radius: 15px;
  }

  .clock-time {
    font-size: clamp(2rem, 12vw, 2.55rem);
  }

  .terminal {
    font-size: .82rem;
    line-height: 1.7;
  }

  .system-row {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
  }

  .community-dialog {
    width: calc(100vw - 14px);
    max-width: none;
    max-height: calc(100dvh - 14px);
    border-radius: 20px;
  }

  .community-head {
    padding-left: 16px;
    padding-right: 52px;
  }

  .community-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .community-telegram-link,
  #community-telegram-link {
    width: fit-content;
    max-width: 100%;
    font-size: .72rem;
  }

  .community-form {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .community-field,
  .community-field-message,
  .community-attachment-compose,
  .community-send,
  .community-feedback {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .community-send {
    width: 100%;
  }

  .community-message-attachment-image,
  .community-message-attachment-video,
  .community-message-attachment-file,
  .community-message-album {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .container {
    width: calc(100% - 20px);
  }

  nav {
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .theme-button {
    min-width: 40px;
    height: 40px;
    padding-inline: 10px;
  }

  .panel {
    padding: 17px;
  }

  .system-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .stats {
    gap: 9px;
  }

  .stat {
    padding: 13px;
  }

  .community-dialog {
    width: calc(100vw - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: 17px;
  }

  .community-head {
    padding-left: 13px;
    padding-right: 48px;
  }

  .community-message {
    max-width: 94%;
  }
}

/* ==========================================================================
   COMMUNITY READING SPACE V1.1
   Davantage d'espace vertical pour la lecture des messages.
   ========================================================================== */

@media (min-width: 721px) {
  .community-dialog {
    height: min(820px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
  }

  .community-head {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .community-messages {
    flex: 1 1 360px;
    min-height: 280px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .community-form {
    flex: 0 0 auto;
  }
}

/* Écrans intermédiaires : conserver au moins une vraie zone de conversation. */
@media (min-width: 721px) and (max-height: 760px) {
  .community-dialog {
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .community-head {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .community-messages {
    min-height: 240px;
  }
}

/* Mobile : le modal reste plein écran et les messages prennent le maximum. */
@media (max-width: 720px) {
  .community-dialog {
    height: 100dvh;
    max-height: 100dvh;
  }

  .community-messages {
    flex: 1 1 auto;
    min-height: 220px;
  }
}

/* ==========================================================================
   ILOTH VPN V1 — schéma original inspiré du principe pédagogique de
   La Brique Internet (sans reprise de son illustration).
   ========================================================================== */
.iloth-vpn { margin:clamp(24px,5vw,68px) auto; padding:clamp(24px,4vw,42px); border:1px solid var(--border); border-radius:30px; background:color-mix(in srgb,var(--surface-strong) 88%,transparent); box-shadow:var(--shadow); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); }
.iloth-vpn-head { display:flex; align-items:center; gap:clamp(18px,4vw,34px); }
.iloth-vpn-logo { width:clamp(100px,15vw,170px); max-height:90px; object-fit:contain; flex:0 0 auto; }
.iloth-vpn-head h2 { margin:6px 0 12px; font-size:clamp(1.8rem,4vw,3rem); letter-spacing:-.045em; line-height:1; }
.iloth-vpn-head p { margin:0; max-width:820px; color:var(--muted); line-height:1.7; }
.iloth-vpn-values { display:flex; flex-wrap:wrap; gap:9px; margin:24px 0; }
.iloth-vpn-values span { padding:8px 12px; border:1px solid color-mix(in srgb,var(--accent) 28%,var(--border)); border-radius:999px; background:color-mix(in srgb,var(--accent) 7%,transparent); font-size:.82rem; font-weight:750; }
.iloth-vpn-schema { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,.55fr) minmax(0,1fr) minmax(100px,.55fr) minmax(0,1fr); align-items:center; gap:12px; margin:28px 0; }
.iloth-vpn-node { min-width:0; min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:20px; border:1px solid var(--border); border-radius:22px; background:var(--surface); text-align:center; }
.iloth-vpn-node--iloth { border-color:color-mix(in srgb,var(--accent) 55%,var(--border)); background:color-mix(in srgb,var(--accent) 9%,var(--surface)); }
.iloth-vpn-icon { font-size:2rem; color:var(--accent); }
.iloth-vpn-node small,.iloth-vpn-link small { color:var(--muted); line-height:1.35; }
.iloth-vpn-link { display:flex; flex-direction:column; align-items:center; gap:5px; text-align:center; font-size:.78rem; }
.iloth-vpn-link-line { width:100%; height:3px; border-radius:999px; background:linear-gradient(90deg,var(--accent),var(--accent-2)); position:relative; }
.iloth-vpn-link-line::after { content:""; position:absolute; right:-1px; top:50%; width:10px; height:10px; border-top:3px solid var(--accent-2); border-right:3px solid var(--accent-2); transform:translateY(-50%) rotate(45deg); }
.iloth-vpn-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.iloth-vpn-grid article { padding:18px; border:1px solid var(--border); border-radius:18px; background:var(--bg-soft); }
.iloth-vpn-grid strong { display:block; margin-bottom:8px; }
.iloth-vpn-grid p { margin:0; color:var(--muted); line-height:1.55; font-size:.92rem; }
.iloth-vpn-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.iloth-vpn-note { margin:16px 0 0; color:var(--muted); font-size:.82rem; line-height:1.5; }
@media (max-width:860px) {
  .iloth-vpn-head { align-items:flex-start; flex-direction:column; }
  .iloth-vpn-schema { grid-template-columns:1fr; }
  .iloth-vpn-link { min-height:70px; justify-content:center; }
  .iloth-vpn-link-line { width:3px; height:44px; background:linear-gradient(180deg,var(--accent),var(--accent-2)); }
  .iloth-vpn-link-line::after { right:50%; top:auto; bottom:-1px; transform:translateX(50%) rotate(135deg); }
  .iloth-vpn-grid { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .iloth-vpn { border-radius:22px; padding:20px; }
  .iloth-vpn-actions .btn { width:100%; justify-content:center; text-align:center; }
}


/* ==========================================================================
   ILOTH v1.2 — section indépendante centrée sous le Hero
   ========================================================================== */

main > .iloth-vpn {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(calc(100% - 40px), 1180px);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 720px) {
  main > .iloth-vpn {
    width: min(calc(100% - 24px), 1180px);
  }
}

@media (max-width: 390px) {
  main > .iloth-vpn {
    width: calc(100% - 20px);
  }
}

/* ==========================================================================
   ILOTH v1.2 — section indépendante centrée sous le Hero
   ========================================================================== */

main > .iloth-vpn {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(calc(100% - 40px), 1180px);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 720px) {
  main > .iloth-vpn {
    width: min(calc(100% - 24px), 1180px);
  }
}

@media (max-width: 390px) {
  main > .iloth-vpn {
    width: calc(100% - 20px);
  }
}


/* ==========================================================================
   ILOTH v1.3 — bloc sous le Hero
   Corrige le mode desktop où main passe en display:flex.
   ========================================================================== */

@media (min-width: 901px) and (min-height: 720px) {

  main:has(> #iloth-vpn) {
    display: block;
    min-height: 0;
    padding: 28px 0 50px;
  }

  main:has(> #iloth-vpn) > .hero {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
  }

  main:has(> #iloth-vpn) > #iloth-vpn {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;

    margin-top: 36px;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
  }
}


/* ==========================================================================
   ILOTH v1.4 — ordre responsive
   1. Heure / terminal
   2. ILOTH
   3. Hero / Me contacter
   ========================================================================== */

@media (max-width: 900px) {

  main:has(> #iloth-vpn) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }

  /*
   * Le wrapper .hero ne crée plus de boîte visuelle :
   * ses deux enfants participent directement à la grille de <main>.
   */
  main:has(> #iloth-vpn) > .hero {
    display: contents;
  }

  /* 1 — heure / terminal */
  main:has(> #iloth-vpn) > .hero > #services {
    order: 1;
    width: min(1180px, calc(100% - 26px));
    margin-inline: auto;
  }

  /* 2 — ILOTH */
  main:has(> #iloth-vpn) > #iloth-vpn {
    order: 2;
    width: min(1180px, calc(100% - 26px));
    margin: 0 auto;
  }

  /* 3 — Votre cloud / Vos règles / Me contacter */
  main:has(> #iloth-vpn) > .hero > div:first-child {
    order: 3;
    width: min(1180px, calc(100% - 26px));
    margin-inline: auto;
  }
}

@media (max-width: 390px) {

  main:has(> #iloth-vpn) > .hero > #services,
  main:has(> #iloth-vpn) > #iloth-vpn,
  main:has(> #iloth-vpn) > .hero > div:first-child {
    width: calc(100% - 20px);
  }
}

/* ==========================================================================
   ILOTH v1.5 — ordre responsive final
   1. Heure / terminal
   2. Hero / Me contacter
   3. ILOTH
   ========================================================================== */

@media (max-width: 900px) {

  /* 1 — heure / terminal */
  main:has(> #iloth-vpn) > .hero > #services {
    order: 1;
  }

  /* 2 — Votre cloud / Vos règles / Me contacter */
  main:has(> #iloth-vpn) > .hero > div:first-child {
    order: 2;
  }

  /* 3 — ILOTH */
  main:has(> #iloth-vpn) > #iloth-vpn {
    order: 3;
  }
}


/* ==========================================================================
   Règles de Softcloud Community (modale communauté) — repliables, sans JS
   ========================================================================== */

.community-rules {
  flex: 0 0 auto;
  margin: 0 24px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.community-rules > summary {
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.community-rules > summary::-webkit-details-marker {
  display: none;
}

.community-rules > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  transition: transform .15s ease;
}

.community-rules[open] > summary::before {
  transform: rotate(90deg);
}

.community-rules > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 14px;
}

.community-rules-body {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 16px 14px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
  scrollbar-width: thin;
}

.community-rules-body h3 {
  margin: 4px 0 8px;
  font-size: 1rem;
}

.community-rules-body p {
  margin: 0 0 10px;
  color: var(--muted);
}

.community-rules-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.community-rules-list h4 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 0.92rem;
}

.community-rules-list p {
  margin: 0;
}

@media (max-width: 720px) {
  .community-rules {
    margin: 0 14px 10px;
  }

  .community-rules-body {
    max-height: 38vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-rules > summary::before {
    transition: none;
  }
}
