/* ── IPTV Test Generator — Form Styles v2.0 ────────────────────────────────── */

:root {
  --iptg-bg:        #0c0c0f;
  --iptg-card:      #13131a;
  --iptg-border:    rgba(255,255,255,.08);
  --iptg-accent:    #ff6a00;
  --iptg-accent2:   #ff9a3c;
  --iptg-text:      #f0f0f0;
  --iptg-muted:     #888;
  --iptg-success:   #22c55e;
  --iptg-error:     #ef4444;
  --iptg-radius:    12px;
  --iptg-radius-sm: 8px;
}

/* ── Conteneur ──────────────────────────────────────────────────────────────── */
.iptg-wrap {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── Formulaire ─────────────────────────────────────────────────────────────── */
.iptg-form {
  background: var(--iptg-card);
  border: 1px solid var(--iptg-border);
  border-radius: var(--iptg-radius);
  padding: 32px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.iptg-header {
  text-align: center;
  margin-bottom: 28px;
}

.iptg-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--iptg-accent), var(--iptg-accent2));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.iptg-title {
  color: var(--iptg-text);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.2;
}

.iptg-subtitle {
  color: var(--iptg-muted);
  font-size: 14px;
  margin: 0;
}

/* ── Champs ─────────────────────────────────────────────────────────────────── */
.iptg-field {
  margin-bottom: 18px;
}

.iptg-label {
  display: block;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: .02em;
}

.iptg-optional {
  color: var(--iptg-muted);
  font-weight: 400;
}

.iptg-input,
.iptg-select {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--iptg-border);
  border-radius: var(--iptg-radius-sm);
  color: var(--iptg-text);
  font-size: 15px;
  padding: 12px 14px;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.iptg-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.iptg-input:focus,
.iptg-select:focus {
  border-color: var(--iptg-accent);
  box-shadow: 0 0 0 3px rgba(255,106,0,.15);
}

.iptg-input::placeholder {
  color: #555;
}

/* ── Durées ─────────────────────────────────────────────────────────────────── */
.iptg-durations {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.iptg-dur-label {
  cursor: pointer;
}

.iptg-dur-label input[type="radio"] {
  display: none;
}

.iptg-dur-label span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--iptg-border);
  border-radius: var(--iptg-radius-sm);
  color: #bbb;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  position: relative;
  gap: 2px;
}

.iptg-dur-label span em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  background: linear-gradient(90deg, var(--iptg-accent), var(--iptg-accent2));
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
}

.iptg-dur-label input[type="radio"]:checked + span {
  background: rgba(255,106,0,.12);
  border-color: var(--iptg-accent);
  color: var(--iptg-accent2);
}

/* ── Option adulte ───────────────────────────────────────────────────────────── */
.iptg-adult-field {
  margin-bottom: 24px;
}

.iptg-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #aaa;
  font-size: 14px;
}

.iptg-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--iptg-accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Bouton principal ────────────────────────────────────────────────────────── */
.iptg-btn {
  width: 100%;
  background: linear-gradient(90deg, var(--iptg-accent), var(--iptg-accent2));
  color: #fff;
  border: none;
  border-radius: var(--iptg-radius-sm);
  font-size: 16px;
  font-weight: 700;
  padding: 15px 24px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  letter-spacing: .02em;
  display: block;
  text-align: center;
  text-decoration: none;
}

.iptg-btn:hover   { opacity: .9; }
.iptg-btn:active  { transform: scale(.98); }
.iptg-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.iptg-btn-outline {
  background: transparent;
  border: 1px solid var(--iptg-accent);
  color: var(--iptg-accent);
  margin-top: 16px;
}

/* ── Messages ───────────────────────────────────────────────────────────────── */
.iptg-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--iptg-radius-sm);
  font-size: 14px;
  text-align: center;
}

.iptg-message.success {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--iptg-success);
}

.iptg-message.error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--iptg-error);
}

/* ── Modale résultat ─────────────────────────────────────────────────────────── */
.iptg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.iptg-modal-inner {
  background: var(--iptg-card);
  border: 1px solid var(--iptg-border);
  border-radius: var(--iptg-radius);
  padding: 32px 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: iptg-slide-up .3s ease;
}

@keyframes iptg-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.iptg-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.iptg-modal-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.iptg-modal-header h3 {
  color: var(--iptg-text);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.iptg-modal-header p {
  color: var(--iptg-muted);
  font-size: 14px;
  margin: 0;
}

/* ── Credentials ─────────────────────────────────────────────────────────────── */
.iptg-credentials {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--iptg-border);
  border-radius: var(--iptg-radius-sm);
  padding: 16px;
  margin-bottom: 8px;
}

.iptg-cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--iptg-border);
  gap: 12px;
}

.iptg-cred-row:last-child { border-bottom: none; }

.iptg-cred-label {
  color: var(--iptg-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.iptg-cred-value {
  color: var(--iptg-text);
  font-size: 13px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  text-align: right;
}

.iptg-copy-btn {
  background: rgba(255,106,0,.15);
  border: 1px solid rgba(255,106,0,.3);
  color: var(--iptg-accent2);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}

.iptg-copy-btn:hover { background: rgba(255,106,0,.3); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .iptg-form { padding: 24px 18px; }
  .iptg-durations { grid-template-columns: repeat(2, 1fr); }
}
