:root {
  --bg: #07111d;
  --panel: #0c1928;
  --panel-2: #101f31;

  --text: #d6e3ed;
  --muted: #91a8bf;

  --blue: #2196f3;
  --blue-light: #90caf9;

  --violet: #673ab7;

  --border: rgba(144, 202, 249, 0.18);

  --success: #68d391;
  --danger: #fc8181;
  --warning: #f6c667;
}


/* ============================================================
   BASE
   ============================================================ */

* {
  box-sizing: border-box;
}


body {
  margin: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(103, 58, 183, 0.16),
      transparent 32rem
    ),
    radial-gradient(
      circle at top left,
      rgba(33, 150, 243, 0.14),
      transparent 28rem
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    Arial,
    sans-serif;

  min-height: 100vh;
}


.hidden {
  display: none !important;
}


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


h1,
h2,
h3 {
  font-family:
    Orbitron,
    sans-serif;
}


/* ============================================================
   PAGE
   ============================================================ */

.page {
  width:
    min(
      1180px,
      calc(100% - 40px)
    );

  margin: 0 auto;

  padding:
    70px
    0
    90px;
}


.hero {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 30px;

  margin-bottom: 45px;
}


.eyebrow {
  font-family:
    Orbitron,
    sans-serif;

  letter-spacing: 0.22em;

  font-size: 0.78rem;

  color: var(--blue-light);

  margin:
    0
    0
    10px;
}


h1 {
  font-size:
    clamp(
      2.1rem,
      6vw,
      4.4rem
    );

  margin: 0;

  line-height: 1;
}


.subtitle {
  color: var(--muted);

  margin-top: 16px;

  font-size: 1.05rem;
}


/* ============================================================
   PANELS / CARTES
   ============================================================ */

.panel,
.card {
  background:
    linear-gradient(
      145deg,
      rgba(16, 31, 49, 0.96),
      rgba(10, 24, 39, 0.96)
    );

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

  border-radius: 18px;
}


.panel {
  padding: 40px;
}


.card {
  padding: 24px;
}


.card h3 {
  margin:
    0
    0
    20px;

  color: var(--blue-light);

  font-size: 1rem;
}


.highlight {
  background:
    linear-gradient(
      145deg,
      rgba(33, 150, 243, 0.15),
      rgba(103, 58, 183, 0.15)
    );
}


.welcome {
  margin-bottom: 30px;
}


.welcome h2 {
  font-size: 2rem;

  margin: 0;
}


.grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(250px, 1fr)
    );

  gap: 18px;
}


/* ============================================================
   STATUTS
   ============================================================ */

.status {
  font-weight: 600;

  margin-bottom: 12px;
}


.status.ok {
  color: var(--success);
}


.status.bad {
  color: var(--danger);
}


.status.warning {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  width: fit-content;

  padding:
    7px
    11px;

  border-radius: 999px;

  color: var(--warning);

  border:
    1px solid
    rgba(246, 198, 103, 0.35);

  background:
    rgba(246, 198, 103, 0.08);

  font-weight: 700;
}


.big-number {
  font-family:
    Orbitron,
    sans-serif;

  font-size: 2.6rem;

  margin-top: 12px;
}


.small-number {
  font-size: 2rem;
}


/* ============================================================
   RÔLES
   ============================================================ */

.roles-card {
  margin-top: 18px;
}


.roles {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;
}


.role {
  border:
    1px solid
    var(--border);

  padding:
    7px
    11px;

  border-radius: 999px;

  font-size: 0.82rem;

  background:
    rgba(144, 202, 249, 0.05);
}


/* ============================================================
   MAP INFOS
   ============================================================ */

.ark-last-map {
  margin-top: 14px;
}

.ark-last-map-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ark-last-map-name {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #90CAF9;
}


/* ============================================================
   BOUTONS
   ============================================================ */

.button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding:
    12px
    18px;

  border-radius: 10px;

  text-decoration: none;

  border: 0;

  cursor: pointer;

  font-weight: 600;

  font-size: 0.95rem;

  transition:
    filter 0.15s ease,
    transform 0.15s ease,
    opacity 0.15s ease;
}


.primary {
  background:
    linear-gradient(
      135deg,
      var(--blue),
      var(--violet)
    );

  color: white;
}


.secondary {
  background: var(--panel-2);

  color: var(--text);

  border:
    1px solid
    var(--border);
}


.button.small {
  padding:
    8px
    12px;

  font-size: 0.82rem;
}


.button:disabled {
  cursor: not-allowed;

  opacity: 0.6;
}


.logout-zone {
  margin-top: 25px;

  display: flex;

  justify-content: flex-end;
}


/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  position: sticky;

  top: 0;

  z-index: 100;

  background:
    rgba(7, 17, 29, 0.94);

  border-bottom:
    1px solid
    var(--border);

  backdrop-filter:
    blur(14px);
}


.topbar-inner {
  width:
    min(
      1180px,
      calc(100% - 40px)
    );

  min-height: 72px;

  margin: 0 auto;

  display: flex;

  align-items: center;

  gap: 30px;
}


.brand {
  font-family:
    Orbitron,
    sans-serif;

  font-weight: 700;

  letter-spacing: 0.14em;

  color: var(--blue-light);

  text-decoration: none;

  white-space: nowrap;
}


.navigation {
  display: flex;

  align-items: center;

  gap: 5px;

  flex: 1;
}


.nav-link {
  appearance: none;

  border: 0;

  background: transparent;

  color: var(--muted);

  padding:
    10px
    12px;

  border-radius: 8px;

  cursor: pointer;

  font-family: inherit;

  font-size: 0.9rem;

  text-decoration: none;
}


.nav-link:hover {
  color: var(--text);

  background:
    rgba(144, 202, 249, 0.06);
}


.nav-link.active {
  color: var(--blue-light);

  background:
    rgba(33, 150, 243, 0.1);
}


.header-user {
  display: flex;

  align-items: center;

  gap: 14px;

  white-space: nowrap;
}


.header-user span {
  font-size: 0.88rem;

  color: var(--muted);
}


/* ============================================================
   TITRES DE PAGE
   ============================================================ */

.page-heading {
  margin-bottom: 30px;
}


.page-heading h1,
.page-heading h2 {
  margin: 0;

  color: #c7d8e5;

  font-size:
    clamp(
      2rem,
      5vw,
      3.2rem
    );
}


/* ============================================================
   INVITÉ
   ============================================================ */

.guest {
  max-width: 720px;

  padding-top: 80px;
}


.guest h1 {
  margin-bottom: 20px;
}


.guest .button {
  margin-top: 20px;
}


/* ============================================================
   DÉTAILS
   ============================================================ */

.details {
  margin: 0;
}


.details div {
  padding:
    12px
    0;

  border-bottom:
    1px solid
    var(--border);
}


.details div:last-child {
  border-bottom: 0;
}


.details dt {
  color: var(--muted);

  font-size: 0.8rem;

  margin-bottom: 5px;
}


.details dd {
  margin: 0;

  overflow-wrap: anywhere;
}


.technical {
  font-family: monospace;

  font-size: 0.82rem;
}


.section-card {
  margin-top: 18px;
}


.large-card {
  min-height: 200px;
}


.separator {
  border: 0;

  border-top:
    1px solid
    var(--border);

  margin:
    25px
    0;
}


/* ============================================================
   ADHÉSION ACTUELLE
   ============================================================ */

.membership-current {
  margin-bottom: 10px;
}


.membership-current .status {
  margin-top: 0;
}


.membership-current strong {
  color: var(--text);
}


.current-subscription {
  margin-top: 18px;
}


.subscription-period,
.subscription-renewal {
  margin-top: 18px;
}


.subscription-period p,
.subscription-renewal p {
  margin:
    6px
    0;
}


/* ============================================================
   ACTIONS SUR L'ADHÉSION
   ============================================================ */

.subscription-actions {
  margin-top: 26px;

  padding-top: 22px;

  border-top:
    1px solid
    var(--border);
}


.subscription-action-button {
  min-width: 220px;
}


.subscription-action-help {
  max-width: 620px;

  margin:
    10px
    0
    0;

  font-size: 0.86rem;

  line-height: 1.5;
}


/* ============================================================
   BOUTON DE RÉSILIATION
   ============================================================ */

.danger-button {
  color: var(--danger);

  border:
    1px solid
    rgba(252, 129, 129, 0.32);

  background:
    rgba(252, 129, 129, 0.055);
}


.danger-button:hover:not(:disabled) {
  background:
    rgba(252, 129, 129, 0.1);

  border-color:
    rgba(252, 129, 129, 0.48);

  filter: brightness(1.05);

  transform:
    translateY(-1px);
}


/* ============================================================
   PALIERS D'ADHÉSION
   ============================================================ */

.plans-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(230px, 1fr)
    );

  gap: 18px;

  margin-top: 20px;
}


.plan-card {
  position: relative;

  padding: 24px;

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

  border-radius: 16px;

  background:
    rgba(144, 202, 249, 0.035);

  display: flex;

  flex-direction: column;

  min-height: 320px;

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


.plan-card h3 {
  margin:
    0
    0
    15px;

  color: var(--blue-light);
}


.plan-price {
  font-family:
    Orbitron,
    sans-serif;

  font-size: 1.8rem;

  margin-bottom: 18px;

  color: var(--blue-light);
}


.plan-price span {
  font-family:
    Inter,
    sans-serif;

  font-size: 0.8rem;

  color: var(--muted);
}


.plan-entitlements {
  margin-top: 20px;

  flex: 1;
}


/* ============================================================
   PALIER ACTIF
   ============================================================ */

.plan-card.current-plan {
  border-color:
    rgba(104, 211, 145, 0.62);

  background:
    linear-gradient(
      145deg,
      rgba(104, 211, 145, 0.08),
      rgba(33, 150, 243, 0.055)
    );

  box-shadow:
    0 0 0 1px rgba(104, 211, 145, 0.07),
    0 12px 32px rgba(0, 0, 0, 0.16);
}


.plan-card.current-plan::before {
  content: "PALIER ACTUEL";

  position: absolute;

  top: 14px;
  right: 14px;

  padding:
    5px
    9px;

  border-radius: 999px;

  border:
    1px solid
    rgba(104, 211, 145, 0.35);

  background:
    rgba(104, 211, 145, 0.08);

  color: var(--success);

  font-size: 0.66rem;

  font-weight: 700;

  letter-spacing: 0.04em;
}


.plan-card.current-plan h3 {
  color: var(--success);
}


.plan-card.current-plan .plan-button {
  border-color:
    rgba(104, 211, 145, 0.3);

  color: var(--success);

  background:
    rgba(104, 211, 145, 0.04);
}


/* ============================================================
   AVANTAGES DES PALIERS
   ============================================================ */

.plan-benefit {
  display: flex;

  align-items: flex-start;

  gap: 10px;

  padding:
    10px
    0;

  border-top:
    1px solid
    var(--border);
}


.plan-benefit:first-child {
  border-top: 0;
}


.plan-benefit > div {
  display: flex;

  flex-direction: column;

  gap: 3px;
}


.plan-benefit strong {
  font-family:
    Inter,
    sans-serif;

  font-size: 0.9rem;

  color: var(--text);
}


.plan-benefit span {
  color: var(--muted);

  font-size: 0.82rem;
}


.benefit-check {
  flex:
    0 0 auto;

  color:
    var(--success) !important;

  font-weight: 700;

  font-size:
    0.95rem !important;

  line-height: 1.3;
}


/* ============================================================
   BOUTONS DES PALIERS
   ============================================================ */

.plan-button {
  width: 100%;

  margin-top: 20px;
}


.plan-button:not(:disabled) {
  opacity: 1;

  cursor: pointer;
}


.plan-button:not(:disabled):hover {
  filter: brightness(1.08);

  transform:
    translateY(-1px);
}


.plan-button:disabled {
  opacity: 0.6;

  cursor: not-allowed;
}


/* ============================================================
   PRÉVISUALISATION / AVERTISSEMENTS
   ============================================================ */

.preview-notice {
  margin-bottom: 25px;

  padding:
    15px
    18px;

  border:
    1px dashed
    rgba(144, 202, 249, 0.35);

  border-radius: 12px;

  background:
    rgba(33, 150, 243, 0.06);
}


.preview-notice strong {
  color: var(--blue-light);
}


.preview-notice p {
  margin:
    7px
    0
    0;

  color: var(--muted);

  font-size: 0.88rem;
}


.payment-warning {
  border:
    1px solid
    rgba(246, 198, 103, 0.42);

  background:
    linear-gradient(
      135deg,
      rgba(246, 198, 103, 0.09),
      rgba(252, 129, 129, 0.045)
    );
}


.payment-warning strong {
  color: var(--warning);
}


.payment-warning p {
  color:
    rgba(237, 246, 255, 0.78);
}


/* ============================================================
   RÉSILIATION PROGRAMMÉE
   ============================================================ */

.subscription-cancel-notice {
  border:
    1px solid
    rgba(246, 198, 103, 0.38);

  background:
    linear-gradient(
      135deg,
      rgba(246, 198, 103, 0.075),
      rgba(33, 150, 243, 0.035)
    );
}


.subscription-cancel-notice strong {
  color: var(--warning);
}


.subscription-cancel-notice p {
  color:
    rgba(237, 246, 255, 0.78);

  line-height: 1.5;
}


.draft-badge {
  position: absolute;

  top: 14px;
  right: 14px;

  padding:
    5px
    8px;

  border-radius: 999px;

  font-size: 0.7rem;

  font-weight: 600;

  color: var(--blue-light);

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

  background:
    rgba(33, 150, 243, 0.08);
}


/* ============================================================
   HISTORIQUE DES PAIEMENTS
   ============================================================ */

.payments-list {
  display: flex;

  flex-direction: column;

  width: 100%;
}


.payment-row {
  display: grid;

  grid-template-columns:
    minmax(220px, 1.6fr)
    minmax(110px, 0.5fr)
    minmax(110px, 0.5fr);

  align-items: center;

  gap: 24px;

  padding:
    18px
    0;

  border-bottom:
    1px solid
    var(--border);
}


.payment-row:first-child {
  padding-top: 5px;
}


.payment-row:last-child {
  border-bottom: 0;

  padding-bottom: 5px;
}


.payment-main {
  display: flex;

  flex-direction: column;

  gap: 4px;
}


.payment-plan {
  color: var(--text);

  font-size: 0.95rem;
}


.payment-date {
  color: var(--muted);

  font-size: 0.88rem;
}


.payment-amount {
  justify-self: start;

  font-family:
    Orbitron,
    sans-serif;

  color: var(--text);

  font-size: 0.95rem;
}


.payment-status {
  justify-self: start;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: fit-content;

  margin-bottom: 0;

  padding:
    6px
    10px;

  border-radius: 999px;

  font-size: 0.8rem;

  font-weight: 700;
}


/* ------------------------------------------------------------
   PAIEMENT RÉUSSI
   ------------------------------------------------------------ */

.payment-status.paid {
  color: var(--success);

  border:
    1px solid
    rgba(104, 211, 145, 0.25);

  background:
    rgba(104, 211, 145, 0.07);
}


/* ------------------------------------------------------------
   PAIEMENT ÉCHOUÉ / ANNULÉ
   ------------------------------------------------------------ */

.payment-status.failed {
  color: var(--danger);

  border:
    1px solid
    rgba(252, 129, 129, 0.28);

  background:
    rgba(252, 129, 129, 0.07);
}


/* ------------------------------------------------------------
   PAIEMENT REMBOURSÉ
   ------------------------------------------------------------ */

.payment-status.refunded {
  color: var(--blue-light);

  border:
    1px solid
    rgba(144, 202, 249, 0.25);

  background:
    rgba(144, 202, 249, 0.07);
}


/* ------------------------------------------------------------
   PAIEMENT EN ATTENTE
   ------------------------------------------------------------ */

.payment-status.pending {
  color: var(--muted);

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

  background:
    rgba(144, 202, 249, 0.04);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

  .topbar-inner {
    width:
      min(
        100%,
        calc(100% - 24px)
      );

    min-height: auto;

    padding:
      12px
      0;

    display: grid;

    grid-template-columns:
      1fr
      auto;

    align-items: center;

    gap:
      10px
      14px;
  }


  .brand {
    grid-column: 1;

    grid-row: 1;
  }


  .header-user {
    grid-column: 2;

    grid-row: 1;

    justify-self: end;

    gap: 8px;
  }


  .navigation {
    grid-column:
      1 / -1;

    grid-row: 2;

    width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    white-space: nowrap;

    scrollbar-width: none;

    padding-bottom: 2px;

    gap: 4px;
  }


  .navigation::-webkit-scrollbar {
    display: none;
  }


  .nav-link {
    flex:
      0
      0
      auto;

    white-space: nowrap;
  }


  .payment-row {
    grid-template-columns:
      minmax(180px, 1.4fr)
      minmax(100px, 0.5fr)
      minmax(100px, 0.5fr);

    gap: 16px;
  }
}


@media (max-width: 700px) {

  .page {
    width:
      min(
        calc(100% - 24px),
        1180px
      );

    padding-top: 35px;
  }


  .hero {
    align-items: flex-start;
  }


  .panel {
    padding: 25px;
  }


  .logout-zone {
    justify-content: stretch;
  }


  .logout-zone .button {
    width: 100%;
  }


  .subscription-action-button {
    width: 100%;
  }


  .payment-row {
    grid-template-columns: 1fr;

    gap: 8px;

    padding:
      18px
      0;
  }


  .payment-status {
    margin-top: 4px;
  }
}


@media (max-width: 600px) {

  .topbar-inner {
    width:
      calc(100% - 20px);

    padding:
      10px
      0;

    gap:
      8px
      10px;
  }


  .brand {
    font-size: 0.88rem;

    letter-spacing: 0.1em;
  }


  .header-user span {
    display: none;
  }


  .header-user {
    gap: 6px;
  }


  .header-user .button {
    padding:
      7px
      10px;

    font-size: 0.76rem;
  }


  .navigation {
    margin:
      0
      -2px;

    padding:
      2px
      2px
      4px;

    gap: 3px;
  }


  .nav-link {
    padding:
      8px
      10px;

    font-size: 0.78rem;

    border-radius: 7px;
  }


  .plan-card.current-plan::before {
    position: static;

    display: inline-flex;

    align-self: flex-start;

    width: fit-content;

    margin-bottom: 14px;
  }
}
