/* Feuille de style : même habillage que le portail Wi-Fi */
  :root {
    --ink: #1B1033;
    --violet: #6D28D9;
    --violet-deep: #5B21B6;
    --gold: #F2B01E;
    --paper: #FFFFFF;
    --bg: #EFEBF8;
    --muted: #5E5578;
    --line: #D9D0EC;
    --danger: #B42318;
    --danger-bg: #FDECEA;
    --radius: 18px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  }

  * { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
  }

  img { max-width: 100%; display: block; }

  :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

  /* ---------- En-tête ---------- */
  .top {
    background: var(--ink);
    color: #fff;
    padding: 22px 16px 64px;
    text-align: center;
  }
  .top img {
    margin: 0 auto;
    width: 100%;
    max-width: 170px;
    height: auto;
    border-radius: 10px;
  }
  .top h1 {
    margin: 14px 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #E9E2FA;
  }

  /* ---------- Mise en page ---------- */
  .page {
    max-width: 1040px;
    margin: -44px auto 0;
    padding: 0 14px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .colL, .colR { display: contents; }
  .p-login    { order: 1; }
  .p-slider   { order: 2; }
  .p-tarifs   { order: 3; }
  .p-buy      { order: 4; }
  .p-services { order: 5; }

  .card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: 0 1px 0 rgba(27,16,51,.06), 0 10px 28px -18px rgba(27,16,51,.45);
  }
  .card h2 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.01em;
  }

  /* ---------- Ticket de connexion ---------- */
  .ticket {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 rgba(27,16,51,.06), 0 18px 40px -20px rgba(27,16,51,.6);
    position: relative;
  }
  .ticket-head {
    background: var(--violet);
    color: #fff;
    padding: 20px 20px 22px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .ticket-head h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.015em;
  }
  .ticket-head p { margin: 6px 0 0; color: #E4D9FB; font-size: .95rem; }

  /* ligne de perforation avec encoches */
  .perf {
    position: relative;
    height: 0;
    border-top: 2px dashed var(--line);
    margin: 0 18px;
  }
  .perf::before, .perf::after {
    content: "";
    position: absolute;
    top: -13px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg);
  }
  .perf::before { left: -30px; }
  .perf::after  { right: -30px; }

  .ticket-body { padding: 22px 20px 20px; }

  .field { margin-bottom: 16px; }
  .field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: .95rem;
  }
  .input-wrap { position: relative; }
  .input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    font: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    background: #FAF8FE;
    border: 2px solid var(--line);
    border-radius: 12px;
    transition: border-color .15s, background .15s;
  }
  .input-wrap input::placeholder { color: #9A91B3; }
  .input-wrap input:focus {
    outline: none;
    border-color: var(--violet);
    background: #fff;
  }
  .input-wrap.has-toggle input { padding-right: 54px; }
  .toggle {
    position: absolute;
    top: 0; right: 0;
    width: 52px; height: 52px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 12px;
    font-size: 1.2rem;
  }
  .toggle:hover { color: var(--violet); }

  .btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 3px 0 #B98300;
    transition: transform .08s, box-shadow .08s;
  }
  .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #B98300; }

  .alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--danger-bg);
    color: var(--danger);
    font-weight: 600;
    border-left: 5px solid var(--danger);
  }

  .trial {
    margin: 16px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
  }
  .trial a { color: var(--violet-deep); font-weight: 800; }

  /* ---------- Icônes (sprite SVG intégré, fonctionne hors ligne) ---------- */
  .ic {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* bouton Se connecter avec icône */
  .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .btn .ic { width: 1.35em; height: 1.35em; stroke-width: 2.4; }

  /* ---------- Achat ---------- */
  .p-buy { background: var(--ink); color: #fff; }
  .p-buy h2 { color: #fff; }
  .p-buy p { margin: 0 0 14px; color: #DCD2F4; }
  .call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    border-radius: 12px;
    background: var(--gold);
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 3px 0 #B98300;
  }

  /* ---------- Pied de page ---------- */
  .foot {
    text-align: center;
    padding: 18px 16px 30px;
    color: var(--muted);
    font-size: .9rem;
  }

  /* ---------- Page d'achat en ligne ---------- */
  .page { max-width: 560px; }
  .page.wide { max-width: 1000px; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }

  .plans { display: grid; gap: 10px; }
  .plan { display: grid; grid-template-columns: 92px 1fr; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #FAF8FE; cursor: pointer; position: relative; }
  .plan .dur { display: grid; place-items: center; padding: 12px 6px; background: var(--ink); color: var(--gold); font-weight: 800; font-size: 1.25rem; text-align: center; line-height: 1.1; border-right: 2px dashed var(--line); }
  .plan .info { padding: 10px 14px; display: block; }
  .plan .price { display: block; font-size: 1.3rem; font-weight: 800; color: var(--violet-deep); line-height: 1.2; }
  .plan .valid { display: block; color: var(--muted); font-size: .92rem; }
  .plan input:checked ~ .dur { background: var(--violet); color: #fff; }
  .plan input:checked ~ .info { background: #EFE8FC; }
  .plan:hover { border-color: var(--violet); }
  .plan input:focus-visible ~ .dur { outline: 3px solid var(--gold); outline-offset: -3px; }
  .plan.out { opacity: .55; cursor: not-allowed; }

  .hint { margin: 14px 0 0; color: var(--muted); font-size: .92rem; }
  .hint .ic { vertical-align: -4px; margin-right: 4px; color: var(--violet); }
  .hint-links { margin: 14px 0 0; text-align: center; font-size: .95rem; }
  .hint-links a { color: var(--violet-deep); font-weight: 700; }
  .notice { border-left: 6px solid var(--gold); }
  .notice .ic { vertical-align: -4px; color: var(--violet); }

  .cred { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; background: #FAF8FE; border: 2px solid var(--line); border-radius: 14px; }
  .cred .ico { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; }
  .cred .ico .ic { width: 22px; height: 22px; }
  .cred > div { flex: 1; min-width: 0; }
  .cred small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.2; }
  .cred strong { display: block; font-size: 1.35rem; line-height: 1.3; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace; letter-spacing: .02em; }
  .copy { flex: none; width: 44px; height: 44px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--violet-deep); cursor: pointer; display: grid; place-items: center; }
  .copy.done { background: var(--violet); color: #fff; border-color: var(--violet); }
  .ticket-body .btn { margin-top: 6px; text-decoration: none; }
  a.btn { display: flex; }

  .center { text-align: center; }
  .spin { width: 46px; height: 46px; margin: 4px auto 14px; border: 5px solid var(--line); border-top-color: var(--violet); border-radius: 50%; animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .btn-alt { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--violet); color: var(--violet-deep); background: #fff; font: inherit; font-size: 1.05rem; font-weight: 800; text-decoration: none; text-align: center; margin-top: 8px; }

  /* ---------- Administration ---------- */
  code { background: #EFE8FC; padding: 2px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
  textarea.code { width: 100%; padding: 12px; font: inherit; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; background: #FAF8FE; border: 2px solid var(--line); border-radius: 12px; background-image: none; }
  select { width: 100%; height: 52px; padding: 0 14px; font: inherit; font-size: 1.05rem; color: var(--ink); background: #FAF8FE; border: 2px solid var(--line); border-radius: 12px; }
  .okbox { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #E8F7EE; color: #14532D; font-weight: 600; border-left: 5px solid #16A34A; }
  .tblwrap { overflow-x: auto; }
  .tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
  .tbl th { text-align: left; color: var(--muted); font-weight: 700; padding: 8px 8px 8px 0; border-bottom: 2px solid var(--line); white-space: nowrap; }
  .tbl td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
  .tbl form { margin: 0; }
  .low { color: var(--danger); }
  .mini { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--violet); background: #fff; color: var(--violet-deep); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
  .mini.danger { border-color: var(--danger); color: var(--danger); }
  .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; background: #EEE; color: #333; white-space: nowrap; }
  .b-live { background: #FDECEA; color: var(--danger); }
  .b-test { background: #FFF4D6; color: #7A5600; }
  .s-fulfilled { background: #E8F7EE; color: #14532D; }
  .s-pending { background: #FFF4D6; color: #7A5600; }
  .s-waiting_stock, .s-failed, .s-error { background: #FDECEA; color: var(--danger); }

  @media (min-width: 900px) {
    .top { padding-bottom: 72px; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
  }
